When working in team development, it’s common to encounter situations like “the API specification changed but the frontend team didn’t know” or “the implementation doesn’t quite match the defined types.” Such mismatches between API specifications and implementation drastically reduce productivity. Specification-Driven Development (SDD), which places specifications at the center of the development process, offers a solution to this problem.
In this article, we explain how to use SpecKit, a tool designed to enhance developer productivity, to streamline everything from defining specifications to generating code and testing. Even beginners can follow along, and practical tips that are applicable in real projects are included.
- Spec Kit and Specification-Driven Development (SDD) for the AI Era
- Installing and Setting Up SpecKit
- 🚀 Practice: Articulating “What You Will Build” (Specify Phase)
- 🛠 Plan and Tasks Phases (Design and Break Down Work)
- 🧠 Best Practices for Using SpecKit
- 🧩 Summary: Become an Engineer Who Masters AI with SpecKit
Spec Kit and Specification-Driven Development (SDD) for the AI Era
The Value of “Writing Specifications Before Code”
The rise of AI coding agents such as GitHub Copilot, Claude Code, and Cursor has dramatically increased the speed of code writing. However, when code is generated from vague instructions, it often leads to unintended implementations or technical debt—what some refer to as “Vibe Coding” (coding by feel).
SpecKit, a tool advocated by GitHub, enables Specification-Driven Development (SDD) that solves this challenge by placing “specification” at the core of the engineering process, allowing AI to generate accurate code based on clear requirements.
What is SpecKit?
SpecKit is a toolkit that helps developers ensure AI produces high-quality code by focusing on why and what needs to be built, rather than jumping straight into how.
SpecKit enforces a rigorous workflow that includes the following stages:
- Specify — Focus on user experience and success criteria, ignoring implementation details.
- Plan — Decide on the technology stack, architecture, and data structures.
- Tasks — Break down the work into smaller, implementable units.
- Implement — Let AI generate code based on defined tasks.
By following this flow, humans focus on “steering the specification,” while AI handles the heavy lifting of writing code reliably.
Installing and Setting Up SpecKit
SpecKit is provided as a Python-based tool. It is recommended to use the fast package manager uv for setup.
1. Install uv
First, check whether uv is installed on your system. If not, install it:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh2. Install SpecKit (specify-cli)
Next, install SpecKit’s CLI tool from GitHub:
uv tool install specify-cli --from git+https://github.com/github/spec-kit.gitThis ensures you’re using the latest version.
3. Initialize a Project
In the directory where you want to develop:
# From outside the project root
specify init <project-name>
# From inside the project root
specify init .An interactive wizard will start:
- AI Assistant: Choose the AI you plan to use (GitHub Copilot, Claude Code, Gemini CLI, Cursor, etc.).
- Shell: Choose your shell (sh, zsh, bash, etc.).
When initialization completes, things like a .speckit/ directory and a memory/ folder containing constitution.md (project principles) are created. These files form the common language between you and the AI.
🚀 Practice: Articulating “What You Will Build” (Specify Phase)
Using SpecKit, the first step is not writing code but clearly articulating what you want to build and what success looks like. This is the Specify phase.
1. Create spec.md
spec.md is the ground zero document that defines project intent. You can create it manually, but an AI-assisted workflow is recommended:
/specify "I want to implement a blogging feature where users can create posts and tag them."The AI will help flesh out a standard spec.md template based on your input.
2. What to Include in spec.md
A good specification includes enough detail to eliminate ambiguity and provide clear guidance to both humans and AI:
- Goals: What you want to achieve.
- Success Criteria: What conditions must be met for the work to be considered complete.
- User Stories: Actions the user performs.
- Out of Scope: What is not included, to avoid overreach and AI hallucination.
- Constraints: Tech stack or environment restrictions.
3. Example spec.md
# Spec: Blog Post and Tag Management
## Goals
* Allow users to create and save blog posts.
* Enable multiple tags per post to improve searchability.
## Success Criteria
* [ ] `POST /articles` stores articles correctly.
* [ ] If a tag doesn't exist, it is automatically created.
* [ ] The frontend shows validation errors for empty titles.
## Constraints
* PostgreSQL will be used as the database.
* Each post can have up to 5 tags.This specification becomes the driving source for the next phases.
4. The key is human “approval”
This is what makes it different from conventional development: the specifications proposed by the AI are checked by humans, and repeated revisions are made until humans are confident that the specifications are correct.
🛠 Plan and Tasks Phases (Design and Break Down Work)
After defining what to build, the next step is figuring out how to implement it.
1. Plan Phase
The /plan command instructs the AI to read spec.md and propose a plan that fits your project’s structure.
- Choose where to place new files.
- Decide on DB schema and API interfaces.
Example plan.md:
- Backend: Create a new endpoint in
src/api/articles.ts. Use Prisma to extend theArticlemodel.- Frontend: Add a tag input component with multi-select in
components/Editor.tsx.
You can then review and adjust as needed.
2. Tasks Phase
Once the plan is solid, AI breaks it into small tasks using /tasks. Smaller tasks help:
- Keep progress transparent.
- Reduce the risk of AI making large, incorrect changes.
Tasks Example:
| Task ID | Summary | Completion Criteria |
|---|---|---|
| T-01 | DB migration | Create tags table and relation to articles |
| T-02 | API implementation | POST /articles saves tags correctly |
| T-03 | UI component | Tag selector in Storybook verified |
3. Why is “task decomposition” necessary?
The biggest benefits for engineers are “visualizing progress” and “localizing errors“.
- Context protection: AI stays focused on a single task, reducing the risk of rewriting unrelated code.
- Ease of review: Code can be checked after each task is completed, preventing extensive rework.
🧠 Best Practices for Using SpecKit
SpecKit is powerful, but to maximize its value you should adopt some best practices:
🧾 1. Use constitution.md to Define Project “Laws”
The file constitution.md under the memory/ directory allows you to define strict rules that govern the entire project.
Examples:
- Always use
async/awaitfor async code. - All new functions must include JSDoc comments and Vitest tests.
This ensures AI doesn’t produce inconsistent code.
📝 2. Update Specifications, Not Implementation
When requirements change:
- Update
spec.md. - Re-run
/planto see the impact. - Use
/tasksto generate new tasks.
This preserves accuracy and prevents divergence between doc and code
🤝 3. Review AI Suggestions
Do not assume AI output is correct. Check:
- Chosen libraries against your security policies.
- Task size to keep it manageable.
🧩 Summary: Become an Engineer Who Masters AI with SpecKit
In this article, we explored how to use SpecKit for Specification-Driven Development (SDD).
Key points:
- SDD prevents “vibe coding” by treating specifications as the single source of truth.
- Follow the four phases: Specify → Plan → Tasks → Implement.
- Use tools like
uvandspecify-clito set up SpecKit quickly. - Enforce project rules with
constitution.md.
The role of engineers is shifting from “writing code” to “defining clear, executable specifications that AI can act upon.”
Try running the /specify command for a small feature and experience the difference yourself.

If you compromise here, the AI will end up “writing code from its imagination” in the later implementation phase, which will result in rework. The trick is to hone the specifications with the mindset of “training the AI as your subordinate.“