musememory 2.3.0 → 3.0.0
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 +166 -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 +5 -0
- package/.agents/context/roadmap.md +361 -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-walrus-memory-architecture.md +189 -0
- package/.agents/research/retirement-audit-2026-10.md +45 -0
- package/.agents/standards/git-workflow.md +5 -0
- package/.agents/standards/workflows.md +13 -0
- package/README.md +137 -56
- package/dist/index.js +20579 -9092
- package/package.json +20 -10
- package/schema.json +39 -2
|
@@ -52,3 +52,16 @@ To balance velocity with rigor, overhead is strictly proportional to task risk:
|
|
|
52
52
|
- **Archive Work Artifacts**: Move completed plans or temporary scratchpads into `.agents/archive/` using the timestamped format `[title]-[YYYYMMDD-HHMMSS].md`.
|
|
53
53
|
- **DOX Pass**: Update `./.agents/context/current.md` and the nearest owning `AGENTS.md`.
|
|
54
54
|
- **Memory Update**: Persist newly confirmed invariants or architectural decisions into `./.memory`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 3. Mandatory PR & Post-Merge Pipeline (principal rule, 2026-10-15)
|
|
59
|
+
|
|
60
|
+
1. **One PR per feature.** Every feature or fix lands on its own branch (`feat/*`, `fix/*`) off `dev`. Never commit directly to `main`, `master`, or `dev`.
|
|
61
|
+
2. **Per-phase subagent worktrees.** Every phase starts by dispatching multiple subagents, each in its own worktree, doing the work there. The orchestrator reconciles terminal results back into the feature branch. Execution model: one branch per ticket (`fix/T-xxx`), full gate per commit (`bun test` + `tsc --noEmit` + `bun run build`).
|
|
62
|
+
3. **After feature work merges to `dev`, run in order, end-to-end:**
|
|
63
|
+
a. `updatedocs` skill — complete mode (doc↔code drift sync; CHANGELOG/docs alignment).
|
|
64
|
+
b. `updateagents` skill — all modes (AGENTS.md + `.agents/` context synchronization).
|
|
65
|
+
c. `git` skill — end-to-end, **stopping before release**. Release cutting is principal-confirmed only; never auto-release.
|
|
66
|
+
4. **Docs upkeep.** Update CHANGELOG.md, CONTRIBUTING.md, and credits (package.json author/contributors, README credits) whenever required: behavioral changes, new dependencies, new contributors, process changes.
|
|
67
|
+
5. Gates unchanged: green per commit, Why/What/Verification commit bodies, zero secret exposure, English only.
|
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/banner.png" alt="Muse Memory — Autonomous cognitive memory for AI agents" width="100%" />
|
|
5
|
+
</a>
|
|
6
|
+
|
|
7
|
+
<br />
|
|
8
|
+
<br />
|
|
9
|
+
|
|
10
|
+
# 🧠 Muse Memory
|
|
11
|
+
|
|
5
12
|

|
|
6
13
|

|
|
7
14
|
-black?style=for-the-badge&logo=bun)
|
|
@@ -13,55 +20,55 @@
|
|
|
13
20
|

|
|
14
21
|

|
|
15
22
|
|
|
16
|
-

|
|
17
24
|

|
|
18
|
-

|
|
19
26
|

