ContextCord Docs · Module model

同一个产品语言,深入到模块契约。The same product language, down to module contracts.

首页解释“为什么”,这里解释“它们如何组合、各自依赖什么、源码边界在哪里”。Docs 与 Home 使用同一个 Logo、导航、配色、玻璃和主题状态。Home explains why. This page explains how the modules compose, what they depend on, and where the source boundaries live. Docs and Home share the same logo, navigation, palette, glass treatment and theme state.

ContextCord
shared kernel
ContinuumContext EngineVeritasDecision PlaneGatewayJev · optional
01 · Product modules

六个模块,不是六套系统。Six modules, not six systems.

模块名是稳定的产品语言;代码仍然由一个 Capability Registry 和一个 StateStore 约束。这样既容易理解,也避免为了“解耦”制造第二套配置真值。Module names are the stable product language; code remains governed by one Capability Registry and one StateStore. That improves comprehension without creating a second configuration truth.

01 · Remember the work

Continuum

Core

它解决:工程做到哪里了?It answers: where did the engineering work stop?

Task、Session、Note、Checkpoint、Handoff、Resume;StateStore 使用 SQLite WAL;任务与源码身份绑定,Portable Memory 会重检依赖。Task, Session, Note, Checkpoint, Handoff and Resume; StateStore runs on SQLite WAL; task state is source-bound and portable memory rechecks dependencies.

Capabilities
continuity · memory · handoff · closeout
Source
store.py · memory.py · handoff.py · closeout.py
Value
记住工程进度,而不是记住聊天记录。Remember engineering progress, not chat history.
02 · Select context

Context Engine

Core

它解决:下一位 Agent 到底该看到什么?It answers: what should the next agent actually see?

从候选记忆中读取 freshness、authority 与预算信号;BM25 做确定性排序;组装 bounded context packet,并保留原始 archive 引用。Reads freshness, authority and budget signals from candidate memory; uses deterministic BM25 ranking; assembles a bounded context packet while preserving archive references.

Capabilities
memory (selection subsystem)
Source
context.py · bm25.py · memory.py · handoff.py
Value
选择最需要的上下文,而不是把历史全部塞回模型。Select the context that matters instead of replaying all history.
03 · Preserve why it is true

Veritas

Core

它解决:为什么这条记忆现在还值得相信?It answers: why is this memory still trustworthy now?

Git / Truth / Policy / Memory 指纹、Source Identity、Evidence Hash、事件链、Receipt Chain 与 Qualification 共同约束“当前事实”。Git, Truth, Policy and Memory fingerprints, Source Identity, evidence hashes, event chains, receipt chains and qualification bound what counts as current truth.

Capabilities
core · evidence
Source
identity.py · truth.py · evidence.py · receipt.py · qualification.py
Value
不仅保留结论,还保留结论为什么成立。Keep not only the conclusion, but why it holds.
04 · Bound decisions

Decision Plane

Optional

它解决:模糊问题由谁决定,模型又能决定到哪里?It answers: who decides ambiguous cases, and where does model authority stop?

Gate 0、确定性策略、Adaptive Router v3、Model Intelligence、硬规则与 Decision Receipt 先构造可选集合,再决定是否需要语义判断。Gate 0, deterministic policy, Adaptive Router v3, Model Intelligence, hard rules and decision receipts construct the eligible set before any semantic judgment is requested.

Capabilities
decision · router · model_intelligence
Source
decision_fabric.py · router.py · model_intelligence.py · policy.py
Value
模型可以判断,但模型没有最终权力。Models may judge; code retains final authority.
05 · Connect hosts

MCP / Host Gateway

Gateway

它解决:怎么跨 Codex、Cursor 等宿主继续工作?It answers: how can the same project continue across Codex, Cursor and other hosts?

本地 MCP/stdio、16 类结构化操作、Host Registry、配置渲染器与 BYOH Adapter Manifest;MCP 工具面会跟随有效 Capability 动态收缩。Local MCP/stdio, 16 structured operations, Host Registry, config renderers and BYOH manifests; the MCP tool surface shrinks dynamically with active capabilities.

Capabilities
mcp · hosts
Source
mcp.py · service.py · host_registry.py · host_configs.py
Value
一个核心状态层,接入多个 Coding Agent。One state core, multiple coding-agent hosts.
06 · Semantic advisor

Jev

Optional provider

它解决:哪些窄问题值得交给模型做语义判断?It answers: which narrow questions deserve semantic judgment?

只接收 typed bounded state,用于 stale conflict、恢复归档、上下文重排、Handoff 模式或闭集路由选择;SDK 与 API Key 都是可选依赖。Receives typed bounded state for stale conflicts, archive restore, reranking, handoff mode or closed-set routing; the SDK and API key are optional dependencies.

Capabilities
jev / optional extra .[jev]
Source
jev_provider.py · decision_fabric.py
Value
把 LLM 从执行者降级成有边界的语义顾问。Turn the LLM from executor into a bounded semantic advisor.
02 · Modularity audit

第一层解耦已经完成,关键切口已闭合。Runtime modularity is real; the critical boundary is now closed.

源码审计显示:配置级与 MCP surface 的解耦已经成立,Continuum 的 Handoff 已改为 deterministic 默认路径,Decision Plane 只作为惰性增强。Source review shows configuration and MCP-surface modularity are real, and Continuum handoff now uses a deterministic default with Decision Plane as a lazy enhancement.

