Agent Wranglers

AID-6Recommended

Give every task acceptance criteria

State how you will know the task is done before the agent starts, as checks it can run itself.

How to do it

Write the expected behaviour as tests, example inputs and outputs, or a command that must pass. Ask the agent to write the failing test first, then the code. Vague goals such as "make it better" produce changes nobody can verify. The agent then runs these checks itself, as Let the agent check its own work says.

Examples

Plain text example

Task: refunds over 500 EUR need a second approver.
Done when:
- test "refund of 501 EUR waits for approval" passes
- test "refund of 500 EUR is paid at once" passes
- ./check.sh passes

How to check

Each task has at least one runnable test or command that fails before the change and passes after it.

Sources

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/acceptance-criteria">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.