Skip to content
docs

The developer's role

When the agent writes the code, less of your time goes into typing it and more into three things: framing the task precisely, choosing the right tool, and checking the result.

To choose, you need to know what exists: which approaches there are, which skills and MCP servers solve your problem, and where the agent is weak. Otherwise all you can do is accept whatever it proposes.

Checking matters because the agent delivers a correct result and a wrong one with the same confidence.

StageYour part
Before you startThe scope of the task: what is in, what is out, what the constraints are
FramingHow to check the result: a test, a build, a metric, a reference
Along the wayCorrecting course early, before the context fills up with failed attempts
At the endChecking against the task, not the diff: is what you asked for actually solved

On a task larger than one file, start with a conversation: let the agent ask questions until no open choices remain.

I want [short description]. Interview me with the AskUserQuestion tool: implementation, interface,
edge cases, tradeoffs. Skip the obvious and dig into the hard parts.
When we have covered everything, write the spec to SPEC.md.

What separates a good interview from a bad one is the questions. If the agent asks about things already visible in the code, the interview is empty. The valuable questions are the ones you do not have an answer to yet: what to do on a repeated request, who owns the data, which requirement wins in a conflict.

The outcome should be a spec that names the files and interfaces, lists explicitly what is out of scope, and ends with a verification step. It is best carried out in a new session with a clean context.

Ready-made skills for this kind of interview: grill-me from mattpocock/skills and brainstorming from superpowers. See Recommended extensions.

Terminology is the second source of mismatches. If an entity has three different names, one in your head, one in the task, and one in the code, the agent will keep asking or guessing.

Write down the domain vocabulary where the agent will read it: in WAIBEE.md or in a separate file included with @path. You gain twice: explanations get shorter, which makes them cheaper in context, and names in the code stop drifting apart. Keep decisions you have made, with their reasons, next to it so the agent does not reinvent them.

What you checkTypical agent mistake
Is it the right taskA related task was done instead; the spec was skimmed
Edge casesEmpty input, a timeout, a retry, concurrent access
Trust boundariesNo input validation; permissions checked at the wrong layer
Cause, not symptomAn exception swallowed; a retry layered over the bug
ReuseA new helper written where a ready one sits next to it
TestsThe test is fitted to the implementation: it checks calls instead of behavior
ScopeNeighboring files rewritten along the way, without being asked
Unneeded abstractionsAn interface with one implementation, a config for a constant
Evidence”Done” claimed without test or command output

The last item is the cheapest to apply. Ask for output rather than a report: what was run and what came back. Reading output is faster than rechecking everything yourself.

The agent that wrote the code is a poor reviewer: it defends its own solution. Hand the review to a subagent or a second session whose context holds only the diff and the criteria. Ready-made wording is in Example prompts.

One caveat: a reviewer asked to find problems always finds them, even in sound work. If you chase every comment, you get the opposite of what you want: extra layers, defensive code, and tests for impossible cases. State plainly what counts as a finding, and mark everything else as optional.

Tests and metrics check what is written into them. These slip past:

  • The task is solved neatly, but it is the wrong task.
  • The solution is correct, but it does not fit where the project is heading.
  • The metric improved through something the metric does not cover. See Autoresearch.
  • The cost of maintenance: the code works, but in six months nobody will be able to make sense of it.