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.
Give it an executable definition of done
card 2 of 6
Pin the target before the agent aims
builds on: See it fail: red before green and break-it checks, Agents optimise the signal they can see
The agent takes the shortest path to the signal it can see. If it writes the test along with the fix, the test can encode its own misreading of the bug. If a test is in the way, it can edit it until green.
**Later cost:** the bug ships behind a passing suite that now asserts the wrong behaviour.
If you pin the target first, the only cheap route to green is changing real behaviour.
Terms on this card
- green
- A test or check that is passing.
- suite
- Short for test suite: the full set of tests in a project, usually run together.
- Later cost
- The concrete damage a shortcut does after merge, such as a hidden bug or a maintenance burden.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
Lesson goal: Provide or first agree on a failing test or reproduction script that the agent works against, and protect that test from being edited. Explain why this narrows how far the agent can game the proxy signal. ·
the whole lesson