The canon is the team’s shared source of truth: style rules, decisions, domain facts. It lives in a Git repository. A run loads it once from the commit you pinned, checks every file against that commit, and records the commit and a content hash in the ledger.
Prerequisites
Section titled “Prerequisites”- A team folder that runs (Start from a template). The examples use a
dev-teamfolder namedmy-team. - Git on your machine.
- Canon: what is verified and what is not.
-
Create a repository for the canon next to the team folder, with one rules file, and commit it. An existing local clone works the same way.
Terminal window mkdir team-canoncd team-canongit initmkdir rulesprintf '# Style\n\nChange as little as possible. Keep public function names.\n' > rules/style.mdgit add rules/style.mdgit commit -m "Add the style rules" -
Print the id of the commit to pin, then go back.
Terminal window git rev-parse HEADcd .. -
Add a
canonsection at the top level ofmy-team/nuramesh.yaml. Use the 40-character id from step 2.canon:repository: team-canoncommit: a647376ccf944c822d96c5788a7a13af1b62fbcdpaths: ["rules/*.md"]Key Value repositorythe path of a local repository. A relative path starts at the folder you run nurameshin, not at the team foldercommitthe full commit id: 40 lower-case hexadecimal characters. A branch name or a short id is refused pathsone or more patterns for the files to load -
Check the file and run the team from the folder that holds both
my-teamandteam-canon.Terminal window nuramesh validate my-team/nuramesh.yamlnuramesh try my-team --fake --approve-as human:you --allow-unsandboxed --run-id canon-1 -
To change the canon later, commit the change in the canon repository and put the new commit id in
nuramesh.yaml. A run never follows a branch: it uses the commit you pinned until you change the pin.
Check it worked
Section titled “Check it worked”The report has a Canon: line with the pinned commit, just above the Ledger: line:
Canon: a647376ccf944c822d96c5788a7a13af1b62fbcdThe run’s ledger has one canon.loaded entry. It names the commit, each loaded file with its hash, and what
was re-hashed during the check. To see it, export the ledger and search the file for canon.loaded:
nuramesh ledger export --out canon-ledger.jsonl --team my-team{"canon_hash": "99d3b9cb...", "commit": "a647376ccf944c822d96c5788a7a13af1b62fbcd", "documents": [{"hash": "5a7f611d...", "name": "rules/style.md"}]}This is the entry’s payload, shortened. If documents is empty, no file matched paths.
Troubleshooting
Section titled “Troubleshooting”| You see | Do this |
|---|---|
error: the canon repository path isn't a directory |
The path is wrong from where you ran the command. Run from the folder the relative path starts at, or use an absolute path |
error: object_missing: the commit ... is missing from the repository |
The commit id is not in that repository. Copy it again from git rev-parse HEAD |
validate names $.canon.commit |
The id is not 40 lower-case hexadecimal characters |
The run starts but documents is empty |
No file of the commit matched paths. The patterns are relative to the top of the repository |
Next steps
Section titled “Next steps”- Canon: what the check covers and what it does not.
- Independent verifiers: the canon is one of the four things a verifier gets.
- The ledger and anchors: where the loaded commit is recorded.
Was this page helpful?