AI/ML

Continuous Claude V3

By parcadei3,934 stars

Context management for Claude Code. Hooks maintain state via ledgers and handoffs. MCP execution without context pollution. Agent orchestration with isolated context windows.

agentsclaude-codeclaude-code-cliclaude-code-hooksclaude-code-mcpclaude-code-skills
Install Command
npx skills add parcadei/Continuous-Claude-v3
Open on GitHub
Supported Clients
Claude CodeCursorVS Code CopilotWindsurf

Skill Details

Continuous Claude

A persistent, learning, multi-agent development environment built on Claude Code

License: MIT Claude Code Skills Agents Hooks

Continuous Claude transforms Claude Code into a continuously learning system that maintains context across sessions, orchestrates specialized agents, and eliminates wasting tokens through intelligent code analysis.

Table of Contents


Why Continuous Claude?

Claude Code has a compaction problem: when context fills up, the system compacts your conversation, losing nuanced understanding and decisions made during the session.

Continuous Claude solves this with:

ProblemSolution
Context loss on compactionYAML handoffs - more token-efficient transfer
Starting fresh each sessionMemory system recalls + daemon auto-extracts learnings
Reading entire files burns tokens5-layer code analysis + semantic index
Complex tasks need coordinationMeta-skills orchestrate agent workflows
Repeating workflows manually109 skills with natural language triggers

The mantra: Compound, don't compact. Extract learnings automatically, then start fresh with full context.

Why "Continuous"? Why "Compounding"?

The name is a pun. Continuous because Claude maintains state across sessions. Compounding because each session makes the system smarter—learnings accumulate like compound interest.


Design Principles

An agent is five things: Prompt + Tools + Context + Memory + Model.

ComponentWhat We Optimize
PromptSkills inject relevant context; hooks add system reminders
ToolsTLDR reduces tokens; agents parallelize work
ContextNot just what Claude knows, but how it's provided
MemoryDaemon extracts learnings; recall surfaces them
ModelBecomes swappable when the other four are solid

Anti-Complexity

We resist plugin sprawl. Every MCP, subscription, and tool you add promises improvement but risks breaking context, tools, or prompts through clashes.

Our approach:

  • Time, not money — No required paid services. Perplexity and NIA are optional, high-value-per-token.
  • Learn, don't accumulate — A system that learns handles edge cases better than one that collects plugins.
  • Shift-left validation — Hooks run pyright/ruff after edits, catching errors before tests.

The failure modes of complex systems are structurally invisible until they happen. A learning, context-efficient system doesn't prevent all failures—but it recovers and improves.


How to Talk to Claude

You don't need to memorize slash commands. Just describe what you want naturally.

The Skill Activation System

When you send a message, a hook injects context that tells Claude which skills and agents are relevant. Claude infers from a rule-based system and decides which tools to use.

> "Fix the login bug in auth.py"

🎯 SKILL ACTIVATION CHECK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚠️ CRITICAL SKILLS (REQUIRED):
  → create_handoff

📚 RECOMMENDED SKILLS:
  → fix
  → debug

🤖 RECOMMENDED AGENTS (token-efficient):
  → debug-agent
  → scout

ACTION: Use Skill tool BEFORE responding
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Priority Levels

LevelMeaning
⚠️ CRITICALMust use (e.g., handoffs before ending session)
📚 RECOMMENDEDShould use (e.g., workflow skills)
💡 SUGGESTEDConsider using (e.g., optimization tools)
📌 OPTIONALNice to have (e.g., documentation helpers)

Natural Language Examples

What You SayWhat Activates
"Fix the broken login"/fix workflow → debug-agent, scout
"Build a user dashboard"/build workflow → plan-agent, kraken
"I want to understand this codebase"/explore + scout agent
"What could go wrong with this plan?"/premortem
"Help me figure out what I need"/discovery-interview
"Done for today"create_handoff (critical)
"Resume where we left off"resume_handoff
"Research auth patterns"oracle agent + perplexity
"Find all usages of this API"scout agent + ast-grep

Why This Approach?

BenefitHow
More DiscoverableDon't need to know commands exist
Context-AwareSystem knows when you're 90% through context
Reduces Cognitive LoadDescribe intent naturally, get curated suggestions
Power User FriendlyStill supports /fix, /build, etc. directly

Skill vs Workflow vs Agent

TypePurposeExample
SkillSingle-purpose toolcommit, tldr-code, qlty-check
WorkflowMulti-step process/fix (sleuth → premortem → kraken → commit)
AgentSpecialized sub-sessionscout (exploration), oracle (research)

