π± Spec-Driven Development Template
Learn Spec-Driven Development, then use it on real projects.
One rule, and a gate that stays shut until you approve a spec β and tells you on every run exactly what it checked.
πΊπΈ English Β· πͺπΈ EspaΓ±ol
Non-technical start Β· Quickstart Β· AI agent start Β· Commands Β· Community
What is this?
Spec-Driven Development (SDD) means writing and approving a clear specification before any code exists, so that scope and decisions outlive the chat window they were born in. By 2026 it is how most people build software with AI agents.
This repo does double duty.
It is a school: a bilingual (EN/ES) path that starts from zero, with guides, an interactive course and a tutor you can talk to. You do not need to know how to program to get through it.
It is also a toolkit for real work: enforcement scripts, rules your agent reads, an MCP server, and a compact spec/ sidecar you drop into a codebase that already exists.
The workflow engine underneath is GitHub Spec Kit. This repo is the practical layer around it.
The flow in action β create a spec, validate, pass the gate (regenerated on every release):
What changes in practice: decisions stop living in chat history and move into specs/. The gate stays closed until spec.md and plan.md exist, agree, and you record your consent β a script checks that, not somebody's memory. A new teammate or a new agent lands in a folder layout they already recognize. And bitacora/ keeps the session log, so six months later you can still find out why something was done the way it was.
Want the industry map? Read SDD in 2026: state of the art and how this template compares.
Choose your door
- Non-technical (founder, PM, curious): START_HERE_NON_TECH.md β a guided start with no jargon in it.
- Developer: QUICKSTART.md β the commands to scaffold and validate, about five minutes.
- AI agent, or you pasting into one: AI_START_HERE.md β operating rules plus copy/paste prompts for each level.
Then pick your learning level. Every guide on the docs site carries its level badge:
- π’ Beginner: quick guide for non-programmers
- π‘ Intermediate: team discipline guide
- π΄ Advanced: governance and standardization
[!TIP] If you would rather learn by doing, take the interactive course (GitHub Skills format): 4 steps, ~35 min, auto-graded by Actions. Your exam is the real SDD gate.
Start in 30 seconds
Copy/paste this prompt into your AI assistant (Claude, Cursor, Copilot, Gemini...):
Using https://github.com/juanklagos/spec-driven-development-template, guide me step by step with SDD for my project.
My project is: [describe your project in plain language].
If my project is new, initialize from this template and GitHub Spec Kit as the base workflow.
If it already exists, adapt it without breaking current behavior.
No code before approved spec and consistent plan.
Built-in commands for your AI agent
If you use Claude Code, this repo ships slash commands out of the box. Start with /sdd:help:
| Command | What it does |
|---|---|
/sdd:help | Tells you what stage you are in and the single next step |
/sdd:new | Guided start: idea β first spec ready for approval |
/sdd:spec | Create or refine a spec bundle with EARS criteria |
/sdd:gate | Runs the gate β approval, plan consistency, consent β and records yours |
/sdd:decision | One decision, written down in bitacora/decisiones/: what, why, what was rejected, when to revisit |
/sdd:close | Validates and closes the session with the output contract |
/sdd:tutor | A conversational SDD course by levels, graded by the real validation scripts |
Install in any project as a plugin (no cloning):
/plugin marketplace add juanklagos/spec-driven-development-template
/plugin install sdd@sdd-template
- VS Code / Copilot: the same flows as prompt files in
.github/prompts/. - Any agent (32+ tools): portable Agent Skill at skills/sdd-workflow/SKILL.md.
- AI context: llms.txt indexes all docs for coding agents (regenerate with
./scripts/generate-llms-txt.sh).
The golden rule
[!IMPORTANT] No code before an approved
spec.mdand a consistentplan.md. A script enforces this, and implementation starts only once your consent is on record.
./scripts/check-sdd-policy.sh . # multi-agent policy files are aligned
./scripts/check-sdd-gate.sh . # spec approved + plan consistent + consent recorded
./scripts/confirm-user-consent.sh --spec 001-<slug> "User approved scope X"
(In sidecar projects the same scripts live under ./spec/scripts/.)
Enforce it in CI too. This repo doubles as a GitHub Action, listed on the GitHub Marketplace:
- uses: juanklagos/spec-driven-development-template@v2.3.0
with:
path: "." # project root (sidecar or standalone auto-detected)
strict: "true"
Reference files: sdd.policy.yaml Β· INSTRUCTIONS.md Β· AGENT_OPERATING_SYSTEM.md
How it works
flowchart LR
A["π‘ Idea in plain language"] --> B["π spec.md approved"]
B --> C["πΊοΈ plan.md consistent"]
C --> D["β
tasks.md prioritized"]
D --> E["π¦ Gate + explicit consent"]
E --> F["βοΈ Implementation"]
F --> G["π Validation + logbook"]
Every feature gets a numbered spec bundle, and every session leaves a trace in bitacora/ (the logbook):
spec.mdβ what and why (approved by you)plan.mdβ how (consistent with the spec)tasks.mdβ concrete stepshistory.mdβ how it evolved
Full walkthrough example: examples/002-mcp-end-to-end
Apply it to a real project
Fastest start (no clone needed):
npx @juanklagos/create-sdd-project@latest my-app
It asks a few questions and scaffolds the recommended spec/ sidecar, or a full workspace, from the latest template.
Three ways to use the template, from lightest to heaviest:
| Mode | When | Command |
|---|---|---|
Compact spec/ sidecar β | Real or existing project: SDD artifacts in ./spec/, code stays in your project root | ./scripts/install-spec-sidecar.sh /path/to/project --profile=recommended |
Internal workspace www/ | The runnable project should live inside this template repo | ./scripts/create-www-project.sh my-project codex |
| Full standalone copy | You explicitly want the whole framework as your workspace | ./scripts/init-project.sh /path/to/project --profile=full |
[!TIP] The professional default is the compact
spec/sidecar and nothing else. Never copy the full framework into a real codebase unless you actually want standalone mode.
Everyday commands (sidecar mode shown; the same scripts exist at root in standalone mode)
| Action | Command |
|---|---|
| New spec | ./spec/scripts/new-spec.sh "my-feature" "Owner" |
| Validate structure | ./spec/scripts/validate-sdd.sh . --strict |
| Policy check | ./spec/scripts/check-sdd-policy.sh . |
| SDD gate | ./spec/scripts/check-sdd-gate.sh . |
| Status dashboard | ./spec/scripts/generate-status.sh |
Folder anatomy and layout details: project organization map
flowchart TD
A["Your project root (code)"] --> B["spec/"]
B --> C["idea/"]
B --> D["specs/ (numbered bundles)"]
B --> E["bitacora/ (logbook)"]
B --> F["scripts/ (gate + validation)"]
Connect via MCP (optional, advanced)
If your AI client supports MCP, this repo ships a local sdd-mcp server that turns the SDD workflow into guided commands (/start-project, /create-spec ...).
npm install
npm run build
npm run mcp:start
- No clone? Point your MCP client straight at npm:
{"command": "npx", "args": ["-y", "@juanklagos/sdd-mcp"]}. - SDD Builder (visual, drag-and-drop): build once with
npm run builder:build, thenSDD_PROJECT_ROOT=/path/to/your/project npm run mcp:http:startand openhttp://127.0.0.1:3334/builderβ compose your specs as connected cards, where every card is a realspecs/NNN/bundle on disk. Inside this template repository the builder is blocked by design (no target-project work in the template root), so always pointSDD_PROJECT_ROOTat a real workspace. See the visual guide. - SDD Desk (the same builder, as a desktop app): download it for macOS, Windows or Linux. It carries its own Node runtime, so nothing has to be installed first, and while it is open the app is your project's MCP server β point your agent at the URL it shows you. The builds are not code-signed: macOS and Windows ask you to authorise the app once, with a warning that sounds alarming, so it suits people who do not mind doing that. If you would rather not,
npx @juanklagos/sdd-mcp@latest --httpgives you the same builder in your browser with no warning at all. - Visual dashboard: point the server at a project β
SDD_PROJECT_ROOT=./www/my-project npm run mcp:http:startβ then openhttp://127.0.0.1:3334/dashboardfor a read-only executive view (gate verdict, KPI tiles, per-spec progress, dependency warnings) in your language, with no build step. The template root is not a workspace, so running it from here reports exactly that. - Easiest explanation first: Easy MCP Guide
- Client configs:
.mcp.json(Claude Code) Β· Cursor Β· Codex - Complete reference: docs/en/41-complete-mcp-reference.md
Note: GitMCP (free, remote) helps an AI read this public repo; the local sdd-mcp runs the real guided workflow. They complement each other: GitMCP guide.
Documentation
Browse online: the documentation site has every guide with search, an EN/ES language picker and level badges.
If you only read three:
- Workflow β the SDD flow step by step
- Structure β what each folder is for
- SDD in 2026: state of the art β the industry map and where this template stands
Everything else: the full documentation index organizes all 52 guides (EN/ES) by topic.
Community
- Docs site: juanklagos.github.io/spec-driven-development-template
- Questions, ideas, show-and-tell: GitHub Discussions
- Bugs and concrete proposals: Issues
- Interactive course: aprende-sdd β learn by doing, auto-graded by Actions
- Finished a tutor level?
/sdd:tutorrecords it in your logbook and hands you a completion badge for your README
Legal & authorship
- License: MIT β use it anywhere, including commercially and inside a company, free and without asking. Keep the copyright notice. Legal guide
- What you write with the templates is yours: TEMPLATE-OUTPUT.md
- Publishing a release / Publicar una versiΓ³n: RELEASING.md
- Changelog: CHANGELOG.md Β· Latest release: v2.3.0
- Copyright (c) 2026 Juan Carlos Alvarez Lagos (AUTHORS.md)
If this saves you one bad sprint, a β helps other people find it.
π± No code before approved spec and consistent plan.