-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Wave Planner - file-aware parallel agent orchestration #131
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When DevPlan generates tasks executed by parallel agents within a wave, agents may modify the same files simultaneously, causing merge conflicts. Currently wave planning is ad-hoc with no file dependency analysis.
Observed in: g-hive Wave 3.4.2 - parallel agents created merge conflicts on shared files.
Proposed Solution
Add a plan_waves MCP tool that:
- Analyzes task-to-file dependencies - infer which files each task will touch
- Assigns file ownership - prevent parallel contention
- Generates orchestrated wave plans - explicit constraints for agent spawners
New Tool: plan_waves
Input:
- Task list with descriptions
- Project file tree
- Max parallel agents
- Conflict strategy (sequence/partition/delegate)
Output:
- Wave assignments with file ownership per agent
- Dependency ordering for shared files
- Conflict risk assessment
Conflict Strategies
sequence: Tasks touching shared files run sequentially (safe, slower)partition: Split shared files if semantically possibledelegate: Flag conflicts for human/integration agent resolution
Implementation Phases
- Static Analysis - Pattern matching, AST analysis for file dependencies
- Opus-Assisted - LLM inference for ambiguous tasks
- Orchestration Output - Structured JSON for agent spawners
Success Criteria
- Zero merge conflicts when following wave plan
- Maximum parallelization where file deps allow
- Clear audit trail of file ownership
Spec
Full specification: docs/wave-planner-spec.md
Lesson learned from g-hive development - parallel agents within same wave need file-aware orchestration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request