The trust ladder
I recently read Poteto’s write-up and watched Matt’s interview with her, and it stirred up quite a few thoughts. The biggest one is that it confirmed I’m on the right path: I’ve stopped obsessing over reading code and put most of my effort into “verification engineering”.
Poteto merged 2,500 PRs in a month. That alone tells you this isn’t something “human review” can do. At that scale the human becomes the least efficient link, the bottleneck of the whole flow. So with that much code, how do you let it merge and ship without a human looking at it? In her words, it all comes down to trust. And that trust is built on a high degree of determinism.
Poteto says she doesn’t like the term “software factory”, because it sounds like a crude assembly line turning out standard goods with no character. She’d rather look at her work from an artistic angle. Or put another way, a Michelin restaurant. The head chef doesn’t need to taste every dish herself, or micromanage every assistant cook. What she needs is to get the recipes, the menu, the techniques, the equipment and the training right.
To keep agent output stable, she designed two layers of verification:
- First, the foundation layer. This mostly relies on architecture design, verification skills, deterministic CLIs, static analysis and lint rules. Architecture and module design matter most here, because they take away an error pattern’s physical possibility of happening at the source. The other steps then plug the errors that couldn’t be sealed off at the architecture stage. Most of the time the foundation layer is enough.
- Second, the advanced layer. The core here is formal verification. With formal languages like Lean or TLA+, you prove mathematically that business invariants must hold, and make sure the state is absolutely correct. She also recommended Bend, a formal language made specifically for AI to use, though it’s still fairly early. In short, mathematical properties can become a guarantee of absolute correctness. It’s a very promising direction, but building the advanced layer is still hard right now, so it isn’t that widely used.
Beyond the verification layers, she put special weight on domain knowledge, and especially on expressing intent: how to get your intent across to the agent correctly. To be frank, this matches what I’d already felt from my own use. Just hitting it in one shot with the right domain language can change the quality of the agent’s output enormously. Sometimes one right word is worth a pile of vague, rambling description. For example, rather than asking for “a colorful black”, spell out the design philosophy, what you expect it to look like, and the intent (what you actually want). Don’t be the client everyone hates. Describing the requirement clearly matters more than anything.
I mentioned CLIs above, and Poteto stresses this too: you should turn the deterministic parts of your workflow into code. I’d found the same thing well before this. Rather than letting AI rewrite the process every time it tests, I’d rather wrap a CLI and hand that to it. That way every run is highly deterministic, and it doesn’t inexplicably reinvent the wheel on the next test after finishing the last one. Writing a CLI has one more benefit. It’s also about determinism, but this time about safety: whatever AI uses to test is already within what I expect, and it won’t inexplicably fill the test database with junk when it’s done (don’t ask me how I know).
Next is building a site map. The core goal is to give the agent a materialized memory, so it has a clear picture of the whole product and its business flows: the paths through the app, what each feature does and how you interact with it, the shortcuts and DOM elements to click to trigger a feature, the expected behavior of each feature, and so on. Only by knowing the product can it pin down a vague problem precisely. Otherwise, once things are automated, it just drifts further and further off.
LLMs are nondeterministic machines. If we want them to run stably, the only way is to shrink the space of possibilities where problems come from. In Poteto’s words: make the right way the only workable way. She brought up the early Grok-bot as an example. It was full of seven or eight god files, each over ten thousand lines (files that handle everything and hold everything), with a crowd of agents editing back and forth in them and stepping on each other. That problem was finally solved through thorough modularization, paired with strict rules on changes that sealed off any chance of rogue edits. That’s a textbook case of building determinism through architecture. In that setup the agent doesn’t need to agonize at all, because it has no choice. “The right road is the only choice”, and all it has to do is put code in.
Back to the 2,500 PRs. She said plainly that all of it rests on a highly standardized environment and automated verification. She used opening branches as the example: once the first standardized, smoothly running restaurant has been polished, you can go ahead and open more. Lots of PRs work the same way.
Poteto splits her whole operation into two loops:
- Inner loop: mainly the code-building loop. An orchestrating agent that can plan on its own (like the restaurant’s head chef) writes no code itself. It only orchestrates, breaking big tasks into subtasks, then dispatching them dynamically to run separately.
- Outer loop: this specifically means the environment for pulling in outside context. The agents running inside need to stay aware of what’s going on outside, like new tickets, Slack messages and so on. If the agent isn’t hooked up to the outside environment, the human ends up carrying those messages over by hand. Once tools connect it to the outside, the outer-loop agent becomes a dedicated signal listener, watching for possible problems 24/7 and handing them to the inner-loop agent right away.
But those two aren’t enough. On top of the quality-assurance process covered above, she added a step: spot checks. Every day Poteto picks a random batch of PRs and reviews their code quality strictly. When she finds a smell or a problem, she goes back and fixes the environment that produced that PR. It’s like batch sampling in manufacturing: if any item in a batch has a problem, the cause is usually the environment for that batch. A bad PR is treated as a warning signal about the environment. Instead of only fixing the bad PR, she puts the weight on the environment that produced it: adding new lint rules, adjusting context constraints, or adding verification tests. This again shows her core design philosophy, which puts a deterministic environment first.
Finally, the retrospective stage. Near the end of the interview she specifically brought up looking back: reviewing our past interactions with agents and treating old conversations as a huge store of context. She’s right. They record our real past interactions, every piece of HITL feedback, every real complaint and every fix principle we laid down. It’s a true record of my own development process, and an untouched, original one at that. She has a dedicated skill for reviewing it regularly. When a problem comes up, it first looks back at the context of similar problems, then distills it into a structured process.
I think this step could use a layer of abstraction, though. The top layer could be an index, summaries of the context and brief notes, which then link to the raw context. That way the agent doesn’t have to dig through the raw content every time. Anyway, backing up your own context regularly isn’t hard. A scheduled script will do it. Filter the history before you save it, though. Drop the tool-call and edit records you don’t need and keep only the conversation. What you store can be as little as 1% of the raw files (mine was, at least). Pure conversation documents don’t take up much space, but they’re extremely valuable.
A codebase is like a garden. It needs regular tending, or weeds take over. So a gardener is essential too: clean up old tech debt so it doesn’t become a source of pollution; keep only one standard implementation per business scenario, so the agent isn’t torn between several approaches; when you hit an anti-pattern, don’t just fix the code, add a lint rule right then and stop the bleeding. A robust environment depends on continuous maintenance, and these tedious-looking additions are exactly how the chaos gets reined in, bit by bit. From start to finish, what runs through all of it is building determinism, continuously. All of that together is the secret to 2,500 PRs going through smoothly.
If you do all of that, and you also spend some time, you know, thinking about your code quality in terms of skills, you get to a place where you trust the environment so much that your agents can just be free.This is really the secret, right? Well, it’s not really a secret, it’s a lot of hard work…I hope that you’ll have a lot of fun and success building your own Michelin kitchen. by Poteto
Translation note. I wrote this in Chinese. This English version is an LLM translation, so the wording is not mine even though the thinking is. Original: 信任阶梯.