TLDR
turri turns ∗∗∗plain into code. When ∗∗∗plain changes, it doesn't rewrite everything. It works out what changed and regenerates only that, a small step at a time, testing each step before it keeps it. This post walks through the handful of tools that make that work, and why there are so few of them.
Let’s not guess
In my last post, I described how coding agents made me faster at building software, but left me increasingly disconnected from what I was building. The previous post was about the problem, this one is about how the solution works.
The overarching idea is regenerative software. The code is derived and disposable. The intent is the asset. When the intent changes, you regenerate the code instead of patching it.
Most software today works the other way around. The code is the source of truth, and the code does not contain the intent. The intent is buried in past prompt histories, meetings, specs etc., which may or may not still be within reach. Even when they are, there is no way to rule out that what they hold is ambiguous, conflicting, or incomplete, however carefully it was written to the coding agent. And when it is, the coding agent has to guess. Every guess is legacy code from the moment it is written, because from then on, nobody knows whether it is needed or not. That is why removing parts of the code is dangerous. Nobody can say what would be lost with them.
Writing the intent down ends the guessing about what the code is for. It does not, by itself, make regeneration work. A model on its own does not know which part of the code no longer matches the intent. It does not know whether its last attempt worked, or what it tried yesterday. Ask it to "regenerate what changed" and it will happily rewrite something that did not change, and tell you it is done. Left to itself, it is back to guessing.
turri does not leave those questions to the model. It answers them with tools that check instead of guess, and those tools will be the focus of this blog post.

I have always believed in solving a problem as precisely and as simply as possible and with as little as possible, and in learning along the way what "simple" actually means. Simple is easy to understand, easy to explain to others and easy to debug. Anyone can complicate a solution into oblivion, but keeping it simple is extremely hard. Complexity has its place, but it is a bigger liability, and it has to earn its keep. When left unchecked, it is what destroys software, until the only way forward is to rebuild it from scratch and prune all the complexity that piled up without earning its keep.
turri is built on pi, which gives the agent four basic tools, named read, write, edit and bash. When Mario Zechner introduced pi, he wrote that those four "are all you need for an effective coding agent", and that the difference with pi is that he has "full observability of everything". turri takes both to heart as well. It adds as few tools of its own as it can. And it can see what it is doing, which is also what lets it heal itself. When something goes wrong, it reads what happened, and most of the time it can fix the problem on its own.
Two of turri's tools matter most. regenerate turns ∗∗∗plain into code. conform proves the code does what ∗∗∗plain says. Everything else is there to serve those two, or to let turri see what it is doing.
turri is built around ∗∗∗plain, so if you already know ∗∗∗plain, this post will be easier to follow. If you don't, its site is a good place to start. I did my best, though, to write this post for people who know nothing about ∗∗∗plain too.
This post skips validation on purpose. turri validates the code with the conform tool, which makes sure the code does what ∗∗∗plain says. conform is in the table below so that every tool is there, but there is a lot to say about either half, and to keep this post digestible, I decided to focus on regenerate alone. How turri validates the code with conform will be covered in the next post.

I have a parrot named Arthur. Arthur's feeder serves breakfast and dinner, and a snack whenever Arthur presses a button. Arthur has worked out that the button always works, and he keeps pressing it to get the snacks - as Pavlov predicted he would. He is putting on weight, which is not healthy for him. So I want to put him on a diet, with smaller meals and a limit on his snacks. That change is the example I will use throughout this post. I chose it because it is small and easy to follow, and the goal here is to show how turri works.

Arthur’s feeder
Arthur's feeder is already a ∗∗∗plain project, built with turri. This is where it stands now, before the diet, in feeder.plain:

feeder.plain as it starts, with two functional specs and no snack limit.∗∗∗plain's standard library has modules for backends, frontends, command-line tools and libraries, but none for a bird feeder. So feeder.plain imports a module of my own, feeder-firmware. It says which board the feeder's C code is built for, how the motor and the button are wired, and how the code is unit tested without the hardware. Here I will use the same trick as good textbooks do: writing feeder-firmware is left as an exercise for the reader.
This is Arthur's feeder ∗∗∗plain project as it stands now:

