prism-mcp-server 5.5.0 → 6.1.8

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
@@ -10,7 +10,7 @@
10
10
 
11
11
  **Your AI agent forgets everything between sessions. Prism fixes that.**
12
12
 
13
- One command. Persistent memory. Zero cloud dependencies.
13
+ One command. Persistent memory. Local-first by default. Optional cloud power-ups.
14
14
 
15
15
  ```bash
16
16
  npx -y prism-mcp-server
@@ -22,18 +22,18 @@ Works with **Claude Desktop · Claude Code · Cursor · Windsurf · Cline · Gem
22
22
 
23
23
  - [Why Prism?](#why-prism)
24
24
  - [Quick Start](#-quick-start)
25
+ - [The Magic Moment](#-the-magic-moment)
25
26
  - [Setup Guides](#-setup-guides)
26
27
  - [What Makes Prism Different](#-what-makes-prism-different)
27
28
  - [Use Cases](#-use-cases)
28
29
  - [What's New](#-whats-new)
29
- - [Autonomous Web Scholar](#-autonomous-web-scholar)
30
- - [How Prism Compares](#how-prism-compares)
30
+ - [How Prism Compares](#-how-prism-compares)
31
31
  - [Tool Reference](#-tool-reference)
32
32
  - [Environment Variables](#environment-variables)
33
33
  - [Architecture](#architecture)
34
- - [Research Roadmap](#research-roadmap)
35
- - [Roadmap](#-roadmap)
36
- - [Limitations](#-limitations)
34
+ - [Scientific Foundation](#-scientific-foundation)
35
+ - [Product Roadmap](#-product-roadmap)
36
+ - [Limitations](#limitations)
37
37
 
38
38
  ---
39
39
 
@@ -61,9 +61,47 @@ Add to your MCP client config (`claude_desktop_config.json`, `.cursor/mcp.json`,
61
61
  }
62
62
  ```
63
63
 
64
- **That's it.** Restart your client. All 30+ tools are available. Dashboard at `http://localhost:3000`.
64
+ > **Note on Windows/Restricted Shells:** If your MCP client complains that `npx` is not found, use the absolute path to your node binary (e.g. `C:\Program Files\nodejs\npx.cmd`) or install globally with caution.
65
65
 
