aien-protocols (the written contracts between the parts of AIEN)
Specifications for the byte formats and rules the parts of AienOS (the whole AIEN system) agree on: agent state, inference, evaluation, evidence receipts, crumbs, execution transcripts, compiled Omega units, the Omega shell platform boundary and the task messages between a Raspberry Pi and the DGX Spark. Each contract is a specification in
specs/, often with test vectors and a small C checker that proves the vectors match the text. Reference Rust crates live incrates/. The repository holds contracts only, never private implementations.
Shared rules: read https://www.aienos.com/agents/RULES.md first. This file adds what is specific to this repository; where the two differ, this file wins here.
Scope
- Applies to the whole repository.
specs/<name>/: one directory per specification (Community Specification License 1.0), withtools/(generators and C checkers) andvectors/where they exist. TheStatusline at the top of each specification says whether it is Draft, Stable or FROZEN.crates/: ten reference Rust crates (Apache-2.0) in one Cargo workspace. Rust is scaffolding and Omega is the destination (aien-architecture ADR 0024), so the specifications are the lasting part.- Implementations of a contract live with their owner, not here: the Omega language repository (omega-mv) and the Aienux kernel (https://github.com/aien-dev/aienux) implement some contracts in C; aien-sovereign-core-mv uses some crates (
CONSUMERS.md). - Rule of direction: protocols point inward to nothing, implementations point downward to protocols, and implementations never point sideways at each other.
Installation
git clone https://github.com/aien-dev/aien-protocols-mv.git
cd aien-protocols-mv
cargo check --workspace --all-targets
The crates need a stable Rust toolchain (there is no rust-toolchain.toml). The spec checkers need only bash, coreutils and a C99 compiler (cc). No Python, no CUDA toolkit and no outside dependencies in the trusted base.
Configuration
- There is no runtime configuration. The crates are libraries and the checkers take no settings.
tests/gates/*.gateandtests/gates/run.shdefine the Spark gates..aien/alwayslists the gates that run on every change (PROTO-ZERO-DISK-SECRETS,PROTO-ANTI-SLOP);.aien/unmapped-oklists the paths that need only those.- Crumbs are retired from the active workflow (DRA-97, 2026-11-07): no gate, step or workflow checks
.crumbfreshness, and the.crumbfiles stay as history.
Usage
# The Rust gates
cargo fmt --all -- --check
cargo check --workspace --all-targets
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
# The spec checkers (each builds its C checker with cc and runs the vectors)
bash specs/verified-crumb/tools/check-golden.sh
bash specs/osc-unit-artifact/tools/check-vectors.sh
bash specs/execution-transcript/tools/check-corpus.sh
bash specs/pi-spark-task/tools/check-vectors.sh
bash specs/osh-platform/tools/check-stream-vectors.sh
# The LTP0 native suite (seeded Omega; needs an omega-mv checkout at the sources.json revision)
sh specs/latent-payload/run-native.sh /path/to/omega-mv
Every gate is also one step of tests/gates/run.sh <step>: fmt, check, clippy, test, zero-disk-secrets, anti-slop and c-vectors. c-vectors runs every specs/*/tools/check-*.sh and passes only when all of them pass, so a new checker named check-*.sh is picked up automatically. anti-slop fails on any em dash or en dash in crates/, docs/, README.md and ANTI_ENCLOSURE.md.
The make-*.sh scripts in specs/*/tools/ regenerate vectors. Run one only when the specification itself changes, and commit the regenerated vectors together with the text.
specs/latent-payload/run-native.sh is not part of c-vectors, because it needs an outside omega-mv checkout. It resolves this repository root from its own location, checks that every Omega input (seed/out/omc at the pinned sha256, the om2 conductor and its two SHA-256 constant fixtures, om/tls/sha2.om) exists and names any missing path, then creates the temporary root seed link that the unchanged conductor needs and removes it on exit. Without that link the conductor prints INVALID SHA-256 constant fixture unreadable or malformed and exits 3.
Conventions
- Specification changes follow
GOVERNANCE.mdandVERSIONING.md. Specifications and crates are versioned together withvX.Y.Ztags; while the major version is zero a breaking change needs a minor bump and migration notes inCHANGELOG.md. - A FROZEN specification (osc-unit-artifact v1) does not change without explicit approval; consumers carry copies of its vectors.
- A specification and its vectors change in the same pull request, and the checker must pass on them. Do not edit a vector by hand to make a checker pass.
- Deprecate before removing: mark the item and name its replacement for at least one minor release, then list the removal in
CHANGELOG.md. - A consumer that adopts a new tag records it in
CONSUMERS.mdin the same change. - No em dashes or en dashes in prose; the
PROTO-ANTI-SLOPgate enforces it for the paths above.
Safety and approvals
- The DGX Spark is the only test judge (
docs/PIPELINE.md); GitHub checks on pull requests are advisory and build nothing from this repository. - A change to
.aien/,tests/gates/or.github/workflows/isBLOCKED_OPERATOR: it runs only when the operator starts it by hand. Ask before touching those paths, and never relax a gate or a checker to make a change pass. - Ask before changing the
Statusof a specification, freezing one, or changing a wire format that a consumer inCONSUMERS.mddepends on. - No plaintext secrets:
.env*files failPROTO-ZERO-DISK-SECRETS. Never commit keys or tokens. - Contributions are licensed under the Community Specification License 1.0 (specifications) and Apache-2.0 (code) under the Developer Certificate of Origin. Keep
ANTI_ENCLOSURE.mdcommitments intact. - Open a pull request against
mainwith the commands you ran and their output. Nothing on GitHub gates a merge andmainrequires no status check (.github/workflows/aien-verification.yml); the local Spark pipeline merges a pull request only after a maintainer adds theready-to-mergelabel and its gates pass on the current head (seedocs/PIPELINE.md).
Further reading
README.md: the specification table, the crate table and the build steps.GOVERNANCE.md,SCOPE.md,VERSIONING.md,CHANGELOG.md,CONSUMERS.md: process, scope, versioning, history and consumers.ANTI_ENCLOSURE.md,NOTICES.md,TRADEMARKS.md: licensing commitments and notices.docs/PIPELINE.md: how the Spark gates test and merge a pull request.- https://github.com/aien-dev/aien-architecture-mv: the plan, the ADRs and the status of the whole system.