An agentic coding pipeline you can trust: where I put the proof
Engineering leaders keep asking the same question. Coding agents now write much of our code, so what does a delivery pipeline look like that we can still trust? My short answer: people review the design, the interfaces and the risky parts; acceptance tests the agent never saw, a gate that reads what actually ran and a planted fault that must turn it red prove the rest; and small, isolated slices contain merge risk, because it compounds. The stages themselves are not hard to list, and the companion piece on a standard agentic dev pipeline walks through them. This essay covers the reasoning behind each stage, the traps I look for, and the judgment calls that decide whether the pipeline earns trust or just looks like it does.
Two answers that stop working at volume
The first instinct is "humans read every line". It sounds rigorous. But once agents produce changes faster than people can read them, the queue grows, reviewers start skimming, and a skimmed approval looks exactly like a careful one on any dashboard. The review still happens, but it stops meaning anything.
The second instinct is "the agent's tests passed". The problem is structural. The agent wrote the code and the tests from the same understanding of the task, so if that understanding is wrong, both are wrong in the same direction and the suite stays green. I've written before about why agents cannot grade their own work, and the same logic applies here.
So I don't pick either answer. I split the work by where human judgment adds the most. People review the design, the interfaces and the risky parts. Everything else is proven by acceptance tests the agent did not write and by controls that must fail. I also plan for merge risk compounding, because it does.
The first thing I ask for is the spec
Before an agent builds a milestone, I want three things written down: the data contracts, the interfaces, and acceptance criteria phrased as observable results. An agent fills gaps with plausible guesses, and a written spec shows the gaps before any code hides them.
Then I give the plan to a model from a different family and ask it to attack. I ask "what breaks this", not "is this good". The family matters. A model reviewing a plan from its own family tends to share the author's blind spots, while a different family is more likely to notice the missing negative case.
The trap I watch for here is the vacuous criterion. "The settings page loads" can pass while the save button does nothing. I rewrite each criterion as a result a person could observe, and I pair it with a negative case: what must not happen, and what the user sees when it doesn't. This is the same discipline I describe in the spec, the reviewers and the evidence ledger.
Instructions are advice; hooks are rules
Instruction files work most of the time, and "most of the time" is the problem. My test for whether a rule becomes a hook is simple: if a single exception is unacceptable, it's a hook. "Do not report done while the type check fails" is a hook. "Prefer small functions" stays in the instruction file.
I keep the hook set small, and I test every hook by doing the forbidden thing on purpose. A hook that has never fired is an assumption, not a control. Whether the forbidden action actually stayed blocked is a separate question from whether the hook ran. I covered that difference in your hook ran; did the forbidden action stay blocked.
I also keep state on disk: a write-ahead log of intent, decisions and checks. When a session ends or its context compacts, the next one resumes from recorded facts. Without that log, the next session resumes from the previous session's summary of itself, and that summary is the least trustworthy record in the system.
"Tests passed" is a sentence, not a measurement
When an agent says its tests passed, I read that as a claim to check. The gate reads what the test runner actually did: how many tests ran, how many were skipped, how many were filtered out, and whether the required acceptance tests are among the ones that ran.
These are the traps I look for:
- A suite with zero executed tests that still reports success.
- A required test that quietly got filtered out, so the run looks clean.
- A test edited to match the bug instead of the requirement.
The gate has three outcomes: PASS, FAIL and UNVERIFIED. The judgment call that matters most is refusing to treat UNVERIFIED as a softer PASS. If a required test didn't run, nobody knows whether the change works, and the pipeline should say so plainly. I make the same argument in a merge gate must prove the tests ran.
The last piece is a planted fault. I run a deliberately broken variant of the change, and it must turn the gate red. If the mutant passes, the gate isn't measuring anything, and every green result it produced is suspect. This control takes little effort to run, and it protects every other check.
On top of the gate, a person runs held-out acceptance and click tests on each milestone slice. I put the extra time into UI edge cases and user-flow regressions, because a unit suite can be entirely green while the flow a real user follows is broken. "Landed" and "done" are different states, and I want done defined before agents report it.
The planted-bug estimate, and how wide it really is
To measure review, I plant bugs before a review pass. The arithmetic is simple. If review finds 3 of 5 planted bugs (60%) and 12 real ones, the real total is about 12 / 0.6 = 20, so about 8 real bugs are still hidden.
Two judgment calls keep this honest.
First, the estimate assumes the planted bugs are as findable as the real ones. If I plant obvious typos, reviewers catch them easily, the catch rate looks inflated, and the hidden-bug estimate shrinks for no good reason. I plant bugs that look like the real failures: a wrong boundary, a missing negative case, a contract mismatch between two services.
Second, the estimate is wide. Three of five is a tiny sample. Even with 20 planted bugs and 12 caught, the same 60% point estimate has a Wilson range of about 39% to 78%. Dividing the 12 real finds by each end of that range gives a total somewhere between about 15 (12 / 0.78) and about 31 (12 / 0.39). So I treat a single review's estimate as a direction and keep a running count of planted bugs across reviews until the range is narrow enough to act on.
Merge risk compounds, and people reason per change
The math I show every team is this: ten merged changes at 5% risk each give 1 - 0.95^10, which is about 40%. People think about one change at a time ("only 5%"), but a release ships them all together.
There are two levers, and I use both. The first is per-change risk: at 1% each, ten changes come to nearly 10%. Small slices and a strict gate are how you get there. The second is containment: isolated worktrees so parallel agents don't collide, CI gates on every slice, a canary release to a small share of traffic, and an automatic rollback trigger written down before the deploy, not argued over during it.
The reference pipeline on one page
When I lay this out for a team, it fits on one page:
- A spec per milestone (contracts, interfaces, acceptance criteria with negative cases), attacked by a second model family.
- Hooks for zero-exception rules, and a write-ahead log on disk.
- The agent builds a small slice in an isolated worktree.
- A gate that reads executed, skipped and filtered counts, checks the required tests, and kills a planted mutant.
- Human review of design, interfaces and risky parts, with reviewers measured by planted bugs.
- Held-out acceptance and click tests, run by a person on the slice.
- Merge, canary, and automatic rollback.
The rest of the writing on this theme is collected in the agentic dev pipelines topic.
Questions people ask
Do I still need human code review if the agent's tests pass?
Yes, but focused. People review the design, the interfaces and the risky parts. The agent's passing tests are a claim, so acceptance tests the agent never saw and a planted fault that must turn the gate red prove the rest.
How many planted bugs should I use to measure a reviewer?
Five gives a rough first read, but the estimate is wide. Even 12 caught out of 20 planted has a range of about 39% to 78%, so keep a running count across reviews before acting on the number.
What does a 40% merge risk mean in practice?
If each of ten merged changes has a 5% chance of breaking something, there is about a 40% chance at least one does. Smaller slices, isolation, canaries and automatic rollback lower it or contain it.
Why use a different model family to review the plan?
A reviewer from the same family tends to share the author's blind spots. A different family, asked to attack the plan rather than approve it, is more likely to find missing negative cases and vague contracts.
If you are working through the same judgment calls in your own pipeline, connect with me on LinkedIn to compare notes and discuss where your gate still trusts a sentence instead of a count.
