Continuum
Local-first context continuity platform for AI work — an append-only event ledger, evidence-linked working state, and layered context bootstrap so a new AI session can pick up where the last one left off.
Overview
Continuum is a local-first context continuity platform for AI-assisted work, built during the Devpost OpenAI Build Week hackathon. It preserves accessible session events in an append-only ledger, derives an evidence-linked working state from them, and generates layered context that helps a new AI session continue without starting over. It is an early-stage 0.1.0 prototype: the workspace, project/session model, transcript import, immutable ledger, integrity checks, deterministic state extraction, and bootstrap generation are implemented; live capture, portable capsules, retrieval, MCP tools, automated handoff verification, encryption, and a web dashboard are on the roadmap.
The Problem
AI-assisted work is often split across chats, models, tools, and teammates. Conventional summaries are useful but can quietly drop exact values, rejected approaches, failure history, constraints, and the evidence behind a decision — so a new session has to rebuild context from memory instead of from source.
What I Built
- 1A local workspace (~/.continuum) with versioned configuration and local project/session storage, initialized and health-checked via a CLI.
- 2Versioned canonical event schemas for messages, tool calls, commands, artifacts, and system events.
- 3An append-only, per-session JSONL event ledger with strict ordering, deduplication, and SHA-256 hashes computed over recursively key-sorted canonical JSON.
- 4A ledger verification pass that audits JSON validity, schema conformance, hash integrity, event ordering, duplicate IDs, and project/session consistency.
- 5A transcript importer that normalizes JSON exports (including ChatGPT-style mapping objects) and Markdown transcripts (User:/Assistant:/Human: and common aliases) into canonical events.
- 6A deterministic, signal-phrase-based working-state extractor that pulls objectives, constraints, decisions, next actions, completed work, failed approaches, assumptions, and open questions — each linked back to its source event ID.
- 7A layered bootstrap generator that arranges extracted state into L0 (orientation), L1 (active state), and L2 (governing context) Markdown for pasting into a fresh AI session.
- 8A Commander.js-based CLI (init, doctor, project, session, import, verify-ledger, state show, state bootstrap) across a pnpm/TypeScript monorepo with Vitest, ESLint, and Prettier.
Key Technical Decisions
Ledger as source of truth
Working state and bootstrap text are derived artifacts that can always be regenerated from the recorded events — the append-only ledger, not a summary, is authoritative.
Evidence-linked working state
Every extracted objective, decision, constraint, or open question carries a provenance link back to the exact source event it came from, instead of relying on confident recall.
Layered context bootstrap
Orientation (L0), active state (L1), and governing context (L2) are generated as separate layers so a new session gets the right altitude of context instead of one undifferentiated dump.
Outcome
A working local-first CLI prototype that can import real transcripts, build a tamper-evident event ledger, verify its own integrity, and generate layered handoff context for a new AI session — built and shipped during Devpost OpenAI Build Week as a 0.1.0 release, with live capture, MCP tools, retrieval, and a web dashboard explicitly scoped as next steps rather than claimed as done.
What I Learned
Being explicit about what the system doesn't do yet — no hidden chain-of-thought capture, no cross-model behavioral guarantees, no encryption or retention enforcement — mattered as much as the features that shipped. Designing the hash and event-ordering rules to catch reordered, duplicated, or modified events was the trickiest part of making the integrity claim actually hold up.