Skip to main content

  █▀▀ █▀█ █▄ █ ▀█▀ █ █▄ █ █ █ █ █ █▀▄▀█
  █▄▄ █▄█ █ ▀█  █  █ █ ▀█ █▄█ █▄█ █ ▀ █

AI Work Continuity & Cross-Model Agent Handoff System

An open-source engineering engine that captures, verifies, and packages your project state for seamless continuity across AI coding assistants and models such as Claude, GPT, Gemini, Cursor, Antigravity, Local LLMs, etc.

  [01] Extract Physical State  ──►  [02] Arbitrate Ground Truth  ──►  [03] Build State DAG  ──►  [04] Package Handoff

Python 3.10+ PyPI Package Tests Passed 3-State Architecture
JSON Schema Smart 1-Command CLI Zero Telemetry MIT License

🧭 Navigation

# SYSTEM NAVIGATION MAP
 ├── [01] FOUNDATION & BENCHMARK
 │    ├── ❯ Overview & Core Problem
 │    ├── ❯ Benchmark: Continuum vs Chat Summaries
 │    └── ❯ 1-Command Quickstart Guide
 │
 ├── [02] ARCHITECTURE & GROUND TRUTH
 │    ├── ❯ 3-State Separation Engine
 │    ├── ❯ 5-Tier Evidence Arbitration Matrix
 │    └── ❯ Canonical Dependency Graph (DAG)
 │
 └── [03] TOOLING & GOVERNANCE
      ├── ❯ Omni-Model Handoff Adapters
      ├── ❯ Complete CLI Command Reference
      ├── ❯ Roadmap to v1.0.0 (All 24 Phases)
      ├── ❯ Testing & Verification
      ├── ❯ Contributing Guide
      ├── ❯ Code of Conduct
      ├── ❯ Security & Privacy
      └── ❯ License

💡 What is Continuum?

Continuum is an open-source work continuity platform for multi-agent software engineering. It automatically extracts, arbitrates, and packages verified workspace state — enabling seamless, zero-drift handoffs across Claude, GPT-4o, Gemini, Cursor, and local LLMs.


Feature Pillar Architecture & Capabilities
🏛️ 3-State Engine Strict ontological separation between Project State (AST symbols, files, tests), Conversational State (requirements, chat claims), and Agent Execution State (in-flight edits).
⚖️ 5-Tier Truth Matrix Proof-grounded arbitration engine. When conversational claims conflict with codebase reality, physical evidence strictly takes precedence with automated contradiction logging.
🕸️ State Graph (DAG) Topological Directed Acyclic Graph connecting milestones to code symbols. Automatically propagates STALE invalidations downstream when files change.
🤖 Omni-Model Handoff Single-command generation of model-native context packages tailored for Claude (XML tagged), GPT/Codex, Gemini, and Local LLMs.
🛡️ Autonomous Governance Background observer daemon paired with non-blocking Git commit hooks, SHA-256 state provenance, corruption self-healing, and 100% local zero telemetry.

⚔️ Why Continuum over Chat Summaries?

Conversational summaries degrade across sessions because they record what agents say, not what exists on disk. Continuum replaces subjective chat memory with verified codebase state.

[WITHOUT CONTINUUM]
  Chat Logs ──► LLM Compression ──► Context Drift ──► Broken Agent Handoff ❌

[WITH CONTINUUM]
  Workspace ──► AST & Test Proof ──► 5-Tier Truth ──► Seamless Omni-Handoff ✅

📊 Capability Benchmark Matrix

🔬 AST & Symbol Grounding
   • Chat Summaries    ░░░░░░░░░░  [0/10]  (Zero Code Awareness)
   • Custom Scripts    ████░░░░░░  [4/10]  (Regex / Naive Parsing)
   • ⬢ CONTINUUM       ██████████  [10/10] (Polyglot AST & Full Symbol Resolution)

