← All Specifications

CANON-GATE

The Canon Gate — a deterministic validity gate for constitutional intelligence: a pure function that evaluates intent against a versioned, signed canon store and produces a signed EvaluationRecord.

L3 — Deterministic Validity Gate 15 Invariants 379 Lines ❄️ Frozen

CANON-GATE v0.1.0

The Canon Gate — a deterministic validity gate for constitutional intelligence: a pure function that evaluates intent against a versioned, signed canon store and produces a signed EvaluationRecord.

Status: Frozen (2026-08-12 — signed fixtures + four-question stress test + forge attestation) Extends: UIR-LD v0.1.0 (which extends INPUT-LD v0.1.0, which extends CORE-LD v0.1.0) Constitutional dependencies: URS v0.1.0 → CORE-LD v0.1.0 → INPUT-LD v0.1.0 → UIR-LD v0.1.0 Spec family: Functional Profile (see CORE-LD §6.1 — Composition Rules) Dimension registry prefix: CANON-GATE Canonical @context: https://specs.initialcore.net/ns/canon-gate.jsonld Domain: canon.initialcore.net (planned)

1. Preamble

Canon is the canonical/constitutional intelligence of ICore: it answers "what is valid according to the canon?" — deterministically, mechanically, and without any model in the loop. This specification defines the Canon Gate: the pure-function interface through which any intent is checked against the canon before it may proceed.

Canon is a capability inside Cardinal (universal intelligence — "what should we do, and how can we realize it?"). One intelligence, two capabilities: Cardinal proposes, Canon validates. Canon is never a separate model, service, or authority — it is a deterministic rule engine over a versioned, signed rule store. The Gate has no opinions; it only reports whether an intent conforms to the canon as amended.

What CANON-GATE is:

What CANON-GATE is not:

1.1 Composition rule

CANON-GATE = POLICY-LD + USE + UIR-LD SemanticBinding + CanonStore + CanonVersion + Rule + EvaluationRecord

A conforming Canon Gate implementation MUST also conform to POLICY-LD, UIR-LD, INPUT-LD, and CORE-LD at the same conformance level. The Gate is the executable face of the canon; the canon is data, never code.

1.2 Domain positioning

The Canon Gate is the artifact for G8 (attestation/provenance deepening): every evaluation is a signed, replayable record that an independent verifier can re-run to reproduce the verdict (I-CANON-1). It is a Draft until its conformance suite (canon_gate_conformance.py) is verified and green — matching URS freeze doctrine.

2. Scope and Derivation Chains

2.1 Scope

ConcernOwner
What is valid according to the canon**Canon Gate** (this spec)
How rules are expressedPOLICY-LD (Policy, Rule, Condition, PolicySet)
How rules are selected and combinedUSE (Universal Selection Engine)
How intent enters the gateUIR-LD IntentNode + SemanticBinding
How amendments happenConstitutional pipeline (spec freeze, UCF attestation, version chain)
How evaluations are attestedEvaluationRecord + Ed25519Signature2020 (TRUST-LD)

2.2 Derivation chains

Each CANON-GATE entity traces to the constitutional primitives through the intermediate axioms:

EntityUSCP PrimitiveUCE/UCM/UCC AxiomRepresentation AxiomCANON Entity
CanonStoreLegitimacyUCM Canon AxiomCORE-LD GroupCanonStore
CanonVersionVerifiabilityUCC Verification AxiomURS Provenance + Canonical HashCanonVersion
RuleConstraintUCM Constraint AxiomPOLICY-LD RuleRule
EvaluationRecordAccountabilityUCE Provenance AxiomTRUST-LD AttestationEvaluationRecord
Gate functionTransformationUCM Execution AxiomUSE evaluationGate (pure function)

2.3 Four-question constitutional semantics

The Gate answers, for every evaluation: Why is it constitutional? (accountability — every decision traceable to canon); What invariant requires it? (I-CANON-1..15); How is it verified? (replayable evaluation, signed record, hash-checked canon); What happens if absent? (an unsigned or unreplayable evaluation is structurally non-constitutional — it cannot be attested).

3. Entity Types

CANON-GATE extends the POLICY-LD / UIR-LD entity sets with four types:

3.1 CanonStore

A CanonStore is the versioned, signed rule store the Gate evaluates against. It is a CORE-LD Group whose members are CanonVersions.

