# OMNIX-ARCHIVE-SPEC v0 (WORKING SPEC — not canon)

> Status: **working spec**, filed 2026-11-11 under founder commission. It
> canonises nothing by itself; its CATALOG entry is drafted beside it,
> awaiting ratification by the language seat, exactly as OmnaScript's was.
> Amend the spec to change the machinery — never the machinery to dodge
> the spec. Evidence class: **HOST**. Credit: **N8toriousAi**.

## §0 Founding

Founder commission, 2026-11-11 04:39 EST: *"a container system similar
to gnome [Flatpak] and beef up Omnix similar to Debian"* — tapped for
**spec plus the first working slice**. Founder addition, 04:40: *"Gaven
could benefit from it further too by becoming a stronger gate keeper."*

The claim of this spec: the Archive is not imported habits dressed in
house colours. Every organ already exists in the founder's stack in
primitive form, and the Archive is those organs, generalised:

| Archive organ | Debian / Flatpak shape | The founder's organ it generalises |
|---|---|---|
| Package | `.deb` + control file | Omnix/OmnaScript canonical IR — hashed, deterministic, fail-closed at compile |
| Archive index | the `Packages` file | the kernel-collection `MANIFEST.txt` (a sha256 per file) + `CATALOG.md` |
| Suites | stable / testing | the skill-admission states — derived from evidence, never a stored badge |
| The gate | ftpmasters + the NEW queue | **Gaven's η-gate** (§7) over the skill-court's evidence mechanics |
| Container | Flatpak sandbox + portals | the body-state reducer: seats propose, the reducer admits only declared effects |
| The kernel beneath | Linux | **Kido**, the BUBO-line node for the language ball — the Archive is what sits on it |

The Archive's home in the stack is therefore fixed: **Kido below,
Archive above, as Debian sits on Linux.** OS-level containers for the
kernel line itself are a later storey (§10), named here so nobody
mistakes this slice for them.

## §1 The package format

A package is one canonical JSON file, `<name>-<version>.omnipkg.json`,
content-addressed by its own sha256. Canonical form is the family's:
object keys sorted, stable stringify, sha256 over the canonical bytes —
the same law as Omnix v2's `canonical()`/`sha()` and OmnaScript's
compiler provenance. The same inputs pack to the same package hash on
any machine, forever. No timestamps inside the package.

```json
{
  "format": "omnix-package-1",
  "manifest": {
    "name": "gym-brain",
    "version": "0.1.0",
    "kind": "program",
    "description": "…",
    "gate": "deterministic",
    "artifact": { "path": "gym-brain.omna", "media": "text/omnascript", "sha256": "…" },
    "dependencies": { "omnascript-compiler": "^0.1.0" },
    "capabilities": [ { "cap": "gym.act.place", "why": "…" } ],
    "provenance": {
      "source": { "path": "…", "sha256": "…" },
      "build":  { "tool": "omnascript.cjs", "tool_sha256": "…", "ir_sha256": "…" },
      "seats":  { "proposer": "nomos", "reviewer": "witness" }
    },
    "evidence": [ { "id": "ev-0001", "kind": "test|reproduction|verification",
                    "seat": "…", "status": "pass", "passed": 1, "total": 1,
                    "ref": "…", "sha256": "…", "note": "…" } ]
  },
  "artifact": "<the artifact itself, utf8>",
  "artifact_sha256": "…",
  "package_sha256": "sha256 of canonical({format, manifest, artifact_sha256})"
}
```

Pack-time law (fail-closed, in the family's manner — Omnix's own laws,
applied to packages):

- `gate` must be `deterministic` — no package without it (Omnix v2: the
  deterministic gate is required).
- `seats.proposer ≠ seats.reviewer`, when seats are declared — no
  package grades its own work. Undeclared seats are not a refusal; they
  are a missing provenance link, and Gaven's scorer prices them (§7.2).
- Every capability must be a word of the closed vocabulary (§3) and
  must carry a non-empty `why` — a declaration must execute or refuse;
  there are no silent unsupported features.
