prism

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: MIT Imports: 9 Imported by: 0

README

PRISM Intelligence

Go CI Go Lint Go SAST Go Report Card Docs Docs License

Platform for Reliability, Improvement, and Strategic Maturity

PRISM is an Operational Product Management platform for COO-level organizational health monitoring. It provides a unified framework for B2B SaaS health metrics that combines SLOs, maturity modeling, and OKRs into a single coherent system. PRISM enables organizations to understand current health and drive improvement projects across operations, security, quality, product, and AI domains.

Concepts

PRISM organizes metrics using a multi-dimensional model that clarifies ownership, accountability, and measurement across your organization.

The PRISM Model
┌─────────────────────────────────────────────────────────────────────────────┐
│                              VALUE STREAM LAYERS                            │
│                          (Where in the value stream?)                       │
│                                                                             │
│  Requirements → Code → Infra → Runtime → Adoption → Support                 │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
                                      │
        ┌─────────────────────────────┼─────────────────────────────┐
        │                             │                             │
        ▼                             ▼                             ▼
  ┌───────────┐                ┌───────────┐                ┌───────────┐
  │ OPERATIONS│                │ SECURITY  │                │  QUALITY  │
  │  Domain   │                │  Domain   │                │  Domain   │
  └───────────┘                └───────────┘                └───────────┘
        │                             │                             │
        └─────────────────────────────┼─────────────────────────────┘
                                      │
┌─────────────────────────────────────────────────────────────────────────────┐
│                           LIFECYCLE STAGES                                  │
│                        (When in delivery cycle?)                            │
│                                                                             │
│            Design → Build → Test → Runtime → Response                       │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘
Domains

Domains represent functional areas with their own standards and overlay teams:

Domain Description Overlay Team
operations Reliability, performance, efficiency SRE/Platform
security AppSec, CloudSec, compliance Security
quality Testing, code quality, defects QE
Layers

Layers represent the full value stream from ideation to support:

Layer Description Typical Owner
requirements Product ideation, specs, design Product/Design
code Application code, libraries, dependencies Stream-aligned teams
infra Cloud resources, networking, platform Platform team
runtime Running services, production workloads Stream-aligned + SRE
adoption Product analytics, user engagement Product/Growth
support Customer support, incident management Support/CS
Teams (Team Topologies)

PRISM supports Team Topologies patterns for clear accountability:

Type Role Example
stream_aligned Build and run services end-to-end Payments Team
platform Provide infrastructure as a product Platform Engineering
enabling Help teams adopt new practices Developer Experience
overlay Define standards across organization Security Team, QE Team
Services

Services are deployable units owned by teams with associated metrics:

{
  "id": "payments-api",
  "name": "Payments API",
  "ownerTeamId": "payments-team",
  "layerId": "runtime",
  "tier": "tier1",
  "metricIds": ["slo-payments-availability", "slo-payments-latency"]
}
Connecting to SLOs and Maturity

The organizational model connects to SLOs and maturity roadmaps:

  1. Metrics belong to a domain, layer, and optionally a service
  2. SLOs are defined on metrics with machine-evaluable targets
  3. Goals aggregate SLO requirements into maturity levels
  4. Teams own services and are accountable for their SLOs
  5. Phases organize goal progression over time (quarters)
Team owns → Service has → Metrics with → SLOs required by → Goals tracked in → Phases

Installation

go install github.com/grokify/prism-intelligence/cmd/prism@latest

Or add as a library dependency:

go get github.com/grokify/prism-intelligence

CLI Usage

Initialize a new PRISM document
# Create default document with operations metrics
prism init

# Create operations-focused document
prism init -d operations -o ops.json
Validate a document
prism validate prism.json
Calculate PRISM score
# Basic score
prism score prism.json

# Detailed breakdown
prism score prism.json --detailed

# JSON output
prism score prism.json --json
List available constants
prism catalog
Goal commands (v0.2.0)
# List all goals
prism goal list prism.json

# Show goal details
prism goal show goal-reliability prism.json

# Show goal progress with SLO compliance
prism goal progress goal-reliability prism.json
Phase commands (v0.2.0)
# List all phases
prism phase list prism.json

# Show phase details
prism phase show phase-q1-2026 prism.json

# Show enter/exit metrics for a phase
prism phase metrics phase-q1-2026 prism.json
Roadmap commands (v0.2.0)
# Show roadmap overview
prism roadmap show prism.json

# Show progress across all phases and goals
prism roadmap progress prism.json
Initiative commands (v0.3.0)
# List all initiatives by status
prism initiative list prism.json

# List initiatives by phase
prism initiative list prism.json --by-phase

# List initiatives by goal
prism initiative list prism.json --by-goal

# Show initiative details
prism initiative show prism.json init-monitoring
Report commands (v0.2.0)
# Generate SLO compliance report
prism slo-report prism.json

# Convert to dashforge format
prism dashforge prism.json -o dashforge.json
Layer commands (v0.3.0)
# List all layers
prism layer list prism.json

# Show layer details with metrics
prism layer show prism.json runtime
Team commands (v0.3.0)
# List all teams grouped by type
prism team list prism.json

# Show team details with services
prism team show prism.json payments-team
Service commands (v0.3.0)
# List all services grouped by layer
prism service list prism.json

# Show service details with metrics
prism service show prism.json payments-api
Analyze command (v0.3.0)
# Analyze document and show gaps
prism analyze prism.json

# Output as JSON for automation
prism analyze prism.json -f json

# Generate LLM prompt for initiative recommendations
prism analyze prism.json -f prompt
Export commands (v0.3.0)
# Export as OKR document
prism export okr prism.json -o roadmap.okr.json

# Export as V2MOM document
prism export v2mom prism.json -o roadmap.v2mom.json
Maturity commands (v0.6.0)
# Model commands - work with maturity model documents
prism maturity model report model.json -o report.md
prism maturity model xlsx model.json -o report.xlsx
prism maturity model dashboard model.json --state state.json -f html -o dashboard.html
prism maturity model validate model.json
prism maturity model lint model.json              # Check for dashboard display issues
prism maturity model lint model.json --strict     # Treat warnings as errors

# State commands - work with maturity state documents
prism maturity state validate state.json --model model.json
prism maturity state show state.json --model model.json

# Plan commands - work with maturity plan documents
prism maturity plan dashboard plan.json -f html -o dashboard.html
prism maturity plan report plan.json -o roadmap.md

Schema Overview

Domains

PRISM organizes metrics into three primary domains:

Domain Description
operations Reliability, performance, and efficiency metrics
security Application and infrastructure security metrics
quality Code quality, testing, and defect management metrics
Layers

Metrics are classified by value stream layer:

Layer Description
requirements Product ideation, specifications, and design
code Application code, libraries, and dependencies
infra Cloud resources, networking, and platform services
runtime Running services, containers, and workloads
adoption Product analytics, user engagement, and self-service
support Customer support, incident management, and escalations
Lifecycle Stages

Metrics are mapped to software delivery lifecycle stages:

