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.
SESSION_STATE is the live working-state document for a Canon Boundary Guard session. It is written to /mnt/data/_SESSION_STATE.json during a session and tracks every L0 source inspected, every delta the operator has authorized, every unresolved conflict, every pending decision, and every artifact written through the persistence gate. Because ChatGPT’s /mnt/data/ storage is ephemeral, SESSION_STATE is not durable by itself — it must be explicitly exported or saved to become a durable record.
Protocol identity
| Field | Value |
|---|---|
protocol | canon-boundary-guard:gpt-project-adapter |
protocol_version | 1.1 |
| JSON Schema draft | 2020-12 |
| Validate against | schemas/SESSION_STATE.schema.json |
Schema-minimal shape
This is the smallest valid SESSION_STATE — an empty-but-valid skeleton. It is not a first-install template; use it only to understand the required structure.Required fields
Protocol identifier. Must be the constant string
"canon-boundary-guard:gpt-project-adapter". Rejects any document that belongs to a different protocol family.Schema version. Must be the constant string
"1.1". Used to detect stale state files written by an earlier version of the bundle.Monotonically incrementing sequence number. Starts at
0 on first install and increments by 1 after every state-changing decision. Minimum value is 0. The sequence number in a CANON_STATE_DELTA must equal the state_seq of the embedded current_state.ISO-8601 timestamp recording when the state was last modified. Updated every time
state_seq advances.List of every L0 source that has been inspected or registered in this session. An L0 source is any file, artifact, or output that the protocol treats as ground truth — only these can be read without a gate decision. See nested object shape below.
Deltas the operator has explicitly authorized for persistence in the current session. Each entry records the scope and current persistence status of one operator decision. See nested object shape below.
Conflicts that have been detected between sources or decisions but have not yet been resolved. A non-empty array blocks certain Mode C operations until conflicts are closed or deferred. See nested object shape below.
Decisions the operator must make before work can continue. Blocking decisions halt forward progress; non-blocking ones are queued. See nested object shape below.
Artifacts written through the persistence gate in this session. Each entry provides a stable audit trail linking an artifact back to the delta that authorized it. See nested object shape below.
Optional. SHA-256 hash of the previous state object, used for integrity verification when chaining deltas. Format:
"sha256:<hex>". When present, validate_state.py checks that the hash matches the prior serialized state.Nested object shapes
active_l0_sources items
Unique identifier for this source within the session. Typically the filename or a short descriptive slug, e.g.
"canon-boundary-guard-gpt/SKILL.md".Classification of the source. Allowed values:
| Value | Meaning |
|---|---|
project_file | A file present in the ChatGPT Project file list |
project_source | A Project Source (pinned project knowledge) |
uploaded_file | A file uploaded to the current conversation |
local_file | A local file on the operator’s machine, referenced externally |
tool_output | Output produced by a tool call (e.g. code interpreter) |
command_output | Output produced by a shell or terminal command |
verified_external_source | An external URL or reference the operator has explicitly verified |
state_file | A SESSION_STATE or CANON_STATE_DELTA file |
Inspection status of this source. Allowed values:
| Value | Meaning |
|---|---|
inspected | Source has been read and registered as L0 |
unavailable | Source could not be read (missing, inaccessible) |
conflicted | Source content conflicts with another L0 source |
Optional free-text annotation about this source — for example, why it is unavailable or what conflict was detected.
authorized_deltas items
Unique identifier for this authorized delta, e.g.
"delta-001". Referenced by CANON_STATE_DELTA.seq and by artifact records.ISO-8601 timestamp of when the operator granted authorization.
Human-readable description of what was authorized, e.g.
"Add authentication module to project source".Persistence lifecycle status. Allowed values:
| Value | Meaning |
|---|---|
pending_persistence | Authorized but not yet written to a durable artifact |
persisted | Written through the gate; artifact exists |
revoked | Operator revoked the authorization before persistence |
Optional. The specific file path, Project Source label, or artifact identifier that this delta targets.
open_conflicts items
Unique identifier for this conflict, e.g.
"conflict-001".Human-readable description of the conflict — what sources or decisions are at odds and why.
Resolution status. Allowed values:
| Value | Meaning |
|---|---|
open | Conflict has not been addressed |
resolved | Operator has resolved the conflict |
deferred | Operator has acknowledged and deferred the conflict |
pending_decisions items
Unique identifier for this pending decision, e.g.
"decision-001".The question the operator must answer, phrased clearly enough to act on.
Optional. When
true, this decision must be resolved before the session can proceed. When false or absent, the decision is queued but does not halt forward progress.last_persistent_artifacts items
Unique identifier for this artifact, e.g.
"artifact-001". Should correlate with the delta_id of the delta that authorized it.Classification of the artifact. Allowed values:
| Value | Meaning |
|---|---|
project_source | Written as a ChatGPT Project Source |
downloaded_file | Offered for download via code interpreter |
canvas | Written to a ChatGPT Canvas |
document | Written as a ChatGPT document artifact |
state_file | A SESSION_STATE or CANON_STATE_DELTA snapshot |
other | Any other artifact type |
ISO-8601 timestamp of when the artifact was written through the gate.
Optional. The file path, Project Source label, or display name of the artifact.
Complete valid example
Validation
Runscripts/validate-state against the state file:
- All required top-level fields are present
protocolandprotocol_versionmatch their constant valuesstate_seqis a non-negative integer- All array items conform to their nested object schemas
- When
last_state_hashis present, it matches the hash of the prior serialized state
Durability
SESSION_STATE at/mnt/data/_SESSION_STATE.json is working state only — ChatGPT’s file storage is not persistent across sessions. To make state durable, use one of the three following methods:
All three methods produce valid recovery sources. Only methods 1 and 2 survive without any further action from the model; method 3 requires the operator to paste the delta block at session start.
_SESSION_STATE.json from code interpreter at the end of a session, then re-upload it at the start of the next session. The model will register it as a state_file L0 source.
2. Save as Project Source
Instruct the model to write the current SESSION_STATE as a ChatGPT Project Source (Mode C gate). Project Sources persist across all sessions in the project without any re-upload step.
3. CANON_STATE_DELTA recovery blocks
After every Mode B or Mode C decision the model emits a CANON_STATE_DELTA block. Copy that block and paste it at the start of a new session. The model validates the embedded current_state and, if valid, restores working state from it. See the CANON_STATE_DELTA schema reference for the delta format.