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.
Files changed (43) hide show
  1. package/.agents/artifacts/2026-10-20-lifeos-memory-distillation-plan.md +865 -0
  2. package/.agents/artifacts/HANDOFF.md +22 -0
  3. package/.agents/artifacts/audit-and-realigned-roadmap-20261015.md +152 -0
  4. package/.agents/artifacts/bench-graph-baseline.json +519 -0
  5. package/.agents/artifacts/bench-graph-baseline.md +139 -0
  6. package/.agents/artifacts/brief-dayos-inspired-site-redo.md +89 -0
  7. package/.agents/artifacts/handoff-20261015-143202.md +109 -0
  8. package/.agents/artifacts/plan-competitor-adaptation-dashboard-graph.md +99 -0
  9. package/.agents/artifacts/session-report-2026-10-01-memory-gaps-and-website.md +94 -0
  10. package/.agents/artifacts/wave-3-sdd-ledger.md +18 -0
  11. package/.agents/artifacts/wave-4-sdd-ledger.md +18 -0
  12. package/.agents/context/architecture.md +1 -0
  13. package/.agents/context/current.md +222 -3
  14. package/.agents/context/decisions.md +4 -0
  15. package/.agents/context/deep-research-agentic-memory-evolution.md +261 -0
  16. package/.agents/context/deep-research-memory-adaptation-2026-10.md +107 -0
  17. package/.agents/context/deep-research-memory-improvement-2026-10.md +420 -0
  18. package/.agents/context/deep-research-memory-mechanisms-2026-09.md +334 -0
  19. package/.agents/context/index.md +47 -2
  20. package/.agents/context/product.md +139 -73
  21. package/.agents/context/roadmap.md +369 -7
  22. package/.agents/context/ticket-plan.md +553 -0
  23. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-design.md +198 -0
  24. package/.agents/plans/2026-10-20-wave-22-failure-attribution-negative-mining-plan.md +274 -0
  25. package/.agents/plans/EVOLUTION_PLAN.md +351 -0
  26. package/.agents/plans/local-embeddings-llama-cpp.md +37 -0
  27. package/.agents/plans/recall-eval-harness.md +31 -0
  28. package/.agents/research/ecosystem-teardown-2026-10.md +289 -0
  29. package/.agents/research/research-brief-agent-memory-migrator.md +1 -1
  30. package/.agents/research/research-brief-walrus-memory-architecture.md +189 -0
  31. package/.agents/research/retirement-audit-2026-10.md +45 -0
  32. package/.agents/standards/README.md +42 -0
  33. package/.agents/standards/frontend-astro.md +111 -29
  34. package/.agents/standards/git-workflow.md +5 -0
  35. package/.agents/standards/workflows.md +13 -0
  36. package/README.md +300 -253
  37. package/claims.json +15 -0
  38. package/dist/index.js +20784 -9111
  39. package/docs/agent-reference.md +199 -0
  40. package/docs/cli-reference.md +263 -0
  41. package/docs/mcp-tool-matrix.json +121 -0
  42. package/package.json +30 -10
  43. package/schema.json +40 -2
package/README.md CHANGED
@@ -1,7 +1,14 @@
1
- # <h1> ๐Ÿง  Muse Memory</h1>
2
-
3
1
  <div align="center">
4
2
 
