Files
Codewalkers/.planning/phases/12-phase-task-decomposition/12-01-PLAN.md
Lukas May 41f868294b docs(12): create phase plan
Phase 12: Phase-Task Decomposition
- 8 plans in 4 waves
- 4 parallel, 4 sequential
- Ready for execution
2026-01-31 21:03:07 +01:00

3.5 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous
phase plan type wave depends_on files_modified autonomous
12-phase-task-decomposition 01 execute 1
src/agent/types.ts
src/agent/schema.ts
src/db/schema.ts
src/db/repositories/drizzle/test-helpers.ts
true
Add decompose agent mode for breaking phases into individual tasks.

Purpose: Enable Architect agents to take a phase and produce a list of tasks with dependencies, types, and descriptions. This is the final piece of the initiative→phase→plan→task breakdown chain.

Output: AgentMode type extended with 'decompose', decompose output schema with Zod and JSON Schema versions, TaskBreakdown type.

<execution_context> @/.claude/get-shit-done/workflows/execute-plan.md @/.claude/get-shit-done/templates/summary.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md

Prior phase context (mode schemas from Phase 11)

@.planning/phases/11-architect-agent/11-01-SUMMARY.md

Source files to modify

@src/agent/types.ts @src/agent/schema.ts @src/db/schema.ts

Task 1: Extend AgentMode with 'decompose' src/agent/types.ts, src/db/schema.ts, src/db/repositories/drizzle/test-helpers.ts 1. In src/agent/types.ts: - Update AgentMode type to include 'decompose': `'execute' | 'discuss' | 'breakdown' | 'decompose'`
  1. In src/db/schema.ts:

    • Update agents table mode column enum to include 'decompose'
  2. In src/db/repositories/drizzle/test-helpers.ts:

    • Update CREATE_TABLES_SQL agents table to include 'decompose' in mode column enum npm run build passes, npm test passes AgentMode type includes 'decompose', database schema updated
Task 2: Create decompose output schema src/agent/schema.ts 1. Create TaskBreakdown type (similar to PhaseBreakdown): ```typescript const taskBreakdownSchema = z.object({ number: z.number().int().positive(), name: z.string().min(1), description: z.string(), type: z.enum(['auto', 'checkpoint:human-verify', 'checkpoint:decision', 'checkpoint:human-action']).default('auto'), dependencies: z.array(z.number().int()).optional().default([]), }); export type TaskBreakdown = z.infer; ```
  1. Create decomposeOutputSchema discriminated union:

    • 'questions' status with questions array (for clarification)
    • 'decompose_complete' status with tasks array
    • 'unrecoverable_error' status with error string
  2. Create decomposeOutputJsonSchema (JSON Schema version for Claude CLI --json-schema)

  3. Export all types and schemas from the file npm run build passes, types exported correctly decomposeOutputSchema and TaskBreakdown type exported, JSON schema version available

Before declaring plan complete: - [ ] npm run build succeeds - [ ] npm test passes all tests - [ ] AgentMode type includes 'decompose' - [ ] decomposeOutputSchema exported from src/agent/schema.ts - [ ] decomposeOutputJsonSchema exported from src/agent/schema.ts - [ ] TaskBreakdown type exported

<success_criteria>

  • All tasks completed
  • All verification checks pass
  • No errors or warnings introduced
  • Decompose mode schema ready for manager implementation </success_criteria>
After completion, create `.planning/phases/12-phase-task-decomposition/12-01-SUMMARY.md`