⚖️ Contradiction Detection
   • Chat Summaries    ░░░░░░░░░░  [0/10]  (Propagates Hallucinations)
   • Custom Scripts    ░░░░░░░░░░  [0/10]  (No Conflict Ledger)
   • ⬢ CONTINUUM       ██████████  [10/10] (5-Tier Proof Arbitration)

🕸️ Dependency Graph (DAG)
   • Chat Summaries    ░░░░░░░░░░  [0/10]  (Flat Text Memory)
   • Custom Scripts    █░░░░░░░░░  [1/10]  (Ad-hoc File Lists)
   • ⬢ CONTINUUM       ██████████  [10/10] (Topological DAG & Stale Propagation)

📦 Omni-Model Handoffs
   • Chat Summaries    ██░░░░░░░░  [2/10]  (Copy-Paste Prompts)
   • Custom Scripts    ████░░░░░░  [4/10]  (Single-Model Output)
   • ⬢ CONTINUUM       ██████████  [10/10] (Claude, GPT-4o, Gemini, Local LLMs)

🛡️ State Self-Healing
   • Chat Summaries    ░░░░░░░░░░  [0/10]  (Zero Recovery)
   • Custom Scripts    ░░░░░░░░░░  [0/10]  (No Snapshots)
   • ⬢ CONTINUUM       ██████████  [10/10] (Snapshot History & Auto-Recovery)

⚡ 1-Command Workflow
   • Chat Summaries    █░░░░░░░░░  [1/10]  (Manual Copy-Paste)
   • Custom Scripts    █████░░░░░  [5/10]  (Custom Flags Required)
   • ⬢ CONTINUUM       ██████████  [10/10] (Smart Auto-Init & Auto-Scan)

⚡ Quick Start Guide (1-Command)

1. Installation

# Clone the repository
git clone https://github.com/Ashish6298/CONTINUUM.git
cd CONTINUUM

# Install globally in editable mode
pip install -e .

2. Generate an Instant AI Handoff (The 1-Command Workflow)

Run inside any project directory — Continuum automatically scans your codebase, extracts AST symbols, builds the dependency graph, and creates your ready-to-resume AI handoff package:

continuum handoff

3. Terminal Output

                 █▀▀ █▀█ █▄ █ ▀█▀ █ █▄ █ █ █ █ █ █▀▄▀█
                 █▄▄ █▄█ █ ▀█  █  █ █ ▀█ █▄█ █▄█ █ ▀ █

             AI Work Continuity & Cross-Model Agent Handoff System
  ─────────────────────────────────────────────────────────────────────────────

    The one-Command Workflow: $ continuum handoff

    Automatically captures your project state, extracts AST symbols,
    and generates a ready-to-use 'ai_handoff/' package for your next
    AI Agent (Claude, GPT, Gemini, Cursor, Antigravity, etc.)

  ─────────────────────────────────────────────────────────────────────────────
  v1.0.0   python 3.11.4   mit license   

◈ [HANDOFF READY] Generated Omni-Model Continuity Package:

  Location: D:\myproject\ai_handoff

   ✦ Universal Handoff  →  D:\myproject\ai_handoff\handoff.md (Works for ANY model)

   ✦ Claude Optimized   →  D:\myproject\ai_handoff\claude_handoff.md

   ✦ GPT / Codex Plan   →  D:\myproject\ai_handoff\gpt_handoff.md

   ✦ Gemini Hierarchy   →  D:\myproject\ai_handoff\gemini_handoff.md

   ✦ Machine State      →  D:\myproject\ai_handoff\project-state.json

➤ [NEXT ACTION] Paste this prompt into your next AI Agent chat:

   "Read ai_handoff/handoff.md and continue the project."

🏛️ Three-State Separation Architecture