Stage Description
design Architecture, requirements, planning
build CI/CD, code quality, dependency management
test Testing coverage, quality assurance
runtime Production monitoring, availability, performance
response Incident response, remediation, recovery
Categories
Category Description
prevention Proactive controls that prevent issues
detection Monitoring and alerting capabilities
response Incident handling and remediation
reliability Availability and durability
efficiency Performance and resource utilization
quality Code and process quality
Metric Types
Type Description Example
coverage Percentage of coverage Test coverage
rate Frequency or percentage Error rate
latency Time duration P99 latency, MTTR
ratio Proportion Success ratio
count Absolute count Deployment count
distribution Statistical distribution Latency percentiles
score Composite score Health score

Example Metric

{
  "id": "ops-availability",
  "name": "Service Availability",
  "description": "Percentage of time the service is available",
  "domain": "operations",
  "stage": "runtime",
  "category": "reliability",
  "layer": "runtime",
  "serviceId": "payments-api",
  "metricType": "rate",
  "trendDirection": "higher_better",
  "unit": "%",
  "baseline": 99.0,
  "current": 99.95,
  "target": 99.99,
  "thresholds": {
    "green": 99.95,
    "yellow": 99.9,
    "red": 99.0
  },
  "slo": {
    "target": ">=99.99%",
    "operator": "gte",
    "value": 99.99,
    "window": "30d"
  },
  "frameworkMappings": [
    {"framework": "SRE", "reference": "availability-slo"},
    {"framework": "DORA", "reference": "availability"}
  ]
}

PRISM Score Calculation

The PRISM score combines maturity levels, metric performance, and customer awareness into a composite health score (0.0-1.0).

Formula
CellScore = (MaturityWeight × MaturityScore) + (PerformanceWeight × PerformanceScore)
BaseScore = Σ(CellScore × Weight) / Σ(Weight)
Overall = BaseScore × AwarenessScore
Default Weights

Component weights:

  • Maturity: 40%
  • Performance: 60%

Stage weights:

  • Design: 15%
  • Build: 20%
  • Test: 15%
  • Runtime: 30%
  • Response: 20%

Domain weights:

  • Security: 50%
  • Operations: 50%
Score Interpretation
Score Level Description
≥0.90 Elite Industry-leading practices
≥0.75 Strong Well-managed, proactive
≥0.50 Medium Adequate, room for improvement
≥0.25 Weak Significant gaps
<0.25 Critical Immediate attention required

Maturity Levels

PRISM uses a 5-level maturity model:

Level Name Description
1 Reactive Ad-hoc processes, firefighting mode
2 Basic Basic controls, some documentation
3 Defined Standardized processes, consistent execution
4 Managed Data-driven, measured and controlled
5 Optimizing Continuous improvement, automated optimization

Framework Mappings

PRISM metrics can be mapped to external frameworks:

Framework Constant Description
NIST CSF 1.1 NIST_CSF NIST Cybersecurity Framework 1.1
NIST CSF 2.0 NIST_CSF_2 NIST Cybersecurity Framework 2.0
NIST 800-53 NIST_800_53 Security and Privacy Controls
NIST RMF NIST_RMF Risk Management Framework
NIST AI RMF NIST_AI_RMF AI Risk Management Framework
FedRAMP High FEDRAMP_HIGH FedRAMP High baseline
FedRAMP Moderate FEDRAMP_MOD FedRAMP Moderate baseline
FedRAMP Low FEDRAMP_LOW FedRAMP Low baseline
MITRE ATT&CK MITRE_ATTACK Threat framework
CIS Controls CIS_CONTROLS Critical Security Controls
SOC 2 SOC_2 Trust Services Criteria
ISO 27001 ISO_27001 Information Security Management
DORA DORA DevOps Research and Assessment
SRE SRE Site Reliability Engineering

JSON Schema

PRISM uses three JSON Schemas representing the Model → State → Plan workflow:

Schema Purpose Question Answered
prism-maturity-model.schema.json Definitions What does good look like?
prism-maturity-state.schema.json Measurement Where are we now?
prism-maturity-plan.schema.json Execution How do we get there?

Schemas are auto-generated from Go types:

cd schema && go run generate.go && go run generate_maturity.go && go run generate_state.go

Use in your editor for validation:

{
  "$schema": "https://github.com/grokify/prism-intelligence/schema/prism-maturity-model.schema.json",
  "metadata": { "name": "My Maturity Model" },
  "slis": {...},
  "domains": {...}
}

Goal-Driven Maturity Roadmap

PRISM supports goal-driven maturity tracking with multi-phase roadmaps.

Goals

Goals represent strategic objectives with their own 5-level maturity models:

{
  "id": "goal-reliability",
  "name": "Achieve High Reliability",
  "owner": "VP Engineering",
  "currentLevel": 3,
  "targetLevel": 4,
  "maturityModel": {
    "levels": [
      {
        "level": 3,
        "name": "Defined",
        "requiredSLOs": [
          { "metricId": "ops-availability" },
          { "metricId": "ops-mttr" }
        ],
        "metricCriteria": [
          { "metricId": "ops-availability", "operator": "gte", "value": 99.5 }
        ]
      }
    ]
  }
}

Each maturity level specifies which SLOs must be met to achieve that level.

Phases

Phases organize work into time-bounded periods (quarters) with goal targets:

{
  "id": "phase-q1-2026",
  "name": "Q1 2026",
  "quarter": "Q1",
  "year": 2026,
  "startDate": "2026-01-01",
  "endDate": "2026-03-31",
  "goalTargets": [
    { "goalId": "goal-reliability", "enterLevel": 2, "exitLevel": 3 }
  ],
  "swimlanes": [
    {
      "name": "Platform Initiatives",
      "domain": "operations",
      "initiativeIds": ["init-monitoring", "init-ci-cd"]
    }
  ]
}
Initiatives

Initiatives link to goals and phases with deployment tracking:

{
  "id": "init-monitoring",
  "name": "Observability Platform",
  "goalIds": ["goal-reliability"],
  "phaseId": "phase-q1-2026",
  "status": "completed",
  "deploymentStatus": {
    "status": "completed",
    "totalCustomers": 50,
    "deployedCustomers": 50,
    "adoptionPercent": 100
  }
}

PRISM Ecosystem

PRISM Intelligence is part of the PRISM ecosystem, a unified framework for capability-driven organizational intelligence.

┌─────────────────────────────────────────────────────────────────────┐
│                           prism-core                                │
│      Shared primitives: Domain, Layer, Stage, MaturityLevel,        │
│      TeamType, TrendDirection, Person, Status, Priority             │
└─────────────────────────────────────────────────────────────────────┘
                                   │
         ┌─────────────────────────┼─────────────────────────┐
         │                         │                         │
         ▼                         ▼                         ▼
┌───────────────────┐    ┌───────────────────┐    ┌───────────────────┐
│ PRISM Capability  │    │ PRISM Intelligence│    │ PRISM Execution   │
│                   │    │                   │    │                   │
│  "What we need"   │───▶│ "How we measure"  │───▶│  "How we act"     │
│                   │    │                   │    │                   │
│ Capability stacks │    │ SLIs, SLOs        │    │ OKRs, V2MOM       │
│ Layers, domains   │    │ Maturity models   │    │ Roadmaps          │
│ Dependencies      │    │ Maturity state    │    │ Initiatives       │
└───────────────────┘    └───────────────────┘    └───────────────────┘
Module Purpose Key Artifacts
prism-core Shared primitives Domain, Layer, Stage, MaturityLevel, TeamType
prism-capability What capabilities exist Capability stacks, layers, dependencies
prism-intelligence How we measure maturity SLI/SLO definitions, maturity state
prism-execution How we improve OKRs, V2MOM, roadmaps, initiatives

