Working in small steps
Plan before code, give each task clear acceptance criteria, keep every change small, and commit on a branch so any step can be undone.
- Recommended 8
Recommended
Plan before the agent writes code
AID-5For any change over one file or 30 changed lines, have the agent read the relevant code and write a plan before it edits anything.
Give every task acceptance criteria
AID-6State how you will know the task is done before the agent starts, as checks it can run itself.
Keep one task per session
AID-7Give each agent session one task, and start a fresh session for the next one.
Let the agent check its own work
AID-8Give the agent the means to see the result of its change. It runs the checks after its last edit, before it reports done.
Keep each change small
AID-9Keep every change small enough to review in one sitting, at most 400 changed lines.
Work on a branch and commit often
AID-10Let agents work only on a branch, and commit after each step that passes the checks.
Ask for the smallest change that works
AID-11Tell the agent to make the smallest change that meets the criteria, and to ask before adding dependencies, files or abstractions.
Tell the agent to stop and report when it is blocked
AID-70The instructions file tells the agent to stop and report when a task needs access, a credential or a target it does not have. It never works around the block.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/working-in-small-steps">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.