7.0 KiB
7.0 KiB
description, argument-hint
| description | argument-hint | |
|---|---|---|
| Implement multiple GitHub issues in parallel with dependency analysis |
|
Implement Multiple GitHub Issues in Parallel
Execute multiple GitHub issues concurrently, respecting dependencies between them.
Usage
/implement-issues-parallel 5 12 18 23
Workflow
Phase 1: Analysis & Dependency Detection
-
Fetch All Issues
for issue in $ARGUMENTS; do gh issue view $issue --json title,body,labels done -
Analyze Dependencies
For each issue, check:
- Does it reference other issues in the batch? (e.g., "Depends on #5", "Blocks #12")
- Does it modify files that other issues also modify?
- Does it require features from other issues?
-
Build Dependency Graph (ASCII)
┌─────────────────────────────────────────────────────────────┐ │ EXECUTION PLAN FOR ISSUES: 5, 12, 18, 23 │ └─────────────────────────────────────────────────────────────┘ ┌──────────┐ │ Issue #5 │ (Database migration) └────┬─────┘ │ ├────────┐ │ │ ▼ ▼ ┌──────────┐ ┌──────────┐ │Issue #12 │ │Issue #18 │ (Both need DB changes from #5) └────┬─────┘ └────┬─────┘ │ │ └────────┬───┘ │ ▼ ┌──────────┐ │Issue #23 │ (Needs both #12 and #18) └──────────┘ WAVE 1 (Parallel): #5 WAVE 2 (Parallel): #12, #18 WAVE 3 (Parallel): #23 Total Estimated Time: ~45-60 minutes -
User Confirmation
Show the execution plan and ask:
Execute this plan? (yes/modify/cancel) - yes: Start execution - modify: Adjust dependencies or order - cancel: Abort
Phase 2: Parallel Execution
-
Execute by Waves
For each wave:
- Launch issue-implementer agents in parallel
- Wait for all agents in wave to complete
- Verify no conflicts before proceeding to next wave
Example for Wave 2:
# Launch in parallel Task issue-implementer(12) & Task issue-implementer(18) & # Wait for both to complete wait -
Conflict Detection Between Waves
After each wave completes:
- Check for file conflicts between branches
- Verify no overlapping changes
- Report any conflicts to user before continuing
-
Progress Tracking
┌──────────────────────────────────────────────────────┐ │ PROGRESS: Wave 2/3 │ ├──────────────────────────────────────────────────────┤ │ ✅ Wave 1: #5 (Complete) │ │ ⏳ Wave 2: #12 (in_progress) | #18 (in_progress) │ │ ⏸ Wave 3: #23 (pending) │ └──────────────────────────────────────────────────────┘
Phase 3: Review & Merge Coordination
-
Sequential Review
Even though implementation was parallel, reviews happen sequentially to avoid reviewer confusion:
For each issue in dependency order (5, 12, 18, 23): - Launch review-orchestrator(issue) - Wait for approval - If approved, continue to next - If changes requested, pause pipeline -
Coordinated Merging
After all reviews pass:
For each issue in dependency order: - Launch issue-merger(issue) - Verify merge successful - Update remaining branches if needed
Phase 4: Completion Report
┌────────────────────────────────────────────────────────────┐
│ PARALLEL EXECUTION COMPLETE │
├────────────────────────────────────────────────────────────┤
│ Issues Implemented: 4 │
│ Total Time: 52 minutes │
│ Time Saved vs Sequential: ~78 minutes (60% faster) │
│ │
│ Results: │
│ ✅ #5 - Merged (commit: abc123) │
│ ✅ #12 - Merged (commit: def456) │
│ ✅ #18 - Merged (commit: ghi789) │
│ ✅ #23 - Merged (commit: jkl012) │
└────────────────────────────────────────────────────────────┘
Dependency Detection Rules
Explicit Dependencies (highest priority):
- Issue body contains: "Depends on #X", "Requires #X", "Blocked by #X"
- Issue references another issue with keywords: "After #X", "Needs #X"
Implicit Dependencies (inferred):
- Both modify the same database table (check for migration files)
- One adds a function, another uses it (check for new exports/imports)
- One modifies an API endpoint, another calls it
File Conflict Analysis:
- Compare
files_changedfrom each issue's implementation manifest - If overlap > 30%, consider creating dependency
- Ask user to confirm inferred dependencies
Error Handling
If an Issue Fails in a Wave:
- Continue other issues in current wave
- Mark dependent issues as "blocked"
- Report failure to user
- Ask: retry failed issue / skip dependent issues / abort all
If Review Requests Changes:
- Pause pipeline
- Show which issues are affected
- Ask: address feedback now / continue with others / abort
If Merge Conflict:
- Attempt automatic resolution if simple
- If complex, pause and show conflict
- Ask user to resolve manually or abort
Limitations
- Maximum 10 issues per batch (to avoid complexity)
- All issues must be from the same repository
- Cannot mix issues requiring different environments
- Review coordination may still take time despite parallel implementation
Success Criteria
- All issues successfully merged OR clear failure report
- No merge conflicts left unresolved
- All tracking systems updated correctly
- Worktrees cleaned up properly