Files
Codewalkers/.planning/phases/14-parallel-phase-execution/14-01-PLAN.md
Lukas May 4b454cadf3 docs(14): create phase plans for parallel phase execution
Phase 14: Parallel Phase Execution
- 8 plans in 5 waves
- 4 parallel in Wave 1, 3, 5
- Adds phase_dependencies schema (mirrors task_dependencies)
- PhaseDispatchManager port and adapter
- tRPC procedures and CLI commands
- Unit tests and E2E tests
2026-02-02 11:02:39 +01:00

3.2 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous
phase plan type wave depends_on files_modified autonomous
14-parallel-phase-execution 01 execute 1
src/db/schema.ts
src/db/repositories/phase-repository.ts
src/db/repositories/drizzle/phase.ts
true
Add phase dependencies to database schema and repository following the task_dependencies pattern.

Purpose: Enable tracking which phases depend on which other phases, prerequisite for parallel execution. Output: phase_dependencies table, PhaseRepository with dependency methods.

<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

Reference implementations:

@src/db/schema.ts @src/db/repositories/task-repository.ts @src/db/repositories/drizzle/task.ts

Task 1: Add phase_dependencies table to schema src/db/schema.ts Add phase_dependencies table mirroring task_dependencies: - id (text, primary key) - phaseId (text, FK to phases.id, cascade delete) - dependsOnPhaseId (text, FK to phases.id, cascade delete) - createdAt (integer timestamp)

Add relations for phases:

  • dependsOn: many(phaseDependencies, relationName: 'dependentPhase')
  • dependents: many(phaseDependencies, relationName: 'dependencyPhase')

Add phaseDependenciesRelations with:

  • phase: one(phases, dependentPhase)
  • dependsOnPhase: one(phases, dependencyPhase)

Export PhaseDependency and NewPhaseDependency types. npx tsc --noEmit passes phase_dependencies table defined with proper FK relations and types exported

Task 2: Add dependency methods to PhaseRepository src/db/repositories/phase-repository.ts, src/db/repositories/drizzle/phase.ts Add to PhaseRepository interface: - createDependency(phaseId: string, dependsOnPhaseId: string): Promise - getDependencies(phaseId: string): Promise (returns IDs of phases this phase depends on) - getDependents(phaseId: string): Promise (returns IDs of phases that depend on this phase)

Implement in DrizzlePhaseRepository:

  • createDependency: insert into phase_dependencies with nanoid
  • getDependencies: select dependsOnPhaseId where phaseId = input
  • getDependents: select phaseId where dependsOnPhaseId = input

Follow exact patterns from DrizzleTaskRepository.createDependency. npx tsc --noEmit passes; npm test -- --grep "phase" passes PhaseRepository has dependency methods, Drizzle adapter implements them

Before declaring plan complete: - [ ] `npm run build` succeeds without errors - [ ] `npm test` passes all tests - [ ] Phase dependency types exported from schema - [ ] PhaseRepository interface has 3 new methods - [ ] DrizzlePhaseRepository implements all methods

<success_criteria>

  • All tasks completed
  • All verification checks pass
  • Schema matches task_dependencies pattern
  • Repository follows hexagonal architecture </success_criteria>
After completion, create `.planning/phases/14-parallel-phase-execution/14-01-SUMMARY.md`