See detailed skill activation docs →


Quick Start

Prerequisites

  • Python 3.11+
  • uv package manager
  • Docker (for PostgreSQL)
  • Claude Code CLI

Installation

# Clone
git clone https://github.com/parcadei/Continuous-Claude-v3.git
cd Continuous-Claude-v3/opc

# Run setup wizard (12 steps)
uv run python -m scripts.setup.wizard

Note: The pyproject.toml is in opc/. Always run uv commands from the opc/ directory.

What the Wizard Does

StepWhat It Does
1Backup existing .claude/ config (if present)
2Check prerequisites (Docker, Python, uv)
3-5Database + API key configuration
6-7Start Docker stack, run migrations
8Install Claude Code integration (32 agents, 109 skills, 30 hooks)
9Math features (SymPy, Z3, Pint - optional)
10TLDR code analysis tool
11-12Diagnostics tools + Loogle (optional)

To Uninstall:

cd Continuous-Claude-v3/opc
  uv run python -m scripts.setup.wizard --uninstall

What it does

  1. Archives your current setup → Moves ~/.claude to ~/.claude-v3.archived.<timestamp>
  2. Restores your backup → Finds the most recent ~/.claude.backup.* (created during install) and restores it
  3. Preserves user data → Copies these back from the archive:
  • history.jsonl (your command history)
  • mcp_config.json (MCP servers)
  • .env (API keys)
  • projects.json (project configs)
  • file-history/ directory
  • projects/ directory
  1. Removes CC-v3 additions → Everything else (hooks, skills, agents, rules)

Safety Features

  • Your current setup is archived with timestamp - nothing gets deleted
  • The wizard asks for confirmation before proceeding
  • It restores from the backup that was made during installation
  • All your Claude Code settings stay intact

Remote Database Setup

By default, CC-v3 runs PostgreSQL locally via Docker. For remote database setups:

1. Database Preparation

# Connect to your remote PostgreSQL instance
psql -h hostname -U user -d continuous_claude

# Enable pgvector extension (requires superuser or rds_superuser)
CREATE EXTENSION IF NOT EXISTS vector;

# Apply the schema (from your local clone)
psql -h hostname -U user -d continuous_claude -f docker/init-schema.sql

Managed PostgreSQL tips:

  • AWS RDS: Add vector to shared_preload_libraries in DB Parameter Group
  • Supabase: Enable via Database Extensions page
  • Azure Database: Use Extensions pane to enable pgvector

2. Connection Configuration

Set CONTINUOUS_CLAUDE_DB_URL in ~/.claude/settings.json:

{
  "env": {
    "CONTINUOUS_CLAUDE_DB_URL": "postgresql://user:password@hostname:5432/continuous_claude"
  }
}

Or export before running Claude:

export CONTINUOUS_CLAUDE_DB_URL="postgresql://user:password@hostname:5432/continuous_claude"
claude

See .env.example for all available environment variables.

First Session

# Start Claude Code
claude

# Try a workflow
> /workflow

First Session Commands

CommandWhat it does
/workflowGoal-based routing (Research/Plan/Build/Fix)
/fix bug <description>Investigate and fix a bug
/build greenfield <feature>Build a new feature from scratch
/exploreUnderstand the codebase
/premortemRisk analysis before implementation

Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                        CONTINUOUS CLAUDE                            │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐             │
│  │   Skills    │    │   Agents    │    │    Hooks    │             │
│  │   (109)     │───▶│    (32)     │◀───│    (30)     │             │
│  └─────────────┘    └─────────────┘    └─────────────┘             │
│         │                  │                  │                     │
│         ▼                  ▼                  ▼                     │
│  ┌─────────────────────────────────────────────────────────────┐   │
│  │                     TLDR Code Analysis                       │   │
│  │   L1:AST → L2:CallGraph → L3:CFG → L4:DFG → L5:Slicing      │   │
│  │                    (95% token savings)                       │   │
│  └─────────────────────────────────────────────────────────────┘   │
│         │                  │                  │                     │
│         ▼                  ▼                  ▼                     │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐             │
│  │   Memory    │    │ Continuity  │    │ Coordination│             │
│  │   System    │    │   Ledgers   │    │    Layer    │             │
│  └─────────────┘    └─────────────┘    └─────────────┘             │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Data Flow: Session Lifecycle

SessionStart                    Working                      SessionEnd
    │                              │                             │
    ▼                              ▼                             ▼