Integration with PRISM Execution

PRISM Intelligence integrates with prism-execution to provide a complete operational planning workflow. PRISM Intelligence serves as the source of truth for requirements (maturity models, SLOs), while PRISM Execution handles execution tracking (OKRs, roadmaps).

Architecture
┌─────────────────────────────────────────────────────────────────┐
│               PRISM Intelligence (Source of Truth)              │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐           │
│  │    Goals     │  │   Maturity   │  │     SLOs     │           │
│  │              │  │    Models    │  │              │           │
│  │ "Reliability"│  │  M1→M2→M3→M4 │  │ avail>=99.9% │           │
│  └──────────────┘  └──────────────┘  └──────────────┘           │
└───────────────────────────┬─────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────────┐
│                      LLM Analysis Layer                         │
│                                                                 │
│  Input: PRISM requirements + context (team capacity, etc.)      │
│  Output: Suggested initiatives, phase mapping, dependencies     │
│                                                                 │
│  "To reach M3 reliability by Q2, you need:                      │
│   - Q1: Observability platform (enables SLO measurement)        │
│   - Q1: Incident runbooks (reduces MTTR)                        │
│   - Q2: SLO dashboards (tracks compliance)"                     │
└───────────────────────────┬─────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────────────┐
│                   PRISM Execution (Execution)                   │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐           │
│  │     OKR      │  │   V2MOM      │  │   Roadmap    │           │
│  │              │  │              │  │              │           │
│  │ Objectives   │  │ Methods      │  │ Phases       │           │
│  │ Key Results  │  │ Measures     │  │ Deliverables │           │
│  └──────────────┘  └──────────────┘  └──────────────┘           │
└─────────────────────────────────────────────────────────────────┘
Data Flow
PRISM Intelligence PRISM Execution
Goal OKR Objective
Goal.TargetLevel Objective Target
SLO (per maturity level) Key Result
Phase.GoalTargets PhaseTargets in Key Results
Initiative Deliverable (in roadmap phase)
Workflow
  1. Define requirements in PRISM Intelligence - Goals, maturity models, SLOs
  2. Analyze with LLM - Generate initiative recommendations to achieve targets
  3. Export to PRISM Execution - OKR/V2MOM/Roadmap format
  4. Track execution - Monitor progress against phase targets
# Analyze PRISM document and suggest initiatives
prism analyze prism.json

# Export as OKR document for prism-execution
prism export okr prism.json -o roadmap.okr.json

# Export as V2MOM document
prism export v2mom prism.json -o roadmap.v2mom.json

Examples

See the examples/ directory for PRISM document types organized by domain:

Domain Examples

Each domain directory contains Model, State, and Plan files:

Domain Model State Plan
operations/ Level definitions Q2 2026 tracking Goals & roadmap
security/ Level definitions Q2 2026 tracking -
organization/ Multi-domain model Q1 2026 tracking -
quality/ - - Quality metrics plan
Additional Plan Examples (examples/prism-documents/)
  • operations-metrics.json - Operations-focused metrics (DORA, SLOs)
  • operations-layers.json - Layer-based metric organization
  • team-topology.json - Full team topology with services
  • quality-metrics.json - Quality domain with ISO 25010 verticals
  • goal-roadmap.json - Goal-driven maturity roadmap

Library Usage

package main

import (
    "encoding/json"
    "fmt"
    "os"

    "github.com/grokify/prism-intelligence"
)

func main() {
    // Load document
    data, _ := os.ReadFile("prism.json")
    var doc prism.PRISMDocument
    json.Unmarshal(data, &doc)

    // Validate
    if errs := doc.Validate(); errs.HasErrors() {
        fmt.Println("Validation errors:", errs)
        return
    }

    // Calculate score
    score := doc.CalculatePRISMScore(nil, nil)
    fmt.Printf("PRISM Score: %.1f%% (%s)\n", score.Overall*100, score.Interpretation)

    // Check individual metrics
    for _, m := range doc.Metrics {
        status := m.CalculateStatus()
        meetsSLO := m.MeetsSLO()
        fmt.Printf("  %s: %s (SLO met: %v)\n", m.Name, status, meetsSLO)
    }
}

License

MIT

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

View Source
const (
	DomainSecurity   = core.DomainSecurity
	DomainOperations = core.DomainOperations
	DomainQuality    = core.DomainQuality
)

Domain constants represent the three primary domains in PRISM. Note: prism-core has 10 domains; prism-intelligence uses these 3 primary ones.

View Source
const (
	LayerRequirements = core.LayerRequirements
	LayerCode         = core.LayerCode
	LayerInfra        = core.LayerInfra
	LayerRuntime      = core.LayerRuntime
	LayerAdoption     = core.LayerAdoption
	LayerSupport      = core.LayerSupport
)

Layer constants imported from prism-core.

View Source
const (
	QualityVerticalFunctional      = "functional"
	QualityVerticalReliability     = "reliability"
	QualityVerticalPerformance     = "performance"
	QualityVerticalSecurity        = "security"
	QualityVerticalUsability       = "usability"
	QualityVerticalMaintainability = "maintainability"
)

QualityVertical constants based on ISO 25010 quality characteristics. These are prism-intelligence-specific.

View Source
const (
	StageDesign   = core.StageDesign
	StageBuild    = core.StageBuild
	StageTest     = core.StageTest
	StageRuntime  = core.StageRuntime
	StageResponse = core.StageResponse
)

Lifecycle stage constants imported from prism-core.

View Source
const (
	CategoryPrevention  = "prevention"
	CategoryDetection   = "detection"
	CategoryResponse    = "response"
	CategoryReliability = "reliability"
	CategoryEfficiency  = "efficiency"
	CategoryQuality     = "quality"
)

Category constants represent metric categories. These are prism-intelligence-specific.

View Source
const (
	MaturityLevel1 = core.MaturityLevel1 // Reactive
	MaturityLevel2 = core.MaturityLevel2 // Basic
	MaturityLevel3 = core.MaturityLevel3 // Defined
	MaturityLevel4 = core.MaturityLevel4 // Managed
	MaturityLevel5 = core.MaturityLevel5 // Optimizing
)

Maturity level constants imported from prism-core.

View Source
const (
	AwarenessUnaware          = "unaware"
	AwarenessAwareNotActing   = "aware_not_remediating"
	AwarenessAwareRemediating = "aware_remediating"
	AwarenessAwareRemediated  = "aware_remediated"
)

Customer awareness state constants. These are prism-intelligence-specific.