{
  "@id": "did:icore:canon",
  "@type": "CanonStore",
  "name": "ICore Canon",
  "currentVersion": "canon:life-v17",
  "versions": ["canon:life-v1", "canon:life-v2", "...", "canon:life-v17"]
}
PropertyTypeRequiredDescription
`name`StringYesCanonical store name
`currentVersion`Entity refYesThe CanonVersion the Gate evaluates against by default
`versions`Array of entity refsYesLinear version chain (see §4); every entry attested

3.2 CanonVersion

A CanonVersion is a frozen, signed snapshot of the rule set. Versions form a linear chain (each derives from exactly one prior version, except v1).

{
  "@id": "canon:life-v17",
  "@type": "CanonVersion",
  "version": "17",
  "derivesFrom": "canon:life-v16",
  "ruleSet": ["canon:rule-101", "canon:rule-102", "canon:rule-103"],
  "canonicalHash": "zQmExampleCanonicalHash...",
  "signedBy": "did:icore:canon-governance#key1",
  "attestedAt": "2026-08-01T00:00:00Z"
}
PropertyTypeRequiredDescription
`version`StringYesMonotonic version label
`derivesFrom`Entity refYes (v2+)Prior version (linear chain — I-CANON-7)
`ruleSet`Array of entity refsYesPOLICY-LD Policy/Rule documents (I-CANON-8)
`canonicalHash`StringYesCanonical serialization hash (I-CANON-5)
`signedBy`StringYesSigning key (Ed25519Signature2020 — I-CANON-6)
`attestedAt`StringYesAttestation timestamp

3.3 Rule

A Rule is a deterministic condition — a POLICY-LD rule restricted to mechanically evaluable form: field, operator, value. No free text, no model calls (I-CANON-10, I-CANON-11).

{
  "@id": "canon:rule-101",
  "@type": "Rule",
  "appliesTo": ["domain:agent", "purpose:invoke"],
  "condition": {"field": "capacity.remaining", "operator": "gt", "value": 0},
  "effect": "permit",
  "severity": "required"
}
PropertyTypeRequiredDescription
`appliesTo`Array of refsYesIntentNode purpose/domain selectors
`condition`ObjectYes`{field, operator, value}` — deterministic (I-CANON-10)
`effect`StringYes`permit`, `deny`, `require-consent`, `require-delegation`, `defer`
`severity`StringNo`required`, `advisory`

Registered operators: eq, neq, gt, gte, lt, lte, in, not-in, contains, exists, not-exists. Operators are fixed — the Gate rejects any unregistered operator.

3.4 EvaluationRecord

An EvaluationRecord is the signed output of the Gate — the G8 attestation record. It captures intent, canon version, verdict, applied rules, and proof, such that an independent verifier can replay the evaluation.

{
  "@id": "_:eval1",
  "@type": "EvaluationRecord",
  "intentNode": "_:in1",
  "canonVersion": "canon:life-v17",
  "evaluationEngine": "use",
  "verdict": "conditional",
  "conditions": [{"rule": "canon:rule-102", "required": true}],
  "appliedRules": ["canon:rule-101", "canon:rule-102"],
  "evaluatedAt": "2026-08-11T10:00:00Z",
  "provenance": {"Representer": "did:icore:canon-gate", "Timestamp": "2026-08-11T10:00:00Z",
                 "Authority": {"authorityType": "granted", "mayDelegate": false}},
  "proof": {"type": "Ed25519Signature2020", "proofValue": "z...", "verificationMethod": "did:icore:canon-gate#key1"}
}
PropertyTypeRequiredDescription
`intentNode`Entity refYesThe evaluated UIR-LD IntentNode (I-CANON-12)
`canonVersion`Entity refYesCanonVersion used (I-CANON-5)
`evaluationEngine`StringYes`use` or `policy` — never a model (I-CANON-2)
`verdict`StringYesRegistered: `valid`, `conditional`, `invalid`, `deferred` (I-CANON-3)
`conditions`ArrayNoRequired conditions when verdict ≠ `valid` (I-CANON-3)
`appliedRules`Array of refsYesRules that fired, in deterministic order (I-CANON-1)
`evaluatedAt`StringYesEvaluation timestamp
`provenance`ObjectYesURS provenance (I-CANON-12)
`proof`ObjectYesEd25519Signature2020 over canonical record (I-CANON-13/14)

