---
phase: 14-parallel-phase-execution
plan: 03
type: execute
wave: 2
depends_on: ["14-01", "14-02"]
files_modified:
- src/dispatch/phase-dispatch.ts
- src/dispatch/types.ts
- src/dispatch/index.ts
autonomous: true
---
Create PhaseDispatchManager port interface for dependency-ordered phase execution.
Purpose: Enable queuing and dispatching phases based on their dependencies.
Output: PhaseDispatchManager interface with queue/dispatch operations.
@~/.claude/get-shit-done/workflows/execute-plan.md
@~/.claude/get-shit-done/templates/summary.md
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/14-parallel-phase-execution/14-01-SUMMARY.md
@.planning/phases/14-parallel-phase-execution/14-02-SUMMARY.md
# Reference implementations:
@src/dispatch/types.ts
@src/dispatch/manager.ts
Task 1: Define PhaseDispatchManager port interface
src/dispatch/types.ts
Add types for phase dispatch:
QueuedPhase interface:
- phaseId: string
- initiativeId: string
- queuedAt: Date
- dependsOn: string[] (phase IDs)
PhaseDispatchResult interface:
- success: boolean
- phaseId: string
- reason?: string (failure reason)
PhaseDispatchManager port interface:
- queuePhase(phaseId: string): Promise
- getNextDispatchablePhase(): Promise
- dispatchNextPhase(): Promise
- completePhase(phaseId: string): Promise
- blockPhase(phaseId: string, reason: string): Promise
- getPhaseQueueState(): Promise<{ queued: QueuedPhase[], ready: QueuedPhase[], blocked: Array<{phaseId: string, reason: string}> }>
Follow exact patterns from DispatchManager for tasks.
npx tsc --noEmit passes
PhaseDispatchManager interface defined with all methods
Task 2: Export phase dispatch types
src/dispatch/index.ts
Export new types from dispatch module:
- QueuedPhase
- PhaseDispatchResult
- PhaseDispatchManager
npx tsc --noEmit passes
Phase dispatch types exported from dispatch module
Before declaring plan complete:
- [ ] `npm run build` succeeds without errors
- [ ] `npm test` passes all tests
- [ ] PhaseDispatchManager importable from src/dispatch
- All tasks completed
- All verification checks pass
- Interface follows hexagonal architecture (port pattern)
- Methods mirror DispatchManager for consistency