diff --git a/commands/spawn-issues.md b/commands/spawn-issues.md index 574b601..a1cebca 100644 --- a/commands/spawn-issues.md +++ b/commands/spawn-issues.md @@ -83,9 +83,9 @@ Task tool with: Track state for each issue: ``` issues = { - 42: { task_id: "xxx", stage: "implementing", pr: null, review_iterations: 0 }, - 43: { task_id: "yyy", stage: "implementing", pr: null, review_iterations: 0 }, - 44: { task_id: "zzz", stage: "implementing", pr: null, review_iterations: 0 }, + 42: { task_id: "xxx", stage: "implementing", pr: null, branch: null, review_iterations: 0 }, + 43: { task_id: "yyy", stage: "implementing", pr: null, branch: null, review_iterations: 0 }, + 44: { task_id: "zzz", stage: "implementing", pr: null, branch: null, review_iterations: 0 }, } ``` @@ -181,15 +181,46 @@ implementing → (worker done) → reviewing → (approved) → DONE ### Step 5: Spawn Reviewers and Fixers +When spawning reviewers, pass the PR number AND branch name from the issue worker result. +Each reviewer/fixer uses its own worktree for isolation - this prevents parallel agents from interfering with each other. + **Code Reviewer Prompt:** ``` -Review PR # in . +You are a code-reviewer agent. Review PR # autonomously. -Output EXACTLY this format: -REVIEW_RESULT -pr: -verdict: -summary: <1-2 sentences> +Context: +- Repository path: +- Repository name: +- PR number: +- PR branch: + +Process: +1. Setup worktree for isolated review: + cd && git fetch origin + git worktree add ../-review- origin/ + cd ../-review- + +2. Get PR details: tea pulls --comments + +3. Review the diff: git diff origin/main...HEAD + +4. Analyze changes for: + - Code quality and style + - Potential bugs or logic errors + - Test coverage + - Documentation + +5. Post review comment: tea comment "" + +6. Cleanup: cd && git worktree remove ../-review- --force + +7. Output EXACTLY this format: + REVIEW_RESULT + pr: + verdict: + summary: <1-2 sentences> + +Work autonomously. Be constructive but thorough. ``` **PR Fixer Prompt:** (see below)