Asking AI for a small change: review the scope of the diff
Two button variants produced in the same session stay focused; their differences help refine an instruction and define when to stop.
A label and a colour decision
The button says ‘Valider’ (Confirm) and needs to become ‘Enregistrer’ (Save), while keeping the same action. A vague request leaves another decision open: should its colour change too? The two lab variants let us examine this difference in the diff.
In this Codex session on 19 and 20 October 2026, two variants of a small HTML document were produced. They share the same context; they are not two independent sessions following a comparison protocol. The precise model identifier and its settings were not recorded.
Two instructions, two limited differences
Vague : améliorer ce bouton pour enregistrer.
Précise : remplacer « Valider » par « Enregistrer ».
Conserver le style et le gestionnaire existants.
Ne modifier qu’un fichier, sans dépendance.
Vérifier que le clic affiche encore « Enregistré ». The vague variant replaces the label and adjusts the colour. The precise variant replaces only the label. Both stay in the same file, without moving code or adding a dependency. The script preserves the generated documents so their contents can be compared.
The result cannot attribute the difference solely to the instruction: the shared context and generation within one session limit the comparison. It provides a concrete example of a styling decision left open by the first wording.
Check the preserved behaviour too
The Playwright 1.62.1 lab loads the initial state and then both variants, clicks and checks the output ‘Enregistré’ (Saved). All three checks passed. The number of files touched shows the physical scope; checking the click shows what was preserved.
- Read the functional changes, including those that alter only a few lines.
- Look for an added dependency, moved code or an unrequested styling decision.
- Connect each change to a criterion or ask for its justification.
- Remove any unjustified change, then run the same checks again.
Define when the agent should stop
A useful instruction specifies the behaviour to achieve, the elements to preserve and what requires a human decision. If a local change requires a migration or a new service, first ask how that relates to the need. An absolute line limit, however, can prevent a necessary fix.
For your next small change, name the page, exact label, expected action and before-and-after check. Compare the diff against those criteria. Nothing in this demonstration justifies concluding that all agents exceed their scope, or that a precise instruction alone guarantees the scope of the work.