feat: cognition decision trace schema (substrates-structures-circuits 13.2) - #82
Merged
Merged
Conversation
… 13.2)
Adds schemas/lawful-learning/cognition-decision-trace.v1.json: the per-
inference decision trace from the Substrates, Structures, and Circuits
framework (section 13.2), emitted one record per *.decision event. Carries
the trunk substrate/structure, retrieval regime + energy, per-slot mixture
state, head observation, approval gate, and a SHA-256 replay seal.
Distinct from decision-emission.v1 (a lawful-learning governance decision);
this records the runtime cognition-loop decision itself.
Teeth (wired into make lawful-learning-schema-ci):
- replay_seal must be a SHA-256 digest (^sha256:[a-f0-9]{64}$);
- two-layer approval gate: a non-single retrieval regime forces
approval.required=true with the trunk_regime_non_single trigger.
Ships a valid fixture plus negatives for the approval-gate bypass and a
weak replay seal. Framework doc updated with a schema-lane pointer.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Integrates section 13.2 of the Substrates, Structures, and Circuits framework (spec-intake 2026-08-03) into the schema lane as spec-as-code with teeth.
Adds
schemas/lawful-learning/cognition-decision-trace.v1.json— the per-inference decision trace emitted one record per*.decisionevent. It carries the declared trunk substrate and structure, the retrieval regime + weights + energy, the per-slot mixture state (mode / weights / dominant option), the head observation, the two-layer approval gate with its named triggers, and a SHA-256 replay seal.Why this and not the existing decision-emission schema
decision-emission.v1.jsonrecords a lawful-learning governance decision (claim promotion, circuit admission). It does not carry the runtime cognition-loop trace fields (substrate / structure / slots / retrieval / substrate diagnostics / approval triggers). This schema fills that gap — the runtime decision itself, section 13.2 of the framework.Much of the framework is already integrated in this repo (framework doc, circuit-registry / forbidden-circuits / alignment-check schemas, hopfield + neural-fabric). This PR adds the one concrete missing contract.
Teeth
Wired into
make lawful-learning-schema-ci:replay_sealmust be a SHA-256 digest (^sha256:[a-f0-9]{64}$) — FIPS-authoritative;singletrunk retrieval regime forcesapproval.required = truewith thetrunk_regime_non_singletrigger declared.Ships a valid fixture plus negatives for the approval-gate bypass and a weak replay seal. Verified locally:
make lawful-learning-schema-ciandmake lawful-learning-checker-fixturesboth exit 0 (valid accepted, both negatives rejected). Framework doc updated with a schema-lane pointer, respecting the M/T/S/E/G claim-tag discipline.Follow-ups (filed as issues)
check-alignment.py, framework 11 / 13.3).🤖 Generated with Claude Code