mori (森) — a governed shared memory layer for AI coding agents
← back to moriapp.devSee dark version →
Specification · Draft v0.1

PBGF Conformance Specification

A conformance standard for promotion verdicts on machine-produced code. Defines what a promotion gate must be able to prove for its verdict to be legitimately called governed. It does not define an implementation.

This is a living draft. Feedback is invited — particularly demonstrated evasions of the requirements in §4, and evidence that any requirement is unsatisfiable in practice. Requirements will be tightened in minor versions on published evidence and loosened only in a major version with documented rationale (§8).

1. Purpose and scope

Software is increasingly produced by agents whose output volume exceeds human review capacity, and whose tests are frequently authored by the same agent that authored the code. In that setting, a green check is a claim, not a control: the question is no longer “did checks run” but “what did the checks prove, and who checked the checker.”

This specification defines conformance requirements for promotion verdicts — the pass/fail/blocked decisions rendered at a promotion boundary (merge, release, deploy) that determine whether an artifact advances. A verdict conforms when the gate that produced it can demonstrate, with evidence, the four requirements in §4.

This specification is not:

Relationship to PBGF. The framework (PBGF) is the empirical argument: why trust attaches to promotion rather than behaviour, why governance partitions into three tiers, and what fails when those distinctions are ignored. This specification is the framework’s normative core extracted into testable requirements. The framework persuades; this document conforms or does not.

2. Terms

Normative keywords MUST, MUST NOT, SHOULD, and MAY are used per RFC 2119.

3. The claim structure

A conforming gate makes exactly one kind of claim:

Artifact A, at boundary B, was evaluated by detector D — whose authority was earned under §4.2 — in environment E against policy P, all pinned by digest; the observed outcome, compared against a pre-committed expectation, yields verdict V; and if any of the foregoing could not be established, V is UNATTESTABLE and the artifact does not advance.

Every requirement in §4 exists to make one clause of that sentence provable. Anything a gate asserts beyond that sentence is outside this specification and MUST NOT be labelled a conforming claim.

4. Conformance requirements

4.1 Tier assignment MUST be mechanical

Every enforced property MUST carry a tier — ENFORCEABLE, VERIFIABLE-AT-PROMOTION, or ADVISABLE — produced by a recorded procedure, not by human assertion:

  1. Attempt a deterministic check for the property.
  2. Red-team the check: attempt to satisfy it syntactically while violating the property (transformation attack), and to violate it while passing (evasion attack).
  3. Classify: survives red-team as deterministic and transformation-invariant → ENFORCEABLE; expressible as a hermetic, reproducible execution with an observable outcome → VERIFIABLE-AT-PROMOTION; neither → ADVISABLE.

Evidence required: the tier-assignment record per property — the candidate check, the red-team attempts and their outcomes, the resulting classification, and a revalidation date.

Rationale (informative). Inter-rater agreement between informed humans on tier assignment is poor; a tier asserted by judgment is an opinion wearing a label. The pipeline makes the label reproducible — and makes its honesty auditable, since the red-team record shows why a property failed to reach a higher tier. The ENFORCEABLE class is empirically thin; a conforming gate reports the thinness rather than inflating the tier.

Non-conformance examples. A property labelled ENFORCEABLE on the strength of an AST pattern-match defeated by dynamic dispatch or encoding (transformation attack not run, or run and ignored). A “policy engine” whose every rule is silently ADVISABLE because nothing binds it to the boundary.

4.2 Blocking authority MUST be earned by two-sided calibration

A detector MUST NOT hold merge-blocking (or release/deploy-blocking) authority at a boundary until it has passed two-sided adversarial calibration at that boundary:

  1. Catch side: the detector correctly flags every fixture in a protected known-bad corpus for the property it enforces.
  2. Pass side: the detector correctly passes every fixture in a protected known-good corpus. A detector that blocks indiscriminately has not earned authority; refusal is not robustness.
  3. Independence: protected fixtures MUST NOT be authored by, or readable by, the producer of artifacts the detector will judge. Producer-authored tests MAY be run, but they are producer evidence and satisfy neither side.
  4. Revalidation: authority is held against a pinned corpus version. Material change to the detector, its environment, or the corpus REQUIRES recalibration before authority resumes. The corpus SHOULD grow adversarially; calibration is not one-and-done.

Evidence required: the calibration record — detector identity (digest), corpus identity and version (digest), environment identity, per-fixture outcomes for both sides, and the ratification decision (who or what granted authority, when, against which record).

Rationale (informative). This is the requirement that distinguishes a gate from a ritual. In agentic workflows the producer routinely authors both the code and the tests, collapsing the producer/judge separation that review-based quality control assumes. Restoring the separation requires not merely an independent judge but a judge whose competence was itself established independently: a gate never shown to catch the known-bad is a green light of unknown meaning. Two-sidedness is essential — the calibration proves the complete property (catches bad AND passes good), not the easy corner.

Non-conformance examples. A linter granted blocking status by configuration, never shown to catch its target failure. An LLM reviewer with merge authority and no protected corpus. A detector calibrated once, then modified, still blocking on stale authority.

4.3 Verdicts MUST be bound and preregistered