┌─────────┐                  ┌─────────┐                   ┌─────────┐
│  Load   │                  │  Track  │                   │  Save   │
│ context │─────────────────▶│ changes │──────────────────▶│  state  │
└─────────┘                  └─────────┘                   └─────────┘
    │                              │                             │
    ├── Continuity ledger          ├── File claims               ├── Handoff
    ├── Memory recall              ├── TLDR indexing             ├── Learnings
    └── Symbol index               └── Blackboard                └── Outcome
                                         │
                                         ▼
                                    ┌─────────┐
                                    │ /clear  │
                                    │ Fresh   │
                                    │ context │
                                    └─────────┘

The Continuity Loop (Detailed)

┌─────────────────────────────────────────────────────────────────────────────┐
│                            THE CONTINUITY LOOP                              │
└─────────────────────────────────────────────────────────────────────────────┘

  1. SESSION START                     2. WORKING
  ┌────────────────────┐               ┌────────────────────┐
  │                    │               │                    │
  │  Ledger loaded ────┼──▶ Context    │  PostToolUse ──────┼──▶ Index handoffs
  │  Handoff loaded    │               │  UserPrompt ───────┼──▶ Skill hints
  │  Memory recalled   │               │  Edit tracking ────┼──▶ Dirty flag++
  │  TLDR cache warmed │               │  SubagentStop ─────┼──▶ Agent reports
  │                    │               │                    │
  └────────────────────┘               └────────────────────┘
           │                                    │
           │                                    ▼
           │                           ┌────────────────────┐
           │                           │ 3. PRE-COMPACT     │
           │                           │                    │
           │                           │  Auto-handoff ─────┼──▶ thoughts/shared/
           │                           │  (YAML format)     │    handoffs/*.yaml
           │                           │  Dirty > 20? ──────┼──▶ TLDR re-index
           │                           │                    │
           │                           └────────────────────┘
           │                                    │
           │                                    ▼
           │                           ┌────────────────────┐
           │                           │ 4. SESSION END     │
           │                           │                    │
           │                           │  Stale heartbeat ──┼──▶ Daemon wakes
           │                           │  Daemon spawns ────┼──▶ Headless Claude
           │                           │  Thinking blocks ──┼──▶ archival_memory
           │                           │                    │
           │                           └────────────────────┘
           │                                    │
           │                                    │
           └──────────────◀────── /clear ◀──────┘
                          Fresh context + state preserved

Workflow Chains

┌─────────────────────────────────────────────────────────────────────────────┐
│                           META-SKILL WORKFLOWS                              │
└─────────────────────────────────────────────────────────────────────────────┘

  /fix bug                              /build greenfield
  ─────────                             ─────────────────
  ┌──────────┐  ┌──────────┐            ┌──────────┐  ┌──────────┐
  │  sleuth  │─▶│ premortem│            │discovery │─▶│plan-agent│
  │(diagnose)│  │  (risk)  │            │(clarify) │  │ (design) │
  └──────────┘  └────┬─────┘            └──────────┘  └────┬─────┘
                     │                                      │
                     ▼                                      ▼
              ┌──────────┐                          ┌──────────┐
              │  kraken  │                          │ validate │
              │  (fix)   │                          │ (check)  │
              └────┬─────┘                          └────┬─────┘
                   │                                      │
                   ▼                                      ▼
              ┌──────────┐                          ┌──────────┐
              │  arbiter │                          │  kraken  │
              │ (test)   │                          │(implement│
              └────┬─────┘                          └────┬─────┘
                   │                                      │
                   ▼                                      ▼
              ┌──────────┐                          ┌──────────┐
              │  commit  │                          │  commit  │
              └──────────┘                          └──────────┘


  /tdd                                  /refactor
  ────                                  ─────────
  ┌──────────┐  ┌──────────┐            ┌──────────┐  ┌──────────┐
  │plan-agent│─▶│  arbiter │            │ phoenix  │─▶│  warden  │
  │ (design) │  │(tests 🔴)│            │(analyze) │  │ (review) │
  └──────────┘  └────┬─────┘            └──────────┘  └────┬─────┘
                     │                                      │
                     ▼                                      ▼
              ┌──────────┐                          ┌──────────┐
              │  kraken  │                          │  kraken  │
              │(code 🟢) │                          │(transform│
              └────┬─────┘                          └────┬─────┘
                   │                                      │
                   ▼                                      ▼
              ┌──────────┐                          ┌──────────┐
              │  arbiter │                          │  judge   │
              │(verify ✓)│                          │ (review) │
              └──────────┘                          └──────────┘

Data Layer Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                           DATA LAYER ARCHITECTURE                           │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  TLDR 5-LAYER CODE ANALYSIS              SEMANTIC INDEX                     │
│  ┌────────────────────────┐              ┌────────────────────────┐         │
│  │ L1: AST (~500 tok)     │              │ BGE-large-en-v1.5      │         │
│  │     └── Functions,     │              │ ├── All 5 layers       │         │
│  │         classes, sigs  │              │ ├── 10 lines context   │         │
│  │                        │              │ └── FAISS index        │         │
│  │ L2: Call Graph (+440)  │              │                        │         │
│  │     └── Cross-file     │──────────────│ Query: "auth logic"    │         │
│  │         dependencies   │              │ Returns: ranked funcs  │         │
│  │                        │              └────────────────────────┘         │
│  │ L3: CFG (+110 tok)     │                                                 │
│  │     └── Control flow   │                                                 │
│  │                        │              MEMORY (PostgreSQL+pgvector)       │
│  │ L4: DFG (+130 tok)     │              ┌────────────────────────┐         │
│  │     └── Data flow      │              │ sessions (heartbeat)   │         │
│  │                        │              │ file_claims (locks)    │         │
│  │ L5: PDG (+150 tok)     │              │ archival_memory (BGE)  │         │
│  │     └── Slicing        │              │ handoffs (embeddings)  │         │
│  └────────────────────────┘              └────────────────────────┘         │
│         ~1,200 tokens                                                       │
│         vs 23,000 raw                                                       │
│         = 95% savings                    FILE SYSTEM                        │
│                                          ┌────────────────────────┐         │
│                                          │ thoughts/              │         │
│                                          │ ├── ledgers/           │         │
│                                          │ │   └── CONTINUITY_*.md│         │
│                                          │ └── shared/            │         │
│                                          │     ├── handoffs/*.yaml│         │
│                                          │     └── plans/*.md     │         │
│                                          │                        │         │
│                                          │ .tldr/                 │         │
│                                          │ └── (daemon cache)     │         │
│                                          └────────────────────────┘         │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Core Systems

Skills System

Skills are modular capabilities triggered by natural language. Located in .claude/skills/.

Meta-Skills (Workflow Orchestrators)

Meta-SkillChainUse When
/workflowRouter → appropriate workflowDon't know where to start
/builddiscovery → plan → validate → implement → commitBuilding features
/fixsleuth → premortem → kraken → test → commitFixing bugs
/tddplan → arbiter (tests) → kraken (implement) → arbiterTest-first development
/refactorphoenix → plan → kraken → reviewer → arbiterSafe code transformation
/reviewparallel specialized reviews → synthesisCode review
/explorescout (quick/deep/architecture)Understand codebase
/securityvulnerability scan → verificationSecurity audits
/releaseaudit → E2E → review → changelogShip releases

Meta-Skill Reference

Each meta-skill supports modes, scopes, and flags. Type the skill alone (e.g., /build) to get an interactive question flow.

/build <mode> [options] [description]

ModeChainUse For
greenfielddiscovery → plan → validate → implement → commit → PRNew feature from scratch
brownfieldonboard → research → plan → validate → implementFeature in existing codebase
tddplan → test-first → implementTest-driven development
refactorimpact analysis → plan → TDD → implementSafe refactoring
OptionEffect
--skip-discoverySkip interview phase (have clear spec)
--skip-validateSkip plan validation
--skip-commitDon't auto-commit
--skip-prDon't create PR description
--parallelRun research agents in parallel

/fix <scope> [options] [description]

ScopeChainUse For
bugdebug → implement → test → commitGeneral bug fix
hookdebug-hooks → hook-developer → implement → testHook issues
depspreflight → oracle → plan → implement → qltyDependency errors
pr-commentsgithub-search → research → plan → implement → commitPR feedback
OptionEffect
--no-testSkip regression test
--dry-runDiagnose only, don't fix
--no-commitDon't auto-commit

/explore <depth> [options]

DepthTimeWhat It Does
quick~1 mintldr tree + structure overview
deep~5 minonboard + tldr + research + documentation
architecture~3 mintldr arch + call graph + layers
OptionEffect
--focus "area"Focus on specific area (e.g., --focus "auth")
--output handoffCreate handoff for implementation
--output docCreate documentation file
--entry "func"Start from specific entry point

/tdd, /refactor, /review, /security, /release

These follow their defined chains without mode flags. Just run:

/tdd "implement retry logic"
/refactor "extract auth module"
/review                           # reviews current changes
/security "authentication code"
/release v1.2.0

Key Skills (High-Value Tools)