Continuum enforces strict separation between physical code truth and conversational assertions:

  ┌──────────────────────────────┐  ┌──────────────────────────────┐  ┌──────────────────────────────┐
  │  01. PHYSICAL PROJECT STATE  │  │  02. CONVERSATIONAL STATE    │  │  03. AGENT EXECUTION STATE   │
  ├──────────────────────────────┤  ├──────────────────────────────┤  ├──────────────────────────────┤
  │  • Physical Source Code      │  │  • User Intent & Goals       │  │  • Active Tactical Task      │
  │  • Polyglot AST Symbol Tree  │  │  • Architectural Decisions   │  │  • In-Flight File Changes    │
  │  • Git Working Tree & Diffs  │  │  • Agent Assertions & Claims │  │  • Transient Subprocess Logs │
  │  • Test Suite Pass/Fail Logs │  │  • Unresolved Open Questions │  │  • Deterministic Next Action │
  └──────────────┬───────────────┘  └──────────────┬───────────────┘  └──────────────┬───────────────┘
                 │                                 │                                 │
                 ▼                                 ▼                                 ▼
  ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
  │              ⬢ CANONICAL STATE ENGINE (Topological DAG Graph)                    │
  └──────────────────────────────────────────────────────────────────────────────────────────────────┘

⚖️ 5-Tier Evidence Hierarchy Matrix

When evidence sources conflict, Continuum arbitrates ground truth according to strict mathematical seniority:

┌─ [L1] RUNTIME EXECUTION ────────────────────────────────────────────────────────┐
│  Artifacts: TEST_RUN, BUILD_LOG, RUNTIME_LOG                     Weight: 100%   │
│  Rule     : Absolute ground truth. Real execution exit codes govern status.     │
└─────────────────────────────────────────────────────────────────────────────────┘
┌─ [L2] AST SYNTAX & FILES ───────────────────────────────────────────────────────┐
│  Artifacts: SOURCE_CODE, AST_SYMBOL, MANIFEST                    Weight:  90%   │
│  Rule     : Physical code exports override git commit messages and chat claims. │
└─────────────────────────────────────────────────────────────────────────────────┘
┌─ [L3] VERSION CONTROL DELTAS ───────────────────────────────────────────────────┐
│  Artifacts: GIT_COMMIT, GIT_DIFF, GIT_STATUS                     Weight:  75%   │
│  Rule     : Historical changes override unverified comments and documentation.  │
└─────────────────────────────────────────────────────────────────────────────────┘
┌─ [L4] ARCHITECTURE DOCUMENTATION ───────────────────────────────────────────────┐
│  Artifacts: DOCUMENTATION, CODE_COMMENT                          Weight:  50%   │
│  Rule     : Informational context. Marked STALE when AST symbols change.        │
└─────────────────────────────────────────────────────────────────────────────────┘
┌─ [L5] CONVERSATIONAL AGENT CLAIMS ──────────────────────────────────────────────┐
│  Artifacts: CONVERSATION_ASSERTION, USER_REQUIREMENT             Weight:  25%   │
│  Rule     : Unverified hypothesis until proven on disk by Levels 1-3.           │
└─────────────────────────────────────────────────────────────────────────────────┘

🕸️ Canonical State Graph (DAG)

Continuum models all milestones, phases, AST symbols, requirements, and test suites as a topologically ordered Directed Acyclic Graph:

  [MILESTONE] Core Architecture ──► [PHASE 0] Canonical Schema
                                           │
                    ┌──────────────────────┴──────────────────────┐
                    ▼                                             ▼
       [SERVICE] StorageManager                      [SERVICE] AstExtractor
                    │                                             │
                    ▼                                             ▼
       [TEST] test_serialization.py                 [TEST] test_workspace_extractor.py
       (Status: ✅ PASS)                            (Status: ✅ PASS)