code/, but never touches .turri.json.Now to the first tools. Two of them, cultivate and parse, look after ∗∗∗plain before anything is built from it.
cultivate
In my last post I wrote about how coding agents cheat and how this causes problems when stretching out their usage over time. This tool makes sure that no parts of the skill and the workflow it implies are skipped.
turri writes ∗∗∗plain with skills. They cover adding a feature, a concept, a requirement or a resource, splitting a functional spec that has grown too big, resolving conflicts, etc. In most coding agents, a skill's review step is a paragraph asking the agent to check its own work. Agents talk their way past paragraphs.
cultivate runs a skill through a gated runner instead. turri compiles each skill into a LangGraph state graph, where every step is followed by its gate, and the gate's verdict decides where to go next. pi runs the agents, and the state graph decides when a gate runs, and what happens on its verdict. The agent writing ∗∗∗plain only does the writing. Whether its work is reviewed is not up to it.
For cultivate to run a skill this way, the skill has to be written in a particular syntax, which does not have a name yet. It is an ordinary SKILL.md, as the Agent Skills standard describes it, with a little more. The skill lists its steps under ## Steps, and declares its gates in its metadata, with what each gate checks against and what happens when the work fails it. The standard leaves metadata open for anything, so a gated skill still loads in any harness that follows it. There, it simply runs without its gates.

SKILL.md. The harness enforces it, so the agent cannot skip it.parse
This tool is all about managing and assembling context for the coding agent in order the make it’s job easier with reducing the amount of guesswork.
parse is turri's port of the reference ∗∗∗plain parser, and it does two things. It checks that ∗∗∗plain is sound, and it turns ∗∗∗plain into a parsed tree, which the rest of turri works from. It needs no model, it regenerates nothing, and it never looks at the code.
The check comes with building the tree. Where ∗∗∗plain's syntax or structure is wrong, parse says where, and it says what a module still lacks before it can be tested. It is the cheapest check there is, so it is the first one.
turri builds from that tree, and hands the coding agent only the parts a task needs. When it builds serve-meals, the agent gets serve-meals and the definitions and rules it relies on, but not snack-button, which comes later, so it isn't tempted to build that too.
The day the feeder started saying said no
A regeneration starts from the difference between ∗∗∗plain the code was built from and ∗∗∗plain now.
Arthur is still putting on weight. After being prompted to relieve him of his surplus roundness, turri updated serve-meals which now weighs out his meals and added two new functional specs. snack-limit limits his snacks, and cheat-day lets him have a second one on Sundays, because a diet without a cheat day never lasts. Then turri compares that record with feeder.plain. The difference is those three, so they are what gets built. snack-button did not change, so it is left alone.
turri does not have to guess what the code was built from, because it writes it down. Beside the code, in plain_modules/feeder/code/.turri.json, is a record of the parsed ∗∗∗plain tree that the code is built from. It moves only when a pulse lands, and a pulse lands only once the code's unit tests pass. No agent can read it or write it.

