musememory 2.1.0 โ 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/context/current.md +7 -2
- package/.agents/skills/muse-drift/SKILL.md +70 -0
- package/.agents/skills/muse-health/SKILL.md +56 -0
- package/.agents/skills/muse-mesh/SKILL.md +66 -0
- package/.agents/skills/muse-sync/SKILL.md +63 -0
- package/.agents/skills/muse-why/SKILL.md +60 -0
- package/README.md +68 -59
- package/dist/index.js +1329 -203
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ๐ Current Shipped State & Active Invariants
|
|
2
2
|
|
|
3
|
-
> **Version**: `v2.1
|
|
4
|
-
> **Status**: Production Release (
|
|
3
|
+
> **Version**: `v2.2.1`
|
|
4
|
+
> **Status**: Production Release (Hardened v2.2 with Linus-Style Code Review Bug Fixes)
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -34,6 +34,11 @@
|
|
|
34
34
|
25. **Cross-Agent Knowledge Sync & P2P Gossip Protocol (R14)**: Portable sealed `SyncPacket` with SHA-256 integrity, vector clock causal ordering, bidirectional shared pool drop-directory gossip exchange, deduplication, Vibeguard secret scrubbing, and semantic contradiction tagging with mutual `conflict_ids`.
|
|
35
35
|
26. **Full Web Observability Studio & Interactive Visual Dashboard (R15)**: Integrated web studio served over local HTTP (`memory studio`), featuring a 5-pillar health scorecard, overall letter grade, prioritized remediation action checklist, ADR registry with code-to-doc drift inspector, autonomous "Why" reasoner, bug friction clusters heatmap, debt hotspots, and live P2P mesh topology visualizer.
|
|
36
36
|
27. **Multi-Repo & Monorepo Cross-Project Mesh (R16)**: Automatic workspace detection across pnpm, npm, bun, lerna, and multi-repo sibling groups; cross-project memory querying with origin package provenance; cross-package contract and entrypoint export auditing; explicit mesh linking (`mesh_links.json`); and shared invariant propagation across the entire mesh.
|
|
37
|
+
28. **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`).
|
|
38
|
+
29. **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`).
|
|
39
|
+
30. **Interactive Code Anchor Reconciler**: Audits and repairs code anchors across memories, pruning dead references and updating structural hashes (`memory reconcile` / `muse_reconcile_anchors`).
|
|
40
|
+
31. **Latency & Quality Telemetry Suite**: Benchmarks microsecond hot caches, FTS5 BM25 search, knapsack token packing, and ROI in a clean ASCII scoreboard (`memory benchmark`).
|
|
41
|
+
32. **Linus-Style Architectural Hardening (v2.2.1)**: Elimination of shell command injection via `execFileSync`, concurrency-safe `PRAGMA busy_timeout = 5000` on SQLite WAL mode, O(N) stat storm elimination in `list(store)`, structured warnings on YAML dual-write failures, and tightened word-boundary/code-anchor ADR matching.
|
|
37
42
|
|
|
38
43
|
---
|
|
39
44
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-drift
|
|
3
|
+
description: Living Architecture Decision Records (ADRs) and bidirectional documentation-to-code drift auditor. Investigates architectural drift, records living decisions, and maintains doc-code harmony.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐๏ธ Muse Drift (`muse-drift`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute when introducing architectural changes, making technology choices, refactoring system boundaries, or checking if documentation matches actual implementation.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Audit Documentation $\longleftrightarrow$ Code Alignment
|
|
15
|
+
Call the `memory_drift_audit` MCP tool (or run `memory drift`):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"dir": "."
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The auditor classifies documented items across 6 mutually exclusive states:
|
|
24
|
+
- `DOCUMENTED`: Architectural guidelines described in docs/ADRs.
|
|
25
|
+
- `IMPLEMENTED`: Verified clean match between doc and code AST.
|
|
26
|
+
- `PARTIAL`: Incomplete implementation or missing export.
|
|
27
|
+
- `CONFLICTING`: Code directly contradicts documented architecture.
|
|
28
|
+
- `STALE`: Document references removed modules or legacy abstractions.
|
|
29
|
+
- `MISSING`: Code exists with zero architectural documentation.
|
|
30
|
+
|
|
31
|
+
### Step 2: Record Living Architecture Decision Records (ADRs)
|
|
32
|
+
When establishing or changing an architectural design decision, record a first-class ADR using `memory_adr_record`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"title": "Use SQLite WAL and Microsecond In-Process Memory Cache",
|
|
37
|
+
"decision": "All memory read/write operations must use in-process SQLite WAL mode with an L0 hot cache. No resident background daemons.",
|
|
38
|
+
"status": "accepted",
|
|
39
|
+
"context_and_drivers": [
|
|
40
|
+
"Zero-daemon constraint",
|
|
41
|
+
"Sub-millisecond latency requirement for CLI commands"
|
|
42
|
+
],
|
|
43
|
+
"consequences": {
|
|
44
|
+
"positive": ["Microsecond hot cache lookups", "Concurrent multi-process reads"],
|
|
45
|
+
"negative": ["Requires file locking management on write"]
|
|
46
|
+
},
|
|
47
|
+
"anchors": [
|
|
48
|
+
{ "kind": "file", "file_path": "src/store.ts" },
|
|
49
|
+
{ "kind": "file", "file_path": "src/cache.ts" }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 3: Supersede Obsolete Decisions
|
|
55
|
+
When replacing an existing ADR, provide the `supersedes` parameter with the old ADR ID. The engine automatically marks the old decision as `superseded` and records full provenance in the audit ledger.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## ๐ป CLI Equivalents (Zero-MCP Fallback)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Check repository documentation vs code drift
|
|
63
|
+
memory drift
|
|
64
|
+
|
|
65
|
+
# List all living Architecture Decision Records
|
|
66
|
+
memory adr list
|
|
67
|
+
|
|
68
|
+
# Record a new Architecture Decision Record
|
|
69
|
+
memory adr record "Decision Title" --decision "..." --positive "..." --negative "..."
|
|
70
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-health
|
|
3
|
+
description: Unified 5-pillar project health gate governor. Audits store integrity, code anchors, doc/code alignment, negative sentry, and technical debt to enforce production hardening gates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ฅ Muse Health (`muse-health`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute before completing features, opening pull requests, or cutting releases to verify repository hardening and architectural health.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Run 5-Pillar Health Gate
|
|
15
|
+
Call the `muse_health` MCP tool (or execute `memory health`):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"dir": "."
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Step 2: Evaluate 5-Pillar Scorecard
|
|
24
|
+
The engine evaluates 5 distinct hardening dimensions, outputting an overall letter grade (**AโF**) and a gate status (**PASS**, **WARN**, or **FAIL**):
|
|
25
|
+
|
|
26
|
+
1. **Pillar 1: Store Integrity**:
|
|
27
|
+
- Validates referential integrity, YAML schema conformances, bidirectional links, and missing target memory IDs.
|
|
28
|
+
2. **Pillar 2: Native Code Anchors**:
|
|
29
|
+
- Verifies whether files, functions, and symbols referenced by code anchors exist on disk, flagging drifted structural hashes or orphaned anchors.
|
|
30
|
+
3. **Pillar 3: Doc $\longleftrightarrow$ Code Alignment**:
|
|
31
|
+
- Audits living ADRs and documented invariants against actual code implementations, identifying conflicting, stale, or missing code.
|
|
32
|
+
4. **Pillar 4: Negative Anti-Pattern Sentry**:
|
|
33
|
+
- Checks if any known `DO_NOT_USE` patterns, regression bug fixes, or failed approaches have resurfaced in the active working tree.
|
|
34
|
+
5. **Pillar 5: Technical Debt & Workaround Sentry**:
|
|
35
|
+
- Detects unresolved `TODO`/`FIXME`/`HACK` comments, dangerous type casts (`as any`), and drifted architectural commitments.
|
|
36
|
+
|
|
37
|
+
### Step 3: Execute Actionable Remediation Checklist
|
|
38
|
+
If the gate status is **WARN** or **FAIL**, the engine outputs an ordered remediation checklist. Execute the prioritized items:
|
|
39
|
+
- Prune or re-link orphaned code anchors via `memory reconcile --prune`.
|
|
40
|
+
- Adhere to active ADR decisions.
|
|
41
|
+
- Resolve flagged type assertions or negative pattern recurrences.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## ๐ป CLI Equivalents (Zero-MCP Fallback)
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Full terminal health dashboard
|
|
49
|
+
memory health
|
|
50
|
+
|
|
51
|
+
# Output raw JSON for CI/CD gating (exits 1 on FAIL)
|
|
52
|
+
memory health --json
|
|
53
|
+
|
|
54
|
+
# Interactively audit and prune orphaned code anchors
|
|
55
|
+
memory reconcile --prune
|
|
56
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-mesh
|
|
3
|
+
description: Multi-repo and monorepo cross-project knowledge mesh. Resolves memories across package boundaries, broadcasts shared invariants, and audits cross-package dependency contract integrity.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ธ๏ธ Muse Mesh (`muse-mesh`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute in monorepo environments (pnpm, npm, bun, lerna) or multi-repo projects when code spans multiple package boundaries or microservices.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Discover Monorepo Topology
|
|
15
|
+
Call the `muse_mesh_status` MCP tool (or run `memory mesh overview`):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"dir": "."
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Automatically inspects `pnpm-workspace.yaml`, `package.json` workspaces, or `lerna.json`, listing all detected package nodes and explicit mesh links.
|
|
24
|
+
|
|
25
|
+
### Step 2: Query Knowledge Across Package Boundaries
|
|
26
|
+
Call `muse_mesh_query` to search memories across all connected packages:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"query": "authentication session store",
|
|
31
|
+
"scope": "all"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Results include origin package provenance badges (e.g. `[mesh:@scope/core]`), preventing agents in frontend apps from hallucinating backend contract violations.
|
|
36
|
+
|
|
37
|
+
### Step 3: Broadcast Shared Invariants to All Packages
|
|
38
|
+
When establishing a monorepo-wide rule (e.g., "All microservices must use JWT v2 tokens"):
|
|
39
|
+
- Use `memory mesh propagate --constraint "Use JWT v2 tokens across all services"`.
|
|
40
|
+
- The invariant is atomically stamped into every package's `.memory/CURRENT.md`.
|
|
41
|
+
|
|
42
|
+
### Step 4: Audit Cross-Package Contracts
|
|
43
|
+
Call `muse_mesh_audit` (or run `memory mesh check`):
|
|
44
|
+
- Verifies that cross-package imports match valid export entrypoints.
|
|
45
|
+
- Flags drifted cross-repo code anchors.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ๐ป CLI Equivalents (Zero-MCP Fallback)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Display monorepo mesh topology and linked packages
|
|
53
|
+
memory mesh overview
|
|
54
|
+
|
|
55
|
+
# Query memories across all monorepo packages
|
|
56
|
+
memory mesh query "database pool" --scope all
|
|
57
|
+
|
|
58
|
+
# Audit cross-package contract integrity
|
|
59
|
+
memory mesh check
|
|
60
|
+
|
|
61
|
+
# Propagate a critical security constraint across all packages
|
|
62
|
+
memory mesh propagate --constraint "Never expose database connection strings"
|
|
63
|
+
|
|
64
|
+
# Explicitly link an external sibling repository
|
|
65
|
+
memory mesh link ../external-service
|
|
66
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-sync
|
|
3
|
+
description: Cross-agent knowledge sync and P2P gossip mesh protocol. Enables multi-agent swarms and isolated subagent teams to exchange insights, deduplicate knowledge, and resolve contradictions asynchronously.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ค Muse Sync (`muse-sync`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute when coordinating multi-agent workflows (e.g., frontend, backend, and test subagents), sharing verified bug fixes between worktrees, or consolidating swarm learnings.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Check Peer Mesh & Vector Clock Status
|
|
15
|
+
Call the `muse_sync_status` MCP tool (or run `memory sync --status`):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"dir": "."
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Returns peer agent vector clocks, tracked packet generations, and pending incoming packets.
|
|
24
|
+
|
|
25
|
+
### Step 2: Broadcast a Sealed Knowledge Packet
|
|
26
|
+
To export recent confirmed memories, bug fixes, and active constraints into a portable packet:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"project": "my-project",
|
|
31
|
+
"export_constraints": true
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The engine creates a cryptographically sealed `SyncPacket` with:
|
|
36
|
+
- Whole-packet SHA-256 checksum verification.
|
|
37
|
+
- Vector clock causal sequencing (`sender_id` + logical sequence).
|
|
38
|
+
- Automatic Vibeguard secret inspection prior to packaging.
|
|
39
|
+
|
|
40
|
+
### Step 3: Synchronize via Zero-Daemon Shared Pool
|
|
41
|
+
Call `muse_sync_pool` (or run `memory sync --pool`):
|
|
42
|
+
- Broadcasts un-synced memories into `.memory/sync_pool/`.
|
|
43
|
+
- Ingests new packets dropped by peer subagents.
|
|
44
|
+
- Eliminates duplicate entries automatically.
|
|
45
|
+
- Flags semantic contradictions with mutual `conflict_ids` and triggers dispute resolution.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ๐ป CLI Equivalents (Zero-MCP Fallback)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# View peer agent sync status and vector clocks
|
|
53
|
+
memory sync --status
|
|
54
|
+
|
|
55
|
+
# Broadcast confirmed memories to an exported packet
|
|
56
|
+
memory sync --broadcast --out ./shared_sync.json
|
|
57
|
+
|
|
58
|
+
# Ingest peer knowledge packet with secret scrubbing
|
|
59
|
+
memory sync --ingest ./shared_sync.json
|
|
60
|
+
|
|
61
|
+
# Bidirectionally sync with the shared filesystem gossip pool
|
|
62
|
+
memory sync --pool
|
|
63
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-why
|
|
3
|
+
description: Historical rationale and code evolution explainer. Synthesizes past ADRs, bug fixes, trade-offs, and invariants to explain why code was written the way it is before refactoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ๐ค Muse Why (`muse-why`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute before modifying unfamiliar code, refactoring complex logic, or when encountering code patterns that look unusual or overly defensive.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ๐ Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Query Code Rationale ("Why is this code like this?")
|
|
15
|
+
Call the `muse_why` MCP tool:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"target": "src/mcp.ts",
|
|
20
|
+
"symbol": "createServer",
|
|
21
|
+
"query": "Why do we filter tools dynamically by profile?"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The "Why" reasoner traces backwards through history and synthesizes:
|
|
26
|
+
1. **Governing Architecture Decisions**: Living ADRs that authorized or mandated this structure.
|
|
27
|
+
2. **Historical Bug Fixes**: Edge cases and production regressions that necessitated defensive checks.
|
|
28
|
+
3. **Accepted Trade-offs**: Documented compromises between performance, complexity, and safety.
|
|
29
|
+
4. **Timeless Constraints**: Core architectural laws that must remain invariant.
|
|
30
|
+
|
|
31
|
+
### Step 2: Audit Fragility & Bug Friction Clusters
|
|
32
|
+
Call the `muse_bug_clusters` MCP tool:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"dir": "."
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Clusters recurring issues across 5 core root causes:
|
|
41
|
+
- `concurrency_race`: Race conditions, lock timeouts, async synchronization.
|
|
42
|
+
- `type_mismatch`: Dangerous type bypasses, undefined property access.
|
|
43
|
+
- `state_drift`: Out-of-sync cache entries, missing invalidation.
|
|
44
|
+
- `resource_leak`: Unclosed file descriptors, runaway memory consumption.
|
|
45
|
+
- `edge_case`: Boundary errors, empty array handling, malformed input.
|
|
46
|
+
|
|
47
|
+
### Step 3: Check Pre-Flight Code & Memory Impact
|
|
48
|
+
Call `muse_code_impact` (or run `memory code-impact <file> --symbol <sym>`) to check direct callers, affected test suites, and composite risk levels before editing.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## ๐ป CLI Equivalents (Zero-MCP Fallback)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Query unified code & memory impact before editing
|
|
56
|
+
memory code-impact src/mcp.ts --symbol createServer
|
|
57
|
+
|
|
58
|
+
# View technical debt hotspots
|
|
59
|
+
memory tech-debt
|
|
60
|
+
```
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|