View Source
const (
	// NIST Frameworks
	FrameworkNISTCSF    = core.FrameworkNISTCSF
	FrameworkNISTCSF2   = core.FrameworkNISTCSF2
	FrameworkNIST80053  = core.FrameworkNIST80053
	FrameworkNISTRMF    = core.FrameworkNISTRMF
	FrameworkNISTAIRMF  = core.FrameworkNISTAIRMF
	FrameworkNIST800171 = core.FrameworkNIST800171

	// FedRAMP (uses NIST 800-53 controls)
	FrameworkFEDRAMP     = "FEDRAMP" // FedRAMP (general) - prism-intelligence-specific
	FrameworkFEDRAMPHigh = core.FrameworkFedRAMPHigh
	FrameworkFEDRAMPMod  = core.FrameworkFedRAMPMod
	FrameworkFEDRAMPLow  = core.FrameworkFedRAMPLow

	// Other Security Frameworks
	FrameworkMITREATTACK = core.FrameworkMITREATTACK
	FrameworkCISControls = core.FrameworkCISControls
	FrameworkSOC2        = core.FrameworkSOC2
	FrameworkISO27001    = core.FrameworkISO27001

	// Engineering Frameworks
	FrameworkDORA = core.FrameworkDORA
	FrameworkSRE  = core.FrameworkSRE
)

Framework constants imported from prism-core.

View Source
const (
	BaselineHigh     = "high"
	BaselineModerate = "moderate"
	BaselineLow      = "low"
)

Framework baseline/impact levels for NIST 800-53 and FedRAMP.

View Source
const (
	MetricTypeCoverage     = "coverage"
	MetricTypeRate         = "rate"
	MetricTypeLatency      = "latency"
	MetricTypeRatio        = "ratio"
	MetricTypeCount        = "count"
	MetricTypeDistribution = "distribution"
	MetricTypeScore        = "score"
)

Metric type constants. These are prism-intelligence-specific.

View Source
const (
	TrendHigherBetter = "higher_better"
	TrendLowerBetter  = "lower_better"
	TrendTargetValue  = "target_value"
)

Trend direction constants for threshold interpretation. Note: These are comparison semantics, distinct from prism-core's trend direction types.

View Source
const (
	StatusGreen  = "Green"
	StatusYellow = "Yellow"
	StatusRed    = "Red"
)

Status constants for metric health.

View Source
const (
	Window7Days  = "7d"
	Window30Days = "30d"
	Window90Days = "90d"
)

SLO window constants.

View Source
const (
	SLITypeAvailability = core.SLITypeAvailability
	SLITypeLatency      = core.SLITypeLatency
	SLITypeErrorRate    = core.SLITypeErrorRate
	SLITypeThroughput   = core.SLITypeThroughput
	SLITypeSaturation   = "saturation"  // prism-intelligence-specific
	SLITypeUtilization  = "utilization" // prism-intelligence-specific
	SLITypeQuality      = "quality"     // prism-intelligence-specific
	SLITypeFreshness    = core.SLITypeFreshness
)

SLI type constants classify SLIs by observability type. Note: prism-core has a similar set; these are prism-intelligence's SLI types.

View Source
const (
	MethodologyGoldenSignals = "GOLDEN_SIGNALS" // Google Golden Signals: latency, traffic, errors, saturation
	MethodologyRED           = "RED"            // Rate, Errors, Duration
	MethodologyUSE           = "USE"            // Utilization, Saturation, Errors
)

Methodology constants for standard observability methodologies.

View Source
const (
	GoalStatusActive    = "active"
	GoalStatusOnHold    = "on_hold"
	GoalStatusCompleted = "completed"
	GoalStatusCancelled = "cancelled"
)

Goal status constants.

View Source
const (
	PhaseStatusPlanning   = "planning"
	PhaseStatusInProgress = "in_progress"
	PhaseStatusCompleted  = "completed"
)

Phase status constants.

View Source
const (
	QuarterQ1 = "Q1"
	QuarterQ2 = "Q2"
	QuarterQ3 = "Q3"
	QuarterQ4 = "Q4"
)

Quarter constants.

View Source
const (
	SLOTypeQuantitative = "quantitative" // Default: numeric comparison
	SLOTypeQualitative  = "qualitative"  // Binary state tracking
)

SLO type constants.

View Source
const (
	SLOOperatorGTE    = "gte"    // Greater than or equal
	SLOOperatorLTE    = "lte"    // Less than or equal
	SLOOperatorEQ     = "eq"     // Equal
	SLOOperatorGT     = "gt"     // Greater than
	SLOOperatorLT     = "lt"     // Less than
	SLOOperatorExists = "exists" // Qualitative: metric exists/is tracked
)

SLO operator constants.

View Source
const (
	QualitativeStatusTracked     = "tracked"     // Metric is being tracked
	QualitativeStatusImplemented = "implemented" // Control/feature is implemented
	QualitativeStatusDefined     = "defined"     // Process/policy is defined
	QualitativeStatusDocumented  = "documented"  // Documentation exists
	QualitativeStatusCompliant   = "compliant"   // Meets compliance requirement
	QualitativeStatusEnabled     = "enabled"     // Feature/capability is enabled
	QualitativeStatusNotTracked  = "not_tracked" // Not yet being tracked
	QualitativeStatusPartial     = "partial"     // Partially implemented
	QualitativeStatusPlanned     = "planned"     // Planned but not started
)

Qualitative status constants.

View Source
const (
	InitiativeStatusPlanned    = "planned"
	InitiativeStatusNotStarted = "not_started"
	InitiativeStatusInProgress = "in_progress"
	InitiativeStatusCompleted  = "completed"
	InitiativeStatusCancelled  = "cancelled"
)

Initiative status constants.

View Source
const (
	SLOWindow7Days     = "7d"
	SLOWindow30Days    = "30d"
	SLOWindow90Days    = "90d"
	SLOWindowQuarterly = "quarterly"
	SLOWindowAnnual    = "annual"
)

SLOWindow represents a standard SLO measurement window.

View Source
const (
	EnablerStatusNotStarted = "not_started"
	EnablerStatusInProgress = "in_progress"
	EnablerStatusCompleted  = "completed"
	EnablerStatusBlocked    = "blocked"
)

EnablerStatus constants.

View Source
const (
	TeamTypeStreamAligned = core.TeamTypeStreamAligned
	TeamTypePlatform      = core.TeamTypePlatform
	TeamTypeEnabling      = core.TeamTypeEnabling
	TeamTypeOverlay       = core.TeamTypeOverlay
)

TeamType constants imported from prism-core (Team Topologies).

Variables

This section is empty.

Functions

func AllAwarenessStates

func AllAwarenessStates() []string

AllAwarenessStates returns all valid awareness state values.

func AllCategories

func AllCategories() []string

AllCategories returns all valid category values.

func AllDomains

func AllDomains() []string

AllDomains returns all valid domain values for prism-intelligence. Returns the 3 primary domains used in this module.

func AllFrameworks

func AllFrameworks() []string

AllFrameworks returns all valid framework values.

func AllGoalStatuses

func AllGoalStatuses() []string

AllGoalStatuses returns all valid goal status values.

func AllInitiativeStatuses

func AllInitiativeStatuses() []string

AllInitiativeStatuses returns all valid initiative status values.

func AllLayers

func AllLayers() []string

AllLayers returns all valid layer values in value stream order.

func AllMethodologies

func AllMethodologies() []string

AllMethodologies returns all valid methodology values.

func AllMetricTypes

func AllMetricTypes() []string

AllMetricTypes returns all valid metric type values.

func AllPhaseStatuses

func AllPhaseStatuses() []string

AllPhaseStatuses returns all valid phase status values.

func AllQualitativeStatuses

func AllQualitativeStatuses() []string

AllQualitativeStatuses returns all valid qualitative status values.

func AllQualityVerticals

func AllQualityVerticals() []string

