The Idea
Use dependency-aware “waves” to parallelize multi-task implementations, where each wave contains tasks that can run concurrently.
Context
During git workflow plugin enhancement, the plan agent created a 4-wave execution strategy:
Wave 1 (Start Immediately):
└── Task 1: Extend State & Config (foundation)
Wave 2 (After Wave 1):
├── Task 2: Add event hook [depends: 1]
├── Task 3: Add PR review checking [depends: 1]
└── Task 4: Add commit limit enforcement [depends: 1]
Wave 3 (After Wave 2):
├── Task 5: Enhance issue tool [depends: 2]
└── Task 6: Add PR tool [depends: 2,3,4]
Wave 4 (After Wave 3):
└── Task 7: Update documentation [depends: 5,6]
Critical Path: Task 1 → Task 2 → Task 6 → Task 7
Parallel Speedup: ~35% faster than sequential
Raw Exchange
Plan Agent Output: “7 Tasks organized into 4 parallel waves… Critical Path: Task 1 → Task 2 → Task 6 → Task 7”
Execution Reality: Wave 2 tasks (2,3,4) all modified same file, so done sequentially to avoid conflicts. Wave 3 and 4 executed as planned.
Key Insight
Theoretical parallelism ≠ practical parallelism
Even when tasks are logically independent (different features), they may have:
- File conflicts: Multiple tasks editing same file
- State conflicts: Shared runtime state
- Test conflicts: Overlapping test coverage
The plan agent identified Wave 2 as parallelizable, but execution correctly serialized them because they all modified git-workflow-enforcer.ts.
Expansion Potential
- Blog post: “Wave-Based Task Orchestration for AI Agents”
- Template: Reusable wave planning structure for complex implementations
- Tool improvement: Auto-detect file conflicts in parallel waves