Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Scope creep and unasked-for changes in a diff
card 6 of 6
Small diff, one purpose
builds on: You own every line the agent writes
Read the diff against the request: every hunk should be needed for the task. Unasked-for reformatting, renames, new abstractions, config changes and dependency bumps get reverted or split into their own change. That keeps the fix small, easy to review and revertible on its own.
Terms on this card
- hunk
- One contiguous block of changed lines in a diff, with a few context lines around it.
- the diff
- The change under review in unified diff format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
- dependency
- Something your code calls but doesn't own, such as a payment gateway, database, clock or another service.
Lesson goal: Recognise drive-by reformatting, renames, refactors, new abstractions, config tweaks and dependency bumps mixed into the requested change. Explain how they hide the real change, raise risk and make review and revert harder. ·
the whole lesson