From 7dffdc4e773fff2ac19e4d0c65611ca7e522ffe4 Mon Sep 17 00:00:00 2001 From: Hugo Nijhuis Date: Fri, 9 Jan 2026 17:26:21 +0100 Subject: [PATCH] Add review loop to spawn-issues agent prompt The inline prompt in spawn-issues.md was missing the review loop that was added to issue-worker/agent.md. Now includes: - Step 7: Spawn code-reviewer synchronously, fix and re-review if needed - Step 9: Concise final summary output Co-Authored-By: Claude Opus 4.5 --- commands/spawn-issues.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/commands/spawn-issues.md b/commands/spawn-issues.md index 6ecef9a..9e3b812 100644 --- a/commands/spawn-issues.md +++ b/commands/spawn-issues.md @@ -85,10 +85,29 @@ Instructions from @agents/issue-worker/agent.md: 6. Create PR: tea pulls create --title "[Issue #] " --description "Closes #<NUMBER>\n\n<summary of changes>" + Capture the PR number from the output. -7. Cleanup (ALWAYS do this): +7. Review loop: + Spawn code-reviewer agent SYNCHRONOUSLY (run_in_background: false) to review the PR: + Task tool with subagent_type: "code-reviewer", prompt: "Review PR #<PR_NUMBER>. Working directory: <WORKTREE_PATH>" + + If review says "needs work": + - Address the feedback + - Commit and push fixes + - Re-run the review + - Repeat until approved (max 3 iterations) + +8. Cleanup (ALWAYS do this, even if earlier steps failed): cd <REPO_PATH> && git worktree remove ../<REPO_NAME>-issue-<NUMBER> --force +9. Final output - ONLY output this concise summary (5-10 lines max): + Issue #<NUMBER>: <title> + Status: <completed|partial|blocked> + PR: #<PR_NUMBER> + Changes: <1-2 sentence summary> + Review: <approved|needs-work|skipped> + Notes: <any blockers or important details> + Work autonomously. Make judgment calls on ambiguous requirements. If blocked, note it in the PR description. ```