Reference
Schemas
Canon accepts two JSON source schemas, report/v1 and site-input/v1, and builds each into an immutable output, packet/v1 or site-bundle/v1; this page describes all four.
Canon takes exactly one of two JSON source documents and turns it into exactly one of two
immutable, content-addressed directories. Both pairs share the same guarantees: an invalid
source fails the build, and verify recomputes every digest independently of the
builder.
report/v1 → packet/v1
report/v1 is a single technical brief. The schema is closed: an unknown member
fails validation, and markup escape hatches such as html, style or
class get their own error.
schema,id(lowercase letters, digits and hyphens) andtitle.metadata:status(draft,proposedorfinal),classification,reviewDate(YYYY-MM-DD),authorsandreviewRequest.summary: averdict(confidenceplustext), one or moreparagraphs, and optionalmetrics.evidence: at least one item. Afileitem has apathrelative to the report's folder and amediaTypeoftext/plain,text/csvorapplication/json. Aredactedorunavailableitem gives areasoninstead.sections: at least one, each with anid, atitle, an optionalledeand itsblocks. Block types:paragraph,list,code,diff,table,finding,decision,risk,requirement,comparison,chart,diagramandmetrics.provenance: at least one source (labelplusreference), and optionalnotes.- Optional:
subtitle,appendices(more sections) andpublication.
A complete example, with one finding that cites one evidence file, evidence/replay.csv:
{
"schema": "report/v1",
"id": "cache-review",
"title": "Cache layer review",
"metadata": {
"status": "proposed",
"classification": "Internal",
"reviewDate": "2026-11-18",
"authors": ["Platform team"],
"reviewRequest": "Approve the eviction change"
},
"summary": {
"verdict": { "confidence": "recommended", "text": "Ship the LRU change." },
"paragraphs": ["Hit rate rises from 71% to 88% on the replay."]
},
"evidence": [
{
"id": "ev-replay",
"title": "Replay results",
"kind": "file",
"path": "evidence/replay.csv",
"mediaType": "text/csv"
}
],
"sections": [
{
"id": "findings",
"title": "Findings",
"blocks": [
{
"type": "finding",
"id": "F-1",
"title": "LRU beats FIFO on real traffic",
"severity": "medium",
"confidence": "proven",
"claim": "The replay shows a 17-point hit-rate gain.",
"evidence": ["ev-replay"]
}
]
}
],
"provenance": {
"sources": [{ "label": "Replay harness", "reference": "tools/replay" }]
}
}
canon build report.json --out packet/ turns that into a packet/v1
directory: index.html (human, the entry) and report.md
(agent, the agentEntry), built from the same validated report, plus the cited
evidence, fingerprinted assets/, manifest.json and
checksums.json. The manifest lists every file with its role, media type, size and
SHA-256; the packet's content ID is the SHA-256 of the canonical manifest itself, so two builds
of identical bytes get the same ID and a changed byte changes the ID.
Every summary, section, finding, decision, risk, figure and evidence heading gets a stable
anchor id, shared verbatim between index.html and report.md — so
report.md#f-F-1 and index.html#f-F-1 name the same block in both
artifacts. canon verify packet/ recomputes every digest and the content ID and
exits non-zero on any mismatch; it never repairs.
site-input/v1 → site-bundle/v1
site-input/v1 is a multi-page situation report. It is closed in the same way as
report/v1, and every member below is required unless marked optional.
schemaandtitle.edition:editionId,editionDigest(64 hex characters),observedAtand acoveragewindow (from,to), all times in UTC asYYYY-MM-DDTHH:MM:SSZ.registry:versionandsha256.areas: each with anareaRef, atitle, itsprojects(projectRef,title) andcounts:waiting,movedandblocked(a whole number, ornullwhen not recorded), acoverageofcomplete,partialorunavailable, thegapRefsthat explain any shortfall, and aunit.items: each with anitemRef, anareaRefandprojectRef(ornull, withgapRefssaying why), atitle, anageand itsblocks: thereport/v1block types exceptdecision.decisions: each with adecisionRef,label,kind, theitemRefit belongs to, and itsquestions(options, a recommendation, and whether free text is allowed).evidence: at least one item, as inreport/v1.gaps: each with agapRef, akindandtext; the list may be empty.- Optional:
history, the earlier editions (editionId,contentId,observedAt).
A complete minimal example, with one area, one item and no decisions:
{
"schema": "site-input/v1",
"title": "Weekly status",
"edition": {
"editionId": "2026-w47",
"editionDigest":
"9f2c0e4b7a1d3c5e8f6a2b4d0c1e3f5a7b9d2c4e6f8a0b1c3d5e7f9a2b4c6d8e",
"observedAt": "2026-11-18T12:00:00Z",
"coverage": { "from": "2026-11-11T00:00:00Z", "to": "2026-11-18T00:00:00Z" }
},
"registry": {
"version": "1",
"sha256":
"0c7d3e1f5a9b2c4d6e8f0a1b3c5d7e9f2a4b6c8d0e1f3a5b7c9d2e4f6a8b0c1d"
},
"areas": [
{
"areaRef": "platform",
"title": "Platform",
"counts": {
"waiting": 1, "moved": 3, "blocked": 0,
"coverage": "complete", "gapRefs": [], "unit": "items"
},
"projects": [{ "projectRef": "cache", "title": "Cache layer" }]
}
],
"items": [
{
"itemRef": "cache-lru",
"areaRef": "platform",
"projectRef": "cache",
"title": "Switch eviction to LRU",
"age": "3 days",
"blocks": [{ "type": "paragraph", "text": "Waiting on review." }]
}
],
"decisions": [],
"evidence": [
{
"id": "ev-none",
"title": "No evidence this week",
"kind": "unavailable",
"reason": "Nothing attached."
}
],
"gaps": []
}
canon build-site site-input.json --out bundle/ turns that into a
site-bundle/v1 directory — the same human/agent split as a packet, but across a
whole navigable set of pages instead of one. canon verify-site bundle/ is the
independent verifier; it rejects anything that isn't a canonical site-bundle/v1
path, and refuses an HTML page that carries a verdict block not permitted in this schema.
Shared rules
- Fail-closed: an invalid source document fails the build outright, with no partial output.
- Content-addressed: the content ID is the SHA-256 of the canonical manifest — sorted keys, no incidental whitespace.
- Two coequal leaves: a human HTML entry and an agent Markdown entry, generated from one validated source and sharing one set of block anchors.
- Offline by design: both schemas render to zero-JS, zero-external-request output. Libron is vendored as fingerprinted local WOFF2.
See the CLI reference for the exact build / verify
/ build-site / verify-site invocations, and the
quick start for a worked report/v1 example end
to end.