┌─ GRAPH ENGINE CAPABILITIES ─────────────────────────────────────────────────────────────┐
│  • Topological Invalidation : Modifying a service automatically marks downstream tests  │
│                               and modules as STALE.                                     │
│  • Cycle Detection & Guard  : Circular dependency insertions (A -> B -> A) are blocked │
│                               at graph construction time.                               │
│  • Subgraph Extraction      : AI context selectors extract minimal task-relevant slices │
│                               to stay within LLM token budgets.                         │
└─────────────────────────────────────────────────────────────────────────────────────────┘

🤖 Smart Omni-Model Handoff Adapters

Running continuum handoff compiles verified project state into 5 specialized model formats:

  $ continuum handoff
           │
           ├── 🌐 [UNIVERSAL]   ──►  handoff.md          (Works for ANY model out of the box)
           ├── 🟣 [CLAUDE]      ──►  claude_handoff.md   (Strict Anthropic XML tag hierarchy)
           ├── 🟢 [GPT/CODEX]   ──►  gpt_handoff.md      (OpenAI plan-first step checklists)
           ├── 🔵 [GEMINI]      ──►  gemini_handoff.md   (DeepMind hierarchical ontology)
           └── ⚙️  [MACHINE]     ──►  project-state.json  (Machine-parseable Schema 1.0.0 AST)

💻 Complete CLI Command Reference

# ── 1. INITIALIZATION & WORKSPACE ───────────────────────────────────────────
$ continuum init [--path .]                # Initialize .continuum storage & Git hooks
$ continuum scan [--path .]                # Full workspace AST extraction & DAG rebuild

# ── 2. STATE INSPECTION & GRAPH ─────────────────────────────────────────────
$ continuum status [--path .] [--json]     # Print verified project state & next action
$ continuum graph [--mermaid] [--stats]    # Inspect DAG structure or export Mermaid

# ── 3. AI HANDOFF GENERATION ────────────────────────────────────────────────
$ continuum handoff                        # Auto-scan & generate Omni-Model handoffs
$ continuum handoff --model claude         # Tailor specifically for Anthropic Claude
$ continuum handoff --model gpt            # Tailor for OpenAI GPT-4o / Codex
$ continuum handoff --model gemini         # Tailor for Google Gemini Pro

# ── 4. BACKGROUND OBSERVER DAEMON ───────────────────────────────────────────
$ continuum daemon start                   # Start background filesystem observer
$ continuum daemon status                  # Check background daemon health & cycles
$ continuum daemon run-once                # Trigger a single incremental scan pass
$ continuum daemon stop                    # Gracefully stop the background daemon

🗺️ Architecture Milestones & Verification

Project Continuum v1.0.0 is fully certified with 126 / 126 automated tests passing (100%) across all 24 roadmap phases (Milestones 1 through 8). Detailed engineering reports and verification logs are available in docs/reports/.


🧪 Testing & Enterprise Security

$ py tests/run_all_tests.py    # 126/126 Passed (100% Test Coverage across 24 Phases)
┌─ SECURITY & PRIVACY CONTROLS ────────────────────────────────────────────────────────────┐
│  • Zero Telemetry      : 100% offline local processing with no external telemetry.       │
│  • Secret Sanitization : Automatically detects and strips API keys and credentials.      │
│  • Workspace Boundary  : Strict path-traversal prevention locking access to workspace.   │
│  • Atomic Swaps        : Crash-safe state serialization preventing corrupted files.      │
└──────────────────────────────────────────────────────────────────────────────────────────┘

🤝 Contributing

We welcome contributions from developers and researchers building the future of cross-model AI work continuity and agent handoffs.

1. Clone Repository

git clone https://github.com/Ashish6298/CONTINUUM.git
cd CONTINUUM

2. Create a Feature Branch

git checkout -b feature/ast-symbol-extractor

3. Setup Virtual Environment

python -m venv .venv
# On Windows:
.venv\Scripts\activate

# On macOS / Linux:
source .venv/bin/activate

4. Install Development Dependencies

pip install -e ".[dev]"

5. Run Automated 24-Phase Test Suite

py tests/run_all_tests.py

