Skip to main content

Persistent four-lens context for AI coding assistants — charter, memory, vault, graph. One install, multi-agent, benchmark-driven.

Project description

Skopus

Persistent four-lens context for AI coding assistants. Charter, memory, vault, graph — one install, multi-agent, benchmark-driven.

σκοπός (skopos) — Greek for watcher, lookout, target, purpose. The root of scope, telescope, episcopal. A system that gives agents durable scope across sessions.


The problem

Every AI coding assistant — Claude Code, Cursor, Codex, Aider, Gemini CLI, Copilot CLI — loses context at the end of every session. You teach them your preferences, they forget. You correct them, they repeat the mistake next week. Your hard-won lessons evaporate into chat history.

The few persistent-memory systems that exist (claude-mem, Mem0, MemPalace, OpenAI memory) record conversations but don't encode how you work — the non-negotiables, the drift log, the anti-rationalization rules, the "do this, not that" patterns that actually make a collaboration compound. Meanwhile, structural knowledge about a codebase gets rediscovered every session via grep because nothing persists the map.

The result: agents that are smart per-message but stupid across sessions, and humans who spend half their time re-teaching.

The promise

A unified four-lens context system any AI coding assistant can load at session start:

  1. Charter — how you work together (non-negotiables, anti-rationalization table, drift log)
  2. Memory — what happened before (feedback, corrections, project state)
  3. Vault — what you decided and learned (narrative wiki, Karpathy /raw pattern)
  4. Graph — what the code looks like (via graphify)

One install. Works with 6+ agents. Ships with a benchmark suite that proves it works.

Quickstart

pip install skopus
skopus init                    # interactive wizard (10 questions, ~5 min)
cd my-project && skopus link   # wire the current project to your charter + vault
skopus doctor                  # health check all four lenses

What ships at v0.0.3 (alpha)

  • Charter templates — high-level CLAUDE.md, full workflow_partnership.md, user_profile.md
  • Memory scaffoldMEMORY.md index, feedback/project templates, 6 seed profiles
  • Vault scaffold — Karpathy raw/wiki/output layout with /ingest, /compile, /query, /lint, /wiki slash commands
  • Interactive wizard — 10-question personalization flow (+ --non-interactive for CI)
  • Non-destructive init — re-running skopus init preserves user edits by default; --force to overwrite
  • Six platform adapters — Claude Code, Cursor, Codex, Aider, Gemini CLI, Copilot CLI. All idempotent with automatic backup.
  • Graphify integration — hard dependency, automatic wiring of graphify's PreToolUse hook + git post-commit hook, consolidation of graphify's block into .claude/CLAUDE.md
  • skopus charter evolve — session-end reflection loop. Three-question interactive prompt captures validated calls, drifts, and new rules into feedback memory and the charter's drift log. The mechanism that makes the charter compound.
  • skopus doctor — health check across all four lenses plus linked projects
  • 🚧 Benchmark harness — LongMemEval, LoCoMo, MSC, RULER, Correction-Persistence — planned for v0.1.0

Supported platforms (v0.0.3)

Platform Context file Detection
Claude Code .claude/CLAUDE.md (preferred) or root CLAUDE.md ~/.claude/
Cursor .cursor/rules/skopus.mdc (alwaysApply: true) cursor binary or ~/.cursor/
Codex (OpenAI) AGENTS.md codex binary or ~/.codex/
Aider AGENTS.md aider binary or ~/.aider.conf.yml
Gemini CLI GEMINI.md gemini binary or ~/.gemini/
Copilot CLI AGENTS.md gh / copilot binary or ~/.copilot/

See docs/DESIGN.md for the full spec and roadmap.

The benchmark pillar

Skopus is designed to be measurable. The charter's core non-negotiable — evidence over assumption — is applied reflexively to the project itself. Every PR that touches the charter templates, adapter wiring, or wizard flow must move a benchmark number or explain why it's orthogonal.

At v0.1.0, the skopus bench run harness will run:

Benchmark What it tests
LongMemEval (Wu et al. 2024) 6 memory abilities: single-session, multi-session, knowledge update, temporal reasoning, explicit/implicit refs
LoCoMo (Google 2024) Long multi-session conversations
MSC (Facebook 2021) Persona consistency across sessions
RULER (NVIDIA 2024) Long-context retrieval, up to 128K ctx
Skopus Correction-Persistence (novel) Does the agent apply yesterday's corrections to today's tasks?

The ablation mode measures the additive contribution of each lens:

skopus bench run all --ablation --agent claude-code
# Runs vanilla / +charter / +memory / +vault / +graph — shows delta per lens

Philosophy

Skopus combines three existing patterns into one coherent system:

  • Karpathy's LLM Knowledge Base (tweet, gist) — the raw/wiki/output three-folder split with Ingest/Query/Lint operations, framed as a modern Vannevar Bush Memex.
  • The Partnership Charter — evidence over assumption, premium quality, anti-rationalization tables, drift logs. A meta-workflow layer most agent setups don't have.
  • Graphify (safishamsi/graphify) — automatic structural knowledge graph extraction from any codebase with honest audit trails (EXTRACTED / INFERRED / AMBIGUOUS).

Nothing here is new on its own. The contribution is the coherent integration plus the benchmark commitment to prove it works.

Contributing

New platform adapters welcome. Each adapter is a single Python file implementing a 5-method ABC (detect, install, uninstall, status, session_end_hook). See skopus/adapters/base.py and skopus/adapters/claude_code.py for the reference implementation.

Benchmark dataset contributions welcome — especially for the Correction-Persistence benchmark, which ships with 100+ scenarios in bench/correction_persistence/dataset.json.

License

MIT — see LICENSE.

Project details


Download files

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

Source Distribution

skopus-0.1.3.tar.gz (71.0 kB view details)

Uploaded Source

Built Distribution

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

skopus-0.1.3-py3-none-any.whl (72.8 kB view details)

Uploaded Python 3

File details

Details for the file skopus-0.1.3.tar.gz.

File metadata

  • Download URL: skopus-0.1.3.tar.gz
  • Upload date:
  • Size: 71.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for skopus-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1b57b579c992ca5fcdacd4b32b8b6ac3e6a4038abf27a19e354f17154ac528d8
MD5 226a6fd88a74c1ab5bcfe15cc17cb2a6
BLAKE2b-256 505eb27d3060ec28a21306bafcdfaa6e0863edc14ba6fc7c7d302c277cab0678

See more details on using hashes here.

File details

Details for the file skopus-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: skopus-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 72.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for skopus-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 008856963c6086aadc56175660eb1379f8379fc7cab34e6349f24246855044c5
MD5 a8ad0cb6516e8f7a268130dae8111b5b
BLAKE2b-256 a751bf448456ad063a1ac3c97f7dd7516f28b05b8240a90585e06f84ddbf402e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page