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 3 of 6
Six setup moves and what each prevents
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
1. **Decide:** rate each part on verify cost, unwritten context, reversibility and security. Keep or split the parts that rate badly → prevents *delegating what nobody can check*.
2. **Goal, reason, non-goals** → prevents *guessed intent*.
3. **Red, protected test** → prevents *gaming the proxy signal*.
4. **Context** (files, helpers, commands) → prevents *reinvented code and unrun checks*.
5. **Plan first** → prevents *wrong assumptions found late*.
6. **Guardrails + slices** → prevents *workarounds, drift and huge diffs*.
Terms on this card
- proxy signal
- A visible stand-in for the real goal, such as tests green or it compiles, that the agent can satisfy without achieving the goal.
- 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.
- guardrails
- Rules stated up front, such as no test edits, no new dependencies, stop when blocked, that limit how the agent may reach the goal.
- slices
- Small end-to-end pieces of a change, one concern each, reviewed and committed before the next one starts.
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