3
+ <a href="#what-muse-memory-does">
4
+ <img src="./apps/website/public/brand/readme-banner.png" alt="Muse Memory โ€” persistent memory for AI coding agents that verifies itself" width="100%" />
5
+ </a>
6
+
7
+ <br />
8
+ <br />
9
+
10
+ # ๐Ÿง  Muse Memory
11
+
5
12
  ![GitHub Release](https://img.shields.io/github/v/release/harshsinghmp/musememory?style=for-the-badge&logo=github&color=2563EB)
6
13
  ![NPM Version](https://img.shields.io/npm/v/musememory?style=for-the-badge&logo=npm&color=CB3837)
7
14
  ![Bun](https://img.shields.io/badge/Bun-v1.4.0_(Latest)-black?style=for-the-badge&logo=bun)
@@ -13,70 +20,125 @@
13
20
  ![AST Graph](https://img.shields.io/badge/AST-CodeGraph_%26_Graphify-orange?style=for-the-badge&logo=diagram-project&logoColor=white)
14
21
  ![Architecture](https://img.shields.io/badge/Storage-Zero--Daemon_%2F_Local--First-0D9488?style=for-the-badge)
15
22
 
16
- ![CI Tests](https://img.shields.io/badge/Tests-502%20Passed-brightgreen?style=for-the-badge&logo=checkmarx)
23
+ ![CI Tests](https://img.shields.io/badge/Tests-1335%20Passed-brightgreen?style=for-the-badge&logo=checkmarx)
17
24
  ![Security](https://img.shields.io/badge/Security-Vibeguard_Zero--Leak-DC2626?style=for-the-badge&logo=shield)
18
- ![Agent Coverage](https://img.shields.io/badge/Agents-80+_Supported-4F46E5?style=for-the-badge&logo=openai)
25
+ ![Agent Coverage](https://img.shields.io/badge/Agents-52_Verified-4F46E5?style=for-the-badge&logo=openai)
19
26
  ![License](https://img.shields.io/badge/License-MIT-9333EA?style=for-the-badge)
20
27
 
21
- **Autonomous, Self-Organizing Cognitive Memory System for AI Agents & Agency Networks**
28
+ **Persistent, local-first memory for AI agents and the projects they work on.**
29
+
30
+ [Visit the live site](https://harshsinghmp.github.io/musememory/) ยท [Docs](https://harshsinghmp.github.io/musememory/docs) ยท [Comparison](https://harshsinghmp.github.io/musememory/compare) ยท [Agent reference](https://github.com/harshsinghmp/musememory/blob/main/docs/agent-reference.md)
22
31
 
23
32
  </div>
24
33
 
25
34
  ---
26
35
 
27
- ## ๐Ÿš€ What's New
28
-
29
- ### v2.3.0
30
- - **Autonomous Memory Optimizer (`memory optimize`)**: High-precision noise and junk pruning engine with zero-daemon auto-cadence (every 7 days or after 48h idle) and SQLite WAL defragmentation (`VACUUM;` + `PRAGMA optimize;`).
31
- - **Dashboard "โšก Optimize" Trigger**: Live visual optimization controls directly inside the Web Observability Studio (`memory ui` / `memory studio`) with real-time feedback on items pruned and bytes reclaimed.
32
- - **Concurrent Multi-Agent Workstream Tracking**: Live coordination table in `CURRENT.md` enabling multiple agents across parallel chats to monitor active tasks and target scopes without collisions.
33
- - **Clean Operational Guidelines**: Curated single-pane executive summary for humans and strict grounding/concurrency rules for AI agents.
34
-
35
- ### v2.2.0
36
- - **Unified Code & Memory Impact Analysis**: Pre-flight blast radius analysis evaluating AST callers, test suites, governing ADRs, negative warnings, and risk levels (`memory code-impact` / `muse_code_impact`).
37
- - **PR & Change Context Generator**: Automatically turns git diffs into rich, memory-grounded GitHub PR descriptions linking touched anchors and active constraints (`memory pr-context` / `muse_pr_context`).
38
- - **Interactive Code Anchor Reconciler**: Audits and repairs code anchors across memories, pruning dead references and updating structural hashes (`memory reconcile` / `muse_reconcile_anchors`).
39
- - **Latency & Quality Telemetry Suite**: Benchmarks microsecond hot caches, FTS5 BM25 search, knapsack token packing, and ROI in a clean ASCII scoreboard (`memory benchmark`).
40
- - **Expanded Agent Skills**: Shipped turnkey skills for `muse-health`, `muse-drift`, `muse-why`, `muse-sync`, and `muse-mesh`.
41
-
42
- ### v2.1.0
43
- - **Cross-Agent Knowledge Sync & P2P Gossip Protocol**: Sealed portable `SyncPacket` engine with SHA-256 integrity and zero-daemon shared filesystem gossip pool (`memory sync` / `muse_sync_*`).
44
- - **Web Observability Studio**: Embedded visual dashboard (`memory studio` / `memory ui`) with interactive 5-pillar health, ADR registry, code drift inspector, and sync controls.
45
- - **Monorepo & Multi-Repo Mesh**: Automatic workspace discovery (pnpm, npm, bun, lerna) with cross-project memory queries and shared constraint propagation (`memory mesh` / `muse_mesh_*`).
46
-
47
- ### v2.0.0
48
- - **5-Pillar Project Health Gate**: Architectural health gate evaluating store integrity, code anchors, doc-code alignment, negative sentry, and technical debt (`memory health` / `muse_health`).
49
- - **Cognitive "Why" Reasoner**: Reconstructs historical code evolution, bug workarounds, and trade-offs before refactoring (`muse_why`).
50
- - **Living Architecture Decision Records (ADRs)**: Queryable ADRs with options, consequences, native code anchors, and supersession lineage (`memory adr` / `memory_adr_record`).
51
- - **Doc โŸท Code Drift Engine**: Continuously audits documentation against AST code implementations across 6 drift states (`memory drift` / `memory_drift_audit`).
52
- - **Unified Context Orchestrator & MCP Profiles**: Single-call fused context injection with knapsack token packing (`muse_context`) and task-specific tool profiles.
53
- - **Native Structural Code Anchors**: Line-independent structural SHA-256 hashing for files, symbols, and routes.
54
- - **Scoped Promotion & Archival Lifecycle**: 3-tier promotion ladder (`local` โ†’ `project` โ†’ `global`) and cold/dormant/archived storage tiers.
36
+ ## Start here (60 seconds)
37
+
38
+ ```bash
39
+ npx musememory connect # detect your coding agents and wire the memory server into each
40
+ npx musememory doctor # confirm the store, schemas and agent wiring are healthy
41
+ ```
42
+
43
+ That is the whole setup. No account, no API key, no config file, no background
44
+ daemon โ€” the store is two plain directories (`.memory/` in your project,
45
+ `~/.memory/` globally) that you can read, diff and commit.
46
+
47
+ Then, in any session with a connected agent:
48
+
49
+ ```bash
50
+ memory context --query "how does auth work" --budget 2000
51
+ ```
52
+
53
+ **What you get:** a memory that survives the session, is checked against your
54
+ real code before it is stored, and is withheld at recall if the code it cites
55
+ has since changed.
56
+
57
+ | | |
58
+ | :--- | :--- |
59
+ | **Install** | `npx musememory connect` |
60
+ | **Requires** | Node.js โ‰ฅ 18 or Bun โ‰ฅ 1.2 โ€” nothing else |
61
+ | **Storage** | `.memory/` (project) + `~/.memory/` (global) |
62
+ | **Data leaves your machine** | Never |
63
+ | **Cost** | Free, MIT, no telemetry |
64
+
65
+ ---
66
+
67
+ ## What's new
68
+
69
+ ### v3.0.1 โ€” correctness release
70
+
71
+ Five defects found by a cross-file invariant audit, and a guarantee that the
72
+ numbers on this page are the numbers the code produces.
73
+
74
+ - **Prompt-injection channel closed**: `CURRENT.md` was written with the raw,
75
+ un-stripped constraint text while the stored memory was sanitised. Because
76
+ `CURRENT.md` is replayed into every later prompt, one captured constraint
77
+ could reach every future session. Sanitisation now happens at the sink.
78
+ - **Bi-temporal queries answered from the wrong snapshot**: the context cache
79
+ key omitted `as_of`, so "what did we believe in Q1?" could return today's
80
+ answer from a 30-second-old cache entry.
81
+ - **Access counter never accumulated**: every read reset it to its baseline,
82
+ which silently disarmed the access-frequency ranking axis.
83
+ - **Store could fail its own schema validator**: entries that failed embedding
84
+ were permanently reported as corrupt.
85
+ - **Tier token budget was declared but never enforced**: 327 tokens against a
86
+ 200-token budget.
87
+ - **Every published number is now generated from the source** and checked by a
88
+ test, so the site can no longer advertise a figure the code does not produce.
89
+
90
+ ### v3.0.0 โ€” feature release
91
+
92
+ Closed-loop failure attribution, trajectory fix-pair mining, HOT.md compounding, and LangMem logarithmic frequency ranking.
93
+
94
+ #### New capabilities
95
+ - Scoped failure attribution matching code anchors with decaying strike counters ([#313](https://github.com/harshsinghmp/musememory/pull/313))
96
+ - Trajectory fix-pair mining discovering negative lessons from agent error sequences ([#144](https://github.com/harshsinghmp/musememory/pull/144))
97
+ - Active working set compounding and candidate scoring directly from HOT.md ([#314](https://github.com/harshsinghmp/musememory/pull/314))
98
+ - Multi-channel knowledge distillation router across system, content, and health ([#324](https://github.com/harshsinghmp/musememory/pull/324))
99
+ - Pre-mutation 30-snapshot rolling ring buffer for zero-daemon recovery ([#177](https://github.com/harshsinghmp/musememory/pull/177))
100
+
101
+ #### Bug fixes
102
+ - In-lock mutation safety guards preventing bulk deletion and semantic erosion ([#50](https://github.com/harshsinghmp/musememory/pull/50))
103
+ - Strict CodeAnchor field alignment and dispute tracking type safety ([#325](https://github.com/harshsinghmp/musememory/pull/325))
104
+
105
+ #### Improvements
106
+ - LangMem logarithmic frequency rank curve with 2x application weighting ([#315](https://github.com/harshsinghmp/musememory/pull/315))
107
+ - Diff-preserving CURRENT.md checkpoint merge semantics for agent handoffs ([#324](https://github.com/harshsinghmp/musememory/pull/324))
108
+ - Constitutional immunity defending non-negotiable rules against strike decay ([#313](https://github.com/harshsinghmp/musememory/pull/313))
109
+
110
+ *For earlier releases, see the [Changelog](./CHANGELOG.md) or [GitHub Releases](https://github.com/harshsinghmp/musememory/releases).*
55
111
 
56
112
  ---
57
113
 
58
114
  ## ๐Ÿ“‘ Table of Contents
59
115
 
60
- - [๐Ÿš€ What's New](#-whats-new)
61
- - [๐Ÿ’ก What is Muse Memory? (TL;DR)](#-what-is-muse-memory-tldr)
62
- - [โœจ Key Feature Highlights](#-key-feature-highlights)
63
- - [โšก Quick Start & Installation](#-quick-start--installation)
64
- - [๐Ÿ”„ Upgrading & Self-Healing Maintenance](#-upgrading--self-healing-maintenance)
65
- - [๐Ÿง  Shipped Agent Skills (`.agents/skills/`)](#-shipped-agent-skills-agentsskills)
66
- - [๐Ÿ‘ค 5 Role Archetypes (`USER.md`)](#-5-zero-fingerprint-role-archetypes-usermd)
67
- - [๐Ÿ”Œ Full CLI Command Matrix](#-full-cli-command-matrix)
68
- - [๐Ÿ›ก๏ธ Vibeguard Zero-Leakage Protocol](#๏ธ-vibeguard-zero-leakage-protocol)
69
- - [๐Ÿงช Testing & Verification](#-testing--verification)
70
- - [๐Ÿ”ฎ Sprint & Roadmap Board](#-sprint--roadmap-board)
116
+ - [Start here (60 seconds)](#start-here-60-seconds)
117
+ - [What's new](#whats-new)
118
+ - [What Muse Memory does](#what-muse-memory-does)
119
+ - [How it works](#how-it-works)
120
+ - [Key capabilities](#key-capabilities)
121
+ - [Where your memory lives](#where-your-memory-lives)
122
+ - [๐Ÿ“– Documentation map](#-documentation-map)
123
+ - [๐Ÿ”„ Complete lifecycle](#-complete-lifecycle-install--verify--connect--uninstall)
124
+ - [๐Ÿ”„ Upgrading & self-healing](#-upgrading--self-healing-maintenance)
125
+ - [๐Ÿ‘ฅ Team & multi-member setup](#-team--multi-member-setup)
126
+ - [๐Ÿ›๏ธ System capabilities & architecture](#-system-capabilities--architecture)
127
+ - [๐ŸŒ Cognitive Studio dashboard](#-cognitive-studio-dashboard-memory-ui--memory-studio)
128
+ - [๐Ÿ”Œ CLI & MCP reference](#-cli--mcp-reference)
129
+ - [๐Ÿง  Shipped agent skills](#-shipped-agent-skills)
130
+ - [๐Ÿ‘ค 5 role archetypes](#-5-role-archetypes-usermd)
131
+ - [๐Ÿงช Testing & verification](#-testing--verification)
132
+ - [๐Ÿ”ฎ Roadmap](#-roadmap)
71
133
  - [๐Ÿ“œ License](#-license)
72
134
 
73
135
  ---
74
136
 
75
- ## ๐Ÿ’ก What is Muse Memory? (TL;DR)
137
+ ## What Muse Memory does
76
138
 
77
- Most AI chatbots and coding assistants have **"goldfish memory"**: every time you close a session, switch tasks, or start a new prompt, they forget your project invariants, coding habits, and the hard-fought bug workarounds you solved yesterday.
139
+ AI agents lose project context when a session ends. Muse Memory keeps that context on your machine, where your tools can retrieve it during the next task.
78
140
 
79
- **Muse Memory gives your AI assistants a persistent, self-organizing cognitive notebook directly on your machine.**
141
+ Store working constraints, decisions, handoffs, and verified facts in one local memory layer. SQLite handles retrieval, while readable Markdown and YAML files keep the important context inspectable in Git.
80
142
 
81
143
  ```
82
144
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
@@ -97,7 +159,7 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
97
159
  โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
98
160
  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
99
161
  โ”‚ โ”‚ Vibeguard Credential โ”‚ โ”‚ Dynamic Code Anchors โ”‚ โ”‚ Universal Migrator โ”‚ โ”‚
100
- โ”‚ โ”‚ Secret Defense โ”‚ โ”‚ & Structural Hashes โ”‚ โ”‚ (29 Engines) โ”‚ โ”‚
162
+ โ”‚ โ”‚ Secret Defense โ”‚ โ”‚ & Structural Hashes โ”‚ โ”‚ (30 Engines) โ”‚ โ”‚
101
163
  โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
102
164
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
103
165
  โ”‚ Atomic SQLite & File I/O
@@ -120,28 +182,67 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
120
182
 
121
183
  ---
122
184
 
123
- ## โœจ Key Feature Highlights
185
+ ## How it works
186
+
187
+ Three steps, on a loop:
188
+
189
+ 1. **Remember it** โ€” when your assistant makes a decision or fixes a bug, Muse
190
+ saves a short note about what changed and why.
191
+ 2. **Check it** โ€” before the note is stored, Muse confirms the file or function
192
+ it mentions actually exists. Citations are structural fingerprints, not line
193
+ numbers, so a refactor does not silently break the note.
194
+ 3. **Hand it back** โ€” next time you start work, Muse returns the notes that fit
195
+ the task, sized to your token budget, not the whole archive.
196
+
197
+ If a saved fact no longer matches your code, Muse leaves it out and says so,
198
+ rather than serving it as if it were still true.
199
+
200
+ ---
201
+
202
+ ## Key capabilities
124
203
 
125
204
  - ๐Ÿ‘ค **Persona & Style Grounding (`USER.md`)**: Configures your role (`developer`, `designer`, `marketer`, `casual`, `custom`) and communication preferences so AI models write code that matches your style.
126
205
  - ๐Ÿ“ **Real-Time Active Constraints (`CURRENT.md`)**: Bi-temporal working constraints and invariant tracking synchronized on every mutation to eliminate amnesia during task handoffs.
127
206
  - ๐Ÿ’พ **SQLite Primary + Dual-Persisted YAML Mirror**: Sub-millisecond queries via SQLite with transparent human-readable `.yaml` files in `.memory/memories/` for seamless Git diffs.
128
207
  - โš–๏ธ **Token Knapsack Retrieval**: Multi-factor scoring (applicability, verification bonus, AST graph overlap, time decay, due date urgency) tightly packed under prompt token ceilings.
208
+ - ๐Ÿงญ **Optional Local Semantic Recall (`memory embed`)**: Point `retrieval.embedderUrl` at any OpenAI-compatible `/v1/embeddings` endpoint (llama.cpp server, Ollama, or hosted) to add a semantic cosine dimension to ranking. Embeddings are cached as float32 blobs inside SQLite, so nothing changes and no network call happens until you configure an endpoint.
129
209
  - ๐ŸŒ **Pluggable AST CodeGraph & Symbol Indexing**: Native CodeGraph & Graphify integration that indexes codebase AST symbols, auto-tags memories, and awards graph overlap bonuses.
130
210
  - ๐ŸŒณ **Hierarchical Tree Retrieval & Progressive Disclosure**: Sharded tree partitions with 3-tier progressive disclosure (`L1` abstracts, `L2` summaries, `L3` full context) for massive knowledge bases.
131
211
  - ๐Ÿ“š **Obsidian Markdown Wiki & Entity Graph Compiler**: Dual-persistence knowledge compounding compiling linked Markdown pages (`wiki/concepts/`, `wiki/entities/`) with bidirectional `[[wikilinks]]`.
132
212
  - ๐Ÿ›ก๏ธ **Vibeguard Zero-Leakage Secret Scanner**: Regex-powered memory defense intercepting and rejecting API keys, AWS credentials, private keys, database URIs, and passwords before writes.
133
- - ๐Ÿ”Œ **Zero-Permission Auto-Wiring (80+ Agents)**: Automatically detects and wires Claude Code, Cursor, Antigravity, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.
134
- - ๐Ÿ”„ **Universal Memory Migrator (29 Engines)**: One-click migration from Letta, Mem0, Supermemory, Cognee, Beads, Mnemosyne, GBrain, and more with state preservation.
213
+ - ๐Ÿ”Œ **Zero-Permission Auto-Wiring (52 Agents)**: Automatically detects and wires Claude Code, Cursor, Antigravity, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.
214
+ - ๐Ÿ”„ **Universal Memory Migrator (30 Engines)**: One-click migration from Letta, Mem0, Supermemory, Cognee, Beads, Mnemosyne, GBrain, and more with state preservation.
135
215
  - ๐ŸŽจ **Cognitive Studio Visual Dashboard (`memory ui`)**: Embedded zero-dependency web interface featuring 3D force-directed knowledge graphs, live `CURRENT.md` monitor, wiki reader, and persona editor.
136
216
  - โฐ **Proactive Nudges & Routines Scheduler**: Cron-invoked daily briefings, staleness policy tracking, and ambient open-loop trackers with zero resident background daemons.
137
217
 
138
218
  ---
139
219
 
140
- ## โšก Quick Start & Installation
220
+ ## Where your memory lives
221
+
222
+ Everything Muse knows is a folder you can open, read, diff, back up, or commit.
223
+
224
+ ```
225
+ .memory/ # project scope โ€” travels with your repo
226
+ โ”œโ”€โ”€ memory.db # SQLite: memories, anchors, graph edges, audit
227
+ โ”œโ”€โ”€ memories/ # one YAML file per memory โ€” plain text, reviewable
228
+ โ”œโ”€โ”€ CURRENT.md # active constraints, injected every session
229
+ โ”œโ”€โ”€ USER.md # your persona and working preferences
230
+ โ”œโ”€โ”€ observations.jsonl # append-only event log the harvester mines
231
+ โ”œโ”€โ”€ audit.jsonl # tamper-evident write log
232
+ โ””โ”€โ”€ sync_pool/ # zero-daemon shared gossip pool
233
+ ~/.memory/ # global scope โ€” preferences that follow you
234
+ ```
235
+
236
+ There is no server, no port, and no service to keep alive. Delete the folder
237
+ to delete the memory.
238
+
239
+ ---
240
+
241
+ ## Start with one command
141
242
 
142
243
  > [!TIP]
143
- > ### โšก Instant 5-Second Setup (Zero-Install NPX / BunX)
144
- > **No global installation required.** Set up your memory system and wire your AI agents with a single command:
244
+ > ### Install without a global package
245
+ > Set up the memory store and connect your local AI agents with one command:
145
246
  >
146
247
  > ```bash
147
248
  > npx musememory install
@@ -175,8 +276,39 @@ git clone https://github.com/harshsinghmp/musememory.git && cd musememory
175
276
  docker build -t musememory .
176
277
  ```
177
278
 
178
- > [!NOTE]
179
- > ### ๐Ÿ“Š How does Muse Memory compare to other solutions?
279
+ ---
280
+
281
+ ## ๐Ÿ“– Documentation map
282
+
283
+ Two layers, on purpose. **Human docs** are narrative and explain *why*.
284
+ **Agent docs** are contracts: exact commands, exact tool names, exact failure
285
+ behaviour, with nothing to interpret. An agent should never have to read a
286
+ prose paragraph to learn a flag name.
287
+
288
+ ### For agents โ€” read these
289
+
290
+ | Document | What it gives you |
291
+ | :--- | :--- |
292
+ | **[Agent reference](docs/agent-reference.md)** | The contract: install, file layout, mandatory session protocol, trust gates, failure semantics. |
293
+ | **[CLI & MCP reference](docs/cli-reference.md)** | Every command and every MCP tool, generated from the source. |
294
+ | **[`mcp-tool-matrix.json`](docs/mcp-tool-matrix.json)** | The tool list as JSON, for programmatic consumption. |
295
+ | **[`claims.json`](claims.json)** | Every countable claim, generated from `src/` โ€” tool, platform and test counts. |
296
+ | **[`llms.txt`](https://harshsinghmp.github.io/musememory/llms.txt)** | The website, for agents. `llms-full.txt` is the whole site as plain text. |
297
+
298
+ ### For humans
299
+
300
+ | Guide | Intent & Framework | Target Audience |
301
+ | :--- | :--- | :--- |
302
+ | ๐Ÿง  **[Core Concepts & Architecture](docs/concepts.md)** | **ACCA Framework**: Explains the guarded 7-state lifecycle machine, dual-scope engine, knapsack scoring, and zero-daemon architecture. | Tech Leads, Architects, Evaluators |
303
+ | ๐Ÿ›ก๏ธ **[Failure Attribution & Negative Mining](docs/failure-attribution-and-negative-mining.md)** | **QUEST Framework**: Scoped attribution, decaying strikes, trajectory fix-pair mining, HOT.md compounding, and logarithmic frequency ranking. | AI Engineers, Systems Architects |
304
+ | ๐Ÿ› ๏ธ **[Developer Daily User Guide](docs/user-guide.md)** | **QUEST Framework**: The 3-phase daily pair-programming loop (`/muse-ground` โ†’ `CURRENT.md` โ†’ `/muse-capture`). | Solo Developers, Daily AI Coders |
305
+ | โšก **[Retrieval Performance & Guardrails](docs/retrieval-performance-and-limits.md)** | **QUEST Framework**: WeakMap token sets, memoized runtime anchors, dirty-gating, limit clamping, and dry-run safety. | Platform Engineers, AI Architects |
306
+ | ๐Ÿ›๏ธ **[Living Architecture & Drift Auditing](docs/living-architecture-and-drift.md)** | **ACCA Framework**: Binding ADRs to line-independent code anchors, write-time `base_path` normalization, and pure read-path drift sentry. | System Architects, Tech Leads |
307
+ | โšก **[Real-Time Daemon & Observability](docs/daemon-and-observability.md)** | **QUEST Framework**: Real-time SSE event hub (`memory daemon`), CI upgrade gates (`--check`, `--strict`), and PageIndex depth parameters. | Swarm Engineers, DevOps, Builders |
308
+ | ๐Ÿ‘ฅ **[Team Quickstart & Deployment Guide](docs/team-getting-started.md)** | Single-host server deployment, systemd/Docker setups, and per-editor client recipes (Cursor, Opencode, Claude Code, Antigravity, Windsurf). | Engineering Managers, Team Leads |
309
+ | ๐Ÿ›๏ธ **[Team Slice Wiring & Architecture](docs/architecture/team-slice-wiring.md)** | Technical deep-dive into in-process SQLite WAL vs corrupted network mounts. | Infrastructure Engineers, Systems Architects |
310
+ | ๐Ÿ“Š **[Capability Comparison](https://harshsinghmp.github.io/musememory/compare)** | 14-capability comparison of local-first memory against vector stores, graph platforms and session search. | Decision Makers, Evaluators |
311
+
180
312
  ---
181
313
 
182
314
  ## ๐Ÿ”„ Upgrading & Self-Healing Maintenance
@@ -196,7 +328,7 @@ npx musememory upgrade
196
328
  #### What `memory upgrade` automatically handles:
197
329
  1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and pulls the latest published binary.
198
330
  2. **Self-Healing Storage Repair**: Recovers missing `.memory/`, `CURRENT.md` constraints, or `USER.md` persona files if corrupted or deleted.
199
- 3. **80+ Agent Platform Re-Discovery**: Scans for newly installed coding agents (Cursor, Claude Code, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.) and auto-wires them with zero permissions.
331
+ 3. **52 Agent Platform Re-Discovery**: Scans for newly installed coding agents (Cursor, Claude Code, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.) and auto-wires them with zero permissions.
200
332
  4. **AST Symbol Graph Re-Indexing**: Re-synchronizes CodeGraph/Graphify symbol caches under `.memory/graph-symbols.json`.
201
333
 
202
334
  ---
@@ -212,9 +344,15 @@ npx musememory upgrade
212
344
  | **NPX** (Zero-Install) | `npx musememory@latest upgrade` | `npx musememory doctor` |
213
345
 
214
346
  ```bash
215
- # Check if updates are available without applying
347
+ # Check if updates are available without applying (exits 0 if up to date, 1 if registry fails)
216
348
  memory upgrade --check
217
349
 
350
+ # Enforce up-to-date installation in CI pipelines (exits 1 if update is available)
351
+ memory upgrade --check --strict
352
+
353
+ # Preview upgrade actions in dry-run mode
354
+ memory upgrade --dry-run
355
+
218
356
  # Force re-installation and complete platform re-wiring
219
357
  memory upgrade --force
220
358
  ```
@@ -244,7 +382,7 @@ npx musememory stats
244
382
  npx musememory briefing
245
383
  ```
246
384
 
247
- ### 3๏ธโƒฃ Connect Coding Agents (80+ Platforms)
385
+ ### 3๏ธโƒฃ Connect Coding Agents (52 Platforms)
248
386
  ```bash
249
387
  # Scan workstation for installed AI coding agents
250
388
  npx musememory agents
@@ -258,6 +396,10 @@ npx musememory connect cursor
258
396
  npx musememory connect antigravity
259
397
  npx musememory connect windsurf
260
398
  npx musememory connect opencode
399
+
400
+ # Claude Code lives under ~/.claude*, so it needs an explicit harness opt-in.
401
+ # Without this flag the Claude config is reported as skipped and nothing is written.
402
+ npx musememory connect claude-code --harness claude
261
403
  ```
262
404
 
263
405
  ### 4๏ธโƒฃ Clean Uninstallation & Removal
@@ -268,7 +410,7 @@ npx musememory connect opencode
268
410
  Muse Memory can be cleanly and completely removed with zero trace left on your machine.
269
411
 
270
412
  #### Step 1: Unwire Coding Agents (Zero-Trace MCP Cleanup)
271
- Remove the memory MCP server configuration from all 80+ detected agent config files (`cursor`, `claude-code`, `antigravity`, `windsurf`, `opencode`, `codex`, etc.):
413
+ Remove the memory MCP server configuration from every detected agent config file (`cursor`, `claude-code`, `antigravity`, `windsurf`, `opencode`, `codex`, etc.):
272
414
 
273
415
  ```bash
274
416
  # Preview changes before modifying any configuration
@@ -320,6 +462,42 @@ If you installed the pre-commit transcript harvester hook or injected agent prom
320
462
 
321
463
  ---
322
464
 
465
+ ## ๐Ÿ‘ฅ Team & Multi-Member Setup
466
+
467
+ Deploy a shared persistent cognitive memory layer across your entire engineering team. All team members' coding agents (Cursor, Opencode, Claude Code, Antigravity, Windsurf) connect to a single host server running in-process SQLite over **MCP Streamable HTTP (2025-06-18)** with Bearer token authentication.
468
+
469
+ ```
470
+ Central Team Server (`team.db` + `CURRENT.md`)
471
+ โ–ฒ
472
+ โ”‚ MCP Streamable HTTP (Bearer Auth)
473
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
474
+ Cursor Opencode Antigravity Claude Code
475
+ ```
476
+
477
+ ### 1-Line Team Server Start
478
+ Run on your team's internal VM, build server, or workstation:
479
+ ```bash
480
+ # Start server with individual or shared Bearer auth tokens
481
+ musememory serve --port 31338 --host 0.0.0.0 --tokens alice:tok_alice_123,bob:tok_bob_456
482
+ ```
483
+
484
+ ### 1-Line Client Recipe Generator
485
+ Generate ready-to-paste configurations tailored to each engineer's specific editor:
486
+ ```bash
487
+ # Interactive editor selector
488
+ musememory connect
489
+
490
+ # Or output directly into console:
491
+ musememory connect --recipe --endpoint http://192.168.1.50:31338/mcp --token tok_alice_123
492
+ ```
493
+
494
+ ### Complete Getting Started & Architecture Guide
495
+ For full server setup (systemd service, Docker, reverse proxy), editor-specific client JSON configs, team memory scoping rules (`team.db` vs personal `tenant_<id>.db`), and prompt injection defenses, see:
496
+ - ๐Ÿ‘‰ **[Team Quickstart & Deployment Guide](docs/team-getting-started.md)** โ€” Step-by-step setup for Team Leads and Engineers.
497
+ - ๐Ÿ‘‰ **[Team Slice Wiring & Architecture Spec](docs/architecture/team-slice-wiring.md)** โ€” Technical deep dive into in-process SQLite vs networked mounts.
498
+
499
+ ---
500
+
323
501
  ## ๐Ÿ›๏ธ System Capabilities & Architecture
324
502
 
325
503
  ### 1. Dual-Scope Storage (Local vs Global)
@@ -345,6 +523,8 @@ Retrieval dynamically ranks knowledge using a calibrated multi-factor formula:
345
523
  $$\text{Score} = 1.0 \times \text{Applicability} + \text{StatusBonus} + \text{VerificationBonus} + \text{GraphBonus} + \text{SalienceBonus} + 0.3 \times e^{-\frac{\Delta t}{90\text{ days}}}$$
346
524
  The engine greedily packs ranked memories up to the requested `--token-budget` to guarantee zero prompt overflow.
347
525
 
526
+ When a local embedder is configured (`retrieval.embedderUrl`), a semantic cosine dimension (`0.5 ร—` cosine similarity) joins the ranking, so paraphrases match even without shared trigrams. Leave the embedder unset and ranking is identical to the lexical behaviour above โ€” no network calls, no new dependency.
527
+
348
528
  ### 4. Real-Time `CURRENT.md` Synchronization & Session Handoff
349
529
  - Active constraint memories automatically mirror into `CURRENT.md`.
350
530
  - In-flight task states, agent checkpoints, and active loops persist across terminal restarts, context compactions, and sudden interruptions.
@@ -354,7 +534,7 @@ The engine greedily packs ranked memories up to the requested `--token-budget` t
354
534
  - **Named Entity Extraction (`memory entities`)**: Automatically extracts persons, products, organizations, tools, and code symbols with co-occurrence edge weights.
355
535
  - **PageIndex Reasoning Engine (`memory pageindex`)**: Indexes unstructured documents into hierarchical reasoning trees.
356
536
 
357
- ### 6. Universal Migration Engine (29 Memory Formats)
537
+ ### 6. Universal Migration Engine (30 Memory Formats)
358
538
  Auto-detects and ingests existing memory stores across 29 external engines:
359
539
  ```bash
360
540
  # Auto-detect all external memory stores on your machine
@@ -366,7 +546,7 @@ memory migrate --provider mem0
366
546
  memory migrate --provider beads
367
547
  memory migrate --all
368
548
  ```
369
- > See [`musememory-comparison.html`](musememory-comparison.html) for the full table-free 30-system architectural dossier.
549
+ > See the live [capability comparison](https://harshsinghmp.github.io/musememory/compare) for the published page, and [`docs/research/musememory-comparison.html`](docs/research/musememory-comparison.html) for the research survey dossier (68 systems).
370
550
 
371
551
  ---
372
552
 
@@ -395,141 +575,63 @@ Navigate to `http://localhost:2222` to access:
395
575
 
396
576
  ---
397
577
 
398
- ## ๐Ÿ“– Deep Technical References & Documentation
578
+ ## ๐Ÿ”Œ CLI & MCP reference
399
579
 
400
580
  <details>
401
- <summary><b>๐Ÿ”Œ Complete MCP Tool Reference (61 Tools across 6 Profiles)</b> โ€” <i>Click to expand</i></summary>
581
+ <summary><b>๐Ÿ”Œ CLI & MCP reference (generated from source)</b> โ€” <i>Click to expand</i></summary>
402
582
 
403
- When registered as an MCP server, `musememory` exposes the following native tools (filtered dynamically into role-tailored profiles to eliminate tool bloat):
583
+ The complete command and tool surface is **generated from `src/`**, not
584
+ transcribed by hand, so it cannot drift:
404
585
 
405
- | MCP Tool | Execution Phase | Description |
406
- | :--- | :--- | :--- |
407
- | `muse_context` | **Flagship Fusion** | Single-call fused orchestrator combining search, active file, symbol, error messages, and task intent under strict knapsack token budgets. |
408
- | `muse_health` | **Quality Gate** | 5-Pillar Project Health Gate: audits store integrity, code anchors, doc/code alignment, anti-pattern sentry, and technical debt with A-F grading and pass/fail status. |
409
- | `muse_why` | **Cognition / "Why"** | Explains *why* code was designed the way it is by reconstructing past ADRs, bug fixes, trade-offs, and timeless rules. |
410
- | `muse_bug_clusters` | **Fragility Hotspots** | Categorizes recurring bugs into 5 root causes with subsystem fragility scoring. |
411
- | `muse_tech_debt` | **Technical Debt** | Scans code and memory for TODO/FIXME markers, unsafe `as any` casts, and drifted anchors. |
412
- | `muse_memory_for_code`| **Code-to-Memory** | Queries all memories, ADRs, constraints, and bugs associated with a code file and symbol. |
413
- | `muse_code_for_memory`| **Memory-to-Code** | Resolves all native code anchors and affected source files for a given memory entry. |
414
- | `memory_adr_record` / `list` | **Architecture Decisions** | Records and queries first-class Architecture Decision Records with native code anchors and options considered. |
415
- | `memory_drift_audit` | **Drift Engine** | Audits bi-directional documentation $\longleftrightarrow$ code drift across 6 alignment states (`DOCUMENTED`, `IMPLEMENTED`, `PARTIAL`, `CONFLICTING`, `STALE`, `MISSING`). |
416
- | `memory_capture_negative` | **Negative Sentry** | Records failed approaches, anti-patterns, and reproduction commands to prevent repeating mistakes. |
417
- | `memory_promote_scope` | **Scoped Promotion** | Promotes memory along 3-tier ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`) with 5ร— repeated success policy and universal generalization. |
418
- | `memory_archive` / `rehydrate` | **Archival Lifecycle** | Evaluates and manages `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with query rehydration. |
419
- | `memory_lifecycle_stats` / `sweep` | **Lifecycle Sweeper** | Reports store-wide lifecycle statistics and executes sweep transitions for aging memories. |
420
- | `anchor_create` / `verify` / `audit` | **Code Identity** | Creates, verifies, and audits line-independent structural code anchors. |
421
- | `muse_sync_broadcast` / `ingest` | **P2P Gossip Mesh** | Broadcasts and ingests portable sealed SyncPackets with deduplication and contradiction flagging. |
422
- | `muse_sync_status` / `pool` | **Sync Coordination** | Tracks peer vector clocks and synchronizes memories bidirectionally via shared drop-directory pool. |
423
- | `muse_mesh_status` | **Monorepo Topology** | Discovers monorepo workspaces and multi-repo sibling groups with package dependencies and stores. |
424
- | `muse_mesh_query` | **Cross-Project Query** | Queries memories across the entire workspace mesh with origin package provenance tags. |
425
- | `muse_mesh_audit` | **Contract Verification** | Audits cross-package dependency contracts, entrypoint exports, and cross-repo code anchors. |
426
- | `muse_mesh_link` | **Mesh Linking** | Explicitly links or unlinks external repository paths into the workspace mesh registry. |
427
- | `profile_list` / `profile_switch` | **Tool Management** | Lists and switches task-focused MCP profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`). |
428
- | `get_context` | **Session Start** | Fetches Top-$K$ ranked memories, `USER.md` profile, active `CURRENT.md` constraints, and supports `--tier 0|1|2`. |
429
- | `search` | **Investigation** | Searches memory units with query, token budget, project, type, and verification filters. |
430
- | `memory_current` | **Constraints** | Reads or appends active project working constraints (`CURRENT.md`). |
431
- | `memory_get_user_profile` | **Context Loading** | Reads active `USER.md` persona and communication preferences. |
432
- | `memory_set_user_profile` | **Preferences** | Updates `USER.md` profile with inline secret defense. |
433
- | `memory_capture` | **During Fixes** | Saves a memory entry with inline Vibeguard secret inspection. |
434
- | `memory_confirm` | **Decision Approval** | Promotes candidate insight to confirmed status. |
435
- | `memory_supersede` | **Refactoring** | Marks outdated knowledge superseded by a confirmed replacement. |
436
- | `memory_link` | **Graph Building** | Connects related memories bidirectionally. |
437
- | `memory_mark_stale` | **Deprecation** | Flags decaying knowledge with deprecation rationale. |
438
- | `memory_reject` | **Hypothesis Refutation** | Marks invalidated hypotheses as rejected. |
439
- | `memory_delete` | **Purge** | Permanently deletes an entry and records audit ledger log. |
440
- | `memory_source_add` / `list` | **Provenance** | Records external docs/RFCs/URLs into `.memory/sources.json` and queries sources. |
441
- | `memory_claim_record` / `list` | **Claim Ledger** | Records evidence-backed claims tagged with `[RAW]`, `[FETCH]`, `[SEARCH]`, `[INFER]`. |
442
- | `memory_freeze_run` / `list` | **Execution Snapshots** | Freezes immutable task snapshots with file inventory and SHA-256 memory hashes. |
443
- | `memory_prompt_list` / `get` / `run` | **Prompt Templates** | Manages and executes native structured prompt templates with live context injection. |
444
- | `memory_rollup` | **Temporal Compounding** | Aggregates atomic memories into weekly, monthly, and quarterly rollups and updates `HOT.md`. |
445
- | `memory_loop_record` / `status` | **Gauntlet Loops** | Multi-agent iteration ledger and plateau/regression detector (`.memory/iterations.jsonl`). |
446
- | `memory_verify_strict` | **Integrity Gate** | Zero-tolerance audit verifying secrets, referential links, wikilinks, claims, and candidates. |
447
- | `memory_tree_search` | **Tree Retrieval** | Hierarchical reasoning search across partitioned memory shards. |
448
- | `memory_wiki_compile` | **Wiki Compiler** | Compiles confirmed memories into Obsidian-compatible Markdown pages. |
449
- | `memory_wiki_search` / `get` | **Wiki Reading** | Searches and reads compiled concept and entity wiki pages. |
450
- | `memory_entities_search` / `get` | **Entity Graph** | Searches extracted entities and inspects co-occurrence strengths. |
451
- | `memory_pageindex_index` | **Doc Indexing** | Builds a hierarchical reasoning tree from document content. |
452
- | `memory_pageindex_search` | **Doc Search** | Searches PageIndex document tree with reasoning explanations. |
453
- | `memory_pageindex_import` | **Doc Knowledge** | Imports PageIndex search insights directly into memory units. |
454
- | `memory_search_transcripts` | **History Search** | Full-text search over past `.jsonl` transcripts with dialogue context windows. |
455
- | `memory_harvest` | **Session End** | Distills conversation turns into structured fix/outcome units. |
456
- | `memory_import_transcript` | **Transcript Sync** | Ingests `.jsonl` transcript and auto-binds memories to session nodes. |
457
- | `memory_audit` | **Governance** | Queries the append-only operational audit ledger. |
458
- | `memory_detect_agents` | **Onboarding** | Scans workstation for 80+ coding agent installations. |
459
- | `memory_connect` | **Setup** | Auto-wires MCP server into detected installed agents with zero permissions. |
460
- | `memory_detect_providers` | **Migration** | Scans machine for 29 external memory formats. |
461
- | `memory_migrate` | **Migration** | Ingests external memories with state preservation and secret scrubbing. |
462
- | `memory_export` / `import` | **Team Sharing** | Exports and imports portable JSON memory snapshots. |
463
- | `memory_validate` | **Integrity Check** | Verifies database integrity and scans for credential leaks. |
464
- | `memory_settings_get` / `set` | **Configuration** | Reads and updates unified global or project configuration settings. |
465
- | `graph_status` | **AST Graph** | Inspects CodeGraph/Graphify symbol overlap provider status. |
466
- | `graph_index` | **AST Graph** | Indexes AST symbol graph and caches in `.memory/graph-symbols.json`. |
586
+ | Document | Contents |
587
+ | :--- | :--- |
588
+ | **[`docs/cli-reference.md`](docs/cli-reference.md)** | Every CLI command with its flags, and every MCP tool with its required parameters โ€” grouped by purpose. |
589
+ | **[`docs/mcp-tool-matrix.json`](docs/mcp-tool-matrix.json)** | The MCP tool list as JSON, for programmatic consumption. |
590
+ | **[`docs/agent-reference.md`](docs/agent-reference.md)** | The contract an agent must follow: session protocol, trust gates, failure semantics. |
591
+ | **[`claims.json`](claims.json)** | Every countable claim, generated from `src/`. |
467
592
 
468
- </details>
469
-
470
- <details>
471
- <summary><b>๐Ÿ’ป Full CLI Command Matrix (47 Commands)</b> โ€” <i>Click to expand</i></summary>
593
+ ### The commands you will actually use
472
594
 
473
595
  ```bash
474
- memory <command> [arguments] [flags] # alias: musememory
596
+ memory context [query] --token-budget N # top-ranked context for prompt injection
597
+ memory search <query> --limit N # ranked search with a score breakdown
598
+ memory capture "<text>" --project P # persist a memory (secret-scanned, citation-verified)
599
+ memory propose "<text>" --project P # propose a candidate without confirming it
600
+ memory confirm <id> # promote a candidate to confirmed
601
+ memory supersede <old_id> --with <new_id> # replace outdated knowledge, keep lineage
602
+ memory current get | set "<text>" # read/write active constraints
603
+ memory link <id> --related <id1,id2> # bidirectional relation between entries
604
+ memory audit [--operation OP] # query the append-only audit ledger
605
+ memory doctor # full ecosystem health diagnostic
606
+ memory health # 5-pillar health gate with a letter grade
607
+ memory verify <id> --strict # run an entry's verification command
608
+ memory harvest "<text>" --project P # distil a turn into a fix/decision unit
609
+ memory wiki compile # compile memories into an Obsidian wiki
610
+ memory benchmark # measured speed, quality and token-economy report
475
611
  ```
476
612
 
477
- | Command | Arguments / Flags | Description |
478
- | :--- | :--- | :--- |
479
- | `health` | `[--json] [--global]` | **Unified 5-Pillar Project Health Gate**: audits Store Integrity, Code Anchors, Drift, Sentry, and Tech Debt with A-F grading and pass/fail gate. |
480
- | `studio` / `ui` | `[--port N] [--global]` | **Web Observability Studio**: visual dashboard with 5-pillar health, ADR drift, why reasoner, and live mesh (default port: `2222`). |
481
- | `sync` | `[status\|broadcast\|ingest\|pool] [flags]` | **P2P Gossip Mesh**: peer vector clock status, packet export, ingestion, and shared pool gossip sync. |
482
- | `mesh` | `[overview\|query\|check\|link\|unlink\|propagate] [flags]` | **Monorepo & Multi-Repo Mesh**: workspace discovery, cross-project memory query, and contract drift audit. |
483
- | `adr` | `[record\|list\|supersede] [args]` | **Architecture Decision Records**: record, list, and supersede living architecture decisions. |
484
- | `anchor` | `[create\|verify\|audit] [args]` | **Code Anchors**: create, verify, and audit line-independent structural code anchors. |
485
- | `install` | `[path] [--global]` | **One-line complete setup**: initializes `.memory/`, `USER.md`, and auto-wires coding agents. |
486
- | `doctor` | `[path] [--global]` | **System diagnostic**: checks SQLite primary, schemas, secrets, and MCP connections. |
487
- | `uninstall` | `[agent] [--purge] [--dry-run]` | **Clean uninstaller**: unwires MCP configs (and optionally purges `.memory/`). |
488
- | `init` | `[path] [--legacy] [--global]` | Initialize `.memory/` directory and SQLite database. |
489
- | `user` | `[get\|init\|set] [args] [--global]` | Manage `USER.md` persona & preferences across 5 clean archetypes. |
490
- | `connect` | `[agent] [--all] [--force] [--dry-run]` | Auto-wire MCP into detected installed agents with zero permissions. |
491
- | `agents` | *(none)* | Scan workstation for 80+ coding agents (Cursor, Claude Code, Antigravity, etc.). |
492
- | `detect` | *(none)* | Scan workstation and local workspace for 29 external memory systems. |
493
- | `migrate` | `[--provider P] [--all] [--dry-run] [--overwrite]` | Migrate memories into Muse Memory preserving active/archived state. |
494
- | `context` | `[query] [--token-budget N] [--limit N] [--tier 0\|1\|2]` | Retrieve Top-$K$ ranked active context for prompt injection. |
495
- | `search` | `<query> [--limit N] [--token-budget N] [--type T]` | Ranked multi-factor token search with score breakdown. |
496
- | `search-transcript` | `<query> [file.jsonl] [--window N]` | Full-text search past transcripts with dialogue context windows. |
497
- | `learn` / `sync-chats` | `[--confirm] [--force] [--max N]` | **Universal auto-learner**: auto-discovers and distills memories from all agent chats across host machine. |
498
- | `harvest` | `<text\|file> --project P [--confirmed]` | Distill conversation turns into structured fix/decision memory units. |
499
- | `import-transcript` | `<file.jsonl> [--project P] [--confirmed]` | Ingest raw `.jsonl` session transcripts from coding agents. |
500
- | `capture` / `propose` | `<text> --project P [--title T] [--type T]` | Propose a memory entry with inline Vibeguard secret inspection. |
501
- | `recall` | `<query> [--limit N] [--token-budget N]` | Rich recall displaying verification levels and related graph links. |
502
- | `confirm` | `<id> [--global]` | Promote `candidate`, `disputed`, or `stale` entry to `confirmed`. |
503
- | `supersede` | `<old_id> --with <new_id>` | Mark old entry superseded by new confirmed replacement. |
504
- | `mark-stale` | `<id> [--reason <text>]` | Mark an entry stale with deprecation rationale. |
505
- | `reject` | `<id> [--global]` | Mark an entry rejected. |
506
- | `delete` | `<id> [--reason <text>]` | Permanently delete a memory entry and record audit event. |
507
- | `source` | `add\|list\|show <url> [--title T] [--type T]` | Manage external documentation and URLs in provenance Source Ledger (`.memory/sources.json`). |
508
- | `claim` | `record\|list\|show <text> [--confidence RAW\|FETCH\|SEARCH\|INFER]` | Record and query verifiable claims connected to sources (`.memory/claims.json`). |
509
- | `freeze` | `--task <task.md\|text> [--run-id R]` | Capture immutable execution snapshot with file inventory and SHA-256 memory hashes. |
510
- | `prompt` | `list\|show\|run <name> [--args k=v,...]` | Manage and run structured prompt templates with live context injection. |
511
- | `rollup` | `--period week\|month\|quarter [--date YYYY-MM-DD]` | Multi-scale temporal compounding and `.memory/HOT.md` working memory cache compiler. |
512
- | `loop` | `record\|status\|clear` | Multi-agent Gauntlet iteration ledger and plateau/regression detector. |
513
- | `verify` | `<id> [--timeout S] [--strict]` | Execute a fix entry's test command or run full strict integrity gate. |
514
- | `audit` | `[--operation OP] [--entry-id ID] [--limit N]` | Query append-only operational audit trail (`.memory/audit.jsonl`). |
515
- | `link` | `<id> --related <id1,id2>` | Synchronize bidirectional relation links between entries. |
516
- | `export` / `import` | `[--out <file.json>]` / `<file.json>` | Export and import portable JSON memory snapshots. |
517
- | `list` / `ls` | `[--status S] [--type T] [--project P]` | List memory entries with multi-field status and type filtering. |
518
- | `stats` | `[--global]` | Breakdown statistics of total memories, status, and type metrics. |
519
- | `briefing` | `[--limit N] [--global]` | Active summary of recent entries, status counts, and due items. |
520
- | `nudge` | `[--global]` | Proactive attention list: overdue entries, stale policies, open loops. |
521
- | `routine` | `run <name>` / `install [name]` | Execute `.memory/routines.yaml` steps or print crontab lines. |
522
- | `wiki` | `compile\|list\|show <slug>` | Compile and browse Obsidian-compatible Markdown wiki pages. |
523
- | `entities` | `list\|show <id>\|related <id>` | Inspect extracted knowledge graph entities and co-occurrence weights. |
524
- | `settings` | `get\|set\|reset\|export\|import` | Manage unified settings across retrieval, wiki, PageIndex, and UI. |
525
- | `current` | `get` / `set <text> --project P` | Read or append hard constraints in `.memory/CURRENT.md`. |
526
- | `graph` | `status` / `index` | Query active CodeGraph provider status or index AST symbol map. |
527
- | `mcp` | *(none)* | Start stdio MCP server (Protocol 2024-11-05). |
613
+ ### The MCP tools you will actually use
614
+
615
+ | Tool | When |
616
+ | :--- | :--- |
617
+ | `get_context` | **First turn of any session.** Persona, constraints, top-K memories. |
618
+ | `muse_context` | Task-shaped fused context (constraints + memories + negative lessons + anchors). |
619
+ | `memory_capture` | Right after a fix, a decision, or a new constraint. |
620
+ | `memory_supersede` | When knowledge is replaced โ€” never `delete`. |
621
+ | `search` / `memory_tree_search` | Investigating what is already known. |
622
+ | `muse_why` | Before a refactor: why is the code like this? |
623
+ | `muse_code_impact` | Before touching a file: what depends on it? |
624
+ | `memory_audit` | When you need to know who changed what, and when. |
625
+ | `muse_profile_list` | Which tools are exposed in the current profile. |
626
+
627
+ Tools are exposed through 7 task-focused profiles (`core`, `coding`,
628
+ `debugging`, `review`, `architecture`, `maintenance`, `full`) so an agent is
629
+ never handed the whole surface. Select one with `MUSE_MCP_PROFILE`.
528
630
 
529
631
  </details>
530
632
 
531
633
  <details>
532
- <summary><b>๐Ÿง  Shipped Agent Skills (<code>.agents/skills/</code>)</b> โ€” <i>Click to expand</i></summary>
634
+ <summary><b>๐Ÿง  Shipped agent skills (<code>.agents/skills/</code>)</b> โ€” <i>Click to expand</i></summary>
533
635
 
534
636
  Muse Memory ships with 11 turnkey Agent Skills designed for coding agents (Claude Code, Cursor, Antigravity, OpenCode, Codex, Gemini CLI, etc.) under `.agents/skills/`:
535
637
 
@@ -580,86 +682,31 @@ memory user set "- Prefers TypeScript, Bun, and ultra terse responses"
580
682
 
581
683
  ```bash
582
684
  bun install
583
- bun test # 497 passed across 84 test files (2190 assertions)
685
+ bun test # 1335 pass, 0 fail, 6123 assertions across 205 files
584
686
  bun run typecheck # 0 static type errors
585
687
  bun run build # Clean bundled distribution build (dist/index.js)
586
688
  ```
587
689
 
588
- ---
690
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the branch/PR model, the per-commit gate, and the post-merge sequence.
589
691
 
590
- ## ๐Ÿ”ฎ Sprint & Roadmap Board
591
-
592
- <details>
593
- <summary><b>๐Ÿ”ฎ Sprint & Roadmap Lifecycle (Requested โž” Planned โž” In Progress โž” Done)</b> โ€” <i>Click to expand</i></summary>
692
+ ---
594
693
 
595
- Muse Memory features are developed in structured sprints moving across 4 deterministic lifecycle phases following strict `vX.Y.Z` semantic versioning. Every sprint is delivered via PR from `dev` to `main` with associated GitHub milestones. Live tracking: [GitHub Issues & Milestones](https://github.com/harshsinghmp/musememory/issues).
694
+ ## ๐Ÿ”ฎ Roadmap
596
695
 
597
- ```
598
- [ ๐Ÿ“‹ Requested ] โ”€โ”€โ–บ [ ๐Ÿ“… Planned ] โ”€โ”€โ–บ [ โšก In Progress ] โ”€โ”€โ–บ [ โœ… Done ]
599
- (Issues / PRs) (Sprint Backlog) (Active PR / Milestone) (Shipped to Main)
600
- ```
696
+ Work moves through four phases โ€” requested โ†’ planned โ†’ in progress โ†’ done โ€”
697
+ and ships as a pull request from `dev` to `main`.
601
698
 
602
- ### ๐Ÿท๏ธ Semantic Versioning Protocol (`vX.Y.Z`)
603
- - **`X` (Major)**: Breaking architectural changes, core schema shifts, or protocol overhauls (`vX.0.0`).
604
- - **`Y` (Feature)**: Substantive new agent capabilities, MCP tools, or CLI subcommands (`vX.Y.0`).
605
- - **`Z` (Minor / Hotfix / Critical Fix)**: Bug remediations, security patches, performance, and urgent hotfixes (`vX.Y.Z`).
606
-
607
- ### ๐Ÿ“‹ Phase 1: Requested (Backlog)
608
- *Incoming community proposals, agent adapters, and feature requests pending sprint triage:*
609
- - [ ] Multi-Agent Consensus Verification Protocol (cross-agent memory agreement)
610
- - [ ] Continuous Background Memory Compaction & Pruning Cron
611
- - [ ] Export to Local Vector GGUF Embedding Index
612
-
613
- ### ๐Ÿ“… Phase 2: Planned
614
- *Confirmed high-leverage features scheduled for upcoming sprints:*
615
- - [ ] **Tiered Retrieval Engine**: Deterministic Tier 0 (manifest), Tier 1 (invariants), Tier 2 (bounded bodies) knapsack retrieval
616
- - [ ] **Provenance & Claim Ledgers**: Direct memory citations with `[RAW]`, `[FETCH]`, `[SEARCH]`, and `[INFER]` confidence tagging
617
- - [ ] **Frozen Context Snapshots**: Immutable SHA-256 state tracking for reproducible agent execution
618
- - [ ] **Native Prompt Registry**: Declarative prompt library & runner (`.memory/prompts/*.md`, `memory prompt run`)
619
- - [ ] **Temporal Compounding**: Multi-scale Day $\to$ Week $\to$ Quarter wiki rollups & `.memory/HOT.md` cache
620
- - [ ] **Gauntlet Iteration Ledger**: Multi-turn improvement loop tracking and plateau detection
621
- - [ ] **Strict Health Gate**: Comprehensive `memory verify --strict` referential, link, and secret validator
622
-
623
- ### โšก Phase 3: In Progress (Active Sprint / PR)
624
- *Currently under active development on dedicated feature branches:*
625
- - *(None โ€” Sprint SOW-200 completed and shipped)*
626
-
627
- ### โœ… Phase 4: Done (Shipped to Production)
628
- *All completed, tested, and released milestones:*
629
- | Status | Milestone / Feature | Shipped Release / Tracker |
630
- | :--- | :--- | :--- |
631
- | โœ… | **SOW-201**: Live Runtime File & Symbol Verification Gate (`STRONG`/`WEAK`/`STALE`) | shipped v1.8.0 |
632
- | โœ… | **SOW-202**: Deterministic Relevance Cutoff Gate (hard score threshold $\ge 0.45$) | shipped v1.8.0 |
633
- | โœ… | **SOW-203**: Git Code-Drift Scanner CLI (`memory drift` / `memory check`) | shipped v1.8.0 |
634
- | โœ… | **SOW-204**: Gradient-Free Hebbian Co-Activation Plasticity (synaptic link reinforcement) | shipped v1.8.0 |
635
- | โœ… | **SOW-205**: Semantic Memory Prompt Compression (`memory compress` lossless prompt packer) | shipped v1.8.0 |
636
- | โœ… | Turnkey Agent Skills Suite (`muse-ground`, `muse-capture`, etc.) | shipped v1.7.0 |
637
- | โœ… | AST Symbol Graph Integration (CodeGraph / Graphify) | [#35](https://github.com/harshsinghmp/musememory/issues/35) / v1.7.0 |
638
- | โœ… | Zero-Friction Installation Lifecycle Fix | shipped v1.7.1 |
639
- | โœ… | Proactive Nudges & Check-ins (`memory nudge`) โ€” SOW-101 | [#28](https://github.com/harshsinghmp/musememory/issues/28) |
640
- | โœ… | Daily Briefing & Routines Scheduler (cron-invoked, no daemon) โ€” SOW-102 | [#29](https://github.com/harshsinghmp/musememory/issues/29) |
641
- | โœ… | Open-Loop / Task Extraction from Transcripts โ€” SOW-103 | [#30](https://github.com/harshsinghmp/musememory/issues/30) |
642
- | โœ… | Calendar / Time-Aware Follow-ups (`due_at` / `expires_at`) โ€” SOW-104 | [#31](https://github.com/harshsinghmp/musememory/issues/31) |
643
- | โœ… | muse-agents โ†” musememory Integration Contract (`--for-agent`) โ€” SOW-106 | [#33](https://github.com/harshsinghmp/musememory/issues/33) |
644
- | โœ… | Dynamic Prompt Token Budgeter (`--token-budget N`) | shipped v1.1.0 |
645
- | โœ… | Scene-Based Hierarchical Consolidation (`memory consolidate`) | [#1](https://github.com/harshsinghmp/musememory/issues/1) |
646
- | โœ… | Autonomous Verification Oracle (`memory verify <id>`) | [#2](https://github.com/harshsinghmp/musememory/issues/2) |
647
- | โœ… | Multi-Hop Causality Graph Tracer (`memory trace <id>`) | [#3](https://github.com/harshsinghmp/musememory/issues/3) |
648
- | โœ… | In-Place Core Memory Partitioning (`memory core`) | [#4](https://github.com/harshsinghmp/musememory/issues/4) |
649
- | โœ… | Automated Post-Turn Transcript Harvester Hook | [#5](https://github.com/harshsinghmp/musememory/issues/5) |
650
- | โœ… | Real-Time Agency WebSocket Hub (`memory daemon`) | [#6](https://github.com/harshsinghmp/musememory/issues/6) |
651
- | โœ… | Local Offline Hybrid Vector Engine | [#7](https://github.com/harshsinghmp/musememory/issues/7) |
652
- | โœ… | Delete Deprecated `MemoryStore` Shim | [#8](https://github.com/harshsinghmp/musememory/issues/8) / v1.5.0 |
653
- | โœ… | Self-Evolving Skill Distillation | [#9](https://github.com/harshsinghmp/musememory/issues/9) |
654
- | โœ… | 3-Layer Progressive Disclosure | [#10](https://github.com/harshsinghmp/musememory/issues/10) |
655
- | โœ… | Bi-Temporal Reinforcement Feedback | [#11](https://github.com/harshsinghmp/musememory/issues/11) |
656
- | โœ… | Ambient Open-Loop Tracker | [#12](https://github.com/harshsinghmp/musememory/issues/12) |
657
- | โœ… | Knowledge Graph UI v2 | [#13](https://github.com/harshsinghmp/musememory/issues/13) |
699
+ | Phase | Status |
700
+ | :--- | :--- |
701
+ | ๐Ÿ“‹ Requested | 4 items in the backlog |
702
+ | ๐Ÿ“… Planned | 7 confirmed features scheduled |
703
+ | โšก In progress | none โ€” sprint SOW-200 shipped |
704
+ | โœ… Done | shipped to production |
658
705
 
659
- </details>
706
+ **[Full roadmap โ†’](docs/roadmap.md)** ยท [Live issues & milestones](https://github.com/harshsinghmp/musememory/issues) ยท [CHANGELOG](CHANGELOG.md)
660
707
 
661
708
  ---
662
709
 
663
710
  ## ๐Ÿ“œ License
664
711
 
665
- MIT License. Built for the AI Developer Ecosystem.
712
+ MIT License. Built for the AI Developer Ecosystem.