AllQualityVerticals returns all valid ISO 25010 quality vertical values.

func AllQuarters

func AllQuarters() []string

AllQuarters returns all valid quarter values.

func AllSLITypes

func AllSLITypes() []string

AllSLITypes returns all valid SLI type values.

func AllSLOWindows

func AllSLOWindows() []string

AllSLOWindows returns all standard SLO windows.

func AllStages

func AllStages() []string

AllStages returns all valid stage values.

func AllStatuses

func AllStatuses() []string

AllStatuses returns all valid status values.

func AllTeamTypes

func AllTeamTypes() []string

AllTeamTypes returns all valid team type values.

func AllTrendDirections

func AllTrendDirections() []string

AllTrendDirections returns all valid trend direction values.

func AllWindows

func AllWindows() []string

AllWindows returns all valid SLO window values.

func CompareQualitativeStates

func CompareQualitativeStates(a, b string) int

CompareQualitativeStates compares two qualitative states. Returns -1 if a < b, 0 if a == b, 1 if a > b.

func ComplianceFrameworks

func ComplianceFrameworks() []string

ComplianceFrameworks returns compliance-focused frameworks.

func DefaultAwarenessStates

func DefaultAwarenessStates() []string

DefaultAwarenessStates returns the default four awareness states.

func FrameworkDisplayName added in v0.9.0

func FrameworkDisplayName(framework string) string

FrameworkDisplayName returns a human-readable name for a framework.

func GoldenSignalsSLITypes

func GoldenSignalsSLITypes() []string

GoldenSignalsSLITypes returns the SLI types that map to Google's Golden Signals. Golden Signals: Latency, Traffic, Errors, Saturation.

func InterpretScore

func InterpretScore(score float64) string

InterpretScore returns a human-readable interpretation of the PRISM score.

func MaturityLevelDescription added in v0.9.0

func MaturityLevelDescription(level int) string

MaturityLevelDescription returns a description for a maturity level.

func MaturityLevelName

func MaturityLevelName(level int) string

MaturityLevelName returns the name for a maturity level.

func MeetsQualitativeTarget

func MeetsQualitativeTarget(current, target string) bool

MeetsQualitativeTarget returns true if current state meets or exceeds target.

func MethodologiesForSLIType

func MethodologiesForSLIType(sliType string) []string

MethodologiesForSLIType returns the methodologies that include the given SLI type.

func NISTFrameworks

func NISTFrameworks() []string

NISTFrameworks returns NIST-specific frameworks.

func REDSLITypes

func REDSLITypes() []string

REDSLITypes returns the SLI types that map to the RED methodology. RED: Rate (throughput), Errors, Duration (latency).

func SLITypeDirection added in v0.9.0

func SLITypeDirection(sliType string) string

SLITypeDirection returns the default comparison direction for an SLI type.

func SLITypesForMethodology

func SLITypesForMethodology(methodology string) []string

SLITypesForMethodology returns the SLI types associated with a methodology. Returns nil for unknown methodologies.

func USESLITypes

func USESLITypes() []string

USESLITypes returns the SLI types that map to the USE methodology. USE: Utilization, Saturation, Errors.

func ValidDomain added in v0.9.0

func ValidDomain(domain string) bool

ValidDomain checks if a domain value is valid.

func ValidFramework added in v0.9.0

func ValidFramework(framework string) bool

ValidFramework checks if a framework value is valid.

func ValidLayer added in v0.9.0

func ValidLayer(layer string) bool

ValidLayer checks if a layer value is valid.

func ValidMaturityLevel added in v0.9.0

func ValidMaturityLevel(level int) bool

ValidMaturityLevel checks if a maturity level is valid (1-5).

func ValidStage added in v0.9.0

func ValidStage(stage string) bool

ValidStage checks if a stage value is valid.

func ValidTeamType added in v0.9.0

func ValidTeamType(teamType string) bool

ValidTeamType checks if a team type is valid.

func ValidateAwarenessState

func ValidateAwarenessState(state string) error

ValidateAwarenessState validates an awareness state value.

func ValidateCategory

func ValidateCategory(category string) error

ValidateCategory validates a category value.

func ValidateDomain

func ValidateDomain(domain string) error

ValidateDomain validates a domain value.

func ValidateFramework

func ValidateFramework(framework string) error

ValidateFramework validates a framework value.

func ValidateGoalStatus

func ValidateGoalStatus(status string) error

ValidateGoalStatus validates a goal status value.

func ValidateInitiativeStatus

func ValidateInitiativeStatus(status string) error

ValidateInitiativeStatus validates an initiative status value.

func ValidateLayer

func ValidateLayer(layer string) error

ValidateLayer validates a layer value.

func ValidateMaturityLevel

func ValidateMaturityLevel(level int) error

ValidateMaturityLevel validates a maturity level value.

func ValidateMethodology

func ValidateMethodology(methodology string) error

ValidateMethodology validates an observability methodology value.

func ValidateMetricType

func ValidateMetricType(metricType string) error

ValidateMetricType validates a metric type value.

func ValidatePhaseStatus

func ValidatePhaseStatus(status string) error

ValidatePhaseStatus validates a phase status value.

func ValidateQualityVertical

func ValidateQualityVertical(vertical string) error

ValidateQualityVertical validates an ISO 25010 quality vertical value.

func ValidateQuarter

func ValidateQuarter(quarter string) error

ValidateQuarter validates a quarter value.

func ValidateSLIType

func ValidateSLIType(sliType string) error

ValidateSLIType validates an SLI type value.

func ValidateSLOOperator

func ValidateSLOOperator(operator string) error

ValidateSLOOperator validates an SLO operator value.

func ValidateStage

func ValidateStage(stage string) error

ValidateStage validates a stage value.

func ValidateStatus

func ValidateStatus(status string) error

ValidateStatus validates a status value.

func ValidateTeamType

func ValidateTeamType(teamType string) error

ValidateTeamType validates a team type value.

func ValidateTrendDirection

func ValidateTrendDirection(trend string) error

ValidateTrendDirection validates a trend direction value.

func ValidateWindow

func ValidateWindow(window string) error

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

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

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

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

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

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

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

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 DomainMaturityState

type DomainMaturityState struct {
	DomainID string               `json:"domainId"`          // Reference to maturity model domain
	Current  *MaturityLevelState  `json:"current"`           // Current achieved level
	Target   *MaturityLevelTarget `json:"target,omitempty"`  // Target level
	History  []MaturityLevelState `json:"history,omitempty"` // Level progression history
}

DomainMaturityState tracks maturity level progression for a domain.

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 EnablerState

type EnablerState struct {
	EnablerID   string  `json:"enablerId"`             // Reference to maturity model enabler
	Status      string  `json:"status"`                // not_started, in_progress, completed, blocked
	Progress    float64 `json:"progress,omitempty"`    // Completion percentage (0-100)
	StartedAt   string  `json:"startedAt,omitempty"`   // When work started
	CompletedAt string  `json:"completedAt,omitempty"` // When completed
	Owner       string  `json:"owner,omitempty"`       // Who owns this enabler
	Note        string  `json:"note,omitempty"`        // Status notes
}

EnablerState tracks progress on an enabler (project/capability).

type EnablerStateMap

type EnablerStateMap map[string]*EnablerState

