Commit Graph

724 Commits

Author SHA1 Message Date
Lukas May
7146c8f823 docs(14): update roadmap with phase 14 plan breakdown 2026-02-02 11:02:56 +01:00
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
Lukas May
dddd553450 docs: create milestone v1.3 Parallel Execution & UI Design (2 phases)
Phases:
- 14. Parallel Phase Execution: add phase dependencies, concurrent execution
- 15. Frontend Wireframes: markdown diagrams for UI screens
2026-02-02 10:59:29 +01:00
Lukas May
9f149f5f9b chore: archive v1.2 milestone
- Added v1.2 entry to MILESTONES.md
- Created milestones/v1.2-ROADMAP.md archive
- Updated ROADMAP.md with archive link
- Evolved PROJECT.md with v1.2 validated requirements
- Updated STATE.md for next milestone planning
2026-02-02 10:46:41 +01:00
Lukas May
2dc51c74d3 docs(13-01): complete Real Claude CLI Integration Tests plan
Tasks completed: 3/3
- Create real Claude CLI integration test file
- Fix ClaudeAgentManager to parse structured_output
- Run real Claude tests and document findings

SUMMARY: .planning/phases/13-real-claude-e2e-tests/13-01-SUMMARY.md

Milestone v1.2 complete (21 plans, 4 phases)
2026-02-02 10:41:47 +01:00
Lukas May
accbaca49d docs(13-01): document Claude CLI structured_output findings
- Add proper test timeouts (120s for real API calls)
- Document key finding: result field is empty, structured_output has data
- Add validation cost estimates (~$0.025 per simple call)
- Confirm MockAgentManager accurately simulates real CLI behavior
2026-02-02 10:40:05 +01:00
Lukas May
5605547aea fix(13-01): parse structured_output from Claude CLI response
- Add structured_output field to ClaudeCliResult interface
- Read from structured_output when present (--json-schema response)
- Fall back to parsing result for backwards compatibility
2026-02-02 10:38:10 +01:00
Lukas May
3c98dbe541 test(13-01): create real Claude CLI integration tests
- Add test file for validating JSON schemas with real Claude CLI
- Tests are skipped by default (REAL_CLAUDE_TESTS=1 to enable)
- Covers execute, discuss, breakdown, and decompose modes
- Helper function callClaudeCli() handles CLI invocation
2026-02-02 10:37:40 +01:00
Lukas May
6835dd45d5 docs(13): create phase plan for real Claude CLI integration tests
Phase 13: Real Claude E2E Tests
- 1 plan in 1 wave
- Validates JSON schemas with actual Claude CLI
- Fixes structured_output parsing in ClaudeAgentManager
- Tests skipped by default (expensive)
2026-02-02 10:31:45 +01:00
Lukas May
5de7cd5f04 docs(12-08): complete TestHarness helpers & decompose E2E tests plan
Tasks completed: 2/2
- Add TestHarness decompose mode helpers
- Add decompose mode E2E tests

Phase 12 complete (8/8 plans).

