Your first real session, end to end
A complete worked session on a small bug fix, with the reasoning for each move.
Take the small bug fix from your task list. We will walk the five-step shape from Lesson 2.8. Type along; the point is the rhythm, not the bug.
OPEN — six lines, before anything else
Bug: the CSV importer drops rows whose date column uses DD/MM/YYYY. Repro: tests/fixtures/euro-dates.csv, currently no test covers it. Scope: src/import/parse-row.ts and its test file only. Do not touch the schema. Constraint: keep the existing ISO behaviour working. Done when: a new test covers both formats and 'npm run check' passes. Start by reading the two files. Do not edit anything yet.
Every line is doing work. The scope line prevents the sprawl that turns a one-file fix into a nine-file diff. The done line gives the agent a termination condition it can verify without you. The last line separates loading from acting, which is what makes the next step possible.
LOAD — point, do not dump
The agent reads two files. Roughly 5k tokens. Compare with what "explore the importer" would have cost: eight files, a directory listing, and probably the schema it was told not to touch.
PLAN — the cheapest correction point
Describe your fix in under 10 lines: what changes, what the new test asserts, and what could break. No code yet.
If the plan proposes a regex, or a new dependency, or "normalise all dates at the boundary", you catch it here for the cost of one sentence. This is where the session is won or lost.
WORK — let it close its own loop
Implement that. Then run 'npm run check' and fix anything it reports. Report the final check output.
Note what you did not do: you did not run the tests yourself and paste failures back. Each round-trip through you costs minutes and context. The agent's self-correction loop is the main productivity mechanism in this whole course.
CLOSE — review, commit, clear
git diff git add -p git commit -m "fix(import): accept DD/MM/YYYY dates in CSV rows" # then clear the session
Total: four messages, one review, one commit, and a context window that never exceeded about 15k tokens. That is the shape you are training.
Watch out
The strong temptation at CLOSE is "while you are in there, also…". Resist it. The second task gets the first task’s context, the diff stops being reviewable as one unit, and your commit history stops telling a story. Clear, then start the next one.
Try it
Run your small bug fix exactly this way. Log the turn count and the final token total. Then run your next bug the way you normally would, and compare. The comparison is the lesson.
Takeaways
- A scope line and a done line do more work than any amount of prompt polish.
- Separate loading from acting so you get a plan you can correct cheaply.
- Let the agent run the check and fix its own failures — do not be the loop.
Why does "do not edit anything yet" belong in the opening message?
Because without it the agent typically reads and edits in one turn, and you lose the plan checkpoint entirely. Splitting load from act is what creates a cheap moment to redirect — before there is a diff to argue with.
A course by Pieter Zandbergen