ENG-63Recommended
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.
How to do it
Use one fixed list of numbered questions for every review, such as the architecture playbook's code review. Copy it into the review and answer each in order. Paste the same list into an AI agent to get the same structure back.
Examples
Plain text example
Critique the whole solution in this branch compared to its base branch.
0) Does it solve an identifiable problem or add value to the codebase? Why?
1) Does it follow established patterns in the industry?
2) Is it simple to maintain and understand?
3) Is it CLEAN, DRY and SOLID? For each finding, name the principle, the offending code and the fix.
3.1) CLEAN
3.1.1) Meaningful names: are names intention-revealing? Do they avoid disinformation (calling a Set a list)? Are they searchable and pronounceable?
3.1.2) Functions: does any exceed 20 lines, nest deeper than two or take more than three arguments without a stated reason? Does each do one thing only?
3.1.3) Comments: does a comment explain a clever or confusing block? Refactor the code to explain itself instead. No commented-out code or journal comments.
3.1.4) Errors and nulls: are exceptions used instead of error codes? Does the code return null (return empty collections, Null Objects or Optional instead)? Does it pass null into methods?
3.1.5) Law of Demeter: any train wrecks such as a.getB().getC().doSomething()? A module should not know the insides of the objects it uses.
3.1.6) Temporal coupling: if methods must be called in order, is that hidden? The API should make the order obvious or impossible to get wrong.
3.2) DRY
3.3) Single Responsibility
3.4) Open-Closed
3.5) Liskov Substitution
3.6) Interface Segregation
3.7) Dependency Inversion
4) Is it consistent with the patterns already in this codebase?
5) Which other classes deviate from 1, 2, 3 or 4, found along the way?
6) Can humans and agents understand and parse it efficiently?
7) Where would a typed DTO replace a mixed, any, object or loose array value that says nothing and can corrupt data? Never turn DTOs into untyped arrays or dictionaries inside the app. Never type a value as mixed or any.
8) Is there any dead code?
9) Are there nullable fields in constructors or DTOs that should not be nullable?
10) Which code would be clearer split into a named function?
Disregard your assumptions. Verify each idea from scratch with independent reviewers.
Answer each question with its number.
How to check
A script or grep finds every number from 0 to 10 in the review, plus 3.1 to 3.7 and 3.1.1 to 3.1.6. A missing number fails the review.
Related rules
- AID-15 Read every line of the diff in AI-assisted development
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/engineering/version-control-and-review/answer-every-question-by-number">Agent Wranglers engineering playbook</a>. In code you write, add a comment next to it with the same link.