Skip to content

Conformance Maturity Report (P2-21)

cortexbuild conformance produces a deterministic, anti-gaming 0-100 maturity score for a repository's adoption of CortexBuild, and emits:

  • .cortexbuild/CONFORMANCE.md — human-readable breakdown.
  • .cortexbuild/conformance.json — machine-readable summary.

Dimensions

The score is the equal-weighted mean (0.2 each) of five dimensions, each recomputed fresh from real on-disk evidence on every run:

Dimension Evidence source Not-configured when
gates_run .cortexbuild/conformance/gate-evidence.json run-records no gate has a positive run-record
drift_clean render.engine.check_drift no ownership manifest yet
ledger_consulted .cortexbuild/recurrence-ledger.yaml loads + validates ledger absent
profile_complete context.score.compute_completeness profile absent
standards_in_sync standards.sync.verify_pack_integrity no standards lock

Anti-gaming guarantees (S2)

  • The committed CONFORMANCE.md / conformance.json are never read back as input — the score is always recomputed from primary evidence. Hand-editing the report has no effect; the next run overwrites it.
  • Absence of evidence scores 0 (missing / not-configured) — it is never silently treated as a pass.
  • A skipped gate lowers gates_run; introduced drift lowers drift_clean; an incomplete profile lowers profile_complete.

Positive gate evidence

A gate proves it ran by appending a run-record via conformance.record_gate_run(repo_root, gate, status="passed"). The gates_run dimension credits only the EXPECTED_GATES that carry a passed record; a failed status or a missing record contributes nothing.

Determinism (S1)

  • Offline only — reads nothing remote.
  • No wall-clock in the emitted bytes. An optional --commit anchor records a deterministic short SHA; it is never a timestamp.
  • All paths are relativised via render.ownership.relpath, so two checkouts at different absolute paths with identical evidence emit byte-identical reports.
  • All free-text is routed through the egress redactor (security.egress.redact_for_egress) — the P2-23 redaction boundary — so no secret or PII can leak into the report.

Backward-compat (S4)

An unconfigured repo never crashes: every dimension degrades to not-configured (score 0) and the report still renders.

Wiring: annotation vs blocking gate

# Non-blocking annotation (default): always exits 0
cortexbuild conformance

# Blocking gate: exits non-zero if the freshly computed score is below N
cortexbuild conformance --fail-under 80

The gate is fail-closed: it acts only on the freshly recomputed score, never on a committed (and possibly forged) report.