Spec-DrivenGuide
The governance framework for developers and agents
$ npx spec-driven-guideRun it in your terminal, inside your project folder. The agent reads the rules and follows them.
Start with a prefix
Instruct the agent the way you would write a commit message.
The agent proposes the SPEC from the context it already holds about the project. You align it together before any code. Where there is risk, spell out as much detail as you can.
5 Steps
What the agent runs for you after a single prefixed line.
Agent Execution
What your agent does, step by step, on each phase.
SPEC
THE CONTRACTMode: PlanningPLAN
THE STRATEGYMode: PlanningCODE
THE EXECUTIONMode: FastTEST
THE VERIFICATIONMode: FastEND
THE DELIVERYMode: PlanningAgent Commands
Start the right workflow with a simple text prefix.
No agent in your editor yet?Browse the prompts
Harness Memory
The files your agent reads before every cycle.
Common Questions
What developers ask before the first cycle.
Do I need to write a long specification to use the Spec-Driven Guide?
Not usually. One line is enough: a prefix (feat:, fix:, docs:, audit: or land:) plus what you want. The agent proposes the full SPEC and stops at the approval gate, where the two of you align it before any code. Write more up front where the risk is real.
How do I install the Spec-Driven Guide in a project?
Run npx spec-driven-guide inside the project. The CLI writes an AGENTS.md router at the repository root plus an .ai/ instruction set. Any agent that reads AGENTS.md picks the governance up from there.
Which AI agents does it work with?
Any agent that reads AGENTS.md at the repository root: Claude Code, Cursor, GitHub Copilot, Codex, Gemini, Windsurf and Roo Code. Claude Code also auto-loads a CLAUDE.md pointer to the same file.
What are the five phases of the SDG cycle?
SPEC defines what and why. PLAN turns it into an ordered task list. CODE follows the plan and nothing more. TEST verifies the build against the agreement. END closes the cycle with a changelog and a commit proposal. The agent stops for explicit approval at SPEC and at PLAN.
What does the audit: prefix do?
It runs a drift check: the agent compares the codebase against the governance rules installed under .ai/ and returns a correction plan with tasks you can act on, instead of silently rewriting code.
Context Builder
Generate your agent's starting instructions in a few clicks.
Context Builder
Step 1/4: Architecture
Architecture Flavor
Architecture FlavorPick the architecture pattern that fits your project.