Development & Code · master area
Code Review
The reviewer reads the brief before the diff. The question is not "does this work" — it is "does this carry the meaning the chain handed in?"
Owners: Developer, Tech Lead Phase it lives in: How We Build (Volume IV) The corpus principle this enacts: Code review as chain verification.
Where it lives in the chain
- How We Build · Code review as chain verification — the canon
- How We Build · The Review — three confirmations, this is the technical one
How to do this
The reviewer asks the trace question:
- Domain language — does the code use the brief's words?
gradeExamnotsubmitForm? - ADR compliance — does the implementation honour the architectural decision? If the ADR said "no domain logic in HTTP handlers," is the handler thin?
- Scenario coverage — does the test cover the Gherkin scenarios from amigos? Including the negative case?
- State coverage — are all named states from the wireframe implemented? Empty, loading, success, error, edge?
- Migration discipline — if the PR migrates schema, is
downtested? - Flag discipline — if the PR wraps a flag, is the cleanup task created with a date?
If any answer is no, the PR doesn't merge.
What good review looks like
The reviewer opens the Feature Brief, then the amigos scenarios, then the ADR if one was named, then the diff. They name what they checked. "Read the brief, the four scenarios, ADR-014. The handler is thin, the domain function is named, three scenarios covered. Missing: the permission-revoked-mid-flow scenario from the wireframe — please add a test." That is review. "LGTM 👍" is not.
A review that takes 4 days, returns at midnight, and contains six comments about formatting is a review that has stopped serving the chain. Reviews must be fast enough for trunk-based discipline to hold — same day, ideally same hour for small PRs. The substance is in what the reviewer checks, not in how many comments they leave.
Related crafts
- Domain Language in Code
- Trunk-Based Development — review must be fast for trunk-based to work
- Conventional Commits — what the reviewer reads first