SUMMARY: .planning/phases/12-phase-task-decomposition/12-08-SUMMARY.md
2026-02-01 11:58:26 +01:00
Lukas May
9b370a2617 test(12-08): add E2E tests for decompose workflow
- Add tests for spawn decompose agent with completion
- Add tests for Q&A flow with questions and resume
- Add tests for multiple questions handling
- Add tests for task persistence from decomposition
- Add tests for all task types (auto, checkpoint variants)
- Add tests for task dependencies
- Add full workflow test: initiative -> phase -> plan -> decompose -> tasks
2026-02-01 11:56:55 +01:00
Lukas May
7c9200d755 docs(12-07): complete Unit Tests for Decompose Mode & PlanRepository plan
- Add 5 MockAgentManager decompose mode tests
- Add 3 PlanRepository getNextNumber tests
- Update STATE.md with plan 7 completion
2026-02-01 11:56:52 +01:00
Lukas May
4263c0884e feat(12-08): add TestHarness decompose mode helpers
- Add setArchitectDecomposeComplete and setArchitectDecomposeQuestions helpers
- Add planRepository to harness for plan operations
- Add createPlan and getTasksForPlan convenience methods
- Import TaskBreakdown and Plan types
2026-02-01 11:55:28 +01:00
Lukas May
a61530359a test(12-07): add PlanRepository getNextNumber tests
Add tests for getNextNumber method:
- Returns 1 for phase with no plans
- Returns max + 1 for phase with existing plans
- Not affected by plans in other phases
2026-02-01 11:54:43 +01:00
Lukas May
a79b15376e test(12-07): add MockAgentManager decompose mode tests
Add tests for decompose mode scenarios:
- Spawn agent in decompose mode
- Complete with tasks on decompose_complete
- Pause on questions in decompose mode
- Emit stopped event with decompose_complete reason
- Set result message with task count
2026-02-01 11:54:20 +01:00
Lukas May
da5401e3cf docs(12-06): complete Plan CLI Commands & Architect Decompose plan
- Add 12-06-SUMMARY.md documenting plan and architect CLI commands
- Update STATE.md position to plan 6/8 and 47 plans completed
2026-02-01 11:52:45 +01:00
Lukas May
6a2b835fdf feat(12-06): add plan CLI commands and architect decompose command
Add CLI commands for plan management:
- cw plan list --phase <id>: List plans in a phase
- cw plan create --phase <id> --name <name>: Create a plan
- cw plan get <id>: Get plan details
- cw plan tasks <id>: List tasks in a plan

Add architect decompose command:
- cw architect decompose <planId>: Spawn agent to decompose plan into tasks
2026-02-01 11:51:54 +01:00
Lukas May
0bb6d63bb7 docs(12-05): complete Decompose Prompts & Spawn Procedure plan
Tasks completed: 3/3
- Create buildDecomposePrompt function
- Export buildDecomposePrompt from agent index
- Add spawnArchitectDecompose tRPC procedure

SUMMARY: .planning/phases/12-phase-task-decomposition/12-05-SUMMARY.md
2026-02-01 11:51:25 +01:00
Lukas May
1fcbdf5e10 feat(12-05): add spawnArchitectDecompose tRPC procedure
- Import buildDecomposePrompt from agent prompts
- Add spawnArchitectDecompose procedure for decompose mode
- Validates plan and phase exist before spawning
- Spawns agent with decompose mode and comprehensive prompt
2026-02-01 11:50:35 +01:00
Lukas May
7ff979becf feat(12-05): export buildDecomposePrompt from agent module
- Add buildDecomposePrompt to public exports
2026-02-01 11:49:57 +01:00
Lukas May
48336ec39d feat(12-05): create buildDecomposePrompt function
- Add buildDecomposePrompt for decompose mode agent operations
- Import Phase and Plan types from schema
- Comprehensive prompt explaining task breakdown rules, types, and output format
2026-02-01 11:49:45 +01:00
Lukas May
8844842fed docs(12-04): complete Plan & Task tRPC procedures plan
Tasks completed: 3/3
- Add PlanRepository to tRPC context
- Add Plan tRPC procedures (CRUD)
- Add createTasksFromDecomposition procedure

SUMMARY: .planning/phases/12-phase-task-decomposition/12-04-SUMMARY.md
2026-02-01 11:48:21 +01:00
Lukas May
66ad2ec6ef feat(12-04): add createTasksFromDecomposition procedure
- Add createDependency method to TaskRepository interface
- Implement createDependency in DrizzleTaskRepository
- Add createTasksFromDecomposition procedure for bulk task creation
- Procedure verifies plan exists before creating tasks
- Creates tasks in order, building number-to-ID map
- Creates task dependencies after all tasks exist
- Dependencies mapped from task numbers to IDs
2026-02-01 11:46:49 +01:00
Lukas May
89ec64ab2e docs(12-03): complete agent manager decompose mode plan
Tasks completed: 3/3
- Task 3: Extend AgentStoppedEvent reason type (dependency)
- Task 1: Update ClaudeAgentManager for decompose mode
- Task 2: Update MockAgentManager for decompose mode

