Spec-Driven Development
also known as SDD, spec-first development, Spec Kit workflow
Write the spec first and treat it as the source of truth; the code is what the agent generates from it. Start with a short constitution of standing principles, then specify what to build, plan how to build it, break the plan into agent-sized tasks, and only then let the agent implement. When requirements change you change the spec, not the code, and regenerate.
Methodology process overview
Intent. Make the specification, not the code, the source of truth so an AI agent implements against a settled, reviewable description.
When to apply. Use this when an AI coding agent does the bulk of the implementation and you want control over what it builds. It fits greenfield features and well-scoped changes where the requirements can be pinned down up front. Don't apply it to pure exploration where you do not yet know what you want.
Inputs
- Feature idea — The thing to build, stated as an outcome a user wants, not as code.
- Project constitution — The standing principles and constraints the project always honours: stack, style, non-negotiables.
- Spec-driven tooling — A toolkit such as Spec Kit and an AI coding agent that can read specs, plans, and tasks.
Outputs
- Feature specification — A reviewed document of what to build, for whom, why, and the core flows, free of implementation detail.
- Technical plan — How the feature will be built: stack choices, architecture, and constraints derived from the spec.
- Task list — The plan broken into discrete, agent-executable tasks.
- Implementation — Code the agent generates from the tasks, which serves the spec rather than the other way around.
Steps (6)
Write the constitution
Record the standing principles the project always honours: stack, style, and non-negotiable constraints. This layer outlives any one feature.
Specify the feature
Describe what to build, who it is for, what problem it solves, and the core and edge flows. State behaviour, not implementation.
Plan the technical approach
Turn the spec into a plan: stack choices, architecture, and constraints. This is where the how lives.
usesPlan-and-Execute
Break into agent-sized tasks
Split the plan into discrete tasks an agent can pick up and finish, each with a clear done state.
Let the agent implement
The agent writes code to satisfy the tasks, plan, and spec that are already settled.
Re-spec on change
When requirements change, edit the spec and regenerate the affected tasks rather than hand-patching the generated code.
Framework-specific instructions
Pick a framework and generate a framework-targeted rewrite of this methodology's steps.
Choose framework
AI-generated for GitHub Spec Kit (GitHub) — verify against official docs.
Principles
- The spec is the source of truth; code is its generated output.
- Specify behaviour, not implementation; let the plan own the how.
- Review while change is cheap, against a readable spec.
- On change, edit the spec and regenerate, do not patch the code.
Known failure modes (2)
Related patterns (4)
- ★Spec-First Agent
Drive the agent loop from a human-authored specification document rather than free-form prompts.
- ★Spec-Driven Loop
Run the same prompt against a fixed spec in a deterministic outer loop until the spec is satisfied.
- ★Pre-Flight Spec Authoring
Before any code is generated, author a multi-pillar spec and have the agent critique it for ambiguity and edge cases, so that the loop executes against a reviewed target rather than a fresh prompt.
- ★★Plan-and-Execute
Plan all the steps once with a strong model, then execute each step with a cheaper model under the plan.
Related compositions (2)
- full-code · framework
GitHub Spec Kit
Spec-Driven Development toolkit from GitHub: a CLI plus template suite that forces an explicit Specify / Plan / Tasks authoring phase before any agent implementation step runs.
- recipe · abstract shapeModern Coding Agent
An agent that reads, writes, and runs code in a sandbox, calling tools and (optionally) sub-agents while a human approves the destructive parts. The shape that powers Cursor, Claude Code, OpenHands, Aider, Codex CLI.
Related methodologies (1)
Sources (3)
Provenance
- Added to catalog:
- Last updated:
- Verification status: partial