Layer 0 · Substrate v0 · a working paper

Governing the actions of autonomous systems.

Autonomous agents now take consequential actions — they move money, merge code, deploy infrastructure, touch the physical world. The missing layer isn't a smarter agent. It's a deterministic layer beneath the agent that admits or refuses each consequential action against boundaries a human wrote, and can prove what it decided. We call building that layer Authority Engineering.

E(m) A(m) = ACCEPT
No effect without an admitted decision. An action m may take effect if, and only if, the admission function returns ACCEPT. Everything below serves this one line.
live barycenters-admit.fly.dev every claim tagged holds / shadow / gap verified 2026-08-28
Abstract

Barycenters is a deterministic Layer 0 admission runtime. Before a consequential action takes effect, the actor asks the layer; the layer decides ACCEPT or REFUSE against human-authored boundaries and writes a signed, hash-chained record of the decision. The layer holds no authority of its own: it can refuse, never permit — authority enters at exactly one point, and it is a human's. This paper states the invariant, the determinism it rests on (a canonicalization proven byte-identical across implementations), how decisions are made provable, how boundaries are authored without silently widening, and — as its spine — an honest ledger of what holds today, what runs in shadow, and what is still open. The system is live; every claim here is meant to be checked against it.

01 · The gap below the agent

A model can decide anything. Nothing decides whether it may.

An agent's guardrails live inside the agent — prompts, fine-tuning, a policy the same system can reason its way around. That is advisory, not structural. When the action is consequential — a refund, a merge to main, a production deploy, a physical actuator — advice is not enough. You need a layer the agent cannot talk its way past, sitting between the decision and the effect, that answers one question deterministically: is this action admitted?

This is not a policy engine bolted onto an app, and not a category of software. It's a substrate — the same primitive under a payment, a code change, or a robot arm. Software is the medium; the layer is the point.

02 · The invariant

No consequence without an admitted decision.

Let m be a proposed action carrying its context. Let A(m) be the admission function — total, deterministic, side-effect-free — returning ACCEPT or REFUSE. Let E(m) be "the effect of m occurs." The whole system exists to hold one bi-conditional:

the law of the product
E(m) ⟺ A(m) = ACCEPT # → forward: an effect happened ⇒ it was admitted (nothing slips through) # ← reverse: admitted ⇒ the effect may occur (admission is the gate, the only gate)

Two properties make the gate trustworthy rather than decorative. It is fail-closed: absent a provable ACCEPT, the ground state is REFUSE. And its refusals are visible — a system that refuses correctly but says nothing has still failed its operator. Every decision, ACCEPT and REFUSE alike, is recorded.

03 · Determinism you can trust

The same action must hash to the same bytes — everywhere, forever.

A decision is only as trustworthy as its determinism. A signed receipt is a signature over the canonical bytes of a decision; a hash-chain link is sha256 of canonical bytes. If two parties — or two versions of the runtime — serialize the same object to even one different byte, their hashes and signatures disagree and every token breaks. So canonicalization ("canon-v1") is not a formatting detail; it is the foundation the trust layer stands on. Its rules are fixed:

canon-v1 · golden vectors (excerpt)
// keys sorted after NFC, tight separators {"b":1,"a":2,"m":3} {"a":2,"b":1,"m":3} // value NFC-normalized: "café" (e + combining acute) folds to "café" {"note":"cafe◌́"} {"note":"café"}

Compiled speed, cross-checked across implementations — never on faith

The Python reference is readable and canonical; the hot path is a compiled-Rust core (crates/barycenters-core), trusted never on faith. Every container build compiles the core and runs a byte-parity gate: over each golden vector it asserts rust == python == golden, and if they diverge by a single byte the build fails — no image ships where rust ≠ python. You get compiled speed with the reference's auditability; the fast path cannot drift from the source of truth. (The one input Rust can't represent — canon-v1 permits lone-surrogate strings — is refused by the core and handled by the reference; the two never disagree on a token.)