6. Verify Architectural Invariants

┌─ ARCHITECTURAL INVARIANTS ───────────────────────────────────────────────────────────────┐
│  • 3-State Separation : Physical workspace state is never mutated by chat claims.         │
│  • Zero Telemetry     : 100% offline local processing with no external network calls.     │
│  • Atomic Persistence : All state writes use crash-safe atomic swaps (.tmp -> replace).   │
└───────────────────────────────────────────────────────────────────────────────────────────┘

7. Commit & Open a Pull Request

git commit -m "feat(extractors): add support for rust AST parser"

For complete architectural specifications, commit rules, and PR checklists, read CONTRIBUTING.md.


📜 Code of Conduct

Project Continuum strictly enforces the Contributor Covenant v2.1 across all issues, pull requests, and community discussions.

COMMUNITY GOVERNANCE STANDARDS
 ├── 🌟 CORE PLEDGE       ──►  Harassment-free experience regardless of background
 ├── 🤝 COLLABORATION     ──►  Constructive feedback & focus on what is best for the project
 └── ⚖️ ENFORCEMENT LADDER ──►  Correction ──► Warning ──► Temporary Ban ──► Permanent Ban

Detailed enforcement guidelines and reporting steps are available in CODE_OF_CONDUCT.md.


🛡️ Security & Privacy

Continuum is built around verifiable, non-negotiable security invariants:

STATUS       INVARIANT                 ENFORCEMENT GUARANTEE
──────────   ───────────────────────   ─────────────────────────────────────────────────────
[ENFORCED]   Zero External Telemetry   100% offline execution; no network calls or telemetry
[ENFORCED]   Secret Sanitization       Automatic regex & entropy masking for sensitive keys
[ENFORCED]   Workspace Containment     Rejection of symlinks and paths escaping root
[ENFORCED]   Atomic State Swaps        Zero partial writes; crash-safe file serialization

Read our complete policy and disclosure process in SECURITY.md.


⚖️ License

Project Continuum is open-source software licensed under the MIT License.


┌─ SUPPORT & COMMUNITY ────────────────────────────────────────────────────────────────────┐
│  ⭐ Star the Repo : Support open-source AI continuity on GitHub                          │
│  🐛 File an Issue : Report bugs, feature requests, or AST extractor ideas                │
│  💬 Discussions   : Share your multi-agent handoff setups & workflows                    │
│  ▲ Return to Top  : Jump back to system navigation & command reference                   │
└──────────────────────────────────────────────────────────────────────────────────────────┘

[ ▲ BACK TO TOP ]     [ ⭐ STAR REPOSITORY ]     [ 🐛 REPORT ISSUE ]

Project Continuum • Open-Source AI Work Continuity & Cross-Model Agent Handoff System

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

continuum_toolkit-1.0.0.tar.gz (153.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

continuum_toolkit-1.0.0-py3-none-any.whl (130.9 kB view details)

Uploaded Python 3

File details

Details for the file continuum_toolkit-1.0.0.tar.gz.

File metadata

  • Download URL: continuum_toolkit-1.0.0.tar.gz
  • Upload date:
  • Size: 153.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.4

File hashes

Hashes for continuum_toolkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 093f90e87675f811ecd493f6ce6cd904fbd41c1c0798cd24b6168a5f2859dc4b
MD5 ed6d039ad32f217618a14db053e757a4
BLAKE2b-256 cc0a8ba7b725fc6079748675c77772fee4f57d47fe5a490629c20a8a7924bad4

See more details on using hashes here.

File details

Details for the file continuum_toolkit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for continuum_toolkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31a5c42e96db881bdf48ae94ea73ed40c356186eb36af5419cba2e59626cfb9d
MD5 f9904d7fec109bb70416973070014ab4
BLAKE2b-256 40f0b2d5793eae650b886015915b6ca663744fb724610ef25fc2701bbbe1e4e8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page