Documentation
¶
Overview ¶
Package prism provides the PRISM (Platform for Reliability, Improvement, and Strategic Maturity) framework for COO-level organizational health monitoring combining SLOs, maturity modeling, and OKRs.
Index ¶
- Constants
- func AllAwarenessStates() []string
- func AllCategories() []string
- func AllDomains() []string
- func AllFrameworks() []string
- func AllGoalStatuses() []string
- func AllInitiativeStatuses() []string
- func AllLayers() []string
- func AllMetricTypes() []string
- func AllPhaseStatuses() []string
- func AllQualityVerticals() []string
- func AllQuarters() []string
- func AllStages() []string
- func AllStatuses() []string
- func AllTeamTypes() []string
- func AllTrendDirections() []string
- func AllWindows() []string
- func DefaultAwarenessStates() []string
- func InterpretScore(score float64) string
- func MaturityLevelName(level int) string
- func ValidateAwarenessState(state string) error
- func ValidateCategory(category string) error
- func ValidateDomain(domain string) error
- func ValidateFramework(framework string) error
- func ValidateGoalStatus(status string) error
- func ValidateInitiativeStatus(status string) error
- func ValidateLayer(layer string) error
- func ValidateMaturityLevel(level int) error
- func ValidateMetricType(metricType string) error
- func ValidatePhaseStatus(status string) error
- func ValidateQualityVertical(vertical string) error
- func ValidateQuarter(quarter string) error
- func ValidateSLOOperator(operator string) error
- func ValidateStage(stage string) error
- func ValidateStatus(status string) error
- func ValidateTeamType(teamType string) error
- func ValidateTrendDirection(trend string) error
- func ValidateWindow(window string) error
- type AwarenessDistribution
- type AwarenessSummary
- type BenchmarkComparison
- type CategoryCompliance
- type CellScore
- type CustomerAwarenessConfig
- type CustomerAwarenessData
- func (d *CustomerAwarenessData) AwareNotActingRate() float64
- func (d *CustomerAwarenessData) AwarenessScore() float64
- func (d *CustomerAwarenessData) GetStateCount(state string) int
- func (d *CustomerAwarenessData) GetStatePercent(state string) float64
- func (d *CustomerAwarenessData) ProactiveDetectionRate() float64
- func (d *CustomerAwarenessData) ProactiveResolutionRate() float64
- func (d *CustomerAwarenessData) RecalculatePercentages()
- func (d *CustomerAwarenessData) RemediationInProgressRate() float64
- func (d *CustomerAwarenessData) SetCount(state string, count int) error
- func (d *CustomerAwarenessData) Summary() *AwarenessSummary
- func (d *CustomerAwarenessData) TotalCount() int
- func (d *CustomerAwarenessData) UnawareRate() float64
- func (d *CustomerAwarenessData) Validate() ValidationErrors
- type DMAICMapping
- type DashboardSummary
- type DataPoint
- type DeploymentStatus
- type DomainDef
- type DomainScoreBreakdown
- type ExecutiveDashboard
- type FrameworkMapping
- type GapAnalysisEntry
- type Goal
- func (g *Goal) CriteriaMetForLevel(level int, doc *PRISMDocument) (met, total int)
- func (g *Goal) CurrentMaturityLevel(doc *PRISMDocument) int
- func (g *Goal) MeetsLevelRequirements(level int, doc *PRISMDocument) bool
- func (g *Goal) SLOsMetForLevel(level int, doc *PRISMDocument) (met, total int)
- func (g *Goal) Validate(doc *PRISMDocument) ValidationErrors
- type GoalMaturityLevel
- type GoalMaturityModel
- type GoalMaturityStatus
- type GoalPhaseProgress
- type GoalProgress
- type GoalRoadmapView
- type GoldenSignal
- type HealthStatus
- type Initiative
- type InitiativeMetrics
- type InitiativeSummary
- type LayerDef
- type MaturityCell
- type MaturityLevelDef
- type MaturityMapping
- type MaturityModel
- func (m *MaturityModel) AverageMaturityLevel() float64
- func (m *MaturityModel) AverageMaturityScore() float64
- func (m *MaturityModel) DomainMaturityLevel(domain string) float64
- func (m *MaturityModel) GetCell(domain, stage string) *MaturityCell
- func (m *MaturityModel) GetCellsByDomain(domain string) []MaturityCell
- func (m *MaturityModel) GetCellsByStage(stage string) []MaturityCell
- func (m *MaturityModel) SetCellLevel(domain, stage string, level int) error
- func (m *MaturityModel) StageMaturityLevel(stage string) float64
- func (m *MaturityModel) UpdateMaturityScores()
- func (m *MaturityModel) Validate() ValidationErrors
- type Metadata
- type Metric
- type MetricCriterion
- type OKRMapping
- type PRISMDocument
- func (doc *PRISMDocument) CalculatePRISMScore(config *ScoreConfig, awareness *CustomerAwarenessData) *PRISMScore
- func (doc *PRISMDocument) GenerateExecutiveDashboard() *ExecutiveDashboard
- func (doc *PRISMDocument) GenerateGoalRoadmapView(goalID string) *GoalRoadmapView
- func (doc *PRISMDocument) GeneratePhaseRoadmapView(phaseID string) *PhaseRoadmapView
- func (doc *PRISMDocument) GenerateRoadmapReport() *RoadmapReport
- func (doc *PRISMDocument) GenerateSLOReport() *SLOReport
- func (doc *PRISMDocument) GetGoalByID(id string) *Goal
- func (doc *PRISMDocument) GetInitiativeByID(id string) *Initiative
- func (doc *PRISMDocument) GetInitiativesForGoal(goalID string) []Initiative
- func (doc *PRISMDocument) GetInitiativesForPhase(phaseID string) []Initiative
- func (doc *PRISMDocument) GetLayerByID(id string) *LayerDef
- func (doc *PRISMDocument) GetMetricByID(id string) *Metric
- func (doc *PRISMDocument) GetMetricsByCategory(category string) []Metric
- func (doc *PRISMDocument) GetMetricsByDomain(domain string) []Metric
- func (doc *PRISMDocument) GetMetricsByLayer(layer string) []Metric
- func (doc *PRISMDocument) GetMetricsByService(serviceID string) []Metric
- func (doc *PRISMDocument) GetMetricsByStage(stage string) []Metric
- func (doc *PRISMDocument) GetPhaseByID(id string) *Phase
- func (doc *PRISMDocument) GetPhasesSorted() []Phase
- func (doc *PRISMDocument) GetServiceByID(id string) *Service
- func (doc *PRISMDocument) GetTeamByID(id string) *Team
- func (doc *PRISMDocument) Validate() ValidationErrors
- type PRISMScore
- type Phase
- type PhaseGoalTarget
- type PhaseGoalView
- type PhaseMetrics
- type PhaseProgressSummary
- type PhaseRoadmapView
- type RoadmapConfig
- type RoadmapReport
- type SLI
- type SLO
- type SLOCategoryGroup
- type SLOCompliance
- type SLOComplianceSummary
- type SLOMaturityEntry
- type SLOMetricLadder
- type SLOReport
- type SLOReportEntry
- type SLORequirement
- type ScoreBreakdown
- type ScoreConfig
- type Service
- type StageScoreBreakdown
- type Swimlane
- type Team
- type Thresholds
- type ValidationError
- type ValidationErrors
Constants ¶
const ( DomainSecurity = "security" DomainOperations = "operations" DomainQuality = "quality" )
Domain constants represent the three primary domains in PRISM.
const ( LayerRequirements = "requirements" LayerCode = "code" LayerInfra = "infra" LayerRuntime = "runtime" LayerAdoption = "adoption" LayerSupport = "support" )
Layer constants represent value stream phases from ideation to support.
const ( QualityVerticalFunctional = "functional" QualityVerticalReliability = "reliability" QualityVerticalPerformance = "performance" QualityVerticalSecurity = "security" QualityVerticalUsability = "usability" QualityVerticalMaintainability = "maintainability" )
QualityVertical constants based on ISO 25010 quality characteristics.
const ( StageDesign = "design" StageBuild = "build" StageTest = "test" StageRuntime = "runtime" StageResponse = "response" )
Lifecycle stage constants represent stages in the software delivery lifecycle.
const ( CategoryPrevention = "prevention" CategoryDetection = "detection" CategoryResponse = "response" CategoryReliability = "reliability" CategoryEfficiency = "efficiency" CategoryQuality = "quality" )
Category constants represent metric categories.
const ( MaturityLevel1 = 1 // Reactive MaturityLevel2 = 2 // Basic MaturityLevel3 = 3 // Defined MaturityLevel4 = 4 // Managed MaturityLevel5 = 5 // Optimizing )
Maturity level constants represent the 5-level maturity model.
const ( AwarenessUnaware = "unaware" AwarenessAwareNotActing = "aware_not_remediating" AwarenessAwareRemediating = "aware_remediating" AwarenessAwareRemediated = "aware_remediated" )
Customer awareness state constants.
const ( FrameworkNISTCSF = "NIST_CSF" FrameworkNIST80053 = "NIST_800_53" FrameworkMITREATTACK = "MITRE_ATTACK" FrameworkDORA = "DORA" FrameworkSRE = "SRE" FrameworkFEDRAMP = "FEDRAMP" )
Framework constants for external framework mappings.
const ( MetricTypeCoverage = "coverage" MetricTypeRate = "rate" MetricTypeLatency = "latency" MetricTypeRatio = "ratio" MetricTypeCount = "count" MetricTypeDistribution = "distribution" MetricTypeScore = "score" )
Metric type constants.
const ( TrendHigherBetter = "higher_better" TrendLowerBetter = "lower_better" TrendTargetValue = "target_value" )
Trend direction constants.
const ( StatusGreen = "Green" StatusYellow = "Yellow" StatusRed = "Red" )
Status constants for metric health.
const ( Window7Days = "7d" Window30Days = "30d" Window90Days = "90d" )
SLO window constants.
const ( GoalStatusActive = "active" GoalStatusOnHold = "on_hold" GoalStatusCompleted = "completed" GoalStatusCancelled = "cancelled" )
Goal status constants.
const ( PhaseStatusPlanning = "planning" PhaseStatusInProgress = "in_progress" PhaseStatusCompleted = "completed" )
Phase status constants.
const ( QuarterQ1 = "Q1" QuarterQ2 = "Q2" QuarterQ3 = "Q3" QuarterQ4 = "Q4" )
Quarter constants.
const ( SLOOperatorGTE = "gte" // Greater than or equal SLOOperatorLTE = "lte" // Less than or equal SLOOperatorEQ = "eq" // Equal SLOOperatorGT = "gt" // Greater than SLOOperatorLT = "lt" // Less than )
SLO operator constants.
const ( InitiativeStatusPlanned = "planned" InitiativeStatusNotStarted = "not_started" InitiativeStatusInProgress = "in_progress" InitiativeStatusCompleted = "completed" InitiativeStatusCancelled = "cancelled" )
Initiative status constants.
const ( TeamTypeStreamAligned = "stream_aligned" TeamTypePlatform = "platform" TeamTypeEnabling = "enabling" TeamTypeOverlay = "overlay" )
TeamType constants based on Team Topologies.
Variables ¶
This section is empty.
Functions ¶
func AllAwarenessStates ¶
func AllAwarenessStates() []string
AllAwarenessStates returns all valid awareness state values.
func AllFrameworks ¶
func AllFrameworks() []string
AllFrameworks returns all valid framework values.
func AllGoalStatuses ¶ added in v0.2.0
func AllGoalStatuses() []string
AllGoalStatuses returns all valid goal status values.
func AllInitiativeStatuses ¶ added in v0.2.0
func AllInitiativeStatuses() []string
AllInitiativeStatuses returns all valid initiative status values.
func AllLayers ¶ added in v0.3.0
func AllLayers() []string
AllLayers returns all valid layer values in value stream order.
func AllMetricTypes ¶
func AllMetricTypes() []string
AllMetricTypes returns all valid metric type values.
func AllPhaseStatuses ¶ added in v0.2.0
func AllPhaseStatuses() []string
AllPhaseStatuses returns all valid phase status values.
func AllQualityVerticals ¶ added in v0.3.0
func AllQualityVerticals() []string
AllQualityVerticals returns all valid ISO 25010 quality vertical values.
func AllQuarters ¶ added in v0.2.0
func AllQuarters() []string
AllQuarters returns all valid quarter values.
func AllTeamTypes ¶ added in v0.3.0
func AllTeamTypes() []string
AllTeamTypes returns all valid team type values.
func AllTrendDirections ¶
func AllTrendDirections() []string
AllTrendDirections returns all valid trend direction values.
func DefaultAwarenessStates ¶
func DefaultAwarenessStates() []string
DefaultAwarenessStates returns the default four awareness states.
func InterpretScore ¶
InterpretScore returns a human-readable interpretation of the PRISM score.
func MaturityLevelName ¶
MaturityLevelName returns the name for a maturity level.
func ValidateAwarenessState ¶
ValidateAwarenessState validates an awareness state value.
func ValidateCategory ¶
ValidateCategory validates a category value.
func ValidateDomain ¶
ValidateDomain validates a domain value.
func ValidateFramework ¶
ValidateFramework validates a framework value.
func ValidateGoalStatus ¶ added in v0.2.0
ValidateGoalStatus validates a goal status value.
func ValidateInitiativeStatus ¶ added in v0.2.0
ValidateInitiativeStatus validates an initiative status value.
func ValidateLayer ¶ added in v0.3.0
ValidateLayer validates a layer value.
func ValidateMaturityLevel ¶
ValidateMaturityLevel validates a maturity level value.
func ValidateMetricType ¶
ValidateMetricType validates a metric type value.
func ValidatePhaseStatus ¶ added in v0.2.0
ValidatePhaseStatus validates a phase status value.
func ValidateQualityVertical ¶ added in v0.3.0
ValidateQualityVertical validates an ISO 25010 quality vertical value.
func ValidateQuarter ¶ added in v0.2.0
ValidateQuarter validates a quarter value.
func ValidateSLOOperator ¶ added in v0.2.0
ValidateSLOOperator validates an SLO operator value.
func ValidateStatus ¶
ValidateStatus validates a status value.
func ValidateTeamType ¶ added in v0.3.0
ValidateTeamType validates a team type value.
func ValidateTrendDirection ¶
ValidateTrendDirection validates a trend direction value.
func ValidateWindow ¶
ValidateWindow validates an SLO window value.
Types ¶
type AwarenessDistribution ¶
type AwarenessDistribution struct {
State string `json:"state"`
Count int `json:"count"`
Percent float64 `json:"percent"`
}
AwarenessDistribution represents the count and percentage for a single awareness state.
type AwarenessSummary ¶
type AwarenessSummary struct {
TotalCustomers int `json:"totalCustomers"`
UnawareCount int `json:"unawareCount"`
AwareCount int `json:"awareCount"`
RemediatingCount int `json:"remediatingCount"`
RemediatedCount int `json:"remediatedCount"`
ProactiveDetectionRate float64 `json:"proactiveDetectionRate"`
ProactiveResolutionRate float64 `json:"proactiveResolutionRate"`
AwarenessScore float64 `json:"awarenessScore"`
}
AwarenessSummary provides a summary view of awareness metrics.
type BenchmarkComparison ¶ added in v0.2.0
type BenchmarkComparison struct {
MetricID string `json:"metricId"`
MetricName string `json:"metricName"`
CurrentVal float64 `json:"currentVal"`
IndustryAvg float64 `json:"industryAvg"`
Top10Percent float64 `json:"top10Percent"`
Position string `json:"position"` // "below_avg", "avg", "above_avg", "top_10"
PercentileEst int `json:"percentileEst"`
}
BenchmarkComparison compares metrics against industry benchmarks.
type CategoryCompliance ¶ added in v0.2.0
type CategoryCompliance struct {
Category string `json:"category"`
Met int `json:"met"`
AtRisk int `json:"atRisk"`
Missed int `json:"missed"`
NotTargeted int `json:"notTargeted"`
Total int `json:"total"`
Compliance float64 `json:"compliance"`
}
CategoryCompliance shows SLO status for a specific category.
type CellScore ¶
type CellScore struct {
Domain string `json:"domain"`
Stage string `json:"stage"`
MaturityScore float64 `json:"maturityScore"`
PerformanceScore float64 `json:"performanceScore"`
CellScore float64 `json:"cellScore"`
Weight float64 `json:"weight"`
}
CellScore represents the score for a specific domain/stage cell.
type CustomerAwarenessConfig ¶
type CustomerAwarenessConfig struct {
Enabled bool `json:"enabled"`
States []string `json:"states,omitempty"`
}
CustomerAwarenessConfig defines whether customer awareness tracking is enabled for a metric.
func NewCustomerAwarenessConfig ¶
func NewCustomerAwarenessConfig(enabled bool) *CustomerAwarenessConfig
NewCustomerAwarenessConfig creates a new config with defaults.
type CustomerAwarenessData ¶
type CustomerAwarenessData struct {
Period string `json:"period"`
Distribution []AwarenessDistribution `json:"distribution"`
}
CustomerAwarenessData represents customer awareness distribution for a period.
func NewCustomerAwarenessData ¶
func NewCustomerAwarenessData(period string) *CustomerAwarenessData
NewCustomerAwarenessData creates awareness data with zero counts.
func (*CustomerAwarenessData) AwareNotActingRate ¶
func (d *CustomerAwarenessData) AwareNotActingRate() float64
AwareNotActingRate returns the rate of customers who are aware but not remediating.
func (*CustomerAwarenessData) AwarenessScore ¶
func (d *CustomerAwarenessData) AwarenessScore() float64
AwarenessScore returns a composite awareness score (0.0-1.0). Higher scores indicate better awareness/remediation state. Uses mutually exclusive states with weighted values:
- unaware: 0.0 (worst - customer doesn't know about the issue)
- aware_not_acting: 0.25 (customer knows but hasn't started remediation)
- remediating: 0.5 (customer is actively working on it)
- remediated: 1.0 (best - customer has resolved the issue)
func (*CustomerAwarenessData) GetStateCount ¶
func (d *CustomerAwarenessData) GetStateCount(state string) int
GetStateCount returns the count for a specific awareness state.
func (*CustomerAwarenessData) GetStatePercent ¶
func (d *CustomerAwarenessData) GetStatePercent(state string) float64
GetStatePercent returns the percentage for a specific awareness state.
func (*CustomerAwarenessData) ProactiveDetectionRate ¶
func (d *CustomerAwarenessData) ProactiveDetectionRate() float64
ProactiveDetectionRate returns 1 - unaware rate (rate of customers who are aware).
func (*CustomerAwarenessData) ProactiveResolutionRate ¶
func (d *CustomerAwarenessData) ProactiveResolutionRate() float64
ProactiveResolutionRate returns the rate of customers who have remediated.
func (*CustomerAwarenessData) RecalculatePercentages ¶
func (d *CustomerAwarenessData) RecalculatePercentages()
RecalculatePercentages recalculates all percentages based on counts.
func (*CustomerAwarenessData) RemediationInProgressRate ¶
func (d *CustomerAwarenessData) RemediationInProgressRate() float64
RemediationInProgressRate returns the rate of customers actively remediating.
func (*CustomerAwarenessData) SetCount ¶
func (d *CustomerAwarenessData) SetCount(state string, count int) error
SetCount sets the count for a specific awareness state and recalculates percentages.
func (*CustomerAwarenessData) Summary ¶
func (d *CustomerAwarenessData) Summary() *AwarenessSummary
Summary returns a summary of the awareness data.
func (*CustomerAwarenessData) TotalCount ¶
func (d *CustomerAwarenessData) TotalCount() int
TotalCount returns the total count across all awareness states.
func (*CustomerAwarenessData) UnawareRate ¶
func (d *CustomerAwarenessData) UnawareRate() float64
UnawareRate returns the rate (0.0-1.0) of customers who are unaware.
func (*CustomerAwarenessData) Validate ¶
func (d *CustomerAwarenessData) Validate() ValidationErrors
Validate validates the awareness data.
type DMAICMapping ¶
type DMAICMapping struct {
Define string `json:"define,omitempty"`
Measure string `json:"measure,omitempty"`
Analyze string `json:"analyze,omitempty"`
Improve string `json:"improve,omitempty"`
Control string `json:"control,omitempty"`
}
DMAICMapping maps the metric to DMAIC phases.
type DashboardSummary ¶ added in v0.2.0
type DashboardSummary struct {
OverallMaturity float64 `json:"overallMaturity"` // Average current level
TargetMaturity float64 `json:"targetMaturity"` // Average target level
MaturityGap float64 `json:"maturityGap"` // Target - Current
SLOCompliancePercent float64 `json:"sloCompliancePercent"` // % of SLOs met
GoalsOnTrack int `json:"goalsOnTrack"` // Goals meeting targets
GoalsAtRisk int `json:"goalsAtRisk"` // Goals behind
GoalsTotal int `json:"goalsTotal"` // Total goals
CurrentPhase string `json:"currentPhase"` // Current phase name
PhaseCompletionPct float64 `json:"phaseCompletionPct"` // Current phase progress
InitiativesCompleted int `json:"initiativesCompleted"` // Completed initiatives
InitiativesInProgress int `json:"initiativesInProgress"` // In-progress initiatives
InitiativesTotal int `json:"initiativesTotal"` // Total initiatives
}
DashboardSummary provides top-level metrics for the executive summary.
type DataPoint ¶
type DataPoint struct {
Timestamp time.Time `json:"timestamp"`
Value float64 `json:"value"`
Note string `json:"note,omitempty"`
}
DataPoint represents a historical measurement.
type DeploymentStatus ¶ added in v0.2.0
type DeploymentStatus struct {
Status string `json:"status"` // not_started, in_progress, completed
TotalCustomers int `json:"totalCustomers,omitempty"` // Total customers to deploy to
DeployedCustomers int `json:"deployedCustomers,omitempty"` // Customers deployed
AdoptionPercent float64 `json:"adoptionPercent,omitempty"` // Calculated adoption percentage
}
DeploymentStatus tracks customer adoption for an initiative.
func (*DeploymentStatus) CalculateAdoptionPercent ¶ added in v0.2.0
func (ds *DeploymentStatus) CalculateAdoptionPercent() float64
CalculateAdoptionPercent calculates and updates the adoption percentage.
type DomainDef ¶
type DomainDef struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Weight float64 `json:"weight,omitempty"`
}
DomainDef defines a PRISM domain (security or operations).
type DomainScoreBreakdown ¶
type DomainScoreBreakdown struct {
Score float64 `json:"score"`
Weight float64 `json:"weight"`
MetricCount int `json:"metricCount"`
MaturityLevel float64 `json:"maturityLevel"`
}
DomainScoreBreakdown breaks down scores by domain.
type ExecutiveDashboard ¶ added in v0.2.0
type ExecutiveDashboard struct {
Title string `json:"title"`
Subtitle string `json:"subtitle,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
// Overall summary metrics
Summary DashboardSummary `json:"summary"`
// Goal-level maturity scorecard
MaturityScorecard []GoalMaturityStatus `json:"maturityScorecard"`
// SLO compliance by category
SLOCompliance SLOComplianceSummary `json:"sloCompliance"`
// Phase progress timeline
PhaseProgress []PhaseProgressSummary `json:"phaseProgress"`
// Gap analysis - sorted by priority
Gaps []GapAnalysisEntry `json:"gaps,omitempty"`
// Benchmark comparison (if available)
Benchmarks []BenchmarkComparison `json:"benchmarks,omitempty"`
}
ExecutiveDashboard provides a high-level view of maturity progress for executives.
type FrameworkMapping ¶
type FrameworkMapping struct {
Framework string `json:"framework"`
Reference string `json:"reference"`
}
FrameworkMapping maps a metric to an external framework reference.
type GapAnalysisEntry ¶ added in v0.2.0
type GapAnalysisEntry struct {
Category string `json:"category"`
MetricID string `json:"metricId"`
MetricName string `json:"metricName"`
CurrentVal float64 `json:"currentVal"`
TargetVal float64 `json:"targetVal"`
TargetLevel int `json:"targetLevel"`
Gap float64 `json:"gap"`
GapPercent float64 `json:"gapPercent"`
Priority string `json:"priority"` // "critical", "high", "medium", "low"
GoalName string `json:"goalName,omitempty"`
}
GapAnalysisEntry identifies a gap between current and target state.
type Goal ¶ added in v0.2.0
type Goal struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Owner string `json:"owner,omitempty"`
Priority int `json:"priority,omitempty"`
Status string `json:"status,omitempty"` // active, on_hold, completed, cancelled
StartDate string `json:"startDate,omitempty"`
TargetDate string `json:"targetDate,omitempty"`
MaturityModel *GoalMaturityModel `json:"maturityModel,omitempty"`
CurrentLevel int `json:"currentLevel,omitempty"`
TargetLevel int `json:"targetLevel,omitempty"`
}
Goal represents a strategic objective with its own maturity model.
func (*Goal) CriteriaMetForLevel ¶ added in v0.2.0
func (g *Goal) CriteriaMetForLevel(level int, doc *PRISMDocument) (met, total int)
CriteriaMetForLevel returns the count of metric criteria met and total criteria for the specified maturity level.
func (*Goal) CurrentMaturityLevel ¶ added in v0.2.0
func (g *Goal) CurrentMaturityLevel(doc *PRISMDocument) int
CurrentMaturityLevel calculates the current maturity level for a goal based on which SLOs and metric criteria are met. It checks from level 5 down to 1 and returns the highest level where all requirements are satisfied.
func (*Goal) MeetsLevelRequirements ¶ added in v0.2.0
func (g *Goal) MeetsLevelRequirements(level int, doc *PRISMDocument) bool
MeetsLevelRequirements returns whether all requirements for the specified maturity level are met.
func (*Goal) SLOsMetForLevel ¶ added in v0.2.0
func (g *Goal) SLOsMetForLevel(level int, doc *PRISMDocument) (met, total int)
SLOsMetForLevel returns the count of SLOs met and total SLOs required for the specified maturity level.
func (*Goal) Validate ¶ added in v0.2.0
func (g *Goal) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a Goal and returns validation errors.
type GoalMaturityLevel ¶ added in v0.2.0
type GoalMaturityLevel struct {
Level int `json:"level"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
RequiredSLOs []SLORequirement `json:"requiredSLOs,omitempty"`
MetricCriteria []MetricCriterion `json:"metricCriteria,omitempty"`
}
GoalMaturityLevel defines what a maturity level means for a goal, including the SLOs that must be met to achieve that level.
func (*GoalMaturityLevel) Validate ¶ added in v0.2.0
func (gml *GoalMaturityLevel) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a GoalMaturityLevel and returns validation errors.
type GoalMaturityModel ¶ added in v0.2.0
type GoalMaturityModel struct {
Levels []GoalMaturityLevel `json:"levels"`
}
GoalMaturityModel defines the 5-level maturity model for a specific goal.
func (*GoalMaturityModel) GetLevel ¶ added in v0.2.0
func (gmm *GoalMaturityModel) GetLevel(level int) *GoalMaturityLevel
GetLevel returns the maturity level definition for the specified level number.
func (*GoalMaturityModel) Validate ¶ added in v0.2.0
func (gmm *GoalMaturityModel) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a GoalMaturityModel and returns validation errors.
type GoalMaturityStatus ¶ added in v0.2.0
type GoalMaturityStatus struct {
GoalID string `json:"goalId"`
GoalName string `json:"goalName"`
CurrentLevel int `json:"currentLevel"`
TargetLevel int `json:"targetLevel"`
Gap int `json:"gap"`
Trend string `json:"trend"` // "up", "down", "stable"
SLOsMet int `json:"slosMet"`
SLOsTotal int `json:"slosTotal"`
SLOsMetPercent float64 `json:"slosMetPercent"`
Status string `json:"status"` // "on_track", "at_risk", "behind"
}
GoalMaturityStatus shows a goal's current vs target maturity.
type GoalPhaseProgress ¶ added in v0.2.0
type GoalPhaseProgress struct {
PhaseID string `json:"phaseId"`
PhaseName string `json:"phaseName"`
Quarter string `json:"quarter,omitempty"`
Year int `json:"year,omitempty"`
EnterLevel int `json:"enterLevel"`
ExitLevel int `json:"exitLevel"`
InitiativesTotal int `json:"initiativesTotal"`
InitiativesCompleted int `json:"initiativesCompleted"`
CompletionPercent float64 `json:"completionPercent"`
Initiatives []InitiativeSummary `json:"initiatives,omitempty"`
}
GoalPhaseProgress tracks a goal's progress within a specific phase.
type GoalProgress ¶ added in v0.2.0
type GoalProgress struct {
GoalID string `json:"goalId"`
EnterLevel int `json:"enterLevel"` // Maturity level at phase entry
CurrentLevel int `json:"currentLevel"` // Current maturity level
TargetLevel int `json:"targetLevel"` // Target level for phase exit
InitiativesTotal int `json:"initiativesTotal"` // Total initiatives for this goal
InitiativesCompleted int `json:"initiativesCompleted"` // Completed initiatives
CompletionPercent float64 `json:"completionPercent"` // initiativesCompleted / initiativesTotal
SLOsRequired int `json:"slosRequired"` // SLOs required for target level
SLOsMet int `json:"slosMet"` // SLOs currently met
}
GoalProgress tracks progress for a goal within a phase.
func CalculateGoalProgress ¶ added in v0.2.0
func CalculateGoalProgress(goal *Goal, phase *Phase, doc *PRISMDocument) *GoalProgress
CalculateGoalProgress computes progress for a goal within a phase.
type GoalRoadmapView ¶ added in v0.2.0
type GoalRoadmapView struct {
GoalID string `json:"goalId"`
GoalName string `json:"goalName"`
Description string `json:"description,omitempty"`
CurrentLevel int `json:"currentLevel"`
TargetLevel int `json:"targetLevel"`
PhaseProgress []GoalPhaseProgress `json:"phaseProgress"`
}
GoalRoadmapView shows a goal's progress across all phases (Goal → Initiative → Phase).
type GoldenSignal ¶ added in v0.3.0
type GoldenSignal struct {
Latency string `json:"latency,omitempty"` // Response time metric ID
Traffic string `json:"traffic,omitempty"` // Throughput metric ID
Errors string `json:"errors,omitempty"` // Error rate metric ID
Saturation string `json:"saturation,omitempty"` // Resource utilization metric ID
}
GoldenSignal defines the golden signals for a layer. Based on Google SRE's four golden signals: latency, traffic, errors, saturation.
type HealthStatus ¶
type HealthStatus struct {
Level string `json:"level"` // Elite, Strong, Medium, Weak, Critical
Score float64 `json:"score"` // 0.0-1.0
Color string `json:"color"` // Green, Yellow, Red
Description string `json:"description"`
}
HealthStatus represents overall health based on score.
type Initiative ¶
type Initiative struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty"`
Priority int `json:"priority,omitempty"`
MetricIDs []string `json:"metricIds,omitempty"`
Owner string `json:"owner,omitempty"`
Team string `json:"team,omitempty"`
DependentTeams []string `json:"dependentTeams,omitempty"`
StartDate string `json:"startDate,omitempty"`
EndDate string `json:"endDate,omitempty"`
// Goal and Phase linkage (FEAT_MATURITYROADMAP)
GoalIDs []string `json:"goalIds,omitempty"`
PhaseID string `json:"phaseId,omitempty"`
DevCompletionPercent float64 `json:"devCompletionPercent,omitempty"`
DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"`
// Service linkage
ServiceID string `json:"serviceId,omitempty"` // Associated service
}
Initiative represents an improvement initiative.
func (*Initiative) IsDevComplete ¶ added in v0.2.0
func (i *Initiative) IsDevComplete() bool
IsDevComplete returns whether the initiative is development complete.
func (*Initiative) IsFullyDeployed ¶ added in v0.2.0
func (i *Initiative) IsFullyDeployed() bool
IsFullyDeployed returns whether the initiative is fully deployed to all customers.
type InitiativeMetrics ¶ added in v0.2.0
type InitiativeMetrics struct {
Total int `json:"total"` // Total initiatives in phase
Completed int `json:"completed"` // Dev-complete initiatives
Deployed int `json:"deployed"` // Fully deployed initiatives
AvgAdoptionPercent float64 `json:"avgAdoptionPercent,omitempty"` // Average adoption across completed
}
InitiativeMetrics provides aggregate statistics for initiatives in a phase.
func CalculateInitiativeMetrics ¶ added in v0.2.0
func CalculateInitiativeMetrics(phase *Phase, doc *PRISMDocument) *InitiativeMetrics
CalculateInitiativeMetrics computes aggregate initiative metrics for a phase.
type InitiativeSummary ¶ added in v0.2.0
type InitiativeSummary struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status,omitempty"`
Team string `json:"team,omitempty"`
DevCompletionPercent float64 `json:"devCompletionPercent"`
}
InitiativeSummary provides a brief summary of an initiative.
type LayerDef ¶ added in v0.3.0
type LayerDef struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Weight float64 `json:"weight,omitempty"`
Signals GoldenSignal `json:"signals,omitempty"`
}
LayerDef defines an ownership layer in the stack (code, infra, runtime). Layers represent where metrics are measured and who is accountable.
func DefaultLayers ¶ added in v0.3.0
func DefaultLayers() []LayerDef
DefaultLayers returns the default layer definitions in value stream order.
func (*LayerDef) Validate ¶ added in v0.3.0
func (l *LayerDef) Validate() ValidationErrors
Validate validates a LayerDef and returns validation errors.
type MaturityCell ¶
type MaturityCell struct {
Domain string `json:"domain"`
Stage string `json:"stage"`
CurrentLevel int `json:"currentLevel"`
TargetLevel int `json:"targetLevel,omitempty"`
PrimaryKPI string `json:"primaryKPI,omitempty"`
KPITarget string `json:"kpiTarget,omitempty"`
MaturityScore float64 `json:"maturityScore,omitempty"`
}
MaturityCell represents maturity state for a domain/stage combination.
func (*MaturityCell) CalculateMaturityScore ¶
func (c *MaturityCell) CalculateMaturityScore() float64
CalculateMaturityScore calculates the normalized maturity score (0.0-1.0) for a cell.
type MaturityLevelDef ¶
type MaturityLevelDef struct {
Level int `json:"level"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
}
MaturityLevelDef defines a maturity level.
func DefaultMaturityLevels ¶
func DefaultMaturityLevels() []MaturityLevelDef
DefaultMaturityLevels returns the standard 5-level maturity definitions.
type MaturityMapping ¶
type MaturityMapping struct {
Level1 string `json:"level1,omitempty"`
Level2 string `json:"level2,omitempty"`
Level3 string `json:"level3,omitempty"`
Level4 string `json:"level4,omitempty"`
Level5 string `json:"level5,omitempty"`
}
MaturityMapping maps metric values to maturity levels.
type MaturityModel ¶
type MaturityModel struct {
Levels []MaturityLevelDef `json:"levels,omitempty"`
Cells []MaturityCell `json:"cells,omitempty"`
}
MaturityModel defines the maturity model configuration and cell scores.
func NewMaturityModel ¶
func NewMaturityModel() *MaturityModel
NewMaturityModel creates a new maturity model with default levels.
func NewMaturityModelForDomains ¶
func NewMaturityModelForDomains(domains []string) *MaturityModel
NewMaturityModelForDomains creates a maturity model with cells for specified domains only.
func NewMaturityModelWithCells ¶
func NewMaturityModelWithCells() *MaturityModel
NewMaturityModelWithCells creates a maturity model with cells for all domain/stage combinations.
func (*MaturityModel) AverageMaturityLevel ¶
func (m *MaturityModel) AverageMaturityLevel() float64
AverageMaturityLevel returns the average maturity level across all cells.
func (*MaturityModel) AverageMaturityScore ¶
func (m *MaturityModel) AverageMaturityScore() float64
AverageMaturityScore returns the average normalized maturity score (0.0-1.0).
func (*MaturityModel) DomainMaturityLevel ¶
func (m *MaturityModel) DomainMaturityLevel(domain string) float64
DomainMaturityLevel returns the average maturity level for a specific domain.
func (*MaturityModel) GetCell ¶
func (m *MaturityModel) GetCell(domain, stage string) *MaturityCell
GetCell returns the maturity cell for a specific domain/stage combination.
func (*MaturityModel) GetCellsByDomain ¶
func (m *MaturityModel) GetCellsByDomain(domain string) []MaturityCell
GetCellsByDomain returns all maturity cells for a specific domain.
func (*MaturityModel) GetCellsByStage ¶
func (m *MaturityModel) GetCellsByStage(stage string) []MaturityCell
GetCellsByStage returns all maturity cells for a specific stage.
func (*MaturityModel) SetCellLevel ¶
func (m *MaturityModel) SetCellLevel(domain, stage string, level int) error
SetCellLevel sets the current maturity level for a domain/stage combination. Creates the cell if it doesn't exist.
func (*MaturityModel) StageMaturityLevel ¶
func (m *MaturityModel) StageMaturityLevel(stage string) float64
StageMaturityLevel returns the average maturity level for a specific stage.
func (*MaturityModel) UpdateMaturityScores ¶
func (m *MaturityModel) UpdateMaturityScores()
UpdateMaturityScores calculates and updates maturity scores for all cells.
func (*MaturityModel) Validate ¶
func (m *MaturityModel) Validate() ValidationErrors
Validate validates the maturity model.
type Metadata ¶
type Metadata struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
Author string `json:"author,omitempty"`
Created string `json:"created,omitempty"`
Updated string `json:"updated,omitempty"`
}
Metadata contains document-level metadata.
type Metric ¶
type Metric struct {
// Core identity
ID string `json:"id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
// PRISM classification
Domain string `json:"domain"`
Stage string `json:"stage"`
Category string `json:"category"`
Layer string `json:"layer,omitempty"` // code, infra, runtime
QualityVertical string `json:"qualityVertical,omitempty"` // ISO 25010: functional, reliability, performance, security, usability, maintainability
// Measurement
MetricType string `json:"metricType"`
TrendDirection string `json:"trendDirection,omitempty"`
Unit string `json:"unit,omitempty"`
Baseline float64 `json:"baseline"`
Current float64 `json:"current"`
Target float64 `json:"target"`
// SLI/SLO
SLI *SLI `json:"sli,omitempty"`
SLO *SLO `json:"slo,omitempty"`
// Thresholds & Status
Thresholds *Thresholds `json:"thresholds,omitempty"`
Status string `json:"status,omitempty"`
// Maturity mapping
MaturityMapping *MaturityMapping `json:"maturityMapping,omitempty"`
// DMAIC mapping
DMAIC *DMAICMapping `json:"dmaic,omitempty"`
// Customer awareness
CustomerAwareness *CustomerAwarenessConfig `json:"customerAwareness,omitempty"`
// Framework mappings
FrameworkMappings []FrameworkMapping `json:"frameworkMappings,omitempty"`
// Ownership
Owner string `json:"owner,omitempty"`
DataSource string `json:"dataSource,omitempty"`
ServiceID string `json:"serviceId,omitempty"` // Associated service
// History
DataPoints []DataPoint `json:"dataPoints,omitempty"`
}
Metric represents a PRISM metric with SLO, maturity, and framework mappings.
func (*Metric) CalculateStatus ¶
CalculateStatus computes the status based on current value and thresholds. For higher_better trends: value >= green threshold = Green, etc. For lower_better trends: value <= green threshold = Green, etc.
func (*Metric) MeetsSLO ¶
MeetsSLO returns whether the metric's current value meets its SLO. Returns true if no SLO is defined or if Operator/Value are not set. Uses the structured Operator and Value fields for evaluation.
func (*Metric) ProgressToTarget ¶
ProgressToTarget returns the progress as a ratio (0.0-1.0) toward the target.
func (*Metric) Validate ¶
func (m *Metric) Validate() ValidationErrors
Validate validates a Metric and returns validation errors.
type MetricCriterion ¶ added in v0.2.0
type MetricCriterion struct {
MetricID string `json:"metricId"`
Operator string `json:"operator"` // gte, lte, gt, lt, eq
Value float64 `json:"value"`
}
MetricCriterion specifies a metric value requirement for a maturity level.
func (*MetricCriterion) IsMet ¶ added in v0.2.0
func (mc *MetricCriterion) IsMet(current float64) bool
IsMet returns whether the criterion is met given the current metric value.
func (*MetricCriterion) Validate ¶ added in v0.2.0
func (mc *MetricCriterion) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a MetricCriterion and returns validation errors.
type OKRMapping ¶
type OKRMapping struct {
ObjectiveID string `json:"objectiveId,omitempty"`
ObjectiveName string `json:"objectiveName"`
KeyResultID string `json:"keyResultId,omitempty"`
KeyResultName string `json:"keyResultName,omitempty"`
MetricIDs []string `json:"metricIds,omitempty"`
}
OKRMapping represents alignment between metrics and OKRs.
type PRISMDocument ¶
type PRISMDocument struct {
Schema string `json:"$schema,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
Domains []DomainDef `json:"domains,omitempty"`
Layers []LayerDef `json:"layers,omitempty"`
Teams []Team `json:"teams,omitempty"`
Services []Service `json:"services,omitempty"`
Metrics []Metric `json:"metrics"`
Maturity *MaturityModel `json:"maturity,omitempty"`
OKRs []OKRMapping `json:"okrs,omitempty"`
Initiatives []Initiative `json:"initiatives,omitempty"`
// Goal-driven Maturity Roadmap (FEAT_MATURITYROADMAP)
Goals []Goal `json:"goals,omitempty"`
Phases []Phase `json:"phases,omitempty"`
Roadmap *RoadmapConfig `json:"roadmap,omitempty"`
}
PRISMDocument represents the top-level PRISM document.
func (*PRISMDocument) CalculatePRISMScore ¶
func (doc *PRISMDocument) CalculatePRISMScore(config *ScoreConfig, awareness *CustomerAwarenessData) *PRISMScore
CalculatePRISMScore calculates the composite PRISM score for a document.
The score is computed as follows:
For each domain/stage cell, compute a CellScore combining: - MaturityScore: currentLevel / 5 (from maturity model or goals) - PerformanceScore: average ProgressToTarget() of metrics in that cell - CellScore = (MaturityWeight × MaturityScore) + (PerformanceWeight × PerformanceScore)
Compute weighted average of all cell scores: - Each cell has weight = DomainWeight × StageWeight - BaseScore = Σ(CellScore × Weight) / Σ(Weight) - Empty cells are skipped by default (configurable via SkipEmptyCells)
Apply awareness multiplier (if provided): - Overall = BaseScore × AwarenessScore - AwarenessScore ranges from 0.0 (all unaware) to 1.0 (all remediated)
Interpret the score: Elite (≥0.9), Strong (≥0.75), Medium (≥0.5), Weak (≥0.25), Critical (<0.25)
Pass nil for config to use DefaultScoreConfig(). Pass nil for awareness to skip the awareness multiplier (defaults to 1.0).
func (*PRISMDocument) GenerateExecutiveDashboard ¶ added in v0.2.0
func (doc *PRISMDocument) GenerateExecutiveDashboard() *ExecutiveDashboard
GenerateExecutiveDashboard creates an executive dashboard from a PRISM document.
func (*PRISMDocument) GenerateGoalRoadmapView ¶ added in v0.2.0
func (doc *PRISMDocument) GenerateGoalRoadmapView(goalID string) *GoalRoadmapView
GenerateGoalRoadmapView creates a Goal-centric view for a specific goal.
func (*PRISMDocument) GeneratePhaseRoadmapView ¶ added in v0.2.0
func (doc *PRISMDocument) GeneratePhaseRoadmapView(phaseID string) *PhaseRoadmapView
GeneratePhaseRoadmapView creates a Phase-centric view for a specific phase.
func (*PRISMDocument) GenerateRoadmapReport ¶ added in v0.2.0
func (doc *PRISMDocument) GenerateRoadmapReport() *RoadmapReport
GenerateRoadmapReport creates a complete roadmap report with both views.
func (*PRISMDocument) GenerateSLOReport ¶ added in v0.2.0
func (doc *PRISMDocument) GenerateSLOReport() *SLOReport
GenerateSLOReport builds an SLO report from a PRISM document by extracting metric criteria from goal maturity models, sorted by category then maturity level.
func (*PRISMDocument) GetGoalByID ¶ added in v0.2.0
func (doc *PRISMDocument) GetGoalByID(id string) *Goal
GetGoalByID returns a goal by its ID.
func (*PRISMDocument) GetInitiativeByID ¶ added in v0.2.0
func (doc *PRISMDocument) GetInitiativeByID(id string) *Initiative
GetInitiativeByID returns an initiative by its ID.
func (*PRISMDocument) GetInitiativesForGoal ¶ added in v0.2.0
func (doc *PRISMDocument) GetInitiativesForGoal(goalID string) []Initiative
GetInitiativesForGoal returns all initiatives linked to the specified goal.
func (*PRISMDocument) GetInitiativesForPhase ¶ added in v0.2.0
func (doc *PRISMDocument) GetInitiativesForPhase(phaseID string) []Initiative
GetInitiativesForPhase returns all initiatives in the specified phase.
func (*PRISMDocument) GetLayerByID ¶ added in v0.3.0
func (doc *PRISMDocument) GetLayerByID(id string) *LayerDef
GetLayerByID returns a layer definition by its ID.
func (*PRISMDocument) GetMetricByID ¶
func (doc *PRISMDocument) GetMetricByID(id string) *Metric
GetMetricByID returns a metric by its ID.
func (*PRISMDocument) GetMetricsByCategory ¶
func (doc *PRISMDocument) GetMetricsByCategory(category string) []Metric
GetMetricsByCategory returns all metrics for the specified category.
func (*PRISMDocument) GetMetricsByDomain ¶
func (doc *PRISMDocument) GetMetricsByDomain(domain string) []Metric
GetMetricsByDomain returns all metrics for the specified domain.
func (*PRISMDocument) GetMetricsByLayer ¶ added in v0.3.0
func (doc *PRISMDocument) GetMetricsByLayer(layer string) []Metric
GetMetricsByLayer returns all metrics for the specified layer.
func (*PRISMDocument) GetMetricsByService ¶ added in v0.3.0
func (doc *PRISMDocument) GetMetricsByService(serviceID string) []Metric
GetMetricsByService returns all metrics for the specified service.
func (*PRISMDocument) GetMetricsByStage ¶
func (doc *PRISMDocument) GetMetricsByStage(stage string) []Metric
GetMetricsByStage returns all metrics for the specified stage.
func (*PRISMDocument) GetPhaseByID ¶ added in v0.2.0
func (doc *PRISMDocument) GetPhaseByID(id string) *Phase
GetPhaseByID returns a phase by its ID.
func (*PRISMDocument) GetPhasesSorted ¶ added in v0.2.0
func (doc *PRISMDocument) GetPhasesSorted() []Phase
GetPhasesSorted returns phases sorted by year and quarter.
func (*PRISMDocument) GetServiceByID ¶ added in v0.3.0
func (doc *PRISMDocument) GetServiceByID(id string) *Service
GetServiceByID returns a service by its ID.
func (*PRISMDocument) GetTeamByID ¶ added in v0.3.0
func (doc *PRISMDocument) GetTeamByID(id string) *Team
GetTeamByID returns a team by its ID.
func (*PRISMDocument) Validate ¶
func (doc *PRISMDocument) Validate() ValidationErrors
Validate validates the entire PRISMDocument.
type PRISMScore ¶
type PRISMScore struct {
Overall float64 `json:"overall"`
BaseScore float64 `json:"baseScore"`
AwarenessScore float64 `json:"awarenessScore"`
SecurityScore float64 `json:"securityScore"`
OperationsScore float64 `json:"operationsScore"`
CellScores []CellScore `json:"cellScores,omitempty"`
Interpretation string `json:"interpretation"`
MaturityAverage float64 `json:"maturityAverage,omitempty"`
PerformanceAverage float64 `json:"performanceAverage,omitempty"`
}
PRISMScore represents the composite PRISM score for a document.
func (*PRISMScore) GetHealthStatus ¶
func (score *PRISMScore) GetHealthStatus() *HealthStatus
GetHealthStatus returns the health status based on the PRISM score.
func (*PRISMScore) GetScoreBreakdown ¶
func (score *PRISMScore) GetScoreBreakdown() *ScoreBreakdown
GetScoreBreakdown returns a detailed breakdown of scores.
type Phase ¶ added in v0.2.0
type Phase struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Quarter string `json:"quarter,omitempty"` // Q1, Q2, Q3, Q4
Year int `json:"year,omitempty"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Status string `json:"status,omitempty"` // planning, in_progress, completed
GoalTargets []PhaseGoalTarget `json:"goalTargets,omitempty"`
Swimlanes []Swimlane `json:"swimlanes,omitempty"`
}
Phase represents a time-bounded planning period (typically a quarter).
func (*Phase) AllInitiativeIDs ¶ added in v0.2.0
AllInitiativeIDs returns all initiative IDs across all swimlanes in this phase.
func (*Phase) GetGoalTarget ¶ added in v0.2.0
func (p *Phase) GetGoalTarget(goalID string) *PhaseGoalTarget
GetGoalTarget returns the goal target for the specified goal ID.
func (*Phase) GetSwimlane ¶ added in v0.2.0
GetSwimlane returns the swimlane with the specified ID.
func (*Phase) Validate ¶ added in v0.2.0
func (p *Phase) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a Phase and returns validation errors.
type PhaseGoalTarget ¶ added in v0.2.0
type PhaseGoalTarget struct {
GoalID string `json:"goalId"`
EnterLevel int `json:"enterLevel"` // Expected maturity level at phase start
ExitLevel int `json:"exitLevel"` // Target maturity level at phase end
}
PhaseGoalTarget specifies the maturity target for a goal within a phase.
type PhaseGoalView ¶ added in v0.2.0
type PhaseGoalView struct {
GoalID string `json:"goalId"`
GoalName string `json:"goalName"`
EnterLevel int `json:"enterLevel"`
ExitLevel int `json:"exitLevel"`
CurrentLevel int `json:"currentLevel"`
InitiativesTotal int `json:"initiativesTotal"`
InitiativesCompleted int `json:"initiativesCompleted"`
CompletionPercent float64 `json:"completionPercent"`
Initiatives []InitiativeSummary `json:"initiatives,omitempty"`
}
PhaseGoalView shows a goal's status within a phase.
type PhaseMetrics ¶ added in v0.2.0
type PhaseMetrics struct {
PhaseID string `json:"phaseId"`
GoalProgress []GoalProgress `json:"goalProgress,omitempty"`
InitiativeMetrics *InitiativeMetrics `json:"initiativeMetrics,omitempty"`
SLOCompliance []SLOCompliance `json:"sloCompliance,omitempty"`
}
PhaseMetrics tracks progress at phase boundaries.
func CalculatePhaseMetrics ¶ added in v0.2.0
func CalculatePhaseMetrics(phase *Phase, doc *PRISMDocument) *PhaseMetrics
CalculatePhaseMetrics generates complete phase metrics.
type PhaseProgressSummary ¶ added in v0.2.0
type PhaseProgressSummary struct {
PhaseID string `json:"phaseId"`
PhaseName string `json:"phaseName"`
Quarter string `json:"quarter,omitempty"`
Year int `json:"year,omitempty"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Status string `json:"status"` // "completed", "in_progress", "planned"
IsCurrent bool `json:"isCurrent"`
CompletionPct float64 `json:"completionPct"`
GoalsTargeted int `json:"goalsTargeted"`
GoalsAchieved int `json:"goalsAchieved"`
InitCompleted int `json:"initCompleted"`
InitInProgress int `json:"initInProgress"`
InitTotal int `json:"initTotal"`
}
PhaseProgressSummary shows progress for a roadmap phase.
type PhaseRoadmapView ¶ added in v0.2.0
type PhaseRoadmapView struct {
PhaseID string `json:"phaseId"`
PhaseName string `json:"phaseName"`
Quarter string `json:"quarter,omitempty"`
Year int `json:"year,omitempty"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Status string `json:"status,omitempty"`
GoalViews []PhaseGoalView `json:"goalViews"`
OverallCompletion float64 `json:"overallCompletion"`
}
PhaseRoadmapView shows a phase's goals and initiatives (Phase → Goal → Initiative).
type RoadmapConfig ¶ added in v0.2.0
type RoadmapConfig struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
FiscalYearStart int `json:"fiscalYearStart,omitempty"` // Month (1-12), default 1 (January)
}
RoadmapConfig holds configuration options for the roadmap.
type RoadmapReport ¶ added in v0.2.0
type RoadmapReport struct {
Metadata *Metadata `json:"metadata,omitempty"`
ByGoal []GoalRoadmapView `json:"byGoal"`
ByPhase []PhaseRoadmapView `json:"byPhase"`
GeneratedAt string `json:"generatedAt,omitempty"`
}
RoadmapReport contains both views of the roadmap.
type SLI ¶
type SLI struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Formula string `json:"formula,omitempty"`
}
SLI represents a Service Level Indicator.
type SLO ¶
type SLO struct {
Target string `json:"target"` // Display string (e.g., ">=99.9%")
Operator string `json:"operator,omitempty"` // Machine-readable: "gte", "lte", "eq", "gt", "lt"
Value float64 `json:"value,omitempty"` // Numeric target value
Window string `json:"window,omitempty"` // "7d", "30d", "90d"
Thresholds *Thresholds `json:"thresholds,omitempty"`
}
SLO represents a Service Level Objective.
type SLOCategoryGroup ¶ added in v0.2.0
type SLOCategoryGroup struct {
Category string `json:"category"`
Description string `json:"description,omitempty"`
Metrics []SLOMetricLadder `json:"metrics"`
}
SLOCategoryGroup groups SLO requirements by metric category.
type SLOCompliance ¶ added in v0.2.0
type SLOCompliance struct {
MetricID string `json:"metricId"`
MetricName string `json:"metricName,omitempty"`
SLOTarget string `json:"sloTarget,omitempty"`
Current float64 `json:"current"`
IsMet bool `json:"isMet"`
GoalIDs []string `json:"goalIds,omitempty"` // Goals that depend on this SLO
}
SLOCompliance tracks SLO compliance status.
func CalculateSLOCompliance ¶ added in v0.2.0
func CalculateSLOCompliance(phase *Phase, doc *PRISMDocument) []SLOCompliance
CalculateSLOCompliance generates SLO compliance records for metrics associated with goals in a phase.
type SLOComplianceSummary ¶ added in v0.2.0
type SLOComplianceSummary struct {
Categories []CategoryCompliance `json:"categories"`
OverallMet int `json:"overallMet"`
OverallAtRisk int `json:"overallAtRisk"`
OverallMissed int `json:"overallMissed"`
OverallTotal int `json:"overallTotal"`
OverallCompliance float64 `json:"overallCompliance"`
}
SLOComplianceSummary shows SLO compliance by category.
type SLOMaturityEntry ¶ added in v0.2.0
type SLOMaturityEntry struct {
Level int `json:"level"`
LevelName string `json:"levelName"`
GoalID string `json:"goalId,omitempty"`
GoalName string `json:"goalName,omitempty"`
Operator string `json:"operator"`
Value float64 `json:"value"`
Description string `json:"description,omitempty"`
}
SLOMaturityEntry represents an SLO requirement at a specific maturity level.
type SLOMetricLadder ¶ added in v0.2.0
type SLOMetricLadder struct {
MetricID string `json:"metricId"`
MetricName string `json:"metricName"`
Unit string `json:"unit,omitempty"`
Domain string `json:"domain,omitempty"`
Stage string `json:"stage,omitempty"`
Levels []SLOMaturityEntry `json:"levels"`
}
SLOMetricLadder shows how a single metric's SLO requirements escalate across maturity levels.
type SLOReport ¶ added in v0.2.0
type SLOReport struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
GeneratedAt string `json:"generatedAt,omitempty"`
Categories []SLOCategoryGroup `json:"categories"`
// Flattened entries for tabular output
Entries []SLOReportEntry `json:"entries,omitempty"`
}
SLOReport provides a structured view of all SLO requirements across maturity levels, organized by category. This enables visualization of how SLOs become more stringent as maturity increases.
func (*SLOReport) TableColumns ¶ added in v0.2.0
TableColumns returns the column headers for tabular output.
func (*SLOReport) ToMarkdown ¶ added in v0.2.0
ToMarkdown renders the report as Pandoc-compatible markdown.
func (*SLOReport) ToMatrixMarkdown ¶ added in v0.2.0
ToMatrixMarkdown renders a matrix view showing all metrics across maturity levels.
type SLOReportEntry ¶ added in v0.2.0
type SLOReportEntry struct {
Category string `json:"category"`
MetricID string `json:"metricId"`
MetricName string `json:"metricName"`
Domain string `json:"domain"`
Stage string `json:"stage"`
Unit string `json:"unit"`
Level int `json:"level"`
LevelName string `json:"levelName"`
GoalID string `json:"goalId"`
GoalName string `json:"goalName"`
Operator string `json:"operator"`
Value float64 `json:"value"`
Requirement string `json:"requirement"` // Human-readable: ">=99.9%"
Description string `json:"description"`
}
SLOReportEntry is a flattened row for tabular output (XLSX, CSV).
type SLORequirement ¶ added in v0.2.0
type SLORequirement struct {
MetricID string `json:"metricId"`
Description string `json:"description,omitempty"`
}
SLORequirement specifies an SLO that must be met for a maturity level.
type ScoreBreakdown ¶
type ScoreBreakdown struct {
DomainBreakdown map[string]DomainScoreBreakdown `json:"domainBreakdown"`
StageBreakdown map[string]StageScoreBreakdown `json:"stageBreakdown"`
}
ScoreBreakdown provides detailed breakdown of score components.
type ScoreConfig ¶
type ScoreConfig struct {
MaturityWeight float64 `json:"maturityWeight"`
PerformanceWeight float64 `json:"performanceWeight"`
StageWeights map[string]float64 `json:"stageWeights"`
DomainWeights map[string]float64 `json:"domainWeights"`
SkipEmptyCells bool `json:"skipEmptyCells"` // Skip cells with no data (default: true)
UseGoalMaturity bool `json:"useGoalMaturity"` // Use goal maturity instead of global cells
ScopedDomains []string `json:"scopedDomains"` // Only score these domains (empty = all)
ScopedStages []string `json:"scopedStages"` // Only score these stages (empty = all)
}
ScoreConfig configures the PRISM score calculation.
Weight Normalization Behavior ¶
Cell weights are calculated as: DomainWeight × StageWeight
With default config (domain weights 0.5/0.5, stage weights summing to 1.0), each cell weight ranges from 0.075 to 0.15. The total weight across all 10 cells (2 domains × 5 stages) sums to 0.5 (not 1.0).
The final BaseScore divides weightedSum by totalWeight, which normalizes the result. This means:
- If both domains have equal stage coverage, domain weights are effectively irrelevant (they cancel out in the normalization)
- Domain weights only affect the score when domains have different coverage
- To make domain weights meaningful, either: (a) Have different numbers of metrics per domain, or (b) Use domain-specific subscores (SecurityScore, OperationsScore)
The awareness multiplier is applied after normalization:
Overall = BaseScore × AwarenessScore
Sparse Data Handling ¶
By default, SkipEmptyCells is true, which means cells with no metrics AND no maturity data are excluded from the weighted average. This prevents sparse data from unfairly penalizing the score.
Set SkipEmptyCells to false to include all cells (original behavior).
Goal-Based Maturity ¶
Set UseGoalMaturity to true to derive maturity scores from goals instead of the global maturity model. This is useful when goals have maturity levels defined but the global maturity cells are empty.
func DefaultScoreConfig ¶
func DefaultScoreConfig() *ScoreConfig
DefaultScoreConfig returns the default score configuration. By default, empty cells are skipped to avoid penalizing sparse data.
func LegacyScoreConfig ¶ added in v0.3.0
func LegacyScoreConfig() *ScoreConfig
LegacyScoreConfig returns the original score configuration that includes all cells (even empty ones) in the calculation. Use this for backwards compatibility with older scoring behavior.
func (*ScoreConfig) GetDomainWeight ¶
func (c *ScoreConfig) GetDomainWeight(domain string) float64
GetDomainWeight returns the weight for a domain, defaulting to equal weight.
func (*ScoreConfig) GetScopedDomains ¶ added in v0.3.0
func (c *ScoreConfig) GetScopedDomains() []string
GetScopedDomains returns domains to score, defaulting to all domains.
func (*ScoreConfig) GetScopedStages ¶ added in v0.3.0
func (c *ScoreConfig) GetScopedStages() []string
GetScopedStages returns stages to score, defaulting to all stages.
func (*ScoreConfig) GetStageWeight ¶
func (c *ScoreConfig) GetStageWeight(stage string) float64
GetStageWeight returns the weight for a stage, defaulting to equal weight.
type Service ¶ added in v0.3.0
type Service struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
// Ownership
OwnerTeamID string `json:"ownerTeamId,omitempty"` // Team responsible for this service
LayerID string `json:"layerId,omitempty"` // Primary layer (code, infra, runtime)
// Metrics associated with this service
MetricIDs []string `json:"metricIds,omitempty"`
// Additional metadata
Repository string `json:"repository,omitempty"` // Git repository URL
Tier string `json:"tier,omitempty"` // Service tier (tier1, tier2, tier3)
}
Service represents a deployable service or application owned by a team.
func (*Service) Validate ¶ added in v0.3.0
func (s *Service) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a Service and returns validation errors.
type StageScoreBreakdown ¶
type StageScoreBreakdown struct {
Score float64 `json:"score"`
Weight float64 `json:"weight"`
MetricCount int `json:"metricCount"`
}
StageScoreBreakdown breaks down scores by stage.
type Swimlane ¶ added in v0.2.0
type Swimlane struct {
ID string `json:"id,omitempty"`
Name string `json:"name"`
Domain string `json:"domain,omitempty"` // security, operations
Stage string `json:"stage,omitempty"` // design, build, test, runtime, response
InitiativeIDs []string `json:"initiativeIds"`
}
Swimlane organizes initiatives within a phase by domain or stage.
func (*Swimlane) Validate ¶ added in v0.2.0
func (sw *Swimlane) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a Swimlane and returns validation errors.
type Team ¶ added in v0.3.0
type Team struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Type string `json:"type"` // stream_aligned, platform, enabling, overlay
// Domain accountability (for overlay/enabling teams)
Domain string `json:"domain,omitempty"` // security, operations, quality
// Layer accountability (which layers this team is responsible for)
LayerAccountability []string `json:"layerAccountability,omitempty"` // code, infra, runtime
// Service ownership (for stream-aligned teams)
ServiceIDs []string `json:"serviceIds,omitempty"`
// Contact information
Owner string `json:"owner,omitempty"`
Slack string `json:"slack,omitempty"`
Email string `json:"email,omitempty"`
}
Team represents a team in the organization following Team Topologies patterns.
func (*Team) Validate ¶ added in v0.3.0
func (t *Team) Validate(doc *PRISMDocument) ValidationErrors
Validate validates a Team and returns validation errors.
type Thresholds ¶
type Thresholds struct {
Green float64 `json:"green"`
Yellow float64 `json:"yellow"`
Red float64 `json:"red"`
}
Thresholds defines threshold values for status calculation.
type ValidationError ¶
ValidationError represents a validation error with context.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors is a collection of validation errors.
func (ValidationErrors) Error ¶
func (ve ValidationErrors) Error() string
func (ValidationErrors) HasErrors ¶
func (ve ValidationErrors) HasErrors() bool
HasErrors returns true if there are any validation errors.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package analysis provides analysis and reporting capabilities for PRISM documents.
|
Package analysis provides analysis and reporting capabilities for PRISM documents. |
|
cmd
|
|
|
prism
command
Package main provides the prism CLI tool for working with PRISM documents.
|
Package main provides the prism CLI tool for working with PRISM documents. |
|
Package dashforge provides conversion from PRISM documents to Dashforge dashboard IR.
|
Package dashforge provides conversion from PRISM documents to Dashforge dashboard IR. |
|
Package export provides converters for exporting PRISM data to other formats.
|
Package export provides converters for exporting PRISM data to other formats. |
|
Package maturity provides types and functions for maturity model management.
|
Package maturity provides types and functions for maturity model management. |
|
cmd
command
Command-line tool for generating maturity reports.
|
Command-line tool for generating maturity reports. |
|
Package output provides formatting utilities for PRISM data output.
|
Package output provides formatting utilities for PRISM data output. |
|
Package report provides report generation for PRISM documents.
|
Package report provides report generation for PRISM documents. |
|
Package scaffold provides templates for creating new PRISM documents.
|
Package scaffold provides templates for creating new PRISM documents. |
|
Package schema provides embedded JSON Schema for PRISM types.
|
Package schema provides embedded JSON Schema for PRISM types. |