feeder.plain as it is now. Only the difference is regenerated.regenerate
A call to regenerate is not a prompt the model follows. It hands the work to turri's work loop, which the harness runs. For Arthur's diet, it goes like this. Under each step is an excerpt of turri's own code, cut down to the lines that do it.
1. Work out the difference. plain_modules/feeder/code/.turri.json says which ∗∗∗plain the code is built from. turri compares it with feeder.plain as it is now. What differs is the work, and nothing else is.
// src/regenerate/drift.ts
/** Everything left to build in the code: from what the code record says
it is built from, to the spec now. */
export function codeWork(record, spec) {
return changesBetween(serializeTree(codeTree(record ?? {})),
serializeTree(codeTree(spec)));
}2. Cut it into pulses. A planning agent groups the functional specs. What builds one feature goes together, by default up to three specs a pulse, with the definitions they use and the implementation reqs about them. No agent reviews the plan. The harness checks it instead. Every change has to be in exactly one pulse, and ∗∗∗plain has to hold together after each. For Arthur's diet, the planner would most likely cut two pulses, one for serve-meals, and one for snack-limit and cheat-day, since a cheat day only makes sense with a limit to cheat on.
// src/regenerate/chunk-plan.ts
export const MAX_SPECS_PER_JOB = 3;
// …
const grouped = await agents?.group(numbered, (answer) => groupProblems(…), …);
// …
if (checkDraft(input, draft).length === 0) return draft;
say(`the plan did not hold together (…) - a functional spec a pulse`);3. Write one prompt. The coding agent never reads the .plain files. It gets one prompt, with the definitions and implementation reqs in scope, what is already built, a map of the codebase, the linked resources and the change to build, section by section. So it has little reason to wander off and build something else.
// src/regenerate/prompt.ts
const parts = [
specPrimer({ testReqs: false }),
`You are changing the \`${input.moduleName}\` codebase to match a change …`,
// …
moduleSection(DEFINITIONS, …),
moduleSection(IMPLEMENTATION_REQS, …),
`<already implemented>\n${…}\n</already implemented>`,
`<codebase>\n${input.codebase}\n</codebase>`,
linkedResourcesSection(input.linkedResources),
specChangeBlock(describeSpecChange(input.changes, input.moduleName)),
// …
];4. Loop until the unit tests pass. The coding agent writes the code and its unit tests. After every turn the harness runs the project's unit testing script itself, with its formatter, linter and type checker, and only that run counts. A failure sends the agent back, up to 20 times. The same failure three times running brings in a debugger. It is a fresh agent that reads the failing run, the tests and the code, and hands over the root cause and the fix. A test that goes missing is challenged by name.
// src/regenerate/regenerate.ts
// the coding agent, with the prompt from step 3 as its task
const executor = await createExecutor({ role: "coding", task, … });
response = await ask(executor, BEGIN, options.onDelta); // "Begin. …"
for (; followUp < MAX_FOLLOW_UPS; followUp += 1) { // 20
// …
const verdict = await gate.verify(runs);
if (!verdict.ok) {
const key = failureSignature(verdict.run);
const seen = key !== undefined ? (seenFailures.get(key) ?? 0) + 1 : 0;
// …
if (circling || timedOut || (key !== undefined && seen >= STUCK_ROUNDS)) { // 3
const found = await healing("debugger", () => debugFailure({ … }));
// …
prompt = [verdict.prompt, …, diagnosisText(found)].join("\n");
}
response = await ask(executor, prompt, options.onDelta);
continue;
}
return true;
}5. Check the tests can fail. Passing tests prove only what they check. With can_it_fail, the coding agent plants a bug in the code, a condition turned round or a value changed, and runs the unit tests on it. If every test still passes, no test catches that bug. This is mutation testing, and the reviewer can use it too.
// src/regenerate/self-check.ts, the can_it_fail tool
run = await runOnCode(options.buildDir, options.script, …,
{ file, text: text.slice(0, at) + replace + text.slice(at + find.length) }, …);
const verdict = run.exitCode === 0
? `Every unit test passes with ${file} changed: no test catches this bug. …`
: `The unit tests fail with ${file} changed: something catches it. …`;6. Review, when it is on. A reviewer reads the code and its tests beside ∗∗∗plain, and changes nothing. Every behaviour has to be implemented, with no stubs, and tested with an assertion that fails when it breaks. It can send the work back twice. The review is there to make the code better, not to catch every nitpick. Nitpicks pile up, and fixing them changes nothing about what the software does or how well it runs. So the second time, an arbiter rules on each problem first. It upholds only the ones where a behaviour ∗∗∗plain states is missing, wrong or untested, and lets the rest go.
// src/regenerate/unit-review.ts
for (let reviews = 0; reviews < UNIT_REVIEW_LIMIT; reviews += 1) { // 2
const review = await reviewer.review(request);
if (review.pass) return { passed: true, … };
let problems = review.problems;
if (reviews >= UNIT_REVIEW_ROUNDS) { // from the second review on
const ruling = await arbitrateReview({ …, problems: review.problems });
if (ruling.upheld.length === 0) return { passed: true, waived, … };
problems = ruling.upheld.map((entry) => entry.problem);
}
await options.send(unitReviewFeedbackPrompt(problems));
// …
}7. Land it. The pulse is committed to the module's history, and the code record now says the code is built from ∗∗∗plain the pulse ended on. Then the next pulse runs, built on what landed and we go back to step 3 and iterate until all pulses have finished.
// src/regenerate/regenerate.ts
const land = () => {
writeCodeRecord(buildDir, steering?.target ?? tree);
landWork(buildDir, `spec diff: ${summarizeDiff(options.diff)}`, options.diff);
};
if (!unitPassed) {
abandonWork(unit, moduleName, "the spec change did not pass its unit tests");
return { ...base, passed: false, stoppedAt: "unit tests" };
}
land();∗∗∗plain can change while this runs. An edit to something the running pulse is building is passed to its coding agent in the middle of the pulse, and the pulse lands built from ∗∗∗plain as edited. A pulse building something ∗∗∗plain no longer describes is stopped, rolled back, and the work is planned again.
It has two more modes. Name a functionality, and it is regenerated even though its ∗∗∗plain did not change. Its code is taken out and built anew. Or ask for it from scratch, and the whole module is deleted and built again, even the whole chain of modules it is built on. That one runs only when asked for, or agreed to. It is Chad Fowler's Deletion Test as a button.
Every regeneration starts by putting the codebase back to its last known good state. Only work that passed is committed. Whatever a stopped or crashed pulse half-wrote never becomes the next pulse's starting point.
A regeneration takes minutes, so regenerate starts the work as pulses and returns straight away. The conversation carries on. I can keep shaping ∗∗∗plain, ask questions or try what has already landed. Pulses on the same module queue behind each other. Pulses on modules that share nothing run side by side.
And the same work runs without a conversation at all, from the command line or overnight:
# parse ***plain - no model, no API key
turri parse feeder.plain
# what is left to regenerate - starts nothing
turri drift feeder.plain
# run until it is done
turri regenerate feeder.plain
# one functional spec again, changed or not
turri regenerate feeder.plain feeder:serve-mealsEnough theory. Back to Arthur's diet, which the planner cut into two pulses. The first weighs out his meals. The second builds the snack limit and the cheat day together, on top of the code the first one landed. Each goes through every step above, and once both have landed, the code record matches feeder.plain again, and there is nothing left to build.