A third implementation, a JavaScript port (web/src/canon.js), mirrors the reference rule for rule and is pinned to the same golden vectors by an interop test (test_web_interop.py — asserting js == python == golden where node is present), which is exactly what lets a browser verify a signed receipt without trusting the transport. And a fourth, a Go implementation (sdk/go-canon) passes the same golden vectors (go == python == golden). Four implementations that agree over every vector are far harder to drift than one.

04 · Provability

A refusal is as verifiable as an acceptance.

Every decision is written to a signed, hash-chained WORM ledger — append-only, each entry linked to the last. Anyone can verify the chain is unbroken and that each receipt was signed by the issuer's key without reading the entries themselves. The property that matters: provable, not exposed. A namespace can prove its decision history is intact and authentic while its individual decisions stay private to it.

the shape of a decision
m — proposed action A(m) ACCEPT / REFUSE signed receipt hash-chained ledger

Because the receipt is a real signature (Ed25519) over canonical bytes, a client can verify a decision itself — even an untrusted client in a browser — rather than trust the transport. The gate honors a signature, never a plaintext boolean.

05 · Authoring boundaries

Author permissions, not prohibitions — and never widen them by accident.

Boundaries are written in operating language and compiled to an inert object — a proposal that grants nothing until a human signs it (authority_effect = 0). Because the compiler holds no authority, it is safe to point a language model at it: a bad compile is a bad proposal, never a bad permission.

the compiler · natural language → inert boundary
"Support can issue a refund up to $100 with an order match and a customer identity match using stripe_refunds" ↓ compile (grants nothing) binding_id barycenters.ci.issue_a_refund consequence_class money_movement requires an_order_match, a_customer_identity_match limit max_amount_without_escalation = 100 authority_effect 0 # a dead object — a steward must sign it

The dangerous failure of any natural-language compiler is not a wrong output — it's a plausible one that silently drops a clause it couldn't express. "Refund up to $100, only during business hours," with the time clause dropped, is a strictly wider authority than asked for, and it looks correct. So the compiler tracks its residue: every span it did not consume. If anything meaningful is left over, it refuses to emit a signable object at all. It fails toward narrower, never wider — every dropped clause is an authority granted.

06 · Evidence & trust

What may witness what.

Some boundaries require evidence before they admit — "tests were green," "a human acknowledged." Evidence can be asserted (the proposer claims it) or attested (signed by a key the charter trusts to witness that specific fact). The distinction is load-bearing, and it is scoped:

CI may attest tests_green

Continuous integration ran the tests, so it is an honest witness to their result. Its attestor key is charter-scoped to exactly that claim.

CI may never attest human_ack

CI is not a human. The charter's attestor_claims forbid it that scope — so under an attested posture the boundary refuses until a person signs. That is the entire point.

07 · The one authority point

The layer can refuse. Only a human can permit.

Authority enters at exactly one point: a human steward, holding a hardware key, signs a boundary into force. No software quorum, no configuration flag, and no agent consensus can substitute for that tap. The runtime holds only verify keys; the signing seed never touches it.

Until a steward flips it, a namespace runs in shadow: it decides on every action and records the verdict, but does not block — authority_effect = 0. Shadow is not a limitation; it is how you earn enforcement. You watch what the layer would have blocked against your real traffic, with zero risk, until the near-misses convince you. Then one signed act moves authority_effect: 0 → 1 — the first governed consequence.

Shadow mode is the feature. The near-misses are the product.

08 · The floor

The one boundary a human may not lift.

Almost every boundary is the steward's to author, bind, and revoke. One class is not: an action whose purpose is to kill or physically harm a human. The no-kill floor is a constitutional invariant — a closed allowlist of the consequence classes the layer will ever mint a grant for, none of which is a lethal class. Adding a lethal capability is refused at import, before the service can start: not a configuration change, a constitutional violation.

