spec-resolve
Skill0 starsChanged 7 months agoMITView on GitHub
Resolve a context bundle of relevant specs for a feature
In this repository45 other files it gives its agents.
- decisions/CLAUDE.mdCLAUDE.md
- kb/CLAUDE.mdCLAUDE.md
- spec/CLAUDE.mdCLAUDE.md
- work/CLAUDE.mdCLAUDE.md
- script-devSkill
- architectSkill
- auditSkill
- capabilitiesSkill
- curateSkill
- decisionsSkill
- feature-cleanupSkill
- feature-completeSkill
- feature-coordinateSkill
- feature-domainsSkill
- feature-hardenSkill
- feature-implementSkill
- feature-planSkill
- feature-prSkill
- feature-quickSkill
- feature-refactorSkill
- feature-resumeSkill
- feature-retroSkill
- featureSkill
- feature-testSkill
- kbSkill
- project-contextSkill
- researchSkill
- setup-vallorcineSkill
- spec-authorSkill
- spec-backfillSkill
- spec-initSkill
- specSkill
- spec-splitSkill
- spec-verifySkill
- spec-writeSkill
- uninstall-vallorcineSkill
- upgrade-vallorcineSkill
- vallorcine-helpSkill
- work-decomposeSkill
- work-planSkill
- work-resumeSkill
- work-runSkill
- workSkill
- work-startSkill
- work-statusSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 10 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Run corpus health check:
- Very specific: line 21
If output says "Not initialized", tell the user to run /spec-init first.
- Very specific: line 38
Read the Domains matched: line from the bundle header.
- Distinctive: line 43
Ask yourself: given the feature description, could there be relevant domains not captured by keyword matching?
- Distinctive: line 49
If you identify missing domains, run once more with override:
- Distinctive: line 58
If after two runs the domain set still seems incomplete, append a note to the bundle header:
- Very specific: line 68
If Omitted (budget): is non-empty, append to the bundle:
- Very specific: line 80
If the bundle contains a ## Displacement section, the resolver detected that new spec requirements contradict existing APPROVED specs.
- Distinctive: line 101
Read the full requirement text from both spec files to give the user context.
- Distinctive: line 103
Use AskUserQuestion with options:
- Very specific: line 116
Narrow new / Narrow old: Stop the resolve. Display which spec needs editing and suggest /spec-author to make the revision.
- Distinctive: line 125
After all displacements are resolved (or deferred), append to the bundle:
- Distinctive: line 134
If any decision was "Narrow new" or "Narrow old", the bundle output stops here — do not proceed to Step 4.
- Distinctive: line 149
Never read spec files outside what the script returns
- Distinctive: line 150
Never invoke /spec-resolve recursively
- Very specific: line 151
If NEEDS_DOMAIN_INFERENCE=true appears in script stderr, that is handled by step 2 — it is not an error
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/spec-resolve <feature-description>
Build a resolved context bundle of relevant specifications for a feature.
The bundle is a pre-filtered, token-budgeted input artifact for the
implementation agent. You never navigate the .spec/ corpus manually —
the bash resolver does all file discovery and filtering.
Pre-flight guard
Run corpus health check:
bash .claude/scripts/spec-stats.shIf output says "Not initialized", tell the user to run /spec-init first.
Stop.
Step 1 — Run the resolver script
bash .claude/scripts/spec-resolve.sh "$ARGUMENTS" 25000Capture the full output as BUNDLE.
Step 2 — Domain completeness check (single inference step)
Read the Domains matched: line from the bundle header.
Then read ONLY .spec/CLAUDE.md — specifically the Domain Taxonomy table.
No other files.
Ask yourself: given the feature description, could there be relevant domains not captured by keyword matching? Consider:
- Does the feature touch interfaces owned by an unmatched domain?
- Does the feature description use synonyms or abstractions that don't appear literally as domain names?
If you identify missing domains, run once more with override:
OVERRIDE_DOMAINS="storage,query,compaction" \
bash .claude/scripts/spec-resolve.sh "$ARGUMENTS" 25000Replace BUNDLE with this output.
Hard limit: maximum two script invocations. Do not loop.
If after two runs the domain set still seems incomplete, append a note to the bundle header:
Possible missing domains: <your assessment> — load manually if neededStep 3 — Handle budget omissions
If Omitted (budget): is non-empty, append to the bundle:
## Budget Omissions
These specs were excluded due to token budget. If your feature directly
modifies their interfaces, load them individually:
<list omitted IDs>Step 3.5 — Displacement resolution
If the bundle contains a ## Displacement section, the resolver detected
that new spec requirements contradict existing APPROVED specs. Each
displacement must be resolved before the bundle is complete.
Skip this step entirely if no ## Displacement section exists.
Parse and group
Parse each DISPLACED: line from the section. Group by existing spec ID
so the user sees all displacements per spec together.
Resolve each displacement
For each displaced existing spec, display:
── Displacement detected ─────────────────────
New: <new_id>.<req_id> — "<requirement text>"
Existing: <existing_id>.<req_id> — "<requirement text>"
Signal: <signal from DISPLACED line>Read the full requirement text from both spec files to give the user context.
Use AskUserQuestion with options:
- "Accept" (description: invalidate the existing requirement — adds
<existing_id>.<existing_req_id>to the new spec'sinvalidatesarray) - "Narrow new spec" (description: revise the new spec to avoid the conflict — stop and re-run after editing)
- "Narrow old spec" (description: revise the existing spec to coexist — stop and re-run after editing)
- "Defer" (description: record as unresolved obligation and continue)
Process decisions
- Accept: Record
<existing_id>.<existing_req_id>for the new spec'sinvalidatesarray. The spec-write step will include it when registering. - Narrow new / Narrow old: Stop the resolve. Display which spec needs
editing and suggest
/spec-authorto make the revision. The bundle is incomplete — the user must re-run/spec-resolveafter editing. - Defer: Append
[UNRESOLVED: displacement — <new_id> vs <existing_id>]to the new spec'sopen_obligations. The spec will remain DRAFT and be excluded from downstream stages until resolved.
Append resolution summary
After all displacements are resolved (or deferred), append to the bundle:
## Displacement Resolution
| Existing Spec | Requirement | Decision | Action |
|---------------|-------------|----------|--------|
| <id> | <req_id> | Accept | → invalidates in new spec |
| <id> | <req_id> | Defer | → open_obligations in new spec |If any decision was "Narrow new" or "Narrow old", the bundle output stops here — do not proceed to Step 4.
Step 4 — Output the bundle
Emit the complete bundle. Do not summarize, rewrite, or interpret it. The bundle is an input artifact for the implementation agent.
Hard constraints
- Maximum two script invocations per resolve call
- Never read spec files outside what the script returns
- Never invoke /spec-resolve recursively
- If NEEDS_DOMAIN_INFERENCE=true appears in script stderr, that is handled by step 2 — it is not an error
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

