musememory 2.0.0 β†’ 2.2.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/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  ![AST Graph](https://img.shields.io/badge/AST-CodeGraph_%26_Graphify-orange?style=for-the-badge&logo=diagram-project&logoColor=white)
14
14
  ![Architecture](https://img.shields.io/badge/Storage-Zero--Daemon_%2F_Local--First-0D9488?style=for-the-badge)
15
15
 
16
- ![CI Tests](https://img.shields.io/badge/Tests-480%20Passed-brightgreen?style=for-the-badge&logo=checkmarx)
16
+ ![CI Tests](https://img.shields.io/badge/Tests-497%20Passed-brightgreen?style=for-the-badge&logo=checkmarx)
17
17
  ![Security](https://img.shields.io/badge/Security-Vibeguard_Zero--Leak-DC2626?style=for-the-badge&logo=shield)
18
18
  ![Agent Coverage](https://img.shields.io/badge/Agents-80+_Supported-4F46E5?style=for-the-badge&logo=openai)
19
19
  ![License](https://img.shields.io/badge/License-MIT-9333EA?style=for-the-badge)
@@ -24,23 +24,60 @@
24
24
 
25
25
  ---
26
26
 
27
- ## πŸš€ What's New in v2.0.0 (Autonomous Cognitive Engine Major Overhaul)
28
-
29
- - **πŸ₯ Unified 5-Pillar Project Health Gate (`memory health` / `muse_health`)**: Comprehensive single-call architectural and memory health audit scoring Store Integrity, Code Anchor Validity, Doc $\leftrightarrow$ Code Alignment, Negative Sentry, and Technical Debt with letter grades (A-F), PASS/WARN/FAIL status, and automated remediation checklists.
30
- - **🧠 Autonomous Engineering Cognition & "Why" Reasoner (`muse_why`)**: Traces code evolution backwards through past bug fixes, ADRs, accepted trade-offs, and invariants to explain *why* code was built the way it is before refactoring.
31
- - **πŸ›οΈ First-Class Architecture Decision Records (`memory_adr_record` / `memory_adr_list`)**: ADRs as queryable, scored, living memory units with options considered, consequences, native code anchors, and supersession lineage.
32
- - **πŸ”„ Bidirectional Documentation $\leftrightarrow$ Code Drift Engine (`memory_drift_audit`)**: Continuously verifies that documented architectural invariants match live implementation and flags missing, stale, or conflicting code.
33
- - **🎯 Flagship Unified Context Orchestrator (`muse_context`)**: Single-call fused entry point combining search, active file, symbol, error messages, and task intent under strict knapsack token budgets.
34
- - **βš™οΈ Task-Focused MCP Profiles**: Solves agent tool bloat with role-tailored tool filtering profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`).
35
- - **βš“ Native Structural Code Anchors (`src/anchors/`)**: Line-independent structural hashing invariant to comment/spacing edits while strictly sensitive to AST/logic modifications.
36
- - **πŸͺœ Scoped Promotion & Extended Archival Lifecycle (`src/promotion/`)**: 3-tier promotion ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`), 5Γ— repeated success policy, universal generalization, and `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with dynamic query rehydration.
37
- - **⚑ Hot Query Cache & Multi-Factor Retrieval**: Microsecond caching, SQLite WAL optimization, and 11-dimension retrieval scoring.
27
+ ## πŸš€ What's New in v2.2.0, v2.1.0 & v2.0.0 (Impact Analysis, PR Context, Reconciler & Telemetry)
28
+
29
+ ### πŸ’₯ v2.2.0 Flagship Additions: Code Impact, PR Context & Cognitive Governance
30
+ - **πŸ’₯ Unified Code & Memory Impact Analysis (`memory code-impact`)**:
31
+ - Synthesizes AST code callers, affected test suites, linked memories, living ADRs, negative anti-patterns, and active constraints.
32
+ - Computes a composite Risk Score (0–100) and Risk Level (`LOW`, `MEDIUM`, `HIGH`, `CRITICAL`) with pre-flight actionable recommendations before modifying code.
33
+ - Available via CLI `memory code-impact <file> [--symbol <name>]` and MCP tool `muse_code_impact`.
34
+ - **πŸ“‹ PR & Change Context Generator (`memory pr-context`)**:
35
+ - Automatically analyzes git diff against base branch, linking touched code anchors, respected ADRs, active project constraints, and blast radius.
36
+ - Generates rich GitHub-ready Markdown pull request descriptions with verification checklists and merge promotion proposals.
37
+ - Available via CLI `memory pr-context [--base main] [--out <file>]` and MCP tool `muse_pr_context`.
38
+ - **βš“ Interactive Code Anchor Reconciler (`memory reconcile`)**:
39
+ - Audits code anchors across memories, pruning dead anchors, refreshing structural hashes for drifted code, and marking abandoned memories stale.
40
+ - Supports `--dry-run`, `--prune`, `--mark-stale`, `--update-hashes`, and MCP tool `muse_reconcile_anchors`.
41
+ - **⚑ Repeatable Speed, Quality & ROI Benchmark Suite (`memory benchmark`)**:
42
+ - Measures microsecond in-process cache reads (P50 < 4Β΅s), SQLite FTS5 BM25 search, knapsack token packing, contradiction rates, and compression ratios in a clean ASCII scoreboard.
43
+ - **🧠 Complete Agent Skills Roster for v2.0–v2.2**:
44
+ - Added `.agents/skills/muse-health`, `muse-drift`, `muse-why`, `muse-sync`, and `muse-mesh`.
45
+
46
+ ### 🌟 v2.1.0 Flagship Additions: Multi-Agent & Mesh Orchestration
47
+ - **🀝 Cross-Agent Knowledge Sync & P2P Gossip Protocol (R14)**:
48
+ - Cryptographically sealed, portable `SyncPacket` engine with whole-packet SHA-256 integrity verification and vector clock causal ordering.
49
+ - Zero-daemon shared filesystem gossip pool (`.memory/sync_pool/`) allowing autonomous subagent teams (frontend, backend, test) to exchange insights asynchronously.
50
+ - Ingestion deduplication, inline Vibeguard secret scrubbing, and semantic contradiction tagging with mutual `conflict_ids`.
51
+ - CLI `memory sync` command suite & 4 MCP tools (`muse_sync_broadcast`, `muse_sync_ingest`, `muse_sync_status`, `muse_sync_pool`).
52
+ - **🌐 Full Web Observability Studio (`memory studio`) (R15)**:
53
+ - Embedded zero-dependency visual web dashboard (`memory studio` or `memory ui`) with interactive control plane.
54
+ - Live 5-pillar health scorecard (A–F letter grade, PASS/WARN/FAIL gate status, and prioritized remediation checklist).
55
+ - Interactive ADR registry and bidirectional documentation $\longleftrightarrow$ code drift inspector.
56
+ - Historical "Why" reasoner query interface, recurring bug friction heatmap, and debt scanner.
57
+ - Real-time P2P gossip mesh status and interactive broadcast/shared pool sync controls.
58
+ - **πŸ•ΈοΈ Multi-Repo & Monorepo Cross-Project Mesh (R16)**:
59
+ - Passive automatic monorepo discovery across `pnpm`, `npm`, `bun`, `lerna`, and multi-repo sibling directories.
60
+ - Cross-project memory query resolver (`resolveMeshMemories`) with origin package provenance tags (`[mesh:@scope/package]`).
61
+ - Shared invariant and working constraint propagation (`propagateConstraintToMesh`) broadcasting critical security rules across all packages.
62
+ - Cross-package dependency contract and entrypoint export auditor (`auditMeshContracts`) validating cross-package imports and cross-repo code anchors.
63
+ - CLI `memory mesh` suite & 4 MCP tools (`muse_mesh_status`, `muse_mesh_query`, `muse_mesh_audit`, `muse_mesh_link`).
64
+
65
+ ### 🧠 v2.0.0 Major Cognitive Overhaul:
66
+ - **πŸ₯ Unified 5-Pillar Project Health Gate (`memory health` / `muse_health`)**: Single-call architectural audit across Store Integrity, Code Anchors, Doc-Code Alignment, Negative Sentry, and Technical Debt.
67
+ - **πŸ€” Autonomous Engineering Cognition & "Why" Reasoner (`muse_why`)**: Reconstructs historical code evolution through past bug workarounds, accepted trade-offs, and timeless rules before refactoring.
68
+ - **πŸ›οΈ First-Class Architecture Decision Records (`memory adr` / `memory_adr_record`)**: Living, queryable ADR entities with options considered, consequences, native code anchors, and supersession lineage.
69
+ - **πŸ”„ Bidirectional Documentation $\longleftrightarrow$ Code Drift Engine (`memory_drift_audit`)**: Continuously verifies alignment across 6 states (`DOCUMENTED`, `IMPLEMENTED`, `PARTIAL`, `CONFLICTING`, `STALE`, `MISSING`).
70
+ - **🎯 Flagship Unified Context Orchestrator (`muse_context`)**: Single-call fused context injection with knapsack token budget packing.
71
+ - **βš™οΈ Task-Focused MCP Profiles**: Dynamic role-based tool filtering (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`).
72
+ - **βš“ Native Structural Code Anchors (`src/anchors/`)**: Line-independent structural SHA-256 hashing insensitive to spacing/comments.
73
+ - **πŸͺœ Scoped Promotion & Extended Archival Lifecycle (`src/promotion/`)**: 3-tier promotion ladder (`local` $\rightarrow$ `project` $\rightarrow$ `global`), 5Γ— repeated success policy, universal generalization, and `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with query rehydration.
74
+ - **⚑ Hot Query Cache & SQLite WAL Optimization**: Microsecond memory lookups and high-throughput concurrent I/O.
38
75
 
39
76
  ---
40
77
 
41
78
  ## πŸ“‘ Table of Contents
42
79
 
43
- - [πŸš€ What's New in v2.0.0](#-whats-new-in-v200-autonomous-cognitive-engine-major-overhaul)
80
+ - [πŸš€ What's New in v2.1.0 & v2.0.0](#-whats-new-in-v210--v200-autonomous-cognitive-engine-p2p-sync--monorepo-mesh)
44
81
  - [πŸ’‘ What is Muse Memory? (TL;DR)](#-what-is-muse-memory-tldr)
45
82
  - [✨ Key Feature Highlights](#-key-feature-highlights)
46
83
  - [⚑ Quick Start & Installation](#-quick-start--installation)
@@ -62,36 +99,43 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
62
99
  **Muse Memory gives your AI assistants a persistent, self-organizing cognitive notebook directly on your machine.**
63
100
 
64
101
  ```
65
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
66
- β”‚ AI Agents & IDE Platforms β”‚
67
- β”‚ (Claude Code, Cursor, Antigravity, Windsurf, Codex, CLI) β”‚
68
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
69
- β”‚ MCP stdio / Terminal CLI
70
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
71
- β”‚ Muse Memory Core Engine β”‚
72
- β”‚ β”‚
73
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
74
- β”‚ β”‚ Retrieval Engine β”‚ β”‚ Vibeguard Secret β”‚ β”‚ Auto-Migrate β”‚ β”‚
75
- β”‚ β”‚ (Token Knapsack) β”‚ β”‚ Defense Scanner β”‚ β”‚ (29 Engines)β”‚ β”‚
76
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
77
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
78
- β”‚ β”‚ LifeCycle Machine β”‚ β”‚ Knowledge Wiki β”‚ β”‚ Audit Ledger β”‚ β”‚
79
- β”‚ β”‚(State Transitions)β”‚ β”‚ (Obsidian/Entitiesβ”‚ β”‚(audit.jsonl) β”‚ β”‚
80
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
81
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
82
- β”‚ Atomic I/O
83
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
84
- β”‚ Dual-Scope Storage Engine (.memory/) β”‚
85
- β”‚ β”‚
86
- β”‚ .memory/ β”‚
87
- β”‚ β”œβ”€β”€ memory.db # Primary SQLite cognitive database β”‚
88
- β”‚ β”œβ”€β”€ CURRENT.md # Active hard constraints & handoff β”‚
89
- β”‚ β”œβ”€β”€ USER.md # Persona & developer preferences β”‚
90
- β”‚ β”œβ”€β”€ audit.jsonl # Append-only operational audit trailβ”‚
91
- β”‚ └── memories/ # Dual-persisted YAML export mirror β”‚
92
- β”‚ β”œβ”€β”€ m_1700000001000_auth.yaml β”‚
93
- β”‚ └── m_1700000002000_arch.yaml β”‚
94
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
102
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
103
+ β”‚ AI Agents, Subagent Pods & Autonomous Swarms β”‚
104
+ β”‚ (Claude Code, Cursor, Antigravity, Windsurf, Codex, CLI) β”‚
105
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
106
+ β”‚ MCP stdio / Terminal CLI β”‚ Local HTTP
107
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
108
+ β”‚ Muse Memory Core Engine β”‚
109
+ β”‚ β”‚
110
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
111
+ β”‚ β”‚ Unified Context & β”‚ β”‚ 5-Pillar Health Gate β”‚ β”‚ Autonomous Cognition β”‚ β”‚
112
+ β”‚ β”‚ Knapsack Retrieval β”‚ β”‚ & ADR Drift Sentry β”‚ β”‚ & "Why" Reasoner β”‚ β”‚
113
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
114
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
115
+ β”‚ β”‚ P2P Gossip Sync β”‚ β”‚ Monorepo Workspace β”‚ β”‚ Web Observability β”‚ β”‚
116
+ β”‚ β”‚ (Vector Clock Mesh) β”‚ β”‚ Cross-Project Mesh β”‚ β”‚ Studio (memory studio)β”‚ β”‚
117
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
118
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
119
+ β”‚ β”‚ Vibeguard Credential β”‚ β”‚ Dynamic Code Anchors β”‚ β”‚ Universal Migrator β”‚ β”‚
120
+ β”‚ β”‚ Secret Defense β”‚ β”‚ & Structural Hashes β”‚ β”‚ (29 Engines) β”‚ β”‚
121
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
122
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
123
+ β”‚ Atomic SQLite & File I/O
124
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
125
+ β”‚ Dual-Scope Storage Engine (.memory/) β”‚
126
+ β”‚ β”‚
127
+ β”‚ .memory/ β”‚
128
+ β”‚ β”œβ”€β”€ memory.db # Primary SQLite database (WAL + FTS5 BM25) β”‚
129
+ β”‚ β”œβ”€β”€ CURRENT.md # Real-time working constraints & session handoffs β”‚
130
+ β”‚ β”œβ”€β”€ USER.md # Persona archetypes & working style preferences β”‚
131
+ β”‚ β”œβ”€β”€ sync_pool/ # Zero-daemon shared P2P gossip pool drop folder β”‚
132
+ β”‚ β”œβ”€β”€ mesh_links.json # Explicit multi-repo cross-project mesh links β”‚
133
+ β”‚ β”œβ”€β”€ sync_peers.json # Peer agent vector clock causal tracking ledger β”‚
134
+ β”‚ β”œβ”€β”€ audit.jsonl # Append-only operational audit & compliance trail β”‚
135
+ β”‚ └── memories/ # Dual-persisted human-readable YAML mirror β”‚
136
+ β”‚ β”œβ”€β”€ m_1700000001000_auth.yaml β”‚
137
+ β”‚ └── m_1700000002000_mesh.yaml β”‚
138
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
95
139
  ```
96
140
 
97
141
  ---
@@ -169,20 +213,6 @@ memory upgrade
169
213
  npx musememory upgrade
170
214
  ```
171
215
 
172
- ```
173
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
174
- β”‚ 🧠 MUSE MEMORY Β· SYSTEM LEVEL-UP & RECOVERY MATRIX β”‚
175
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
176
-
177
- [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% βœ“ LEVEL 1: Vibeguard Security & Credential Audit [OK]
178
- [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% βœ“ LEVEL 2: Package Manager Sync (bun/npm) [OK]
179
- [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% βœ“ LEVEL 3: Synaptic Storage & Schema Alignment [OK]
180
- [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% βœ“ LEVEL 4: 80+ Agent Platforms & Skills Auto-Wiring [OK]
181
- [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] 100% βœ“ LEVEL 5: Cognitive Ascendance Complete [OK]
182
-
183
- πŸ† [LEVEL-UP COMPLETE] Muse Memory is now fully armed and up to date!
184
- ```
185
-
186
216
  #### What `memory upgrade` automatically handles:
187
217
  1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and pulls the latest published binary.
188
218
  2. **Self-Healing Storage Repair**: Recovers missing `.memory/`, `CURRENT.md` constraints, or `USER.md` persona files if corrupted or deleted.
@@ -360,18 +390,23 @@ memory migrate --all
360
390
 
361
391
  ---
362
392
 
363
- ## 🌐 Cognitive Studio Dashboard (`memory ui`)
393
+ ## 🌐 Cognitive Studio Dashboard (`memory ui` / `memory studio`)
364
394
 
365
- Muse Memory includes an embedded, zero-dependency visual graph studio:
395
+ Muse Memory includes an embedded, zero-dependency visual graph studio and observability dashboard:
366
396
 
367
397
  ```bash
368
- memory ui
369
- # or specify a custom port (default: 2222)
398
+ memory studio
399
+ # or alias:
370
400
  memory ui --port 2222
371
401
  ```
372
402
 
373
403
  Navigate to `http://localhost:2222` to access:
374
404
  - 🌐 **3D Force-Directed Knowledge Graph**: Orbital canvas physics, degree-scaled node radii, and link relationship viewer.
405
+ - πŸ₯ **5-Pillar Project Health Gate**: Live architectural scorecard (Store Integrity, Native Anchors, Doc-Code Alignment, Anti-Pattern Sentry, Technical Debt) with A-F grading and PASS/WARN/FAIL status.
406
+ - πŸ›οΈ **ADR Registry & Drift Inspector**: First-class Architecture Decision Records and bi-directional code ↔ documentation drift auditor.
407
+ - πŸ€” **Autonomous "Why" Reasoner**: Traces historical evolution of symbols/files backwards through past bug fixes and trade-offs to explain architectural rationale before refactoring.
408
+ - 🀝 **P2P Gossip Mesh Topology**: Real-time peer vector clocks, local agent identity, and one-click broadcast/shared pool sync.
409
+ - πŸ•ΈοΈ **Monorepo & Cross-Project Mesh**: Workspace monorepo topology (pnpm, npm, bun, lerna), discovered package nodes, cross-project memory query, and contract drift audit.
375
410
  - ⚑ **Active Invariants & Real-Time Handoff**: Live `CURRENT.md` monitor tracking in-flight session status and agent checkpoints.
376
411
  - πŸ“š **Obsidian Wiki Browser**: Concept and entity page reader with full Markdown rendering.
377
412
  - πŸ‘€ **Persona Studio (`USER.md`)**: 5 archetype picker (`developer`, `designer`, `marketer`, `casual`, `custom`) and live editor.
@@ -403,6 +438,12 @@ When registered as an MCP server, `musememory` exposes the following native tool
403
438
  | `memory_archive` / `rehydrate` | **Archival Lifecycle** | Evaluates and manages `active` $\rightarrow$ `cold` $\rightarrow$ `dormant` $\rightarrow$ `archived` lifecycle with query rehydration. |
404
439
  | `memory_lifecycle_stats` / `sweep` | **Lifecycle Sweeper** | Reports store-wide lifecycle statistics and executes sweep transitions for aging memories. |
405
440
  | `anchor_create` / `verify` / `audit` | **Code Identity** | Creates, verifies, and audits line-independent structural code anchors. |
441
+ | `muse_sync_broadcast` / `ingest` | **P2P Gossip Mesh** | Broadcasts and ingests portable sealed SyncPackets with deduplication and contradiction flagging. |
442
+ | `muse_sync_status` / `pool` | **Sync Coordination** | Tracks peer vector clocks and synchronizes memories bidirectionally via shared drop-directory pool. |
443
+ | `muse_mesh_status` | **Monorepo Topology** | Discovers monorepo workspaces and multi-repo sibling groups with package dependencies and stores. |
444
+ | `muse_mesh_query` | **Cross-Project Query** | Queries memories across the entire workspace mesh with origin package provenance tags. |
445
+ | `muse_mesh_audit` | **Contract Verification** | Audits cross-package dependency contracts, entrypoint exports, and cross-repo code anchors. |
446
+ | `muse_mesh_link` | **Mesh Linking** | Explicitly links or unlinks external repository paths into the workspace mesh registry. |
406
447
  | `profile_list` / `profile_switch` | **Tool Management** | Lists and switches task-focused MCP profiles (`core`, `coding`, `debugging`, `review`, `architecture`, `maintenance`). |
407
448
  | `get_context` | **Session Start** | Fetches Top-$K$ ranked memories, `USER.md` profile, active `CURRENT.md` constraints, and supports `--tier 0|1|2`. |
408
449
  | `search` | **Investigation** | Searches memory units with query, token budget, project, type, and verification filters. |
@@ -447,7 +488,7 @@ When registered as an MCP server, `musememory` exposes the following native tool
447
488
  </details>
448
489
 
449
490
  <details>
450
- <summary><b>πŸ’» Full CLI Command Matrix (42 Commands)</b> β€” <i>Click to expand</i></summary>
491
+ <summary><b>πŸ’» Full CLI Command Matrix (47 Commands)</b> β€” <i>Click to expand</i></summary>
451
492
 
452
493
  ```bash
453
494
  memory <command> [arguments] [flags] # alias: musememory
@@ -456,6 +497,11 @@ memory <command> [arguments] [flags] # alias: musememory
456
497
  | Command | Arguments / Flags | Description |
457
498
  | :--- | :--- | :--- |
458
499
  | `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. |
500
+ | `studio` / `ui` | `[--port N] [--global]` | **Web Observability Studio**: visual dashboard with 5-pillar health, ADR drift, why reasoner, and live mesh (default port: `2222`). |
501
+ | `sync` | `[status\|broadcast\|ingest\|pool] [flags]` | **P2P Gossip Mesh**: peer vector clock status, packet export, ingestion, and shared pool gossip sync. |
502
+ | `mesh` | `[overview\|query\|check\|link\|unlink\|propagate] [flags]` | **Monorepo & Multi-Repo Mesh**: workspace discovery, cross-project memory query, and contract drift audit. |
503
+ | `adr` | `[record\|list\|supersede] [args]` | **Architecture Decision Records**: record, list, and supersede living architecture decisions. |
504
+ | `anchor` | `[create\|verify\|audit] [args]` | **Code Anchors**: create, verify, and audit line-independent structural code anchors. |
459
505
  | `install` | `[path] [--global]` | **One-line complete setup**: initializes `.memory/`, `USER.md`, and auto-wires coding agents. |
460
506
  | `doctor` | `[path] [--global]` | **System diagnostic**: checks SQLite primary, schemas, secrets, and MCP connections. |
461
507
  | `uninstall` | `[agent] [--purge] [--dry-run]` | **Clean uninstaller**: unwires MCP configs (and optionally purges `.memory/`). |
@@ -465,7 +511,6 @@ memory <command> [arguments] [flags] # alias: musememory
465
511
  | `agents` | *(none)* | Scan workstation for 80+ coding agents (Cursor, Claude Code, Antigravity, etc.). |
466
512
  | `detect` | *(none)* | Scan workstation and local workspace for 29 external memory systems. |
467
513
  | `migrate` | `[--provider P] [--all] [--dry-run] [--overwrite]` | Migrate memories into Muse Memory preserving active/archived state. |
468
- | `ui` | `[--port N] [--global]` | Launch 6-view Cognitive Studio dashboard (default port: `2222`). |
469
514
  | `context` | `[query] [--token-budget N] [--limit N] [--tier 0\|1\|2]` | Retrieve Top-$K$ ranked active context for prompt injection. |
470
515
  | `search` | `<query> [--limit N] [--token-budget N] [--type T]` | Ranked multi-factor token search with score breakdown. |
471
516
  | `search-transcript` | `<query> [file.jsonl] [--window N]` | Full-text search past transcripts with dialogue context windows. |
@@ -506,13 +551,18 @@ memory <command> [arguments] [flags] # alias: musememory
506
551
  <details>
507
552
  <summary><b>🧠 Shipped Agent Skills (<code>.agents/skills/</code>)</b> β€” <i>Click to expand</i></summary>
508
553
 
509
- Muse Memory ships with 6 turnkey Agent Skills designed for coding agents (Claude Code, Cursor, Antigravity, OpenCode, Codex, Gemini CLI, etc.) under `.agents/skills/`:
554
+ Muse Memory ships with 11 turnkey Agent Skills designed for coding agents (Claude Code, Cursor, Antigravity, OpenCode, Codex, Gemini CLI, etc.) under `.agents/skills/`:
510
555
 
511
556
  | Skill | Trigger Phase | Core Agent Responsibility |
512
557
  | :--- | :--- | :--- |
513
558
  | [`muse-ground`](.agents/skills/muse-ground/SKILL.md) | **Session Start** | Retrieves Top-$K$ relevant memories, active `USER.md` persona profile, and `CURRENT.md` constraints before writing code. |
514
559
  | [`muse-capture`](.agents/skills/muse-capture/SKILL.md) | **During Fixes & Refactors** | Captures atomic fix/architecture memories, validates evidence, runs Vibeguard secret scan, and supersedes obsolete knowledge. |
515
560
  | [`muse-current`](.agents/skills/muse-current/SKILL.md) | **Invariants & Handoffs** | Synchronizes hard constraints into `.memory/CURRENT.md` and persists structured handoffs across context resets. |
561
+ | [`muse-health`](.agents/skills/muse-health/SKILL.md) | **Hardening Gates & PRs** | Evaluates 5-pillar architectural health (store, anchors, doc/code alignment, negative sentry, debt) and outputs remediation checklists. |
562
+ | [`muse-drift`](.agents/skills/muse-drift/SKILL.md) | **System Architecture & ADRs** | Audits documentation $\longleftrightarrow$ code drift across 6 states, records living ADRs, and supersedes legacy architectural decisions. |
563
+ | [`muse-why`](.agents/skills/muse-why/SKILL.md) | **Refactoring & Historical Context** | Reconstructs historical rationale, synthesizes past bug fixes and accepted trade-offs, and audits recurring bug friction clusters. |
564
+ | [`muse-sync`](.agents/skills/muse-sync/SKILL.md) | **Multi-Agent & Swarm Gossip** | Coordinates cross-agent knowledge sync with whole-packet SHA-256 integrity, vector clocks, and P2P gossip mesh pool. |
565
+ | [`muse-mesh`](.agents/skills/muse-mesh/SKILL.md) | **Monorepo & Multi-Repo Mesh** | Discovers monorepo workspaces, resolves cross-package memories with badges, and propagates shared security constraints. |
516
566
  | [`muse-graph`](.agents/skills/muse-graph/SKILL.md) | **AST Code Investigation** | Indexes `.codegraph`/`.graphify` symbols and queries symbol-matching decisions with `+0.2` graph overlap bonus. |
517
567
  | [`muse-wiki`](.agents/skills/muse-wiki/SKILL.md) | **Knowledge Compounding** | Compiles confirmed memories into Obsidian-compatible Markdown pages (`[[wikilinks]]`) and entity co-occurrence graphs. |
518
568
  | [`muse-brief`](.agents/skills/muse-brief/SKILL.md) | **Daily Hygiene & Loops** | Generates morning briefings, tracks 90/180-day staleness decay, and surfaces unresolved transcript commitments. |
@@ -550,7 +600,7 @@ memory user set "- Prefers TypeScript, Bun, and ultra terse responses"
550
600
 
551
601
  ```bash
552
602
  bun install
553
- bun test # 322 passed across 58 test files (1305 assertions)
603
+ bun test # 497 passed across 84 test files (2190 assertions)
554
604
  bun run typecheck # 0 static type errors
555
605
  bun run build # Clean bundled distribution build (dist/index.js)
556
606
  ```