Every review comment that enforces a rule is a comment you should not be paying for.
Not because review is bad at it but because review is nearly the last place anything gets caught, and almost nothing has to wait that long.
principle A rule is not owned by the stage that enforces it. Move it to the earliest stage that can enforce it trustworthily, and the stage it used to live in gets cheaper.
Same rule, four prices:
- A
PostToolUsehook costs a correction Claude makes before you read the file. - A lint error at commit time costs seconds.
- The same problem in PR review costs a context switch.
- The same problem after merge costs a rollback.
So why bother moving a rule that already works where it is? Because the gap is not small, and it compounds across every developer, every change, every day. You are not saving a reviewer five minutes. You are deleting a round trip.
The path a rule takes
Claude-based PR review, driven by a REVIEW.md that says what to look for, is the instrument we
have today. It improves as we learn what it needs to catch. That is not the interesting part.
The interesting part is what happens to a rule once it stops churning. It mirrors upstream, into the moment the code is written.
Claude Code fires a PostToolUse hook on every Write, Edit, and NotebookEdit. Match on
those three tools and your standards run against the file Claude just touched:
"hooks": { "PostToolUse": [ { "matcher": "Write|Edit|NotebookEdit", "hooks": [ { "type": "command", "command": "\"$CLAUDE_PLUGIN_ROOT\"/hooks/inject-standards-hook.sh" } ] } ]}That is the whole mechanism. The hook hands the standard back to the model that just wrote the file, in the same turn, with the whole task still in context. Claude fixes it and moves on. Nobody is notified, no branch exists, and the violation never becomes a thing anyone has to read.
Git pre-commit hooks do the same job one stage later. Brian Douglas and others have made the
pre-commit-hooks-are-back-because-of-AI argument in public
(briandouglas.me),
and the direction is right, but a commit hook fires after the session has moved on. The fix
becomes a fresh correction cycle against a context that has to be rebuilt. PostToolUse catches
the same violation while the model still has everything loaded, which is the difference between a
correction and an interruption.
Keep the git hooks anyway, for the two things generation time cannot see: the human hand-edit after Claude is done, and any rule that needs two files to agree with each other.
The reason any of this works now and did not work in 2015 is that a hook can carry a judgment, not just a regex, and it returns that judgment to something that can act on it.
Two things have to be true before a rule moves, and neither is optional:
- The rule has to have stopped changing. A rule still being argued about in review is not ready to interrupt someone’s session. Keep a changelog of rule additions and note which human reviewer comment prompted each one. The rules that stop appearing in that log are the ones that graduate.
- The check has to be trustworthy and fast. A hook that is wrong 10% of the time teaches people to disable hooks. A hook that runs on every file write and takes 40 seconds teaches them the same thing, slower.
What review is left holding
PR review gets thinner. Not because we trust less. Because less needs to happen there.
Hooks take style, obvious bugs, rule-based architectural constraints, and security patterns. What is left is what tools cannot automate yet: architectural judgment, adversarial review, audit trail. That is a smaller review, and a better one, because the reviewer is no longer spending attention on the things a machine already caught before the file was saved.
One warning about pace. Entry criteria decide when a stage becomes policy, not when you start building for it, and the right pace varies by team and by technology. A team in a mature, well-tested codebase with strong type guarantees moves rules upstream faster than a team that is still writing its first integration test. Enforce a uniform pace across both and you get compliance theatre from the team that is not ready and foot-dragging from the team that is past it.
Go read your last month of review comments. The ones you wrote more than twice are not review comments. They are hooks you have not written yet.