Reference implementation ·MIT ·8 rungs ·97 laws

box-and-box

The complete governance kernel — eight modal rungs, one bridge (feasible ▸ permitted ▸ best), and 97 property-tested laws (2000 trials each). Pure arithmetic: no LLM, no network, no I/O. Read every line below in five languages — and every one passes the same 97-law suite. The algebra, not the syntax, carries the guarantee.

# the published package — read it, run it, port it
npm install -g box-and-box
box-and-box laws   # the 97-law conformance harness
box-and-box govern decision.json # a real verdict → certificate JSON

Conformance — every language, the same 97 laws

Source browser — read the real served code

value.mjs raw ↗
loading…

The spec is the suite

Each rung is a small, self-contained module — a single algebraic structure: a product of monoids (alethic), a diamond status lattice (deontic), tropical / probability / log semirings (axiological), LTL formula progression (temporal), AGM revision with entrenchment (reflexive), S5 / KD45 modal logic (epistemic), ATL controllable-predecessor fixpoints (strategic), and a linear-logic double-entry ledger (resource).

A port is faithful exactly when it satisfies the same equations under the same randomized trials. Run node test/laws.mjs — or python3 laws.py, mix run run_laws.exs, cargo run --release, go run . — and you get the identical 97 / 97. JavaScript is the conformance reference; the Python, Elixir, Rust and Go ports were each checked against it. No external dependencies — every port runs offline on its language's standard library alone.