Spec-driven development
SDD
- Covers
- Method
- Standards
- Control
What is the work verified against?
Write the contract — what has to happen, and how it will be checked — before asking for the code, then verify against that contract rather than against your memory of what you wanted.
Where it comes from
It began as large-team formality: put the requirement in writing before implementing it, so two people could not read the same sentence two different ways.
What changes when the author is an agent
With an agent the spec stops being paperwork and becomes the primary artefact carrying the intent of that change from one session to the next — records and stored decisions carry the rest. The prompt goes out with the context window. The spec stays, and it is what you can argue against later.
At the moment you ask an agent for something, you know what you meant. The problem arrives two weeks later, when you look at the code and cannot separate "the agent did something else" from "I asked for that". With nothing written beforehand there is no way to tell: your memory of the request has been contaminated by the result.
A spec fixes that by being prior and independent. It does not describe the implementation — that is the design — but the observable behaviour: what has to happen, with which inputs, and how it is checked. Written that way, anyone can verify the result without having been in the conversation. Including you, in two weeks.
There is a side effect worth more than the original one: if you cannot write down how you will check that it is right, you do not yet know what you are asking for. Half the tasks an agent "got wrong" were badly formed tasks, and specifying them makes that fail before a single token is spent.
The phased cycle — explore, propose, specify, design, tasks, apply, verify, archive — exists for a mechanical reason, not a ceremonial one: each phase needs different context and has a different definition of done. Collapsing them into one request is asking the same person to design, build and inspect at once. They will approve their own work.
Watch the other extreme, though. A three-page spec for a two-line change is not rigour, it is theatre. The ceremony has a fixed cost and it should only be paid when the change earns it.
The idea that outlives the tools
If you cannot write down how you will check that it is right, you do not yet know what you are asking for.