feat: Add cost-aware parallel execution with execution_group support

- Schema: Add execution_group and task-level complexity fields
- Executor: Hybrid dependency analysis (explicit + file conflicts)
- Executor: Cost-based batching (MAX_BATCH_COST=8, Low=1/Medium=2/High=4)
- Executor: execution_group priority for explicit parallel grouping
- Planner: Add guidance for execution_group and complexity fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-28 12:45:10 +08:00
parent 98b72f086d
commit cde17bd668
3 changed files with 83 additions and 43 deletions

View File

@@ -341,7 +341,7 @@ const schema = Bash(`cat ~/.claude/workflows/cli-templates/schemas/plan-json-sch
const plan = {
summary: "...",
approach: "...",
tasks: [...], // Follow Task Grouping Rules below
tasks: [...], // Each task: { id, title, scope, ..., depends_on, execution_group, complexity }
estimated_time: "...",
recommended_execution: "Agent",
complexity: "Low",
@@ -412,6 +412,8 @@ Generate plan.json with:
3. **Substantial tasks**: Each task should represent 15-60 minutes of work
4. **True dependencies only**: Only use depends_on when Task B cannot start without Task A's output
5. **Prefer parallel**: Most tasks should be independent (no depends_on)
6. **Explicit parallel groups**: Assign same `execution_group` ID (e.g., "group-1") to tasks that can run concurrently; null for others
7. **Task complexity**: Set `complexity` (Low/Medium/High) for workload balancing - executor uses cost units (1/2/4)
## Execution
1. Read ALL exploration files for comprehensive context