Meta-Rules MR-1..MR-15 Invariants
petrova advanced 12 min read
ELI5
The meta-rules are the constitution sitting above each project’s local laws. Local invariants I-N describe what your specific code must do; meta-rules MR-N describe how docs, decisions, agents, and phases must behave so the system that governs the code does not rot underneath it.
Technical Deep Dive
The 15 rules at a glance
classDiagram class MetaRules { +version: 1.1 +scope: cross-project } class Rank { MR-1 north-star outranks backlog MR-12 CLAUDE.md is projection not source } class Phase { MR-2 friction → next phase, never retrofit MR-10 verification round mandatory at close MR-11 anti-shapes named + watched } class Decisions { MR-4 ISO dates absolute MR-7 decision docs append-only MR-8 invariants numbered + stable MR-9 do not invent invariants } class Agents { MR-3 sibling files stay sibling MR-5 PR vs direct-push boundary MR-6 subagents read AGENTS.xml not patterns } class Observation { MR-13 intent != observation state MR-14 probes auto-demote, never auto-promote MR-15 schema is the source of bootstrap questions } MetaRules --> Rank MetaRules --> Phase MetaRules --> Decisions MetaRules --> Agents MetaRules --> ObservationLoad-bearing trio
Three rules carry most of the weight (cited in petrova-hq/CLAUDE.md as “load-bearing invariants”):
- MR-1 (rank graph) — every doc declares
rank:andoutranks:in front-matter; theoutranksgraph must be a DAG. Drift-watcher and CI both consult it. - MR-7 (append-only) — closed decision docs are never edited. To revise a verdict, write a new dated doc with
## Supersedesand prepend a> **Superseded** by ...blockquote to the old one. Both lineage halves remain readable. - MR-10 (verification round) — every phase close runs
prompts/03-verification-round.md, even when the phase felt smooth. The reviewer subagent has a<refusal_condition>for closing without one.
The phase-close pair: MR-2 + MR-10
These two rules together prevent the most common failure mode — letting a closing phase absorb new friction:
- MR-10 forces the round to run.
- MR-2 classifies its output:
closed(trivial only),in-budget(acceptable carry, justified inline),deferred(must be assignedM(N+1).x.yin the same commit as the phase-close decision doc). You do not extend the closing phase to absorb friction.
Observation rules (1.1, ratified 2026-04-30)
MR-13/14/15 entered with version 1.1. They defend against the integration-spine subsystem mixing intent with observation:
- MR-13 —
.petrova/contract.yamldeclares intent;petrova-hq/state/<slug>.yamlrecords observation. They MAY disagree; the dashboard surfaces the delta. Conflating them is how dashboards start to lie. - MR-14 —
petrova doctormay demotecurrent_status(ok → degraded → failing) but MUST NOT promote a consumer’s contract frompending → wired. Promotion requires a human PR pasting evidence; the next probe round confirms. - MR-15 — bootstrap questions in
00-bootstrap.mdPhase 6 are generated fromcontracts/contract.schema.json. Hand-editing the prompt without a corresponding schema change is a CI failure. The schema is canonical; if a question can’t be grounded in it, the prompt is asking something it can’t validate later.
Enforcement layers
| Layer | Mechanism |
|---|---|
| Commit time | .github/workflows/docs-invariants.yml validates ISO dates, AGENTS.xml schema, milestone cross-refs, rank-graph DAG, Superseded-by links |
| Subagents | <refusal_conditions> in AGENTS.xml enumerate which MR each agent would violate by proceeding |
| Orchestrator | The four phase prompts cite MRs by number — pasting 02-phase-close.md loads MR-2 and MR-10 |
| Human | When something feels off, scan META-RULES.md; the rule being broken is almost always one of these |
Updating a meta-rule
Changing one is heavier than changing a project invariant: open a decision doc, get explicit human approval, update referencing prompts and CI, bump the version in META-RULES.md’s footer. No agent self-modification of meta-rules.
Key Terms
- MR-N — a meta-rule, applies across all phases, all subagents, all consumer repos. Numbered to distinguish from project invariants
I-N. - Outranks graph — the directed graph implied by every doc’s
outranks:front-matter; required to be a DAG (MR-1). - Friction budget — the
## Friction budgetsection of every phase-close decision doc; the place MR-2 classifications land.
Q&A
Q: What’s the difference between an MR-N and a project’s own I-N invariant?
A: MR-N is cross-cutting (applies to every petrova-line repo). I-N is project-local — KAHN’s “I-1: Scope writes only under .kahn/archive/” is meaningful only inside KAHN. MRs are governed by petrova-hq; I-N is governed by the consumer’s own decision-doc lifecycle.
Q: Which two MRs together prevent a closed phase from being silently retrofitted? A: MR-10 forces a verification round; MR-2 forces friction items to either close (trivial only), justify in-budget, or get a milestone ID in phase N+1 within the same commit as the close. Skipping either re-opens the retrofit door.
Q: How do MR-13 and MR-14 separate intent from observation?
A: MR-13 puts contract (intent) in the consumer repo and probe state in petrova-hq’s state/. MR-14 says probes may auto-demote observation but never auto-promote intent — promotion is human-only via PR. Together they guarantee the dashboard’s declared and observed columns can disagree without either silently rewriting the other.
Examples
A reviewer is closing Phase 6 of KAHN. The verification round surfaces three items: a typo in a runbook (closed — trivial), a partial telemetry seam they accepted as acceptable carry (in-budget — one-sentence justification), and a redesign of the live-dot UI they cannot finish in this phase (deferred — gets M7.2.1 written into MILESTONES.md before the phase-close decision doc commit lands). MR-2 + MR-10 enforced mechanically.
neighbors on the map
- AuditTrail & Selective Disclosure implementing a compliance export that must only reveal disclosed audit entries
- eva doctor Validation Rules diagnosing a doctor FAIL line
- Operations & Versions Schema writing a new sync query
- Tenancy Invariant: Airlock + HATCH + Polar adding a new mutating route to any Rocky subsystem