Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xxyoudeadpunkxx/canon-boundary-guard-for-gpt-project/llms.txt
Use this file to discover all available pages before exploring further.
CANON_STATE_DELTA.schema.json defines the structure of snapshot delta blocks emitted after every Mode B or Mode C state-changing decision. A valid delta includes a full current_state object that itself validates against SESSION_STATE.schema.json, and serves as durable recovery material that can be used to restore a lost working state without operator-level reconstruction.
Top-level required fields
Constant value:
"CANON_STATE_DELTA". Any other value causes schema validation to fail. Used by parsers and recovery tools to identify the document type without inspecting its contents.Sequence number for this delta,
minimum: 1. Must exactly equal current_state.state_seq. validate_state.py enforces this constraint as an additional cross-field check.ISO-8601 timestamp recording when this delta was emitted. Example:
"2025-07-14T11:42:00+00:00".Reference to the state that existed immediately before this delta was applied. Contains:
Describes the Mode B or Mode C decision that triggered this state change. See the decision object section below.
The full
SESSION_STATE object as it exists after this delta was applied. Must independently validate against SESSION_STATE.schema.json. This is the field that makes the delta self-contained for recovery — it is not a diff, it is a complete snapshot.Human-readable instruction telling the operator what they must do to make this state durable. Example:
"Download _SESSION_STATE.json and re-upload as a Project Source, or paste this delta block into the next session.".decision object
Thedecision object captures the rationale and scope of the change. additionalProperties is false.
The operating mode under which this decision was made. Enum:
| Value | Meaning |
|---|---|
"B" | Mode B — operator-reviewed state change with explicit authorization |
"C" | Mode C — structured persistence with full provenance gate |
A concise human-readable description of what was decided. Should be specific enough to identify the decision when reading a sequence of deltas. Example:
"Operator authorized addition of chapter-3 outline as project source.".The exact scope of what was authorized, as stated by the operator. This is the authoritative record of what was approved and should not be paraphrased.
Array of strings identifying the artifacts or sources affected by this decision. Each string should be a path or label that maps to an entry in
current_state.active_l0_sources or current_state.last_persistent_artifacts. May be an empty array if the decision has no direct artifact targets (e.g., a conflict resolution).Differential-only deltas
seq consistency
Theseq field at the top of the delta and current_state.state_seq inside the embedded state must be identical. This invariant allows recovery tools to detect sequence gaps without having to inspect the full state contents.
validate_state.py enforces this as an explicit post-schema check:
CANON_STATE_DELTA.schema.json.
Complete example
SESSION_STATE schema
Field reference for the SESSION_STATE object embedded in every valid delta.
validate_state.py
Mechanical validator for SESSION_STATE and CANON_STATE_DELTA files, including the seq consistency check.