/spec-exec¶
Run a single iteration of autonomous spec implementation. Claude picks the highest-priority pending task, implements it, tests it, updates the spec, and commits — then stops.
Usage¶
Run the script from your project root:
Arguments¶
| Argument | Required | Description |
|---|---|---|
--spec-name <name> |
No | Which spec to execute against. Auto-detected if only one spec exists in .claude/specs/. |
What It Does¶
- Reads your spec files (
requirements.md,design.md,tasks.md). - Builds a prompt with the full spec context.
- Runs Claude in autonomous mode with that prompt.
- Claude selects the next highest-priority pending task, implements it, writes tests, updates
tasks.md, and commits the changes. - Stops after one task.
Prerequisites¶
- A completed spec in
.claude/specs/<name>/with all three files (requirements.md,design.md,tasks.md). - Run
/spec <name>first if you have not created a spec yet.
Example¶
Tips¶
- Use
/spec-execwhen you want to review each task's implementation before proceeding to the next. It gives you a checkpoint after every task. - Use
/spec-loopinstead if you want to run all tasks unattended. - After each run, check
/spec-statusto see what was completed and what is next.
See Also¶
- /spec-loop — Run all tasks in a loop until complete
- /spec-status — Check progress after implementation
- /spec-accept — Run acceptance testing once all tasks are complete