All papers
Featured whitepaper

The Statecraft Ecosystem

How a governed agentic delivery control plane is built in the open

Bartek KusJuly 16, 2026 4 min read
Abstract

Statecraft is a governed control plane for agentic software delivery. It is built around one loop: intent becomes a governed spec, a contract stamps a complete application from an open template, a fleet operates the result, and a tamper-evident record makes the whole run checkable by someone who trusts none of it. This paper walks the mechanisms that make that loop honest, from the spec spine that governs every repo in the family (including this website) to the identity, decision, and attestation primitives that keep humans and agents on the same rails. Where a piece is designed but not yet shipped, it is marked as such: the status ladder on the home page rolls up from the specs, not from this paper.

10
public repos, one governed family
Ed25519
signed, hash-linked attestation ledger
1 container
the enrahitu substrate, zero managed deps
01

The spec spine: the unit of governance

A graph of authority

The foundation of Statecraft is the spec spine. Unlike documentation that drifts from the code it describes, the spine is the authoritative design record. Every feature, refactor, or infrastructure change is anchored to a markdown document that explicitly declares its territory. 2

That territory is not a vague description; it is an explicit set of code paths combined with typed relationships to the other documents that have touched those paths before. Together, these documents form a directed graph, and the graph is the source of truth about who is allowed to change what.

A document declares its relationships with typed edges: establishes (first brought this code into being), extends (adds surface without disturbing a predecessor), refines (tightens behavior on a specific aspect), supersedes (replaces a predecessor), amends (patches one in place), co_authority (shares a path section by section), and constrains (asserts an invariant everyone else must respect). Authority over any path is derived by walking the graph, not declared directly. 1

Safe parallel work

This design makes parallel work by many agents tractable. Disjoint territory is provably disjoint: two agents editing documents whose paths do not overlap cannot collide, and the graph tells them their boundaries before either edits a line.

When two documents must touch the same path, they declare co-authority section by section against named anchors. A potential collision becomes a structured merge rather than a free-for-all. History stays queryable too: an amendment patches its predecessor in place rather than overwriting it.

Mechanical enforcement

Three guardrails sit on top of the graph. A deterministic compiler reads the markdown corpus and emits a frozen JSON registry; the same inputs produce byte-identical output on every platform. A coupling gate runs at pull-request time and cross-references every changed path against the graph, refusing the merge if code moved without its owning spec (or without an explicit, cited waiver). A refusal rule at prompt time stops an agent from resolving a coupling failure by quietly editing the contract to match the code it just wrote. 2

This is not a whitepaper aspiration. spec-spine is a published tool, and this website is one of its governed corpora: the page you are reading was compiled, indexed, linted, and coupled by the same binary before it shipped. 1

Figure 1. The spec spine: a graph of authority

Click nodes to explore
declaresdeclaresfeedsemitspowersguarded bySpec documentTerritoryTyped edgesDeterministic compilerJSON registryCoupling gateRefusal rule

Click any node to read its role. spec-spine turns a markdown corpus into a typed authority graph, compiles it to a frozen JSON registry, and refuses code that drifts from its owning spec. This very site is governed by it.

02

The governed delivery loop

Specify, then stamp

Statecraft turns intent into software through a governed loop. First specify: spec-spine compiles what a human wants into a typed, hash-verifiable spec. This runs today across the family. 2

Then stamp: a versioned template contract stamps a complete application from the enrahitu chassis, which is Encore.ts, rauthy, hiqlite, and Turso in a single container with zero managed dependencies. The stamped app is born with a certificate that binds an explicit agentic posture, and it lives in the customer's own GitHub org, under the customer's license, from the first commit. 3

The substrate ships today; the contract that stamps a complete app is still being finalized. The home page status ladder shows exactly where each rung stands, rolled up from the specs rather than asserted here.

Operate, then verify

Operate treats an app as one container and one volume. Update and backup are governed verbs that carry an audit trail, rather than a runbook you hope someone followed.

Verify closes the loop. Every governed action is recorded in a tamper-evident ledger, and an independent verifier can re-check the record without trusting the plane that produced it. The next two sections cover the record and the identity fabric that bounds who may write to it.

Figure 2. The governed delivery loop

Click nodes to explore
specifystampproducesoperaterecorded inverified byIntentGoverned specTemplate contractStamped appFleet (operate)Attestation ledgerIndependent verifier

Click any node to read its role. Intent becomes a governed spec, a contract stamps a complete app from the enrahitu chassis, a fleet operates the result, and a tamper-evident record makes the whole run checkable. The spec spine and the substrate run today; the contract that stamps a complete app is still landing. The home page status ladder is authoritative for how far each rung has come.

