The write-spec command is the second step in the repeatable feature development cycle in the spec-driven development workflow with Agent OS.
This phase takes your requirements from shape-spec and formalizes them into a clear, comprehensive specification document.
What gets created
The write-spec command creates one core document in agent-os/specs/[this-spec]/:
- spec.md - Comprehensive specification with user stories, requirements, reusable components, technical approach, visual references, and scope boundaries
How to run
Claude Code
Run command, /write-spec
When using Agent OS with Claude Code commands enabled, run:
/write-spec
Other Tools
Two ways to run this command
When using other AI coding tools, you have two options for running this command:
Option A: Run all steps in one shot
This single command instructs your agent to complete the entire write-spec process automatically. Some agents perform better at this than others.
@agent-os/commands/write-spec/write-spec.md run this
Option B: Run each numbered step manually
For more control and reliability, you can run each numbered command sequentially. Check your agent-os/commands/write-spec/ folder for the numbered command files.
Next step
With your specification written, you're ready to break it down into tasks.