Honest state. The floor is a conservative keyword classifier that errs toward refusal by design — not a complete lethal-intent model, and it does not pretend to be. As of this writing it refuses every bypass a 2026-08 adversarial audit produced (verified live: "kill the passengers," "bomb the city," "launch the nuclear weapon" all REFUSE), while leaving benign operations vocabulary untouched ("kill the process," "gas the car"). What remains is breadth-measurement (wiring a standing evasion corpus into CI) and screening the quorum-signed break-glass path — hardening, not a known basic-lethal hole. We state this here rather than claim completeness, because a floor you overclaim is worse than one you measure.

09 · Adoption

Language-agnostic at the boundary.

An agent adopts the layer at one call: ask /admit before the consequential action. The client is thin and the failure modes are the safe ones. The reference Go client is zero-dependency: shadow by default (it reports what enforce would block instead of raising), fails closed in enforce mode when the service is unreachable, and retries under a single idempotency key so admission is at-most-once — a decision is terminal and never re-asked.

The boundary is the contract, so the substrate is indifferent to the language above it. A browser client can verify a signed receipt independently; a server-side agent can trust the decision and fail closed. "Govern any agent" is a property of the boundary, not of any one SDK.

10 · Honest state

Every claim, tagged and traced.

This is the spine of the paper, not its appendix. A whitepaper earns belief by disclosing its own gaps. Each row is holds (live today), shadow (running, authority_effect 0 by design), or gap (known-incomplete — stated, never hidden).

holds — live & verifiable now shadow — running, not yet enforcing gap — known-incomplete, disclosed
holds/admit returns a deterministic ACCEPT/REFUSE and a signed receipt.live POST /admit · default-deny
holdscanon-v1 is byte-stable (NFC, sorted-after-NFC keys, floats rejected, sha256: digest).golden vectors · Python reference · Rust core · JS port · Go
holdsThe compiled-Rust fast path is proven byte-identical to the Python reference every build — the image will not ship on divergence.Dockerfile byte-parity gate · rust == python == golden
holdsA JavaScript port is byte-identical to the Python reference over the golden vectors (backs in-browser receipt verification).test_web_interop.py · js == python == golden (proven locally; the CI runners have no node, so it skips there)
holdsA Go implementation is byte-identical to the Python reference over the golden vectors.test_go_interop.py · go == python == golden (proven locally; the CI runners have no go, so it skips there)
holdsEvery decision is written to a signed, hash-chained WORM ledger; the chain is verifiable without exposing entries.live /auditz · count + chain-verify
holdsThe compiler emits an inert boundary and refuses rather than silently drop a clause.live POST /v1/lumen/compile · residue check
holdsThe no-kill floor refuses every bypass the 2026-08 adversarial audit produced.live · conservative keyword floor, by design
holdsAuthority enters at one human point (hardware-key steward); no software quorum binds.charter · webauthn · runtime holds verify keys only
shadowProduction decides and records but does not block yet (authority_effect 0)./readyz · Customer Zero (self-governed)
gapJS & Go parity is proven locally, but not yet enforced in CI or image-gated like Rust’s.Rust byte-parity fails the container build on divergence; the JS & Go interop tests currently skip on the CI runners (no node/go installed) — enforcing them (toolchains on the runners, or an image gate) is the shared next step
gapNo-kill breadth is measured by a standing evasion corpus in CI, and the break-glass path is floor-screened.hardening / measurement — not a basic-lethal bypass
11 · The discipline

Prove the boundary once. Execute at any scale.

Authority Engineering is the practice of making authority structural instead of advisory: a deterministic layer beneath the actor, a canonicalization you can trust across implementations, decisions that are provable without being exposed, boundaries that fail toward narrower, and a single human point where authority enters. Prove a boundary holds once, and every action under it can run autonomously — 100% autonomous execution, with authority reserved to a human.

The layer builds. The human binds.