FEAT_MATURITYROADMAP: Implementation Plan
Overview
This plan implements the Goal-driven Maturity Roadmap feature as specified in FEAT_MATURITYROADMAP_PRD.md.
Implementation Phases
Phase 1: Core Goal Types
Files to create/modify:
goal.go- Goal, GoalMaturityModel, GoalMaturityLevel, SLORequirement, MetricCriterion types
Tasks:
- Create Goal struct with all fields from PRD R1
- Create GoalMaturityModel struct (R2)
- Create GoalMaturityLevel struct with RequiredSLOs and MetricCriteria (R3)
- Create SLORequirement struct
- Create MetricCriterion struct with IsMet() method
- Implement Goal.CurrentMaturityLevel() calculation
- Implement Goal.MeetsLevelRequirements() method
- Add validation for Goal types
Phase 2: Phase and Swimlane Types
Files to create/modify:
phase.go- Phase, PhaseGoalTarget, Swimlane types
Tasks:
- Create Phase struct with all fields from PRD R4
- Create PhaseGoalTarget struct
- Create Swimlane struct (R5)
- Add validation for Phase types
Phase 3: Enhanced Initiatives
Files to modify:
prism.go- Add GoalIds, PhaseId, DeploymentStatus to Initiative
Tasks:
- Add GoalIds []string field to Initiative
- Add PhaseId string field to Initiative
- Add DevCompletionPercent float64 field
- Create DeploymentStatus struct (R6)
- Update Initiative validation
Phase 4: Phase Metrics
Files to create:
phase_metrics.go- PhaseMetrics, GoalProgress, InitiativeMetrics, SLOCompliance types
Tasks:
- Create PhaseMetrics struct (R7)
- Create GoalProgress struct with all calculation fields
- Create InitiativeMetrics struct
- Create SLOCompliance struct
- Implement Phase.GoalProgress() calculation method
- Implement Phase.InitiativeMetrics() calculation
Phase 5: PRISMDocument Integration
Files to modify:
prism.go- Add Goals, Phases, Roadmap fields to PRISMDocument
Tasks:
- Add Goals []Goal field
- Add Phases []Phase field
- Add Roadmap *RoadmapConfig field (optional config)
- Update PRISMDocument validation to include new types
- Ensure cross-references are validated (metric IDs in SLORequirements exist)
Phase 6: CLI Commands
Files to create:
cmd/prism/goal.go- goal list, show, progress commandscmd/prism/phase.go- phase list, show, metrics commandscmd/prism/roadmap.go- roadmap show, progress commands
Tasks:
- Implement
prism goal listcommand - Implement
prism goal show <goal-id>command - Implement
prism goal progress <goal-id>command - Implement
prism phase listcommand - Implement
prism phase show <phase-id>command - Implement
prism phase metrics <phase-id>command - Implement
prism roadmap showcommand - Implement
prism roadmap progresscommand - Enhance
prism scorewith --goals and --phase flags
Phase 7: Examples and Tests
Files to create:
examples/goal-roadmap.json- Complete example with goals, phases, initiativesgoal_test.go- Unit tests for goal types and calculationsphase_test.go- Unit tests for phase typesphase_metrics_test.go- Unit tests for metrics calculations
Tasks:
- Create comprehensive example JSON
- Write unit tests for Goal.CurrentMaturityLevel()
- Write unit tests for Goal.MeetsLevelRequirements()
- Write unit tests for MetricCriterion.IsMet()
- Write unit tests for Phase.GoalProgress()
- Write integration tests with example file
Phase 8: Schema and Documentation
Files to modify:
schema/generate.go- Include new types in schema generationdocs/concepts/goals.md- New documentation pagedocs/concepts/phases.md- New documentation pagedocs/cli/goal.md- New CLI referencedocs/cli/phase.md- New CLI referencedocs/cli/roadmap.md- New CLI reference
Tasks:
- Regenerate JSON schema with new types
- Write goals concept documentation
- Write phases concept documentation
- Write CLI command documentation
- Update mkdocs.yml navigation
File Summary
New Files
| File | Description |
|---|---|
goal.go |
Goal, GoalMaturityModel, GoalMaturityLevel types |
phase.go |
Phase, PhaseGoalTarget, Swimlane types |
phase_metrics.go |
PhaseMetrics, GoalProgress, InitiativeMetrics types |
cmd/prism/goal.go |
Goal CLI commands |
cmd/prism/phase.go |
Phase CLI commands |
cmd/prism/roadmap.go |
Roadmap CLI commands |
goal_test.go |
Goal unit tests |
phase_test.go |
Phase unit tests |
phase_metrics_test.go |
Phase metrics tests |
examples/goal-roadmap.json |
Complete example |
docs/concepts/goals.md |
Goals documentation |
docs/concepts/phases.md |
Phases documentation |
docs/cli/goal.md |
Goal CLI docs |
docs/cli/phase.md |
Phase CLI docs |
docs/cli/roadmap.md |
Roadmap CLI docs |
Modified Files
| File | Changes |
|---|---|
prism.go |
Add Goals, Phases, Roadmap to PRISMDocument; enhance Initiative |
validation.go |
Add validation for new types |
schema/generate.go |
Include new types |
mkdocs.yml |
Add new navigation entries |
Dependency Order
Phase 1 (goal.go)
↓
Phase 2 (phase.go)
↓
Phase 3 (initiative enhancements) ← depends on Phase 1 for GoalIds
↓
Phase 4 (phase_metrics.go) ← depends on all above
↓
Phase 5 (PRISMDocument integration)
↓
Phase 6 (CLI) ← can start after Phase 5
Phase 7 (Tests) ← can start after Phase 4
Phase 8 (Docs) ← can start after Phase 6
Verification Checklist
- [ ] All new types have JSON tags with omitempty where appropriate
- [ ] All validation functions return meaningful error messages
- [ ] MeetsSLO() integration works with existing Metric type
- [ ] CurrentMaturityLevel() correctly iterates from 5 to 1
- [ ] Phase metrics calculations match PRD formulas
- [ ] CLI commands have consistent help text
- [ ] Example JSON validates against schema
- [ ] All tests pass
- [ ] golangci-lint passes