AID-15Recommended
Read every line of the diff
A person reads every line an agent changes before it merges, and can explain why each line is there.
How to do it
Review the whole change against its base, as the code review chapter describes, not the agent's summary of it. Summaries leave things out, and agents report work they did not do. Use the numbered review questions. A second agent can review too, but it does not replace the person. Look for keys and passwords too, as secrets out of code explains.
How to check
Branch protection requires one approval from a person other than the one who ran the agent. A solo developer records a written review in the pull request instead.
Sources
Related rules
- ARC-1 Review the whole change against its base in Clean code and architecture
- ENG-63 Answer every question by number in Engineering
- APS-60 Keep secrets out of code in Application security
- AID-65 Cap open agent pull requests at what people can review in AI-assisted development
- ENG-73 Run codemods in their own commit in Engineering
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/reviewing-agent-output/read-every-diff">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.