Spec-Driven Development
Spec-Driven Development (SDD) flips the usual order of work: you write a precise specification first, and treat the code as a disposable artifact generated from it. This page explains the idea from scratch - no prior experience assumed.
Why not just prompt and code?
When you hand an AI agent a vague idea, it guesses the parts you left out - and it guesses confidently. Those guesses become bugs you discover weeks later, when nobody remembers what the code was even supposed to do. A spec removes the guessing: it states the behavior, the edge cases, and the constraints before a line is written.
The tradeoff is real but favorable. You spend more time up front deciding what to build, and far less time debugging code that does the wrong thing correctly.
The five ideas
How Throughspec applies it
Throughspec turns these ideas into an enforced workflow. The spec lives in claude/srs.md, the plan in claude/plan.md, and a compressed memory layer keeps the agent consistent across a long project. Each phase gates the next - you cannot plan before the spec is frozen, or build before the plan is written.