66
- > 🔑 **API Key Requirements:** Need semantic search, Morning Briefings, or auto-compaction? Provide a `GOOGLE_API_KEY` (Gemini) or equivalent. Want Web Scholar to search the live internet? Provide a `BRAVE_API_KEY`. Without keys, Prism still works but falls back to local keyword search (FTS5). See [Environment Variables](#environment-variables).
66
+ **That's it.** Restart your client. All tools are available. Dashboard at `http://localhost:3000`. *(Note: The MCP server automatically starts this UI on port 3000 when connected. If you have a Next.js/React app running, port 3000 might already be in use.)*
67
+
68
+ ### Capability Matrix
69
+
70
+ | Feature | Local (Offline) | Cloud (API Key) |
71
+ |:--------|:---:|:---:|
72
+ | Session memory & handoffs | ✅ | ✅ |
73
+ | Keyword search (FTS5) | ✅ | ✅ |
74
+ | Time travel & versioning | ✅ | ✅ |
75
+ | Mind Palace Dashboard | ✅ | ✅ |
76
+ | GDPR export (JSON/Markdown/Vault) | ✅ | ✅ |
77
+ | Semantic vector search | ❌ | ✅ `GOOGLE_API_KEY` |
78
+ | Morning Briefings | ❌ | ✅ `GOOGLE_API_KEY` |
79
+ | Auto-compaction | ❌ | ✅ `GOOGLE_API_KEY` |
80
+ | Web Scholar research | ❌ | ✅ `BRAVE_API_KEY` + `FIRECRAWL_API_KEY` |
81
+ | VLM image captioning | ❌ | ✅ Provider key |
82
+
83
+ > 🔑 The core Mind Palace works **100% offline** with zero API keys. Cloud keys unlock intelligence features. See [Environment Variables](#environment-variables).
84
+
85
+ ---
86
+
87
+ ## ✨ The Magic Moment
88
+
89
+ > **Session 1** (Monday evening):
90
+ > ```
91
+ > You: "Analyze this auth architecture and plan the OAuth migration."
92
+ > Agent: *deep analysis, decisions, TODO list*
93
+ > Agent: session_save_ledger → session_save_handoff ✅
94
+ > ```
95
+ >
96
+ > **Session 2** (Tuesday morning — new conversation, new context window):
97
+ > ```
98
+ > Agent: session_load_context → "Welcome back! Yesterday we decided to use PKCE
99
+ > flow with refresh tokens. 3 TODOs remain: migrate the user table,
100
+ > update the middleware, and write integration tests."
101
+ > You: "Pick up where we left off."
102
+ > ```
103
+ >
104
+ > **Your agent remembers everything.** No re-uploading files. No re-explaining decisions.
67
105
 
68
106
  ---
69
107
 
@@ -145,19 +183,19 @@ Add to your Continue `config.json` or Cline MCP settings:
145
183
 
146
184
  </details>
147
185
 
148
- #### Migration
186
+ ### Migration
149
187
 
150
188
  <details>
151
189
  <summary><strong>Migrating Existing History (Claude, Gemini, OpenAI)</strong></summary>
152
190
 
153
191
  Prism can ingest months of historical sessions from other tools to give your Mind Palace a massive head start. Import via the **CLI** or directly from the [Mind Palace Dashboard](#-mind-palace-dashboard) Import tab (file picker + manual path + dry-run toggle).
154
192
 
155
- ### Supported Formats
193
+ #### Supported Formats
156
194
  * **Claude Code** (`.jsonl` logs) — Automatically handles streaming chunk deduplication and `requestId` normalization.
157
195
  * **Gemini** (JSON history arrays) — Supports large-file streaming for 100MB+ exports.
158
196
  * **OpenAI** (JSON chat completion history) — Normalizes disparate tool-call structures into the unified Ledger schema.
159
197
 
160
- ### How to Run
198
+ #### How to Run
161
199
 
162
200
  **Option 1 — CLI:**
163
201
 
@@ -171,7 +209,7 @@ npx -y prism-mcp-server universal-import --format gemini --path ./gemini_history
171
209
 
172
210
  **Option 2 — Dashboard:** Open `localhost:3000`, navigate to the **Import** tab, select the format and file, and click Import. Supports dry-run preview. See the [dashboard screenshot](#-mind-palace-dashboard) above.
173
211
 
174
- ### Key Features
212
+ #### Key Features
175
213
  * **OOM-Safe Streaming:** Processes massive log files line-by-line using `stream-json`.
176
214
  * **Idempotent Dedup:** Content-hash prevents duplicate imports on re-run (`skipCount` reported).
177
215
  * **Chronological Integrity:** Uses timestamp fallbacks and `requestId` sorting to ensure your memory timeline is accurate.
@@ -180,166 +218,23 @@ npx -y prism-mcp-server universal-import --format gemini --path ./gemini_history
180
218
  </details>
181
219
 
182
220
  <details>
183
- <summary><strong>Claude Code — Lifecycle Hooks (Auto-Load & Auto-Save)</strong></summary>
184
-
185
- Claude Code supports `SessionStart` and `Stop` hooks that force the agent to load/save Prism context automatically.
186
-
187
- ### 1. Create the Hook Script
188
-
189
- Save as `~/.claude/mcp_autoload_hook.py`:
221
+ <summary><strong>Claude Code — Lifecycle Autoload (.clauderules)</strong></summary>
190
222
 
191
- ```python
192
- #!/usr/bin/env python3
193
- import json, sys
223
+ Claude Code naturally picks up MCP tools by adding them to your workspace `.clauderules`. Simply add:
194
224
 
195
- def main():
196
- print(json.dumps({
197
- "continue": True,
198
- "suppressOutput": True,
199
- "systemMessage": (
200
- "## First Action\n"
201
- "Call `mcp__prism-mcp__session_load_context(project='my-project', level='deep')` "
202
- "before responding to the user. Do not generate any text before calling this tool."
203
- )
204
- }))
205
-
206
- if __name__ == "__main__":
207
- main()
208
- ```
209
-
210
- ### 2. Configure `settings.json`
211
-
212
- ```json
213
- {
214
- "hooks": {
215
- "SessionStart": [
216
- {
217
- "matcher": "*",
218
- "hooks": [
219
- {
220
- "type": "command",
221
- "command": "python3 /Users/you/.claude/mcp_autoload_hook.py",
222
- "timeout": 10
223
- }
224
- ]
225
- }
226
- ],
227
- "Stop": [
228
- {
229
- "matcher": "*",
230
- "hooks": [
231
- {
232
- "type": "command",
233
- "command": "python3 -c \"import json; print(json.dumps({'continue': True, 'suppressOutput': True, 'systemMessage': 'MANDATORY END WORKFLOW: 1) Call mcp__prism-mcp__session_save_ledger with project and summary. 2) Call mcp__prism-mcp__session_save_handoff with expected_version set to the loaded version.'}))\""
234
- }
235
- ]
236
- }
237
- ]
238
- },
239
- "permissions": {
240
- "allow": [
241
- "mcp__prism-mcp__session_load_context",
242
- "mcp__prism-mcp__session_save_ledger",
243
- "mcp__prism-mcp__session_save_handoff",
244
- "mcp__prism-mcp__knowledge_search",
245
- "mcp__prism-mcp__session_search_memory"
246
- ]
247
- }
248
- }
225
+ ```markdown
226
+ Always start the conversation by calling `mcp__prism-mcp__session_load_context(project='my-project', level='deep')`.
227
+ When wrapping up, always call `mcp__prism-mcp__session_save_ledger` and `mcp__prism-mcp__session_save_handoff`.
249
228
  ```
250
229
 
251
- ### Troubleshooting
252
-
253
- - **Hook not firing?** Check `timeout` — if your script takes too long, Claude ignores it.
254
- - **"Tool not available"?** This is a hallucination. Ensure `permissions.allow` exactly matches the double-underscore format.
230
+ > **Format Note:** Claude automatically wraps MCP tools with double underscores (`mcp__prism-mcp__...`), while most other clients use single underscores (`mcp_prism-mcp_...`). Prism's backend natively handles both formats seamlessly.
255
231
 
256
232
  </details>
257
233
 
258
234
  <details id="antigravity-auto-load">
259
- <summary><strong>Gemini / Antigravity — Three-Layer Auto-Load (Battle-Tested ✅)</strong></summary>
260
-
261
- Gemini-based agents (including Google's Antigravity IDE) use a **three-layer architecture** for reliable auto-load, proven over **14+ iterations** of prompt engineering (March 2026).
235
+ <summary><strong>Gemini / Antigravity — Prompt Auto-Load</strong></summary>
262
236
 
263
- ### Architecture
264
-
265
- | Layer | File | Purpose |
266
- |-------|------|---------|
267
- | **1. User Rules** | `~/.gemini/GEMINI.md` | Slim ~10-line directive injected verbatim into system prompt |
268
- | **2. Cross-Tool Rules** | `~/.gemini/AGENTS.md` | Reinforcement for multi-client setups (Antigravity + Cursor) |
269
- | **3. Skill** | `.agent/skills/prism-startup/SKILL.md` | Full startup procedure with greeting detection and context echo |
270
- | **Server Fallback** | Built into `server.ts` (v5.2.1) | Deferred auto-push via `sendLoggingMessage` if model doesn't comply within 10s |
271
-
272
- ### Layer 1: User Rules
273
-
274
- Create `~/.gemini/GEMINI.md`:
275
-
276
- ```markdown
277
- # Startup — MANDATORY
278
-
279
- Your first action in every conversation is a tool call. Zero text before it.
280
-
281
- Tool: mcp_prism-mcp_session_load_context
282
- Args: project="my-project", level="deep"
283
-
284
- After success: echo agent identity, last summary, open TODOs, session version.
285
- If the call fails: say "Prism load failed — retrying" and try ONE more time.
286
- ```
287
-
288
- ### Layer 2: Cross-Tool Reinforcement
289
-
290
- Create `~/.gemini/AGENTS.md`:
291
-
292
- ```markdown
293
- # Session Memory
294
- Every conversation starts with: mcp_prism-mcp_session_load_context(project="my-project", level="deep")
295
- Echo result: agent identity, TODOs, session version.
296
- ```
297
-
298
- ### Layer 3: Prism Startup Skill
299
-
300
- Create `.agent/skills/prism-startup/SKILL.md` (or `.agents/skills/`) in your project or global config. This is a structured skill file that Antigravity loads with higher priority than plain rules. It includes:
301
-
302
- - Greeting detection (fires on "hi", "hello", etc.)
303
- - Full tool call instructions with error handling
304
- - Context echo template (agent identity, TODOs, version)
305
- - Startup block display
306
-
307
- ### Server-Side Fallback (v5.2.1)
308
-
309
- If the model ignores all three layers, Prism's server pushes context automatically:
310
-
311
- 1. After storage warmup, a 10-second timer starts
312
- 2. If `session_load_context` hasn't been called by then, the server pushes context via `sendLoggingMessage`
313
- 3. If the client already called the tool, the push is silently skipped (zero impact on Claude CLI)
314
-
315
- This ensures context is always available, even with non-compliant models.
316
-
317
- ### Why This Architecture Works
318
-
319
- - **Gemini uses single underscores** for MCP tools (`mcp_prism-mcp_...`) vs Claude's double underscores
320
- - **Slim rules** (~10 lines) avoid triggering adversarial "tool not found" reasoning
321
- - **Skills have dedicated 3-level loading** in Antigravity — higher compliance than plain rules
322
- - **Server fallback** catches the remaining edge cases without affecting well-behaved clients
323
- - **Positive "First Action" framing** outperforms negative constraint lists
324
-
325
- ### Antigravity UI Caveat
326
-
327
- Antigravity **does not visually render MCP tool output blocks** in the chat UI. The tool executes successfully, but the user sees nothing. All three layers instruct the agent to **echo context in its text reply**.
328
-
329
- ### Session End Workflow
330
-
331
- Tell the agent: *"Wrap up the session."* It should execute:
332
-
333
- 1. `session_save_ledger` — append immutable work log (summary, decisions, files changed)
334
- 2. `session_save_handoff` — upsert project state with `expected_version` for OCC
335
-
336
- > **Tip:** Include session-end instructions in your `GEMINI.md` or ask the agent to save when you're done.
337
-
338
- ### Platform Gotchas
339
-
340
- - **`replace_file_content` silently fails** on `~/.gemini/GEMINI.md` in some environments — use `write_to_file` with overwrite instead
341
- - **Multiple GEMINI.md locations** can conflict: global (`~/.gemini/`), workspace, and User Rules in the Antigravity UI. Keep them synchronized
342
- - **Camoufox/browser tools** called at startup spawn visible black windows — never call browser tools during greeting handlers
237
+ See the [Gemini Setup Guide](docs/SETUP_GEMINI.md) for the proven three-layer prompt architecture to ensure reliable session auto-loading.
343
238
 
344
239
  </details>
345
240
 
@@ -357,7 +252,7 @@ To sync memory across machines or teams:
357
252
  "env": {
358
253
  "PRISM_STORAGE": "supabase",
359
254
  "SUPABASE_URL": "https://your-project.supabase.co",
360
- "SUPABASE_KEY": "your-supabase-anon-key"
255
+ "SUPABASE_KEY": "your-supabase-anon-or-service-key"
361
256
  }
362
257
  }
363
258
  }
@@ -366,6 +261,8 @@ To sync memory across machines or teams:
366
261
 
367
262
  See the **Supabase Setup** section below for schema migration instructions.
368
263
 
264
+ > **Anon key vs. service role key:** The anon key works for personal use (Supabase RLS policies apply). Use the service role key for team deployments where multiple users share the same Supabase project — it bypasses RLS and allows Prism to manage all rows regardless of auth context. Never expose the service role key client-side.
265
+
369
266
  </details>
370
267
 
371
268
  <details>
@@ -395,10 +292,32 @@ Then add to your MCP config:
395
292
 
396
293
  </details>
397
294
 
295
+ ### Common Installation Pitfalls
296
+
297
+ > **❌ Don't use `npm install -g`:**
298
+ > Hardcoding the binary path (e.g. `/opt/homebrew/Cellar/node/23.x/bin/prism-mcp-server`) is tied to a specific Node.js version — when Node updates, the path silently breaks.
299
+ >
300
+ > **✅ Always use `npx` instead:**
301
+ > ```json
302
+ > {
303
+ > "mcpServers": {
304
+ > "prism-mcp": {
305
+ > "command": "npx",
306
+ > "args": ["-y", "prism-mcp-server"]
307
+ > }
308
+ > }
309
+ > }
310
+ > ```
311
+ > `npx` resolves the correct binary automatically, always fetches the latest version, and works identically on macOS, Linux, and Windows. Already installed globally? Run `npm uninstall -g prism-mcp-server` first.
312
+
313
+ > **❓ Seeing warnings about missing API keys on startup?**
314
+ > That's expected and not an error. `BRAVE_API_KEY` / `GOOGLE_API_KEY` warnings are informational only — core session memory works with zero keys. See [Environment Variables](#environment-variables) for what each key unlocks.
315
+
398
316
  ---
399
317
 
400
318
  ## ✨ What Makes Prism Different
401
319
 
320
+
402
321
  ### 🧠 Your Agent Learns From Mistakes
403
322
  When you correct your agent, Prism tracks it. Corrections accumulate **importance** over time. High-importance lessons auto-surface as warnings in future sessions — and can even sync to your `.cursorrules` file for permanent enforcement. Your agent literally gets smarter the more you use it.
404
323
 
@@ -409,8 +328,8 @@ Every save creates a versioned snapshot. Made a mistake? `memory_checkout` rever
409
328
  A gorgeous glassmorphism UI at `localhost:3000` that lets you see exactly what your agent is thinking:
410
329
 
411
330
  - **Current State & TODOs** — the exact context injected into the LLM's prompt
412
- - **Interactive Knowledge Graph** — force-directed neural graph with click-to-filter, node renaming, and surgical keyword deletion *(v5.1)*
413
- - **Deep Storage Manager** — preview and execute vector purge operations with dry-run safety *(v5.1)*
331
+ - **Interactive Knowledge Graph** — force-directed neural graph with click-to-filter, node renaming, and surgical keyword deletion
332
+ - **Deep Storage Manager** — preview and execute vector purge operations with dry-run safety
414
333
  - **Session Ledger** — full audit trail of every decision your agent has made
415
334
  - **Time Travel Timeline** — browse and revert any historical handoff version
416
335
  - **Visual Memory Vault** — browse VLM-captioned screenshots and auto-captured HTML states
@@ -421,7 +340,7 @@ A gorgeous glassmorphism UI at `localhost:3000` that lets you see exactly what y
421
340
  ![Mind Palace Dashboard](docs/mind-palace-dashboard.png)
422
341
 
423
342
  ### 🧬 10× Memory Compression
424
- Powered by a pure TypeScript port of Google's TurboQuant (ICLR 2026), Prism compresses 768-dim embeddings from **3,072 bytes → ~400 bytes** — enabling decades of session history on a standard laptop. No native modules. No vector database required.
343
+ Powered by a pure TypeScript port of Google's TurboQuant (inspired by Google's ICLR research), Prism compresses 768-dim embeddings from **3,072 bytes → ~400 bytes** — enabling decades of session history on a standard laptop. No native modules. No vector database required.
425
344
 
426
345
  ### 🐝 Multi-Agent Hivemind
427
346
  Multiple agents (dev, QA, PM) can work on the same project with **role-isolated memory**. Agents discover each other automatically, share context in real-time via Telepathy sync, and see a team roster during context loading.
@@ -432,11 +351,11 @@ Save UI screenshots, architecture diagrams, and bug states to a searchable vault
432
351
  ### 🔭 Full Observability
433
352
  OpenTelemetry spans for every MCP tool call, LLM hop, and background worker. Route to Jaeger, Grafana, or any OTLP collector. Configure in the dashboard — zero code changes.
434
353
 
435
- ## 🌐 Autonomous Web Scholar
436
- Prism researches while you sleep. A background pipeline searches the web, scrapes articles, synthesizes findings via LLM, and injects results directly into your semantic memory — fully searchable on your next session. [Details below](#-autonomous-web-scholar)
354
+ ### 🌐 Autonomous Web Scholar
355
+ Prism researches while you sleep. A background pipeline searches the web, scrapes articles, synthesizes findings via LLM, and injects results directly into your semantic memory — fully searchable on your next session. Brave Search Firecrawl scrape → LLM synthesis → Prism ledger. Task-aware, Hivemind-integrated, and zero-config when API keys are missing (falls back to Yahoo + Readability).
437
356
 
438
357
  ### 🔒 GDPR Compliant
439
- Soft/hard delete (Art. 17), full ZIP export (Art. 20), API key redaction, per-project TTL retention, and audit trail. Enterprise-ready out of the box.
358
+ Soft/hard delete (Art. 17), full export in JSON, Markdown, or Obsidian vault `.zip` (Art. 20), API key redaction, per-project TTL retention, and audit trail. Enterprise-ready out of the box.
440
359
 
441
360
  ---
442
361
 
@@ -462,24 +381,60 @@ Soft/hard delete (Art. 17), full ZIP export (Art. 20), API key redaction, per-pr
462
381
 
463
382
  ## 🆕 What's New
464
383
 
465
- ### v5.5Architectural Hardening
466
- > **Current stable release.** Zero-dependency, production-grade reliability improvements.
467
-
468
- - 🛡️ **Transactional Migrations** — SQLite DDL rebuilds are wrapped in explicit `BEGIN/COMMIT` blocks. A crash mid-migration can no longer corrupt your schema or lose handoff state.
469
- - 🛑 **Graceful Shutdown Registry** — `BackgroundTaskRegistry` uses a 5-second `Promise.race()` to await all in-flight flushes (embeddings, SDM writes, OTel spans) before the process exits. No more orphaned I/O.
470
- - 🕰️ **Thundering Herd Prevention** — Maintenance scheduler migrated from `setInterval` to a state-aware recursive `setTimeout`. Expensive compaction routines can never stack on top of each other.
471
- - 🚀 **Zero-Thrashing SDM Scans** — `Int32Array` scratchpad allocations hoisted outside the hot decode loop. Eliminates V8 GC pressure on large semantic memory banks.
472
- - 🧪 **368 Tests** — Zero regressions across 17 test suites.
473
-
474
- ### v5.4Convergent Intelligence
475
- - 🔄 **CRDT Handoff Merging** — Multi-agent saves no longer reject on version conflict. Custom OR-Map engine auto-merges concurrent edits (Add-Wins for arrays, LWW for scalars).
476
- - **Background Purge Scheduler** Fully automated storage maintenance: TTL sweep, Ebbinghaus importance decay, auto-compaction, and deep storage purge on a configurable interval.
477
- - 🌐 **[Autonomous Web Scholar](#-autonomous-web-scholar)** — Agent-driven research pipeline. Brave Search Firecrawl scrape LLM synthesis Prism ledger. Task-aware and Hivemind-integrated.
478
- - 🐝 **Scholar Hivemind Integration** — Scholar registers on the Radar, emits heartbeats, and broadcasts Telepathy alerts on completion.
384
+ ### v6.1Prism-Port, Cognitive Load & Semantic Search
385
+ > **Current stable release (v6.1.8).** Data sovereignty meets active memory intelligence.
386
+
387
+ - 📦 **Prism-Port Vault Export** — New `vault` format for `session_export_memory`. Generates a `.zip` of interlinked Markdown files with YAML frontmatter, `[[Wikilinks]]`, and auto-generated `Keywords/` backlink indices. Drop into Obsidian or Logseq for instant knowledge graph.
388
+ - 🏛️ **Dashboard Export Vault Button** — "🏛️ Export Vault" button in the Mind Palace UI exports the full Prism-Port vault ZIP directly from the browser. Both `/api/export` and `/api/export/vault` now use the unified `buildVaultDirectory` path same rich format as the MCP tool.
389
+ - 🏥 **Dashboard Health Cleanup** — The "Fix Issues" button now repairs missing embeddings directly from the Mind Palace UI.
390
+ - 🧠 **Smart Memory Merge UI** — Dynamically merge duplicate knowledge nodes right from the Graph Editor. "Knowledge Gardening" made effortless.
391
+ - **Semantic Search Highlighting** — Native RegEx mapping that visually wraps the exact reason a vector result was retrieved during a search.
392
+ - 📊 **Deep Purge Visualization** — A zero-overhead "Memory Density" analytic providing instant signal-to-noise ratio visibility (Graduated ideas vs raw concepts).
393
+ - 🛡️ **Context-Boosted Search** Biases semantic queries by intelligently interleaving your current project workspace.
394
+
395
+ #### v6.1.8Type Guard Hardening (Production Safety)
396
+ - 🛡️ **Missing Guard Added** — `isSessionCompactLedgerArgs` was absent; an LLM passing `{threshold: "many"}` would reach the handler as a string. Added full validation for all four optional fields.
397
+ - **Array Field Validation** — `isSessionSaveLedgerArgs` now guards `todos`, `files_changed`, and `decisions` with `Array.isArray` checks prevents a hallucinated `{todos: "string"}` from bypassing the type system.
398
+ - 🔖 **Enum Literal Guard** — `isSessionExportMemoryArgs` now rejects any `format` value outside `'json' | 'markdown' | 'vault'` at the boundary instead of propagating to the handler.
399
+ - 🔢 **Numeric Field Guards** — `isSessionIntuitiveRecallArgs` now validates `limit` and `threshold` as numbers, blocking string coercion (`{limit: "many"}`).
400
+ - 🧹 **Legacy Guard Migration** — `isMemoryHistoryArgs`, `isMemoryCheckoutArgs`, and `isSessionSaveImageArgs` migrated to the consistent `Record<string, unknown>` pattern; `isMemoryHistoryArgs` also gains a previously missing `limit` number check.
401
+
402
+ #### v6.1.7 — Dashboard Toggle Persistence
403
+ - 🔄 **Rollback on Save Failure** — `saveSetting()` now returns `Promise<boolean>`; UI toggles (Hivemind, Auto-Capture) roll back their optimistic state if the server request fails.
404
+ - 🚫 **Cache-Busting** — `loadSettings()` appends `?t=<timestamp>` to bypass stale browser/service-worker caches.
405
+ - 🔔 **HTTP Error Detection** — Explicit 4xx/5xx catching in `saveSetting()` surfaces failed saves as user-visible toast notifications.
406
+
407
+ #### v6.1.6 — Type Guard Audit (Round 1)
408
+ - 🛡️ **11 Type Guards Hardened** — Audited and refactored all MCP tool argument guards to include explicit `typeof` validation for optional fields, preventing LLM-hallucinated payloads from causing runtime type coercion errors.
409
+
410
+ #### v6.1.5 — SQLite Deep Storage TTL
411
+ - 🧪 **Comprehensive Edge-Case Test Suite** — 425 tests across 20 files covering CRDT merges, TurboQuant mathematical invariants, prototype pollution guards, and SQLite retention TTL boundary conditions.
412
+ - 🔒 **Prototype Pollution Guards** — CRDT merge pipeline hardened against `__proto__` / `constructor` injection via `Object.create(null)` scratchpads.
413
+ - 🗜️ **`maintenance_vacuum` Tool** — New tool to reclaim SQLite disk space after large purge operations.
414
+
415
+ #### v6.1.4 — Production Hardening
416
+ - 🔒 **Embedding Binary Strip** — Both `embedding` (raw float32) and `embedding_compressed` (TurboQuant binary blob) are now stripped from all export formats, preventing ~400 bytes of raw binary per entry from appearing in vault/JSON exports.
417
+ - 🔗 **Vault Wikilink Fix** — Keyword backlink paths now use vault-relative `Ledger/filename.md` instead of `../Ledger/filename.md` — ensuring correct internal link resolution in Obsidian and Logseq.
418
+ - 🖼️ **Visual Memory Key Fix** — Export correctly reads `filename` and `timestamp` (the keys written by `session_save_image`), resolving a mismatch that produced `"Unknown"` values in the vault visual memory index.
419
+ - 🛡️ **OOM Guard on Large Exports** — `getLedgerEntries` in the export handler now has a 10,000-entry ceiling with explicit `ORDER BY created_at ASC`, preventing unbounded heap allocation on high-volume projects.
420
+ - ⚡ **O(1) Filename Dedup** — Vault filename collision resolution upgraded from O(n²) loop to O(1) `Map<string, number>` counter. Important for projects with many same-day sessions.
421
+ - 🔧 **TurboQuant Guard** — `bits` parameter now validated to `[2, 6]` range at construction time, preventing accidental multi-second Lloyd-Max initialization at higher bit depths.
422
+
423
+ ![Prism v6 Features](docs/v6_cognitive_load_dashboard.png)
479
424
 
480
425
  <details>
481
- <summary><strong>Earlier releases (v5.3 and below)</strong></summary>
482
-
426
+ <summary><strong>Earlier releases (v5.x and below)</strong></summary>
427
+
428
+ #### v5.5 — Architectural Hardening
429
+ - 🛡️ **Transactional Migrations** — SQLite DDL rebuilds are wrapped in explicit `BEGIN/COMMIT` blocks.
430
+ - 🛑 **Graceful Shutdown Registry** — `BackgroundTaskRegistry` uses a 5-second `Promise.race()` to await flushes.
431
+ - 🕰️ **Thundering Herd Prevention** — Maintenance scheduler migrated from `setInterval` to state-aware `setTimeout`.
432
+ - 🚀 **Zero-Thrashing SDM Scans** — `Int32Array` scratchpad allocations hoisted outside the hot decode loop.
433
+
434
+ #### v5.4 — Convergent Intelligence
435
+ - 🔄 **CRDT Handoff Merging** — Multi-agent saves no longer reject on version conflict. Custom OR-Map engine auto-merges concurrent edits.
436
+ - ⏰ **Background Purge Scheduler** — Fully automated storage maintenance TTL sweep, Ebbinghaus decay, auto-compaction.
437
+ - 🌐 **Autonomous Web Scholar** — Agent-driven research pipeline. Brave Search → Firecrawl scrape → LLM synthesis.
483
438
  - **v5.3** — Hivemind Health Watchdog (state machine, loop detection, Telepathy alert injection)
484
439
  - **v5.2** — Cognitive Memory (Ebbinghaus decay, context-weighted retrieval), Universal History Migration, Smart Consolidation
485
440
  - **v5.1** — Knowledge Graph Editor, Deep Storage purge
@@ -492,29 +447,27 @@ Soft/hard delete (Art. 17), full ZIP export (Art. 20), API key redaction, per-pr
492
447
 
493
448
  ---
494
449
 
495
- ## How Prism Compares
496
-
497
- **Prism MCP** vs [MCP Memory](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) · [Mem0](https://github.com/mem0ai/mem0) · [Mnemory](https://github.com/fpytloun/mnemory) · [Basic Memory](https://github.com/basicmachines-co/basic-memory)
498
-
499
- **Only Prism has all of these:**
500
- -Zero config one `npx` command, no Qdrant/Postgres containers
501
- -Time Travel versioned snapshots with `memory_checkout`
502
- -Behavioral memory importance tracking, auto-decay, mistake learning
503
- - ✅ Visual dashboard Mind Palace at localhost:3000
504
- - ✅ Multi-agent sync role-isolated Hivemind with real-time Telepathy
505
- -CRDT merging conflict-free concurrent multi-agent edits
506
- -Autonomous research Web Scholar pipeline runs while you sleep
507
- -Visual memory VLM-captioned screenshot vault
508
- -Token budgeting `max_tokens` param on context loading
509
- -10× vector compression TurboQuant, no external vector DB
510
- -Automated maintenance background scheduler handles TTL, decay, compaction, purge
511
- -GDPR compliance soft/hard delete, ZIP export, TTL retention
512
- -OpenTelemetry full span tracing to Jaeger/Grafana
513
- - ✅ LangChain adapters `BaseRetriever` integration + LangGraph examples
514
- - Morning Briefings AI-synthesized action plans after breaks
515
- - Auto-compaction Gemini-powered rollups to prevent unbounded growth
516
- - ✅ IDE rules sync — graduated insights → `.cursorrules` / `.clauderules`
517
- - ✅ Air-gapped mode — SQLite + Ollama, zero internet needed
450
+ ## 🆚 How Prism Compares
451
+
452
+ | Capability | **Prism MCP** | [MCP Memory](https://github.com/modelcontextprotocol/servers/tree/main/src/memory) | [Mem0](https://github.com/mem0ai/mem0) | [Mnemory](https://github.com/fpytloun/mnemory) | [Basic Memory](https://github.com/basicmachines-co/basic-memory) |
453
+ |:-----------|:---:|:---:|:---:|:---:|:---:|
454
+ | Zero-config (`npx` one-liner) | ✅ | ✅ | ❌ Docker | ✅ | ✅ |
455
+ | Time travel (version revert) | | | | | |
456
+ | Behavioral memory (mistake learning) | | | | | ❌ |
457
+ | Visual dashboard | | | Web | | ❌ |
458
+ | Multi-agent Hivemind | | | | | ❌ |
459
+ | CRDT conflict-free merging | | | | | ❌ |
460
+ | Autonomous research (Web Scholar) | | | | | ❌ |
461
+ | Visual memory (VLM screenshots) | | | | | |
462
+ | 10× vector compression | | | (Qdrant) | ❌ | ❌ |
463
+ | Obsidian/Logseq vault export | | | | | ✅ |
464
+ | Token budgeting | | | | | |
465
+ | GDPR compliance (Art. 17 + 20) | | | | | |
466
+ | OpenTelemetry tracing | | | | | |
467
+ | IDE rules sync (`.cursorrules`) | | | | | ❌ |
468
+ | Air-gapped mode (Ollama) | | | | | ❌ |
469
+ | Morning Briefings | | | ❌ | ❌ | ❌ |
470
+ | Auto-compaction | | | | ❌ | ❌ |
518
471
 
519
472
  > **TL;DR:** Prism is the only MCP memory server with time travel, behavioral learning, autonomous research, CRDT multi-agent sync, and 10× compression — all from a single `npx` command.
520
473
 
@@ -522,6 +475,18 @@ Soft/hard delete (Art. 17), full ZIP export (Art. 20), API key redaction, per-pr
522
475
 
523
476
  ## 🔧 Tool Reference
524
477
 
478
+ Prism ships 30+ tools, but **90% of your workflow uses just three:**
479
+
480
+ > **🎯 The Big Three**
481
+ >
482
+ > | Tool | When | What it does |
483
+ > |------|------|--------------|
484
+ > | `session_load_context` | ▶️ Start of session | Loads your agent’s brain from last time |
485
+ > | `session_save_ledger` | ⏹️ End of session | Records what was accomplished |
486
+ > | `knowledge_search` | 🔍 Anytime | Finds past decisions, context, and learnings |
487
+ >
488
+ > *Everything else is a power-up. Start with these three and you’re 90% there.*
489
+
525
490
  <details>
526
491
  <summary><strong>Session Memory & Knowledge (12 tools)</strong></summary>
527
492
 
@@ -536,7 +501,7 @@ Soft/hard delete (Art. 17), full ZIP export (Art. 20), API key redaction, per-pr
536
501
  | `session_search_memory` | Vector similarity search across all sessions |
537
502
  | `session_compact_ledger` | Auto-compact old entries via Gemini summarization |
538
503
  | `session_forget_memory` | GDPR-compliant deletion (soft/hard + Art. 17 reason) |
539
- | `session_export_memory` | Full ZIP export (JSON + Markdown) for portability |
504
+ | `session_export_memory` | Full export (JSON, Markdown, or Obsidian vault `.zip` with `[[Wikilinks]]`) |
540
505
  | `session_health_check` | Brain integrity scan + auto-repair (`fsck`) |
541
506
  | `deep_storage_purge` | Reclaim ~90% vector storage (v5.1) |
542
507
 
@@ -612,7 +577,7 @@ Requires `PRISM_ENABLE_HIVEMIND=true`.
612
577
  | `SUPABASE_URL` | If cloud | Supabase project URL |
613
578
  | `SUPABASE_KEY` | If cloud | Supabase anon/service key |
614
579
  | `PRISM_USER_ID` | No | Multi-tenant user isolation (default: `"default"`) |
615
- | `PRISM_AUTO_CAPTURE` | No | `"true"` to auto-snapshot dev servers |
580
+ | `PRISM_AUTO_CAPTURE` | No | `"true"` to auto-snapshot dev server UI states (HTML/DOM) for visual memory |
616
581
  | `PRISM_CAPTURE_PORTS` | No | Comma-separated ports (default: `3000,3001,5173,8080`) |
617
582
  | `PRISM_DEBUG_LOGGING` | No | `"true"` for verbose logs |
618
583
  | `PRISM_DASHBOARD_PORT` | No | Dashboard port (default: `3000`) |
@@ -629,182 +594,118 @@ Requires `PRISM_ENABLE_HIVEMIND=true`.
629
594
 
630
595
  ## Architecture
631
596
 
632
- | Layer | File | Purpose |
633
- |-------|------|---------|
634
- | **1. User Rules** | `~/.gemini/GEMINI.md` | Slim ~10-line directive injected verbatim into system prompt |
635
- | **2. Cross-Tool Rules** | `~/.gemini/AGENTS.md` | Reinforcement for multi-client setups (Antigravity + Cursor) |
636
- | **3. Skill** | `.agent/skills/prism-startup/SKILL.md` | Full startup procedure with greeting detection and context echo |
637
- | **Server Fallback** | Built into `server.ts` (v5.2.1) | Deferred auto-push via `sendLoggingMessage` if model doesn't comply within 10s |
638
-
639
- ### Layer 1: User Rules
640
-
641
- Create `~/.gemini/GEMINI.md`:
642
-
643
- ```markdown
644
- # Startup — MANDATORY
645
-
646
- Your first action in every conversation is a tool call. Zero text before it.
647
-
648
- Tool: mcp_prism-mcp_session_load_context
649
- Args: project="my-project", level="deep"
597
+ Prism is a **stdio-based MCP server** that manages persistent agent memory. Here's how the pieces fit together:
650
598
 
651
- After success: echo agent identity, last summary, open TODOs, session version.
652
- If the call fails: say "Prism load failed — retrying" and try ONE more time.
653
599
  ```
654
-
655
- ### Layer 2: Cross-Tool Reinforcement
656
-
657
- Create `~/.gemini/AGENTS.md`:
658
-
659
- ```markdown
660
- # Session Memory
661
- Every conversation starts with: mcp_prism-mcp_session_load_context(project="my-project", level="deep")
662
- Echo result: agent identity, TODOs, session version.
600
+ ┌──────────────────────────────────────────────────────────┐
601
+ │ MCP Client (Claude Desktop / Cursor / Antigravity) │
602
+ │ ↕ stdio (JSON-RPC) │
603
+ ├──────────────────────────────────────────────────────────┤
604
+ │ Prism MCP Server │
605
+ │ │
606
+ │ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │
607
+ │ │ 30+ Tools │ │ Lifecycle │ │ Dashboard │ │
608
+ │ │ (handlers) │ │ (PID lock, │ │ (HTTP :3000) │ │
609
+ │ │ │ │ shutdown) │ │ │ │
610
+ │ └──────┬───────┘ └──────────────┘ └────────────────┘ │
611
+ │ ↕ │
612
+ │ ┌────────────────────────────────────────────────────┐ │
613
+ │ │ Storage Engine │ │
614
+ │ │ Local: SQLite + FTS5 + TurboQuant vectors │ │
615
+ │ │ Cloud: Supabase + pgvector │ │
616
+ │ └────────────────────────────────────────────────────┘ │
617
+ │ ↕ │
618
+ │ ┌────────────────────────────────────────────────────┐ │
619
+ │ │ Background Workers │ │
620
+ │ │ • Scheduler (TTL, decay, compaction, purge) │ │
621
+ │ │ • Web Scholar (Brave → Firecrawl → LLM → Ledger) │ │
622
+ │ │ • Hivemind heartbeats & Telepathy broadcasts │ │
623
+ │ │ • OpenTelemetry span export │ │
624
+ │ └────────────────────────────────────────────────────┘ │
625
+ └──────────────────────────────────────────────────────────┘
663
626
  ```
664
627
 
665
- ### Layer 3: Prism Startup Skill
666
-
667
- Create `.agent/skills/prism-startup/SKILL.md` (or `.agents/skills/`) in your project or global config. This is a structured skill file that Antigravity loads with higher priority than plain rules. It includes:
668
-
669
- - Greeting detection (fires on "hi", "hello", etc.)
670
- - Full tool call instructions with error handling
671
- - Context echo template (agent identity, TODOs, version)
672
- - Startup block display
673
-
674
- ### Server-Side Fallback (v5.2.1)
675
-
676
- If the model ignores all three layers, Prism's server pushes context automatically:
677
-
678
- 1. After storage warmup, a 10-second timer starts
679
- 2. If `session_load_context` hasn't been called by then, the server pushes context via `sendLoggingMessage`
680
- 3. If the client already called the tool, the push is silently skipped (zero impact on Claude CLI)
681
-
682
- This ensures context is always available, even with non-compliant models.
683
-
684
- ### Why This Architecture Works
685
-
686
- - **Gemini uses single underscores** for MCP tools (`mcp_prism-mcp_...`) vs Claude's double underscores
687
- - **Slim rules** (~10 lines) avoid triggering adversarial "tool not found" reasoning
688
- - **Skills have dedicated 3-level loading** in Antigravity — higher compliance than plain rules
689
- - **Server fallback** catches the remaining edge cases without affecting well-behaved clients
690
- - **Positive "First Action" framing** outperforms negative constraint lists
691
-
692
- ### Antigravity UI Caveat
693
-
694
- Antigravity **does not visually render MCP tool output blocks** in the chat UI. The tool executes successfully, but the user sees nothing. All three layers instruct the agent to **echo context in its text reply**.
695
-
696
- ### Session End Workflow
697
-
698
- Tell the agent: *"Wrap up the session."* It should execute:
699
-
700
- 1. `session_save_ledger` — append immutable work log (summary, decisions, files changed)
701
- 2. `session_save_handoff` — upsert project state with `expected_version` for OCC
702
-
703
- > **Tip:** Include session-end instructions in your `GEMINI.md` or ask the agent to save when you're done.
704
-
705
- ### Platform Gotchas
706
-
707
- - **`replace_file_content` silently fails** on `~/.gemini/GEMINI.md` in some environments — use `write_to_file` with overwrite instead
708
- - **Multiple GEMINI.md locations** can conflict: global (`~/.gemini/`), workspace, and User Rules in the Antigravity UI. Keep them synchronized
709
- - **Camoufox/browser tools** called at startup spawn visible black windows — never call browser tools during greeting handlers
710
-
711
- </details>
712
-
713
- <details>
714
- <summary><strong>Supabase Cloud Sync</strong></summary>
715
-
716
- To sync memory across machines or teams:
717
-
718
- ```json
719
- {
720
- "mcpServers": {
721
- "prism-mcp": {
722
- "command": "npx",
723
- "args": ["-y", "prism-mcp-server"],
724
- "env": {
725
- "PRISM_STORAGE": "supabase",
726
- "SUPABASE_URL": "https://your-project.supabase.co",
727
- "SUPABASE_KEY": "your-supabase-anon-key"
728
- }
729
- }
730
- }
731
- }
732
- ```
628
+ ### Startup Sequence
733
629
 
734
- See the **Supabase Setup** section below for schema migration instructions.
630
+ 1. **Acquire PID lock** prevents duplicate instances per `PRISM_INSTANCE`
631
+ 2. **Initialize config** — SQLite settings cache (`prism-config.db`)
632
+ 3. **Register 30+ MCP tools** — session, knowledge, search, behavioral, hivemind
633
+ 4. **Connect stdio transport** — MCP handshake with the client (~60ms total)
634
+ 5. **Async post-connect** — storage warmup, dashboard launch, scheduler start (non-blocking)
735
635
 
736
- </details>
636
+ ### Storage Layers
737
637
 
738
- <details>
739
- <summary><strong>Clone & Build (Full Control)</strong></summary>
638
+ | Layer | Technology | Purpose |
639
+ |-------|-----------|---------|
640
+ | **Session Ledger** | SQLite (append-only) | Immutable audit trail of all agent work |
641
+ | **Handoff State** | SQLite (upsert, versioned) | Live project context with OCC + CRDT merging |
642
+ | **Keyword Search** | FTS5 virtual tables | Zero-dependency full-text search |
643
+ | **Semantic Search** | TurboQuant compressed vectors | 10× compressed 768-dim embeddings, three-tier retrieval |
644
+ | **Cloud Sync** | Supabase + pgvector | Optional multi-device/team sync |
740
645
 
741
- ```bash
742
- git clone https://github.com/dcostenco/prism-mcp.git
743
- cd prism-mcp && npm install && npm run build
744
- ```
646
+ ### Auto-Load Architecture
745
647
 
746
- Then add to your MCP config:
648
+ Each MCP client has its own mechanism for ensuring Prism context loads on session start. See the platform-specific [Setup Guides](#-setup-guides) above for detailed instructions:
747
649
 
748
- ```json
749
- {
750
- "mcpServers": {
751
- "prism-mcp": {
752
- "command": "node",
753
- "args": ["/path/to/prism-mcp/dist/server.js"],
754
- "env": {
755
- "BRAVE_API_KEY": "your-key",
756
- "GOOGLE_API_KEY": "your-gemini-key"
757
- }
758
- }
759
- }
760
- }
761
- ```
650
+ - **Claude Code** — Lifecycle hooks (`SessionStart` / `Stop`)
651
+ - **Gemini / Antigravity** — Three-layer architecture (User Rules + AGENTS.md + Startup Skill)
652
+ - **Cursor / Windsurf / VS Code** — System prompt instructions
762
653
 
763
- </details>
654
+ All platforms benefit from the **server-side fallback** (v5.2.1): if `session_load_context` hasn't been called within 10 seconds, Prism auto-pushes context via `sendLoggingMessage`.
764
655
 
765
656
  ---
766
657
 
767
- ## Research Roadmap
658
+ ## 🧬 Scientific Foundation
768
659
 
769
660
  Prism is evolving from smart session logging toward a **cognitive memory architecture** — grounded in real research, not marketing.
770
661
 
771
662
  | Phase | Feature | Inspired By | Status |
772
663
  |-------|---------|-------------|--------|
664
+ | **v5.0** | TurboQuant 10× Compression — 4-bit quantized 768-dim vectors in <500 bytes | Vector quantization (product/residual PQ) | ✅ Shipped |
665
+ | **v5.0** | Three-Tier Search — native → TurboQuant → FTS5 keyword fallback | Cascaded retrieval architectures | ✅ Shipped |
773
666
  | **v5.2** | Smart Consolidation — extract principles, not just summaries | Neuroscience sleep consolidation | ✅ Shipped |
774
667
  | **v5.2** | Ebbinghaus Importance Decay — memories fade unless reinforced | Ebbinghaus forgetting curve | ✅ Shipped |
775
668
  | **v5.2** | Context-Weighted Retrieval — current work biases what surfaces | Contextual memory in cognitive science | ✅ Shipped |
669
+ | **v5.4** | CRDT Handoff Merging — conflict-free multi-agent state via OR-Map engine | CRDTs (Shapiro et al., 2011) | ✅ Shipped |
670
+ | **v5.4** | Autonomous Web Scholar — background research pipeline with LLM synthesis | Autonomous research agents | ✅ Shipped |
776
671
  | **v5.5** | SDM Decoder Foundation — pre-allocated typed-array hot loop, zero GC thrash | Kanerva's Sparse Distributed Memory (1988) | ✅ Shipped |
777
- | **v5.6** | Full Superposed Memory (SDM) O(1) key-value retrieval via Hamming correlation | Kanerva's SDM | 🔬 In Progress |
778
- | **v5.6** | Intuitive Recall — proactive surface of relevant past decisions without explicit search | Predictive memory (cognitive science) | 🔬 In Progress |
779
- | **v6.x** | Affect-Tagged Memory — sentiment shapes what gets recalled | Affect-modulated retrieval (neuroscience) | 🔭 Horizon |
780
- | **v7+** | Zero-Search Retrievalno index, no ANN, just ask the vector | Holographic Reduced Representations | 🔭 Horizon |
672
+ | **v5.5** | Architectural Hardening transactional migrations, graceful shutdown, thundering herd prevention | Production reliability engineering | Shipped |
673
+ | **v6.1** | Intuitive Recall — proactive surface of relevant past decisions without explicit search; `session_intuitive_recall` tool | Predictive memory (cognitive science) | Shipped |
674
+ | **v6.2+** | Full Superposed Memory (SDM) O(1) key-value retrieval via Hamming correlation | Kanerva's SDM | 🔬 In Progress |
675
+ | **v6.1** | Prism-Port Vault Export Obsidian/Logseq `.zip` with YAML frontmatter & `[[Wikilinks]]` | Data sovereignty, PKM interop | Shipped |
676
+ | **v6.1** | Cognitive Load & Semantic Search — dynamic graph thinning, search highlights | Contextual working memory | ✅ Shipped |
677
+ | **v6.2** | Synthesize & Prune — automated edge synthesis and visual decay | Implicit associative memory | 🔬 In Progress |
678
+ | **v7.x** | Affect-Tagged Memory — sentiment shapes what gets recalled | Affect-modulated retrieval (neuroscience) | 🔭 Horizon |
679
+ | **v8+** | Zero-Search Retrieval — no index, no ANN, just ask the vector | Holographic Reduced Representations | 🔭 Horizon |
781
680
 
782
- > Informed by LeCun's "Why AI Systems Don't Learn" (Dupoux, LeCun, Malik — March 2026) and Kanerva's SDM.
681
+ > Informed by LeCun's "Why AI Systems Don't Learn" (Dupoux, LeCun, Malik) and Kanerva's SDM.
783
682
 
784
683
  ---
785
684
 
786
- ## 📅 Roadmap
685
+ ## 📦 Product Roadmap
787
686
 
788
687
  > **[Full ROADMAP.md →](ROADMAP.md)**
789
688
 
790
- **Shipped v5.5:**
791
- - 🛡️ Transactional migrations, graceful shutdown registry, thundering herd prevention, SDM decoder GC optimization
689
+ ### v6.2: The "Synthesize & Prune" Phase
690
+ The v6.1 series (through v6.1.8) shipped Prism-Port vault export, Intuitive Recall, full type guard hardening, and dashboard toggle persistence. The v6.2 phase aims to turn collected data into proactive intelligence, moving the dashboard from a passive storage viewer into an active, self-organizing Mind Palace.
792
691
 
793
- **Next v5.6:**
794
- - 🧠 **Full Superposed Memory (SDM)** O(1) semantic retrieval via Hamming correlation, no ANN index needed
795
- - 🔮 **Intuitive Recall** proactive surfacing of relevant past context without explicit `session_search_memory` calls
796
- - 📊 **Radar 2.0** — richer Hivemind dashboard with agent task graphs and dependency visualization
692
+ 1. 🕸️ **Automated Edge Synthesis (The "Dream" Procedure):** A background routine that runs on the graph payload to find semantically similar but disconnected nodes via Cosine Similarity. It highlights potential ghostly edges in the UI, empowering the system to autonomously suggest new mental models instead of waiting for the user to connect the dots manually.
693
+ 2. 🗓️ **Temporal Decay Heatmaps (Visualizing the Ebbinghaus Curve):** A UI overlay toggle where un-accessed nodes dynamically desaturate or physically "fade" while Graduated nodes (Score >= 7) stay vibrant longer. This makes the "Deep Purge" decision-making visceral: if the graph looks gray, trigger a learning session or a cleanup.
694
+ 3. 📝 **Active Recall Prompt Generation (Knowledge Activation):** A "Test Me" utility in the `nodeEditorPanel`. Using a node's semantic neighbors, the dashboard generates synthetic quizzes to ensure context retention, pushing the product away from pure "storage" into genuine "active learning" capabilities.
797
695
 
798
696
  ---
799
697
 
800
- ## ⚠️ Limitations
698
+ ## Limitations
801
699
 
802
700
  - **LLM-dependent features require an API key.** Semantic search, Morning Briefings, auto-compaction, and VLM captioning need a `GOOGLE_API_KEY` (Gemini) or equivalent provider key. Without one, Prism falls back to keyword-only search (FTS5).
803
- - **Auto-load is model-dependent.** Session auto-loading relies on the LLM following system prompt instructions. Gemini/Antigravity uses a [three-layer architecture](#antigravity-auto-load) (User Rules + AGENTS.md + Startup Skill) with a v5.2.1 server-side fallback that auto-pushes context if the model doesn't comply within 10 seconds.
701
+ - **Auto-load is model- and client-dependent.** Session auto-loading relies on both the LLM following system prompt instructions *and* the MCP client completing tool registration before the model's first turn. Prism provides platform-specific [Setup Guides](#-setup-guides) and a server-side fallback (v5.2.1) that auto-pushes context after 10 seconds.
702
+ - **MCP client race conditions.** Some MCP clients may not finish tool enumeration before the model generates its first response, causing transient `unknown_tool` errors. This is a client-side timing issue — Prism's server completes the MCP handshake in ~60ms. Workaround: the server-side auto-push fallback and the startup skill's retry logic.
804
703
  - **No real-time sync without Supabase.** Local SQLite mode is single-machine only. Multi-device or team sync requires a Supabase backend.
805
- - **Embedding quality varies by provider.** Gemini `text-embedding-004` and OpenAI `text-embedding-3-small` produce high-quality 768-dim vectors. Ollama embeddings (e.g., `nomic-embed-text`) are usable but may reduce retrieval accuracy.
704
+ - **Embedding quality varies by provider.** Gemini `text-embedding-004` and OpenAI `text-embedding-3-small` produce high-quality 768-dim vectors. Prism passes `dimensions: 768` via the Matryoshka API for OpenAI models (native output is 1536-dim; this truncation is lossless and outperforms ada-002 at full 1536 dims). Ollama embeddings (e.g., `nomic-embed-text`) are usable but may reduce retrieval accuracy.
806
705
  - **Dashboard is HTTP-only.** The Mind Palace dashboard at `localhost:3000` does not support HTTPS. For remote access, use a reverse proxy (nginx/Caddy) or SSH tunnel. Basic auth is available via `PRISM_DASHBOARD_USER` / `PRISM_DASHBOARD_PASS`.
807
- - **Migration is one-way.** Universal History Migration imports sessions *into* Prism but does not export back to Claude/Gemini/OpenAI formats. Use `session_export_memory` for portable JSON/Markdown export.
706
+ - **Long-lived clients can accumulate zombie processes.** MCP clients that run for extended periods (e.g., Claude CLI) may leave orphaned Prism server processes. The lifecycle manager detects true orphans (PPID=1) but allows coexistence for active parent processes. Use `PRISM_INSTANCE` to isolate instances across clients.
707
+ - **Migration is one-way.** Universal History Migration imports sessions *into* Prism but does not export back to Claude/Gemini/OpenAI formats. Use `session_export_memory` for portable JSON/Markdown export, or the `vault` format for Obsidian/Logseq-compatible `.zip` archives.
708
+ - **Export ceiling at 10,000 ledger entries.** The `session_export_memory` tool and the dashboard export button cap vault/JSON exports at 10,000 entries per project as an OOM guard. Projects exceeding this limit should use per-project exports and time-based filtering to stay within the ceiling. This limit does not affect search or context loading.
808
709
  - **No Windows CI testing.** Prism is developed and tested on macOS/Linux. It should work on Windows via Node.js, but edge cases (file paths, PID locks) may surface.
809
710
 
810
711
  ---