Registered verdicts: valid, conditional, invalid, deferred. A verdict other than valid MUST carry conditions or a re-evaluation path — no lockout (I-CANON-3, mirroring UIR-LD I-UIR-15).

4. The Gate: a Pure Function

The Gate is defined as a pure function — no side effects, no state, no model:

evaluate(intent: IntentNode, canon: CanonStore, version: VersionLabel) → EvaluationRecord

Determinism (I-CANON-1): identical (intent, canon, version) MUST produce an identical EvaluationRecord — same verdict, same applied rules, same canonical serialization hash. The Gate MAY be memoized or replayed; every evaluation is reproducible by an independent verifier.

Purity (I-CANON-4): the Gate performs no I/O, writes no state, and consults nothing outside (intent, canon, version). All state is passed in; all output is the record. This is what makes G8 replay possible.

Evaluation procedure (deterministic):

1. Load — resolve the CanonVersion named by version from the CanonStore (hash-checked, I-CANON-5) 2. Select — filter ruleSet by the intent's purpose/domain (appliesTo match, I-CANON-8) 3. Evaluate — apply each matching Rule's deterministic condition against the intent's evaluated fields (operators per §3.3 registry, I-CANON-10) 4. Combine — resolve conflicts with USE's combining strategy (first-applicable, declared per PolicySet; I-CANON-9 delegates to USE semantics) 5. Verdictvalid (all required rules permit), conditional (require-consent / require-delegation / defer effects present), invalid (any deny), deferred (conditions unmet but re-evaluation path exists) 6. Record — emit the EvaluationRecord: intent ref, canon version, engine use, verdict, conditions (when ≠ valid), applied rules in deterministic order, provenance, and Ed25519Signature2020 proof over the canonical serialization

Governance mode (I-CANON-15): when the intent's origin is human or rule, the Gate runs the same procedure with the same canon — no model is ever required to obtain a verdict. The Gate's engine is always use or policy.

5. Canon Store and Amendment

5.1 Version chain

CanonVersions form a linear chain: every version (except v1) has exactly one derivesFrom; no forks, no merges (I-CANON-7). The chain is content-addressed: each version's canonicalHash covers its canonical serialization, and derivesFrom references the prior version's identity.

5.2 Amendment = the constitutional pipeline

Amending the canon is not a Gate operation. An amendment:

1. Is authored as a POLICY-LD policy change (draft) 2. Passes the constitutional pipeline: review → spec freeze → UCF forge attestation (constitutional-artifact, signed by canon governance key) 3. Becomes a new CanonVersion: derivesFrom the prior version, carries its own canonicalHash and signedBy 4. Is published; the CanonStore's currentVersion pointer moves only after attestation

This mirrors spec freeze doctrine exactly — the canon cannot be amended by the Gate, by a model, or by a single actor. Authority bounds follow DAG-Constitution-LD C1–C5 (delegation depth, mayDelegate) and are carried in the CanonVersion's provenance authority record.

5.3 Signed store

Every CanonVersion is signed (Ed25519Signature2020, I-CANON-6). The Gate verifies the version signature against the canon governance key before evaluating — an unsigned or mismatched version MUST NOT be used.

6. First Rule Set (Canon v0.1)

The seed canon — the minimal rule set every ICore agent inherits. Rules are expressed in §3.3 form (deterministic conditions only).

IDApplies toConditionEffectRationale
canon:rule-101`purpose:invoke`, `domain:agent``capacity.remaining gt 0``permit`Resources exist
canon:rule-102`purpose:invoke`, `domain:agent``consent.required eq true``require-consent`User consent first
canon:rule-103`purpose:invoke`, `domain:agent``delegation.depth gte 2``deny`Authority bound (C1–C5)
canon:rule-104any intent`recovery.viewable eq false``deny`No lockout — recovery must stay re-viewable
canon:rule-105any intent`origin in [human, rule]``permit`Governance mode never blocked by model absence
canon:rule-106`purpose:mutate`, `domain:storage``commerce.fields eq none``permit`Commerce-free default; commerce is explicit opt-in (UIR-LD §9)
canon:rule-107any intent`evaluation.replayable eq true``permit`Every evaluation reproducible (G8)

