- Created MILESTONES.md with v1.0 and v1.1 entries
- Evolved PROJECT.md with validated requirements and current state
- Reorganized ROADMAP.md with collapsed v1.1 milestone
- Created milestone archive: milestones/v1.1-ROADMAP.md
- Updated STATE.md for next milestone planning
- Queue state survives in database (source of truth)
- In-progress task recoverable after agent crash
- Blocked task state persists and can be unblocked
- Merge queue state recoverable
- Question enters waiting state and completes after resume
- Question surfaces as structured PendingQuestion
- Agent resumes with answer and completes successfully
- Waiting agent status transitions correctly through full cycle
- Multiple agents complete tasks in parallel
- Parallel merges process in correct dependency order
- Parallel dispatch with mixed outcomes (success + crash)
- 3 parallel work tests passing
- Update MockAgentManager tests to use status-based scenarios
- Change outcome:'crash' to status:'unrecoverable_error' with error field
- Change outcome:'waiting_for_input' to status:'question' with question field
- Change outcome:'success' to status:'done' with result field
- Add tests for structured question data (options, multiSelect)
- Add tests for getPendingQuestion and resume clearing pending question
- Update E2E edge-cases tests with new scenario format
- Update harness tests with new scenario format
- Add setAgentDone() for done status scenarios
- Add setAgentQuestion() for question status scenarios
- Add setAgentError() for unrecoverable_error scenarios
- Add getPendingQuestion() to harness interface
- Import PendingQuestion type from agent/types
- Change MockAgentScenario from outcome-based to status-based discriminated union
- Align with agent output schema: done/question/unrecoverable_error
- Update completeAgent() to handle new status types
- Update resume() to use new scenario format
Tasks completed: 3/3
- Define agent output schema with Zod
- Update ClaudeAgentManager to use schema and handle question flow
- Update AgentWaitingEvent to include structured question data
SUMMARY: .planning/phases/08.1-agent-output-schema/08.1-01-SUMMARY.md
- Pass --json-schema flag to Claude CLI for validated output
- Parse discriminated union (done/question/unrecoverable_error) in handleAgentCompletion
- Add getPendingQuestion method to AgentManager interface
- Add PendingQuestion type for structured question data
- Store pending question in ActiveAgent for later retrieval
- Remove hacky string matching for waiting_for_input detection
- Update MockAgentManager with getPendingQuestion and options support
- Update tests for new CLI arguments and result format
- Discriminated union with done/question/unrecoverable_error status
- Options schema for structured question choices
- JSON schema export for Claude CLI --json-schema flag
- Type export for runtime validation
Phase 8.1: Agent Output Schema (INSERTED)
- 2 plans in 2 waves (sequential)
- Defines discriminated union schema (done/question/error)
- Updates ClaudeAgentManager to use --json-schema flag
- Aligns MockAgentManager with new schema
Phase 9: Extended Scenarios (updated)
- 2 plans in 1 wave (parallel)
- Now depends on Phase 8.1
- Updated scenario format references
- Merge conflict detection with merge:conflicted event
- Conflict appears in queue state as conflicted
- handleConflict creates conflict-resolution task
- Successful merge after separate task without conflict
- Add 19 comprehensive test cases for TestHarness
- Test createTestHarness() returns all components
- Test seedFixture() creates hierarchies with correct IDs
- Test task dependencies resolved correctly
- Test event capture via getEventsByType/clearEvents
- Test dispatch flow with MockAgentManager
- Test agent completion triggers expected events
- Test full dispatch -> complete flow end-to-end
- Test MockWorktreeManager create/merge/setMergeResult
- Add TestHarness interface with all system components and helpers
- Add createTestHarness() factory wiring full system with mocks
- Add MockWorktreeManager (in-memory worktree simulation)
- Add CapturingEventBus (event capture for verification)
- Wire real DispatchManager and CoordinationManager with mocks
- Export all components via src/test/index.ts
- Add cw merge queue <taskId> to queue tasks for merge
- Add cw merge status to show merge queue status
- Add cw merge next to show next task ready to merge
- Add cw coordinate [--target <branch>] to process all ready merges
- Add coordinationManager to TRPCContext and CreateContextOptions
- Add requireCoordinationManager helper function
- Add queueMerge mutation for queuing tasks for merge
- Add processMerges mutation for processing merges in dependency order
- Add getMergeQueueStatus query for queue state inspection
- Add getNextMergeable query for next mergeable task
Adds MessageRepository to DefaultCoordinationManager for conflict notification:
- Creates info message to agent when merge conflict occurs
- Message includes conflicting file list and resolution instructions
- System-generated messages use senderType='user' with null senderId
- Refactors conflict description into cleaner array.join format
- MergeQueueItem type for merge queue entries
- MergeStatus type: queued | in_progress | merged | conflict
- MergeResult type with task context
- CoordinationManager interface with methods:
- queueMerge: queue completed task for merge
- getNextMergeable: get next task with resolved dependencies
- processMerges: process all ready merges
- handleConflict: bounce-back for conflict resolution
- getQueueState: query queue by status