03

The tamper-evident record

An append-only, hash-linked ledger

Compliance in an agentic system needs verifiable proof, not promises. Statecraft records what the plane did in attest-ledger: an append-only, hash-linked, Ed25519-signed record where each entry commits to the one before it, so a silent edit anywhere in the history breaks the chain. 4

Hashes only agree across parties if everyone serializes the same bytes. canonical-keysort-json does exactly that: a lexicographic key sort at the serialization boundary, so a record hashed on one machine hashes identically on another. 9 The certificate and record shapes shown in the reader are illustrative schemas, not a real signed artifact; the real ones are produced by tenant-emit from a finished run.

Independent verification

The load-bearing property is that the verifier does not trust the producer. tenant-tail re-checks the run-side artifacts the factory asserted about its build, offline, identity-free, and read-only all the way down to the package boundary. 5

If any artifact has been tampered with, the verifier rejects the record with a specific diagnostic pointing at the exact mismatch. The emit side (tenant-emit) and the verify side (tenant-tail) are deliberately separate binaries with no shared trust, so the paperwork can be re-checked by someone who ran none of it.

04

Identity-bounded collaboration

Federated identity

Collaboration between people and agents needs one trust fabric. Statecraft uses Rauthy as the sole OpenID Connect session signer, with GitHub as an upstream identity provider. A developer's GitHub login federates through Rauthy, giving one centralized source of identity truth. This runs today: the OIDC signer is live at auth.statecraft.ing. 6

Rauthy issues scoped tokens that define precisely what a person or agent may do. There is no anonymous session: every actor is identified before it can act, and an agent driving the plane passes through the exact controls a person does. 7

Decide, then score

Each action is decided by action-gate: a pure, deterministic evaluate(context, checks) that returns Allow, Deny, or Degrade. Given the same context and checks it returns the same decision every time, with no hidden state to audit around. 8

Privilege is not granted once and forgotten. trust-window scores a rolling window of weighted samples into a graduated privilege level, so trust is earned and decays. Identity, decision, and trust compose: who you are (Rauthy), what you may attempt (action-gate), and how far you are trusted right now (trust-window), with every outcome recorded in the ledger.

Figure 3. Identity-bounded collaboration

Click nodes to explore
federatesissuesidentifiespresentedrequestsscored byallowsGitHubRauthy OIDCScoped tokenPerson or agentDecision gateTrust windowGoverned verbs

Click any node to read its role. Identity federates from GitHub through Rauthy (the live OIDC signer) into scoped tokens. A deterministic gate decides each action, and a rolling trust score sets the privilege level. Humans and agents pass through the same controls.

Governed agentic delivery vs established approaches

A positioning comparison, not a benchmark. The Statecraft column names mechanisms that exist in the family or are explicit design commitments.

DimensionTraditional CI/CDGitOpsAI-assistedStatecraft
Change authorityBranch protection and code ownersDeclarative desired-state in a repoUnchanged from CI/CDSpec-spine graph plus coupling gate and refusal rule
Audit trailGit log and pipeline historyGit history and reconciler logsStandard git logAppend-only, hash-linked, signed ledger
Agent's roleNone, or an ad-hoc assistantNone; humans author manifestsCode suggestion and completionA first-class actor on the same rails as people
VerificationManual checklist or periodic auditPolicy-as-code (OPA, Kyverno)No additional mechanismIndependent verifier that trusts no producer
Parallel-work safetyMerge conflicts resolved by handSeparate repos per team or envNo structural guaranteeProvably disjoint territory

References

  1. [1] STATECRAFT Statecraft: the governed delivery control plane (accessed July 2026)
  2. [2] SPEC-SPINE spec-spine: the spec-governance toolchain (accessed July 2026)
  3. [3] ENRAHITU enrahitu: the EnRaHiTu template chassis (accessed July 2026)
  4. [4] ATTEST-LEDGER attest-ledger: append-only, hash-linked, Ed25519-signed record (accessed July 2026)
  5. [5] TENANT-TAIL tenant-tail: the independent certificate verifier (accessed July 2026)
  6. [6] RAUTHY Rauthy: an OpenID Connect provider (accessed July 2026)
  7. [7] MCP Model Context Protocol specification (accessed July 2026)
  8. [8] ACTION-GATE action-gate: a deterministic decision gate (accessed July 2026)
  9. [9] CANONICAL-JSON canonical-keysort-json: canonical JSON at the hash boundary (accessed July 2026)