|
|
14
14
|

|
|
15
15
|
|
|
16
|
-

|
|
17
17
|

|
|
18
18
|

|
|
19
19
|

|
|
@@ -24,23 +24,34 @@
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
## ๐ What's New
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
27
|
+
## ๐ What's New
|
|
28
|
+
|
|
29
|
+
### v2.2.0
|
|
30
|
+
- **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`).
|
|
31
|
+
- **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`).
|
|
32
|
+
- **Interactive Code Anchor Reconciler**: Audits and repairs code anchors across memories, pruning dead references and updating structural hashes (`memory reconcile` / `muse_reconcile_anchors`).
|
|
33
|
+
- **Latency & Quality Telemetry Suite**: Benchmarks microsecond hot caches, FTS5 BM25 search, knapsack token packing, and ROI in a clean ASCII scoreboard (`memory benchmark`).
|
|
34
|
+
- **Expanded Agent Skills**: Shipped turnkey skills for `muse-health`, `muse-drift`, `muse-why`, `muse-sync`, and `muse-mesh`.
|
|
35
|
+
|
|
36
|
+
### v2.1.0
|
|
37
|
+
- **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_*`).
|
|
38
|
+
- **Web Observability Studio**: Embedded visual dashboard (`memory studio` / `memory ui`) with interactive 5-pillar health, ADR registry, code drift inspector, and sync controls.
|
|
39
|
+
- **Monorepo & Multi-Repo Mesh**: Automatic workspace discovery (pnpm, npm, bun, lerna) with cross-project memory queries and shared constraint propagation (`memory mesh` / `muse_mesh_*`).
|
|
40
|
+
|
|
41
|
+
### v2.0.0
|
|
42
|
+
- **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`).
|
|
43
|
+
- **Cognitive "Why" Reasoner**: Reconstructs historical code evolution, bug workarounds, and trade-offs before refactoring (`muse_why`).
|
|
44
|
+
- **Living Architecture Decision Records (ADRs)**: Queryable ADRs with options, consequences, native code anchors, and supersession lineage (`memory adr` / `memory_adr_record`).
|
|
45
|
+
- **Doc โท Code Drift Engine**: Continuously audits documentation against AST code implementations across 6 drift states (`memory drift` / `memory_drift_audit`).
|
|
46
|
+
- **Unified Context Orchestrator & MCP Profiles**: Single-call fused context injection with knapsack token packing (`muse_context`) and task-specific tool profiles.
|
|
47
|
+
- **Native Structural Code Anchors**: Line-independent structural SHA-256 hashing for files, symbols, and routes.
|
|
48
|
+
- **Scoped Promotion & Archival Lifecycle**: 3-tier promotion ladder (`local` โ `project` โ `global`) and cold/dormant/archived storage tiers.
|
|
38
49
|
|
|
39
50
|
---
|
|
40
51
|
|
|
41
52
|
## ๐ Table of Contents
|
|
42
53
|
|
|
43
|
-
- [๐ What's New
|
|
54
|
+
- [๐ What's New](#-whats-new)
|
|
44
55
|
- [๐ก What is Muse Memory? (TL;DR)](#-what-is-muse-memory-tldr)
|
|
45
56
|
- [โจ Key Feature Highlights](#-key-feature-highlights)
|
|
46
57
|
- [โก Quick Start & Installation](#-quick-start--installation)
|
|
@@ -62,36 +73,43 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
|
|
|
62
73
|
**Muse Memory gives your AI assistants a persistent, self-organizing cognitive notebook directly on your machine.**
|
|
63
74
|
|
|
64
75
|
```
|
|
65
|
-
|
|
66
|
-
โ
|
|
67
|
-
โ
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
โ
|
|
72
|
-
โ
|
|
73
|
-
โ
|
|
74
|
-
โ โ
|
|
75
|
-
โ โ
|
|
76
|
-
โ
|
|
77
|
-
โ
|
|
78
|
-
โ โ
|
|
79
|
-
โ โ(
|
|
80
|
-
โ
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
โ
|
|
85
|
-
|
|
86
|
-
โ
|
|
87
|
-
|
|
88
|
-
โ
|
|
89
|
-
โ
|
|
90
|
-
โ
|
|
91
|
-
โ
|
|
92
|
-
โ
|
|
93
|
-
โ
|
|
94
|
-
|
|
76
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
77
|
+
โ AI Agents, Subagent Pods & Autonomous Swarms โ
|
|
78
|
+
โ (Claude Code, Cursor, Antigravity, Windsurf, Codex, CLI) โ
|
|
79
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
|
|
80
|
+
โ MCP stdio / Terminal CLI โ Local HTTP
|
|
81
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ
|
|
82
|
+
โ Muse Memory Core Engine โ
|
|
83
|
+
โ โ
|
|
84
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
85
|
+
โ โ Unified Context & โ โ 5-Pillar Health Gate โ โ Autonomous Cognition โ โ
|
|
86
|
+
โ โ Knapsack Retrieval โ โ & ADR Drift Sentry โ โ & "Why" Reasoner โ โ
|
|
87
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
88
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
89
|
+
โ โ P2P Gossip Sync โ โ Monorepo Workspace โ โ Web Observability โ โ
|
|
90
|
+
โ โ (Vector Clock Mesh) โ โ Cross-Project Mesh โ โ Studio (memory studio)โ โ
|
|
91
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
92
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
93
|
+
โ โ Vibeguard Credential โ โ Dynamic Code Anchors โ โ Universal Migrator โ โ
|
|
94
|
+
โ โ Secret Defense โ โ & Structural Hashes โ โ (29 Engines) โ โ
|
|
95
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
96
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
97
|
+
โ Atomic SQLite & File I/O
|
|
98
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
99
|
+
โ Dual-Scope Storage Engine (.memory/) โ
|
|
100
|
+
โ โ
|
|
101
|
+
โ .memory/ โ
|
|
102
|
+
โ โโโ memory.db # Primary SQLite database (WAL + FTS5 BM25) โ
|
|
103
|
+
โ โโโ CURRENT.md # Real-time working constraints & session handoffs โ
|
|
104
|
+
โ โโโ USER.md # Persona archetypes & working style preferences โ
|
|
105
|
+
โ โโโ sync_pool/ # Zero-daemon shared P2P gossip pool drop folder โ
|
|
106
|
+
โ โโโ mesh_links.json # Explicit multi-repo cross-project mesh links โ
|
|
107
|
+
โ โโโ sync_peers.json # Peer agent vector clock causal tracking ledger โ
|
|
108
|
+
โ โโโ audit.jsonl # Append-only operational audit & compliance trail โ
|
|
109
|
+
โ โโโ memories/ # Dual-persisted human-readable YAML mirror โ
|
|
110
|
+
โ โโโ m_1700000001000_auth.yaml โ
|
|
111
|
+
โ โโโ m_1700000002000_mesh.yaml โ
|
|
112
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
95
113
|
```
|
|
96
114
|
|
|
97
115
|
---
|
|
@@ -169,20 +187,6 @@ memory upgrade
|
|
|
169
187
|
npx musememory upgrade
|
|
170
188
|
```
|
|
171
189
|
|
|
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
190
|
#### What `memory upgrade` automatically handles:
|
|
187
191
|
1. **Package Manager Auto-Detection**: Detects whether your workstation runs `bun`, `npm`, `pnpm`, or `yarn` and pulls the latest published binary.
|
|
188
192
|
2. **Self-Healing Storage Repair**: Recovers missing `.memory/`, `CURRENT.md` constraints, or `USER.md` persona files if corrupted or deleted.
|
|
@@ -521,13 +525,18 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
521
525
|
<details>
|
|
522
526
|
<summary><b>๐ง Shipped Agent Skills (<code>.agents/skills/</code>)</b> โ <i>Click to expand</i></summary>
|
|
523
527
|
|
|
524
|
-
Muse Memory ships with
|
|
528
|
+
Muse Memory ships with 11 turnkey Agent Skills designed for coding agents (Claude Code, Cursor, Antigravity, OpenCode, Codex, Gemini CLI, etc.) under `.agents/skills/`:
|
|
525
529
|
|
|
526
530
|
| Skill | Trigger Phase | Core Agent Responsibility |
|
|
527
531
|
| :--- | :--- | :--- |
|
|
528
532
|
| [`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. |
|
|
529
533
|
| [`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. |
|
|
530
534
|
| [`muse-current`](.agents/skills/muse-current/SKILL.md) | **Invariants & Handoffs** | Synchronizes hard constraints into `.memory/CURRENT.md` and persists structured handoffs across context resets. |
|
|
535
|
+
| [`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. |
|
|
536
|
+
| [`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. |
|
|
537
|
+
| [`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. |
|
|
538
|
+
| [`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. |
|
|
539
|
+
| [`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. |
|
|
531
540
|
| [`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. |
|
|
532
541
|
| [`muse-wiki`](.agents/skills/muse-wiki/SKILL.md) | **Knowledge Compounding** | Compiles confirmed memories into Obsidian-compatible Markdown pages (`[[wikilinks]]`) and entity co-occurrence graphs. |
|
|
533
542
|
| [`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. |
|
|
@@ -565,7 +574,7 @@ memory user set "- Prefers TypeScript, Bun, and ultra terse responses"
|
|
|
565
574
|
|
|
566
575
|
```bash
|
|
567
576
|
bun install
|
|
568
|
-
bun test #
|
|
577
|
+
bun test # 497 passed across 84 test files (2190 assertions)
|
|
569
578
|
bun run typecheck # 0 static type errors
|
|
570
579
|
bun run build # Clean bundled distribution build (dist/index.js)
|
|
571
580
|
```
|