Skip to content

Write Review Rules Around Business Invariants

2026-08-26codex, code-review

“Review carefully” gives a code reviewer little to prioritize. A business invariant tells it which mistakes matter.

Suppose an import must preserve every valid order and put invalid rows in an exception file. Add that rule to the repository's review guidance, along with the relevant tests and the meaning of a valid order. Ask Codex to inspect a change that accidentally drops rows with a zero amount.

Verify that the review identifies the lost-order behavior and cites the actual path. Then try a harmless refactor to check that the rule does not create a finding every time the file changes. Keep review guidance short and tied to observable behavior; it should focus attention, not manufacture criticism.

OpenAI documentation.