Spec-Driven Development (SDD)
Core Philosophy
- Clarity before Code: Never generate code until requirements and design are approved.
- Iterative Refinement: Loop through Req → Design → Tasks until solid.
- Code via Docs: The truth is in the markdown files, not the chat.
Commands
Execute in the project root (where spec/ and steering/ live).
init
Scaffold the SDD folder structure and template files.
- If
spec/already exists, skip or ask before overwriting. - Create
spec/andsteering/. - Create
spec/intent.md(blank or minimal placeholder). - Copy templates from this skill’s
templates/directory (in the same folder asSKILL.md, or from your install path under~/.cursor/skills/sdd/after copying the skill there) into the project:templates/spec/requirements.md→spec/requirements.mdtemplates/spec/design.md→spec/design.mdtemplates/spec/tasks.md→spec/tasks.mdtemplates/steering/coding-standards.md→steering/coding-standards.md
reqs
Generate EARS requirements from intent.
- Read
spec/intent.mdandsteering/*.md. - Convert the intent into EARS requirements (see EARS Quick Reference below). Add a Properties (invariants) section.
- Write to
spec/requirements.md. - Ask for user approval before proceeding.
design
Generate technical design from requirements.
- Read
spec/requirements.mdandsteering/*.md. - Create a technical design: architecture, data models, component interfaces, error handling, security. Apply the Design Checklist below.
- Write to
spec/design.md. - Ask for user approval before proceeding.
tasks
Generate implementation tasks from design.
- Read
spec/design.mdandspec/requirements.md. - Create a sequential task list: max two levels (Task > Subtask). Link each task to requirement IDs (e.g.
REQ-001). Follow Task Rules below. - Write to
spec/tasks.md. - Ask for user approval before proceeding.
status
Report current state of the spec.
- List files in
spec/(and optionallysteering/). - If
spec/tasks.mdexists, count unchecked[ ]vs checked[x]and summarize.
EARS Quick Reference
- Ubiquitous:
<system> shall <response> - Event-Driven:
WHEN <trigger> [precondition] the <system> shall <response> - Unwanted:
IF <unwanted condition> THEN the <system> shall <response> - State-Driven:
WHILE <system state>, the <system> shall <response> - Optional:
WHERE <feature is included>, the <system> shall <response>
Use IDs like [REQ-001]; add a Properties (Invariants) section for universal correctness statements.
Design Checklist
- Edit ruthlessly (remove over-engineering).
- Check for circular dependencies; fix via interface extraction, layering, or events.
- Ensure alignment with steering documents.
Task Rules
- Two-level hierarchy maximum (Task > Subtask).
- Sequential order (each task builds on previous).
- Traceability: each task or subtask links back to requirement IDs (e.g. Traceability: Implements
REQ-001).
Additional Resources
- For full framework detail (workflow, refinement, iteration triggers), see reference.md.