Skip to content

The three guarantees

Xratu makes agents and workflows deterministic by attaching policy to them. Three guarantees make that statement true: the code under a workflow is sealed, the rules over it are compiled, and every run produces evidence of which rules ran over which code.

flowchart TB
  S["SEALED CODE<br/>content-addressed blocks<br/>pinned by hash"]
  C["COMPILED POLICY<br/>resolved at build<br/>signed, merged once"]
  P["PROVABLE RUNS<br/>fingerprint per run<br/>evidence at every hook"]
  S --> P
  C --> P

Sealed code

A reusable capability block is a small, reviewed unit of code. Once published its bytes are immutable and content-addressed, and a workflow references it by hash rather than by a moving name.

Declared at publish Travels with the artifact
The block's I/O contract Yes
Its default execution envelope: timeout, retry, quality Yes
Its default policy envelope Yes

A workflow may tighten any of these and may loosen none. A workflow cannot reduce a block's retry envelope below its declared minimum, disable an output check the block declared mandatory, or strip a policy obligation the block declared at publish time.

The authoring surface admits two things: a call into sealed code, and composition over a closed primitive set. Arbitrary computation lives inside a sealed block.

Compiled policy

Policy is authored, compiled to a canonical form, resolved into one effective envelope, and signed. The kernel enacts the declared effect of a rule and performs no merging of its own.

authored bundles
  -> compiled to canonical form (sugar expanded, extensions flattened)
  -> merged deterministically across levels
  -> resolved effective envelope + digest
  -> sealed into the run-plan, signed

Enforcement happens at six fixed hooks in the kernel: pre_call, pre_state_write, pre_llm, pre_delegate, post_call and pre_emit. Each is a typed call point reached at a defined moment, so a rule fires at a place that is part of the contract rather than wherever an implementation chose to check it.

The gate is hard. A rule's effect is enacted deterministically; a policy decision is a decision the run is bound by.

Provable runs

Every run carries a fingerprint that ties the three together:

{
  "project_execution_composition_digest": "sha256:...",
  "compiled_effective_policy_digest": "sha256:...",
  "policy_bundle_identities_and_versions": ["org.example.baseline:v3"],
  "signed_exemption_refs": []
}

Every kernel event references that fingerprint, and every hook firing emits a typed policy decision as evidence. The statement "on this date we ran exactly these rules over exactly this code" is read from the audit log rather than asserted.

Question Answered from
Which code ran The project execution composition and its qualified capsule constituents
Which rules applied The compiled effective policy and its contributing bundle identities
Which workflow or agent composition ran project_execution_composition_digest; its source map reaches the separate project_source_digest provenance
What each rule decided The typed policy decision emitted at each hook firing
Whether the artifacts were the pinned ones The digest verification performed before execution

How the three hold together

Sealed code without compiled policy would leave the rules free to move under fixed code. Compiled policy without sealed code would leave the code free to move under fixed rules. Evidence without both would record a run whose inputs could not be reconstructed.

The kernel verifies the run-plan's signatures and content hashes before executing it, so a run that reached execution is a run whose three inputs were the ones the control plane resolved.

See Immutability and version pinning for how the pins are established, and Control plane as source of truth for where the resolved forms are recorded.