Deterministic · offline-first · fail-closed

Sealed editions for agent work.

Canon compiles structured JSON and bundled evidence into an immutable pair: a calm HTML publication for people and a byte-verified Markdown file for agents — fingerprinted, content-addressed, re-hashed on every read.

zshproposed output style
$ canon brief report.json --alias alias-promotion

compiled  report/v1 → packet/v1        14 files
verified  sha256 · md parity · anchors 1:1
stored    sha256-f9b0c51d634c76fe…   ~/.canon
alias     alias-promotion   g4 → g5
serving   http://127.0.0.1:8791/a/alias-promotion/

exit 0
01

One source, two leaves

report.jsonsource
{
  "schema": "report/v1",
  "blocks": [ … ],
  "evidence": [ … ]
}
.csv.json.log.diff
index.htmlfor people
02Proposed flow
b‑03If the expected generation doesn’t match, the target refuses and the CLI exits 1.
Zero-JS · vendored fonts · print-ready
report.mdfor agents
## 02 · Proposed flow
b‑03If the expected generation doesn’t match, the target refuses and the CLI exits `1`.
CommonMark · block anchors 1:1
sha256-f9b0c51d… · one ID for both leaves
Plate 1. One sheet, folded once. Block b‑03 is the same block on both leaves, and the content ID covers every byte of both.
02

CLI surface

Exit codes 0 Success 1 Verification failed · fail-closed 2 Usage error
2.1

Author & inspect

Compile, verify, store, point an alias.

canon brief <report.json> --alias <name> canon sitrep <site-input.json> --alias <name> canon status
2.2

Build, verify & archive

Low-level steps, each checkable alone.

canon build · verify [--json] canon build-site · verify-site canon archive <packet-dir> --out <file.tar>
2.3

Store & aliases

Compare-and-swap prevents lost updates.

canon publish <packet-dir> [--root <store>] canon alias list · get <name> canon alias set <name> <id> --expect-generation <n>
2.4

Workstation server

Loopback by default; backs Canon.app.

canon serve --root <store> [--port 8791] [--tailscale …] canon service start · status · stop canon service restart · clean
2.5

Remote targets

Gated: explicit grants, dry-run, zero delete.

canon publish <dir> --target --targets [--grant upload] canon promote · rollback --expect-generation [--grant promote] canon reconcile --target --targets
2.6

Served routes

Mutable aliases → immutable editions.

/a/<alias>/ · /a/<alias>/report.md · /a/<alias>.json /p/sha256-<hex>/ · manifest.json /healthz
03

Routes & caching

RouteAudienceCaching
/a/<alias>/ Human entry · 307 to current edition no-store
/a/<alias>/report.md Agent Markdown entry no-store
/a/<alias>.json Alias record · contentId, generation no-store
/p/sha256-<hex>/ Permanent human edition immutable
/p/sha256-<hex>/manifest.json Inventory, sizes, digests immutable
/healthz Daemon health probe no-store