EnablerStateMap holds state for all enablers.

type ExecutiveDashboard

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"`             // Framework identifier (e.g., "NIST_CSF_2", "NIST_800_53")
	Reference   string `json:"reference"`             // Control or function ID (e.g., "PR.DS-1", "AC-2")
	Name        string `json:"name,omitempty"`        // Human-readable control name
	Description string `json:"description,omitempty"` // Control description
	Baseline    string `json:"baseline,omitempty"`    // Required baseline level (e.g., "high", "moderate", "low" for FedRAMP)
	Version     string `json:"version,omitempty"`     // Framework version (e.g., "2.0", "Rev 5")
}

FrameworkMapping maps a metric or SLO to an external framework reference. Supports compliance frameworks like NIST CSF, NIST 800-53, FedRAMP, etc.

type FrameworkRequirement

type FrameworkRequirement struct {
	Framework      string   `json:"framework"`                // Framework identifier
	ControlID      string   `json:"controlId"`                // Control ID (e.g., "AC-2", "PR.DS-1")
	ControlName    string   `json:"controlName,omitempty"`    // Human-readable name
	Baseline       string   `json:"baseline,omitempty"`       // Required baseline (high/moderate/low)
	MetricIDs      []string `json:"metricIds,omitempty"`      // Metrics that satisfy this control
	SLOIDs         []string `json:"sloIds,omitempty"`         // SLOs that satisfy this control
	Status         string   `json:"status,omitempty"`         // implemented, partial, planned, not_applicable
	Evidence       string   `json:"evidence,omitempty"`       // Evidence or documentation reference
	Implementation string   `json:"implementation,omitempty"` // Implementation description
}

FrameworkRequirement specifies a framework control requirement with satisfaction criteria.

type GapAnalysisEntry

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

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

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

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

func (g *Goal) MeetsLevelRequirements(level int, doc *PRISMDocument) bool

MeetsLevelRequirements returns whether all requirements for the specified maturity level are met.

func (*Goal) SLOsMetForLevel

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

func (g *Goal) Validate(doc *PRISMDocument) ValidationErrors

Validate validates a Goal and returns validation errors.

type GoalMaturityLevel

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

func (gml *GoalMaturityLevel) Validate(doc *PRISMDocument) ValidationErrors

Validate validates a GoalMaturityLevel and returns validation errors.

type GoalMaturityModel

type GoalMaturityModel struct {
	Levels []GoalMaturityLevel `json:"levels"`
}

GoalMaturityModel defines the 5-level maturity model for a specific goal.

func (*GoalMaturityModel) GetLevel

func (gmm *GoalMaturityModel) GetLevel(level int) *GoalMaturityLevel

GetLevel returns the maturity level definition for the specified level number.

func (*GoalMaturityModel) Validate

func (gmm *GoalMaturityModel) Validate(doc *PRISMDocument) ValidationErrors

Validate validates a GoalMaturityModel and returns validation errors.

type GoalMaturityStatus

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

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

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

func CalculateGoalProgress(goal *Goal, phase *Phase, doc *PRISMDocument) *GoalProgress

CalculateGoalProgress computes progress for a goal within a phase.

type GoalRoadmapView

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

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 HistoricalValue

type HistoricalValue struct {
	Window    string    `json:"window"`         // Which SLO window (7d, 30d, etc.)
	Value     float64   `json:"value"`          // Measured value
	Timestamp time.Time `json:"timestamp"`      // When measured
	Note      string    `json:"note,omitempty"` // Optional note
}

HistoricalValue represents a point-in-time measurement.

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

func (i *Initiative) IsDevComplete() bool

IsDevComplete returns whether the initiative is development complete.

func (*Initiative) IsFullyDeployed

func (i *Initiative) IsFullyDeployed() bool

IsFullyDeployed returns whether the initiative is fully deployed to all customers.

type InitiativeMetrics

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

func CalculateInitiativeMetrics(phase *Phase, doc *PRISMDocument) *InitiativeMetrics

CalculateInitiativeMetrics computes aggregate initiative metrics for a phase.

type InitiativeSummary

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

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. Note: Extends prism-core's LayerDef with GoldenSignal support.

func DefaultLayers

func DefaultLayers() []LayerDef

DefaultLayers returns the default layer definitions in value stream order.

func (*LayerDef) Validate

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 MaturityLevelState

type MaturityLevelState struct {
	Level      int    `json:"level"`                // Maturity level (1-5)
	AchievedAt string `json:"achievedAt,omitempty"` // When this level was achieved (ISO 8601)
	AssessedBy string `json:"assessedBy,omitempty"` // Who performed the assessment
	Note       string `json:"note,omitempty"`       // Assessment notes
}

MaturityLevelState represents a maturity level at a point in time.

type MaturityLevelTarget

type MaturityLevelTarget struct {
	Level      int    `json:"level"`                // Target maturity level (1-5)
	TargetDate string `json:"targetDate,omitempty"` // Target date (ISO 8601)
	Rationale  string `json:"rationale,omitempty"`  // Why this target was chosen
}

MaturityLevelTarget represents a target maturity level.

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 MaturityPlanDocument

type MaturityPlanDocument = PRISMDocument

MaturityPlanDocument is a PRISM Maturity Plan document that defines goals, phases, and initiatives for achieving maturity targets. This is the top-level document type for prism-maturity-plan.schema.json. Note: This is equivalent to the existing PRISMDocument type, which will be aliased to MaturityPlanDocument in a future version.

type MaturityStateDocument

type MaturityStateDocument struct {
	// Schema is the JSON Schema reference.
	Schema string `json:"$schema,omitempty"`

	// Metadata contains document identification and references.
	Metadata MaturityStateMetadata `json:"metadata"`

	// SLOWindows defines which temporal windows are tracked in this state document.
	SLOWindows []string `json:"sloWindows,omitempty"`

	// SLIState tracks current values for each SLI.
	SLIState SLIStateMap `json:"sliState,omitempty"`

	// MaturityState tracks maturity level progression for each domain.
	MaturityState MaturityStateMap `json:"maturityState,omitempty"`

	// EnablerState tracks progress on enablers/initiatives.
	EnablerState EnablerStateMap `json:"enablerState,omitempty"`
}

MaturityStateDocument is a PRISM Maturity State document that tracks current state against a maturity model. This is the top-level document type for prism-maturity-state.schema.json.

type MaturityStateMap

type MaturityStateMap map[string]*DomainMaturityState

MaturityStateMap holds maturity state for all domains.

type MaturityStateMetadata

type MaturityStateMetadata struct {
	// Name is the document name.
	Name string `json:"name"`

	// Description is an optional description.
	Description string `json:"description,omitempty"`

	// Version is the document version.
	Version string `json:"version,omitempty"`

	// MaturityModelRef is a reference to the maturity model this state tracks against.
	MaturityModelRef string `json:"maturityModelRef,omitempty"`

	// AssessedAt is when this state was assessed (ISO 8601).
	AssessedAt string `json:"assessedAt,omitempty"`

	// AssessedBy is who performed the assessment.
	AssessedBy string `json:"assessedBy,omitempty"`

	// Organization is the organization name.
	Organization string `json:"organization,omitempty"`
}

MaturityStateMetadata contains identification and reference information.

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 MethodologyCoverage

