> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algovoi.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Cell and KAF

> The Keystone Assurance Framework: hermetic cells that reproduce every JCS conformance vector byte for byte, and sealed, hash-chained receipts you verify offline with no trust in AlgoVoi.

AlgoVoi's **Keystone Assurance Framework (Cell and KAF)** is an assurance layer
over the [JCS conformance corpus](/conformance-vectors): a hermetic runtime (a
cell) that reproduces every conformance vector byte for byte with the network
off, plus a sealed, hash-chained receipt (the Keystone Seal) that anyone can
verify offline with no trust in AlgoVoi. It turns a green CI badge into a result
you re-run and check for yourself.

*Last updated: 3 August 2026.*

## Why a badge is not enough

Every library ships a green CI badge and asks you to trust it. For money moving
autonomously between agents, "trust my tests" is not an assurance model. A single
disagreed byte is a failed receipt, a mis-bound payment, or a refund that will not
compose. The question that actually matters is whether you can prove,
independently, that an implementation produces exactly the right bytes without
trusting the author. Cell and KAF answer it in two layers.

## Cell (P1): the hermetic runtime

A cell is a deterministic, isolated runtime pinned to an exact (language, runtime
version, libc variant) and resolved to an exact image digest per run. It takes the
corpus and re-derives every vector from first principles inside a sealed
environment.

* **No network at execution.** Provisioning is a recorded, network-on exception;
  execution runs with the network off (`--network=none`) against a read-only copy
  of the corpus, and a network canary proves the isolation held.
* **Real modules only.** A real-module rule means every result comes from an
  installed module, never from a `-c` one-liner or a REPL context that could mask
  an environment defect.
* **Same bytes anywhere.** Run the same cell on your laptop, our CI, or a
  stranger's server and you get the same bytes every time.

The first shift: conformance stops being "the maintainer's suite went green" and
becomes "re-run it yourself and compare the bytes."

## KAF (P2): the Keystone Seal

Reproducibility is necessary but not sufficient. You also need to know a given run
is authentic and unmodified. The Keystone Seal turns each fully green run into a
receipt.

* The receipt body is JCS-canonicalised with `algovoi-substrate`, then
  differential-checked against the independent `rfc8785`, so the canonicalisation
  itself is cross-checked, not assumed.
* It is signed (RFC 9421 plus RFC 9530) by the published
  [`algovoi-rfc9421-signer`](/rfc9421-signer).
* The receipt file *is* its own canonical bytes, its SHA-256 is the chain link,
  each receipt names its predecessor, and the first is anchored to the P0 snapshot
  (`MANIFEST.txt`). History cannot be reordered or backdated.

The second shift: an assurance result becomes a portable, tamper-evident artifact,
not a screenshot of a passing build.

## Verify it offline yourself

The proof is a `git clone`. Reproduce every vector set and re-check the seal chain
with the published verifier, with nothing to trust but the maths.

```bash theme={null}
git clone https://github.com/chopmob-cloud/algovoi-jcs-conformance-vectors
cd algovoi-jcs-conformance-vectors

# reproduce every vector set byte for byte
python composition/verify_corpus.py

# re-check the seal chain offline (published verifier)
python kaf/kaf_verify.py --receipts-dir kaf/receipts \
    --pub-file kaf/keys/kaf-seal.pub.json \
    --genesis-anchor kaf/MANIFEST.txt --expect-count 3
```

43 anchor sets and 352 vectors, with the cross-validated sets agreed byte for byte
across ten independent language implementations at 1226/1226, and a seal chain that
verifies with no help from us. The full detail, including the honesty rules the
framework holds itself to, is in the corpus `kaf/README.md`.

## Where it sits on the substrate

<CardGroup cols={2}>
  <Card title="Conformance vector sets" icon="table-cells" href="/conformance-vectors">
    The 43 anchor sets and 352 vectors KAF reproduces, cross-validated across ten languages.
  </Card>

  <Card title="JCS canonicalisation substrate" icon="fingerprint" href="/canonicalisation-substrate">
    The five normative rules and the ten-implementation matrix the cells re-run.
  </Card>

  <Card title="RFC 9421 signer" icon="file-signature" href="/rfc9421-signer">
    The published signer that seals each receipt (RFC 9421 plus RFC 9530).
  </Card>

  <Card title="Verify it yourself" icon="circle-check" href="/verify-it-yourself">
    The hosted and installable path to reproduce the corpus without our infrastructure.
  </Card>
</CardGroup>

## Frequently asked questions

### What is the Keystone Assurance Framework (Cell and KAF)?

It is AlgoVoi's assurance layer over the JCS conformance corpus. A cell is a
hermetic runtime that reproduces every conformance vector byte for byte with the
network off; KAF (the Keystone Seal) turns each fully green run into a sealed,
hash-chained receipt. Together they let anyone re-run the corpus and verify the
result offline, with no trust in AlgoVoi.

### How is a hermetic cell different from a normal CI run?

A normal CI run proves the maintainer's suite passed on the maintainer's machine.
A cell pins the language, runtime version, and libc to an exact image digest, runs
with the network off against a read-only corpus, and proves isolation with a
network canary. The same cell produces the same bytes on any machine, so you
re-run it rather than trust it.

### Can I verify a KAF receipt without trusting AlgoVoi?

Yes. Each receipt is JCS-canonical, its SHA-256 is the chain link, and each names
its predecessor back to a genesis anchor. The published `kaf_verify` tool
recomputes the whole chain offline against a public key, with no AlgoVoi account
or network call, so an auditor can confirm nothing was reordered, edited, or
backdated.

### Is Cell and KAF backward compatible with the published packages?

Yes. Every published AlgoVoi package on PyPI and npm is checked to reproduce the
same corpus bytes under the current substrate as before, byte for byte against
pinned vectors. Backward compatibility stops being a changelog promise and becomes
a re-runnable proof anyone can reproduce from a clone.

## The one-liner

Cell and KAF turn "trust my tests" into "re-run mine and check the seal." For money
moving between agents, that is the difference between a claim and a proof.