已经完成Already working

  • 12 个 runtime capabilities 共用唯一注册表,research 为 dev-only,并有显式 requires 依赖闭包。Twelve runtime capabilities share one registry with explicit dependency closure; research remains dev-only.
  • MCP Tool Catalog 根据 effective capabilities 动态收缩;关闭能力不会暴露 Tool。The MCP tool catalog shrinks with effective capabilities; disabled features expose no tools.
  • Jev 是 .[jev] 可选依赖,Provider 状态检查不暴露 secret。Jev is an optional .[jev] extra and provider status inspection does not expose secrets.
  • Model Intelligence 是只读 advisory provider,失败不阻塞确定性 Router。Model Intelligence is a read-only advisory provider; failure does not block deterministic routing.

本轮已完成Completed this round

  • handoff.py 不再顶层 import DecisionFabric,handoff capability 只需要 continuity + memory。handoff.py no longer imports DecisionFabric at module load, so handoff requires only continuity + memory.
  • 因此 continuity preset 已不再包含 Decision Plane,符合只使用 Continuum 的产品语义。The continuity preset no longer pulls in Decision Plane and is now a pure Continuum-oriented experience.
  • Context Engine 与 Veritas 是从同一 Capability Registry 投影出的产品模块。Context Engine and Veritas are product-module projections of the same Capability Registry.
  • 仍保持单一 Python distribution 与单一 StateStore。ContextCord remains one Python distribution with one StateStore.
shared kernel (core / StateStore / config)
├── Veritas            ← evidence / identity / truth / receipts
├── Continuum          ← continuity / memory / handoff / closeout
│    └── Context Engine← bounded selection / BM25 / archive references
├── Decision Plane     ← decision / router / model_intelligence
│    └── Jev           ← optional semantic provider
└── MCP / Host Gateway ← mcp / hosts → exposes only enabled surfaces

Result: Continuum ──x──> Decision Plane (hard dependency removed)
        Continuum ─────> deterministic handoff by default
        Decision Plane → optional enhancement only

建议不要拆成多个 PyPI 包。真正的模块化是:依赖显式、禁用能力不导入可选 Provider、不暴露 Tool、不产生副作用,而共享状态始终只有一份。Do not split this into multiple PyPI packages. Real modularity means explicit dependencies: disabled features do not import optional providers, expose tools or create side effects, while shared state remains singular.

03 · Capability profiles

模块负责解释,Capability 负责开关。Modules explain; capabilities switch.

保留现有 profile 作为快速入口,custom 负责精确组合。后续可以把 product module 信息作为 capability metadata 输出,但不要引入第二套配置文件。Keep current profiles as fast presets and use custom for precise composition. Product-module identity can be emitted as capability metadata later, but do not add a second config source.

minimalcore + evidence

最小可信内核。Smallest trusted kernel.

continuitycontinuity + memory + handoff + gateway…

continuity 只保留 continuity + memory + handoff + gateway;Decision Plane 为独立 profile。Continuity keeps continuity + memory + handoff + gateway; Decision Plane remains independent.

decisiondecision + router + model intelligence

可以从 CLI 单独使用;MCP 不自动开启。Usable from CLI independently; MCP is not implied.

full / customall / explicit enable-disable

完整体验或精确组合。Full experience or exact composition.

04 · Setup

从最小路径开始。Start with the smallest path.

先让 doctor 与 source identity 正常,再按需要启用 Decision Plane、Gateway 或 Jev。Get doctor and source identity healthy first, then enable Decision Plane, Gateway or Jev only when needed.

local setup
python -m pip install -e ".[dev]"
contextcord init --profile generic
contextcord doctor
contextcord feature list
contextcord resume --assist

# optional semantic provider
python -m pip install -e ".[jev]"
# set TYPESAFE_API_KEY locally
contextcord provider jev status
05 · Host Gateway

Built-in 是集成合同,不是模型资格结论。Built-in is an integration contract, not a qualification verdict.

Codex、Cursor、Qoder、OpenCode、WorkBuddy 共享同一 MCP 应用边界;其它宿主通过 BYOH Adapter Manifest 接入。Codex, Cursor, Qoder, OpenCode and WorkBuddy share the same MCP application boundary; other hosts connect through BYOH adapter manifests.

Codex · Cursor · Qoder

宿主只翻译配置/调用边界;任务状态、策略、证据仍来自 ContextCord。Hosts translate configuration and call boundaries only; task state, policy and evidence remain in ContextCord.

OpenCode · WorkBuddy · BYOH

Adapter 不复制 Decision Plane,也不拥有项目真值。Adapters do not duplicate Decision Plane and do not own project truth.

06 · Evidence

外部先验、语义判断、真实结果分层记录。External priors, semantic judgment and real outcomes stay separate.

CodexRadar 等公开数据只进入 Model Intelligence;Jev 只产生 bounded semantic choice;只有真实 Host Execution + Verifier 才进入 Local Outcome。Public observations such as CodexRadar enter Model Intelligence only; Jev produces bounded semantic choices; only real host execution plus verifier results enter Local Outcome.

External prior ───────→ Model Intelligence ──┐
                                              ├→ Decision Plane → route receipt
Bounded decision state → optional Jev ────────┘

Effective route → Host execution → Verifier → Local Outcome Ledger
                                      │
                                      └→ Evidence / Receipt Chain / Qualification

完整架构仍在 Home 的 Archify Atlas:System / Router / Workflow / Sequence / Data Flow / Lifecycle 六类图随站点语言切换。The full architecture remains in Home’s Archify Atlas: System, Router, Workflow, Sequence, Data Flow and Lifecycle views follow the site language.

打开 Architecture AtlasOpen Architecture Atlas