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 6 of 6
Every element closes one gap
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
First decide what to hand over at all. Then give the agent:
- a goal with its reason and non-goals
- a red, protected test
- the context it can't find
- a plan checkpoint
- explicit rules
- small slices
Each one closes a gap the agent would otherwise fill with a confident guess.
Terms on this card
- context
- Everything in the model's input for the current step: your messages, instruction files, files it has read and tool outputs.
- non-goals
- Things the task explicitly must not do or change, stated so the agent doesn't guess they are in scope.
- slices
- Small end-to-end pieces of a change, one concern each, reviewed and committed before the next one starts.
- red
- A test or check that is currently failing.
- the agent
- The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
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