Before a pulse lands, it has to pass its unit tests and and it’s review if it is on. But the same agent wrote the code and the tests, so I’d like a second opinion. I’d ask Arthur, but he’d give full marks to a feeder that never says no. Stick around for the next post, where I’ll show you how conform checks that the code does what ∗∗∗plain says.
That was the hardest part of this post. If it made sense, you understand most of how turri works. And I promise, no more of turri's source code from here on.
Keeping watch
regenerate starts the work. The other three tools in its group are there so that turri can see that work, and stop it. They show what is running and how it went, and what is out of date. A model cannot be trusted to remember any of that. turri keeps it, and the agent asks.
pulses
pulses lists the work, finished, running and planned.
It is there so that turri can observe itself, and it is mostly used for debugging. When a pulse goes wrong, turri reads what happened, and most of the time it can fix the problem on its own. I need to step in only when the problem is in the system around it, such as a low-level dependency missing from my machine, which I don't want turri to install instead of me.
Under the hood, a pulse is one job of turri's work loop. You can imagine it as taking a ∗∗∗plain diff as its input. Every pulse records what it does in the ledger as it goes, and pulses is the one tool that reads it back.
And why are they called pulses? turri is named after a jellyfish, and jellyfish do not really swim. They pulse. The bell squeezes, pushes out a little water, and the jellyfish moves forward by exactly one pulse. Then it relaxes, has a look around, and does it again. turri builds software the same way, one pulse at a time, each one starting where the last one landed.

