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 1 of 6
A one-line fix in a nine-file diff
builds on: You own every line the agent writes
You asked the agent to make page numbers start at 1 instead of 0. That should be a one-line fix. The diff touches 9 files: imports re-sorted, a helper renamed, a new `Paginator` class, `.prettierrc` edited, the lockfile bumped. The summary says "Fixed pagination and tidied up a little." Tests are green.
Which of these changes did you ask for? And what will the rest cost you?
Terms on this card
- lockfile
- A generated file (e.g. package-lock.json, Cargo.lock) recording the exact version of every dependency installed.
- `.prettierrc`
- Config file for Prettier, a JS/TS code formatter. Its settings decide how every file is laid out when formatted.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- pagination
- Splitting a long list into numbered pages of fixed size, returning one page per request.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
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