musememory 1.6.1 → 1.7.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/skills/muse-brief/SKILL.md +67 -0
- package/.agents/skills/muse-capture/SKILL.md +70 -0
- package/.agents/skills/muse-current/SKILL.md +62 -0
- package/.agents/skills/muse-graph/SKILL.md +61 -0
- package/.agents/skills/muse-ground/SKILL.md +62 -0
- package/.agents/skills/muse-wiki/SKILL.md +57 -0
- package/README.md +103 -22
- package/dist/index.js +416 -225
- package/package.json +3 -1
- package/skills/muse-brief/SKILL.md +67 -0
- package/skills/muse-capture/SKILL.md +70 -0
- package/skills/muse-current/SKILL.md +62 -0
- package/skills/muse-graph/SKILL.md +61 -0
- package/skills/muse-ground/SKILL.md +62 -0
- package/skills/muse-wiki/SKILL.md +57 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-brief
|
|
3
|
+
description: Proactive daily briefing and knowledge hygiene governor. Scans decaying knowledge, audits policy staleness, tracks overdue due_at deadlines, and surfaces unresolved open loops with zero resident daemons.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ⏰ Muse Brief (`muse-brief`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute at the start of a workday, during daily standup/planning, or when performing knowledge hygiene and backlog triage.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Generate Actionable Daily Briefing
|
|
15
|
+
Run `memory briefing` (or execute via `memory routine run daily-briefing`):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
memory briefing --limit 10
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The briefing renders a clean Markdown summary containing:
|
|
22
|
+
1. **Fresh Insights**: Recently confirmed architectural decisions and bug fixes.
|
|
23
|
+
2. **Upcoming & Overdue Items**: Entries with `due_at` timestamps requiring attention.
|
|
24
|
+
3. **Active Constraints**: Current rules in `.memory/CURRENT.md`.
|
|
25
|
+
4. **Open Loops**: Extracted tasks and unresolved commitments from recent agent sessions.
|
|
26
|
+
|
|
27
|
+
### Step 2: Run Staleness & Attention Audits
|
|
28
|
+
Run `memory nudge` to inspect decaying knowledge:
|
|
29
|
+
- **Policy Decay Check**: Flags fixes older than 90 days or operational rules older than 180 days.
|
|
30
|
+
- **Action**: Prompt the user or agent to re-verify, mark stale (`memory mark-stale <id>`), or supersede with updated patterns.
|
|
31
|
+
|
|
32
|
+
### Step 3: Run Routine Automation (Zero Daemon)
|
|
33
|
+
Declare routine workflows in `.memory/routines.yaml`:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
routines:
|
|
37
|
+
- name: daily-hygiene
|
|
38
|
+
schedule: "0 9 * * 1-5"
|
|
39
|
+
commands:
|
|
40
|
+
- "memory nudge"
|
|
41
|
+
- "memory briefing"
|
|
42
|
+
- "memory wiki compile"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Install the crontab line via `memory routine install daily-hygiene` to run via system cron without any persistent background Node daemon.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🛡️ Invariant Rules for Agents
|
|
50
|
+
|
|
51
|
+
- **Deterministic & Zero-Daemon**: Never launch a long-running background daemon process; execute on-demand or via cron.
|
|
52
|
+
- **Actionable Output**: Highlight only actionable staleness warnings and open loops rather than dumping entire databases.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Generate daily briefing
|
|
60
|
+
memory briefing
|
|
61
|
+
|
|
62
|
+
# Surface overdue items and decaying knowledge
|
|
63
|
+
memory nudge
|
|
64
|
+
|
|
65
|
+
# Execute declared routine
|
|
66
|
+
memory routine run daily-hygiene
|
|
67
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-capture
|
|
3
|
+
description: Autonomous post-fix and architectural decision distillation. Captures atomic, verified knowledge units with inline Vibeguard secret defense and supersedes outdated patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🧠 Muse Capture (`muse-capture`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute immediately after fixing a non-trivial bug, establishing an architectural pattern, learning an operational rule, or making a system decision.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Verify Evidence Before Capturing
|
|
15
|
+
Ensure the fix or decision has been verified with real build outputs, test runs, or command logs:
|
|
16
|
+
- **Evidence Directive**: Do not propose speculative or unverified fixes.
|
|
17
|
+
- **Verification Level**: Tag with `observed`, `reproducible`, `user-confirmed`, or `independently-verified`.
|
|
18
|
+
|
|
19
|
+
### Step 2: Propose Atomic Memory Unit
|
|
20
|
+
Call the `memory_capture` MCP tool:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"title": "Fix SQLite Connection Pool Exhaustion under Bun Microtasks",
|
|
25
|
+
"content": "SQLite WAL mode with busy_timeout=5000ms prevents disk lock errors during concurrent microtask flushes. Use PRAGMA busy_timeout = 5000 in openDatabase.",
|
|
26
|
+
"project": "my-project",
|
|
27
|
+
"type": "fix",
|
|
28
|
+
"tags": ["sqlite", "bun", "concurrency"],
|
|
29
|
+
"salience": 0.9,
|
|
30
|
+
"verification": {
|
|
31
|
+
"level": "independently-verified",
|
|
32
|
+
"test_command": "bun test test/sqlite_concurrency.test.ts"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 3: Handle Knowledge Supersession (When Deprecating Old Knowledge)
|
|
38
|
+
If the new fix or architecture replaces an outdated pattern:
|
|
39
|
+
1. Identify the existing memory ID (e.g. `m_1700000001000_old_pool`).
|
|
40
|
+
2. Call `memory_supersede` to atomically update bidirectional links:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"old_id": "m_1700000001000_old_pool",
|
|
45
|
+
"new_id": "m_1700000002000_new_pool"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 🛡️ Vibeguard Zero-Leakage Protocol
|
|
52
|
+
|
|
53
|
+
- **Automatic Interception**: `memory_capture` automatically scans all proposed fields (title, content, tags, verification commands).
|
|
54
|
+
- **Hard Rejection**: Any presence of AI API keys (`sk-*`), GitHub tokens (`ghp_*`), AWS keys (`AKIA*`), private keys, or passwords will immediately throw an error.
|
|
55
|
+
- **Sanitization Directive**: Always redact secrets to `[REDACTED_SECRET]` before proposing.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Propose a new candidate memory
|
|
63
|
+
memory capture "Fix details" --title "Title" --project my-project --type fix
|
|
64
|
+
|
|
65
|
+
# Confirm a candidate memory
|
|
66
|
+
memory confirm <id>
|
|
67
|
+
|
|
68
|
+
# Supersede an old memory with a confirmed replacement
|
|
69
|
+
memory supersede <old_id> --with <new_id>
|
|
70
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-current
|
|
3
|
+
description: Active working constraints and interruption-proof session handoff manager. Synchronizes hard invariants, open loops, and in-flight checkpoints directly into CURRENT.md.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 📐 Muse Current (`muse-current`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute when the user establishes a hard project invariant, when starting a multi-step task, or before context compaction/task switching to record in-flight handoffs.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Record Hard Constraints
|
|
15
|
+
When a non-negotiable rule or invariant is declared:
|
|
16
|
+
Call `memory_current` or `memory_capture(type="constraint")`:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"action": "append",
|
|
21
|
+
"text": "- Invariant: Never allow cross-origin POST mutations without Origin header check (CSRF defense)."
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This immediately updates `.memory/CURRENT.md` and dual-persists a constraint memory in SQLite.
|
|
26
|
+
|
|
27
|
+
### Step 2: Record Interruption-Proof Session Handoffs
|
|
28
|
+
When completing a subtask, hitting context limits, or preparing for the next agent:
|
|
29
|
+
Append a structured handoff block to `CURRENT.md`:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Active Handoff & Session Checkpoint
|
|
33
|
+
- **Goal**: Migrate SQLite WAL connection pool to asynchronous microtask flushes.
|
|
34
|
+
- **Completed**:
|
|
35
|
+
- Implemented async query worker in `src/sqlite/worker.ts`.
|
|
36
|
+
- Added unit test suite `test/sqlite_worker.test.ts`.
|
|
37
|
+
- **In-Flight / Next Steps**:
|
|
38
|
+
- Wire worker into `src/store.ts` save transaction.
|
|
39
|
+
- Run full suite: `bun test`.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Step 3: Clear Resolved Invariants
|
|
43
|
+
When a temporary constraint or migration phase is complete, update `CURRENT.md` to prune obsolete rules so future context windows stay lightweight.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🛡️ Invariant Rules for Agents
|
|
48
|
+
|
|
49
|
+
- **High Locality**: `CURRENT.md` must contain only active, high-priority invariants and current handoffs—not historical archives.
|
|
50
|
+
- **Zero Hallucination**: Do not contradict constraints recorded in `CURRENT.md`.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Read active working constraints
|
|
58
|
+
memory current get
|
|
59
|
+
|
|
60
|
+
# Append a new active constraint
|
|
61
|
+
memory current set "- Hard constraint description" --project my-project
|
|
62
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-graph
|
|
3
|
+
description: AST code-aware symbol graph investigation and indexing. Integrates CodeGraph and Graphify to map codebase identifiers, auto-tag memories, and rank symbol-matching decisions with graph overlap bonuses.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🌐 Muse Graph (`muse-graph`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute during deep codebase investigation, refactoring critical classes/modules, or diagnosing complex bugs where symbol-level architectural context is required.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Check & Index AST Symbol Graph
|
|
15
|
+
Verify provider status or build the cached AST symbol map:
|
|
16
|
+
- Call `graph_status` MCP tool to check provider availability (`.codegraph` or `.graphify`).
|
|
17
|
+
- Call `graph_index` MCP tool (or run `memory graph index`) to compile a fresh symbol map in `.memory/graph-symbols.json`.
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Step 2: Code-Aware Retrieval Queries
|
|
24
|
+
When querying memories for a specific function, class, or type, include the exact identifier name in your query:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"query": "queryContext knapsack token scoring formula in retrieval.ts",
|
|
29
|
+
"project": "my-project",
|
|
30
|
+
"token_budget": 1500
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 3: Multi-Factor AST Overlap Scoring Bonus
|
|
35
|
+
The retrieval engine matches query tokens against indexed symbols (`entry.graph.symbol_names`), awarding up to **+0.2 graph bonus**:
|
|
36
|
+
|
|
37
|
+
$$\text{Score} = 1.0 \times \text{Applicability} + \text{StatusBonus} + \text{VerificationBonus} + \mathbf{GraphBonus (+0.2)} + \text{TimeDecay}$$
|
|
38
|
+
|
|
39
|
+
Symbol-matching architectural decisions and past fixes rank above generic prose matching.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🛡️ Invariant Rules for Agents
|
|
44
|
+
|
|
45
|
+
- **Opt-In & Non-Blocking**: If no AST graph provider is installed, memory queries and captures fall back gracefully with zero behavioral disruption.
|
|
46
|
+
- **Affected Paths**: Inspect `entry.graph.affected_paths` to discover related files that may be impacted by a refactor.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Check provider status (provider type, availability, revision, symbol count)
|
|
54
|
+
memory graph status
|
|
55
|
+
|
|
56
|
+
# Index codebase AST symbols and cache to .memory/graph-symbols.json
|
|
57
|
+
memory graph index
|
|
58
|
+
|
|
59
|
+
# Search with symbol terms
|
|
60
|
+
memory search "queryContext" --token-budget 1500
|
|
61
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-ground
|
|
3
|
+
description: Pre-flight context and invariant grounding for AI coding agents. Retrieves Top-K relevant memories, active USER.md persona, and CURRENT.md working constraints at the start of any session or major task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🎯 Muse Ground (`muse-ground`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute at the start of every session, task initiation, or context switch before proposing code changes, creating plans, or executing refactors.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Query Context & Constraints
|
|
15
|
+
Call the `get_context` MCP tool (or run `memory context "<query>"`) using your current task objective or keyword domain:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"query": "authentication JWT expiration and database pool configuration",
|
|
20
|
+
"project": "my-project",
|
|
21
|
+
"token_budget": 2000
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Step 2: Ingest Three-Tier Grounding Hierarchy
|
|
26
|
+
The grounding response deterministically packages 3 critical layers in strict priority order:
|
|
27
|
+
|
|
28
|
+
1. **`### User Profile & Preferences (USER.md)`**:
|
|
29
|
+
- Understand the user's role (`developer`, `designer`, `marketer`, `casual`, `custom`).
|
|
30
|
+
- Ground in explicit communication rules (e.g. terse output, runnable diffs, fail-fast mechanics).
|
|
31
|
+
|
|
32
|
+
2. **`### Active Working Constraints (CURRENT.md)`**:
|
|
33
|
+
- Inspect immutable hard invariants (e.g. "Never commit secrets", "Preserve v1 backward compatibility").
|
|
34
|
+
- Review active session handoffs and in-flight checkpoints from previous agents.
|
|
35
|
+
|
|
36
|
+
3. **`### Relevant Memories & Learned Patterns (Top-K)`**:
|
|
37
|
+
- Review past architectural decisions (`type: architecture`).
|
|
38
|
+
- Review previously solved edge-case bug fixes (`type: fix`).
|
|
39
|
+
- Avoid re-introducing known antipatterns or rejected hypotheses (`type: failure` / `status: rejected`).
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🛡️ Invariant Rules for Agents
|
|
44
|
+
|
|
45
|
+
- **Read Before Mutating**: Never edit code without first checking `CURRENT.md` and active constraints.
|
|
46
|
+
- **Fail Fast on Missing Context**: If `get_context` reveals a conflicting historical decision, escalate or verify rather than blindly overriding.
|
|
47
|
+
- **Tone Alignment**: Strictly mirror the persona defined in `USER.md`.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Retrieve top-ranked prompt context
|
|
55
|
+
memory context "query terms" --token-budget 2000
|
|
56
|
+
|
|
57
|
+
# Inspect active working constraints directly
|
|
58
|
+
memory current get
|
|
59
|
+
|
|
60
|
+
# Inspect active user persona profile
|
|
61
|
+
memory user get
|
|
62
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: muse-wiki
|
|
3
|
+
description: Obsidian-compatible knowledge compounding and entity graph generation. Compiles confirmed memories into interlinked Markdown concept pages and tracks named entity co-occurrences.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 📚 Muse Wiki (`muse-wiki`)
|
|
7
|
+
|
|
8
|
+
> **When to use**: Execute at milestone completion, weekly review, or when synthesizing scattered memory units into a structured, readable documentation wiki.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Execution Workflow
|
|
13
|
+
|
|
14
|
+
### Step 1: Compile Knowledge Wiki
|
|
15
|
+
Call the `memory_wiki_compile` MCP tool (or run `memory wiki compile`):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"project": "my-project",
|
|
20
|
+
"min_cluster_size": 2
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This compiles confirmed memories into structured Obsidian Markdown files in `.memory/wiki/`:
|
|
25
|
+
- **Concept Pages (`wiki/concepts/`)**: Clustered architectural concepts with bidirectional `[[concept-slug]]` wikilinks.
|
|
26
|
+
- **Entity Pages (`wiki/entities/`)**: Extracted tools, frameworks, components, and libraries.
|
|
27
|
+
- **Master Index (`wiki/index.md`)**: Table of contents mapping all domain topics.
|
|
28
|
+
|
|
29
|
+
### Step 2: Query Wiki Concepts & Entity Graph
|
|
30
|
+
- Call `memory_wiki_search` / `memory_wiki_get` to read synthesized domain documentation.
|
|
31
|
+
- Call `memory_entities_search` / `memory_entities_get` to inspect entity co-occurrence networks (e.g. which libraries are frequently paired with specific architectures).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 🛡️ Invariant Rules for Agents
|
|
36
|
+
|
|
37
|
+
- **Confirmed Only**: Only `confirmed` memories are compiled into wiki pages to guarantee high signal and prevent draft noise.
|
|
38
|
+
- **Dual Persistence**: Wiki pages are plain Markdown files with YAML frontmatter, fully editable in Obsidian, VS Code, or Cursor.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 💻 CLI Equivalents (Zero-MCP Fallback)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Compile confirmed memories into Obsidian-compatible wiki
|
|
46
|
+
memory wiki compile
|
|
47
|
+
|
|
48
|
+
# List compiled wiki pages
|
|
49
|
+
memory wiki list
|
|
50
|
+
|
|
51
|
+
# Read a specific concept page
|
|
52
|
+
memory wiki show auth-patterns
|
|
53
|
+
|
|
54
|
+
# Inspect entity relationships
|
|
55
|
+
memory entities show nextjs
|
|
56
|
+
memory entities related nextjs
|
|
57
|
+
```
|
package/README.md
CHANGED
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-

|
|
6
|
+

|
|
7
|
+
-black?style=for-the-badge&logo=bun)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
11
20
|
|
|
12
21
|
**Autonomous, Self-Organizing Cognitive Memory System for AI Agents & Agency Networks**
|
|
13
22
|
|
|
@@ -54,13 +63,22 @@ Most AI chatbots and coding assistants have **"goldfish memory"**: every time yo
|
|
|
54
63
|
└─────────────────────────────────────────────────────────────┘
|
|
55
64
|
```
|
|
56
65
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## ✨ Key Feature Highlights
|
|
69
|
+
|
|
70
|
+
- 👤 **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.
|
|
71
|
+
- 📐 **Real-Time Active Constraints (`CURRENT.md`)**: Bi-temporal working constraints and invariant tracking synchronized on every mutation to eliminate amnesia during task handoffs.
|
|
72
|
+
- 💾 **SQLite Primary + Dual-Persisted YAML Mirror**: Sub-millisecond queries via SQLite with transparent human-readable `.yaml` files in `.memory/memories/` for seamless Git diffs.
|
|
73
|
+
- ⚖️ **Token Knapsack Retrieval**: Multi-factor scoring (applicability, verification bonus, AST graph overlap, time decay, due date urgency) tightly packed under prompt token ceilings.
|
|
74
|
+
- 🌐 **Pluggable AST CodeGraph & Symbol Indexing**: Native CodeGraph & Graphify integration that indexes codebase AST symbols, auto-tags memories, and awards graph overlap bonuses.
|
|
75
|
+
- 🌳 **Hierarchical Tree Retrieval & Progressive Disclosure**: Sharded tree partitions with 3-tier progressive disclosure (`L1` abstracts, `L2` summaries, `L3` full context) for massive knowledge bases.
|
|
76
|
+
- 📚 **Obsidian Markdown Wiki & Entity Graph Compiler**: Dual-persistence knowledge compounding compiling linked Markdown pages (`wiki/concepts/`, `wiki/entities/`) with bidirectional `[[wikilinks]]`.
|
|
77
|
+
- 🛡️ **Vibeguard Zero-Leakage Secret Scanner**: Regex-powered memory defense intercepting and rejecting API keys, AWS credentials, private keys, database URIs, and passwords before writes.
|
|
78
|
+
- 🔌 **Zero-Permission Auto-Wiring (80+ Agents)**: Automatically detects and wires Claude Code, Cursor, Antigravity, Windsurf, OpenCode, Codex, Gemini CLI, Hermes, etc.
|
|
79
|
+
- 🔄 **Universal Memory Migrator (29 Engines)**: One-click migration from Letta, Mem0, Supermemory, Cognee, Beads, Mnemosyne, GBrain, and more with state preservation.
|
|
80
|
+
- 🎨 **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.
|
|
81
|
+
- ⏰ **Proactive Nudges & Routines Scheduler**: Cron-invoked daily briefings, staleness policy tracking, and ambient open-loop trackers with zero resident background daemons.
|
|
64
82
|
|
|
65
83
|
---
|
|
66
84
|
|
|
@@ -108,7 +126,7 @@ docker build -t musememory .
|
|
|
108
126
|
|
|
109
127
|
---
|
|
110
128
|
|
|
111
|
-
## 🔄 Complete
|
|
129
|
+
## 🔄 Complete Lifecycle (Install → Verify → Connect → Uninstall)
|
|
112
130
|
|
|
113
131
|
Every command works with **zero installation** via `npx musememory <cmd>` (or `bunx musememory <cmd>`). Use plain `memory <cmd>` if installed globally.
|
|
114
132
|
|
|
@@ -147,18 +165,64 @@ npx musememory connect windsurf
|
|
|
147
165
|
npx musememory connect opencode
|
|
148
166
|
```
|
|
149
167
|
|
|
150
|
-
### 4️⃣ Clean Uninstallation
|
|
168
|
+
### 4️⃣ Clean Uninstallation & Removal
|
|
169
|
+
|
|
170
|
+
<details>
|
|
171
|
+
<summary><b>🗑️ Complete Uninstallation & System Removal Steps</b> — <i>Click to expand</i></summary>
|
|
172
|
+
|
|
173
|
+
Muse Memory can be cleanly and completely removed with zero trace left on your machine.
|
|
174
|
+
|
|
175
|
+
#### Step 1: Unwire Coding Agents (Zero-Trace MCP Cleanup)
|
|
176
|
+
Remove the memory MCP server configuration from all 80+ detected agent config files (`cursor`, `claude-code`, `antigravity`, `windsurf`, `opencode`, `codex`, etc.):
|
|
177
|
+
|
|
151
178
|
```bash
|
|
152
|
-
# Preview
|
|
179
|
+
# Preview changes before modifying any configuration
|
|
153
180
|
npx musememory uninstall --dry-run
|
|
154
181
|
|
|
155
|
-
# Unwire
|
|
182
|
+
# Unwire all detected AI coding agents automatically
|
|
156
183
|
npx musememory uninstall
|
|
157
184
|
|
|
158
|
-
#
|
|
185
|
+
# Or unwire a single specific agent
|
|
186
|
+
npx musememory uninstall cursor
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### Step 2: Purge Memory Data & Stores (Optional)
|
|
190
|
+
By default, `uninstall` preserves your project `.memory/` data. To completely delete all memory files and databases:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Unwire agents AND purge local project .memory/ directory
|
|
159
194
|
npx musememory uninstall --purge
|
|
195
|
+
|
|
196
|
+
# Remove global user profile and global memory store (~/.memory/)
|
|
197
|
+
npx musememory uninstall --global --purge
|
|
198
|
+
|
|
199
|
+
# Manual cleanup (equivalent):
|
|
200
|
+
rm -rf .memory/ # Local project store
|
|
201
|
+
rm -rf ~/.memory/ # Global user profile & store
|
|
160
202
|
```
|
|
161
203
|
|
|
204
|
+
#### Step 3: Remove Globally Installed Package
|
|
205
|
+
If you installed `musememory` globally via a package manager:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# If installed via npm:
|
|
209
|
+
npm uninstall -g musememory
|
|
210
|
+
|
|
211
|
+
# If installed via bun:
|
|
212
|
+
bun remove -g musememory
|
|
213
|
+
|
|
214
|
+
# If installed via yarn / pnpm:
|
|
215
|
+
pnpm remove -g musememory
|
|
216
|
+
yarn global remove musememory
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
#### Step 4: Clean Git Hooks & Directives (Optional)
|
|
220
|
+
If you installed the pre-commit transcript harvester hook or injected agent prompt directives:
|
|
221
|
+
- **Git Hook**: Delete `.git/hooks/pre-commit` (or restore your previous hook).
|
|
222
|
+
- **AGENTS.md**: Remove the `<!-- musememory:start --> ... <!-- musememory:end -->` block from your project's `AGENTS.md` file.
|
|
223
|
+
|
|
224
|
+
</details>
|
|
225
|
+
|
|
162
226
|
---
|
|
163
227
|
|
|
164
228
|
## 🏛️ System Capabilities & Architecture
|
|
@@ -234,7 +298,7 @@ Navigate to `http://localhost:2222` to access:
|
|
|
234
298
|
## 📖 Deep Technical References & Documentation
|
|
235
299
|
|
|
236
300
|
<details>
|
|
237
|
-
<summary><b>🔌 Complete MCP Tool Reference (
|
|
301
|
+
<summary><b>🔌 Complete MCP Tool Reference (29 Tools)</b> — <i>Click to expand</i></summary>
|
|
238
302
|
|
|
239
303
|
When registered as an MCP server, `musememory` exposes the following native tools:
|
|
240
304
|
|
|
@@ -270,7 +334,8 @@ When registered as an MCP server, `musememory` exposes the following native tool
|
|
|
270
334
|
| `memory_export` / `import` | **Team Sharing** | Exports and imports portable JSON memory snapshots. |
|
|
271
335
|
| `memory_validate` | **Integrity Check** | Verifies database integrity and scans for credential leaks. |
|
|
272
336
|
| `memory_settings_get` / `set` | **Configuration** | Reads and updates unified global or project configuration settings. |
|
|
273
|
-
| `graph_status` | **AST Graph** | Inspects CodeGraph symbol overlap provider status. |
|
|
337
|
+
| `graph_status` | **AST Graph** | Inspects CodeGraph/Graphify symbol overlap provider status. |
|
|
338
|
+
| `graph_index` | **AST Graph** | Indexes AST symbol graph and caches in `.memory/graph-symbols.json`. |
|
|
274
339
|
|
|
275
340
|
</details>
|
|
276
341
|
|
|
@@ -317,11 +382,27 @@ memory <command> [arguments] [flags] # alias: musememory
|
|
|
317
382
|
| `entities` | `list\|show <id>\|related <id>` | Inspect extracted knowledge graph entities and co-occurrence weights. |
|
|
318
383
|
| `settings` | `get\|set\|reset\|export\|import` | Manage unified settings across retrieval, wiki, PageIndex, and UI. |
|
|
319
384
|
| `current` | `get` / `set <text> --project P` | Read or append hard constraints in `.memory/CURRENT.md`. |
|
|
320
|
-
| `graph` | `status` | Query active CodeGraph provider status. |
|
|
385
|
+
| `graph` | `status` / `index` | Query active CodeGraph provider status or index AST symbol map. |
|
|
321
386
|
| `mcp` | *(none)* | Start stdio MCP server (Protocol 2024-11-05). |
|
|
322
387
|
|
|
323
388
|
</details>
|
|
324
389
|
|
|
390
|
+
<details>
|
|
391
|
+
<summary><b>🧠 Shipped Agent Skills (<code>.agents/skills/</code>)</b> — <i>Click to expand</i></summary>
|
|
392
|
+
|
|
393
|
+
Muse Memory ships with 6 turnkey Agent Skills designed for coding agents (Claude Code, Cursor, Antigravity, OpenCode, Codex, Gemini CLI, etc.) under `.agents/skills/`:
|
|
394
|
+
|
|
395
|
+
| Skill | Trigger Phase | Core Agent Responsibility |
|
|
396
|
+
| :--- | :--- | :--- |
|
|
397
|
+
| [`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. |
|
|
398
|
+
| [`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. |
|
|
399
|
+
| [`muse-current`](.agents/skills/muse-current/SKILL.md) | **Invariants & Handoffs** | Synchronizes hard constraints into `.memory/CURRENT.md` and persists structured handoffs across context resets. |
|
|
400
|
+
| [`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. |
|
|
401
|
+
| [`muse-wiki`](.agents/skills/muse-wiki/SKILL.md) | **Knowledge Compounding** | Compiles confirmed memories into Obsidian-compatible Markdown pages (`[[wikilinks]]`) and entity co-occurrence graphs. |
|
|
402
|
+
| [`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. |
|
|
403
|
+
|
|
404
|
+
</details>
|
|
405
|
+
|
|
325
406
|
<details>
|
|
326
407
|
<summary><b>👤 5 Zero-Fingerprint Role Archetypes (`USER.md`)</b> — <i>Click to expand</i></summary>
|
|
327
408
|
|
|
@@ -383,7 +464,7 @@ Every Scope-of-Work item is tracked as a GitHub issue and delivered via pull req
|
|
|
383
464
|
|
|
384
465
|
```bash
|
|
385
466
|
bun install
|
|
386
|
-
bun test #
|
|
467
|
+
bun test # 304 passed across 55 test files (1248 assertions)
|
|
387
468
|
bun run typecheck # 0 static type errors
|
|
388
469
|
bun run build # Clean bundled distribution build (dist/index.js)
|
|
389
470
|
```
|