An agent never approves its own work

How I let coding agents build software. Six steps, a reviewer on a different model, and a person for anything sensitive. It is a handful of Markdown files.

Almost everything I ship is written by coding agents. That only works if "done" means something. An agent that reviews its own change agrees with itself, so the one rule everything else hangs on is simple: an agent never approves its own work.

Six steps

  1. Understand. The agent restates the task and writes a few concrete examples of what should happen. I confirm them before anything is built. Those examples are the contract.
  2. Plan. A short plan: what changes, in which order, and what could break.
  3. Build. One lead agent writes and commits. Helpers can work in their own copies of the repo, but only the lead merges.
  4. Review. A reviewer on a different model, in a fresh session, checks the change against the confirmed examples. It has not seen the build conversation, so it can't be talked into anything.
  5. Fix. The lead fixes what the reviewer found. At most three rounds, then it stops and asks me.
  6. Done. Only when the checks below pass.

What done means

  • Build, tests and lint pass.
  • Every confirmed example passes, according to the reviewer.
  • The reviewer approved this exact version, not an earlier one.
  • A person approves anything sensitive.

House rules

A few things the agents are never allowed to do, and what each one prevents:

  • Approve their own work. Prevents the most common failure: confident, wrong, and self-certified.
  • Weaken a test to make it pass. Prevents "green" from quietly meaning less over time.
  • Edit their own instructions during a run. Prevents the rules from drifting to fit the task.

The same rule, in two other places

The workflow above is how I work at my desk. The rule holds up better when it is built into the systems around the agents, so I built it into two more.

A pipeline from issue to pull request. I set up a self-hosted pipeline where labelled issues are picked up on a schedule and an agent makes the change in an isolated sandbox. It can only open a draft pull request. A developer runs the checks and marks it ready, never the agent. Labels route each task to a different model, including a self-hosted one, so the team compares models on real work instead of benchmarks. Every commit says which model wrote it. The agents only ever get short-lived credentials, and they can't touch releases.

A platform where agents build business apps. I designed its foundation around the same rule. Agents write the apps and run inside them, but they never approve, accept or release anything on a person's behalf. Acceptance checks are tied to the exact version they were run on, and an agent can't tick a check that belongs to a person.

Same idea three times: the thing that does the work is never the thing that says it is done.

It is just Markdown

There is no platform behind the workflow. It is a handful of Markdown files installed as an agent skill. The files are not clever. The judgement is in what they forbid, and in where a person has to say yes.

Where it still falls short

The builder sees the same examples the reviewer tests against. A determined agent can satisfy the letter of an example and miss its point. The fix is holdout scenarios: cases the reviewer checks that the builder never saw. I have not built that yet.