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.
Set up a task an agent can finish well
card 2 of 6
Setup closes gaps before the agent guesses
builds on: Choose what to hand to an agent, Write a task the agent can finish, Give the context it can't find, Size tasks so each step is checkable, Ask for a plan before code, Give it an executable definition of done, Rule out shortcuts explicitly
The agent works toward what it can see: your words, the files it opens, and signals like *tests green*. It fills every gap in the ticket with a plausible guess: what "tidy" means, which helper to use, what counts as done. **Later cost:** one big mixed diff. A behaviour change hides inside the tidy-up, and the filter is checked only by tests the agent chose.
Terms on this card
- green
- A test or check that is currently passing.
- diff
- The change under review in unified format: '-' lines removed, '+' lines added, unprefixed lines are unchanged context.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
- helper
- A small function that does one common job, such as formatting or checking a value, so other code can call it instead of repeating it.
- tests green
- All tests pass.
Lesson goal: Decide whether and how to delegate a real request, then turn it into a well-sized task: a clear goal and acceptance test, the right context, a plan step, explicit guardrails and small checkable increments. Explain which failure mode each element prevents. ·
the whole lesson