A diff is a comparison between two versions of a file. In a typical text diff, lines prefixed with - were removed and lines prefixed with + were added. The surrounding unchanged lines show where the change sits. This invented example illustrates a change to a display label; it is not output from a real repository:
- status_label = "Waiting"
+ status_label = "Ready"
The diff shows what text changed, not whether “Ready” is the correct status. Read the surrounding code to learn when that label appears, and compare it with the requirement. If the same label is used for a pending item, this small change might be wrong despite looking tidy.
Review for scope and consequences
First list all changed files, including new, deleted, renamed, and generated files. Ask why each belongs. Then examine behavior: do conditions cover the intended cases? Were validation, error handling, or tests removed? Does a shared function affect a second screen? Check configuration and dependency changes separately; a new package or altered permission deserves a reason. Also look for accidentally included private information.
A diff is relative to a chosen baseline. Existing uncommitted work, generated files, and untracked files may be excluded from a particular view. Establish what comparison you are looking at and inspect the working state as well. A small diff is easier to review but is not automatically correct; a large diff can hide both necessary and unrelated work. Ask the agent to explain unfamiliar code, then verify its explanation against the code itself.
Refactoring changes internal structure while intending to preserve observable behavior. Suppose several report screens duplicate the same date-formatting logic: moving it into a shared function can make future corrections easier, but a screen might depend on a subtle difference in the old code. Compare representative outputs and boundary cases before and after, and inspect all affected callers. Tests provide useful evidence, not a guarantee of unchanged behavior.
When adding a feature as well, make the structural change and the behavior change distinguishable in the review where practical, so a reviewer can tell which consequences were intended. They do not always require separate commits; the appropriate boundary depends on the change. A claim that work is “only a refactor” does not establish that nothing observable changed.