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.
A clean, focused change
card 1 of 6
It works. Is it mergeable?
builds on: Scope creep and unasked-for changes in a diff, What 'done' means for a change
You asked the agent to make invoice totals round half-up to the cent. It reports done, tests green. The diff holds the fix: an import and two lines. It also holds a `print`, a commented-out old line, a helper nothing calls and a new file `scratch_test_round.py`. The commit message reads "Update invoice.py". The code works. Would you merge it as is?
Terms on this card
- commit message
- Text stored with a git commit: a short subject line, then an optional body explaining the change.
- tests green
- All tests pass.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- diff
- The set of line changes between two versions of the code: removed lines start with '-', added lines with '+'.
- green
- A test or check that passes.
Lesson goal: Recognise a mergeable change: one purpose per commit, no debug prints, commented-out code, dead helpers or stray files, it follows the codebase's conventions, and the commit message explains why the change was made. ·
the whole lesson