IDKMesh

Metric Contracts v0.1

Status: descriptive contract, read from the code at repository revision a805a6bd (2026-10-14). It records what each production metric actually computes today, not what a theory document says it should compute. Where the two differ, the code wins and the gap is stated as an open item.

This page implements the “Requirements” clause of issue #86 (refs #86): a metric or mechanism that feeds a recommendation must document its assumptions, observables, uncertainty, prediction, baseline, failure modes (including Goodhart risks), and human and security constraints. It does not close #86: it documents the current state and makes the gaps visible and guarded; it does not remove them.

Companion pages: Metric Uncertainty v0.1 (the Beta-Binomial helper and reporting rules) and Collaboration Observables v0.1 (the collaboration analyzer and its preregistered analysis). Those pages describe the shared machinery; this page is the per-metric contract.

How this page is guarded

tests/test_metric_contracts.py reads the metric keys out of the code by AST and fails if a key has no ### entry here, if an entry lacks any of the seven labelled fields, or if an entry names a metric the code no longer emits. It checks that the fields exist and are non-empty. It cannot check that the prose is true; that remains a review duty.

Cross-cutting open items

These apply to many entries and are stated once so each entry can stay short.

Emission map

Which module emits which metric. scripts/evolution_live_governor.py duplicates part of scripts/repository_evolution_score.py rather than importing it, so the two must be read separately. As of the audited revision the governor is referenced by its own test and the operations module map, and by no workflow under .github/workflows/.

Metric Emitted by Function
main_protection score, governor normalized_signals / live_signals
review_capacity score, governor capacity_metrics then normalized_signals / live_signals
independent_review_coverage score, governor review_metrics then normalized_signals / live_signals
starter_task_supply score, governor normalized_signals / live_signals
external_witness score, governor normalized_signals / live_signals
workflow_pin_ratio score, governor normalized_signals / live_signals
work_diversity score (inside signals); governor (top-level field, outside signals) normalized_signals with shannon_diversity (score); work_diversity (governor)
branch_pressure score only normalized_signals
branch_health governor only (1 - branch_pressure) live_signals
control_energy_proxy score only control_energy
homeostatic_potential governor only evolution_math.homeostatic_potential
strategy_weights score only strategy_pressures, replicator_response
priority score only _priority, _scored
first_independent_review_latency, cycle_latency, review_concentration, ownership_concentration, contributor_recurrence, ci_evidence, review_queue, structural_debt, evidence_derived_strategy_priors scripts/collaboration_observables.py analyze

The collaboration analyzer consumes a snapshot built by scripts/collaboration_snapshot.py; the evolution score consumes a different snapshot built by scripts/evolution_snapshot.py. The two snapshots do not share collection code, so a notion such as “independent review” is implemented twice with different rules (stated in the relevant entries).

Repository-evolution signals

Source of inputs: scripts/evolution_snapshot.py (collect). All signals below are in [0, 1] and are recomputed from scratch for each snapshot.

main_protection

review_capacity

independent_review_coverage

starter_task_supply

external_witness

workflow_pin_ratio

work_diversity

branch_pressure

branch_health

Composite mechanisms

control_energy_proxy

homeostatic_potential

strategy_weights

priority

Collaboration observables

Source: scripts/collaboration_observables.py (analyze, method collaboration-observables-v0.4), over a snapshot from scripts/collaboration_snapshot.py. Logins are pseudonymised in that snapshot (actor: plus a repository-salted digest prefix). The snapshot’s own limitations list states that the window is bounded and not full history, that merged PRs are the only contribution proxy, and that ownership is the last merged toucher inside the window.

first_independent_review_latency

cycle_latency

review_concentration

ownership_concentration

contributor_recurrence

ci_evidence

review_queue

structural_debt

evidence_derived_strategy_priors

Not covered by this page

These outputs are emitted but not contracted here. They are derived from, or are rules over, the metrics above: the mode and blockers threshold rules, control_deficits, strategy_pressure, dependency_graph, review.approval_coverage, and the preregistered first-review-latency analysis (which has its own preregistration). Adding any of them as a standalone metric would add an entry here and a row to the guard test.