SUMMARY: .planning/phases/12-phase-task-decomposition/12-03-SUMMARY.md
2026-02-01 11:45:55 +01:00
Lukas May
612744580e feat(12-04): add Plan tRPC procedures
- Import PlanRepository type
- Add requirePlanRepository helper
- Add createPlan procedure (auto-assigns number if not provided)
- Add listPlans procedure (returns plans ordered by number)
- Add getPlan procedure (throws NOT_FOUND if not found)
- Add updatePlan procedure (name, description, status)
2026-02-01 11:45:32 +01:00
Lukas May
c98e9df486 feat(12-04): add PlanRepository to tRPC context
- Import PlanRepository type from repositories
- Add planRepository?: PlanRepository to TRPCContext type
- Add planRepository to CreateContextOptions
- Update createContext to include planRepository
2026-02-01 11:44:46 +01:00
Lukas May
2bd0bc52a3 feat(12-03): add decompose mode support to MockAgentManager
- Import TaskBreakdown from schema.ts
- Add decompose_complete status to MockAgentScenario type
- Update completeAgent() to handle decompose_complete scenarios
- Emit agent:stopped with reason 'decompose_complete' for E2E testing
2026-02-01 11:44:40 +01:00
Lukas May
8754cdea98 feat(12-03): add decompose mode support to ClaudeAgentManager
- Import decomposeOutputSchema and decomposeOutputJsonSchema from schema.ts
- Update getJsonSchemaForMode() to handle 'decompose' mode
- Add handleDecomposeOutput() method following pattern of handleBreakdownOutput()
- Update handleAgentCompletion() switch to call handleDecomposeOutput for decompose mode
- Handle decompose_complete/questions/unrecoverable_error statuses
2026-02-01 11:43:55 +01:00
Lukas May
fe3fed077e feat(12-03): extend AgentStoppedEvent reason with decompose_complete
- Add 'decompose_complete' to AgentStoppedEvent reason type union
- Follows pattern established in Phase 11 for context_complete/breakdown_complete
2026-02-01 11:38:56 +01:00
Lukas May
9d631e3970 docs(12-01): complete decompose mode schema plan
Tasks completed: 2/2
- Extend AgentMode with 'decompose'
- Create decompose output schema

SUMMARY: .planning/phases/12-phase-task-decomposition/12-01-SUMMARY.md
2026-02-01 11:37:08 +01:00
Lukas May
8ffa54a531 feat(12-01): create decompose output schema
- Add TaskBreakdown type with number, name, description, type, dependencies
- Create decomposeOutputSchema discriminated union (questions/decompose_complete/error)
- Create decomposeOutputJsonSchema for Claude CLI --json-schema flag
- Update module docstring to include decompose mode
2026-02-01 11:34:31 +01:00
Lukas May
a1d13f10cd docs(12-02): complete PlanRepository extensions plan
Tasks completed: 3/3
- Extend PlanRepository port interface
- Implement methods in DrizzlePlanRepository
- Export types from repositories index (already done)

SUMMARY: .planning/phases/12-phase-task-decomposition/12-02-SUMMARY.md
2026-02-01 11:34:20 +01:00
Lukas May
8da4e71075 feat(12-01): extend AgentMode with 'decompose'
- Add 'decompose' to AgentMode union type
- Update agents table mode column enum in database schema
- Update test-helpers.ts CREATE_TABLES_SQL with CHECK constraint
- Add missing getNextNumber implementation (blocking fix)
2026-02-01 11:32:18 +01:00
Lukas May
3187e2ab01 feat(12-02): implement getNextNumber in DrizzlePlanRepository
- Import max from drizzle-orm for aggregate query
- Query MAX(number) where phase_id matches
- Return max + 1, or 1 if no plans exist
- Pattern follows DrizzlePhaseRepository.getNextNumber
2026-02-01 11:31:30 +01:00
Lukas May
0044fbfc6e feat(12-02): add getNextNumber to PlanRepository interface
- Add getNextNumber(phaseId) method signature
- Returns MAX(number) + 1, or 1 if no plans exist
- Following pattern from PhaseRepository.getNextNumber
2026-02-01 11:30:27 +01:00
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
Lukas May
ec9e6043a2 docs(11): complete architect agent phase 2026-01-31 19:30:40 +01:00
Lukas May
47b462362a test(11-08): add E2E tests for breakdown mode and full workflow
Add architect workflow E2E tests:
- Breakdown mode: spawn architect, complete with phases
- Phase persistence: create and retrieve phases from breakdown output
- Full workflow: discuss -> breakdown -> phase persistence
2026-01-31 19:28:22 +01:00
Lukas May
ae130e919f test(11-08): add E2E tests for architect discuss mode
Add architect workflow E2E tests for discuss mode:
- Test spawning architect in discuss mode with context_complete
- Test pause on questions and resume with answers flow
2026-01-31 19:27:26 +01:00
Lukas May
021937c28d feat(test): add TestHarness architect mode helpers and tRPC caller
Add convenience methods for architect mode testing:
- setArchitectDiscussComplete for context_complete scenarios
- setArchitectDiscussQuestions for discuss mode questions
- setArchitectBreakdownComplete for breakdown_complete scenarios
- getInitiative, getPhases, createInitiative, createPhasesFromBreakdown
- mockAgentManager alias, advanceTimers, getEmittedEvents helpers
- Wire up initiative/phase repositories and tRPC caller to harness

