Metrics pillar · v0.8.1
metric MetricDefinition
Metric definition with formula, source, and standards mapping.
$id · https://corpospec.com/schemas/v0.8.1/metric.schema.json
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | yes | |
| direction | MetricDirection | yes | Metric direction. |
| frequency | MetricFrequency | yes | Metric frequency. |
| id | PathRef | yes | Path-based cross-reference relative to .corpospec/ root. Pattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$` |
| name | string | yes | |
| unit | MetricUnit | yes | Metric unit type. |
| abbreviation | string? | — | |
| formula | string? | — | Arithmetic formula used to compute the metric. Variable placeholders reference other metrics by PathRef and are written as `${metric_id}` (e.g. `${metrics/definitions/mrr} * 12`) or, for locally-scoped parameters, `{variable}` (e.g. `{revenue} - {cogs}`). Free-form operators (`+`, `-`, `*`, `/`, parentheses, common aggregations) are permitted; the formula is descriptive, not executable. |
| iso_30414_mapping | string? | — | Mapping to an ISO 30414 (Human Capital Reporting) section. Expected format is a section reference like `ISO 30414 §4.1` or a registry URL pointing at the section definition. |
| related_metrics | PathRef[] | — | |
| source | MetricSource? | — | |
| tags | string[] | — | |
| xbrl_mapping | string? | — | Mapping to an XBRL taxonomy concept. Expected format is either a qualified concept name (e.g. `us-gaap:Revenues`, `ifrs-full:Revenue`) or a registry URL pointing at the concept definition (e.g. `https://xbrl.us/concepts/Revenues`). |
Definitions
Shared types referenced within this schema.
MetricDirection
Metric direction.
enum: "up", "down", "neutral"
MetricFrequency
Metric frequency.
enum: "daily", "weekly", "monthly", "quarterly", "annually"
MetricSource
Metric data source.
type: object
MetricSourceSystem
Upstream system that produces the metric value.
Enumerates the common systems UNSTARTER integrates with as a metric source.
Use `Custom` for in-house systems, internal services, or anything not yet
enumerated. `Other` is reserved as a forward-compatible escape hatch for
systems that are not yet part of the canonical list.
enum: "manual", "postgres", "snowflake", "bigquery", "redshift", "clickhouse", "mixpanel", "amplitude", "posthog", "stripe", "quickbooks", "xero", "datev", "lexoffice", "hubspot", "salesforce", "custom", "other"
MetricUnit
Metric unit type.
enum: "currency", "count", "ratio", "percentage", "days", "months", "hours", "weight", "volume", "area", "score", "nps", "units", "bps"
PathRef
Path-based cross-reference relative to .corpospec/ root.
Pattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`
pattern: ^[a-z0-9_-]+(/[a-z0-9_.-]+)+$
Reference in your YAML
# yaml-language-server: $schema=https://corpospec.com/schemas/v0.8.1/metric.schema.json