halt
halt stops work. Given a pulse, it stops that pulse. A running one is rolled back, and a queued one never starts. Given a module, it halts the module. Its running pulse is stopped and rolled back, none of its planned pulses start, and the modules built on it wait for it. What already landed stays. The halt holds until I ask for the module again, even if ∗∗∗plain changes in the meantime. It stops what a launch started, too.
drift
drift says how far the code and its conformance tests have drifted from ∗∗∗plain. It starts nothing. After my change, it would say that serve-meals changed, snack-limit and cheat-day are new, and snack-button is already built.
Getting Arthur’s diet onto the feeder
As far as Arthur is concerned, nothing has changed. His new diet is on my laptop, and his breakfast comes out of the feeder. I still need to get the code that turri built from ∗∗∗plain onto the machine that serves his meals.
launch closes that gap. Running code usually means understanding it first, how it is built, set up and started, and every regeneration can produce code that is a little different. So turri launches it for me, and I stay focused on the software instead of the code. Prompting turri to let me try it is enough. It puts what is built so far in dist/<module> and starts it on my machine in the background. I can also have turri launch every pulse that lands. Trying the software is still the fastest way to find what ∗∗∗plain forgot to say. The difference is what I do about it. I don't ask for a patch. I change ∗∗∗plain, and the next pulse carries the fix.
settings reads the project's settings, and changes one when I ask. turri uses a capable model for the conversation, and smaller, cheaper ones to write and judge the code. "Regenerate with gpt 5.5 from now on" is something I can just say, and it sets the model the code is regenerated on. The same goes for the review or how many pulses run at once, and turri says when a change takes effect. Nothing needs a restart.
Tools, not prompts
A prompt can ask an agent to only rebuild what changed, to test it, to keep a record. But an agent can stop halfway, or decide it has done enough. A tool makes it the only way the work gets done, reliably and every time. A loop in code does not decide it has done enough. It runs until its work is done, or until the power goes out or the laptop's battery dies. That is the point of the whole set.
Regenerative software asks for two things. The code can always be rebuilt from the intent, and what comes back still does what the intent says. regenerate and conform are those two things. The rest makes sure they happen the same way every time. As I said at the start, this post skipped conform on purpose. It gets the next post all to itself.
As for Arthur, the diet landed in two pulses. His meals are weighed out, and the button still works, once between two meals. Arthur still presses it far more often than that, but the feeder no longer gives in, apart from the second snack on Sundays, and the weigh-ins show it. Arthur is back to a healthy weight, and nobody had to patch the feeder's code to get there. Three changes in ∗∗∗plain did it.

turri is open source and MIT licensed. Every tool here is documented in the repository.
turri on GitHub, the harness itself
Using turri, every tool and command
disclaimer
This is the current state of turri as of today. I believe that all of these tools will remain in turri in one form or another, but they are definitely a work in progress, and always subject to change, to be improved or adapted to make regeneration better in any way possible.
Try turri
Download the desktop app, or install the cli if you prefer the terminal. No project of your own yet? Build one of the examples, step by step.
Download the desktop app for macOS and Linux.
Prefer the terminal?
npm install -g @turri-dev/cliReferences
Žan Jonke, I stopped knowing my own software, 11 November 2026.
Chad Fowler, The Deletion Test, from the series The Phoenix Architecture, 24 January 2026.
pi, the coding agent turri is built on, pi.dev.
Mario Zechner, What I learned building an opinionated and minimal coding agent, 30 November 2025.
LangGraph, the control flow behind turri's gated skills, github.com/langchain-ai/langgraphjs.
∗∗∗plain, the language, plainlang.org.
turri, Using turri, github.com/turri-oss/turri.
turri, Skills and gates, github.com/turri-oss/turri.
turri, Trying what is built: launch, github.com/turri-oss/turri.