|
|
20
27
|
|
|
21
|
-
**
|
|
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) · [Install](#start-with-one-command)
|
|
31
|
+
|
|
32
|
+
<img src="./assets/muse-memory-demo.gif" alt="Muse Memory in action — memory init, propose, context recall, and R23 version control (branch / blame / checkout) with access-weighted decay" width="100%" />
|
|
33
|
+
|
|
34
|
+
*→ Prefer the raw clip? [`apps/website/public/showreel.mp4`](./apps/website/public/showreel.mp4) (10s, 1280×720, 240KB) — or watch it embedded on the [live site](https://harshsinghmp.github.io/musememory/#showreel).*
|
|
35
|
+
*Rebuild the GIF with `bun run build:gif` (deterministic — renders from a declarative scene script, not a screen recording).*
|
|
22
36
|
|
|
23
37
|
</div>
|
|
24
38
|
|
|
25
39
|
---
|
|
26
40
|
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
## What changed
|
|
42
|
+
|
|
43
|
+
- **Failure Attribution, Negative Mining & Compounding (Wave 22 / v3.0.0)**: Scoped failure attribution matching code anchors, affected paths, and reproduction commands with deduplicated per-session strikes and a dual-axis decaying strike counter (2 clean runs or 30 days) to prevent wrongful demotions; constitutional dispute immunity for constraints and timeless invariants; trajectory fix-pair mining discovering negative memories from Error ➔ Remediation sequences; active working set retrieval compounding via memoized `.memory/HOT.md` candidates with relevance-gated source bonuses; and LangMem sub-linear logarithmic frequency ranking with 2x application weighting ([docs/failure-attribution-and-negative-mining.md](docs/failure-attribution-and-negative-mining.md)).
|
|
44
|
+
- **Graph, Provenance & Lineage Architecture (Wave 17)**: Write-time associative graph edge auto-seeding (`linked_memory_ids`), HyAtlas supersede-not-delete lifecycle with hidden-count-aware over-fetching, empirical observation-biased recall deduplication (`prefer_observations`), progressive multi-hop wikilink expansion after reciprocal rank fusion (`extractWikilinks`, `expandFusedWikilinks`), immutable semantic fact provenance append-only table (`fact_provenance` with triple-unique indexing), first-class relational lineage foreign keys (`supersedes_id`, `conflicts_with_id`), lineage BFS provenance DAG walker (`walkLineageBfs`), and tamper-evident cryptographic hash-chained audit ledger with per-day salt rotation and session Merkle tree checkpoints ([docs/graph-provenance-and-lineage.md](docs/graph-provenance-and-lineage.md)).
|
|
45
|
+
- **Temporal Transitions, Contradiction Engine & Verbs (Wave 16)**: Bi-temporal validity tracking with explicit historical cessation flags (`valid_to_exact`), point-in-time `as_of` queries returning `{results, undetermined}` without date invention, five-verb lifecycle (`change`, `end`, `correct`, `revert`, `forget` with GDPR hard/soft tombstones), point-in-time `searchTemporal(atTime)` default-excluding superseded knowledge, keep-both `conflicts` table preserving contradictions without deletion, scoped invalidation requiring semantic `(entity, relation, target, scope)` alignment to prevent over-eager invalidations across environments, federation handshake protocol for mesh-mode conflict deduplication and resolution propagation, provenance veracity rank weighting (`user` 1.0, `agent` 0.7, `external` 0.5, `system` 0.3) with tie-breaker bonuses, and `src_ts` evidence-age stamping ensuring memory freshness never exceeds underlying evidence ([docs/temporal-contradiction-and-trust.md](docs/temporal-contradiction-and-trust.md)).
|
|
46
|
+
- **Expiry, Decay & Confidence Hardening (Wave 15)**: Tokenizer-matched abstention gates (`evaluateAbstentionGate`), explicit `no_confident_match` mode eliminating model hallucination, materialized `decay_score` in SQLite with importance gating (0.4x to 3.0x), Bayesian corroboration confidence ($C(n) = 1 - 0.7^n$), trust-tier-keyed half-lives (T1 365d → T4 30d) defending against OWASP ASI06 poisoning, per-type admission `expires_at` defaults (fix 90d, op 180d, arch 365d, disc 30d), stamped `status: 'expired'`, `expired_at`, and `expired_by` rule tracking, pin-capable first-match-wins declarative expiry policy YAML (`.memory/expiry.yaml`), and optional Weibull hazard curve modeling ($R(t) = \exp(-(t/\lambda)^k)$) ([docs/expiry-decay-and-confidence.md](docs/expiry-decay-and-confidence.md)).
|
|
47
|
+
- **Invalidation, Attribution & Ranking Rigor (Wave 14)**: Incremental `index.json` vector synchronization on `save()` and `deleteEntry()`, bounded Hebbian co-activation plasticity (8 seeds, 30 edges, 500 nodes), IDF-weighted symbol matching (generic verbs downweighted to 0.05, compound identifiers scored 1.0), Unicode word-boundary matching blocking false positives (`race⊂trace`, `port⊂report`), and explicit SQLite FTS failure degradation signals with `[FTS5_DEGRADED]` logging ([docs/retrieval-ranking-and-invalidation.md](docs/retrieval-ranking-and-invalidation.md)).
|
|
48
|
+
- **Retrieval Performance & Hot-Path Hardening (Wave 13)**: Precomputed WeakMap token sets ($O(1)$ lookup), memoized runtime code-anchor verification, dirty-gated store loads (`count(*)` + `max(updated_at)` fingerprinting), input limit clamping, and `stale: boolean` provenance tags for degraded reads ([docs/retrieval-performance-and-limits.md](docs/retrieval-performance-and-limits.md)).
|
|
49
|
+
- **Point-ID-Only Dry-Run Deletions**: Hardened destructive deletion commands (`memory delete`, `memory_delete`) defaulting to dry-run previews and blocking wildcard expressions to prevent accidental data loss.
|
|
50
|
+
- **Real-Time Agency Hub (SSE)**: Fast event fan-out on `http://localhost:31338/events` for parallel agent swarms, featuring CSRF origin filtering and clean socket disposal (`memory daemon`).
|
|
51
|
+
- **Living ADR & Drift Sentry**: Binding Architecture Decision Records to line-independent structural code anchors with write-time `base_path` normalization and pure read-path drift auditing (`memory adr`, `memory check --drift`).
|
|
52
|
+
- **Reasoning Tree PageIndex Depth Controls**: Hierarchical document navigation with configurable `maxDepth` traversal limits and tiered `disclosureDepth` (`L1`/`L2`/`L3`) for token economics.
|
|
53
|
+
- **Hardened Upgrade & CI Verification**: Deterministic exit code contracts (`--check`, `--fail-on-update`, `--strict`), real Vibeguard credential audits, and structured repair error surfacing (`memory upgrade`).
|
|
30
54
|
- **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
55
|
- **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
56
|
- **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
57
|
- **Clean Operational Guidelines**: Curated single-pane executive summary for humans and strict grounding/concurrency rules for AI agents.
|
|
34
|
-
|
|
35
|
-
|
|
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.
|
|
58
|
+
- **Public website**: The responsive homepage lives in [`web/index.html`](./web/index.html) and deploys to the [Muse Memory project site](https://harshsinghmp.github.io/musememory/).
|
|
59
|
+
- **Comparison dossier**: Explore the [agent memory comparison](https://harshsinghmp.github.io/musememory/musememory-comparison.html) for storage, retrieval, privacy, lifecycle, and migration differences.
|
|
55
60
|
|
|
56
61
|
---
|
|
57
62
|
|
|
58
63
|
## 📑 Table of Contents
|
|
59
64
|
|
|
60
|
-
- [
|
|
61
|
-
- [
|
|
62
|
-
- [
|
|
63
|
-
- [
|
|
65
|
+
- [What changed](#what-changed)
|
|
66
|
+
- [What Muse Memory does](#what-muse-memory-does)
|
|
67
|
+
- [Key capabilities](#key-capabilities)
|
|
68
|
+
- [Start with one command](#start-with-one-command)
|
|
69
|
+
- [📖 Documentation & User Guides](#-documentation--user-guides)
|
|
64
70
|
- [🔄 Upgrading & Self-Healing Maintenance](#-upgrading--self-healing-maintenance)
|
|
71
|
+
- [👥 Team & Multi-Member Setup](#-team--multi-member-setup)
|
|
65
72
|
- [🧠 Shipped Agent Skills (`.agents/skills/`)](#-shipped-agent-skills-agentsskills)
|
|
66
73
|
- [👤 5 Role Archetypes (`USER.md`)](#-5-zero-fingerprint-role-archetypes-usermd)
|
|
67
74
|
- [🔌 Full CLI Command Matrix](#-full-cli-command-matrix)
|
|
@@ -72,11 +79,11 @@
|
|
|
72
79
|
|
|
73
80
|
---
|
|
74
81
|
|
|
75
|
-
##
|
|
82
|
+
## What Muse Memory does
|
|
76
83
|
|
|
77
|
-
|
|
84
|
+
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
85
|
|
|
79
|
-
|
|
86
|
+
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
87
|
|
|
81
88
|
```
|
|
82
89
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
@@ -120,28 +127,29 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
|
|
|
120
127
|
|
|
121
128
|
---
|
|
122
129
|
|
|
123
|
-
##
|
|
130
|
+
## Key capabilities
|
|
124
131
|
|
|
125
132
|
- 👤 **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
133
|
- 📐 **Real-Time Active Constraints (`CURRENT.md`)**: Bi-temporal working constraints and invariant tracking synchronized on every mutation to eliminate amnesia during task handoffs.
|
|
127
134
|
- 💾 **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
135
|
- ⚖️ **Token Knapsack Retrieval**: Multi-factor scoring (applicability, verification bonus, AST graph overlap, time decay, due date urgency) tightly packed under prompt token ceilings.
|
|
136
|
+
- 🧭 **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
137
|
- 🌐 **Pluggable AST CodeGraph & Symbol Indexing**: Native CodeGraph & Graphify integration that indexes codebase AST symbols, auto-tags memories, and awards graph overlap bonuses.
|
|
130
138
|
- 🌳 **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
139
|
- 📚 **Obsidian Markdown Wiki & Entity Graph Compiler**: Dual-persistence knowledge compounding compiling linked Markdown pages (`wiki/concepts/`, `wiki/entities/`) with bidirectional `[[wikilinks]]`.
|
|
132
140
|
- 🛡️ **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 (
|
|
141
|
+
- 🔌 **Zero-Permission Auto-Wiring (52 Agents)**: Automatically detects and wires Claude Code, Cursor, Antigravity, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.
|
|
134
142
|
- 🔄 **Universal Memory Migrator (29 Engines)**: One-click migration from Letta, Mem0, Supermemory, Cognee, Beads, Mnemosyne, GBrain, and more with state preservation.
|
|
135
143
|
- 🎨 **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
144
|
- ⏰ **Proactive Nudges & Routines Scheduler**: Cron-invoked daily briefings, staleness policy tracking, and ambient open-loop trackers with zero resident background daemons.
|
|
137
145
|
|
|
138
146
|
---
|
|
139
147
|
|
|
140
|
-
##
|
|
148
|
+
## Start with one command
|
|
141
149
|
|
|
142
150
|
> [!TIP]
|
|
143
|
-
> ###
|
|
144
|
-
>
|
|
151
|
+
> ### Install without a global package
|
|
152
|
+
> Set up the memory store and connect your local AI agents with one command:
|
|
145
153
|
>
|
|
146
154
|
> ```bash
|
|
147
155
|
> npx musememory install
|
|
@@ -175,8 +183,24 @@ git clone https://github.com/harshsinghmp/musememory.git && cd musememory
|
|
|
175
183
|
docker build -t musememory .
|
|
176
184
|
```
|
|
177
185
|
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 📖 Documentation & User Guides
|
|
189
|
+
|
|
190
|
+
Explore comprehensive documentation tailored for both solo developers and engineering leadership:
|
|
191
|
+
|
|
192
|
+
| Guide | Intent & Framework | Target Audience |
|
|
193
|
+
| :--- | :--- | :--- |
|
|
194
|
+
| 🧠 **[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 |
|
|
195
|
+
| 🛡️ **[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 |
|
|
196
|
+
| 🛠️ **[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 |
|
|
197
|
+
| ⚡ **[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 |
|
|
198
|
+
| 🏛️ **[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 |
|
|
199
|
+
| ⚡ **[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 |
|
|
200
|
+
| 👥 **[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 |
|
|
201
|
+
| 🏛️ **[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 |
|
|
202
|
+
| 📊 **[Agent Memory Comparison Dossier](https://harshsinghmp.github.io/musememory/musememory-comparison.html)** | 68-engine benchmark comparing storage, retrieval, privacy, and token economics. | Decision Makers, Evaluators |
|
|
203
|
+
|
|
180
204
|
---
|
|
181
205
|
|
|
182
206
|
## 🔄 Upgrading & Self-Healing Maintenance
|
|
@@ -196,7 +220,7 @@ npx musememory upgrade
|
|
|
196
220
|
#### What `memory upgrade` automatically handles:
|
|
197
221
|
1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and pulls the latest published binary.
|
|
198
222
|
2. **Self-Healing Storage Repair**: Recovers missing `.memory/`, `CURRENT.md` constraints, or `USER.md` persona files if corrupted or deleted.
|
|
199
|
-
3. **
|
|
223
|
+
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
224
|
4. **AST Symbol Graph Re-Indexing**: Re-synchronizes CodeGraph/Graphify symbol caches under `.memory/graph-symbols.json`.
|
|
201
225
|
|
|
202
226
|
---
|
|
@@ -212,9 +236,15 @@ npx musememory upgrade
|
|
|
212
236
|
| **NPX** (Zero-Install) | `npx musememory@latest upgrade` | `npx musememory doctor` |
|
|
213
237
|
|
|
214
238
|
```bash
|
|
215
|
-
# Check if updates are available without applying
|
|
239
|
+
# Check if updates are available without applying (exits 0 if up to date, 1 if registry fails)
|
|
216
240
|
memory upgrade --check
|
|
217
241
|
|
|
242
|
+
# Enforce up-to-date installation in CI pipelines (exits 1 if update is available)
|
|
243
|
+
memory upgrade --check --strict
|
|
244
|
+
|
|
245
|
+
# Preview upgrade actions in dry-run mode
|
|
246
|
+
memory upgrade --dry-run
|
|
247
|
+
|
|
218
248
|
# Force re-installation and complete platform re-wiring
|
|
219
249
|
memory upgrade --force
|
|
220
250
|
```
|
|
@@ -244,7 +274,7 @@ npx musememory stats
|
|
|
244
274
|
npx musememory briefing
|
|
245
275
|
```
|
|
246
276
|
|
|
247
|
-
### 3️⃣ Connect Coding Agents (
|
|
277
|
+
### 3️⃣ Connect Coding Agents (52 Platforms)
|
|
248
278
|
```bash
|
|
249
279
|
# Scan workstation for installed AI coding agents
|
|
250
280
|
npx musememory agents
|
|
@@ -258,6 +288,10 @@ npx musememory connect cursor
|
|
|
258
288
|
npx musememory connect antigravity
|
|
259
289
|
npx musememory connect windsurf
|
|
260
290
|
npx musememory connect opencode
|
|
291
|
+
|
|
292
|
+
# Claude Code lives under ~/.claude*, so it needs an explicit harness opt-in.
|
|
293
|
+
# Without this flag the Claude config is reported as skipped and nothing is written.
|
|
294
|
+
npx musememory connect claude-code --harness claude
|
|
261
295
|
```
|
|
262
296
|
|
|
263
297
|
### 4️⃣ Clean Uninstallation & Removal
|
|
@@ -268,7 +302,7 @@ npx musememory connect opencode
|
|
|
268
302
|
Muse Memory can be cleanly and completely removed with zero trace left on your machine.
|
|
269
303
|
|
|
270
304
|
#### Step 1: Unwire Coding Agents (Zero-Trace MCP Cleanup)
|
|
271
|
-
Remove the memory MCP server configuration from all
|
|
305
|
+
Remove the memory MCP server configuration from all 52 detected agent config files (`cursor`, `claude-code`, `antigravity`, `windsurf`, `opencode`, `codex`, etc.):
|
|
272
306
|
|
|
273
307
|
```bash
|
|
274
308
|
# Preview changes before modifying any configuration
|
|
@@ -320,6 +354,42 @@ If you installed the pre-commit transcript harvester hook or injected agent prom
|
|
|
320
354
|
|
|
321
355
|
---
|
|
322
356
|
|
|
357
|
+
## 👥 Team & Multi-Member Setup
|
|
358
|
+
|
|
359
|
+
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.
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
Central Team Server (`team.db` + `CURRENT.md`)
|
|
363
|
+
▲
|
|
364
|
+
│ MCP Streamable HTTP (Bearer Auth)
|
|
365
|
+
┌───────────────────┬─────────┴─────────┬───────────────────┐
|
|
366
|
+
Cursor Opencode Antigravity Claude Code
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### 1-Line Team Server Start
|
|
370
|
+
Run on your team's internal VM, build server, or workstation:
|
|
371
|
+
```bash
|
|
372
|
+
# Start server with individual or shared Bearer auth tokens
|
|
373
|
+
musememory serve --port 31338 --host 0.0.0.0 --tokens alice:tok_alice_123,bob:tok_bob_456
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### 1-Line Client Recipe Generator
|
|
377
|
+
Generate ready-to-paste configurations tailored to each engineer's specific editor:
|
|
378
|
+
```bash
|
|
379
|
+
# Interactive editor selector
|
|
380
|
+
musememory connect
|
|
381
|
+
|
|
382
|
+
# Or output directly into console:
|
|
383
|
+
musememory connect --recipe --endpoint http://192.168.1.50:31338/mcp --token tok_alice_123
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Complete Getting Started & Architecture Guide
|
|
387
|
+
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:
|
|
388
|
+
- 👉 **[Team Quickstart & Deployment Guide](docs/team-getting-started.md)** — Step-by-step setup for Team Leads and Engineers.
|
|
389
|
+
- 👉 **[Team Slice Wiring & Architecture Spec](docs/architecture/team-slice-wiring.md)** — Technical deep dive into in-process SQLite vs networked mounts.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
323
393
|
## 🏛️ System Capabilities & Architecture
|
|
324
394
|
|
|
325
395
|
### 1. Dual-Scope Storage (Local vs Global)
|
|
@@ -345,6 +415,8 @@ Retrieval dynamically ranks knowledge using a calibrated multi-factor formula:
|
|
|
345
415
|
$$\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
416
|
The engine greedily packs ranked memories up to the requested `--token-budget` to guarantee zero prompt overflow.
|
|
347
417
|
|
|
418
|
+
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.
|
|
419
|
+
|
|
348
420
|
### 4. Real-Time `CURRENT.md` Synchronization & Session Handoff
|
|
349
421
|
- Active constraint memories automatically mirror into `CURRENT.md`.
|
|
350
422
|
- In-flight task states, agent checkpoints, and active loops persist across terminal restarts, context compactions, and sudden interruptions.
|
|
@@ -366,7 +438,7 @@ memory migrate --provider mem0
|
|
|
366
438
|
memory migrate --provider beads
|
|
367
439
|
memory migrate --all
|
|
368
440
|
```
|
|
369
|
-
> See [`musememory-comparison.html`](musememory-comparison.html) for the
|
|
441
|
+
> See [`web/musememory-comparison.html`](./web/musememory-comparison.html) for the published comparison page, and [`docs/research/musememory-comparison.html`](docs/research/musememory-comparison.html) for the research survey dossier (68 systems).
|
|
370
442
|
|
|
371
443
|
---
|
|
372
444
|
|
|
@@ -424,7 +496,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
424
496
|
| `muse_mesh_query` | **Cross-Project Query** | Queries memories across the entire workspace mesh with origin package provenance tags. |
|
|
425
497
|
| `muse_mesh_audit` | **Contract Verification** | Audits cross-package dependency contracts, entrypoint exports, and cross-repo code anchors. |
|
|
426
498
|
| `muse_mesh_link` | **Mesh Linking** | Explicitly links or unlinks external repository paths into the workspace mesh registry. |
|
|
427
|
-
| `profile_list`
|
|
499
|
+
| `profile_list` | **Tool Management** | Lists task-focused MCP profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`). |
|
|
428
500
|
| `get_context` | **Session Start** | Fetches Top-$K$ ranked memories, `USER.md` profile, active `CURRENT.md` constraints, and supports `--tier 0|1|2`. |
|
|
429
501
|
| `search` | **Investigation** | Searches memory units with query, token budget, project, type, and verification filters. |
|
|
430
502
|
| `memory_current` | **Constraints** | Reads or appends active project working constraints (`CURRENT.md`). |
|
|
@@ -455,7 +527,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
455
527
|
| `memory_harvest` | **Session End** | Distills conversation turns into structured fix/outcome units. |
|
|
456
528
|
| `memory_import_transcript` | **Transcript Sync** | Ingests `.jsonl` transcript and auto-binds memories to session nodes. |
|
|
457
529
|
| `memory_audit` | **Governance** | Queries the append-only operational audit ledger. |
|
|
458
|
-
| `memory_detect_agents` | **Onboarding** | Scans workstation for
|
|
530
|
+
| `memory_detect_agents` | **Onboarding** | Scans workstation for 52 coding agent installations. |
|
|
459
531
|
| `memory_connect` | **Setup** | Auto-wires MCP server into detected installed agents with zero permissions. |
|
|
460
532
|
| `memory_detect_providers` | **Migration** | Scans machine for 29 external memory formats. |
|
|
461
533
|
| `memory_migrate` | **Migration** | Ingests external memories with state preservation and secret scrubbing. |
|
|
@@ -468,7 +540,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
468
540
|
</details>
|
|
469
541
|
|
|
470
542
|
<details>
|
|
471
|
-
<summary><b>💻 Full CLI Command Matrix (
|
|
543
|
+
<summary><b>💻 Full CLI Command Matrix (54 Commands)</b> — <i>Click to expand</i></summary>
|
|
472
544
|
|
|
473
545
|
```bash
|
|
474
546
|
memory <command> [arguments] [flags] # alias: musememory
|
|
@@ -487,14 +559,15 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
487
559
|
| `uninstall` | `[agent] [--purge] [--dry-run]` | **Clean uninstaller**: unwires MCP configs (and optionally purges `.memory/`). |
|
|
488
560
|
| `init` | `[path] [--legacy] [--global]` | Initialize `.memory/` directory and SQLite database. |
|
|
489
561
|
| `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
|
|
562
|
+
| `connect` | `[agent] [--all] [--force] [--dry-run] [--harness H]` | Auto-wire MCP into detected installed agents with zero permissions. Harness-specific paths (e.g. `~/.claude*`) are only written with an explicit `--harness claude` opt-in. |
|
|
563
|
+
| `agents` | *(none)* | Scan workstation for 52 coding agents (Cursor, Claude Code, Antigravity, etc.). |
|
|
492
564
|
| `detect` | *(none)* | Scan workstation and local workspace for 29 external memory systems. |
|
|
493
565
|
| `migrate` | `[--provider P] [--all] [--dry-run] [--overwrite]` | Migrate memories into Muse Memory preserving active/archived state. |
|
|
494
566
|
| `context` | `[query] [--token-budget N] [--limit N] [--tier 0\|1\|2]` | Retrieve Top-$K$ ranked active context for prompt injection. |
|
|
495
567
|
| `search` | `<query> [--limit N] [--token-budget N] [--type T]` | Ranked multi-factor token search with score breakdown. |
|
|
496
568
|
| `search-transcript` | `<query> [file.jsonl] [--window N]` | Full-text search past transcripts with dialogue context windows. |
|
|
497
569
|
| `learn` / `sync-chats` | `[--confirm] [--force] [--max N]` | **Universal auto-learner**: auto-discovers and distills memories from all agent chats across host machine. |
|
|
570
|
+
| `distill-route` | `[--force] [--dry-run]` | **Multi-channel knowledge distillation router**: triages memories across system (rules/fixes), content (architecture concepts), and health (contradictions/staleness) lanes with SHA-256 deduplication and draft generation. |
|
|
498
571
|
| `harvest` | `<text\|file> --project P [--confirmed]` | Distill conversation turns into structured fix/decision memory units. |
|
|
499
572
|
| `import-transcript` | `<file.jsonl> [--project P] [--confirmed]` | Ingest raw `.jsonl` session transcripts from coding agents. |
|
|
500
573
|
| `capture` / `propose` | `<text> --project P [--title T] [--type T]` | Propose a memory entry with inline Vibeguard secret inspection. |
|
|
@@ -524,6 +597,11 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
524
597
|
| `settings` | `get\|set\|reset\|export\|import` | Manage unified settings across retrieval, wiki, PageIndex, and UI. |
|
|
525
598
|
| `current` | `get` / `set <text> --project P` | Read or append hard constraints in `.memory/CURRENT.md`. |
|
|
526
599
|
| `graph` | `status` / `index` | Query active CodeGraph provider status or index AST symbol map. |
|
|
600
|
+
| `branch` | `<id> --path <mem_path> [--label L]` | **Version control (R23)**: tag a memory with semantic dotted-path addressing. |
|
|
601
|
+
| `checkout` | `<path\|id>` | **Version control (R23)**: retrieve a memory by its `mem_path` or entry id. |
|
|
602
|
+
| `blame` | `<id>` | **Version control (R23)**: show access history, staleness score, and audit trail. |
|
|
603
|
+
| `ls-branches` | `[--project P]` | List all registered branch references. |
|
|
604
|
+
| `embed` | `status\|build\|reindex` | **Semantic embeddings (R21)**: inspect, build, or rebuild the local embedding index. `status` runs offline; `build`/`reindex` probe the configured endpoint. |
|
|
527
605
|
| `mcp` | *(none)* | Start stdio MCP server (Protocol 2024-11-05). |
|
|
528
606
|
|
|
529
607
|
</details>
|
|
@@ -580,11 +658,14 @@ memory user set "- Prefers TypeScript, Bun, and ultra terse responses"
|
|
|
580
658
|
|
|
581
659
|
```bash
|
|
582
660
|
bun install
|
|
583
|
-
bun test #
|
|
661
|
+
bun test # 1309 pass, 0 fail, 5872 assertions across 203 files
|
|
584
662
|
bun run typecheck # 0 static type errors
|
|
585
663
|
bun run build # Clean bundled distribution build (dist/index.js)
|
|
664
|
+
bun run build:gif # Regenerate assets/muse-memory-demo.gif (deterministic SVG→GIF render)
|
|
586
665
|
```
|
|
587
666
|
|
|
667
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the branch/PR model, the per-commit gate, and the post-merge sequence.
|
|
668
|
+
|
|
588
669
|
---
|
|
589
670
|
|
|
590
671
|
## 🔮 Sprint & Roadmap Board
|
|
@@ -647,7 +728,7 @@ Muse Memory features are developed in structured sprints moving across 4 determi
|
|
|
647
728
|
| ✅ | Multi-Hop Causality Graph Tracer (`memory trace <id>`) | [#3](https://github.com/harshsinghmp/musememory/issues/3) |
|
|
648
729
|
| ✅ | In-Place Core Memory Partitioning (`memory core`) | [#4](https://github.com/harshsinghmp/musememory/issues/4) |
|
|
649
730
|
| ✅ | Automated Post-Turn Transcript Harvester Hook | [#5](https://github.com/harshsinghmp/musememory/issues/5) |
|
|
650
|
-
| ✅ | Real-Time Agency
|
|
731
|
+
| ✅ | Real-Time Agency SSE Hub (`memory daemon`) | [#6](https://github.com/harshsinghmp/musememory/issues/6) |
|
|
651
732
|
| ✅ | Local Offline Hybrid Vector Engine | [#7](https://github.com/harshsinghmp/musememory/issues/7) |
|
|
652
733
|
| ✅ | Delete Deprecated `MemoryStore` Shim | [#8](https://github.com/harshsinghmp/musememory/issues/8) / v1.5.0 |
|
|
653
734
|
| ✅ | Self-Evolving Skill Distillation | [#9](https://github.com/harshsinghmp/musememory/issues/9) |
|
|
@@ -662,4 +743,4 @@ Muse Memory features are developed in structured sprints moving across 4 determi
|
|
|
662
743
|
|
|
663
744
|
## 📜 License
|
|
664
745
|
|
|
665
|
-
MIT License. Built for the AI Developer Ecosystem.
|
|
746
|
+
MIT License. Built for the AI Developer Ecosystem.
|