1 line
2.1 KiB
JSON
1 line
2.1 KiB
JSON
{"content": "---\nname: builder-reviewer-loop\ndescription: Passes code between a builder and an independent reviewer subagent until the review has no blocking findings and tests pass.\ncategory: engineering\ninterval: 15m\nstop-condition: The reviewer reports zero blocking findings and the full test suite passes.\ncomponents: [agent:expert-advisors/architect-review, agent:development-team/test-runner, command:git-workflow/pr-review]\ntags: [code-review, subagents, quality, loop]\n---\n\n# Builder–Reviewer Loop\n\n> **Loop Engineering** — separate the *builder* from the *reviewer* so the agent doesn't grade its own work. Code bounces between them until it genuinely passes.\n\n## 🎯 Goal\nImplement a change, then have an **independent reviewer subagent** critique it; iterate on the findings until the review is clean and tests are green.\n\n## ⏱️ Schedule\nSuggested interval: `15m` (or run until done on a single feature).\n\n## ▶️ Run it\n```\n/loop 15m \"Implement the next slice of the feature. Then hand it to an independent reviewer subagent for an adversarial review. Address every blocking finding and re-run tests. Continue until the reviewer has no blocking findings and the suite passes.\"\n```\n\n## 🔁 Iteration steps\n1. **Build** — implement the next slice of work.\n2. **Review** — the `architect-review` agent inspects the diff for correctness, design and risk.\n3. **Plan** — collect blocking findings into a fix list.\n4. **Act** — address each finding; re-run the suite with `test-runner`.\n5. **Observe** — re-review with `/pr-review`; if blocking findings remain, loop again.\n\n## 🛑 Stopping condition\nReviewer reports zero blocking findings **and** all tests pass.\n\n## 🧩 Referenced components\n- `agent:expert-advisors/architect-review` — the independent reviewer (no self-grading).\n- `agent:development-team/test-runner` — runs the suite each pass.\n- `command:git-workflow/pr-review` — structured review checklist.\n\n## 💡 Example\nThe builder ships a new caching layer; the reviewer flags a race condition and a missing eviction test. The loop fixes both, re-reviews, and exits clean.\n"} |