Master GitHub Spec Kit from Scratch: A Developer’s Guide to AI‑Driven Spec‑Driven Development
This article explains how GitHub Spec Kit implements Spec‑Driven Development to replace ad‑hoc “vibe coding” with a structured workflow, detailing its core principles, six guiding rules, a seven‑step process, and a hands‑on example building a Todo app using Claude Code.
Spec Kit Essence – What Is Spec‑Driven Development?
Spec Kit is built around Spec‑Driven Development (SDD), which forces developers to first clarify what and why before deciding how . This approach directly addresses the chaotic “Vibe Coding” problem by ensuring AI and developers share a clear blueprint.
Four Keywords of SDD
Intent first: Define the goal and rationale before any implementation details. Rich specs: Use structured specifications and checklists to constrain the AI. Multi‑step refinement: Replace a single massive prompt with several converging stages. Model‑agnostic control: Work with any AI model without locking into a specific stack.
Six Core Principles
Specification is the primary artifact : Code becomes just one implementation of the spec.
Executable specifications : Specs must be precise enough to generate a working system.
Continuous refinement : Development is an iterative validation and adjustment process.
Research‑driven background : Before coding, a “research agent” gathers technical and business context.
Bidirectional feedback : Production metrics (performance, user behavior) feed back into spec evolution.
Branch exploration : From a single spec, explore multiple implementation paths (performance‑focused, cost‑focused, etc.) to make optimal decisions.
In summary, Spec Kit creates a new collaboration model where developers define the specification and intent, while AI acts as an efficient implementer.
Hands‑On Practice – The Seven‑Step Spec Kit Workflow
First, install the CLI tool:
# Recommended: use uv (a fast Python package manager)
uv tool install specify-cli --from git+https://github.com/github/spec-kit.gitInitialize a project in the repository root: specify init --here The workflow then splits into seven explicit steps.
1. Draft the Constitution ( /constitution )
Purpose : Establish top‑level principles (technical guidelines, code style, security, quality standards).
Output :
.specify/memory/constitution.mdPractitioner tip: Record team stack preferences, deployment constraints, and third‑party library policies here so the AI stays within realistic bounds.
2. Create Feature Specs ( /specify )
Purpose : Describe the desired functionality, user stories, and acceptance criteria in natural language—no technical details.
Output : A folder under specs/ containing spec.md.
Practitioner tip: Write as if you were the product manager; the more concrete, the better (e.g., “When the user clicks the Done button, the task turns gray and moves to the bottom of the list”).
3. Clarify Requirements ( /clarify ) – optional
Purpose : Let the AI play a picky tester or product manager, asking questions about spec.md to surface ambiguities.
Output : Revised spec.md with added details.
Practitioner tip: This step forces you to think through edge cases before any code is written, reducing later rework.
4. Generate Technical Plan ( /plan )
Purpose : Based on spec.md and constitution.md, produce a detailed implementation plan (technology choices, architecture, data model, API contracts).
Output : Files such as plan.md and data-model.md.
Practitioner tip: If the AI suggests an unfamiliar library, you can ask it to revise the plan; you retain final decision authority.
5. Analyze the Plan ( /analyze ) – optional
Purpose : Run a “sandbox” check to detect contradictions, omissions, or inconsistencies across all generated artifacts.
Output : An analysis report highlighting potential problems.
Practitioner tip: Treat this like a code review; it catches high‑cost errors early.
6. Generate Task List ( /tasks )
Purpose : Decompose the technical plan into an ordered, dependency‑aware task list.
Output : tasks.md, where each task is clearly described.
Practitioner tip: tasks.md is the core interface for AI collaboration; you can manually reprioritize or claim tasks.
7. Implement ( /implement )
Purpose : Follow tasks.md sequentially, letting the AI act as a programmer to produce runnable code.
Output : The final application code.
Practitioner tip: You may let the AI run all tasks at once or step through them one by one to verify each output.
By iterating through these seven steps, a vague idea becomes a well‑structured, fully documented, and reliable software project.
Live Demo – Building a Todo App with Spec‑Kit + Claude Code
Step 1: Initialize the project
# Initialize a specify project
specify init claude-todo-appThe CLI asks you to choose an AI backend; selecting Claude Code configures the environment.
Step 2: Launch Claude Code
Run claude in the terminal. You will see a set of slash commands provided by Spec‑Kit, such as /speckit.constitution, /speckit.specify, /speckit.plan, /speckit.tasks, and /speckit.implement.
Step 3: Follow the pipeline
Use /speckit.constitution to create a constitution that enforces code quality, testing standards, UX consistency, and performance requirements.
Use /speckit.specify to describe the Todo app features (create, delete, view, complete tasks) without mentioning any technology.
Run /speckit.plan to let Claude generate a full technical plan. Example output includes:
1. **Backend**: Node.js + Express with SQLite via an ORM
2. **Frontend**: Simple React app built with Vite
3. **Testing**: API tests (Jest, Supertest) and component tests (React Testing Library)
4. **Documentation**: Complete usage and development guide
5. **Code style**: ESLint + PrettierGenerate the task list with /speckit.tasks. Claude analyses the plan and produces a detailed tasks.md file.
Finally, execute /speckit.implement. Claude iteratively implements each task, producing a runnable Todo application.
The resulting project structure is clean and visible, and the running app demonstrates the full workflow.
Key Takeaways
Never start coding directly; always run the Spec‑Kit workflow first.
During the Specify phase, discuss only business needs, not technical solutions.
In the Plan phase, decide the tech stack with evidence‑based reasoning.
Only after both Spec and Plan are verified should you move to Implement.
This shift from “vibe coding” to “spec‑driven” development turns a black‑box process into a transparent, step‑by‑step pipeline where developers stay in control and AI acts as a reliable Swiss‑army knife.
When Spec‑Driven Development Is Most Valuable
New projects that require architecture design from scratch.
Complex features involving multiple inter‑dependent modules.
Team‑based work where aligning requirements reduces communication overhead.
Rapid prototyping that must deliver production‑ready code.
Modernizing legacy systems while preserving design intent.
When Not to Use SDD
Simple, obvious bug fixes.
Minor UI tweaks.
Exploratory development where requirements are still undefined.
If you want higher quality and efficiency in AI‑assisted development, give Spec Kit a try on your next project.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
