Schema Overview
PRISM uses a JSON schema to define the structure of documents. The schema is auto-generated from Go types, ensuring consistency between the library and documentation.
Document Structure
{
"$schema": "https://github.com/grokify/prism/schema/prism.schema.json",
"metadata": { ... },
"metrics": [ ... ],
"maturity": { ... }
}
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
$schema |
string | No | JSON Schema URL for validation |
metadata |
object | No | Document metadata |
metrics |
array | Yes | List of metrics |
maturity |
object | No | Maturity model configuration |
okrs |
array | No | OKR mappings |
initiatives |
array | No | Related initiatives |
Classification Hierarchy
PRISM organizes metrics in a three-level hierarchy:
Domain (security, operations)
└── Stage (design, build, test, runtime, response)
└── Category (prevention, detection, response, reliability, efficiency, quality)
Schema Files
| File | Description |
|---|---|
schema/prism.schema.json |
Full JSON Schema |
schema/embed.go |
Go embed directives |
schema/generate.go |
Schema generator |
Generating the Schema
The schema is auto-generated from Go types:
Using the Schema
In JSON Files
In Go Code
Related Pages
- Domains - Security and operations domains
- Lifecycle Stages - Software delivery stages
- Categories - Metric categories
- Metric Types - Types of measurements
- SLIs & SLOs - Service level indicators and objectives
- Thresholds - Status thresholds