type MethodologyCoverage struct {
	Methodology   string              `json:"methodology"`
	RequiredTypes []string            `json:"requiredTypes"`           // SLI types required by this methodology
	CoveredTypes  []string            `json:"coveredTypes"`            // SLI types that have metrics
	MissingTypes  []string            `json:"missingTypes"`            // SLI types missing metrics
	ByType        map[string]int      `json:"byType"`                  // Count per SLI type
	MetricsByType map[string][]string `json:"metricsByType,omitempty"` // Metric IDs per SLI type
	CoverageRatio float64             `json:"coverageRatio"`           // Ratio of required types covered
	IsComplete    bool                `json:"isComplete"`              // True if all required types are covered
}

MethodologyCoverage represents coverage for a specific observability methodology.

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

func (m *Metric) CalculateStatus() string

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

func (m *Metric) MeetsSLO() bool

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

func (m *Metric) ProgressToTarget() float64

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

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

func (mc *MetricCriterion) IsMet(current float64) bool

IsMet returns whether the criterion is met given the current metric value.

func (*MetricCriterion) Validate

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"`

	// Temporal State Tracking (REFACTOR_MATURITY_STATE)
	// Reference to the maturity model this document tracks against
	MaturityModelRef string `json:"maturityModelRef,omitempty"`

	// Standard SLO windows used in this document
	SLOWindows []string `json:"sloWindows,omitempty"`

	// SLI state with temporal tracking (past, present, future)
	SLIState SLIStateMap `json:"sliState,omitempty"`

	// Maturity level state per domain
	MaturityState MaturityStateMap `json:"maturityState,omitempty"`

	// Enabler/initiative state
	EnablerState EnablerStateMap `json:"enablerState,omitempty"`
}

PRISMDocument represents the top-level PRISM document.

func (*PRISMDocument) AnalyzeAllMethodologyCoverage

func (doc *PRISMDocument) AnalyzeAllMethodologyCoverage() map[string]*MethodologyCoverage

AnalyzeAllMethodologyCoverage analyzes coverage for all observability methodologies.

func (*PRISMDocument) AnalyzeMethodologyCoverage

func (doc *PRISMDocument) AnalyzeMethodologyCoverage(methodology string) *MethodologyCoverage

AnalyzeMethodologyCoverage analyzes coverage for a specific observability methodology.

func (*PRISMDocument) AnalyzeSLICoverage

func (doc *PRISMDocument) AnalyzeSLICoverage() *SLITypeCoverage

AnalyzeSLICoverage analyzes SLI type coverage across all metrics.

func (*PRISMDocument) AnalyzeSLICoverageByLayer

func (doc *PRISMDocument) AnalyzeSLICoverageByLayer() map[string]*SLITypeCoverage

AnalyzeSLICoverageByLayer analyzes SLI type coverage grouped by layer.

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:

  1. 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)

  2. 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)

  3. Apply awareness multiplier (if provided): - Overall = BaseScore × AwarenessScore - AwarenessScore ranges from 0.0 (all unaware) to 1.0 (all remediated)

  4. 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

func (doc *PRISMDocument) GenerateExecutiveDashboard() *ExecutiveDashboard

GenerateExecutiveDashboard creates an executive dashboard from a PRISM document.

func (*PRISMDocument) GenerateGoalRoadmapView

func (doc *PRISMDocument) GenerateGoalRoadmapView(goalID string) *GoalRoadmapView

GenerateGoalRoadmapView creates a Goal-centric view for a specific goal.

func (*PRISMDocument) GeneratePhaseRoadmapView

func (doc *PRISMDocument) GeneratePhaseRoadmapView(phaseID string) *PhaseRoadmapView

GeneratePhaseRoadmapView creates a Phase-centric view for a specific phase.

func (*PRISMDocument) GenerateRoadmapReport

func (doc *PRISMDocument) GenerateRoadmapReport() *RoadmapReport

GenerateRoadmapReport creates a complete roadmap report with both views.

func (*PRISMDocument) GenerateSLOReport

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

func (doc *PRISMDocument) GetGoalByID(id string) *Goal

GetGoalByID returns a goal by its ID.

func (*PRISMDocument) GetInitiativeByID

func (doc *PRISMDocument) GetInitiativeByID(id string) *Initiative

GetInitiativeByID returns an initiative by its ID.

func (*PRISMDocument) GetInitiativesForGoal

func (doc *PRISMDocument) GetInitiativesForGoal(goalID string) []Initiative

GetInitiativesForGoal returns all initiatives linked to the specified goal.

func (*PRISMDocument) GetInitiativesForPhase

func (doc *PRISMDocument) GetInitiativesForPhase(phaseID string) []Initiative

GetInitiativesForPhase returns all initiatives in the specified phase.

func (*PRISMDocument) GetLayerByID

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

func (doc *PRISMDocument) GetMetricsByLayer(layer string) []Metric

GetMetricsByLayer returns all metrics for the specified layer.

func (*PRISMDocument) GetMetricsByMethodology

func (doc *PRISMDocument) GetMetricsByMethodology(methodology string) []Metric

GetMetricsByMethodology returns all metrics that belong to a specific methodology.

func (*PRISMDocument) GetMetricsBySLIType

func (doc *PRISMDocument) GetMetricsBySLIType(sliType string) []Metric

GetMetricsBySLIType returns all metrics with the specified SLI type.

func (*PRISMDocument) GetMetricsByService

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

func (doc *PRISMDocument) GetPhaseByID(id string) *Phase

GetPhaseByID returns a phase by its ID.

func (*PRISMDocument) GetPhasesSorted

func (doc *PRISMDocument) GetPhasesSorted() []Phase

GetPhasesSorted returns phases sorted by year and quarter.

func (*PRISMDocument) GetServiceByID

func (doc *PRISMDocument) GetServiceByID(id string) *Service

GetServiceByID returns a service by its ID.

func (*PRISMDocument) GetTeamByID

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

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

func (p *Phase) AllInitiativeIDs() []string

AllInitiativeIDs returns all initiative IDs across all swimlanes in this phase.

func (*Phase) GetGoalTarget

func (p *Phase) GetGoalTarget(goalID string) *PhaseGoalTarget

GetGoalTarget returns the goal target for the specified goal ID.

func (*Phase) GetSwimlane

func (p *Phase) GetSwimlane(swimlaneID string) *Swimlane

GetSwimlane returns the swimlane with the specified ID.

func (*Phase) Validate

func (p *Phase) Validate(doc *PRISMDocument) ValidationErrors

Validate validates a Phase and returns validation errors.

type PhaseGoalTarget

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

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

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

func CalculatePhaseMetrics(phase *Phase, doc *PRISMDocument) *PhaseMetrics

CalculatePhaseMetrics generates complete phase metrics.

type PhaseProgressSummary

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

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 QualitativeStateDefinition

type QualitativeStateDefinition struct {
	ID          string `json:"id"`                    // State identifier (e.g., "tracked")
	Label       string `json:"label"`                 // Human-readable label
	Description string `json:"description,omitempty"` // What this state means
	Order       int    `json:"order"`                 // Progression order (0 = lowest)
}

QualitativeStateDefinition defines a qualitative state for an SLI.

func StandardQualitativeStates

func StandardQualitativeStates() []QualitativeStateDefinition

StandardQualitativeStates returns the default progression of qualitative states.

