Repository navigation
Spec Store
This page is the start of the guide to the spec store.
It is for a user who starts or resumes a change, and for a contributor who edits the spec slice.
Read it first, then read the pages that Related Pages lists.
The spec store keeps the requirements and the state of each change in the repository.
A fresh session reads these files again, so the work continues after /clear.
The reason for the store is in Decisions-Tools, decision D11.
The store is the folder .dotclaude/spec/, and git tracks it.
The dotclaude-spec command writes the files of a change and checks them.
Seven slash commands, one for each phase, fill the files and run the command.
This is schema 2, and it has no compatibility with schema 1.
A reader stops on a store with another schema.
dotclaude does not use OpenSpec. The history of the OpenSpec flow is in OpenSpec History.
A change is a set of requirements, and a set of packages that satisfy them.
Each state change of a package or of a change has a gate.
The dotclaude-spec command checks the gate, and an event in events.jsonl records the evidence.
A model cannot move a state by writing in a file, because the CLI is the only writer of the status key.
Each requirement has a stable ID, such as REQ-12.
A package lists the IDs that it satisfies.
The code carries no citation of the IDs.
The plan gate checks that each requirement is in the satisfies of a package.
Spec Store Choices gives the source of each of these choices.
| Size | Use it when | What the change holds |
|---|---|---|
trivial |
One edit has a command that shows that it is done. |
change.md, with a ## Requirements section |
medium |
A change touches one or more capabilities. |
change.md, and one requirements file for each capability |
large |
Several agents do different parts. | The medium files, design.md, and packages/
|
The default size is medium.
A small fix with a known cause is a trivial change.
There is no separate path for a hotfix.
A change moves through seven phases. Each phase has one slash command and one CLI subcommand with the same verb.
| Phase | Slash command | CLI |
|---|---|---|
| Specify | /dotclaude:specify |
dotclaude-spec specify |
| Plan | /dotclaude:plan |
dotclaude-spec plan |
| Implement | /dotclaude:implement |
dotclaude-spec implement, verify
|
| Review | /dotclaude:review |
dotclaude-spec review |
| Merge | /dotclaude:merge |
dotclaude-spec merge |
| Accept | /dotclaude:accept |
dotclaude-spec accept |
| Archive | /dotclaude:archive |
dotclaude-spec archive |
Spec Store Commands describes each subcommand. Spec Store States gives the gate of each phase.
- Run
/dotclaude:specifywith the id of the change and a size. The skill fills the requirements. It ends when the gate ofdotclaude-spec specifypasses. - For a
largechange, run/dotclaude:plan <id>to write the packages. Atrivialormediumchange gets the one packageP1fromspecify, so it needs noplanstep. - Run
/dotclaude:implement <id>. It runsdotclaude-spec readyto pick the packages, anddotclaude-spec runsto limit the agents of a wave. It starts animplementeragent for each package, in its own worktree. It runsdotclaude-spec verifyafter each agent ends. - Run
/dotclaude:review <id>. Arevieweragent reads the brief and the diff of eachverifiedpackage, and it changes no file. - Run
/dotclaude:merge <id>for eachapprovedpackage. The main session merges the branch. - Run
/dotclaude:accept <id>, and then/dotclaude:archive <id>. - Before
/clear, rundotclaude-spec status <id>. The events hold the state, so a fresh session needs no handoff file. In the fresh session, rundotclaude-spec next <id>to continue. Thehandoffslice runs the same command when it resumes a session. See Context and Handoff.
- The
agent.spawnhandler of animplementerthat has a brief runsdotclaude-spec implement <package>. -
turn.completedoes not move a package./dotclaude:implementrunsverifyafter the agent ends. - The handoff trigger reads
mergeandaccept. - The status line counts the
donepackages of the active change, and leaves out thecanceledpackages. See Status Line.
These parts run with no model call:
- The
dotclaude-speccommand, which reads and writes files, and runsgitand theverifycommand of a package. - The mod handlers of the
specslice. Theirevalsentries declarerequests: 0andtokens: 0. - The status line segment of the active change, which reads
activeProgressfromsrc/kernel/spec-store.ts.
These parts cost tokens:
- The seven skills, which the model runs.
- The
implementer,reviewer, andplanneragents. - The handoff that can follow a merge or an accept.
The
handoffslice can submit a prompt to Claude, and each prompt starts a model turn.
| Name | Value | File |
|---|---|---|
SIZES |
trivial, medium, large
|
src/plugins/dotclaude/slices/spec/limits.ts |
DEFAULT_SIZE |
medium |
src/plugins/dotclaude/slices/spec/limits.ts |
USAGE_SAMPLE_MAX_MS |
600000 (10 minutes) | src/plugins/dotclaude/slices/spec/limits.ts |
SUBAGENTS_DEFAULT |
20 | src/plugins/dotclaude/slices/spec/limits.ts |
CHANGE_ID |
letters, digits, ., _, -, not archive
|
src/plugins/dotclaude/slices/spec/limits.ts |
SPEC_SCHEMA |
2 | src/kernel/spec-store.ts |
SHOW_EVENTS_MAX |
5 | src/plugins/dotclaude/slices/spec/limits.ts |
- Spec Store Files: the files, the front matter, the IDs, and the events.
- Spec Store States: the states and the gates.
- Spec Store Commands: the subcommands.
- Spec Store Choices: the source of each choice, and the alternatives that dotclaude did not take.
- Architecture: the slices and the layout of the core plugin.
- Skills: the skills that start and fill a change.
- Start
- How dotclaude Works
- Add-On Plugins
- How Claude Code Works
- Reference
- Rationale
- Evidence
- Development
- Archive