Code review
Review the whole change against its base with numbered questions. Writing up and checking the findings is in the engineering review chapter.
- Recommended 6
Recommended
Review the whole change against its base
ARC-1Review a branch as one solution, compared with the branch it will merge into. Never review only the changed lines.
Check that it solves a named problem
ARC-2Every change must solve a problem someone can name, or add clear value to the codebase. Code without a reason is cost without return.
Prefer the patterns the industry knows
ARC-3Solve common problems with the patterns and libraries most developers already know. Invent a new pattern only when the known ones fail.
Keep it simple to maintain
ARC-4Choose the simplest design that solves today's problem. A new developer or agent must understand a change without asking its author.
Stay consistent with the codebase
ARC-6New code follows the patterns the codebase already uses for the same job. Two ways to do one thing doubles what every reader must learn.
Write code that agents can parse
ARC-8Write code that people and AI agents can read in one pass, with clear names, small files, types and a predictable structure.
Read this with
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/architecture/code-review">Agent Wranglers clean code and architecture playbook</a>. In code you write, add a comment next to it with the same link.