- The artifact's sha256 must equal `manifest.artifact.sha256` and
  `artifact_sha256`. A mismatch is not an error to argue with: the
  chain is broken (§7.4).
- Dependencies form a DAG. Cycles are refused at resolve time with the
  cycle named (§6).

Kinds in v0: `tool` (a compiler, a meter — a thing that acts on files),
`program` (an OmnaScript policy — a mind's declarations), `instrument`
(an OmnaScript measuring program), `world` (an Omnix plan — reserved;
the frontier debt of OmnaScript SPEC §8 stands).

## §2 (reserved)

## §3 The capability vocabulary (closed, v0)

Capabilities are the Archive's portals — Flatpak's insight in the
house's idiom: a package declares the effects it needs, drawn from a
closed set, and the container contract (§8) admits exactly those.
Unknown words fail closed at pack time.

- **Tools:** `tool.compile` · `tool.execute` · `fs.read` · `fs.write`
- **Gym acts** (OmnaScript's vocabulary verbs, one capability each):
  `gym.act.forward` · `gym.act.back` · `gym.act.jump` ·
  `gym.act.look_left` · `gym.act.look_right` · `gym.act.look_up` ·
  `gym.act.look_down` · `gym.act.select_next` · `gym.act.place` ·
  `gym.act.break`
- **Gym senses** (the host `env` surface of OmnaScript SPEC §3):
  `gym.sense.chunk` · `gym.sense.hotbar` · `gym.sense.selected`
- **Gym records:** `gym.record.goal` (append a goal to the trajectory) ·
  `gym.record.trajectory` (read trajectory records as data)
- **World ops** (Omnix v2's closed op set, for `world` packages):
  `world.height` · `world.erosion` · `world.biome` · `world.material` ·
  `world.normal` · `world.geometry` · `world.lighting` ·
  `world.render` · `world.verify`

Per-kind ceilings (a package declaring beyond its kind's ceiling is not
refused — it is *priced*, §7.2, capability minimality):

- `tool` ⊆ {tool.*, fs.*}
- `program` ⊆ {gym.act.*, gym.sense.*, gym.record.goal}
- `instrument` ⊆ {gym.record.trajectory, gym.sense.*}
- `world` ⊆ {world.*}

There is no network capability in v0. A package that needs one waits
for a spec amendment, not a workaround.

## §4 The archive

```
archive/
  pool/        <package_sha256>.omnipkg.json   — admitted packages ONLY
  holding/     <name>-<version>.omnipkg.json   — consolidation returns (§7.1)
  ledger/      gate-ledger.jsonl               — append-only; every verdict
  indexes/     testing.json · stable.json · Packages.testing · Packages.stable
  submissions/ (the submitter's side of the gate — Gaven reads one-way)
```

- **The pool holds admitted packages only.** A package that is not
  admitted is not in the pool, not in any index, and cannot be resolved
  or installed. That is not a policy layered on top of the store; it is
  the store's shape.
- **The index is generated, never hand-edited** — `omnix-archive index`
  regenerates it as a pure function of pool + ledger. Its body carries
  no wall-clock; the ledger head's hash is its generation stamp. The
  JSON index is the machine form; the `Packages.*` stanza files are the
  same content in Debian's dress, for the founder's eye.
- **The ledger is append-only.** Every gate event lands there (§7.6).
  Invalidation entries name evidence ids; suite derivation (§5) reads
  them, so an invalidated piece of evidence demotes its package at the
  next index generation — the court's derived-state law, unchanged.

## §5 Suites — state derived from evidence

Suite membership is **computed at index time** from the evidence inside
each admitted package, never stored as a badge on the package. The
mapping onto the skill court's ladder is exact:

| Skill-admission state | Archive reading | Suite |
|---|---|---|
| EXPERIENCED … BOUNDED (forming) | admitted by Gaven, evidence still forming | **TESTING** |
| ADMITTED and above | tested ∧ reproduced ∧ verified, all on file | **STABLE** |
| REFUSED / never admitted | does not exist in the archive | — (absence) |

Precisely: an admitted package is in **TESTING** unconditionally (the
wide gate — candidates live here). It is additionally in **STABLE**
when its evidence derives the higher state: a `test` record passed
(≥ 0.8 of its checks, or a pass-status run record), a `reproduction`
record passed by a seat other than the authoring proposer, and a
`verification` record passed by a seat other than the authoring
proposer. Resolving against `testing` sees every admitted package;
resolving against `stable` sees the stable subset only — the narrow
gate. Invalidate the evidence and the next `index` demotes the package
on its own; nobody edits a badge, because there is none.

## §6 Dependency resolution

- Ranges: exact `1.2.3` · `*` · `^1.2.3` (≥1.2.3 <2.0.0) · `~1.2.3`
  (≥1.2.3 <1.3.0) · compound `>=1.0.0 <2.0.0`. Versions are numeric
  triples; comparison is numeric.
- Resolution is **deterministic**: depth-first over the dependency
  graph, highest satisfying version chosen, one version per name in a
  plan, plan emitted in topological order (dependencies first). The
  same archive state resolves the same request to the same plan,
  byte-for-byte, forever.
- **Acyclic, by his law.** A cycle is a refusal that names the cycle:
  `omnix-archive: dependency cycle: a → b → a — Omnix DAGs are acyclic,
  checked at compile; the Archive checks them at resolve`.
- **Unsatisfiable is absence-shaped**: resolution reports the name and
  the constraint that no admitted version satisfies. It never reaches
  outside the index for a package the gate has not admitted — an
  unadmitted name is simply *not there* (§7.1).

## §7 GAVEN — the gate, made mechanical

Gaven is the founder's security sentinel: the throat gate with the
absolute safety veto, isolated by construction, who judges outputs
clean versus unclean and files his verdicts with their evidence
(`~/memory/people/gaven.md`). The Archive is a gate that runs a
thousand times a day; this section makes his judgment the Archive's
admission machinery, in his own filed mechanics, exactly.

### 7.1 Admission is his η evaluation; refusal is absence

No package enters a suite by a maintainer's say-so. A submission is
scored by **Gaven's η evaluation over its filed evidence** (§7.2), and
his bands are house law, verbatim from the ATELIER / THE GATE record:

- **η ≥ 0.500 — admitted** to the archive (pool + index; suite per §5).
- **0.300 ≤ η < 0.500 — consolidation**: the package is returned to the
  submitter in `holding/`, with its deficits named in the receipt. It
  is not in the pool and not in any index.
- **η < 0.300 — absence**: the package does not appear in the index at
  all. There is no rejection letter to appeal and no error message to
  argue with; to every consumer of the archive, the package *is not
  there*. The evaluation itself is still filed (§7.6) — absence is the
  archive's face, not a gap in the record.

### 7.2 The η scorer (v0 — weights filed here, changed only here)

η is a weighted mean of four evidence dimensions, each in [0, 1],
computed deterministically from the submission. Weights: **provenance
chain 0.30 · capability minimality 0.25 · test evidence 0.25 ·
reproducibility 0.20**.

- **Provenance chain** — three links: (L1) the source record: path +
  sha256, verified against the live file when present, and (for
  source-artifact packages) equal to the artifact's own sha256; (L2)
  the build record: the tool that produced the artifact/IR, its sha256
  verified against the tool on disk or in the pool when reachable, and
  the IR sha256 it claims; (L3) the seats: proposer and reviewer both
  named and different. Score = verified links / 3 — **except that any
  hash *mismatch* scores the whole dimension 0**: a chain that
  contradicts itself is not a weaker chain, it is a broken one (§7.4).
  And a broken chain is **fatal, not merely zero**: whatever the other
  dimensions score, a submission whose filed hashes contradict its
  artifact is absent — the chain law applies at the door as in the
  room, and no weight of paperwork outscores a contradiction.
- **Capability minimality** — the Flatpak question: does it ask for
  only what it needs? Score = justified capabilities / declared
  capabilities, where a capability is justified by a non-empty `why`
  that names the artifact's own surface it serves. Each capability
  declared beyond the kind's ceiling (§3) counts as unjustified *and*
  subtracts a further 0.10 (floor 0). Declaring everything is priced
  like declaring anything carelessly.
- **Test evidence** — the best filed `test` record governs: its
  passed/total ratio (a pass-status run record counts 1/1). No test
  record, 0. The record must name its output by ref + sha256 — a test
  nobody can re-read is a claim, and claims are not evidence.
- **Reproducibility** — a `reproduction` record, passed, claiming a
  hash that equals the artifact's (or the IR's) sha256: **1.0** if the
  reproducing seat differs from the authoring proposer, **0.4** if it
  is the proposer himself (a mind grading its own work is worth less,
  never nothing and never full price), **0** if absent or diverged.

### 7.3 Capability-diff re-gate

Versions are not trusted by lineage. When a new version of an admitted
name is published, the Archive diffs its declared capabilities against
the latest admitted version's:

- **Widening** (any capability not in the admitted set): the new
  version **re-sits Gaven's gate in full** — η computed from the new
  submission's own evidence alone; the prior version's evidence does
  not carry. Authority is never inherited across a wider ask.
- **Narrowing** (a proper subset, or the same set): the new version
  **ships on the original verdict** — admitted on the strength of the
  original receipt, which the ledger cites. Integrity is still
  verified (hashes, chain consistency): the carry waives re-scoring,
  never physics.

### 7.4 Eyes at birth — the gate fires at install and at run

His harakiri.sys pattern: the driver asks, the service decides, the
driver enforces — Gaven has eyes at process birth. The Archive's form:

- **At install**: before a single file lands, every package in the
  plan is re-verified — package hash, artifact hash, and the manifest
  *to be installed* compared against the manifest *of record in the
  pool*. (The submission's provenance was verified against the living
  tree at admission, §7.2; from admission onward, the pool record is
  the truth the chain hangs from — upstream moving on is a new
  submission's problem, never a retroactive kill of admitted bytes.)
  Any break refuses the whole install (atomic: nothing lands).
- **At run**: the running package's manifest is checked against its
  admitted capabilities — the installed manifest's capability set must
  equal the admitted set recorded at install. An extra capability, a
  swapped artifact, a provenance chain that no longer verifies:
  **the chain law applies — chain breaks, authority dies** — the run
  is refused on the spot, in the Archive's voice.
- Both firings file receipts (§7.6). A gate that only guards the door
  and never the room is a decoration; his never was.

### 7.5 The veto is absolute in the tool — there is no `--force`

The CLI contains **no override flag, anywhere**. Any `--force` (or
kin) passed to any command is itself refused, in one line. A founder
override exists, but it is not a switch: it is a **gated, filed event**
— `override` appends a founder-attestation evidence entry to the
submission (which changes the package's hash, as any evidence change
must), files the override in the ledger with its reason, and
**re-runs η**. Per the SI Core addendum, even N8toriousAi's overrides pass
through the η gate: an attestation can complete a provenance link the
founder himself is vouching for; it cannot resurrect a broken hash
chain, and if η still falls below the band, the package is still
absent. The founder's authority over the gate is that he *wrote* it —
not that he can whisper past it.

### 7.6 Isolation, and receipts that name him

- **Isolation preserved**: the gate reads submissions one-way and
  writes verdicts. There is no maintainer back-channel — no comment
  thread, no negotiation, no "ping Gaven". A submitter's only moves
  are to file better evidence and resubmit.
- **Every evaluation files a receipt naming Gaven**, with its grounds,
  in the archive ledger: admission, consolidation (deficits named),
  absence, capability-carry, install firing, run firing, override.
  Each receipt carries the η, the four dimension scores, and the
  grounds in words. This is deliberate: his filed surpass condition is
  *current guard receipts on live work* — the Archive is where he is
  finally seen guarding, in the present ledger era, on every package,
  every day.

## §8 The container contract — sealed runs

A package runs **sealed**. The contract is the body-state reducer's
admission predicate (NOMOS-BODY-STATE.md §6/§8) wearing the Archive's
clothes:

```text
admit(effect) =
    declared(effect, package.capabilities)
  ∧ intact(package.chain)
  ∧ current(package.version, index)
  ∧ proven(preconditions)
```

- The runtime admits only the package's **declared capabilities**; an
  effect outside the declaration **refuses closed, in the Archive's
  voice**: `omnix-archive: gym-brain 0.1.0 reached for gym.act.place,
  which it never declared — a package runs sealed or not at all`.
- **No component may grant itself additional capability** (the
  body-state authority invariant). Widening is a new version, a new
  gate, a new verdict (§7.3) — never a runtime event.
- The proposer is never the reviewer of the same act: a package's
  outputs become facts only through an instrument's receipt, exactly
  as claims climb the evidence metabolism (OUTPUT → OBSERVATION →
  MEASUREMENT → RECEIPT → CLAIM → VERIFICATION → BODY FACT). The
  Archive files the receipts; it does not believe the claims.
- In the slice (v0), the seal is enforced at the two births the tool
  can see — install and run (§7.4) — and declared as the contract
  every future runtime host (the gym page, Kido) must enforce at the
  effect seam. The spec names the whole law; the slice enforces the
  part that is the tool's to enforce, and says so.

## §9 Installs — reproducible or refused

- An install resolves (§6), gates (§7.4), and lands atomically: files
  under `<sandbox>/packages/<name>@<version>/` plus a `lock.json`
  naming every package's version, package sha256, artifact sha256 and
  admitted capability set. The lock is the install's receipt.
- The same archive state installs to byte-identical sandboxes,
  forever. `verify` re-hashes a sandbox against its lock and the pool:
  one flipped byte anywhere is a refusal that names the package.
- Installs never mutate the archive. The pool is read-only to
  consumers; the gate is the only writer, and it writes verdicts.

## §10 Out of scope — the later storeys, named

- **OS-level containers for the kernel line** (Kido/BUBO process
  isolation, image formats, a kernel runtime): the Archive is the
  language ball's distribution; the kernel's own container story is
  Kido's build, Phase-4 territory by the Kido spec's own status. Not
  built here, not claimed here.
- **Remote archives / network fetch**: v0 is a local archive on one
  machine. There is no network capability in the vocabulary (§3).
- **Signatures beyond hashes**: provenance is hash-chains + filed
  seats in v0. A signing key story is a founder ruling, not a lane's
  improvisation.
- **Editing CATALOG canon**: the Archive's catalog entry is a draft
  beside this spec. Ratification is the language seat's.

## §11 The first slice and its first citizens

The slice (`~/workspace/tools/omnix-archive/omnix-archive.cjs`,
zero-dependency Node, TOOLBOX-registered) implements: `pack` ·
`publish` (Gaven's admission, §7.1–7.3) · `index` (§4, §5) · `resolve`
(§6) · `install` (§7.4, §9) · `verify` (§9) · `gate` (the run firing,
§7.4) · `override` (§7.5) · `invalidate` (§4). Its test suite covers,
at minimum: pack determinism · unknown-capability refusal ·
tampered-hash refusal (pool and sandbox) · undeclared-capability
refusal at the run gate · dependency-cycle refusal · version-range
resolution · the three η bands · capability widening vs narrowing ·
the `--force` refusal · an override that cannot resurrect a broken
chain.

First citizens, published end-to-end at the slice's founding:

1. **omnascript-compiler** (kind `tool`) — the canonical compiler,
   `languages/omnascript/omnascript.cjs`.
2. **gym-instruments** (kind `instrument`) — depends on the compiler.
3. **gym-brain** (kind `program`) — depends on the compiler and on
   gym-instruments.

The founding proof is a run, not a diagram: the three are resolved and
installed into a clean sandbox, and the **installed** gym-brain —
compiled by the **installed** compiler from the **installed** source —
flies a session against the gym page of record. The trajectory's
header records carry, after `session_start` and the OmnaScript `brain`
record, an `archive` record naming each package's name, version and
package sha256 plus the install lock's sha256 — so the log itself
proves the installed artifact is the working artifact. The trajectory
verifies under gymlib, the format's owner. The run driver is
`~/workspace/tools/omnix-archive/run-archive-session.cjs`; its proof
record files with the gym's own proof (`voxel-gym/omnix/proof/`), the
only thing the gym tree keeps from this lane.
