Spec-Driven-Development
A Claude skill that keeps your AI coding tools from contradicting each other. Generates requirements.md, design.md, and tasks.md before any code is written — then creates matching config files for Claude Code, Cursor, Copilot, Windsurf, and Aider.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/fredantb--spec-driven-development)HTML
<a href="/listings/fredantb--spec-driven-development"><img src="/api/listings/fredantb--spec-driven-development/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Install the skill, then start a conversation with any of these:
"I want to start a new project" "my AI keeps going off script, help" "I already have a codebase, no specs yet" "set up cursor and claude code for my team project"
Claude will ask a few short questions and generate your spec files. No configuration needed.
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 434 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: spec-driven-development
- version: 1.0.0
- description: >
- Use this skill to scaffold Spec Driven Development: requirements.md, design.md, tasks.md, and cross-compatible AI config files (CLAUDE.md, .cursorrules, .windsurfrules, .github/copilot-instructions.md). Triggers: 'requirements', 'spec', 'design doc', 'tasks', 'CLAUDE.md', 'cursorrules', 'SDD', 'spec driven', 'AI configuration', 'cross-AI', 'multi-agent', 'agent setup'. Also trigger for: 'set up my AI tools', 'keep agents consistent', 'stop AI going off-script', 'plan before coding', 'structure project for AI'. Retrofit triggers: 'document my system', 'document my codebase', 'describe my architecture', 'write up what we built', 'add specs to existing project', 'no specs yet', 'help me document', 'I already have a codebase'. Use whenever a user wants to start a project, configure coding agents, create spec docs, or prevent AI agents from drifting, hallucinating scope, or producing inconsistent implementations.
- ---
- # Spec Driven Development Skill
- This skill guides the user through creating a complete Spec Driven Development environment:
- - `requirements.md` — what the system must do
- - `design.md` — how it will be built
- - `tasks.md` — atomic, ordered implementation steps
- - AI agent configuration files for Claude Code, Cursor, Windsurf, GitHub Copilot, and Aider
- **Reference files** (read when needed):
- - `references/sdd-curriculum.md` — full teaching curriculum, newbie to hero
- - `references/capabilities-and-cross-ai.md` — Claude Code capabilities, limitations, cross-AI strategy
- - `references/templates.md` — all spec file and AI config templates
- ---
- ## When to Read Reference Files
- | Situation | Read |
- |---|---|
- | User is new to SDD and needs explanation | `sdd-curriculum.md` Levels 1–3 |
- | User asks about Claude Code + SDD specifics | `capabilities-and-cross-ai.md` Part 1 |
- | User wants cross-AI config files | `capabilities-and-cross-ai.md` Part 2–3 |
- | You need template content to generate files | `templates.md` |
- ---
- ## Workflow: First Run (New Project)
- ### Step 1: Interview the User
- **Conversational rule (non-negotiable):** Ask exactly ONE question, wait for the answer, then ask the next. Never present questions as a numbered list or bullet list — that feels like a form, not a conversation. A newbie who sees three bullets may answer only the first or feel overwhelmed.
- **The four required answers before any file is generated:**
- 1. What the project does and who uses it
- 2a. Tech stack (language, framework, database)
- 2b. Deployment target (Railway, Fly.io, AWS, Vercel, etc. — offer to suggest if unknown)
- 3. Which AI coding tools they use (Claude Code, Cursor, Windsurf, Copilot, Aider, other)
- Stack and deployment are separate required answers because one does not imply the other. "Node.js" tells you nothing about deployment. "Railway" tells you nothing about the language. Both must be known independently before generation proceeds.
- **If the user's opening message already answers some but not all of these**, acknowledge what you know and ask only for what's missing — still one question at a time.
- **Optional follow-ups** (ask only when the user's answer raises real ambiguity):
- - "Are there performance, security, or accessibility constraints?"
- - "What is explicitly out of scope for this first version?"
- Example of correct pacing:
- > User: "I want to start a new project"
- > Claude: "Happy to help you spec it out. What does the project do — who are its users and what's the core job it performs?"
- > User: "It's a task manager for small dev teams"
- > Claude: "Got it. What's your tech stack — language, framework, database?"
- > User: "Node.js, Express, PostgreSQL"
- > Claude: "And where are you planning to deploy? (Railway, Fly.io, AWS — or I can suggest one)"
- > User: "Railway"
- > Claude: "Last thing — which AI coding tools do you use? (Claude Code, Cursor, Copilot, Windsurf, something else?)"
- Example of partial-answer handling:
- > User: "I'm building a task management API in Node.js"
- > Claude: "Good start — Node.js noted. What database are you planning to use?"
- > User: "PostgreSQL"
- > Claude: "And where are you deploying? (Railway, Fly.io, AWS — or I can suggest one)"
- > User: "Railway"
- > Claude: "Last thing — which AI coding tools do you use?"
- > *(stack partially given — ask for each missing part one at a time, never bundle them)*
- ### Generation Gate (enforced between Step 1 and Step 2)
- **HARD RULE: No file of any kind may be generated until all four interview answers are in hand.**
- This gate applies to every output path — `requirements.md`, `design.md`, `tasks.md`, `.cursorrules`, `CLAUDE.md`, and all other config files. There are no exceptions, including when:
- - The user says "create requirements for X" (X is a product category, not a full description)
- - The user says "make a cursorrules file" (a concrete deliverable name is not permission to skip the interview)
- - The user says "set up Cursor and Claude Code" (naming tools is not the same as providing project context)
- - The user gives a partial stack answer like "Node.js" (stack ≠ deployment — both are required separately)
- - The user provides some but not all of the four required answers (ask for the rest one at a time)
- If any answer is missing, ask for it conversationally before proceeding. Do not generate placeholder files with `{{UNFILLED}}` tokens. Do not generate plausible-sounding fake requirements from a product category alone.
- **Gate check before generating any file:**
- ```
- □ Do I know what the project does and who uses it? → if not, ask first
- □ Do I know the tech stack (language/framework/db)? → if not, ask first
- □ Do I know the deployment target? → if not, ask first
- □ Do I know which AI tools the user uses? → if not, ask first
- Only when all four are ✓ → proceed to Step 2
- ```
- ---
- ### Step 2: Generate `requirements.md`
- Read `references/templates.md` for the template. Fill in all `{{PLACEHOLDERS}}`.
- **Quality rules for requirements.md:**
- - Every functional requirement uses "shall" language (REQ-xxx: Actor shall verb object)
- - Every requirement has a concrete acceptance criterion
- - NFRs have a measurable metric (not "fast" — use "< 200ms at p95")
- - Out of scope section is non-empty (if user didn't provide it, infer likely assumptions)
- - Requirement IDs are sequential starting at REQ-001
- **Output:** Create `requirements.md` in the project root (or ask for path if ambiguous).
- ---
- ### Step 3: Generate `design.md`
- Read `references/templates.md` for the template.
- **Quality rules for design.md:**
- - Every REQ-xxx must map to at least one data model field, endpoint, or component
- - Data model fields have explicit types and constraints (not just "string" — use VARCHAR(255) or TEXT with reasoning)
- - API endpoints reference the REQ they satisfy
- - File structure section shows at minimum the top 2 levels of the project tree
- - Open Questions section captures anything the user hasn't decided yet — do not guess, ask
- **Output:** Create `design.md` in the project root.
- ---
- ### Step 4: Generate `tasks.md`
- Read `references/templates.md` for the template.
- **Quality rules for tasks.md:**
- - Tasks are ordered: infrastructure → data layer → business logic → API layer → tests → validation
- - Every task references at least one REQ or NFR **inline on the checkbox line** using the format `**TASK-{{id}}** [REQ-xxx, NFR-xxx]` — not only on a separate `_Refs_:` line. This makes references machine-checkable by static tools and CI scripts.
- - Every task has an explicit verification step (a test command, a manual check, a metric measurement)
- - Tasks are atomic — one task should not produce more than ~200 lines of new code
- - Phase goals are stated in plain English
- **Output:** Create `tasks.md` in the project root.
- ---
- ### Step 5: Generate AI Agent Configuration Files
- Ask the user which agents they use (if not already answered in the interview).
- For each selected agent, generate the appropriate config file. Read `references/capabilities-and-cross-ai.md` Part 2 for the per-agent templates.
- **Always generate:**
- - `CLAUDE.md` (for Claude Code) — even if user didn't ask, this is the baseline
- **Generate based on user's tools:**
- | Tool | File | Location |
- |---|---|---|
- | Cursor | `.cursorrules` | Project root |
- | Windsurf | `.windsurfrules` | Project root |
- | GitHub Copilot | `.github/copilot-instructions.md` | `.github/` directory |
- | Aider | `.aider.conf.yml` | Project root |
- **Quality rules for AI config files:**
- - The Universal Instruction Block is IDENTICAL in content across all files (same constraints, same protocol) — only the agent-specific additions differ
- - The block references the actual spec file names (`requirements.md`, `design.md`, `tasks.md`)
- - Agent-specific additions are minimal — no more than 5 lines of agent-specific rules
- - Config files include the project name and spec version in the header
- **Output:** Create all requested config files in their correct locations.
- ---
- ## Workflow: Existing Project (Retrofit)
- Triggered by: "I already have a codebase, no specs yet", "document what my system does", "describe my architecture", "help me document", "write up what we built", "add specs to my project", or any similar phrase implying an existing system without written specs.
- ### Retrofit Interview (ask one question at a time, conversationally)
- The retrofit interview is different from the new project interview — you are discovering truth from existing code, not designing from scratch. Ask these in order:
- 1. "What does the system do today — describe it as if explaining to a new teammate?"
- 2. "What's the tech stack? (language, framework, database, deployment)"
- 3. "Which AI tools do you use on this project?"
- 4. "Are there parts of the codebase you'd like to share so I can read the actual structure? (key files, folder tree, or a README)"
- 5. "What's the next feature or phase of work you're planning? (This determines what tasks.md covers)"
- Question 4 is important — retrofitting from code is more accurate than retrofitting from memory. Offer to read files if they can share them.
- ### Retrofit Generation Process
- **Step 1 — Reverse-engineer `requirements.md`**
- - Ask "What does this system do today?" and turn the description into REQ-xxx statements
- - Use past tense internally to distinguish discovered requirements from new ones
- - Flag every behavior you infer that the user didn't explicitly confirm: "I'm inferring REQ-004 from what you described — does the system actually enforce this?"
- - Add an Out of Scope section based on what's absent from their description
- - Mark the version as `v0-retrofit` to distinguish it from a forward-looking spec
- **Step 2 — Reverse-engineer `design.md`**
- - If files were shared, read the actual folder structure and data models
- - If no files were shared, produce a design.md skeleton and mark every section with `[TO VERIFY]`
- - Never invent a data model — if you don't know the schema, list the entities and mark fields as `[unknown]`
- - Capture the real endpoints or interfaces if available, otherwise list them as open questions
- **Step 3 — Generate `tasks.md` for the NEXT phase only**
- - Do not create tasks for work already done — that history is in git, not tasks.md
- - The first phase should be "Spec Verification": tasks to confirm that requirements.md and design.md actually match the live codebase
- - The second phase covers the next feature or planned work the user described in question 5
- **Step 4 — Generate AI config files as normal**
- - Apply the same generation gate: all three interview answers required first
- - The Universal Instruction Block must reference the real spec files by name
- ### Retrofit Gap Flagging
- After generating each file, explicitly list every assumption made:
- > "I made the following assumptions — please verify each one:
- > - REQ-003: I assumed authentication uses JWT because you mentioned tokens, but I didn't see the auth code
- > - design.md § Data Models: The `users` table fields are marked [TO VERIFY] — share the schema migration or model file to confirm"
- This is the most important difference between retrofit and new-project workflows. In a new project, the spec is the truth. In a retrofit, the code is the truth and the spec must be verified against it.
- ---
- ## Workflow: Updating Specs (Change Request)
- When the user wants to add a feature or change existing behavior:
- ### Spec Presence Check (run before anything else)
- When a feature request arrives without explicit spec context in the conversation, do not implement it. Instead, check:
- > "Before I add dark mode — do you have a `requirements.md` for this project? If so, I'll check whether it's in scope and add it properly. If not, let's create one first so this change has a home."
- A feature request without spec context is one of three situations:
- - **Specs exist, in scope** → update requirements.md first, then design.md, then tasks.md, then implement
- - **Specs exist, out of scope** → flag the conflict, ask whether to expand scope formally before touching code
- - **No specs exist** → route to the Retrofit workflow, build the spec, then handle the feature
- Never implement a feature request by jumping straight to code, even if the request seems small. "Add dark mode" or "add a search bar" always has spec implications.
- ### Change Request Process (when specs are confirmed to exist)
- 1. Identify which spec file(s) are affected
- 2. Propose the minimal change to `requirements.md` first (new REQ-xxx or modified acceptance criterion)
- 3. Show impact on `design.md` (new model fields, endpoints, components, or files)
- 4. Add new tasks to `tasks.md` in a new phase
- 5. Remind the user to regenerate AI config files if the project name or version changed
- **Never update `design.md` before `requirements.md` is updated first.** The requirement is the authority.
- ### Task closing protocol ("update my tasks.md")
- When a user asks to mark a task done, close it or update tasks.md,
- follow this exact two-step sequence — never bundle both steps into
- one message:
- **Step 1 — Identify the task first:**
- Ask which task was completed. Wait for the answer.
- > "Which task did you just finish? Give me the TASK-id or a brief description."
- **Step 2 — Divergence check after identification:**
- Only once the specific task is named, ask whether design.md needs updating.
- > "Before I mark TASK-007 `[x]` — did the implementation match `design.md`
- > exactly, or did anything diverge? If anything drifted, we update
- > design.md first, then close the task."
- **Why the order matters:** The divergence question only makes sense in
- the context of a specific task. Asking both at once forces the user to
- hold two things in mind before answering either. Always identify first,
- then check divergence.
- ---
- ## Session Management — CONTEXT.md
- ### The problem this solves
- A project's three spec files answer *what to build* and *how to build it*.
- They do not answer *where we are right now*. When a user starts a new chat
- session — because the context window filled, because they want an isolated
- session for a new task, or because a day passed — Claude has no way to know
- which task is active, what decisions were made mid-session, or why the code
- looks the way it does.
- `CONTEXT.md` is the session journal. It bridges instances.
- ### What CONTEXT.md contains
- - **Resume block** — the single most important section: active task ID,
- current phase, status, and any blocker. Claude reads this first and
- resumes without asking.
- - **Session log** — one row per session: date, one-line summary, files changed.
- Never transcripts — always summaries.
- - **Key decisions** — decisions that aren't obvious from the spec files
- (why JWT over sessions, why PostgreSQL over MongoDB, why soft-delete).
- - **Open questions** — unresolved items that haven't made it into design.md yet.
- - **Divergences** — places where implementation differs from design.md pending
- a formal update.
- ### When to create CONTEXT.md
- Generate CONTEXT.md as part of the initial spec setup (Step 2–4) or when
- a user first asks to resume work in a new session on an existing project.
- The file starts minimal — just the resume block and an empty session log.
- It grows through use.
- ### Rules for updating CONTEXT.md
- **At the end of any session where work was done:**
- 1. Add a row to the session log (date, one-line summary, files changed)
- 2. Update the resume block with the next active task
- 3. Move any resolved open questions to design.md
- 4. Record any divergences from design.md that are pending update
- **At the start of any session:**
- 1. Read CONTEXT.md first — before requirements.md, design.md, or tasks.md
- 2. Announce: "Session [N] resuming. Last worked on: [task]. Picking up at: [task]."
- 3. If CONTEXT.md does not exist yet, offer to create it
- **Never:**
- - Record conversation transcripts in CONTEXT.md — only outcomes
- - Let the session log grow beyond the last 10 sessions without archiving
- older entries to a `CONTEXT_ARCHIVE.md`
- - Update the session log mid-session — only at natural stopping points
- ### When CONTEXT.md is present — modified startup behavior
- When a user starts a session on a project that already has CONTEXT.md,
- Claude's opening move changes:
- **Without CONTEXT.md:**
- > "What are we working on today?"
- **With CONTEXT.md:**
- > "Session 4 resuming. Last session we completed TASK-005 and TASK-006
- > (JWT middleware). Active task is TASK-007 — POST /tasks implementation.
- > Ready to continue, or do you want to start something different?"
- This is the entire value of CONTEXT.md: the user says nothing and work
- continues exactly where it left off.
- ### Output quality check for CONTEXT.md
- Before presenting a generated or updated CONTEXT.md:
- - [ ] Resume block has a specific task ID — not "continue development"
- - [ ] Session log row added for the current session
- - [ ] No conversation transcripts — only outcomes
- - [ ] Open questions are questions, not tasks (tasks go in tasks.md)
- - [ ] No {{PLACEHOLDER}} tokens remain
- ---
- ## Output Quality Checklist
- Before presenting any generated file to the user, verify:
- **CONTEXT.md** (when generated or updated)
- - [ ] Resume block has a specific task ID and status
- - [ ] Session log has a row for the current session
- - [ ] No conversation transcripts — summaries only
- - [ ] Open questions are actual questions, not tasks
- - [ ] No `{{PLACEHOLDER}}` tokens
- - [ ] All functional requirements use "shall" language
- - [ ] All REQ-xxx IDs are unique and sequential
- - [ ] Every requirement has an acceptance criterion
- - [ ] NFRs have measurable targets
- - [ ] Out of scope section is present
- **design.md**
- - [ ] Every REQ maps to a design element
- - [ ] Data model has typed fields with constraints
- - [ ] Endpoints reference REQs
- - [ ] File structure is present
- - [ ] Open questions are captured, not assumed
- **tasks.md**
- - [ ] Tasks are ordered logically
- - [ ] Every task has a REQ/NFR reference
- - [ ] Every task has a verification step
- - [ ] No single task is too large (> 200 lines of new code is a smell)
- **AI config files**
- - [ ] Universal Instruction Block is present and complete
- - [ ] Content is consistent across all generated config files
- - [ ] Agent-specific additions are minimal and non-contradictory
- - [ ] Files are in the correct locations
- ---
- ## Metrics: Evaluating SDD Health
- Read `references/capabilities-and-cross-ai.md` Part 3 for the full metrics table.
- Quick summary:
- | Signal | Green | Yellow | Red |
- |---|---|---|---|
- | Spec coverage | > 95% code has REQ link | 80–95% | < 80% |
- | Task link rate | 100% tasks have REQ ref | 90–99% | < 90% |
- | Ambiguity escalations | < 2 per task | 2–5 | > 5 |
- | Design drift rate | 0 per sprint | 1–2 | > 2 |
- | Requirement creep | 0 undocumented features | — | Any |
- ---
- ## Teaching Mode
- If the user is new to SDD, offer to explain concepts using `references/sdd-curriculum.md`:
- - **"What is SDD?"** → Summarize sdd-curriculum.md introduction + Level 1
- - **"How do I write requirements?"** → Walk through Level 2.1
- - **"How do I use AI with specs?"** → Summarize Level 3
- - **"How do I set up multiple AI tools?"** → Level 4 + capabilities-and-cross-ai.md Part 2
- Always offer to generate the actual files after explaining — teaching and doing go together.
- ---
- ## Common Mistakes to Prevent
- Actively flag these anti-patterns if you see them in user inputs:
- | Anti-pattern | What to say |
- |---|---|
- | "Just start coding and we'll spec later" | "Let's take 10 minutes to write requirements.md first — it will save hours of rework." |
- | Requirements with no acceptance criteria | "How will we know this requirement is satisfied? Let's add a concrete test." |
- | Tasks that span multiple days | "This task is very large. Let's break it into smaller atomic steps." |
- | Design decisions before requirements | "Let's lock requirements first so the design has a foundation." |
- | AI config files that differ from each other | "I'll make sure all your AI agents get the same instruction block." |
- | Out of scope section missing | "What won't this version do? Stating it prevents scope creep." |
- | Feature request with no spec context | "Before I add that — do you have a requirements.md? I want to make sure this lands in the right place." |
- | Generating config files before spec exists | Never produce CLAUDE.md, .cursorrules, or similar until requirements.md is at least drafted. |
- | Filling placeholders with invented content | If interview answers are missing, ask — never fabricate plausible requirements from a product category. |
README.md · README · 401 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # spec-driven-development
- > Claude, Cursor, and Copilot all read the same plan before touching your code.
- A Claude skill that writes your specs before you write code — interviews you,
- generates `requirements.md`, `design.md`, and `tasks.md`, then creates matching
- config files for every AI tool you use so they can't contradict each other.
- [](https://github.com/FredAntB/spec-driven-development/releases/tag/v1.0-beta)
- [](https://github.com/FredAntB/spec-driven-development/actions/workflows/ci.yml)
- [](phase2a/assertions.md)
- [](phase2b/eval_session.md)
- [](phase2c/eval_flows.md)
- [](LICENSE)
- ---
- ## The problem this solves
- You open Claude Code and ask it to build a feature. An hour later it's
- done something technically impressive that isn't quite what you wanted.
- You ask Cursor to fix it. It contradicts what Claude Code did. You ask
- Copilot to clean up. It invents a third interpretation.
- The root cause is always the same: your AI agents have no shared source
- of truth. They fill every gap with their own assumptions.
- This skill fixes that by creating three files before any code is written:
- | File | Answers |
- |---|---|
- | `requirements.md` | What the system must do |
- | `design.md` | How it will be built |
- | `tasks.md` | What to build next, in order |
- Here's what those files actually look like:
- **`requirements.md`** — every requirement is traceable and testable:
- ```markdown
- - **REQ-001**: Users shall log time entries against a client project.
- - _Acceptance_: POST /entries returns 201 with entry id, duration, and project_id
- - **REQ-002**: Users shall generate a monthly invoice from logged entries.
- - _Acceptance_: GET /invoices/:month returns PDF with line items summing to total
- ```
- **`tasks.md`** — every task links back to its requirement:
- ```markdown
- - [ ] **TASK-003** [REQ-001]: Implement POST /entries with validation
- - _Output_: Route handler + duration schema validation
- - _Verify_: POST /entries returns 201 with all required fields
- ```
- Every AI tool reads from these files before touching code. Drift stops.
- ---
- ## Quick start
- Install the skill, then start a conversation with any of these:
- ```
- "I want to start a new project"
- "my AI keeps going off script, help"
- "I already have a codebase, no specs yet"
- "set up cursor and claude code for my team project"
- ```
- Claude will ask a few short questions and generate your spec files.
- No configuration needed.
- ---
- ## Installation
- ### Claude.ai / Claude desktop app (Chat tab)
- 1. Download [`spec-driven-development-v1.0.skill`](releases/latest)
- 2. In Claude settings → Skills → Install from file
- Or via CLI:
- ```bash
- claude plugin install FredAntB/spec-driven-development
- ```
- ### Claude Code (Code tab)
- ```bash
- git clone https://github.com/FredAntB/spec-driven-development
- ```
- Open the folder in the Code tab. The `CLAUDE.md` file is auto-read
- at session start and bootstraps the skill.
- **Windows note:** Git must be installed for the Code tab to work
- with local folders. Download from [git-scm.com](https://git-scm.com).
- ---
- ## What you get
- ### For a new project (greenfield)
- Claude interviews you in 4 short questions — one at a time,
- conversationally — then generates:
- ```
- your-project/
- ├── requirements.md ← what the system must do
- ├── design.md ← how it will be built
- ├── tasks.md ← atomic ordered implementation steps
- └── CLAUDE.md ← Claude Code reads this automatically
- ```
- **requirements.md** uses `shall` language and REQ-xxx IDs so every
- requirement is traceable:
- ```markdown
- ## Functional Requirements
- ### Tasks
- - **REQ-001**: Users shall create tasks with a title, description,
- due date, and assignee.
- - _Acceptance_: POST /tasks returns 201 with the created task object
- - **REQ-002**: Users shall update only tasks they created or are
- assigned to.
- - _Acceptance_: PATCH /tasks/:id returns 403 for unauthorized users
- ```
- **tasks.md** links every task back to its requirement inline:
- ```markdown
- ## Phase 2: Core endpoints
- - [ ] **TASK-007** [REQ-001]: Implement POST /tasks with validation
- - _Output_: Route handler + request schema validation
- - _Verify_: POST /tasks returns 201 with all fields present
- ```
- ### For an existing codebase (retrofit)
- Same result, reverse-engineered from what you describe:
- ```
- your-project/
- ├── requirements.md ← v0-retrofit: discovered from existing code
- ├── design.md ← with [TO VERIFY] on every inferred field
- └── tasks.md ← Phase 1 is spec verification, not new code
- ```
- ### For cross-AI teams
- Generates identical instruction blocks across every tool your team uses:
- ```
- your-project/
- ├── CLAUDE.md ← Claude Code
- ├── .cursorrules ← Cursor
- ├── .windsurfrules ← Windsurf
- ├── .github/copilot-instructions.md ← GitHub Copilot
- └── .aider.conf.yml ← Aider
- ```
- Each file contains the same Universal Instruction Block — agents read
- the same mandate, cite the same spec files, follow the same divergence
- protocol. The only differences are tool-specific additions.
- ---
- ## Supported AI tools
- | Tool | Config file | Status |
- |---|---|---|
- | Claude Code | `CLAUDE.md` | ✓ Tested |
- | Cursor | `.cursorrules` | ✓ Tested |
- | Windsurf | `.windsurfrules` | ✓ Tested |
- | GitHub Copilot | `.github/copilot-instructions.md` | ✓ Tested |
- | Aider | `.aider.conf.yml` | ✓ Generated |
- ---
- ## The Universal Instruction Block
- Every AI config file contains this block, with only the project name
- and spec version filled in:
- ```
- ═══════════════════════════════════════════════════════════
- SPEC DRIVEN DEVELOPMENT — PROJECT CONSTITUTION
- Project: Your Project Name
- Version: 1.0
- ═══════════════════════════════════════════════════════════
- This project uses Spec Driven Development. All work is
- governed by three source-of-truth files:
- requirements.md — What the system must do
- design.md — How the system is structured
- tasks.md — The ordered implementation plan
- MANDATORY BEFORE ANY ACTION:
- 1. Read requirements.md in full
- 2. Read design.md in full
- 3. Read tasks.md — identify the next incomplete [ ] task
- HARD CONSTRAINTS:
- ✗ Never implement requirements not in requirements.md
- ✗ Never alter the data model without updating design.md first
- ✗ Never create files not listed or implied in design.md
- ✗ Never mark a task [x] without verifying its acceptance criterion
- ✗ Never guess when a requirement is ambiguous — ask instead
- DIVERGENCE PROTOCOL:
- If implementation must deviate from design.md:
- → Stop immediately
- → Describe the conflict clearly
- → Wait for explicit user approval
- → Update design.md BEFORE writing code
- ═══════════════════════════════════════════════════════════
- ```
- ---
- ## Test suite & CI
- This skill ships with a complete, runnable test suite — 135 assertions
- across three phases. A GitHub Actions workflow runs the automatable
- checks on every push and pull request.
- ### GitHub Actions workflow (`.github/workflows/ci.yml`)
- Four jobs run on every push to `main`/`master` and on every PR:
- | Job | What it does | Required to pass? |
- |---|---|---|
- | `phase2a` | Runs 67 static assertions via Python | Yes — hard gate |
- | `phase2c` | Runs 53 generation quality checks against committed fixtures | Yes if fixtures present |
- | `phase2b-notice` | Prints instructions for running behavioral tests manually | Informational only |
- | `all-checks` | Aggregates results — reference this in branch protection rules | Yes |
- **Branch protection setup** — in your repo settings, add `all-checks`
- as the single required status check. This means one rule covers all
- automated phases now and any you add later.
- ### Running locally
- ```bash
- # Phase 2A — static assertions (67 checks)
- python3 phase2a/run_assertions.py
- # Windows — if python3 not on PATH or encoding errors occur
- PYTHONUTF8=1 python phase2a/run_assertions.py
- # Phase 2C — generation quality (53 checks, requires fixture files)
- python3 phase2c/check_outputs.py
- ```
- Or paste the KICKOFF.md for each phase into the Claude Code tab
- for a zero-setup run from any machine.
- ### Running in Claude Code (Code tab)
- | Phase | Paste this | Output |
- |---|---|---|
- | 2A | `phase2a/KICKOFF.md` | Runs script, explains any failures |
- | 2B | `phase2b/KICKOFF.md` | 15 behavioral tests → `eval_report.md` |
- | 2C | `phase2c/KICKOFF.md` | 3 flows → files → `eval_report_2c.md` |
- ### Phase 2C fixtures
- Phase 2C requires Claude Code to generate real spec files, which are
- then committed to the repo as fixtures that CI checks on every push.
- To regenerate fixtures after a significant skill change:
- 1. Open the repo folder in the Code tab
- 2. Paste `phase2c/KICKOFF.md`
- 3. Commit the files Claude Code writes to `phase2c/flow_a/`,
- `phase2c/flow_b/`, and `phase2c/flow_c/`
- CI will automatically pick up the new fixtures on the next push.
- ### Current test results
- | Phase | Type | Assertions | CI |
- |---|---|---|---|
- | 2A | Static file checks | 67 / 67 ✓ | Automated |
- | 2B | Behavioral (live session) | 15 / 15 ✓ | Manual |
- | 2C | Generation quality | 53 / 53 ✓ | Automated (fixtures required) |
- ---
- ## Trigger phrases
- The skill activates on a wide vocabulary. A sample:
- **Starting a project:**
- `"I want to start a new project"` · `"help me plan before I code"` ·
- `"set up SDD for my project"` · `"I need a spec"`
- **AI tool setup:**
- `"set up cursor and claude code"` · `"make a cursorrules file"` ·
- `"my AI keeps going off script"` · `"keep my agents consistent"`
- **Existing codebase:**
- `"I already have a codebase, no specs yet"` ·
- `"help me document what my system does"` ·
- `"describe my architecture"` · `"add specs to existing project"`
- **Feature requests:**
- `"add dark mode"` → triggers spec presence check before any code
- `"just start coding"` → triggers anti-pattern warning
- ---
- ## Anti-patterns the skill prevents
- | Anti-pattern | What the skill does |
- |---|---|
- | "just start coding" | Pushes back with concrete reasons, asks for spec |
- | Feature request without spec context | Checks for requirements.md before proceeding |
- | Generating config files before spec exists | Hard gate — interview required first |
- | AI guessing at ambiguous requirements | Asks for clarification, never fabricates |
- | Out of scope missing from requirements | Flags it and asks what won't be in v1 |
- ---
- ## Community beta — we need testers
- This skill is in **public beta**. It has passed 135 automated
- assertions and 3 end-to-end generation flows, but it has not yet
- been tested by strangers using natural language.
- We need 5 testers matching these profiles:
- - A complete beginner starting their first real project
- - A solo developer with an active side project (greenfield or partial)
- - A team lead whose team uses multiple AI tools
- - A developer with an existing codebase and no written specs
- - A developer who actively uses 3+ AI coding tools simultaneously
- **To volunteer:** Open an issue titled `[Beta] I'd like to test`
- and describe which profile fits you best.
- All you need to do is use the skill naturally for your real work
- and file issues when something doesn't work. That's it.
- ---
- ## Contributing
- 1. Fork the repo
- 2. Make your change to `SKILL.md` or the reference files
- 3. Run the Phase 2A assertion suite: `python3 phase2a/run_assertions.py`
- 4. If assertions fail, fix them before filing a PR
- 5. If your change adds new behavior, add a corresponding assertion
- New assertions go in `phase2a/assertions.md` (human-readable spec)
- and `phase2a/run_assertions.py` (machine-executable check).
- ---
- ## Skill structure
- ```
- spec-driven-development/
- ├── SKILL.md ← the skill (install this)
- ├── CLAUDE.md ← Code tab bootstrap
- ├── references/
- │ ├── sdd-curriculum.md ← newbie-to-hero teaching guide
- │ ├── capabilities-and-cross-ai.md ← Claude Code + cross-AI strategy
- │ └── templates.md ← spec file + UIB templates
- ├── phase2a/
- │ ├── assertions.md ← human-readable test spec
- │ └── run_assertions.py ← static assertion runner
- ├── phase2b/
- │ ├── eval_session.md ← behavioral test definitions
- │ └── KICKOFF.md ← Code tab eval kickoff
- ├── phase2c/
- │ ├── eval_flows.md ← end-to-end flow definitions
- │ ├── check_outputs.py ← generation quality checker
- │ └── KICKOFF.md ← Code tab eval kickoff
- └── beta/
- ├── BETA_PLAN.md ← 5-person beta plan
- ├── TESTER_BRIEF.md ← tester onboarding guide
- └── ISSUE_TEMPLATES.md ← feedback issue templates
- ```
- ---
- ## License
- MIT — use freely, attribution appreciated.
- ---
- ## Acknowledgements
- Built and tested using the Claude skill framework. Test suite
- methodology adapted from the skill-creator eval harness. All
- 135 assertions were written before the corresponding fixes —
- test-first, always.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.