Code review Required
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. Copy it into the review and answer each in order. Paste the same list into an AI agent to get the same structure back.
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? Is nesting deeper than two? More than three arguments? 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.
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/answer-every-question-by-number.