Bottom line. When I was getting my software engineering degree, one professor kept steering every course back to specification: what a program must do, written down before the program exists. Back then writing code was the expensive part, so the spec looked like extra work on top of it. Agents write the code now. The spec is the part of the job that is left
For every piece of code the questions were the same. What has to be true before it runs? What will be true after it finishes? What must never happen in between? The code came after the answers, and it was judged against them
At the time it was easy to see this as ceremony. Code was where the hours went, and a spec looked like paperwork next to the real work
Fred Brooks wrote in No Silver Bullet in 1986: “The hardest single part of building a software system is deciding precisely what to build”. For forty years that sentence was true and also easy to ignore, because typing the code took so long that it felt like the hard part
Agents removed most of the typing. An agent writes a working function in seconds and a working service in an afternoon. What it cannot do is know what you meant. It reads what you wrote, fills every gap with a guess, and the guess is usually the most common thing it has seen. Most of the time that guess is fine. The bugs live in the rest
I already wrote about this from two sides. In the autoresearch post a swarm of agents made Octra decrypt sixteen times faster, and one of its best looking changes leaned on an invariant nobody had written down. In the post on proofs the point was that a formal proof is only as complete as the spec it checks. Both stories end in the same place: the agent did exactly what the spec said, and the spec was missing a line
A spec does not need special notation. It is a short list of promises about one piece of code, and every promise is one of four kinds:
Here it is for a withdraw function in a token vault, the kind of contract that holds money for other people:
withdraw(user, amount) before amount > 0before balance[user] >= amountafter balance[user] == old balance[user] - amountafter user received exactly amount tokensalways sum of all balances == tokens the vault holdsnever the balance of any other user changesnever the vault calls out before the balance is written
Seven lines. Ask an agent to “write a withdraw function for this vault” and it will write one that compiles and passes the tests it wrote for itself. Give it these seven lines and every guess becomes a requirement it can be checked against. The last line alone covers the bug that drained The DAO in 2016
There is a shortcut hiding in this. Every working app is a spec that nobody wrote down. Hand an existing app to an agent, its code if you have it, its screens and docs if you do not, and ask it to write that spec: every screen, every rule, every before, after, always and never. Then bolt your request on top: this spec, but for my case
Write the full spec of this app: every screen, every rule, and what must be true before, after, always and never. Then build this spec, but for my case: …
Say you want Bluesky, except anyone can tip a post in USDC. Writing that from scratch, you would describe the tip button and forget the rest. Starting from the spec of Bluesky, which is public, the agent already knows about replies, reposts, quotes, embeds, languages, blocks and lists, and your one line changes only the part you care about
You do not have to imagine what a full spec looks like. Some of the biggest products publish theirs, and a few are complete enough that other companies build compatible clones from them on purpose
messages.sendMessage is the one an app calls when you send a text messageHere is what one of those files looks like: the real definition of a Bluesky post, trimmed a little. Three hundred characters, at most three languages, at most eight extra tags, and a required timestamp. Every Bluesky app has to follow these lines
{
"lexicon": 1,
"id": "app.bsky.feed.post",
"defs": {
"main": {
"type": "record",
"description": "Record containing a Bluesky post.",
"record": {
"type": "object",
"required": ["text", "createdAt"],
"properties": {
"text": {
"type": "string",
"maxLength": 3000,
"maxGraphemes": 300,
"description": "The primary post content. May be an empty string, if there are embeds."
},
"reply": { "type": "ref", "ref": "#replyRef" },
"embed": {
"type": "union",
"refs": ["app.bsky.embed.images", "app.bsky.embed.video",
"app.bsky.embed.external", "app.bsky.embed.record"]
},
"langs": {
"type": "array",
"maxLength": 3,
"items": { "type": "string", "format": "language" }
},
"tags": {
"type": "array",
"maxLength": 8,
"items": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}
Cloning with a spec like this is one sentence: this spec, but anyone can tip a post in USDC. The agent adds one field and one button and keeps every other rule, including the ones you would never have thought to ask for
This works because an app is mostly hundreds of small decisions about what should happen, and the original team already made them. The spec writes those decisions down. The usual rules still apply: the code has a license and the name has a trademark
Most apps do not publish a spec, so the agent has to write one. The tools for that have settled on similar formats
spec.md with prioritized user stories, Given, When, Then scenarios, requirements like “FR-001: System MUST…”, and a [NEEDS CLARIFICATION] marker wherever the agent should ask instead of guessrequirements.md, design.md and tasks.md. Requirements use EARS notation: “WHEN [condition] THE SYSTEM SHALL [behavior]”, the format of the WHEN line in the change aboveThat last story carries the lesson for cloning. If the spec describes how the original works inside, you get the original back. Keep the spec about behavior, what the user sees and what must stay true, and the agent is free to build it better
None of this is new. Tony Hoare published the logic of before and after conditions in 1969. Bertrand Meyer built design by contract into Eiffel in the 1980s. Engineers at Amazon wrote TLA+ specs for parts of S3 and DynamoDB and found bugs that took a trace of 35 steps to show up, the kind no test suite reaches
It stayed a niche because it was expensive. A precise spec took a specialist to write, and proving code against it took weeks of a rarer specialist. Most teams decided that tests and code review were good enough, and for code written by people they mostly were
Both costs are collapsing. An agent can draft the spec from the code and the docs, and the human job shrinks to reading it and saying “yes, that is what I mean” or “you missed this”. An agent can write the proof too, and a proof checker, which does not care how confident the agent sounds, decides whether it holds
Review is going the other way. An agent writes more code in a day than a person can read in a week. Nobody can review all of it line by line. Anyone can read a page of spec
That professor was teaching the part of the job that does not get automated. Code was always a translation of what someone meant, and the translation is becoming cheap. Knowing exactly what you mean, and writing it down so a machine can hold you to it, is now most of the work