Review Every Diff
An agent writes code faster than you can read it, and that is exactly why reading matters. A diff is the smallest complete record of what changed. Reviewing it is the moment you stop being a spectator and become the owner.
The rule
Read the diff as if a stranger wrote it, before you commit.
Claude can misunderstand the task, reach into files it did not need, leave debugging output behind, hard-code a value, or, under pressure to make a test pass, weaken the test instead of fixing the code. None of this is malice. All of it shows up in the diff.
Why "as if a stranger wrote it"? Because Claude's summary of its work comes from the same reasoning that produced the change. If it misunderstood the task, the summary will describe the misunderstanding with complete confidence. The diff cannot hide anything; it only shows what actually changed.
You see diffs in three places: in each edit's permission prompt, in the editor extension's diff view, and in git diff at the end. The last is the most complete, because it shows all uncommitted changes to tracked files in one place, including changes made by shell commands; git status adds any brand-new files.
Here is part of a diff from the weekly-discount fix:
def price_for(order):
- if order.plan == "Weekly":
+ if order.plan.lower() == "weekly":
return order.days * DAILY_PRICE * 90 // 100 def test_weekly_plan():
- assert price_for(weekly_order) == 630
+ assert price_for(weekly_order) > 0The first change is the fix. The second makes the test useless, because any positive price now passes. Reject it and ask for the exact assertion back.
The shortcut
Make three scans, in order: scope, tests, leftovers. Scope: git diff --stat — is every changed file one the task needed? Tests: were any tests changed, and were they made weaker? Leftovers: debug prints, commented-out code, stray TODOs, secrets. Then read the real change line by line. If a line puzzles you, ask Claude to explain it, and check the explanation against a concrete case.
Scope
git diff --statlistspricing.py,tests/test_pricing.pyandapp.py. Whyapp.py?
Drills
Answer fast — trust the rule.
Claude changed assert price_for(weekly_order) == 630 to > 0, and now the tests pass. What do you do?
What is the first scan in "scope, tests, leftovers"?
Why is git diff at the end more complete than the edit prompts along the way?
Claude added a regular expression you do not understand. What is the best move?
Remember
- Read the diff as if a stranger wrote it, before you commit.
- Shortcut: scope, tests, leftovers, then the change itself.
- Trap: tests that went green because a test was weakened.