Conflict resolution: deny and require-* dominate permit (USE first-applicable, declared combining strategy). Advisory rules (severity: advisory) record a note but never change the verdict.

7. Invariants (I-CANON-1..15)

Every invariant is mechanically verifiable — the conformance suite (canon_gate_conformance.py) implements each check exactly as specified.

#InvariantMechanical verification
I-CANON-1**Determinism.** Identical `(intent, canon, version)` yields identical EvaluationRecord (verdict, applied rules, canonical hash)Evaluate twice; canonical serialization hashes MUST be equal
I-CANON-2**Engine is deterministic.** `evaluationEngine` ∈ {`use`, `policy`}; never a model nameRegistry membership check on the field
I-CANON-3**Verdict registered + non-locking.** Verdict ∈ {`valid`, `conditional`, `invalid`, `deferred`}; verdict ≠ `valid` ⇒ `conditions` non-emptyRegistry check; conditional-invalid-deferred records MUST carry conditions
I-CANON-4**Purity.** The record contains no side-effect artifacts (no I/O refs, no store writes, no model output)Field-level scan: forbidden keys absent
I-CANON-5**Canon hash-checked.** Every CanonVersion carries `canonicalHash`; the Gate verifies it before useRecompute canonical hash of the version payload; MUST equal declared value
I-CANON-6**Canon signed.** Every CanonVersion carries an Ed25519Signature2020 proofProof type + `verificationMethod` resolve check (structure; full crypto at freeze with signed fixtures)
I-CANON-7**Linear version chain.** Every CanonVersion (v2+) has exactly one `derivesFrom`; no forksWalk the chain; assert single predecessor, no cycles
I-CANON-8**Rules are POLICY-LD.** Every rule in `ruleSet` resolves to a registered POLICY-LD document`ruleSet` entries match registered POLICY-LD policy IDs
I-CANON-9**Authority bounds.** Provenance authority respects `mayDelegate` / delegation depth (DAG-Constitution-LD C1–C5)Authority record check: `mayDelegate: false` ⇒ no delegation in chain
I-CANON-10**Rules deterministic.** Every `condition` uses registered operators on fixed fields; no free textOperator registry membership; condition shape check
I-CANON-11**Model-free.** No rule, engine, or record references a modelScan for model identifiers (`model`, `llm`, vendor names) across rule set + engine
I-CANON-12**Provenance complete.** EvaluationRecord carries full URS provenance (Representer, Timestamp, Authority)Required-field presence check
I-CANON-13**Proof present + typed.** EvaluationRecord carries Ed25519Signature2020 proofProof type check
I-CANON-14**Proof covers canonical record.** Proof domain = canonical serialization of the recordEd25519Signature2020 proof verifies cryptographically over the canonical record (freeze_fixtures.py; tampered records rejected)
I-CANON-15**Governance without model.** Human/rule-origin intents obtain verdicts with no model in the evaluation pathReplay evaluation with engine ∈ {`use`, `policy`}; MUST complete

Invariant groups: I-CANON-1..4 (gate), I-CANON-5..9 (canon store), I-CANON-10..11 (rule set), I-CANON-12..14 (evaluation record / G8), I-CANON-15 (governance mode).

8. @context Extension

CANON-GATE extends the UIR-LD / POLICY-LD contexts with a small term set under the canon# namespace:

{
  "@context": {
    "canon": "https://specs.initialcore.net/ns/canon-gate.jsonld#",
    "CanonStore": "canon:CanonStore",
    "CanonVersion": "canon:CanonVersion",
    "Rule": "canon:Rule",
    "EvaluationRecord": "canon:EvaluationRecord",
    "derivesFrom": "canon:derivesFrom",
    "canonicalHash": "canon:canonicalHash",
    "signedBy": "canon:signedBy",
    "attestedAt": "canon:attestedAt",
    "ruleSet": "canon:ruleSet",
    "appliesTo": "canon:appliesTo",
    "condition": "canon:condition",
    "effect": "canon:effect",
    "severity": "canon:severity",
    "evaluationEngine": "canon:evaluationEngine",
    "verdict": "canon:verdict",
    "conditions": "canon:conditions",
    "appliedRules": "canon:appliedRules",
    "evaluatedAt": "canon:evaluatedAt"
  }
}

