---
title: "Code review · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/code-review
updated: 2026-10-20
licence: "All rights reserved"
---

# Code review

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

> Review the whole change against its base with numbered questions. Name the principle, the code and the fix, then verify each finding from scratch.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/code-review`.

## Required

- [Review the whole change against its base](https://agentwranglers.se/playbook/architecture/code-review/review-against-the-base): Review 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](https://agentwranglers.se/playbook/architecture/code-review/solves-a-named-problem): Every change must solve a problem someone can name, or add clear value to the codebase. Code without a reason is cost without return.
- [Keep it simple to maintain](https://agentwranglers.se/playbook/architecture/code-review/simple-to-maintain): Choose the simplest design that solves today's problem. A new developer or agent must understand a change without asking its author.
- [Name the principle and the fix in every finding](https://agentwranglers.se/playbook/architecture/code-review/name-principle-code-fix): Every finding names the broken principle, the exact file and line, and a concrete fix. "This feels messy" is not a finding.
- [Stay consistent with the codebase](https://agentwranglers.se/playbook/architecture/code-review/consistent-with-the-codebase): New 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](https://agentwranglers.se/playbook/architecture/code-review/readable-for-agents): Write code that people and AI agents can read in one pass, with clear names, small files, types and a predictable structure.
- [Answer every question by number](https://agentwranglers.se/playbook/architecture/code-review/answer-every-question-by-number): Answer every review question with its number, even when the answer is "no problems found". A skipped number counts as not reviewed.
- [Verify every finding from scratch](https://agentwranglers.se/playbook/architecture/code-review/verify-with-fresh-agents): Check each finding again with a reviewer who starts fresh, such as a second person or a new AI agent. Drop findings that don't hold up.

## Recommended

- [Prefer the patterns the industry knows](https://agentwranglers.se/playbook/architecture/code-review/industry-standard-patterns): Solve common problems with the patterns and libraries most developers already know. Invent a new pattern only when the known ones fail.
- [Report problems beyond the diff](https://agentwranglers.se/playbook/architecture/code-review/look-beyond-the-diff): When the review finds other code that breaks the same rules, report it too, as a separate list.

- Next: [Names and functions](https://agentwranglers.se/playbook/architecture/names-and-functions)
- [All chapters](https://agentwranglers.se/playbook/architecture)
