docs: add subagent iteration workflow to AGENTS.md

This commit is contained in:
2026-05-13 13:05:22 -04:00
parent b234ef2439
commit 34b26a4fde

View File

@@ -1,5 +1,27 @@
# AGENTS.md
## Subagent iteration workflow
When delegating work to subagents, follow this iteration loop:
1. **Specify** — define the task clearly: what files to change, what the
output should look like, what constraints apply (read-only vs. build)
2. **Receive** — review the subagent's output for correctness, edge cases,
style, and consistency with the existing codebase
3. **Critique** — send back specific issues: "Block 3 has an off-by-one
error", "The README doesn't explain the --package flag", etc.
4. **Iterate** — repeat steps 2-3 until zero issues remain. Do not accept
work that still has bugs, documentation gaps, or untested edge cases
5. **Accept** — only when you cannot find any more issues
Key principles:
- The subagent implements, the architect reviews. Do not switch roles.
- Every review pass must find fewer issues than the previous pass
- If a subagent introduces new bugs while fixing reported ones, reject
- Zero issues means zero: no style nits, no missing edge cases, no
unclear prose, no dead code
- This applies to code, documentation, tests, and config files equally
## Development Cycle (every change)
0. **Start the runtime** — boot the Lisp image that loads your project.