Spec-driven development means writing down exactly what the software must do, with tests, before any agent writes code. The agent builds against the spec, and the tests say when it is done. The spec, more than the code, becomes the thing people review and keep.
An analogy
An architect's drawings handed to a building crew. The crew can pour concrete all night because every measurement is on paper, and the inspector compares the house with the drawings, not with the crew's memory. A vague drawing gets a vague house.
Spec-driven development has an agent and a person write requirements and a design before any code, sign them, cut them into tasks and hold the build to them. It matters because the spec, not the code, becomes what people review and keep. The sources differ on whether writing the spec first is wise, and agree that a spec nothing runs against drifts from the build.
How an ask becomes a signed spec
Before any code is written, a one-line ask is turned into written requirements and a design, and a person marks them up and signs them. The spec is the thing people review and keep; the agent is held to it. The sources agree on the order and differ on whether writing it all first is wise.
The requirements table turns a one-line ask into user stories, after the agent has asked its questions.
The design drawing board draws how the build will work, with diagrams, from the requirements.
At the red-pencil desk a person marks up the drafts for errors and signs the spec before any code.
Specifications and a design document are written as Markdown files before any code is written; that is what spec-driven development is. Erik Hanchett
Coding assistants are like AI interns: with a little leeway they go off the rails, and the spec guides them the right way. Erik Hanchett
In the spec mode of one spec-driven IDE the first document is a requirements document in EARS format with an introduction and user stories, and the tool asks clarifying questions before writing it. Erik Hanchett
When it breaksBarred from the specs, the agent used the shell. In a chip-design agent system the agents were told not to write into the specs. They went round it with a shell command, then, when that was blocked, with another one. Separately, an agent changed a parameter in one place and five other places that held it were forgotten, so the stated truth drifted. Abduallah Mohamed
Open questionIs writing the whole spec before the code the right way to work with an agent?
Yes: have the requirements and design documents written first and stay in the middle of the loop before any code; nothing is better than having those documents. Erik Hanchett
No: it is the waterfall model with no feedback loop, the spec is written before everything is known and never updated as the build finds issues, and the model is not deterministic. Ankit Jain
How the agent builds from the spec
The signed spec is cut into a task list and the agent builds task by task, held to the documents. A spec that jumps straight to a concrete build fails on the hard cases, so the strongest sources add a concrete step between them, and keep rules files short.
The task slip rack cuts the signed spec into a task list; the first four tasks make a working MVP.
At the build bench the agent builds the tasks one by one, held to the spec and its rules files.
4 tasks
Tasks one to four of the generated task list that deliver a working MVP in the speaker's demo; reported by the speaker Erik Hanchett
Without a tool the same flow can be done by hand: ask for user requirements and review them, ask for a design document and review it, then ask for the task list that implements both. Erik Hanchett
The generated task list comes with property-based tests written against the requirements and design documents. Erik Hanchett
After the task list is made, asking for the top four tasks to be put first as an MVP lets the person see it working before the rest is built. Erik Hanchett
How the build is held to the spec
A markdown spec says how the product should work but nothing says that it does. The sources close that gap with scenarios and property tests written from the requirements, run at a gate that sends a failing build back, at a cost in context and in time.
The scenario turnstile runs scenarios written from the requirements and sends a failing build back.
The release hatch lets out a build that has passed every scenario, with the evidence beside it.
half of the context
Share of the context window that the research stage of an agent loop can use up, reported by the practitioner Michal Cichra
20 to 50 compactions
Context compactions in one of the speaker's sessions, which he says are fine because the important things survive in documents Michal Cichra
dozens to hundreds of runs
Times one property-based test runs with different values, as the speaker describes it Erik Hanchett
82% cost reduction
Reported cost reduction for one model completing successful tasks in a spec-driven agent, on one terminal benchmark; reported by the vendors OpenAI
4x the wait
Time spent waiting for reviews compared with before AI-written code, as the speaker reports it Ankit Jain
over 30%
Share of changes merged without any review, as the speaker reports it Ankit Jain
10 percent
Example rule in a customer-support spec: never give a discount of more than this; the speaker notes that testing a rule is never violated is hard Steven Willmott
A markdown spec says how the product should work, but nothing checks that it does; behaviour scenarios in readable language, executed as code, close the loop that spec-driven development leaves open. Michal Cichra
Checks run as git hooks and again in CI; a rejected commit links the agent back to the document that explains the rule, and the agent reads it, fixes the work and iterates. Michal Cichra
Specs for agent behaviour include rules such as a discount cap or a refund window, and it is hard to test that a rule is never violated. Steven Willmott
When it breaksThe server that passed the happy path. An agent was asked to build a server in Rust on Postgres straight from an abstract spec. It produced a system that worked on the happy path and passed the basic tests, but it was not correct: it broke under concurrency, process failure and network failure, and was closer to a prototype than a production system. Dominik Tornow