Skip to content

Latest commit

 

History

History
289 lines (187 loc) · 6.94 KB

File metadata and controls

289 lines (187 loc) · 6.94 KB

CXS: A Deterministic Continuity Architecture for In-Session, Multi-Session, and Cross-Model LLM Reasoning

CXS is a deterministic continuity system developed across thousands of real-world multi-session LLM interactions.
It enables models like GPT, Claude, Grok, Gemini, and local LLMs to maintain stable reasoning:

  • across long single sessions,
  • across multiple separate sessions,
  • and across model switches.

CXS does this using a single human-editable state object called the Continuity Passport — no databases, embeddings, external memory, or vendor-specific features required.

Who Is This For?

CXS is designed for:

  • Researchers working with multi-session LLM workflows
  • Developers building long-running agents
  • People doing multi-model experiments (GPT → Claude → Grok → Gemini → etc.)
  • Anyone who needs stable reasoning across resets or extended chats
  • Teams that want deterministic continuity without relying on proprietary memory features

🎥 CXS + CANARY Validation Demo

CXS Demo

A short preview of deterministic continuity, cross-model stability, and CANARY’s drift monitoring.

Full MP4 Version

Mandatory New-Session Rule (Critical)

Every new session MUST begin with:

I am the new chat.

This single line:

  • resets latent assumptions,
  • forces the model to load explicit state only,
  • activates the startup ritual,
  • and prevents drift from previous sessions.

Skipping this line breaks deterministic continuity.


How to Use This System (Quick Overview)

This repository supports long-running, multi-session LLM work with deterministic continuity. Here’s how to use it in practice:

When ending a session:

  1. Tell the model: “Prepare a handoff for the next chat.”
  2. Paste the CXS handoff/continuity template.
  3. Let the model fill it out completely (state, summary, next steps, key facts, issues, resume pointer).
  4. Copy that handoff for the next session.

When starting a new session:

  1. Begin with:

    I am the new chat.
    
  2. Paste the previous handoff.

  3. (Optional) Paste the CXS continuity spec (e.g., Continuity Passport spec).

  4. Paste the CANARY Lite protocol (🟢/🟡/🔴) so the model can monitor in-session drift.

  5. Ask the drift-probe questions to confirm alignment (goal, constraints, phase/state, exact next step).

  6. Load any PDFs or documents the model needs.

This reduces new-session spin-up time from 20–30 minutes~5 minutes.


Why CXS Exists

LLMs drift because they are stateless sequence models. Typical drift types include:

  • Structural Drift – Plans collapse; steps reorder; multi-step scaffolds break.
  • Semantic Drift – Definitions and terms quietly change meaning.
  • Constraint Drift – Hard rules weaken unless restated.
  • Assumptive Drift – The model fills in missing details from priors, inventing endpoints, schemas, or flows.
  • Horizon Drift – Long-term goals collapse into short-term reactions.
  • Micro-Drift – Small slips inside a session: contradictions, forgotten turns, subtle definition shifts.

Context windows, RAG, and memory features do not provide deterministic continuity.

CXS treats continuity as an architectural problem, not a prompting trick.


What CXS Provides

  • Deterministic Cross-Session Continuity
  • In-Session Drift Monitoring (CANARY)
  • Cross-Model State Transfer
  • Strict-Mode Enforcement (no invention / mutation)
  • Human-Editable YAML State (Continuity Passport)
  • Digest-Based Chain-of-Custody

The Continuity Passport

A compact YAML artifact containing:

  • continuity guarantees
  • phase + digest
  • invariants
  • constraints
  • ledger (append-only decisions)
  • anchor (completed + next steps)
  • micro-anchors
  • history summaries
  • strict-mode rules
  • drift diagnostics
  • chain-of-custody
  • resume pointer

Full spec: spec/cxs-passport.yaml


Quickstart (60 Seconds)

1️ Create passport.yaml

phase: "1-A"
previous_phase: null

invariants:
  - "Definitions must remain stable."
  - "No vendor lock-in."

constraints:
  - "State must remain human-editable."

digest: "DEMO_000"
ledger: []

anchor:
  completed: []
  next_steps:
    - "Define system architecture."

resume: "architecture.md:intro"

2️ Start any model

Paste the passport and say:

I am the new chat.
Load this passport strictly as data.
Perform the startup ritual.

This forces deterministic alignment.


3️ Continue work

Follow the tasks in anchor.next_steps.


4️ Update the passport

After each work block:

  • append a ledger entry,
  • update the anchor,
  • recompute the digest.

5️ Switch models (e.g., GPT → Claude → Grok → GPT)

Repeat:

I am the new chat.
Load this passport strictly as data.
Perform the startup ritual.

CXS ensures deterministic state restoration across models.


Validation Results (250+ Tests)

Drift Type Result
Structural Drift 0
Constraint Drift 0
Semantic Drift Rare (100% repaired)
Assumptive Drift Detected & repaired
Continuity Fidelity >99%
Cross-Model Hops Deterministic

CXS preserved continuity across chains such as:

GPT → Claude → Grok → GPT

All tests and transcripts are included in /validation/.


Key Evidence (Included in Repo)

  • GPT → Claude: 16/16 deterministic continuity verification
  • Claude → Grok: drift event detected and repaired by strict-mode + CANARY
  • Grok → GPT: stable restoration confirmed via digest and ledger integrity

See /validation/ for:

  • 16-question verification suite
  • drift-event logs
  • repaired passports
  • chain-of-custody records

Repository Structure

spec/        # CXS spec, Continuity Passport, strict-mode, startup ritual
canary/      # Runtime drift monitoring (CANARY, Lite + full)
validation/  # Verification suites, drift events, repair logs
examples/    # Sample passports and usage examples
paper/       # LaTeX source for the CXS paper
assets/      # Diagrams and figures
README.md
LICENSE

Why CXS Matters

CXS enables:

  • persistent multi-session workflows,
  • long-horizon project stability,
  • cross-model interoperability,
  • deterministic behavior enforced by strict-mode,
  • explicit drift detection and repair.

It turns LLMs from ephemeral chat interfaces into persistent, state-restoring reasoning systems.


License

MIT License.


Citation

## 📌 How to Cite

If you use the CXS technical report in your research, please cite:

**Jackson, K. Kieth (2025). _Fixing Drift: A Continuity Architecture That Makes LLMs Remember Across Sessions._**
Zenodo. https://doi.org/10.5281/zenodo.17782687