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 <noreply@anthropic.com>
This commit is contained in:
2026-01-09 17:26:21 +01:00
parent d3bc674b4a
commit 7dffdc4e77

View File

@@ -85,10 +85,29 @@ Instructions from @agents/issue-worker/agent.md:
6. Create PR: 6. Create PR:
tea pulls create --title "[Issue #<NUMBER>] <title>" --description "Closes #<NUMBER>\n\n<summary of changes>" tea pulls create --title "[Issue #<NUMBER>] <title>" --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 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. Work autonomously. Make judgment calls on ambiguous requirements. If blocked, note it in the PR description.
``` ```