Also fix pre-existing test issues with dependencies and type casting.
2026-01-31 19:26:46 +01:00
Lukas May
4230e171f5 docs(11-07): complete unit tests for modes and repositories
- All tasks completed with atomic commits
- Test count: 397 passing
2026-01-31 19:25:05 +01:00
Lukas May
1f4a95df4a test(db): add PhaseRepository findByNumber and getNextNumber tests
- Test findByNumber with matching/non-matching initiative and number
- Test getNextNumber returns 1 for empty initiative
- Test getNextNumber returns max + 1 with existing phases
- Test getNextNumber handles gaps in numbering
2026-01-31 19:24:09 +01:00
Lukas May
de57c15666 test(db): add InitiativeRepository findByStatus tests
- Test empty array for no matches
- Test filtering by active/completed/archived status
2026-01-31 19:23:44 +01:00
Lukas May
567d863a4a test(agent): add MockAgentManager mode tests
- Test default execute mode on spawn
- Test discuss mode with context_complete scenario
- Test breakdown mode with breakdown_complete scenario
- Verify stopped event reasons for each mode
2026-01-31 19:23:22 +01:00
Lukas May
28b8921735 docs(11-06): complete CLI commands plan
Add summary for initiative and architect CLI commands.
Update STATE.md with plan 6 completion.
2026-01-31 19:21:54 +01:00
Lukas May
173ed57d2c feat(cli): add initiative phases command
Add cw initiative phases <initiativeId> to list phases for an initiative.
Displays phase number, name, status, and description.
2026-01-31 19:20:38 +01:00
Lukas May
1165697e91 feat(cli): add architect commands (discuss, breakdown)
Add CLI commands for architect workflow:
- cw architect discuss <initiativeId> - start discuss mode
- cw architect breakdown <initiativeId> - start breakdown mode

Both require --name for agent name, with optional context flags.
2026-01-31 19:20:16 +01:00
Lukas May
2cdc1544ef feat(cli): add initiative commands (create, list, get)
Add CLI commands for initiative management:
- cw initiative create <name> - create with optional description
- cw initiative list - list all with optional status filter
- cw initiative get <id> - get details by ID
2026-01-31 19:19:51 +01:00
Lukas May
8d90a55f45 docs(11-05): complete agent prompts plan
Tasks completed: 3/3
- Update spawnAgent to support mode
- Create comprehensive agent prompts module
- Add spawnArchitect tRPC procedures

SUMMARY: .planning/phases/11-architect-agent/11-05-SUMMARY.md
2026-01-31 19:18:28 +01:00
Lukas May
c13985909a feat(11-05): add spawnArchitect tRPC procedures
- Add spawnArchitectDiscuss for context-gathering mode
- Add spawnArchitectBreakdown for phase decomposition mode
- Both procedures validate initiative exists before spawning
- Use comprehensive prompts from agent/prompts module
2026-01-31 19:16:50 +01:00