Skip to content

Reading

Appearance

Text size

Bookmarks

    No bookmarks yet. Use “Bookmark chapter” or “Bookmark this section” while reading.

    Your data

    Saved only in this browser on this device. It is not synced to other devices or sent anywhere.

    Whole guide on one page · 22 chapters

    Spec-Driven Development with GitHub Spec Kit: The Complete Guide

    You are reading the whole guide on one page. Switch to chapter-by-chapter reading.

    Plain English, start to finish. Checked against the official Spec Kit docs in November 2026.


    Table of Contents

    1. The big idea, in one minute
    2. Why "vibe coding" breaks, and how specs fix it
    3. The mental model: What → How → Steps → Code → Check
    4. The full workflow at a glance
    5. Installing Spec Kit
    6. Adding Spec Kit to a project (new or existing)
    7. What all those new folders are
    8. How Spec Kit handles many features
    9. Step 1: constitution, the permanent rules
    10. Step 2: specify, the WHAT
    11. Step 3: clarify, filling the gaps
    12. Step 4: plan, the HOW
    13. Step 5: checklist, unit tests for your requirements
    14. Step 6: tasks, the step-by-step to-do list
    15. Step 7: analyze, checking everything is consistent
    16. Step 8: implement, writing the code
    17. Step 9: converge, did we build what we planned?
    18. The feedback loops (where the real power is)
    19. Command names differ per AI agent
    20. Best practices and common mistakes
    21. One-page cheat sheet
    22. Sources

    1. The big idea, in one minute

    Spec-Driven Development (SDD) means: before the AI writes any code, you write down clearly what you want and how you want it built.

    You don't type "build me a registration page" and hope for the best. You and the AI produce a small set of documents first:

    Document Answers the question Analogy (building a house)
    Constitution "What rules must we always follow?" Building codes and regulations
    Spec (spec.md) "What should this feature do, and why?" The client's wish list
    Plan (plan.md) "How will we build it technically?" The architect's blueprint
    Tasks (tasks.md) "What exact steps, in what order?" The construction schedule
    Code The actual thing The house
    Learning aidFrom rules to a house

    Read left to right. The dashed boundary is the building code: it applies to every drawing inside it. Select a drawing, or the code, to find its row in the table. The arrow labels summarise chapters 12, 14 and 16.

    Once these documents exist, the AI has much more context, so it guesses less and gets it right more often.

    Key shift: In traditional development the code is the source of truth and docs go stale. In SDD the spec is the source of truth and code is generated from it. If the spec changes, you regenerate the plan, tasks and code.

    GitHub Spec Kit is a free, open-source toolkit from GitHub that turns this idea into a repeatable process. It gives you:

    • a small command-line tool called specify that sets Spec Kit up in your project, and
    • a set of slash commands (/speckit-specify, /speckit-plan, and so on) that you run inside your AI coding agent's chat (Copilot, Claude Code, Cursor, Gemini CLI, Codex, Kiro CLI and many more).

    Spec Kit itself costs nothing. You only pay for the AI agent you use with it.

    Optional reviewCheck yourself
    1. In Spec-Driven Development, what is the source of truth?
    2. In the house analogy, which document is the architect's blueprint?
    3. What do you pay for when you use Spec Kit?

    2. Why "vibe coding" breaks, and how specs fix it

    "Vibe coding" means describing something loosely and letting the AI improvise. It works for tiny demos, but falls apart on real projects because:

    1. The AI fills gaps with guesses. You said "users can register". Is email case-sensitive? What's the minimum password length? What happens on a duplicate email? The AI decides silently, and its choices may not be yours.
    2. No memory of your standards. Every new chat forgets that your team uses Java 21, Maven, layered architecture and JUnit 5.
    3. There's nothing to check against. When the AI says "done", you have no list of what "done" was supposed to mean.
    4. Big asks produce big messes. "Build the whole app" produces thousands of lines nobody reviewed.

    How Spec Kit fixes each one:

    Problem Spec Kit's fix
    AI guesses clarify asks you the questions before code exists
    Forgets standards The constitution is read automatically by every command
    Nothing to check against analyze (before coding) and converge (after coding) check the work against the spec
    Too big One feature at a time, broken into small numbered tasks
    Learning aidWhen each fix does its work
    Each row pairs one problem from the list with its fix from the table, placed on a line from "before code exists" to "after coding". Select a row to find the problem in the list.
    Optional reviewCheck yourself
    1. Which fix asks you questions before any code exists?
    2. Which problem does reading the constitution in every command solve?

    3. The mental model

    Remember this one line:

    RULES → WHAT → (clarify) → HOW → (checklist) → STEPS → (analyze) → CODE → CHECK
    constitution specify plan tasks implement converge
    • The bold ones (constitution, specify, plan, tasks, implement, converge) are the main road.
    • The ones in brackets (clarify, checklist, analyze) are optional quality gates, like a quick inspection before moving on.
    • The only strict requirement is that you specify before you plan. Everything else is good practice.
    Learning aidThe main road and its quality gates
    clarifychecklistanalyzeonly strict requirementRULESconstitutionWHATspecifyHOWplanSTEPStasksCODEimplementCHECKconvergeand WHY · no technologyall the technologyclarifychecklistanalyzeonly strictrequirementRULESconstitutionWHATspecifyHOWplanSTEPStasksCODEimplementCHECKconvergeand WHY ·no technologyall thetechnology
    • main road
    • optional quality gate
    • specify before plan
    Solid: the main road. Dashed detours: the optional quality gates. The thick segment is the only strict requirement: specify before plan; the rest is good practice. The list calls the main-road steps "the bold ones"; in the one-line model above they are the names without brackets.

    The most important rule in this whole guide:

    specify = WHAT and WHY. No technology. plan = HOW. All the technology goes here.

    If you mention "Spring Boot controller" or "PostgreSQL table" in your spec, you're mixing the two. Keep them apart. That way you can change your tech stack later without rewriting your requirements.

    Optional reviewCheck yourself
    1. Which ordering is the only strict requirement?
    2. Where does "PostgreSQL table" belong?

    4. The full workflow at a glance

    # Command Run how often Optional? Reads Writes Changes files?
    1 constitution Once per project (update rarely) No (strongly recommended) Your prompt + current constitution .specify/memory/constitution.md Yes
    2 specify Once per feature No Constitution + your feature description specs/NNN-name/spec.md, checklists/requirements.md, .specify/feature.json Yes
    3 clarify 0+ times per feature Yes spec.md Updates spec.md (Clarifications section) Yes
    4 plan Once per feature No Constitution + spec + your tech prompt plan.md, plus maybe research.md, data-model.md, contracts/, quickstart.md Yes
    5 checklist 0+ times Yes Spec (+ plan/tasks if they exist) checklists/<topic>.md Yes (checklist only)
    6 tasks Once per feature (regenerate if needed) No Plan + spec + supporting files tasks.md Yes
    7 analyze 0+ times Yes Spec + plan + tasks + constitution Nothing, it prints a report No, read-only
    8 implement 1+ times No tasks.md + everything else Source code, ticks off tasks Yes
    9 converge After each implement Recommended Code + spec + plan + tasks Only appends tasks to tasks.md (or nothing) Only appends tasks

    5. Installing Spec Kit

    5.1 Prerequisites

    • Python 3.11+
    • uv, a fast Python package manager (recommended)
    • Git (optional, but needed for the git extension that makes feature branches)
    • An AI coding agent (GitHub Copilot in VS Code, Claude Code, Cursor, Gemini CLI, and so on)

    5.2 Install uv

    On a Mac with Homebrew:

    Terminal window
    brew install uv

    Or use the standalone installer from the uv website (macOS/Linux use a curl script, Windows uses a PowerShell script). Check it worked:

    Terminal window
    uv --version

    5.3 Install the specify CLI

    The package is named specify-cli. The command it installs is specify.

    Learning aidOne package, one command
    • From PyPI (simplest)
    • Pinned to an exact release from GitHub
    • pipx or pip
    specify-clithe package
    specifythe command it installs
    sets Spec Kit up in your project
    You install the package specify-cli; it gives you the command specify, which sets Spec Kit up in your project. The three ways in are the ones listed under 5.3.

    From PyPI (simplest):

    Terminal window
    uv tool install specify-cli

    Or pinned to an exact release straight from GitHub (replace vX.Y.Z with a real tag from the Releases page; keep the leading v):

    Terminal window
    uv tool install specify-cli --from git+https://github.com/github/spec-kit.git@vX.Y.Z

    Other options: pipx install specify-cli or pip install specify-cli.

    5.4 Check and upgrade

    Terminal window
    specify version # is it installed, which version?
    specify self check # is there a newer release? (read-only)
    uv tool install --force specify-cli # upgrade

    Spec Kit changes fast (new commands like converge arrived in late 2026). Run specify self check now and then.


    6. Adding Spec Kit to a project

    Learning aidTwo starting points

    A brand-new project

    specify init users-microservicespec-driven-development/users-microservice/new
    • creates a new folder called users-microservice
    • asks: Which AI agent? Which script type?
    • or pass --integration and --script
    • hidden: names start with "."

    An existing project

    specify init --hereusers-app/your files+ Spec Kit files
    • adds Spec Kit files to your project folder
    • files may be merged/overwritten Commit your work to Git first
    Both paths run specify init. A new project gets its own folder; an existing one gets Spec Kit files added among yours, which is why the guide says to commit first.

    6.1 A brand-new project

    Terminal window
    cd ~/Documents/spec-driven-development
    specify init users-microservice

    This creates a new folder called users-microservice. It will ask you:

    1. Which AI agent? (Copilot, Claude, Gemini, Cursor, Codex, ...). Use the arrow keys and press Enter.
    2. Which script type? sh (Mac/Linux), ps (PowerShell, Windows), or py (Python).

    You can skip the questions by passing flags:

    Terminal window
    specify init users-microservice --integration copilot --script sh

    Then:

    Terminal window
    cd users-microservice
    ls -a # the folders start with "." so they are hidden without -a

    6.2 An existing project (brownfield)

    Go into your project folder and initialize here:

    Terminal window
    cd users-app
    specify init --here

    (Many tutorials, including your course, use specify init ., which does the same thing.)

    It warns: "Current directory is not empty… files may be merged/overwritten. Continue?" Type y. Commit your work to Git first so you can undo anything unexpected.

    Useful flags:

    • --force skips the "not empty" confirmation
    • --non-interactive means no prompts at all (for CI or scripts)
    • --integration claude (or another agent) picks the agent up front

    6.3 Switching or adding AI agents later

    Terminal window
    specify integration list # what's available
    specify integration install claude # add another agent
    specify integration use claude # make it the default
    specify integration switch cursor # replace the default with another
    specify integration status # what's installed

    6.4 Extensions (optional add-ons)

    Spec Kit's core stays small, and extras come as extensions. Your course installs the Git extension, which automatically creates and switches to a Git branch for each feature:

    Terminal window
    specify extension add git
    specify extension list

    (The official docs also mention bundled extensions such as bug and assess, plus specify extension search to discover more.)


    7. What all those new folders are

    After init you get roughly this (exact contents depend on version and agent):

    your-project/
    ├── .specify/ ← Spec Kit's "engine room" (you rarely edit by hand)
    │ ├── memory/
    │ │ └── constitution.md ← ⭐ your permanent project rules
    │ ├── scripts/ ← helper scripts (bash / powershell / python)
    │ ├── templates/ ← blank templates for spec, plan, tasks, checklist
    │ ├── integrations/ ← manifest files for each AI agent you enabled
    │ ├── workflows/ ← definitions of the step sequence
    │ ├── integration.json ← which agent(s) are installed / default
    │ └── feature.json ← ⭐ which feature is "active" right now
    │
    ├── .github/ ← (if Copilot) agent + prompt files for the slash commands
    │ ├── agents/ ← "specialists" that know how to do one step
    │ └── prompts/ ← the reusable prompts those specialists use
    │ (Claude Code puts its files in .claude/, Cursor in .cursor/, and so on)
    │
    └── specs/ ← created when you run your first /specify
    └── 001-user-registration/
    ├── spec.md
    ├── checklists/requirements.md
    ├── plan.md
    ├── research.md (sometimes)
    ├── data-model.md (sometimes)
    ├── contracts/ (sometimes, e.g. API definitions)
    ├── quickstart.md (sometimes)
    └── tasks.md

    What each one is for, in plain terms:

    • memory/constitution.md holds the rules that apply to every feature. Every command reads it.
    • templates/: Spec Kit never writes a document from scratch. It copies a template and fills it in, which keeps every spec, plan and task list in the same shape. Advanced teams customize these.
    • scripts/ are small shell scripts that do the mechanical work, such as creating the next numbered folder, copying templates and updating feature.json. You don't edit them.
    • integrations/ + .github/agents + .github/prompts are the glue that turns /speckit-plan into a long, carefully written prompt for your specific AI agent.
    • feature.json is the bookmark that tells every command which feature folder to work in.
    Learning aidHow the folders work together
    feature.json ⭐001-user-registration/spec.md · plan.mdtasks.md …

    The bookmark

    feature.json is the bookmark: it tells every command which feature folder to work in. Here it points at the only feature in the tree.

    Each card restates one bullet from "What each one is for", or a note in the tree. Select a card to find it in the text. workflows/ and integration.json appear in the tree but are not explained in this chapter.
    Optional reviewCheck yourself
    1. Which file tells every command which feature folder to work in?
    2. Which folder appears only when you run your first /specify?

    8. How Spec Kit handles many features

    Golden rule: one feature at a time. Don't spec the whole app at once. You'll drown in review work and edge cases.

    What happens when you run /speckit-specify for a new feature:

    1. Spec Kit picks the next number and a short name, for example 001-user-registration.
    2. It creates specs/001-user-registration/, and every document for that feature lives there.
    3. It updates .specify/feature.json to point at that folder, so that feature becomes "active".
    4. If the Git extension is installed, it also creates and switches to a branch called 001-user-registration.

    Later commands (clarify, plan, tasks, ...) read feature.json first, which is why you never need to tell them which feature you mean.

    Next feature? Run /speckit-specify again and you get 002-user-login, then 003-..., and so on.

    specs/
    ├── 001-user-registration/ (done)
    ├── 002-user-login/ (done)
    └── 003-password-reset/ ← feature.json points here now

    Note: In current versions the active feature comes from feature.json, not from your Git branch. Running git checkout 001-user-registration alone does not switch Spec Kit back. To switch, edit .specify/feature.json or set the environment variable SPECIFY_FEATURE_DIRECTORY.

    Learning aid · DemonstrationThree features, one bookmark

    specs/

    1. 001-user-registration/(done)← feature.json
    2. 002-user-login/(done)← feature.json
    3. 003-password-reset/(done)← feature.json

    Git branch

    003-password-reset

    Later commands (clarify, plan, tasks, ...) read feature.json first.

    To switch, edit .specify/feature.json or set SPECIFY_FEATURE_DIRECTORY.

    A demonstration, not a real file system or Git repository. Each step is one run of /speckit-specify from the guide. The Git lane only exists with the optional Git extension; checking out a branch moves the branch, not feature.json.

    The lifecycle:

    • constitution runs once per project.
    • specify → … → converge runs once per feature, again and again.
    Optional reviewCheck yourself
    1. You run git checkout 001-user-registration. Which feature do the Spec Kit commands work on?
    2. After 001-user-registration, what does the next /speckit-specify create?

    9. Step 1: constitution

    What it is

    The constitution holds your project's non-negotiable, long-term rules. Think of it as the "house rules" the AI must obey in every spec, plan, task and line of code.

    What belongs in it

    • Language and framework versions (e.g. Java 21, Spring Boot 3.x, Maven)
    • Architecture (layered: controller → service → repository; no business logic in controllers)
    • Coding standards and naming conventions
    • Testing rules (test-first; unit tests with JUnit 5; integration tests with Testcontainers; minimum coverage X%)
    • Security rules (never log passwords; validate all input; secrets come from environment variables)
    • API design conventions, error-handling style, logging and observability
    • Documentation standards
    • How the constitution itself gets amended (versioning, who approves)

    What does NOT belong in it

    Anything about a specific feature. "Users register with email" is a spec, not a constitution rule.

    Optional exerciseConstitution or feature spec?
    “Testing rules: test-first; unit tests with JUnit 5”
    “Users register with email”
    “Security rules: never log passwords; validate all input”
    “A password of at least 8 characters”
    “How the constitution itself gets amended (versioning, who approves)”
    “Registration is rejected with "Email address is already in use."”
    The rules are quoted from "What belongs in it"; the feature items come from chapter 10's user-registration example. Each answer cites its source.

    Tip from the course (a very good habit)

    Before running the command, use a chat AI to draft it with you, and ask the AI to interview you first:

    "Help me write a Spec Kit constitution prompt for a Spring Boot / Java 21 web app. First read the latest Spec Kit docs on the constitution command. Then ask me questions about build tool, architecture, testing, persistence, security, UI, and conventions. Only after I answer, write the prompt. Include only long-term rules, nothing feature-specific."

    Asking questions first stops the AI from inventing your standards.

    How to run it

    In your agent's chat:

    /speckit-constitution This is a Spring Boot 3 web application on Java 21, built with Maven.
    Architecture: layered (web → service → repository). Controllers contain no business logic.
    Testing: test-first. Every feature needs unit tests (JUnit 5, Mockito) and at least one
    integration test. Tests must fail before implementation is written.
    Persistence: Spring Data JPA, schema changes only through Flyway migrations.
    Security: never store or log plain-text passwords; validate all user input on the server.
    UI: server-side rendered Thymeleaf templates.
    Keep it simple: no extra abstraction layers or libraries without a documented reason.

    What happens

    The AI fills in the template placeholders in .specify/memory/constitution.md, adds a version number and dates, and keeps the dependent templates in sync with your rules.

    Your job afterwards

    Read it carefully. Every later step follows it, so a wrong rule here spreads into everything that comes after.

    Learning aidThe foundation under every step
    Every later step follows the constitution, so a wrong rule here spreads into everything that comes after.

    Background: the "Nine Articles"

    Spec Kit's methodology document (spec-driven.md) gives an example constitution with "articles" such as Library-First, CLI Interface, Test-First (non-negotiable), Simplicity (no more than 3 projects at first), Anti-Abstraction (use the framework directly instead of wrapping it), and Integration-First Testing (prefer real databases to mocks). The plan step then runs "gates" that check the design against these articles. You don't have to copy them, but they show the kind of thing a constitution should say.


    10. Step 2: specify

    What it is

    It creates the specification: a description of what one feature should do and why, written for a product person rather than a programmer.

    Write it with user stories

    A user story is one complete thing a person can do, from start to finish:

    As a visitor, I want to register with my name, email and password, so that I can start using the app.

    Give each story a priority:

    • P1: essential. Without it the feature doesn't work at all.
    • P2: important, but the core still works without it.
    • P3: nice to have, can wait.

    Each story needs acceptance scenarios in Given / When / Then form:

    Given a visitor enters a valid name, a valid email and a password of at least 8 characters, When they submit the registration form, Then a new account is created and a success message is shown.

    Given an account already exists with that email, When someone registers with the same email, Then registration is rejected with "Email address is already in use."

    Learning aidAnatomy of a user story and a scenario

    User story P1

    1. As avisitorrole
    2. I wantto register with my name, email and passwordgoal
    3. so thatI can start using the app.benefit

    Acceptance scenario

    1. Givena visitor enters a valid name, a valid email and a password of at least 8 characters,situation
    2. Whenthey submit the registration form,action
    3. Thena new account is created and a success message is shown.outcome
    P1 essentialP2 importantP3 can waitThis story is P1: without it the feature does not work at all.
    The parts are cut from the guide's own examples above, unchanged. A story says who, what and why; a scenario says situation, action and outcome. No technology appears in either.

    Also add an Out of Scope list. It keeps the AI focused:

    Out of scope: login, logout/sessions, viewing/updating/deleting accounts, password reset, email verification.

    How to run it

    /speckit-specify Build a "User Registration" feature.
    User Story 1 (P1): As a visitor I want to register a new account with my name, email
    address and password so that I can start using the application.
    Acceptance scenarios:
    1. Given valid name, valid email and a password of at least 8 characters, when I submit,
    then the account is created and I see a success message.
    2. Given an email that is already registered, when I submit, then I see
    "Email address is already in use" and no account is created.
    3. Given an invalid email format, when I submit, then I see a validation error.
    4. Given a password shorter than 8 characters, when I submit, then I see a validation error.
    Out of scope: login, logout, session management, profile view/update/delete,
    password reset, email verification.

    Notice what's missing: no "controller", no "JPA", no "BCrypt". Those come in plan.

    What it creates

    • specs/001-user-registration/spec.md with user stories, acceptance scenarios, edge cases, functional requirements (numbered like FR-001, FR-002), key entities and success criteria
    • specs/001-user-registration/checklists/requirements.md, a built-in quality checklist for the spec
    • an updated .specify/feature.json
    • a new Git branch, if the git extension is installed

    Where the AI is unsure, it may write [NEEDS CLARIFICATION: …] markers in the spec. That's a good thing: it's flagging the guesses instead of hiding them.

    Learning aidFrom your prompt to spec.md

    /speckit-specify prompt

    • User Story 1 (P1)
    • 4 acceptance scenarios
    • Out of scope

    specs/001-user-registration/spec.md

    • user stories
    • acceptance scenarios
    • edge cases
    • functional requirements (FR-001, FR-002 …)
    • key entities
    • success criteria
    • [NEEDS CLARIFICATION: …] where unsure

    not here: controller · JPA · BCrypt

    Left: the parts of the prompt above. Right: what the guide says spec.md contains. Technology words stay out; they come in plan.

    Your job

    Read spec.md. Is it what you meant? Edit it directly if not. You own this document.

    Optional reviewCheck yourself
    1. In "so that I can start using the app", which part of the story is this?
    2. Which belongs in this spec?

    What it is

    It's an interview. The AI reads your spec, finds what's vague or missing, and asks you up to about five targeted questions, one at a time. After each answer it writes the decision straight into spec.md.

    Why it matters

    Every gap you don't close here becomes an AI guess later. Fixing a misunderstanding in a sentence is cheap. Fixing it in 40 files of code is expensive.

    How to run it

    /speckit-clarify

    or point it at an area you care about:

    /speckit-clarify focus on security and input validation

    What it looks like

    Q1: How should email uniqueness be compared? A) Trim spaces; case-sensitive B) Trim spaces; case-insensitive (recommended) C) Trim; lowercase domain only Reply with a letter, "yes"/"recommended", or a short custom answer.

    You type B. It records the decision in a Clarifications section (with a date) and updates the affected requirements and edge cases, then asks the next most important question.

    Learning aid · SimulationA clarify session, simulated
    1. 1 · The spec is vague

      Given an account already exists with that email, when someone registers with the same email, then registration is rejected.

      ? Is email case-sensitive?

    2. 2 · Clarify asks one question

      Q1: How should email uniqueness be compared?
    3. 3 · The answer is recorded

      ## Clarifications (date)

      - How should email uniqueness be compared? → B) Trim spaces; case-insensitive

      The affected requirements and edge cases are updated too.

    Fixing it now costs one sentence, not 40 files of code.

    An illustrative simulation built from the guide's example. The question and options are the guide's; the spec excerpt is invented for illustration and is not Spec Kit's exact output format. Nothing here changes any file.

    Tips

    • Read the recommendation, but decide yourself. It's your product.
    • You can run clarify several times, each time on a different area.
    • It was formerly called /quizme.

    12. Step 4: plan

    What it is

    It turns the what (spec) into the how: a technical implementation plan.

    What goes in your prompt

    Tech decisions specific to this feature that aren't already in the constitution:

    /speckit-plan Implement as a server-rendered Spring MVC page at GET/POST /register using Thymeleaf.
    Use a RegistrationController, a UserService and a Spring Data JPA UserRepository.
    Store users in a "users" table created by a Flyway migration; unique index on lower(email).
    Protect passwords with Spring Security's PasswordEncoder (BCrypt). Never return or log the hash.
    Use Bean Validation (@Valid) on a RegistrationForm DTO. Use H2 for local dev, PostgreSQL in prod.

    Don't repeat rules that are already in the constitution or the spec. Spec Kit pulls those in automatically.

    What it creates

    • plan.md: technical context, architecture, project structure, and a Constitution Check section that confirms the plan doesn't break your rules (and justifies it if it has to)
    • research.md: decisions it researched and why (e.g. "BCrypt vs Argon2")
    • data-model.md: entities, fields, validation rules, relationships
    • contracts/: API or interface definitions (endpoints, request/response shapes)
    • quickstart.md: how to run and manually verify the feature

    Not every feature gets all of these. It depends on complexity.

    Learning aidWhat goes in, what comes out
    constitutionpulled in automatically
    spec.mdthe WHAT · pulled in automatically
    your plan promptthe HOW for this feature
    • Spring MVC page at GET/POST /register
    • Flyway migration · unique index on lower(email)
    • Spring Security's PasswordEncoder (BCrypt)
    • H2 for local dev, PostgreSQL in prod
    /speckit-plan
    • plan.mdarchitecture, project structure, Constitution Checkalways
    • research.mddecisions and whysometimes
    • data-model.mdentities, fields, validationsometimes
    • contracts/API or interface definitionssometimes
    • quickstart.mdhow to run and verifysometimes
    The constitution and spec are pulled in automatically; your prompt adds only this feature's technical decisions. plan.md is always written; the other files depend on complexity.

    Your job

    Review the plan like a senior engineer would. Is the architecture sensible? Any over-engineering? Does it match the constitution? Edit it now, because tasks and code are built from it.

    Tip: Ask the agent to "research rapidly-changing libraries mentioned in the plan and verify versions" when you rely on new frameworks. AI knowledge can be out of date.


    13. Step 5: checklist (optional)

    What it is

    Spec Kit calls it "unit tests for your requirements." Normal unit tests check whether code works. A checklist checks whether your requirements are well written: complete, clear, consistent and measurable.

    Learning aidTwo kinds of unit test
    unit testcodeDoes it work?
    checklistrequirementsAre they complete, clear, consistent and measurable?
    Same idea, different subject: a unit test checks code; a checklist checks the requirements before any code exists.

    How it differs from clarify

    clarify checklist
    Asks you questions Produces a list of questions for you to review
    Edits spec.md with your answers Doesn't edit the spec, only writes a checklist file
    Interactive conversation A document you go through on your own

    How to run it

    /speckit-checklist
    /speckit-checklist security
    /speckit-checklist UX and accessibility

    Example items it might generate:

    • "Is the error message for a duplicate email specified exactly?"
    • "Is the maximum length of the name field defined?"
    • "Are requirements for what happens on a database failure defined?"

    Your job

    Go through each item. If the spec doesn't answer it, update spec.md (or run clarify again), then tick the box. [x] means "the requirement is clearly written", not "the code is done."

    implement reads your checklists before it starts. If items are still unticked, it warns you and asks whether to continue.

    Learning aid · Educational exercisePractice checklist

    checklists/requirements.md (example)

    [x] = the requirement is clearly written

    An educational exercise with the guide's three example items. Ticking means "the requirement is clearly written", not "the code is done". Three examples are not a whole checklist, and nothing here is saved or written to any file.

    When to run it: after plan is a good default (so it can see both spec and plan), but you can run it any time after specify.


    14. Step 6: tasks

    What it is

    It breaks the plan into a numbered, ordered list of small tasks that the AI can complete one at a time.

    How to run it

    /speckit-tasks

    No extra prompt is needed. It reads plan.md, spec.md and any supporting files (data-model.md, contracts/, research.md, quickstart.md).

    How tasks.md is organized

    Phase 1: Setup → dependencies, config, package structure
    Phase 2: Foundational → shared building blocks everything needs (DB, security config, base entities)
    Phase 3: User Story 1 (P1) → tests FIRST, then the implementation for that story
    Phase 4: User Story 2 (P2) → ...
    Phase N: Polish & Cross-Cutting → docs, extra validation, cleanup
    + Dependencies & execution order
    + Parallel opportunities
    + Implementation strategy (e.g. "MVP = Phase 1–3")
    Learning aidFrom plan to phases
    1. Phase 1: Setupdependencies, config, package structure
    2. Phase 2: Foundationalshared building blocks everything needs
    3. Phase 3: User Story 1 (P1)tests FIRST, then the implementation
    4. Phase 4: User Story 2 (P2)...
    5. Phase N: Polish & Cross-Cuttingdocs, extra validation, cleanup

    MVP = Phase 1–3

    [P] tasks touch different files, so they can run side by side (illustrative)

    Phases run left to right as listed in tasks.md. Inside a user-story phase, tests come first. The MVP bracket is the guide's example ("MVP = Phase 1–3"); the stacked [P] bars are illustrative.

    A typical line:

    - [ ] T014 [P] [US1] Create RegistrationForm DTO with validation in src/main/java/.../web/RegistrationForm.java

    How to read it:

    • T014 is the task ID
    • [P] means this can run in parallel with other [P] tasks (they touch different files)
    • [US1] means it belongs to User Story 1
    • then the action and the exact file path
    Learning aidReading one task line
    1. - [ ]checkboxticked off when done (chapter 16)
    2. task IDis the task ID
    3. parallelcan run in parallel with other [P] tasks
    4. user storybelongs to User Story 1
    5. actionwhat to do
    6. exact file pathwhere to do it
    The task line from the guide, split into its parts. Select a part to find its explanation in the list above.

    Why it's organized by user story

    Each story can be built, tested and demoed on its own. You could ship P1 as an MVP and add P2 later.

    Your job

    Skim it. Are tests before implementation (if your constitution requires it)? Are any tasks missing or too vague? It's your build checklist, so make it right.

    Optional reviewCheck yourself
    1. What does [P] mean on a task?
    2. Why are tasks organised by user story?

    What it is

    It's a read-only consistency check across spec.md, plan.md and tasks.md, measured against the constitution. You created these documents at different times, and maybe edited some by hand, so they can drift apart. analyze finds where they disagree.

    How to run it

    /speckit-analyze

    What it looks for

    • Coverage gaps: a requirement (e.g. FR-004) with no task that implements it
    • Conflicts: the spec says "case-insensitive email" but the plan says "exact match"
    • Ambiguity: words like "fast" or "secure" with no measurable definition
    • Duplication: the same requirement stated twice in different ways
    • Constitution violations: these are always treated as CRITICAL
    • Orphan tasks: tasks that don't map to any requirement

    What the report looks like

    • A findings table: ID, category, severity (CRITICAL / HIGH / MEDIUM / LOW), location, summary, recommendation
    • A coverage summary: each requirement, whether it has tasks (yes/no), and which ones
    • Next actions: e.g. "No critical blockers; fix HIGH/MEDIUM before implementing"
    Learning aid · IllustrationAn example report, illustrated

    analyze never edits files. You decide what to fix, then run analyze again.

    Illustrative analyze report findings
    IDCategorySeverityLocationSummaryFix at the source
    A1Coverage gap—not set in this examplespec.md · tasks.mdFR-004 has no task that implements it→ tasks.md (edit or regenerate)
    A2Conflict—not set in this examplespec.md · plan.mdspec says "case-insensitive email", plan says "exact match"→ plan.md (design problem)
    A3Ambiguity—not set in this examplespec.md"fast" with no measurable definition→ spec.md or clarify
    A4Constitution violation▲ CRITICALplan.mda plan step that logs plain-text passwords (illustrative) breaks "never store or log plain-text passwords"→ plan.md (design problem)
    A5Orphan task—not set in this exampletasks.mda task that maps to no requirement (illustrative)→ tasks.md
    Illustrative, not real Spec Kit output. Findings are built from the guide's own examples. Only the constitution violation has a severity here, because the guide says those are always CRITICAL; the other severities are left unset rather than invented.

    It never edits files

    You decide what to fix, and fix it at the source:

    • requirement problem → edit spec.md (or clarify)
    • design problem → edit plan.md (or re-run plan)
    • missing task → edit or regenerate tasks.md

    Then run analyze again until it's clean enough.

    Optional reviewCheck yourself
    1. analyze reports that the plan conflicts with the spec. What does analyze change?
    2. A requirement has no task. Where do you fix it?

    16. Step 8: implement

    What it is

    This is where the code actually gets written. The AI goes through tasks.md in order, respecting dependencies and [P] markers, and ticks off each task as it finishes.

    How to run it

    /speckit-implement

    For bigger features, do it in chunks so you can review between them:

    /speckit-implement Only the Setup and Foundational phases
    /speckit-implement Now User Story 1
    /speckit-implement Tasks T020 to T030
    Learning aid · DemonstrationChoosing how much to implement
    1. SetupT001–T005
    2. FoundationalT006–T012
    3. User Story 1T013–T024
    4. User Story 2T025–T034
    5. PolishT035–T040

    Selected: everything in tasks.md, in order. Review between chunks.

    A demonstration of the guide's three example commands against a tasks.md laid out by phase. Task numbers per phase are illustrative; no command is run.

    What you'll see

    The agent compiles the project, installs dependencies, runs tests and asks permission to run terminal commands. If you're working test-first, you'll see tests fail first and then pass.

    Your job (don't skip this)

    1. Run the app (e.g. mvn spring-boot:run, then open http://localhost:8080/register).
    2. Try the acceptance scenarios by hand. Register once. Register again with the same email and expect "already in use".
    3. Run the tests.
    4. Read the code. AI can still make mistakes, and you're responsible for what ships.

    If something's wrong, fix the code, or better, fix the spec or plan and regenerate so your documents stay the source of truth.


    17. Step 9: converge

    What it is

    It's the final audit. It compares the actual code with the spec, plan and tasks, and asks: did we really build everything we planned?

    How to run it

    /speckit-converge

    Run it only after implement has worked through the current tasks.md.

    Two possible outcomes

    1. "Converged — the implementation satisfies the spec, plan, and tasks." tasks.md is left unchanged and you're done.
    2. "Tasks appended." Something is missing or incomplete. Converge doesn't touch your code. Instead it appends new tasks under a Convergence section at the bottom of tasks.md.
    Learning aidThe final audit: two outcomes
    1. /speckit-convergeafter implement has worked through tasks.md
    2. actual code ↔ spec · plan · tasks“did we really build everything we planned?”

    Converged

    "Converged — the implementation satisfies the spec, plan, and tasks." tasks.md is left unchanged.

    Tasks appended

    Something is missing or incomplete. New tasks go under a Convergence section at the bottom of tasks.md; the code is not touched.

    ## Convergence
    - [ ] T041 (illustrative) …

    ↻ Then implement again, and converge again.

    Even after "Converged": run tests, test by hand, review. If the documents were wrong, the code is "correctly wrong".

    See all three feedback loops in chapter 18 →
    Choose an outcome to follow its path. converge compares the code with the documents and never edits code; its only write is appending tasks to tasks.md. The tasks.md excerpt is illustrative. The wider loops are drawn in chapter 18.

    Then the loop

    implement → converge → (tasks appended?) → implement → converge → ... → Converged ✅

    Even after "Converged"

    Still run tests, do manual testing and review. Converge checks against your documents, so if the documents were wrong, the code will be "correctly wrong."

    Optional reviewCheck yourself
    1. converge finds a missing requirement. What does it change?
    2. The result is "Converged". Can the code still be wrong?

    18. The feedback loops

    The commands aren't a strict one-way line. There are three loops, and they're where SDD really pays off:

    Loop A (requirements quality): specify → clarify → checklist → (edit spec) → clarify ...
    Loop B (document consistency): tasks → analyze → (fix spec/plan/tasks) → analyze ...
    Loop C (implementation fidelity): implement → converge → implement → converge ... → Converged
    Learning aidThree loops on one line
    ⋯ ⋯ A(edit spec) B(fix spec/plan/tasks) C... specifyclarifychecklisttasksanalyzeimplementconvergeConverged start ⋯ ⋯ A(edit spec) B(fix spec/plan/tasks) C... specifyclarifychecklisttasksanalyzeimplementconvergeConverged

    Arcs are the feedback paths, labelled with the guide's own steps. "⋯" marks steps this chapter does not list, so the drawing does not say which commands come in between. Select a loop to trace it.

    Changing your mind later? Update the spec first, then re-run plan → tasks → analyze → implement → converge. Don't just patch code, or your documents will stop telling the truth.

    Learning aidTwo ways to change your mind
    1. spec
    2. plan
    3. tasks
    4. analyze
    5. implement
    6. converge

    The documents keep telling the truth.

    Compare the guide's advice with patching the code directly.
    Optional reviewCheck yourself
    1. Which loop repeats implement and converge until the result is "Converged"?
    2. You change your mind about a requirement after implementing. What do you update first?

    19. Command names differ per AI agent

    The same command is written differently depending on your agent:

    Agent Syntax example
    GitHub Copilot (default "skills" mode) /speckit-specify
    Docs / many agents (Claude Code, Cursor, Gemini, ...) /speckit.specify
    Codex, ZCode $speckit-specify
    Kimi /skill:speckit-specify
    Learning aid · As written in the guide · not checked against current agent versionsFind your agent's syntax

    Choose an agent to see the guide's example.

    To be sure, type /speckit in your chat and look at the autocomplete.

    Where each kind of command goes
    Terminalspecify ...
    AI chat/speckit… slash commands
    Choosing an agent highlights its row in the table above; no row is hidden. Each syntax is the guide's own example for specify and was not re-checked against current agent releases.

    Your course uses /speckit.constitution in Copilot chat, and both forms are seen in the wild. Type /speckit in your chat and look at the autocomplete to see the exact names your setup uses.

    Slash commands go in the AI chat. specify ... commands go in the terminal. Don't mix them up.


    20. Best practices and common mistakes

    Do ✅

    • One feature per spec. Small specs are easier to review.
    • Start each step in a fresh chat session (as the course does). The documents carry the context, so the chat doesn't need to.
    • Review every document before moving on. AI drafts, you decide.
    • Use priorities (P1/P2/P3) and Out of Scope to keep the AI focused.
    • Commit to Git after each step (spec done → commit, plan done → commit). You get history and an easy undo.
    • Fix problems at the earliest document where they started.
    • Keep the constitution short and strict. Real rules only, not wishes.

    Don't ❌

    • ❌ Put technology in specify ("use a REST controller…").
    • ❌ Put feature details in the constitution.
    • ❌ Repeat constitution rules in the plan prompt.
    • ❌ Skip clarify on anything important. Guesses become bugs.
    • ❌ Ignore analyze HIGH/CRITICAL findings.
    • ❌ Trust "Converged" or "Implementation complete" without running the app and the tests.
    • ❌ Patch code to change behaviour without updating the spec, because then the spec stops being the truth.

    When is SDD overkill?

    For a 5-line script or a throwaway prototype, the full process is too heavy. Use the short path (specify → plan → tasks → implement) or just code it. SDD shines on real features, team projects, and anything you'll maintain.

    Learning aidFull process or short path?

    Short path

    The guide's examples: a 5-line script · a throwaway prototype

    1. specify
    2. plan
    3. tasks
    4. implement

    … or just code it.

    Full process

    The guide's examples: real features · team projects · anything you'll maintain

    1. constitution
    2. specify
    3. clarifyoptional
    4. plan
    5. checklistoptional
    6. tasks
    7. analyzeoptional
    8. implement
    9. convergerecommended
    The guide gives examples, not fixed criteria, so use your judgement. The full-process steps and their optional/recommended labels come from the table in chapter 4.

    Brownfield (existing code) tips

    • Write a constitution that describes how the existing code already works, so the AI follows your current patterns.
    • Specs can describe changes ("add password strength rule to existing registration").
    • Commit before specify init --here, since it may merge or overwrite files.

    21. One-page cheat sheet

    Terminal window
    # ---- Terminal (once) ----
    brew install uv
    uv tool install specify-cli
    specify version
    specify init my-app --integration copilot --script sh # new project
    specify init --here # existing project (or: specify init .)
    specify extension add git # optional: auto feature branches
    specify self check # newer release available?
    # ---- AI chat (per project) ----
    /speckit-constitution <long-term rules: stack, architecture, testing, security, conventions>
    # ---- AI chat (per feature) ----
    /speckit-specify <WHAT + WHY: user stories, P1/P2/P3, Given/When/Then, out of scope>
    /speckit-clarify [focus area] ← optional; answers go into spec.md
    /speckit-plan <HOW: framework, layers, DB, security approach for this feature>
    /speckit-checklist [focus area] ← optional; "unit tests for requirements"
    /speckit-tasks ← tasks.md: phases, T001…, [P], [US1]
    /speckit-analyze ← optional; read-only consistency report
    /speckit-implement [scope] ← writes code, ticks tasks
    /speckit-converge ← audit; appends tasks if gaps → implement again
    Remember
    Spec = WHAT & WHY (no tech)
    Plan = HOW (all tech)
    Read-only commands analyze (report only); converge changes no code, it only appends tasks
    Active feature stored in .specify/feature.json
    Rules stored in .specify/memory/constitution.md
    Feature docs live in specs/NNN-feature-name/
    You are always the reviewer and the owner
    Learning aidCommand lookup

    16 of 16 commands

    Terminal (once)

    • brew install uv
    • uv tool install specify-cli
    • specify version
    • specify init my-app --integration copilot --script shnew project
    • specify init --hereexisting project (or: specify init .)
    • specify extension add gitoptional: auto feature branches
    • specify self checknewer release available?

    AI chat (per project)

    • /speckit-constitution<long-term rules: stack, architecture, testing, security, conventions>

    AI chat (per feature)

    • /speckit-specify<WHAT + WHY: user stories, P1/P2/P3, Given/When/Then, out of scope>
    • /speckit-clarify[focus area]optional; answers go into spec.md
    • /speckit-plan<HOW: framework, layers, DB, security approach for this feature>
    • /speckit-checklist[focus area]optional; "unit tests for requirements"
    • /speckit-taskstasks.md: phases, T001…, [P], [US1]
    • /speckit-analyzeoptional; read-only consistency report
    • /speckit-implement[scope]writes code, ticks tasks
    • /speckit-convergeaudit; appends tasks if gaps → implement again

    "Optional" means the cheat sheet's own comment starts with "optional".

    Built from the cheat sheet's own lines. Filtering changes only this list; the cheat sheet above stays complete. Terminal copy buttons copy the command without its comment; AI chat copy buttons copy the command name, so you add your own prompt.

    22. Sources

    Learning aid · Our classification · not part of the guideWhat kind of source is each one?
    1. Official repoOfficial repositorygithub.com
    2. Quick StartOfficial documentationgithub.github.io
    3. Per-command reference (Agentic SDD)Official documentationgithub.github.io
    4. InstallationOfficial documentationgithub.github.io
    5. Integrations CLI & command namingOfficial documentationgithub.github.io
    6. Methodology (spec-driven.md, the "Nine Articles")Official repositorygithub.com
    7. Microsoft Developer BlogDeveloper blog (Microsoft)developer.microsoft.com
    8. Augment Code, practical Spec Kit guideThird-party guidewww.augmentcode.com
    9. Your course transcriptCourse materialNo link in the guide
    Same order as the list above. Kinds are assigned by us from each link's address and publisher. When something doesn't match, the guide's closing note says to trust specify --help, your chat's autocomplete and the official docs.

    Spec Kit evolves quickly. If something here doesn't match what you see, trust specify --help, the autocomplete in your agent chat, and the official docs above.