Spec Kit as engineering discipline: specify → clarify → plan → tasks
The spec is the source of truth. Code is the derivative. When that order is reversed, an hour of vibe-coding produces a system nobody can explain — and rollback is expensive.
Problem
Naive vibe-coding: one big prompt → the agent immediately writes code → an hour later the structure is unclear, boundaries are blurry, rollback is expensive. In the retrospective you hear "AI can't do architecture" — but there was never a fixed "what we're building" or explicit open questions in the brief. Spec-Driven Development (SDD) via GitHub Spec Kit reverses the order: solution artifacts first, implement last.
Methodology
-
1. Repository constitution:
.specify/Before the first feature — templates and project memory, not "start fresh in chat."
- •
templates/—spec-template.md,plan-template.md,tasks-template.md: the agent doesn't invent a new structure every time. - •
memory/— stable decisions (stack, prohibitions, conventions): fewer contradictions between features001-*,004-*,005-*. - •
scripts/— Spec Kit CLI wrapper (specify,plan,tasks, etc.).
Technique: configure templates once for your domain (microservices, events, API keys) — every subsequent feature inherits structure, not the style of a random prompt.
- •
-
2. One feature — one folder in
specs/Numbering
NNN-short-name(e.g.,001-model-service,004-order-manager) — parallel workstreams, clear scope in PR and in your head.Inside each feature — a chain of files, not one
SPEC.mdfor everything:File / directory Role spec.mdWhat and why; user stories; acceptance scenarios plan.mdArchitectural decisions with rationale ("why," not just "decided") tasks.mdBreakdown with dependencies; what can be parallelized contracts/Service boundaries (messages, API) — before code checklists/Gates before implement quickstart.mdHow to verify the feature manually Technique: don't start
implementwithoutplan+tasks— otherwise the agent builds what's easiest to write, not what was agreed. -
3. Clarify — a separate phase, not "ask in chat"
In
spec.mdthere is a Clarifications section (sessions with date): question → answer → recorded decision. Markers[NEEDS CLARIFICATION]in the spec text prohibit silent assumptions.Technique: while the spec contains unresolved
[NEEDS CLARIFICATION]markers, don't move to plan — otherwise the plan encodes guesses. -
4. Plan with rationale, not a list of technologies
Each non-trivial decision in
plan.md: alternative → why rejected → what was accepted. The agent at implement draws not from "internet average temperature" but from your context in spec + plan.Technique: any contested point (queue, model storage, auth between services) — only via an entry in plan; otherwise code review has nothing to discuss beyond the diff.
-
5. Tasks as a graph, not a flat TODO
tasks.md: dependencies between tasks, explicitly marked "can be parallelized." Implement one task at a time with commit/test — easier rollback and easier to see where the agent went off track.Technique: after each task — run the feature checklist; not "all at the end."
-
6. Multiservice: contracts before code
When a repo has multiple services (
ws-gateway,order-manager, …),contracts/in each feature fixes messages and API before implementation. Otherwise service B "catches up" to service A's format in production. -
7. Anti-pattern table: naive vibe-code vs SDD
Naive vibe-code SDD via Spec Kit One prompt "build the system" specify→ spec fileAgent guesses in its head clarify+ Clarifications in specCode with no explanation of choices plan.mdwith rationale"We'll write tests later" Acceptance scenarios in spec, checklists Monolithic diff tasks+ incremental implement
Artifact
github.com/dobryakov/ytrader-bybit
— a public multiservice repository with a complete Spec Kit cycle: .specify/
constitution, numbered specs/00N-*, the full chain
spec.md → plan.md
→ tasks.md, and contracts/
between services.
The breakdown focuses on the shape of the artifacts and their consistency, not the subject domain. To verify: clone the repo and walk one feature-folder top-to-bottom through the file chain — no need to run the full system.
Upstream: github.com/github/spec-kit
Where it breaks
-
Spec as ritual.
Files exist, clarify was never done —
[NEEDS CLARIFICATION]markers remain, plan was written around the agent's fantasy. - Drift after implement. Code changed outside the spec → the spec lies; analyze was not re-run. Without an explicit analyze step after any spec change, the "source of truth" becomes a historical artifact.
-
Feature too large in one
specs/00N. One spec for "the whole platform" — tasks become unmanageable, rollback impossible. Fix: split numbering, smaller feature scope per folder. - Contracts without versioning. Clarifications say "plain JSON without versioning" — an explicit trade-off, but as the API evolves consumers break; Spec Kit doesn't claim to be a silver bullet.
- Double source of truth. Spec Kit + Confluence without a clear owner — the team doesn't know where to look. Spec Kit wins when the repository is the source of truth for implementation.
- Overhead for a one-line fix. SDD is excessive for a typo. The series targets features with architectural weight, not every commit.
For whom and why
Architects and CTOs introducing agents into development: not "which framework to pick," but the artifact discipline under which an agent amplifies — rather than replaces — design. Complements Breakdown 07 (cursor rules in the IDE) and Breakdown 10 (eval at release): Spec Kit operates before code; eval operates after.
Want spec-driven development as a team discipline?
specify → clarify → plan → tasks → implement — the order that keeps agents amplifying design instead of replacing it.
Email meOther breakdowns
An engineering breakdown series: real task → methodology → working artifact → honest breakdown of where it fails.
Back to series →