A verdict is meaningful only as a point in a coordinate space. A conforming gate MUST:

  1. Bind every verdict to: artifact digest; detector identity and version; calibration-corpus version under which authority was granted; policy identity and version (where policy is externally supplied — e.g. a signed policy bundle — its digest); and execution-environment identity (for behavioural detectors: image digest, isolation configuration, observer configuration).
  2. Preregister the expectation where the evaluation is scenario-based: the expected outcome committed and signed before execution, with admissibility judged as signed expectation versus signed observation. An expectation recorded after observing the outcome is a postdiction and does not conform.
  3. Represent refutation. The evidence schema MUST be able to record any observable outcome under any scenario — including the outcome that falsifies the expectation. A schema, wiring path, or serializer that can only record the predicted result is a confirmation filter and does not conform.
  4. Sign at claim granularity. Every field an admissibility decision reads MUST be signed. Fields MUST be typed by provenance — configured (harness-supplied), captured (observed passing through), measured (produced by the evaluated run) — and a record MUST NOT sign a claim at a higher provenance class than its source supports. Evidence that was not produced MUST be recorded as an explicit signed null, never fabricated and never silently omitted.

Evidence required: the signed evidence chain per verdict — preregistration record, execution record, the binding coordinates, and the admissibility comparison.

Rationale (informative). Unbound verdicts are rebindable: a pass produced under one detector, corpus, or environment can be presented as evidence for another. Preregistration is what makes the gate falsifiable rather than merely repeatable — and a gate that cannot write down its own refutation cannot be trusted to report one.

Non-conformance examples. A CI status with no record of which detector version produced it. A receipt whose “expected outcome” was written after the run. An evidence schema that throws on serializing an unexpected admit. A receipt field labelled “measured” whose value came from harness configuration.

4.4 Absence of proof MUST fail closed

Whenever any element of the claim in §3 cannot be established, the verdict MUST be UNATTESTABLE, and an UNATTESTABLE artifact MUST NOT advance. Triggering conditions include, at minimum:

UNATTESTABLE MUST be distinguished from FAIL (the detector judged the artifact bad) and from infrastructure failure (the evaluation could not run). Infrastructure failure MUST NOT be recorded as a governance refusal, and MUST NOT be admissible as evidence that enforcement occurred.

Evidence required: the UNATTESTABLE record naming the unestablished element; the freshness bounds declared per input.

Rationale (informative). Fail-open is how controls die silently: the gate that passes when it cannot attest is indistinguishable, from the outside, from a gate that attested. Routing every could-not-establish condition to one explicit blocked state means degradation is always a decision someone sees, never an absorption. The freshness bound belongs to policy, not to operations: tightening it from evidence is safe; letting inputs age because refresh is friction is the standing danger.

Non-conformance examples. A gate that skips a check when its policy server is unreachable and reports green. A signature-verification failure downgraded to a warning. A “temporary” bypass flag with no expiry and no UNATTESTABLE accounting.

5. Conformance levels

Levels are cumulative. Each names who vouches for the evidence.

Level 1 — Self-attested. All four requirements of §4 are met and the evidence chains exist, retained and queryable, signed by the gate operator. The operator is trusted for both the evaluation and the record.

Level 2 — Calibrated and separated. Level 1, plus: protected fixtures are demonstrably outside the producer’s reach (enforced separation, not policy); calibration ratification is performed by a party or mechanism other than the detector’s author; signing keys are outside the evaluated workload’s trust domain; and preregistration records are crash-durable (persisted before execution begins).

Level 3 — Independently attested. Level 2, plus: evidence chains are emitted in an interoperable attestation envelope (e.g. an in-toto Statement with a behavioural-verification predicate) verifiable without access to the gate operator’s infrastructure; execution identity is attested by a mechanism rooted outside the operator (e.g. hardware attestation of the verification environment); and the calibration record itself is independently reproducible from the published corpus digest.

(Informative: Level 1 is achievable by a disciplined team with existing CI primitives plus the evidence requirements of this document. Level 2 is where the producer/judge separation becomes structural. Level 3 is where a third party — an auditor, a counterparty, a regulator — can verify a verdict without trusting the operator’s word. The ladder is deliberately shaped like SLSA’s so that organizations already fluent in supply-chain levels can locate themselves without new vocabulary.)

6. Composition with adjacent standards and frameworks (informative)

This specification governs a claim no adjacent standard makes, and deliberately makes none of theirs:

7. What conformance does not claim

A conforming verdict does not claim:

A gate that states these limits conforms; a gate that claims their absence does not, regardless of its other properties.

8. Versioning and governance of this specification

This document is versioned semantically. Requirements MAY be tightened in minor versions when motivated by published evidence (a demonstrated evasion, a falsified assumption); requirements MUST NOT be loosened except in a major version with a documented rationale. The asymmetry is deliberate and mirrors §4.4’s freshness doctrine: tightening from evidence is safe; loosening from friction is the standing danger.

Conformance claims MUST cite the specification version they were evaluated against.

Citing this draft: PBGF Conformance Specification, Draft v0.1, moriapp.dev/pbgf-cs. Draft status means requirement numbering may change before v1.0; cite the section and version together.

Licence: this specification text is released permissively so that conformance can be claimed, implemented, and audited without licence friction. A reference implementation is released separately under Apache-2.0.