It is fine if not every PR is reviewed by a human
A working group in my company spent a month on review and QA with agents. We ended on one message, and on the question it raises. How do you trust what gets merged without a human review?
In October I wrote that the bottleneck had moved. Agents write code faster than we can review it and test it. Since then a working group in my company spent a month on that problem, a few engineers from different squads, and this week we presented what came out of it to the rest of engineering.
We ended on one message, that it is fine if not every PR is reviewed by a human.
I can stand behind that sentence. It also raises a question the minute you say it. How do you trust what gets merged when no human reviewed it? This post is the answer we have so far. I ran the group, and as a manager I do not read diffs, so what follows comes from the engineers who did the work.
Why say it out loud#
We produce much more code than before, and nobody wants to become a full-time reviewer. The developer has already read what their agent wrote. And when we looked at our own dashboard, a good share of our PRs were already merged without an approved review. Practice was ahead of the rule. So is the useful debate still for or against merging without review? I think it is the one we wrote under the figure, with what confidence?
The goal we had set at the start was to need fewer human interventions without lowering quality, and without losing the knowledge that review spreads in a team. We also did not want a heavy process.
At kickoff there were three tracks. Automate the review, move toward auto-merge, and build confidence before the PR exists. The third one ended up carrying most of the answer.
We did not choose a tool#
We tried several AI reviewers on real PRs, CodeRabbit ↗, the review in Capy ↗, and Codex ↗ with custom instructions. The group wrote one rule in the first week, that whatever we add around review has to make review faster.
At the halfway point we still had no winner, and we stopped looking for one. The ground kept moving under us. Capy, the agent platform more and more of the team was adopting, changed its pricing to include reviews. Codex gained a security review and an incremental one during the same weeks. With that many tools arriving, the opinion we formed in a month may well change within six. We preferred a decision we can undo to a comparison that never ends.
We also listed what a reviewer on a PR is supposed to look at, and found four things. Bugs and security, conventions and architecture, performance, and whether the change does what the ticket asked. Today only the first is covered, by Codex, which runs on our PRs. The other three sit in a column we called the holes, and no single tool covered all four. Review rules written per repo, in the file that holds the agent’s instructions, are at the test stage.
So the reviewer bot is one part of the answer and a small one. The rest happens before it runs.
The PR arrives with its proof#
One team now has its agents write the PR description with a skill. The description is shorter, and it carries proof, screenshots and traces from the staging environment that the agent attached itself. At the bottom, folded, the agent gives the blast radius of the change, the effort a review would take, and a score for how much human attention it needs.
What does that change for the person on the other side? They can validate without checking out the branch or starting a local session. In Capy the same PR opens as a guided review. The files are grouped into logical batches, and you can ask questions about the PR in a chat.
flowchart LR
accTitle: How a change reaches merge
accDescr: The agent writes the change and tests its own work, the PR arrives with proof, and the author rereads it. The author merges, or asks for a targeted review first when in doubt or outside a repo they know.
write[Agent writes] --> test[Agent tests<br/>its own work]:::hl --> pr[PR with proof]:::hl --> author[Author rereads]
author --> merge[Merge]
author -. doubt, or<br/>unfamiliar repo .-> review[Targeted review]:::alt --> merge
A review is something you ask for#
The habit that came out of the month has no strict rule behind it. If you know the codebase well, reading what your agent wrote is enough, and you ping someone for a targeted read when you have a real doubt or want an outside opinion. If you are not at home in the repo, you ask someone who knows the area before you merge.
That means changing the settings of our repos too. A review notification should go back to meaning that a person is asking for one.
Under the message on our last slide we wrote a second sentence. Each of us stays responsible for what we merge.
The setup is shared, in Capy#
Why does an agent get things wrong on a codebase it can read in full? The group’s answer was missing context. Decisions get made in a Slack thread or in a meeting, and they never reach the agent.
The engineer who led the QA work told the story of their own setup. At first the model wrote the test cases and they played them by hand. Then the model played the cases too. All of that lived on one machine. Today it is a project shared in Capy, and that is the part I find most interesting, because a setup that lives on one laptop helps one person.
The method is common and the QA is per project. The method is a set of skills in a plugin on GitHub, to prepare, plan and execute. Each feature then gets a shared project in Capy with its own drive, which holds the test plan, the test data, and the agreements given to the agents. The agents, which Capy calls captains, each have a job. One looks after the method, one runs the QA of the feature, and the developers have theirs. The developers’ captains know what is deployed and where to observe the result. The QA captain knows which tests a given delivery unlocks.
The field feeds the method. A project captain logs a friction, the method captain proposes a reusable rule, a person validates the change to the plugin, and every project receives the new version. The example we showed was small. At every run the agent asked again for permission to prepare the same test data. Now there are standing agreements, written down and bounded. The exact permission stays local to the project, and the way to manage it is common.
On the slides this went under a bigger name, the software factory. Share the practices, the skills and the agents, and a well set up agent tests its own work, which leaves less to reread.
QA starts with the specs#
Before, we did a few manual tests along the way and one large QA phase at the end of the project. A lot was caught only there. Now the test plan exists on day one, and automated tests run at each delivery.
The plan is built from the sources, meaning the specs, the mockups and the decisions that were confirmed. Each expected behaviour is tied to its source. One rule in there is my favourite of the whole month. If a behaviour is not in the sources, it becomes a question to settle, and the agent does not get to invent a requirement. The same plan is read two ways, as an HTML page for the person piloting the QA and as cases to execute for the captain.
flowchart LR
accTitle: The QA loop on one feature
accDescr: Specs, mockups and confirmed decisions produce a test plan. A daily run plays the cases that are ready and records a verdict. A new delivery replays the affected cases without waiting, and a red verdict goes to the team to fix the case or the code.
src[Specs, mockups,<br/>decisions] --> plan[Test plan]:::hl --> run[Daily run] --> verdict[Green or red]
delivery[New delivery]:::alt -. replays<br/>affected cases .-> run
verdict -. red .-> fix[Fix the case<br/>or the code] --> run
Every day the pilot launches the run by hand and validates any change to the plan. The captain catches up on the discussions, plays what is ready, and records the result, green if it passes and red if it is blocked. At kickoff everything is red, and the cases turn green as the feature lands. Yes, it is TDD. A case that fails on something that was supposed to be delivered goes to Slack, and either the case gets corrected or the developers’ captains fix the code. A delivery does not wait for the next morning. The captains signal each other, the deployment is checked, and the affected cases are replayed.
The backend engineers doubted this would work for services with no screen to click on. One of them ran the QA of a backend feature on our development environment, and that settled it.
One thing got everybody’s agreement. The QA tests are committed to the repo, so the next agent does not start from zero. Manual QA then becomes what we wanted it to be, a safety net.
What we left open#
The first open point is the guarantee. Today each engineer runs these checks with their own setup, and nothing in the pipeline shows that a PR went through any of them. Can we guarantee it, and at what cost? Some of us want it enforced in CI. Others think each team answers for its repo and that we cannot afford to run everything on every PR. I have not made up my mind.
The second is knowledge. Review also spreads it. And our design documents age in a wiki the agents do not see.
The third follows from it. If those documents move into the repo, which repo? We did not conclude anything on that.
And we did not touch the other end of the pipe, specs and discovery.
The sentence we put last on the slides is the one I would keep from the month. The tool matters less than the method.