Working Memory β
On-disk layout (typical) β
Inside your repository:
.cm/
CONTINUITY.md # session spine (src/continuity.ts)
config.yaml # project config (e.g. storage backend)
context-bus.json # skill chain handoff bus
token-budget.json # category budgets
context.db # SQLite + FTS (default backend)
memory/
learnings.json # legacy / migration path
decisions.json
sprint/ # engineering pipeline artifactsExact files depend on which commands you have run and migration state.
What to store where β
| Content | Store | Why |
|---|---|---|
| Current goal + blockers | CONTINUITY.md | Fast human scan |
| βDo not repeatβ lessons | learnings | Searchable, TTL-capable |
| Architectural choices | decisions | Searchable, citeable |
| Step output for chains | context bus | Machine-readable handoff |
| Execution outcomes | execution_analyses | Advisory evidence |
| Skill quality signals | skill_metrics | Routing + recovery input |
Agent access (MCP) β
The MCP server (src/mcp-context-server.ts) exposes:
cm_queryβ search learnings/decisionscm_resolveβ loadcm://resources at L0/L1/L2cm_bus_read/cm_bus_writeβ context buscm_memory_decayβ TTL archival
Backends β
- sqlite (default) β
SqliteBackendinsrc/storage-backend.ts - legacy configs β if an old project still says
storage.backend: viking, CodyMaster warns and falls back to SQLite
Advisory data β
The advisory loop also stores its evidence in .cm/context.db:
execution_analysesβ recent task outcomes plus analyzer recommendationsskill_metricsβ aggregated per-skill counters and the inputs used byqualityWeight()
Use these commands instead of querying the DB manually in most cases:
bash
cm advisory report --project .
cm advisory metrics --project .
cm advisory handoff --project . --for cm-skill-health