claude_memory 0.9.1 → 0.10.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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/memory.sqlite3 +0 -0
  3. data/.claude/skills/dashboard/SKILL.md +42 -0
  4. data/.claude-plugin/marketplace.json +1 -1
  5. data/.claude-plugin/plugin.json +1 -1
  6. data/CHANGELOG.md +86 -0
  7. data/CLAUDE.md +21 -5
  8. data/README.md +32 -2
  9. data/db/migrations/015_add_activity_events.rb +26 -0
  10. data/db/migrations/016_add_moment_feedback.rb +22 -0
  11. data/db/migrations/017_add_last_recalled_at.rb +15 -0
  12. data/docs/1_0_punchlist.md +190 -0
  13. data/docs/EXAMPLES.md +41 -2
  14. data/docs/GETTING_STARTED.md +31 -4
  15. data/docs/architecture.md +22 -7
  16. data/docs/audit-queries.md +131 -0
  17. data/docs/dashboard.md +172 -0
  18. data/docs/improvements.md +465 -9
  19. data/docs/influence/cq.md +187 -0
  20. data/docs/plugin.md +13 -6
  21. data/docs/quality_review.md +489 -172
  22. data/docs/reflection_memory_as_accumulating_judgment.md +67 -0
  23. data/lib/claude_memory/activity_log.rb +86 -0
  24. data/lib/claude_memory/commands/census_command.rb +210 -0
  25. data/lib/claude_memory/commands/completion_command.rb +3 -0
  26. data/lib/claude_memory/commands/dashboard_command.rb +54 -0
  27. data/lib/claude_memory/commands/dedupe_conflicts_command.rb +55 -0
  28. data/lib/claude_memory/commands/digest_command.rb +181 -0
  29. data/lib/claude_memory/commands/hook_command.rb +34 -0
  30. data/lib/claude_memory/commands/reclassify_references_command.rb +56 -0
  31. data/lib/claude_memory/commands/registry.rb +6 -1
  32. data/lib/claude_memory/commands/skills/distill-transcripts.md +13 -1
  33. data/lib/claude_memory/commands/stats_command.rb +38 -1
  34. data/lib/claude_memory/commands/sweep_command.rb +2 -0
  35. data/lib/claude_memory/configuration.rb +16 -0
  36. data/lib/claude_memory/core/relative_time.rb +9 -0
  37. data/lib/claude_memory/dashboard/api.rb +610 -0
  38. data/lib/claude_memory/dashboard/conflicts.rb +279 -0
  39. data/lib/claude_memory/dashboard/efficacy.rb +127 -0
  40. data/lib/claude_memory/dashboard/fact_presenter.rb +109 -0
  41. data/lib/claude_memory/dashboard/health.rb +175 -0
  42. data/lib/claude_memory/dashboard/index.html +2707 -0
  43. data/lib/claude_memory/dashboard/knowledge.rb +136 -0
  44. data/lib/claude_memory/dashboard/moments.rb +244 -0
  45. data/lib/claude_memory/dashboard/reuse.rb +97 -0
  46. data/lib/claude_memory/dashboard/scoped_fact_resolver.rb +95 -0
  47. data/lib/claude_memory/dashboard/server.rb +211 -0
  48. data/lib/claude_memory/dashboard/timeline.rb +68 -0
  49. data/lib/claude_memory/dashboard/trust.rb +285 -0
  50. data/lib/claude_memory/distill/reference_material_detector.rb +78 -0
  51. data/lib/claude_memory/hook/auto_memory_mirror.rb +112 -0
  52. data/lib/claude_memory/hook/context_injector.rb +97 -3
  53. data/lib/claude_memory/hook/handler.rb +50 -3
  54. data/lib/claude_memory/mcp/handlers/management_handlers.rb +8 -0
  55. data/lib/claude_memory/mcp/query_guide.rb +11 -0
  56. data/lib/claude_memory/mcp/text_summary.rb +29 -0
  57. data/lib/claude_memory/mcp/tool_definitions.rb +13 -0
  58. data/lib/claude_memory/mcp/tools.rb +148 -0
  59. data/lib/claude_memory/publish.rb +13 -21
  60. data/lib/claude_memory/recall/stale_detector.rb +67 -0
  61. data/lib/claude_memory/resolve/predicate_policy.rb +2 -0
  62. data/lib/claude_memory/resolve/resolver.rb +41 -11
  63. data/lib/claude_memory/store/llm_cache.rb +68 -0
  64. data/lib/claude_memory/store/metrics_aggregator.rb +96 -0
  65. data/lib/claude_memory/store/schema_manager.rb +1 -1
  66. data/lib/claude_memory/store/sqlite_store.rb +47 -143
  67. data/lib/claude_memory/store/store_manager.rb +29 -0
  68. data/lib/claude_memory/sweep/maintenance.rb +216 -0
  69. data/lib/claude_memory/sweep/recall_timestamp_refresher.rb +83 -0
  70. data/lib/claude_memory/sweep/sweeper.rb +2 -0
  71. data/lib/claude_memory/version.rb +1 -1
  72. data/lib/claude_memory.rb +22 -0
  73. metadata +49 -1
@@ -19,7 +19,7 @@ gem install claude_memory
19
19
  Verify installation:
20
20
  ```bash
21
21
  claude-memory --version
22
- # => claude_memory 0.2.0
22
+ # => claude_memory 0.10.0
23
23
  ```
24
24
 
25
25
  ### Step 2: Install the Plugin
@@ -283,13 +283,13 @@ ClaudeMemory Doctor Report
283
283
  ==========================
284
284
 
285
285
  ✓ Global database: ~/.claude/memory.sqlite3
286
- - Schema version: 6
286
+ - Schema version: 17
287
287
  - Facts: 12
288
288
  - Entities: 8
289
289
  - Status: Healthy
290
290
 
291
291
  ✓ Project database: .claude/memory.sqlite3
292
- - Schema version: 6
292
+ - Schema version: 17
293
293
  - Facts: 23
294
294
  - Entities: 15
295
295
  - Status: Healthy
@@ -314,6 +314,22 @@ ls -lh .claude/memory.sqlite3
314
314
  # => -rw-r--r-- 1 user staff 64K Jan 26 10:35 .claude/memory.sqlite3
315
315
  ```
316
316
 
317
+ ### Open the Dashboard (0.10.0+)
318
+
319
+ Once you have a few sessions worth of memory, the dashboard is the fastest
320
+ way to see what's actually in there:
321
+
322
+ ```bash
323
+ claude-memory dashboard
324
+ ```
325
+
326
+ Opens `http://localhost:3377` with a moments feed (every recall, context
327
+ injection, and extraction event), a Trust sidebar showing your global
328
+ "fingerprint" and 30-day utilization ratio, a deduped Conflicts panel, and a
329
+ Knowledge panel grouping facts by predicate.
330
+
331
+ See **[docs/dashboard.md](dashboard.md)** for the full panel guide.
332
+
317
333
  ### Test Memory Recall
318
334
 
319
335
  Have a conversation with Claude to test:
@@ -560,7 +576,8 @@ sqlite3 .claude/memory.sqlite3 "SELECT * FROM facts LIMIT 5;"
560
576
  Now that you're up and running:
561
577
 
562
578
  - 📖 Read [Examples](EXAMPLES.md) for common use cases
563
- - 🔧 Explore [Plugin Documentation](PLUGIN.md) for advanced configuration
579
+ - 📊 Open the [Dashboard](dashboard.md) for live inspection (0.10.0+)
580
+ - 🔧 Explore [Plugin Documentation](plugin.md) for advanced configuration
564
581
  - 🏗️ Review [Architecture](architecture.md) for technical details
565
582
  - 💬 Join [Discussions](https://github.com/codenamev/claude_memory/discussions) to share feedback
566
583
 
@@ -572,8 +589,18 @@ Now that you're up and running:
572
589
  | `claude-memory doctor` | Check system health |
573
590
  | `claude-memory recall <query>` | Search for facts |
574
591
  | `claude-memory promote <fact_id>` | Make fact global |
592
+ | `claude-memory reject <id_or_docid>` | Mark a fact as rejected |
575
593
  | `claude-memory changes` | Recent updates |
576
594
  | `claude-memory conflicts` | Show contradictions |
595
+ | `claude-memory dashboard` | Open the local web UI (0.10.0+) |
596
+ | `claude-memory digest --since 7` | Markdown report of the last 7 days (0.10.0+) |
597
+ | `claude-memory stats --stale` | List facts not recalled recently (0.10.0+) |
598
+ | `claude-memory stats --tools` | MCP tool-call telemetry (0.9.0+) |
599
+ | `claude-memory census` | Privacy-safe predicate audit across projects (0.10.0+) |
600
+ | `claude-memory dedupe-conflicts --dry-run` | Preview historical conflict-row dedup (0.10.0+) |
601
+ | `claude-memory reclassify-references --dry-run` | Preview reference-material retag (0.10.0+) |
602
+ | `claude-memory compact` | VACUUM databases |
603
+ | `claude-memory export` | Dump facts to JSON |
577
604
  | `/claude-memory:analyze` | Bootstrap project knowledge |
578
605
 
579
606
  ## Support
data/docs/architecture.md CHANGED
@@ -9,7 +9,7 @@ ClaudeMemory is architected using Domain-Driven Design (DDD) principles with cle
9
9
  ```
10
10
  ┌─────────────────────────────────────────────────────────────┐
11
11
  │ Application Layer │
12
- │ CLI (Router) → Commands (20 classes) → Configuration │
12
+ │ CLI (Router) → Commands (32 classes) → Configuration │
13
13
  └──────────────────────┬──────────────────────────────────────┘
14
14
 
15
15
  ┌──────────────────────▼──────────────────────────────────────┐
@@ -27,7 +27,7 @@ ClaudeMemory is architected using Domain-Driven Design (DDD) principles with cle
27
27
 
28
28
  ┌──────────────────────▼──────────────────────────────────────┐
29
29
  │ Infrastructure Layer │
30
- │ Store (SQLite v6 + WAL) → FileSystem → Index (FTS5+Vector)
30
+ │ Store (SQLite v17 + WAL) → FileSystem → Index (FTS5+Vector)│
31
31
  │ Templates │
32
32
  └─────────────────────────────────────────────────────────────┘
33
33
  ```
@@ -40,7 +40,7 @@ ClaudeMemory is architected using Domain-Driven Design (DDD) principles with cle
40
40
 
41
41
  **Components:**
42
42
  - **CLI** (`cli.rb`): Thin router that dispatches to command classes
43
- - **Commands** (`commands/`): 20 command classes, each handling one CLI command
43
+ - **Commands** (`commands/`): 32 command classes, each handling one CLI command
44
44
  - **Configuration** (`configuration.rb`): Centralized ENV access and path calculation
45
45
 
46
46
  **Key Principles:**
@@ -179,7 +179,7 @@ end
179
179
  **Components:**
180
180
 
181
181
  #### Store (`store/`)
182
- - **SQLiteStore**: Direct database access via Sequel (schema v6)
182
+ - **SQLiteStore**: Direct database access via Sequel (schema v17)
183
183
  - **StoreManager**: Manages dual databases (global + project)
184
184
  - **Transaction safety**: Atomic multi-step operations
185
185
  - **WAL mode**: Write-Ahead Logging for better concurrency
@@ -201,6 +201,21 @@ end
201
201
  - Output style templates (`output-styles/memory-aware.md`)
202
202
  - Setup and configuration scaffolding
203
203
 
204
+ #### Dashboard (`dashboard/`)
205
+ - **Server**: WEBrick HTTP server (default port 3377), starts via `claude-memory dashboard`
206
+ - **API**: HTTP-shape glue + per-endpoint formatting; routes/delegates to panel classes
207
+ - **Panels** (each backed by a dedicated class with focused responsibility):
208
+ - `Trust`: weekly moments, fingerprint, utilization, feedback ratio, needs-review
209
+ - `Moments`: feed-first activity stream with kind classification
210
+ - `Knowledge`: predicate-grouped fact summary (incl. References section)
211
+ - `Conflicts`: display-layer dedup with bulk-reject helper
212
+ - `Reuse`: most-used facts within window
213
+ - `Health`: db / hooks / vec checks with actionable fix strings
214
+ - `Timeline`: 30-day daily rollup
215
+ - `FactPresenter`, `ScopedFactResolver`: shared rendering / scope-aware ID resolution
216
+ - Connections released after every request — no held WAL writer locks across page loads
217
+ - See [docs/dashboard.md](dashboard.md) for the user-facing guide
218
+
204
219
  **Key Principles:**
205
220
  - Ports and Adapters: Clear interfaces for external systems
206
221
  - Dependency Injection: Real vs. test implementations
@@ -346,10 +361,10 @@ FileSystem (write)
346
361
  - Value objects (SessionId, TranscriptPath, FactId)
347
362
  - Centralized Configuration
348
363
  - 4 domain models with business logic
349
- - 20 command classes
350
- - 19 MCP tools
364
+ - 32 command classes
365
+ - 25 MCP tools
351
366
  - Semantic search with local embeddings (FastEmbed + TF-IDF fallback)
352
- - Schema v6 with WAL mode
367
+ - Schema v17 with WAL mode
353
368
 
354
369
  ## Future Improvements
355
370
 
@@ -0,0 +1,131 @@
1
+ # Audit Queries
2
+
3
+ Pre-written SQL for validating that the ClaudeMemory plugin is being invoked when it should. Run via [cq](https://github.com/technicalpickles/cq) — install with `cargo install --git https://github.com/technicalpickles/cq`.
4
+
5
+ These query Claude Code's raw transcripts (in `~/.claude/projects/`), not ClaudeMemory's own SQLite databases. That's deliberate: cq sees *all* tool calls including ones that bypassed the MCP server entirely, which is exactly the angle needed to spot activation gaps.
6
+
7
+ For server-side telemetry (counts, latencies of MCP calls that *did* land), use `claude-memory stats --tools` against ClaudeMemory's `mcp_tool_calls` table instead.
8
+
9
+ ## Query 1 — Memory plugin activation rate
10
+
11
+ How often is any `mcp__memory__*` tool being called, normalized by total sessions?
12
+
13
+ ```bash
14
+ cq sql "
15
+ WITH session_window AS (
16
+ SELECT DISTINCT session_id FROM messages
17
+ ),
18
+ memory_sessions AS (
19
+ SELECT DISTINCT session_id FROM tool_calls
20
+ WHERE name LIKE 'mcp__memory__%'
21
+ )
22
+ SELECT
23
+ (SELECT count(*) FROM session_window) AS total_sessions,
24
+ (SELECT count(*) FROM memory_sessions) AS sessions_with_memory_call,
25
+ ROUND(100.0 * (SELECT count(*) FROM memory_sessions)
26
+ / NULLIF((SELECT count(*) FROM session_window), 0), 1) AS pct
27
+ " --since 30d --table
28
+ ```
29
+
30
+ **Why it matters**: a low percentage doesn't mean the plugin is broken — many sessions don't need memory. It's a denominator for the next two queries.
31
+
32
+ ## Query 2 — Sessions that asked memory-shaped questions but never called memory
33
+
34
+ The most useful query. Surfaces user prompts where memory *should* have been the obvious tool, but Claude went elsewhere (Read, Grep, Bash) instead.
35
+
36
+ ```bash
37
+ cq sql "
38
+ WITH memory_sessions AS (
39
+ SELECT DISTINCT session_id FROM tool_calls
40
+ WHERE name LIKE 'mcp__memory__%'
41
+ )
42
+ SELECT
43
+ m.session_id,
44
+ m.timestamp,
45
+ left(m.text, 200) AS user_prompt
46
+ FROM messages m
47
+ LEFT JOIN memory_sessions ms ON m.session_id = ms.session_id
48
+ WHERE m.type = 'user'
49
+ AND ms.session_id IS NULL
50
+ AND (
51
+ m.text ILIKE '%why did we%'
52
+ OR m.text ILIKE '%what convention%'
53
+ OR m.text ILIKE '%how do we usually%'
54
+ OR m.text ILIKE '%what did we decide%'
55
+ OR m.text ILIKE '%architecture%'
56
+ OR m.text ILIKE '%what''s the pattern%'
57
+ )
58
+ ORDER BY m.timestamp DESC
59
+ " --since 30d --table --limit 30
60
+ ```
61
+
62
+ **What to do with results**: each row is a candidate for either (a) a tightening of MCP server instructions / skill descriptions, or (b) confirmation that the question genuinely didn't need memory and the keyword filter is too loose.
63
+
64
+ ## Query 3 — Which memory tools actually get called?
65
+
66
+ ```bash
67
+ cq sql "
68
+ SELECT
69
+ name AS tool,
70
+ count(*) AS invocations,
71
+ count(DISTINCT session_id) AS sessions
72
+ FROM tool_calls
73
+ WHERE name LIKE 'mcp__memory__%'
74
+ GROUP BY name
75
+ ORDER BY invocations DESC
76
+ " --since 30d --table
77
+ ```
78
+
79
+ **Expected shape**: `mcp__memory__recall`, `mcp__memory__conventions`, `mcp__memory__decisions` should dominate. Tools that never fire (`memory_fact_graph`, `memory_explain`, `memory_search_concepts`, `memory_facts_by_*`) might have description/triggering issues — same pattern as cq's "skill audit" use case.
80
+
81
+ ## Query 4 — Error rate per memory tool
82
+
83
+ ```bash
84
+ cq sql "
85
+ SELECT
86
+ tc.name AS tool,
87
+ count(*) AS calls,
88
+ sum(CASE WHEN tr.is_error THEN 1 ELSE 0 END) AS errors,
89
+ ROUND(100.0 * sum(CASE WHEN tr.is_error THEN 1 ELSE 0 END)
90
+ / count(*), 1) AS pct_errors
91
+ FROM tool_calls tc
92
+ JOIN tool_results tr ON tc.tool_use_id = tr.tool_use_id
93
+ WHERE tc.name LIKE 'mcp__memory__%'
94
+ GROUP BY tc.name
95
+ ORDER BY errors DESC
96
+ " --since 30d --table
97
+ ```
98
+
99
+ **Why it matters**: a memory tool returning errors is much worse than not firing — Claude sees the failure and learns to avoid that tool. Triage anything above ~5%.
100
+
101
+ ## Query 5 — Result-size distribution (context budget hygiene)
102
+
103
+ ```bash
104
+ cq sql "
105
+ SELECT
106
+ tc.name AS tool,
107
+ count(*) AS calls,
108
+ MIN(length(tr.content)) AS min_chars,
109
+ ROUND(AVG(length(tr.content))) AS avg_chars,
110
+ MAX(length(tr.content)) AS max_chars
111
+ FROM tool_calls tc
112
+ JOIN tool_results tr ON tc.tool_use_id = tr.tool_use_id
113
+ WHERE tc.name LIKE 'mcp__memory__%'
114
+ GROUP BY tc.name
115
+ ORDER BY avg_chars DESC
116
+ " --since 30d --table
117
+ ```
118
+
119
+ **Why it matters**: ClaudeMemory exposes a `compact: true` option that drops receipts for ~60% smaller responses. If averages are large, either the compact flag isn't being passed by callers or the tools that don't accept it are dumping too much.
120
+
121
+ ## When to re-run
122
+
123
+ - Before each release — does the new version improve activation rate or reduce errors?
124
+ - After meaningful changes to MCP server instructions / skill descriptions
125
+ - If a user reports "the memory plugin doesn't seem to do anything" — Query 2 will usually surface the gap concretely
126
+
127
+ ## Related
128
+
129
+ - Source for the methodology: `docs/influence/cq.md`
130
+ - Server-side telemetry alternative: `claude-memory stats --tools --since 30`
131
+ - cq schema reference: `cq schema --examples`
data/docs/dashboard.md ADDED
@@ -0,0 +1,172 @@
1
+ # ClaudeMemory Dashboard
2
+
3
+ Local web UI for inspecting what memory knows, what it's been doing, and where
4
+ it's going wrong. Headline feature of v0.10.0.
5
+
6
+ ## Quick start
7
+
8
+ ```bash
9
+ claude-memory dashboard
10
+ ```
11
+
12
+ Opens `http://localhost:3377` in your default browser. Reads from both the
13
+ global (`~/.claude/memory.sqlite3`) and project (`.claude/memory.sqlite3`)
14
+ databases. No write side effects from page loads — the UI is a viewer with
15
+ explicit action buttons (reject / promote / feedback) where applicable.
16
+
17
+ ```bash
18
+ # Custom port
19
+ claude-memory dashboard --port 4000
20
+
21
+ # Don't auto-open the browser (e.g. running in tmux/headless)
22
+ claude-memory dashboard --no-open
23
+ ```
24
+
25
+ Press `Ctrl+C` in the terminal to stop the server.
26
+
27
+ ## What each panel shows
28
+
29
+ The dashboard is **feed-first**: the main view is a chronological stream of
30
+ *moments* (memory activity events), with sidebar panels giving aggregate signals.
31
+
32
+ ### Sidebar — Trust
33
+
34
+ Three at-a-glance signals so you can answer "is memory helping?" in one look:
35
+
36
+ - **This week's moments** — count of value-producing events (recall hits,
37
+ context injections, extractions). Includes a week-over-week delta.
38
+ - **What memory knows about you** — up to 5 global facts rendered as plain
39
+ English. The "fingerprint" of your cross-project preferences.
40
+ - **Needs review** — open conflicts (deduped to distinct contradictions) +
41
+ stale facts (active but not recalled in the configured window) + empty
42
+ recalls (queries that returned nothing).
43
+ - **Utilization (30d)** — of facts extracted in the last 30 days, what % has
44
+ Claude actually surfaced via recall or context injection. Color-coded
45
+ (green ≥40%, yellow ≥15%, red below). Hidden on fresh installs.
46
+ - **Feedback (30d)** — thumbs-up/down ratio from moments you've rated.
47
+
48
+ ### Feed — Moments
49
+
50
+ Real-time stream of memory activity, classified by kind:
51
+
52
+ - `recall_hit` / `recall_empty` — `memory.recall*` calls, with top fact IDs
53
+ resolved to their sentences. Click for full payload.
54
+ - `context_injection` — SessionStart context emitted into Claude's prompt,
55
+ with a preview and the facts it carried. `context_skipped` when injection
56
+ was empty.
57
+ - `extraction` — facts/entities created via `memory.store_extraction`,
58
+ inlined with content preview.
59
+ - `hook_ingest` / `hook_sweep` — pipeline activity.
60
+
61
+ Each moment has a 👍/👎 button. Use them deliberately — the ratio feeds the
62
+ Trust panel and is a calibration signal we read against retrieval quality
63
+ benchmarks.
64
+
65
+ Filter via query params: `kinds=recall_hit`, `before=<ISO timestamp>`.
66
+
67
+ ### Knowledge
68
+
69
+ Active facts grouped by predicate. Sections include:
70
+
71
+ - Decisions, Conventions, Architecture (multi-value)
72
+ - Tech stack (uses_database, uses_framework, uses_language, deployment_platform, auth_method)
73
+ - **References** (added 0.10.0) — facts auto-tagged as reference material
74
+ by `Distill::ReferenceMaterialDetector` (LOC counts, "X is a plugin…"
75
+ templates, author attributions). Separated from conventions to keep the
76
+ signal-to-noise ratio of the conventions section high.
77
+
78
+ ### Conflicts
79
+
80
+ Open contradictions, deduped at the display layer: identical
81
+ `(subject, predicate, object_pair)` detections collapse into one row with a
82
+ `×N` badge. The "Needs review" sidebar count uses the deduped count, not
83
+ raw rows.
84
+
85
+ Each row links to:
86
+ - Both sides of the conflict with provenance
87
+ - A bulk-reject action ("reject all rows that match this exact contradiction")
88
+ - The originating activity event
89
+
90
+ ### Reuse
91
+
92
+ Most-used facts in the time window. Useful for answering "which facts are
93
+ actually doing the work?" when you suspect memory is accumulating dead weight.
94
+
95
+ ### Activity (timeline)
96
+
97
+ Daily rollup of facts created, content ingested, hook events fired, and
98
+ recalls performed over the last 30 days. Click any day to drill into the
99
+ underlying events.
100
+
101
+ ### Health
102
+
103
+ Four checks: global database, project database, hooks installation,
104
+ sqlite-vec coverage. Each surfaces an actionable fix string (e.g.,
105
+ "Run `claude-memory init` to install the standard hook set"). Status
106
+ escalates to the worst individual check (error > warning > healthy).
107
+
108
+ ### Activity drill-down
109
+
110
+ Clicking any moment opens a modal with the parsed payload, prettified JSON,
111
+ and — for recall events — a "what triggered this?" correlation showing the
112
+ preceding ingest and the user prompt that motivated the recall.
113
+
114
+ ### Query tester
115
+
116
+ Run `memory.recall*` queries inline and see scored results, with optional
117
+ score traces (`vec_rank`, `fts_rank`, `rrf_final`) for hybrid retrieval
118
+ debugging. Surfaces an actionable hint if FTS5 corruption is detected
119
+ (suggests `claude-memory compact`).
120
+
121
+ ## When to use it
122
+
123
+ - **After any session that surprised you** — was the recall actually firing?
124
+ Did the fact you taught get extracted? The Moments feed answers both.
125
+ - **Before promoting a fact to global** — see what's already there in the
126
+ Knowledge panel, including dedupe siblings.
127
+ - **When `claude-memory doctor` warns about conflicts** — the Conflicts
128
+ panel groups duplicates so you don't have to handle them one row at a time.
129
+ - **When deciding what to keep** — the Reuse panel shows which facts have
130
+ earned their spot; everything else is staleness candidate per the
131
+ `claude-memory stats --stale` listing.
132
+
133
+ ## What it's not
134
+
135
+ - Not an editor for fact text (use `claude-memory promote` / `reject`).
136
+ - Not a replacement for the CLI — for headless / scripted use, prefer
137
+ `claude-memory stats`, `claude-memory digest`, `claude-memory census`.
138
+ - Not a multi-user surface — bound to localhost, single-process WEBrick.
139
+ - Not a long-running service — runs in the foreground; close when done.
140
+
141
+ ## Architecture
142
+
143
+ The dashboard is a thin web layer over the same `Recall`, `Conflicts`,
144
+ `Trust`, `Moments`, etc. classes the MCP server uses. Each panel is backed by
145
+ a dedicated module under `lib/claude_memory/dashboard/`:
146
+
147
+ | Panel / endpoint | Module | Responsibility |
148
+ |---|---|---|
149
+ | Trust sidebar | `Dashboard::Trust` | Weekly moments, fingerprint, utilization, feedback |
150
+ | Feed | `Dashboard::Moments` | Activity-event classification + presenter |
151
+ | Knowledge | `Dashboard::Knowledge` | Predicate-grouped fact summary |
152
+ | Conflicts | `Dashboard::Conflicts` | Dedup grouping, bulk-reject helper |
153
+ | Reuse | `Dashboard::Reuse` | Most-used-fact ranking |
154
+ | Health | `Dashboard::Health` | Four system checks with fix strings |
155
+ | Timeline | `Dashboard::Timeline` | 30-day daily rollup |
156
+ | Routing | `Dashboard::API` | HTTP-shape glue + per-endpoint formatting |
157
+
158
+ Connections are released after each request so the dashboard never holds a
159
+ WAL writer lock open across page loads.
160
+
161
+ ## Related CLI
162
+
163
+ - `claude-memory digest [--since DAYS] [--output FILE]` — markdown report of
164
+ the same Trust + Knowledge + Conflicts + Feedback signals, suitable for
165
+ email or commit-into-repo.
166
+ - `claude-memory census [--root DIR]` — privacy-safe cross-project
167
+ predicate vocabulary scan; pairs with the Knowledge panel for "what
168
+ predicates does my whole tree use?".
169
+ - `claude-memory stats --stale [--stale-days N]` — list facts the dashboard
170
+ flags as stale.
171
+ - `claude-memory dedupe-conflicts` / `reclassify-references` — one-shot
172
+ cleanups for what the Conflicts and Knowledge → References panels surface.