musememory 2.3.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +865 -0
- package/.agents/artifacts/HANDOFF.md +22 -0
- package/.agents/artifacts/audit-and-realigned-roadmap-20261015.md +152 -0
- package/.agents/artifacts/bench-graph-baseline.json +519 -0
- package/.agents/artifacts/bench-graph-baseline.md +139 -0
- package/.agents/artifacts/brief-dayos-inspired-site-redo.md +89 -0
- package/.agents/artifacts/handoff-20261015-143202.md +109 -0
- package/.agents/artifacts/plan-competitor-adaptation-dashboard-graph.md +99 -0
- package/.agents/artifacts/session-report-2026-10-01-memory-gaps-and-website.md +94 -0
- package/.agents/artifacts/wave-3-sdd-ledger.md +18 -0
- package/.agents/artifacts/wave-4-sdd-ledger.md +18 -0
- package/.agents/context/architecture.md +1 -0
- package/.agents/context/current.md +222 -3
- package/.agents/context/decisions.md +4 -0
- package/.agents/context/deep-research-agentic-memory-evolution.md +261 -0
- package/.agents/context/deep-research-memory-adaptation-2026-10.md +107 -0
- package/.agents/context/deep-research-memory-improvement-2026-10.md +420 -0
- package/.agents/context/deep-research-memory-mechanisms-2026-09.md +334 -0
- package/.agents/context/index.md +47 -2
- package/.agents/context/product.md +139 -73
- package/.agents/context/roadmap.md +369 -7
- package/.agents/context/ticket-plan.md +553 -0
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +198 -0
- package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +274 -0
- package/.agents/plans/EVOLUTION_PLAN.md +351 -0
- package/.agents/plans/local-embeddings-llama-cpp.md +37 -0
- package/.agents/plans/recall-eval-harness.md +31 -0
- package/.agents/research/ecosystem-teardown-2026-10.md +289 -0
- package/.agents/research/research-brief-agent-memory-migrator.md +1 -1
- package/.agents/research/research-brief-walrus-memory-architecture.md +189 -0
- package/.agents/research/retirement-audit-2026-10.md +45 -0
- package/.agents/standards/README.md +42 -0
- package/.agents/standards/frontend-astro.md +111 -29
- package/.agents/standards/git-workflow.md +5 -0
- package/.agents/standards/workflows.md +13 -0
- package/README.md +300 -253
- package/claims.json +15 -0
- package/dist/index.js +20784 -9111
- package/docs/agent-reference.md +199 -0
- package/docs/cli-reference.md +263 -0
- package/docs/mcp-tool-matrix.json +121 -0
- package/package.json +30 -10
- package/schema.json +40 -2
|
@@ -1,101 +1,167 @@
|
|
|
1
1
|
# 📦 Muse Memory Product Scope & Capabilities
|
|
2
2
|
|
|
3
|
-
> **Binary Names**: `memory` (primary), `musememory` (alias), `npx musememory` (zero-install)
|
|
4
|
-
> **MCP Protocol**: MCP 2024-11-05 (stdio transport)
|
|
3
|
+
> **Binary Names**: `memory` (primary), `musememory` (alias), `npx musememory` (zero-install)
|
|
4
|
+
> **MCP Protocol**: MCP `2024-11-05`, `2025-06-18` (stdio transport)
|
|
5
5
|
> **Runtime**: Bun / TypeScript (Node-compatible bundle)
|
|
6
|
+
> **Authoritative counts**: [`claims.json`](../../claims.json) — generated from `src/` by `scripts/generate-claims.ts`.
|
|
7
|
+
> **Authoritative tool list**: [`docs/mcp-tool-matrix.json`](../../docs/mcp-tool-matrix.json) — generated, never hand-typed.
|
|
8
|
+
> **Full tool + flag reference**: [`docs/cli-reference.md`](../../docs/cli-reference.md) — generated.
|
|
9
|
+
> **Agent contract**: [`docs/agent-reference.md`](../../docs/agent-reference.md).
|
|
10
|
+
|
|
11
|
+
> ⚠️ **Do not hand-type tool or command names in this file.** Every tool name
|
|
12
|
+
> below is asserted against the live registry by
|
|
13
|
+
> `test/marketing_claims.test.ts`; a name that does not exist fails the build.
|
|
6
14
|
|
|
7
15
|
---
|
|
8
16
|
|
|
9
17
|
## 🎯 Executive Overview
|
|
10
18
|
|
|
11
|
-
Muse Memory is a zero-daemon, file-backed cognitive memory engine
|
|
19
|
+
Muse Memory is a zero-daemon, file-backed cognitive memory engine that gives AI agents
|
|
20
|
+
(Claude Code, Cursor, Antigravity, Windsurf, Codex, Gemini CLI, Hermes, OpenCode,
|
|
21
|
+
OpenClaw, and the rest of the detected registry) persistent, self-organizing memory
|
|
22
|
+
across sessions — without an external database daemon, an account, or a cloud service.
|
|
23
|
+
|
|
24
|
+
- **MCP tools registered**: `claims.json → mcpTools`
|
|
25
|
+
- **Task profiles**: `claims.json → mcpProfiles` (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`, `full`)
|
|
26
|
+
- **Coding agents auto-wired**: `claims.json → agentPlatforms`
|
|
27
|
+
- **External memory formats importable**: `claims.json → migratorProviders`
|
|
28
|
+
- **Credential rule families**: `claims.json → credentialRuleFamilies`
|
|
29
|
+
- **Background daemons**: `claims.json → backgroundDaemons`
|
|
12
30
|
|
|
13
31
|
---
|
|
14
32
|
|
|
15
|
-
## 🔌
|
|
33
|
+
## 🔌 Flagship Orchestration & Intelligence Tools
|
|
16
34
|
|
|
17
|
-
### 🎯 Flagship Orchestration & Intelligence Tools
|
|
18
35
|
| MCP Tool | Execution Phase | Agent Purpose |
|
|
19
36
|
| :--- | :--- | :--- |
|
|
20
|
-
| `muse_context` | **Flagship Orchestration** | Unified context fusion: single-call query combining search, active file, symbol, error messages
|
|
21
|
-
| `muse_health` | **Quality Gate** | 5-Pillar Project Health Gate:
|
|
22
|
-
| `muse_why` | **Cognition / "Why" Reasoner** | Traces code evolution backwards through past bug fixes, ADRs, trade-offs
|
|
23
|
-
| `muse_bug_clusters` | **Fragility Hotspots** | Clusters recurring bugs into
|
|
24
|
-
| `muse_tech_debt` | **Technical Debt Registry** | Scans code and memory for TODO/FIXME markers, unsafe `as any` casts
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
| `muse_context` | **Flagship Orchestration** | Unified context fusion: single-call query combining search, active file, symbol, error messages and task intent under strict knapsack token budgets. |
|
|
38
|
+
| `muse_health` | **Quality Gate** | 5-Pillar Project Health Gate: store integrity, code anchors, doc/code alignment, anti-pattern sentry and technical debt, with A-F grading and PASS/WARN/FAIL status. |
|
|
39
|
+
| `muse_why` | **Cognition / "Why" Reasoner** | Traces code evolution backwards through past bug fixes, ADRs, trade-offs and invariants before a refactor. |
|
|
40
|
+
| `muse_bug_clusters` | **Fragility Hotspots** | Clusters recurring bugs into root-cause categories with subsystem fragility scoring. |
|
|
41
|
+
| `muse_tech_debt` | **Technical Debt Registry** | Scans code and memory for TODO/FIXME markers, unsafe `as any` casts and drifted anchors. |
|
|
42
|
+
| `muse_code_impact` | **Blast Radius** | Synthesises code callers, governing ADRs, negative warnings and a risk score for a file. |
|
|
43
|
+
| `muse_pr_context` | **Change Context** | Generates a memory-grounded PR description from a git diff. |
|
|
44
|
+
| `muse_memory_for_code` | **Code-to-Memory** | Queries all memories, ADRs, constraints and bugs associated with a code file and symbol. |
|
|
45
|
+
| `muse_code_for_memory` | **Memory-to-Code** | Resolves all native code anchors and affected source files for a given memory entry. |
|
|
46
|
+
| `muse_reconcile_anchors` | **Anchor Repair** | Prunes dead references and refreshes structural hashes across the store. |
|
|
47
|
+
| `muse_profile_list` | **Tool Management** | Lists the task-focused profiles and the tools each one exposes. |
|
|
48
|
+
| `memory_adr_record` / `memory_adr_list` | **Architecture Decisions** | Records and lists living ADRs with drivers, consequences, options considered and native code anchors. |
|
|
49
|
+
| `memory_drift_audit` | **Drift Detection** | Bi-directional documentation ↔ code drift engine across 6 alignment states. |
|
|
50
|
+
| `memory_negative_capture` | **Negative Sentry** | Records failed approaches, anti-patterns and reproduction commands so they are not repeated. |
|
|
51
|
+
| `memory_promote` | **Scoped Promotion** | Promotes memory along the `local` → `project` → `global` ladder with a 5× repeated-success policy. |
|
|
52
|
+
| `memory_archive` / `memory_rehydrate` | **Archival Lifecycle** | Manages `active` → `cold` → `dormant` → `archived` with query rehydration. |
|
|
53
|
+
| `memory_anchor_create` / `memory_anchor_verify` / `memory_anchor_audit` | **Code Identity** | Creates, verifies and audits line-independent structural code anchors. |
|
|
54
|
+
| `muse_sync_broadcast` / `muse_sync_ingest` | **P2P Gossip Mesh** | Broadcasts and ingests sealed `SyncPacket`s with deduplication and contradiction flagging. |
|
|
55
|
+
| `muse_sync_status` / `muse_sync_pool` | **Sync Coordination** | Tracks peer vector clocks and synchronises memories through the shared drop-directory pool. |
|
|
56
|
+
| `muse_mesh_status` | **Monorepo Topology** | Discovers monorepo workspaces and multi-repo sibling groups. |
|
|
57
|
+
| `muse_mesh_query` | **Cross-Project Query** | Queries memories across the workspace mesh with origin-package provenance tags. |
|
|
58
|
+
| `muse_mesh_audit` | **Contract Verification** | Audits cross-package dependency contracts, entrypoint exports and cross-repo anchors. |
|
|
59
|
+
| `muse_mesh_link` | **Mesh Linking** | Links or unlinks external repository paths in the workspace mesh registry. |
|
|
60
|
+
|
|
61
|
+
## 🛠️ Core Memory & Lifecycle Tools
|
|
62
|
+
|
|
42
63
|
| MCP Tool | Execution Phase | Agent Purpose |
|
|
43
64
|
| :--- | :--- | :--- |
|
|
44
|
-
| `get_context` | **Session Start / Init** |
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `memory_confirm` | **Validation Phase** | Promote a `candidate` or `disputed` memory to `confirmed
|
|
48
|
-
| `memory_supersede` | **Refactoring / Updates** |
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
65
|
+
| `get_context` | **Session Start / Init** | Token-budgeted prompt context injection: `USER.md`, active `CURRENT.md` constraints and top-$K$ scored memories. **Call this on the first turn of every session.** |
|
|
66
|
+
| `muse_context` | **Task Start** | Task-shaped fused context (constraints + ranked memories + negative lessons + code anchors). |
|
|
67
|
+
| `memory_capture` | **Learning / Task End** | Persist a durable fact, decision, rule or fix. Secret-scanned and citation-verified. |
|
|
68
|
+
| `memory_confirm` | **Validation Phase** | Promote a `candidate` or `disputed` memory to `confirmed`. |
|
|
69
|
+
| `memory_supersede` | **Refactoring / Updates** | Link an obsolete memory to a newer confirmed one so deprecated patterns are never served. |
|
|
70
|
+
| `search` | **Targeted Lookups** | Ranked search over the store with a score breakdown and filters. |
|
|
71
|
+
| `memory_recall` | **Targeted Lookups** | Recall active and confirmed memories with verification levels and related graph links. |
|
|
72
|
+
| `memory_current` / `memory_get_constraints` / `memory_set_constraints` | **Constraints** | Read, append and manage the active working constraints in `CURRENT.md`. |
|
|
73
|
+
| `memory_resolve_conflict` | **Conflict Resolution** | Resolves contradictions via `supersede`, `historical`, `reject` or `keep_both`. |
|
|
74
|
+
| `memory_roi` | **Utility & ROI** | Computes reuse metrics, application success rates and regression penalties. |
|
|
75
|
+
| `memory_search_transcripts` | **Historical Archaeology** | Full-text dialogue search across past JSONL transcripts with conversation bookends. |
|
|
76
|
+
| `memory_audit` | **Compliance Check** | Inspects the append-only operational ledger (`.memory/audit.jsonl`). |
|
|
77
|
+
| `memory_verify` / `memory_verify_strict` | **Integrity Gate** | Runs an entry's template-gated verification command, or the full strict integrity gate. |
|
|
56
78
|
|
|
57
79
|
---
|
|
58
80
|
|
|
59
81
|
## ⚙️ Task-Focused MCP Profiles
|
|
60
82
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
Seven profiles keep the tool surface small. The authoritative mapping is
|
|
84
|
+
`PROFILE_TOOL_DEFINITIONS` in `src/orchestrator/profiles.ts`; call
|
|
85
|
+
`muse_profile_list` for the live list. Select a profile with the
|
|
86
|
+
`MUSE_MCP_PROFILE` environment variable.
|
|
87
|
+
|
|
88
|
+
| Profile | Purpose |
|
|
89
|
+
| :--- | :--- |
|
|
90
|
+
| `core` | Minimal footprint: context injection and rapid capture. |
|
|
91
|
+
| `coding` | Active development, code anchors, contextual fusion. |
|
|
92
|
+
| `debugging` | Bug diagnosis, error resolution, observations, negative lessons. |
|
|
93
|
+
| `review` | Code review, architectural audit, conflict verification. |
|
|
94
|
+
| `architecture` | System design, promotions, entity wiki, tree indexing, mesh. |
|
|
95
|
+
| `maintenance` | Repository health, deduplication, archival lifecycle, mesh. |
|
|
96
|
+
| `full` | The complete registry — every registered tool. |
|
|
70
97
|
|
|
71
98
|
---
|
|
72
99
|
|
|
73
100
|
## 💻 CLI Command Surface
|
|
74
101
|
|
|
102
|
+
Only the commands an agent actually calls. The full matrix — every command,
|
|
103
|
+
every flag, generated from `src/cli.ts` — is in
|
|
104
|
+
[`docs/cli-reference.md`](../../docs/cli-reference.md).
|
|
105
|
+
|
|
75
106
|
```bash
|
|
76
|
-
#
|
|
77
|
-
memory
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
memory
|
|
82
|
-
memory
|
|
83
|
-
|
|
84
|
-
#
|
|
85
|
-
memory
|
|
86
|
-
memory
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
memory
|
|
90
|
-
memory
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
memory
|
|
94
|
-
memory current --add "Must use Bun v1.2"
|
|
95
|
-
|
|
96
|
-
# Diagnostics, Server & Optimization
|
|
97
|
-
memory optimize [--dry-run] [--force] [--project core]
|
|
98
|
-
memory doctor
|
|
99
|
-
memory validate --dry-run
|
|
100
|
-
memory mcp [--profile coding|review|architecture|core|full]
|
|
107
|
+
# Session start
|
|
108
|
+
memory context [query] --token-budget 2000 # fused context for the prompt
|
|
109
|
+
memory search "<query>" --limit 10 # ranked search with score breakdown
|
|
110
|
+
|
|
111
|
+
# Capture and lifecycle
|
|
112
|
+
memory capture "<text>" --project <name> # persist a memory
|
|
113
|
+
memory confirm <id> # candidate -> confirmed
|
|
114
|
+
memory supersede <old_id> --with <new_id> # replace, keeping lineage
|
|
115
|
+
memory current get # read active constraints
|
|
116
|
+
memory current set "<text>" --project <name> # append a constraint
|
|
117
|
+
memory link <id> --related <id1,id2> # bidirectional relation
|
|
118
|
+
|
|
119
|
+
# Governance
|
|
120
|
+
memory audit [--operation OP] [--limit N] # query the audit ledger
|
|
121
|
+
memory validate [--dry-run] # schema + referential integrity
|
|
122
|
+
memory verify <id> --strict # integrity gate
|
|
123
|
+
memory doctor # ecosystem health diagnostic
|
|
124
|
+
memory health [--json] # 5-pillar health gate
|
|
101
125
|
```
|
|
126
|
+
|
|
127
|
+
### Commands that do **not** exist
|
|
128
|
+
|
|
129
|
+
These appear in older notes and are wrong — calling them fails:
|
|
130
|
+
|
|
131
|
+
| Wrong | Correct |
|
|
132
|
+
| :--- | :--- |
|
|
133
|
+
| `memory persona <archetype>` | `memory user init <archetype>` |
|
|
134
|
+
| `memory current --add "..."` | `memory current set "..."` |
|
|
135
|
+
| `memory recall "<id>"` | `memory recall "<query>"` — ID lookup is `memory checkout <id>` |
|
|
136
|
+
| `memory stale <id>` | `memory stale [--days N]` — it **lists** stale entries |
|
|
137
|
+
| `memory mcp --profile coding` | Set `MUSE_MCP_PROFILE=coding` in the environment |
|
|
138
|
+
| `memory health --global` | `memory health --json` only — no `--global` flag |
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 🔒 Trust Gates (behaviour an agent must assume)
|
|
143
|
+
|
|
144
|
+
| Gate | When | Behaviour |
|
|
145
|
+
| :--- | :--- | :--- |
|
|
146
|
+
| Secret scan (Vibeguard) | every write | The write is **refused**; the rule name is reported, never the value. |
|
|
147
|
+
| Citation verification | every write with an anchor | **Refused** under the default `fail_fast` policy when the cited file/symbol does not exist; drift is flagged and stamped. |
|
|
148
|
+
| Freshness gate | every recall | Memories whose anchors drifted are **withheld** and reported (`withheld_memories` + `freshness_notice`), never silently served. `include_drifted: true` returns them with a `⚠ FRESHNESS` warning. |
|
|
149
|
+
| Ingest sanitisation | import / harvest | Injected `<memory-context>` blocks and base64 payloads are stripped before the text is stored — including into `CURRENT.md`. |
|
|
150
|
+
| Template-gated execution | `memory verify` | Only `bun test <relative test file>`, `bunx tsc --noEmit` and `node --check <relative path>` may run. There is no shell-execution tool. |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 📁 Storage Layout
|
|
155
|
+
|
|
156
|
+
| Path | Scope | Contents |
|
|
157
|
+
| :--- | :--- | :--- |
|
|
158
|
+
| `.memory/memory.db` | project | SQLite (WAL + FTS5): memories, anchors, graph edges, FTS index. |
|
|
159
|
+
| `.memory/memories/*.yaml` | project | One human-readable YAML file per memory — the secondary mirror. |
|
|
160
|
+
| `.memory/CURRENT.md` | project | Active working constraints and session handoffs. |
|
|
161
|
+
| `.memory/USER.md` | project | Persona and working preferences. |
|
|
162
|
+
| `.memory/observations.jsonl` | project | Append-only event log the harvester mines. |
|
|
163
|
+
| `.memory/audit.jsonl` | project | Tamper-evident write ledger. |
|
|
164
|
+
| `.memory/sync_pool/` | project | Zero-daemon shared gossip pool. |
|
|
165
|
+
| `~/.memory/` | global | The same layout; project scope wins on conflict. |
|
|
166
|
+
|
|
167
|
+
Everything is a plain file. There is no server, no port and no service to keep alive.
|