Terms shared with UIR-LD (intentNode, provenance, proof, canonVersion) reuse the UIR-LD / CORE-LD definitions — no redefinition.

9. Composition Examples

9.1 Gate inside Cardinal (one intelligence, two capabilities)

Cardinal (universal intelligence)
 ├─ Proposes:  intent candidates (UIR-LD IntentNode)
 └─ Validates: Canon Gate — evaluate(intent, canon, version) → EvaluationRecord
                (deterministic, model-free, signed)

Cardinal may be any replaceable intelligence (human, local SLM, remote open-weights model, rule). The Gate is identical for all — the canon does not depend on which intelligence proposes.

9.2 LifePioneer booking (UIR-LD + CANON-GATE)

An appointment-booking intent flows: IntentNode → Canon Gate (canon:life-v17) → ExecutionTarget → ExecutionRecord. The Gate's conditional verdict (consent required) becomes a condition in the SemanticBinding, which the execution stage MUST honor (UIR-LD I-UIR-10 capability gating).

9.3 Governance without model

An origin-human intent (e.g., "show my recovery phrases") passes the Gate with engine use and verdict valid — no model in the path (I-CANON-15). This is the Life no-lockout guarantee at the gate layer.

10. Conformance

Three conformance levels, matching the family:

Conformance suite: canon_gate_conformance.py implements I-CANON-1..15 (list/test/verify CLI, family check_iN pattern). The suite must pass before CANON-GATE may move Draft → Frozen, per URS freeze doctrine. At freeze (2026-08-12) the crypto structural invariants (I-CANON-14 signature, plus I-CANON-6 canon-store signature) verify against signed fixtures (freeze_fixtures.py — deterministic Ed25519 test keys, multibase proofValues, tampered-record rejection). The base-document EvaluationRecord carries a real, verifying signature; determinism-class checks are proven by the permutation property over the same fixtures. Suite: 31/31 checks green, pytest 33/33 across the family.

11. Worked Example — LifePioneer Booking through the Gate

Intent: "Book the medical appointment for next Tuesday if policy allows" (origin human, purpose invoke, domain agent).

Canon: canon:life-v17 — rules 101 (capacity), 102 (consent), 104 (recovery viewable), 105 (human origin).

Evaluation (deterministic procedure, engine use):

StepRuleCondition evaluationEffect
Select101, 102, 104, 105 match `purpose:invoke`/`domain:agent`
Evalrule-101`capacity.remaining = 3 gt 0` → truepermit
Evalrule-102`consent.required = true` → truerequire-consent
Evalrule-104`recovery.viewable = true`, `eq false` → falseno-op
Evalrule-105`origin = human in [human, rule]` → truepermit
Combinerequire-consent dominates permit
Verdict**conditional** — consent required (rule-102)

EvaluationRecord (signed): verdict conditional, conditions: [{rule: canon:rule-102, required: true}], appliedRules: [101, 102, 104, 105] (deterministic order), engine use, provenance + Ed25519Signature2020 proof. An independent verifier replays the same procedure and reproduces the record hash — G8 replay.

Re-evaluation path (no lockout): the user grants consent → the intent re-enters the Gate with consent.required = false → verdict valid → execution proceeds. The original conditional record is retained as an attestation of the first pass.

12. Relationship to Other Specifications

SpecRelationship
URS / CORE-LDRepresentation substrate; canonical serialization + provenance
INPUT-LDIntent capture (purpose, domain, origin)
UIR-LDIntent pipeline; SemanticBinding carries the Gate's verdict; EvaluationRecord = G8 attestation form
POLICY-LDRule expression (I-CANON-8); conditions/combining
USESelection engine; `evaluationEngine: use`
DAG-Constitution-LDAuthority invariants C1–C5 bound the canon's delegation
TRUST-LDEd25519Signature2020 proof types + verification
UAMCapability doctrine — the Gate is an optional adapter, never a core dependency

13. Reference List

14. Status and Freeze Path

Draft — this specification becomes Frozen when: (1) canon_gate_conformance.py passes 15/15 invariants on the base document with negative cases green; (2) the spec passes its four-question stress test; (3) the artifact is published and UCF-attested (constitutional-artifact, canon governance key). Amendment thereafter follows §5.2 — the constitutional pipeline, never the Gate.