blog
If you delete the code, what's left?
Regenerative software treats the code an agent writes the way you treat a pod: when it has to change, you delete it and generate it again. Chad Fowler has spent almost a year working the idea out, and on 11 November Žan Jonke introduced turri, an open-source tool that puts it into practice. It only works if what your system has to do is written down somewhere other than the code, and in a system that's been running for years it almost never is.
It already happened to servers
If you run a Kubernetes cluster, you already do this. You don't fix a misbehaving pod from the inside: you delete it and the Deployment creates another one just like it. What matters is the manifest, and the manifest is in Git.
Servers went first. In 2012 Martin Fowler described the phoenix server, a machine rebuilt from scratch every so often so it can't pile up changes nobody wrote down. A year later another Fowler, Chad, then CTO of the company behind Wunderlist, published "Trash Your Servers and Burn Your Code," the post the name immutable infrastructure comes from. It argued for replacing servers instead of patching them.
In December 2025 Chad Fowler started The Phoenix Architecture, a series now 28 essays long, that makes the same argument about code. Code used to be expensive to write, so you kept it. Now an agent writes it in minutes, and what's scarce is understanding it and checking that it does what it should. He compares editing the code you already have to SSHing into a production server to tweak a config file. His rule is never to change code in place if you can regenerate it instead.
What lives only in the code
To find out whether you could delete yours, Fowler suggests picturing one command:
rm -rf src/
You don't have to run it. Imagine you already have, and ask what you'd use to decide whether the new code is correct. That's his deletion test. If the honest answer is "the old code", that code is doing the job of the specification, the test suite, the documentation and the bug database.
With a pod you never even ask, because the answer is in the manifest. With a service that's been in production for years, the answer is scattered through the code as arbitrary retries, odd validation rules and a 17-second timeout nobody can explain anymore. The timeout is Fowler's example, from a June essay on what the implementation remembers and the organization forgets. All of it looks like junk, and often it's the scar an incident left.
Joel Spolsky had already said so in 2000, when Netscape had rewritten its browser from scratch and gone almost three years without a major release. The ugly parts of old code, the ones that seem to be there for no reason, are bugs somebody fixed. Regenerate a system like that before you've written those fixes down, and they're gone. With a legacy system, you extract them from the code first and rewrite afterward.
What has to exist outside the code
Before you can delete the code, four things have to exist outside it: the specification of what each piece does, the evaluations any implementation has to pass, the contracts with neighboring pieces, and the record of which version of the specification produced which code. The data is separate, and it doesn't get regenerated either. In Kubernetes you delete the pod and the persistent volume stays where it was.
Not every test counts. A unit test that calls one specific function dies with that function. The ones that survive test the system from the outside, against what it promises its users: a balance never goes negative, what you store reads back the same. If rewriting your service in another language would make your test suite useless, the tests are tied to the implementation. Writing the good ones, Fowler concedes, is harder than writing the code they describe.
The engineer who stopped reading his code
Jonke is an engineer at codeplain, and he introduced turri with a post about how he got there. With an agent he was shipping a feature an hour, each one a few thousand lines. He couldn't review that much, so he stopped reading the code and judged the software by whether it did the thing. He ended up accountable for software he no longer understood.
What he reviews now is a file in ∗∗∗plain, the language codeplain uses to write down what a program must do. One line says that todo clear removes the completed tasks, and what it prints when it's done. When a line changes, turri works out which behaviors it affects and regenerates only that code. The /regenerate command deletes all the code and builds it again, so the deletion test stops being a thought experiment. If the new version behaves differently, the agent filled a gap with a guess the first time, and the fix goes into the specification.
The other half of turri is distrust of the agent. Jonke assumes it will cheat: it'll change the test instead of the code, or say it ran something it never ran. His company keeps a Slack channel for the excuses. In one, an agent explains that the Linux CI failure was in the test, that it has fixed the test, and that the full suite passes "on my Mac". So in turri the harness that runs the agent starts the reviews and the tests itself, at gates the agent doesn't control. "An agent can skip a sentence in a prompt. It cannot skip a gate," he writes.
kubelatch does the same with an agent on a cluster. If you keep "Writes need my approval" on, every change waits for your decision, whether or not anyone told the agent to ask, unless you've approved a temporary role for it.
Where it stops
The user interface is the last thing Fowler would regenerate, because every change breaks a habit for the person using it. He also asks for extreme care with cryptographic primitives, protocol parsers, performance-critical code and anything regulated or safety-critical.
It's also not clear that writing the specification is less work than reading the code. Birgitta Böckeler of Thoughtworks tried three spec-driven development tools in 2025. With one she ended up preferring to review code over reviewing that many Markdown files, and with another the same specification didn't always give her the same code.
Today turri only builds from scratch and can't adopt a project that already exists. It also makes you say what you want clearly enough to write it down, and that's work.
The specification doesn't have to come first, though. In September Fowler wrote that his first attempts at specifying a system are always wrong. He'd rather program until something works, write down what he learned, and then regenerate to see what he left out.
Where to start
You don't need turri, and you don't need to delete anything. Pick a small component, one you could rewrite in an afternoon, and run the deletion test on paper: what goes in, what comes out, what must never happen, and what you'd check it against if the code were different tomorrow. Whatever you can't answer is what lives only in the code today. Write it as a test that exercises the component from the outside before you let an agent touch it.
If you want to see it taken all the way, turri is open source under the MIT license.
Picaporte Labs is one person, in Spain. If you've actually regenerated a service instead of maintaining it, write to me and tell me what got lost along the way.