Author and Reviewer Are Never the Same Agent: Security and QA
Why the agent that wrote the change is the last one I'd ask whether it's any good
Post 36 ended with an outage. A fix-it agent put a Liquid tag inside a comment block in the global variables template that every API includes, the runtime parsed it anyway, and every API on the dev site went down for an afternoon. The part I skipped over then is that the change had been reviewed. Twice.
So this post is about review, and why I run it as a chain of agents that never includes the one that did the work.
The chain
Every change goes implementer, then security, then qa, then documentation. The coordinator enforces the order. The implementer is whichever specialist owns the area: powerpages for Liquid and server logic, dataverse for schema, integration for anything that leaves the tenant.
The rule that matters: the agent that wrote the code does not review the code. It sounds obvious, and it’s the first thing that erodes in a hurry, because asking the implementing agent “did you get this right” is one line. It will say yes. It said yes before the outage.
A fresh agent with a narrow brief has no investment in the answer. That’s the value.
What security looks at
The security agent runs on the more expensive model, because this is the one place I want judgement rather than speed. It gets the diff, the brief the implementer worked from, and a list of what goes wrong on this platform:
- Table permissions and their scope, because a new read on a child table tends to arrive as global when it should be contact-scoped
- Web API field lists, which must name columns and never use the wildcard
- FetchXML or server logic that reads outside the signed-in user’s context, or trusts an ID the browser sent. The first application endpoint did that with the talent profile ID
- Server logic that does more than the client asked for, because “while I was in there” is how an endpoint grows an org-wide lookup
- Comment blocks in Liquid that contain anything the engine would parse
That last one went on the day after the outage. It had been a written rule for months, but not on the security brief. A reviewer told to “check this change” does not go looking inside comments. One told “check every comment block for Liquid tags” finds them in thirty seconds.
If you take one thing from this post: name the trap. Generic briefs find generic problems.
What qa does
The qa agent is cheaper and more literal. It checks the brief against the implementer’s report, runs the Playwright suite against the dev site, and walks a checklist: console errors on the touched pages, the form still saving, the list still filtering, messages in the message bar rather than an alert.
Then it reports. It does not fix. An agent that finds a broken button wants to mend it, and then the separation is gone. Findings go back to the implementer, and the fix comes through the chain again.
One rule came from the casting director piloting the portal: dead code found during review is flagged, never deleted. A reviewer that tidies as it goes produces diffs nobody asked for, and that’s where the regressions hide.
Reviewers miss things
The comment-tag change passed security and qa. Neither was told to look at comments, and the change otherwise did what the brief said, so both signed it off.
That’s a failure of the brief, not the agents, and briefs are mine. But a review chain isn’t enough for the rules that take the site down. Those are now build guards: one fails on a comment block containing a tag sequence, another on a wildcard in a Web API setting. The build doesn’t have opinions and doesn’t get tired.
Three layers, then. The specialist knows the rules. The reviewer is told which rules to check. The build enforces the ones that hurt most.
How to make a mess and fix it
The reviewer approves everything. Your brief says “review this”. Say what to look for, and say what a failure looks like.
The reviewer fixed it instead of reporting it. Take the write tools away from the review step, or say that findings go back to the implementer.
Findings that aren’t findings. A reviewer with too much freedom reports style preferences. Give it the checklist and ask for file, line and why.
The same mistake twice. It’s a build guard now, not a review item.
Useful links
- Table permissions
- Web API overview and site settings
- Server logic overview
- Liquid tags
- Subagents in Claude Code
Next: running agents in parallel, and the afternoon one of them reverted another one’s work.