Skip to main content

Canon 🏛️

Deterministic governance knowledge integrity engine for AI systems.

Canon is a lightweight, tamper-evident governance synchronization engine designed to fetch, verify, diff, and audit external regulatory and organizational policies. It acts as the structured source-of-truth pipeline for AI constitutional guardrails.


Key Features

  • Source Adapters: Extensible adapters for crawling structured authorities (e.g., OWASP LLM Top 10, NIST AI Risk Management Framework, FINOS AI Governance).
  • Deterministic State Hashing: Cryptographically hashes governance rulesets to detect changes instantly and reliably.
  • Evidence Packages: Generates comprehensive diff packages detailing added, modified, deprecated, or removed rules, including severity deltas.
  • Tamper-Evident Ledger: Logs all transitions to an append-only, hash-chained ledger (ledger.jsonl) to ensure auditability.
  • Human-in-the-Loop Approvals: Approval gate that secures state transitions behind individually-attributed cryptographic approval records.
  • Microsecond Latency: Built for high-frequency runtime checks with execution overhead under a millisecond.

Installation & Setup

  1. Activate your environment and install dependencies:
    conda activate canon
    pip install -e .
    
  2. Configure your GitHub token (optional, but recommended to avoid rate limits):
    set GITHUB_TOKEN=ghp_your_token_here
    

CLI Usage

1. Fetch Latest Policies

Fetch state from all tracked governance sources, compute hashes, and compare them against local baselines.

canon fetch

2. Review Pending Decisions

Interactively inspect and approve/reject/defer pending evidence packages. Each decision is written to .canon/approvals/ and appended to the ledger. Deferred packages stay in the pending queue; approved and rejected ones leave it.

canon review

3. Verify Ledger Integrity

Verify the ledger's hash chain, every approval record's hash, and that approval records and ledger approval entries match one another. Exits non-zero on any violation.

canon verify

4. Check Governance Status

Display the active version, rule count, last fetch time, and state hashes of all tracked sources.

canon status

Empirical Performance (ICAIF Benchmarks)

Under benchmark conditions (compiled on Python 3.14), Canon operates at microsecond scales, presenting negligible overhead for enterprise deployment.

Operation Mean Latency Median Latency P95 Latency P99 Latency Throughput
Source State Hash (100 rules) 135.36 µs 129.00 µs 155.10 µs 253.40 µs 7,387.9 /s
Diff Engine (100 rules, 5 changes) 88.12 µs 83.30 µs 104.10 µs 176.00 µs 11,347.8 /s
Diff Engine (500 rules, 20 changes) 398.27 µs 366.70 µs 548.10 µs 834.10 µs 2,510.8 /s
Evidence Hash Generation 12.27 µs 11.20 µs 11.50 µs 18.70 µs 81,496.9 /s
Ledger Chain Hashing 1.34 µs 1.20 µs 1.20 µs 1.40 µs 744,990.0 /s
Approval Record Hashing 3.34 µs 3.30 µs 3.40 µs 3.70 µs 299,043.3 /s
End-to-End Pipeline (Diff + Hash + Ledger) 490.10 µs 450.05 µs 734.20 µs 1,112.60 µs 2,040.4 /s

Next Steps & Integrations

For a deep dive into how Canon integrates with the broader ecosystem, please read the Architecture Document.

Metadata

Release files for canon-governance 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canon-governance 0.1.1
File Size Uploaded Provenance Actions
canon_governance-0.1.1.tar.gz 28.6 kB With provenance Details for canon_governance-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for canon-governance 0.1.1
File Interpreter ABI Platform Actions
canon_governance-0.1.1-py3-none-any.whl Python 3 none any Details for canon_governance-0.1.1-py3-none-any.whl

Total release size: 56.6 kB

Release files / canon_governance-0.1.1.tar.gz

Download URL canon_governance-0.1.1.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
52c96bab749bccf020cdeca3369b67fd1fecbe7ac8d188145bd7e34900ed268d
BLAKE2b-256 checksum
How to use checksums
249c92133ff0d2a92657d4a0c53581cd570ecde740fb236d7ee994d8956b985e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / canon_governance-0.1.1-py3-none-any.whl

Download URL canon_governance-0.1.1-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a56c84540fc6fb16b54893e1a6664683b201c3b759c1772a3a7b29a19cdedd8
BLAKE2b-256 checksum
How to use checksums
ce175c95d3fe3cd853a0e8435eacce63d9bc81a22fa0061e71cec9b0bfa3d6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for canon-governance 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for canon_governance-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page