In Episode 10, Nova’s change looked like a success: the button was perfectly centered. The problem was everything that was no longer there. Added code is easy to notice. Removed code is easy to miss, because you’re looking for something that isn’t on the screen.
Review in this order
- Size first. Check how big the change is before you read it. A one-line request shouldn’t delete two hundred lines.
- Deleted files next. A missing file is the biggest deletion there is, and the easiest to miss in a long diff.
- Then the red lines. For each removed block, ask whether you asked for that to go. If you didn’t, it shouldn’t have.
- Only then the green. New code is worth reviewing once you know nothing important disappeared.
git diff --stat # how big is it?
git diff --diff-filter=D --name-only # which files were deleted?
git diff | grep '^-' | less # just the removed lines
Prompt to steal
Before I review your change, list everything you removed or replaced:
files, functions, CSS rules, HTML elements and config. For each one,
say why it had to go. Don't summarize what you added.
An assistant’s summary tells you what it meant to do. The deletions tell you what it actually did.