type RoadmapConfig

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

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"`
	SLIType     string `json:"sliType,omitempty"` // Observability type: availability, latency, error_rate, etc.
}

SLI represents a Service Level Indicator.

func (*SLI) IsGoldenSignal

func (s *SLI) IsGoldenSignal() bool

IsGoldenSignal returns true if the SLI type is part of Google's Golden Signals.

func (*SLI) IsRED

func (s *SLI) IsRED() bool

IsRED returns true if the SLI type is part of the RED methodology.

func (*SLI) IsUSE

func (s *SLI) IsUSE() bool

IsUSE returns true if the SLI type is part of the USE methodology.

func (*SLI) Methodologies

func (s *SLI) Methodologies() []string

Methodologies returns all methodologies that include this SLI's type.

type SLIState

type SLIState struct {
	SLIID            string                  `json:"sliId"`                      // Reference to maturity model SLI
	QualitativeState string                  `json:"qualitativeState,omitempty"` // Current qualitative state (e.g., "tracked", "measured")
	Windows          map[string]*WindowState `json:"windows,omitempty"`          // State by window (7d, 30d, 90d, quarterly, annual)
	History          []HistoricalValue       `json:"history,omitempty"`          // Historical values over time
	Targets          map[string]*TargetValue `json:"targets,omitempty"`          // Future targets by period (e.g., "Q2_2026")
}

SLIState tracks temporal state for a single SLI.

type SLIStateMap

type SLIStateMap map[string]*SLIState

SLIStateMap holds state for all SLIs in a PRISM document.

type SLITypeCoverage

type SLITypeCoverage struct {
	TotalMetrics   int            `json:"totalMetrics"`
	MetricsWithSLI int            `json:"metricsWithSli"`
	ByType         map[string]int `json:"byType"`        // Count per SLI type
	MissingTypes   []string       `json:"missingTypes"`  // SLI types with no metrics
	CoverageRatio  float64        `json:"coverageRatio"` // Ratio of metrics with SLI type
}

SLITypeCoverage represents coverage statistics for SLI types.

type SLO

type SLO struct {
	// Identity
	ID   string `json:"id,omitempty"`   // Unique identifier for the SLO
	Name string `json:"name,omitempty"` // Human-readable name

	// Type distinguishes quantitative vs qualitative SLOs.
	// Quantitative SLOs have numeric targets (>=99.9%).
	// Qualitative SLOs track binary states (tracked, implemented, defined).
	Type string `json:"type,omitempty"` // "quantitative" (default), "qualitative"

	// Quantitative fields
	Target     string      `json:"target"`             // Display string (e.g., ">=99.9%")
	Operator   string      `json:"operator,omitempty"` // Machine-readable: "gte", "lte", "eq", "gt", "lt", "exists"
	Value      float64     `json:"value,omitempty"`    // Numeric target value
	Window     string      `json:"window,omitempty"`   // "7d", "30d", "90d"
	Thresholds *Thresholds `json:"thresholds,omitempty"`

	// Qualitative fields
	Status string `json:"status,omitempty"` // For qualitative: "tracked", "implemented", "defined", "documented", "not_tracked"

	// Framework mappings - maps this SLO to compliance framework controls
	FrameworkMappings []FrameworkMapping `json:"frameworkMappings,omitempty"`
}

SLO represents a Service Level Objective. SLOs can be quantitative (numeric targets) or qualitative (tracked states).

func (*SLO) IsMet

func (s *SLO) IsMet(current float64) bool

IsMet returns whether the SLO is met. For qualitative SLOs, checks if status indicates compliance. For quantitative SLOs, compares current value against target.

func (*SLO) IsQualitative

func (s *SLO) IsQualitative() bool

IsQualitative returns true if this is a qualitative SLO.

func (*SLO) IsQualitativeStatusMet

func (s *SLO) IsQualitativeStatusMet() bool

IsQualitativeStatusMet returns whether a qualitative SLO status indicates compliance.

type SLOCategoryGroup

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

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

func CalculateSLOCompliance(phase *Phase, doc *PRISMDocument) []SLOCompliance

CalculateSLOCompliance generates SLO compliance records for metrics associated with goals in a phase.

type SLOComplianceSummary

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

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

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

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

func (r *SLOReport) TableColumns() []string

TableColumns returns the column headers for tabular output.

func (*SLOReport) TableRows

func (r *SLOReport) TableRows() [][]string

TableRows returns the data rows for tabular output.

func (*SLOReport) ToMarkdown

func (r *SLOReport) ToMarkdown() string

ToMarkdown renders the report as Pandoc-compatible markdown.

func (*SLOReport) ToMarp

func (r *SLOReport) ToMarp() string

ToMarp renders the report as Marp presentation markdown.

func (*SLOReport) ToMatrixMarkdown

func (r *SLOReport) ToMatrixMarkdown() string

ToMatrixMarkdown renders a matrix view showing all metrics across maturity levels.

type SLOReportEntry

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

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

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

func (c *ScoreConfig) GetScopedDomains() []string

GetScopedDomains returns domains to score, defaulting to all domains.

func (*ScoreConfig) GetScopedStages

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

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

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

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

func (sw *Swimlane) Validate(doc *PRISMDocument) ValidationErrors

Validate validates a Swimlane and returns validation errors.

type TargetValue

type TargetValue struct {
	Value         float64 `json:"value"`                   // Target value
	MaturityLevel int     `json:"maturityLevel,omitempty"` // Target maturity level (1-5)
	TargetDate    string  `json:"targetDate,omitempty"`    // Target date (ISO 8601)
}

TargetValue represents a future target.

type Team

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

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

type ValidationError struct {
	Field   string
	Value   string
	Message string
}

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.

type WindowState

type WindowState struct {
	Value     float64   `json:"value"`               // Current measured value
	Target    float64   `json:"target,omitempty"`    // Target value for this window
	Met       bool      `json:"met,omitempty"`       // Whether target is met
	Timestamp time.Time `json:"timestamp,omitempty"` // When this was measured
}

WindowState represents the current value for a specific SLO window.

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 dashboard provides HTML dashboard generation for PRISM maturity models.
Package dashboard provides HTML dashboard generation for PRISM maturity models.
Package dashforge provides conversion from PRISM documents to Dashforge dashboard IR.
Package dashforge provides conversion from PRISM documents to Dashforge dashboard IR.
Package dmaic provides types and utilities for DMAIC (Define, Measure, Analyze, Improve, Control) metrics framework documents.
Package dmaic provides types and utilities for DMAIC (Define, Measure, Analyze, Improve, Control) metrics framework documents.
render
Package render provides interfaces and utilities for rendering DMAIC documents to various output formats including Marp slides.
Package render provides interfaces and utilities for rendering DMAIC documents to various output formats including Marp slides.
render/marp
Package marp provides a Marp markdown renderer for DMAIC documents.
Package marp provides a Marp markdown renderer for DMAIC documents.
render/pandoc
Package pandoc provides a Pandoc markdown renderer for DMAIC documents.
Package pandoc provides a Pandoc markdown renderer for DMAIC documents.
Package export provides converters for exporting PRISM data to other formats.
Package export provides converters for exporting PRISM data to other formats.
Package fileutil provides file path utilities.
Package fileutil provides file path utilities.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL