Phase 12: Phase-Task Decomposition - 8 plans in 4 waves - 4 parallel, 4 sequential - Ready for execution
4.1 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous
| phase | plan | type | wave | depends_on | files_modified | autonomous | |||
|---|---|---|---|---|---|---|---|---|---|
| 12-phase-task-decomposition | 03 | execute | 2 |
|
|
true |
Purpose: Enable spawning agents in decompose mode with the correct JSON schema. Agents in this mode break phases into tasks.
Output: Mode-aware agent spawning handles 'decompose' mode with decomposeOutputJsonSchema.
<execution_context>
@/.claude/get-shit-done/workflows/execute-plan.md
@/.claude/get-shit-done/templates/summary.md
</execution_context>
Depends on Plan 01 for decompose schema
@.planning/phases/12-phase-task-decomposition/12-01-SUMMARY.md
Pattern reference from Phase 11 (mode handling)
@.planning/phases/11-architect-agent/11-03-SUMMARY.md
Source files to modify
@src/agent/manager.ts @src/agent/schema.ts
Task 1: Update ClaudeAgentManager for decompose mode src/agent/manager.ts 1. Import decomposeOutputSchema and decomposeOutputJsonSchema from schema.ts-
Update getJsonSchemaForMode() to handle 'decompose':
case 'decompose': return decomposeOutputJsonSchema; -
Add handleDecomposeOutput() method following pattern of handleBreakdownOutput():
- Parse output with decomposeOutputSchema
- Handle 'decompose_complete' status → emit agent:stopped with reason: 'decompose_complete'
- Handle 'questions' status → emit agent:stopped with reason: 'questions'
- Handle 'unrecoverable_error' → emit agent:stopped with reason: 'error'
-
Update handleAgentCompletion() switch to call handleDecomposeOutput for mode: 'decompose' npm run build passes ClaudeAgentManager handles decompose mode with correct schema and completion handling
-
Add tasks field to scenario result type for decompose_complete:
tasks?: Array<{ number: number; name: string; description: string; type: string; dependencies: number[] }>; -
Update handleAgentCompletion() to handle decompose scenarios:
- If status is 'decompose_complete', emit agent:stopped with reason: 'decompose_complete'
- Include tasks in the output event if present
-
Update resume() to handle decompose mode similarly to breakdown mode npm run build passes, npm test passes MockAgentManager handles decompose mode scenarios for E2E testing
reason: 'completed' | 'stopped' | 'error' | 'questions' | 'context_complete' | 'breakdown_complete' | 'decompose_complete';
This follows the pattern established in Phase 11 for context_complete and breakdown_complete. npm run build passes AgentStoppedEvent reason includes 'decompose_complete'
Before declaring plan complete: - [ ] npm run build succeeds - [ ] npm test passes all tests - [ ] ClaudeAgentManager.getJsonSchemaForMode returns decomposeOutputJsonSchema for 'decompose' - [ ] ClaudeAgentManager.handleDecomposeOutput exists and handles all statuses - [ ] MockAgentManager handles decompose_complete scenarios - [ ] AgentStoppedEvent.reason includes 'decompose_complete'<success_criteria>
- All tasks completed
- All verification checks pass
- No errors or warnings introduced
- Decompose mode fully supported in both managers </success_criteria>