@theihtisham/agent-shadow-brain 6.0.3 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +40 -40
  2. package/README.md +427 -366
  3. package/dist/brain/brain-bus.d.ts +40 -0
  4. package/dist/brain/brain-bus.d.ts.map +1 -0
  5. package/dist/brain/brain-bus.js +94 -0
  6. package/dist/brain/brain-bus.js.map +1 -0
  7. package/dist/brain/collision-detective.d.ts.map +1 -1
  8. package/dist/brain/collision-detective.js +16 -0
  9. package/dist/brain/collision-detective.js.map +1 -1
  10. package/dist/brain/dream-engine.d.ts.map +1 -1
  11. package/dist/brain/dream-engine.js +12 -0
  12. package/dist/brain/dream-engine.js.map +1 -1
  13. package/dist/brain/forgetting-curve.d.ts.map +1 -1
  14. package/dist/brain/forgetting-curve.js +19 -0
  15. package/dist/brain/forgetting-curve.js.map +1 -1
  16. package/dist/brain/global-brain.d.ts +4 -0
  17. package/dist/brain/global-brain.d.ts.map +1 -1
  18. package/dist/brain/global-brain.js +26 -0
  19. package/dist/brain/global-brain.js.map +1 -1
  20. package/dist/brain/memory-graph.d.ts +51 -0
  21. package/dist/brain/memory-graph.d.ts.map +1 -0
  22. package/dist/brain/memory-graph.js +267 -0
  23. package/dist/brain/memory-graph.js.map +1 -0
  24. package/dist/brain/memory-seeder.d.ts.map +1 -1
  25. package/dist/brain/memory-seeder.js +23 -0
  26. package/dist/brain/memory-seeder.js.map +1 -1
  27. package/dist/brain/subagent-bridge.d.ts.map +1 -1
  28. package/dist/brain/subagent-bridge.js +12 -0
  29. package/dist/brain/subagent-bridge.js.map +1 -1
  30. package/dist/cli.js +1 -1
  31. package/dist/dashboard/server.d.ts +19 -0
  32. package/dist/dashboard/server.d.ts.map +1 -1
  33. package/dist/dashboard/server.js +169 -5
  34. package/dist/dashboard/server.js.map +1 -1
  35. package/dist/dashboard/v6-dashboard-html.d.ts +1 -1
  36. package/dist/dashboard/v6-dashboard-html.d.ts.map +1 -1
  37. package/dist/dashboard/v6-dashboard-html.js +2129 -942
  38. package/dist/dashboard/v6-dashboard-html.js.map +1 -1
  39. package/docs/launch/RELEASE_CHECKLIST_v6.0.3.md +102 -102
  40. package/docs/launch/RELEASE_NOTES_v6.0.3.md +111 -111
  41. package/docs/launch/RELEASE_NOTES_v6.1.0.md +38 -0
  42. package/docs/launch/RELEASE_NOTES_v6.2.0.md +54 -0
  43. package/package.json +27 -25
  44. package/tools/export-resume-pack.mjs +56 -56
  45. package/tools/record-global-memory.mjs +72 -72
package/README.md CHANGED
@@ -1,366 +1,427 @@
1
- # Agent Shadow Brain
2
-
3
- Local-first memory and coordination for AI coding agents.
4
-
5
- Version: 6.0.3
6
-
7
- Agent Shadow Brain gives tools like Codex, Claude Code, Cursor, Cline, OpenCode, Aider, and related MCP clients a shared local memory layer. It stores compact, source-backed lessons about projects, recalls them later, generates fresh-session briefings, audits memory quality, and exports JSONL training/eval packs.
8
-
9
- It does not change model weights by itself. It helps agents work better by giving them relevant, current, source-linked context before and during complex work.
10
-
11
- ## What It Actually Does
12
-
13
- - Stores cross-project and cross-agent memories in a local JSON brain at `~/.shadow-brain/global.json`.
14
- - Recalls memories by project, agent, category, and keywords.
15
- - Generates source-backed resume packs for fresh sessions, account switches, context compaction, and handoffs.
16
- - Audits memory quality: source coverage, stale entries, duplicates, low-quality notes, recall health.
17
- - Creates verified memory seed drafts from dashboard/API, then requires user, agent, or dual approval before writing to durable memory.
18
- - Exports JSONL rows for evals, distillation, or local fine-tuning pipelines.
19
- - Provides CLI, dashboard API, and MCP tool surfaces.
20
- - Includes safety helpers such as hook audit, detach, and action firewall checks.
21
- - Works without telemetry and without an API key for local memory features.
22
-
23
- ## What It Does Not Claim
24
-
25
- - It does not secretly train GPT, Claude, Gemini, or any remote model.
26
- - It does not guarantee perfect recall.
27
- - It does not replace project docs, tests, source control, or human review.
28
- - It does not make every listed agent automatically available. Agent support depends on local installation and hook/config compatibility.
29
- - It does not publish or sync data unless you explicitly use export, sync, or other sharing commands.
30
-
31
- ## Install
32
-
33
- ```bash
34
- npm install -g @theihtisham/agent-shadow-brain
35
- ```
36
-
37
- CLI binaries:
38
-
39
- ```bash
40
- shadow-brain --help
41
- asb --help
42
- ```
43
-
44
- You can also run without global install:
45
-
46
- ```bash
47
- npx @theihtisham/agent-shadow-brain@latest --help
48
- ```
49
-
50
- ## Safe First Run
51
-
52
- Start by auditing before attaching hooks:
53
-
54
- ```bash
55
- shadow-brain audit-hooks .
56
- shadow-brain live-brain status .
57
- ```
58
-
59
- Only attach after you review what will be changed:
60
-
61
- ```bash
62
- shadow-brain attach-all .
63
- ```
64
-
65
- Detach later if needed:
66
-
67
- ```bash
68
- shadow-brain detach-all .
69
- ```
70
-
71
- ## v6.0.3: Live Brain
72
-
73
- The 6.0.3 release focuses on practical long-memory improvement for agents.
74
-
75
- ### Live Brain Status
76
-
77
- ```bash
78
- shadow-brain live-brain status .
79
- ```
80
-
81
- Shows:
82
-
83
- - memory count
84
- - average memory quality
85
- - source coverage
86
- - stale memories
87
- - duplicate clusters
88
- - recall eval score
89
- - recommended cleanup actions
90
-
91
- JSON output:
92
-
93
- ```bash
94
- shadow-brain live-brain status . --json
95
- ```
96
-
97
- ### Agent Briefing
98
-
99
- Generate a markdown briefing for a fresh agent session:
100
-
101
- ```bash
102
- shadow-brain live-brain brief . -o SHADOW_BRAIN_AGENT_BRIEF.md
103
- ```
104
-
105
- The briefing includes:
106
-
107
- - rules for agents
108
- - top source-backed memories
109
- - memory warnings
110
- - recall health
111
- - commands agents should run next
112
-
113
- ### Recall Eval
114
-
115
- Check whether the brain can retrieve useful memories for common agent tasks:
116
-
117
- ```bash
118
- shadow-brain live-brain eval .
119
- ```
120
-
121
- Custom eval queries use pipe separators:
122
-
123
- ```bash
124
- shadow-brain live-brain eval . --queries "current blocker|do not repeat|verified command"
125
- ```
126
-
127
- ### Memory Hygiene
128
-
129
- List concrete cleanup and learning actions:
130
-
131
- ```bash
132
- shadow-brain live-brain hygiene .
133
- ```
134
-
135
- This highlights missing sources, stale memories, duplicates, weak recall, and missing project-scoped memories.
136
-
137
- ### Training/Eval Export
138
-
139
- Export source-backed memories as JSONL:
140
-
141
- ```bash
142
- shadow-brain live-brain train-pack . --out shadow-brain-training.jsonl
143
- ```
144
-
145
- This is useful for:
146
-
147
- - retrieval evals
148
- - local distillation experiments
149
- - supervised fine-tuning datasets
150
- - memory regression tests
151
-
152
- The export is only data preparation. You choose the downstream training/eval tool.
153
-
154
- ## Core Memory Commands
155
-
156
- Recall from the global brain:
157
-
158
- ```bash
159
- shadow-brain global recall --query "current blocker next step" --json --limit 8
160
- ```
161
-
162
- Show global stats:
163
-
164
- ```bash
165
- shadow-brain global stats
166
- ```
167
-
168
- Create a source-backed resume seed:
169
-
170
- ```bash
171
- shadow-brain resume-seed . -o SHADOW_BRAIN_RESUME_SEED.md
172
- ```
173
-
174
- Show what a project has learned:
175
-
176
- ```bash
177
- shadow-brain timeline . --limit 30
178
- ```
179
-
180
- Create a cross-agent handoff packet:
181
-
182
- ```bash
183
- shadow-brain handoff codex claude-code . --task "continue release verification"
184
- ```
185
-
186
- Record a durable memory from a script:
187
-
188
- ```bash
189
- node tools/record-global-memory.mjs ^
190
- --project-dir "." ^
191
- --project-name "my-project" ^
192
- --agent codex ^
193
- --category "project.lesson" ^
194
- --importance 0.8 ^
195
- --tags "memory,release" ^
196
- --sources "README.md,CHANGELOG.md" ^
197
- --content "Keep release notes source-backed and verify npm metadata before publish."
198
- ```
199
-
200
- ## Dashboard
201
-
202
- Start the local dashboard:
203
-
204
- ```bash
205
- shadow-brain dash . --no-open --port 7341
206
- ```
207
-
208
- For a fast UI/API-only launch on a large repo:
209
-
210
- ```bash
211
- shadow-brain dash . --no-open --no-analysis --host 127.0.0.1 --port 7341
212
- ```
213
-
214
- Open:
215
-
216
- ```text
217
- http://127.0.0.1:7341
218
- ```
219
-
220
- The v6 dashboard includes a **Live Brain** tab for memory health, source coverage, recall evals, hygiene actions, top memories, and the generated agent briefing.
221
-
222
- It also includes:
223
-
224
- - **Memory Browser intelligence cards** for total memories, source coverage, fresh learning, seed queue, top categories, agent coverage, and top tags.
225
- - **Memory Seeder** for controlled research-to-memory workflows. Drafts stay out of the global brain until approval is complete.
226
- - **Token Economy accuracy split**: current runtime agent is shown separately from historical model spend, so old Claude/Cursor spend records do not imply the dashboard is running that agent.
227
-
228
- Memory seeding API:
229
-
230
- ```text
231
- GET /api/v6/seed-drafts
232
- POST /api/v6/seed-draft
233
- POST /api/v6/seed-approve
234
- POST /api/v6/seed-reject
235
- POST /api/v6/seed-commit
236
- GET /api/v6/memory-intelligence
237
- ```
238
-
239
- Useful API endpoints:
240
-
241
- ```text
242
- GET/POST /api/v6/live-brain
243
- GET/POST /api/v6/resume-pack
244
- GET/POST /api/v6/ww2br-recall
245
- GET/POST /api/v6/memory-browser
246
- ```
247
-
248
- Example:
249
-
250
- ```bash
251
- curl "http://127.0.0.1:7341/api/v6/live-brain?projectDir=C:/path/to/project"
252
- ```
253
-
254
- ## MCP Tools
255
-
256
- The MCP server exposes memory and agent-control tools for compatible clients.
257
-
258
- New in 6.0.3:
259
-
260
- - `live_brain_status`
261
- - `live_brain_brief`
262
- - `live_brain_train_pack`
263
-
264
- Existing useful tools include:
265
-
266
- - `global_recall`
267
- - `global_stats`
268
- - `global_timeline`
269
- - `subconscious_inject`
270
- - `agent_handoff`
271
- - `firewall_check`
272
-
273
- Start MCP from the dashboard API or existing CLI/server integration, depending on your setup.
274
-
275
- ## How Agents Should Use It
276
-
277
- Recommended workflow for complex work:
278
-
279
- 1. Run `shadow-brain live-brain status <project>`.
280
- 2. Generate or read a live briefing.
281
- 3. Verify current project docs and source files.
282
- 4. Work normally.
283
- 5. Record only durable, source-backed lessons after proof.
284
- 6. Run recall evals when memory quality starts to drift.
285
-
286
- Good memories are short, action-oriented, and source-backed:
287
-
288
- ```text
289
- [lesson:release-readme-v1] Before publishing, verify package.json version, package-lock root version, README install commands, build output, and npm pack contents.
290
- Sources: package.json; package-lock.json; README.md
291
- Tags: release,npm,verification
292
- ```
293
-
294
- Bad memories are vague:
295
-
296
- ```text
297
- Make project better.
298
- ```
299
-
300
- ## Local Data
301
-
302
- Default global brain:
303
-
304
- ```text
305
- ~/.shadow-brain/global.json
306
- ```
307
-
308
- Project-local generated files may include:
309
-
310
- ```text
311
- SHADOW_BRAIN_AGENT_BRIEF.md
312
- SHADOW_BRAIN_RESUME_SEED.md
313
- shadow-brain-training.jsonl
314
- ```
315
-
316
- Do not store secrets, API keys, passwords, private keys, or raw credentials in memory content, metadata, tags, prompts, reports, or exported training data.
317
-
318
- ## Development
319
-
320
- ```bash
321
- npm install
322
- npm run build
323
- npm test
324
- ```
325
-
326
- Focused tests:
327
-
328
- ```bash
329
- npx vitest run tests/brain/live-brain.test.ts tests/brain/context-continuity.test.ts
330
- ```
331
-
332
- On Windows PowerShell, if execution policy blocks `npm.ps1`, use:
333
-
334
- ```powershell
335
- npm.cmd run build
336
- npx.cmd vitest run tests\brain\live-brain.test.ts
337
- ```
338
-
339
- ## Release Checklist
340
-
341
- For a 6.0.3 release:
342
-
343
- ```bash
344
- npm run build
345
- npm test
346
- npm pack --dry-run
347
- ```
348
-
349
- Then publish only after verifying the package contents:
350
-
351
- ```bash
352
- npm publish --access public
353
- ```
354
-
355
- GitHub release should include:
356
-
357
- - this README
358
- - `CHANGELOG.md`
359
- - `docs/launch/RELEASE_NOTES_v6.0.3.md`
360
- - `docs/launch/RELEASE_CHECKLIST_v6.0.3.md`
361
- - build/test output
362
- - npm package dry-run output
363
-
364
- ## License
365
-
366
- MIT
1
+ # Agent Shadow Brain
2
+
3
+ Local-first memory and coordination for AI coding agents.
4
+
5
+ Version: 6.2.0
6
+
7
+ <p align="center">
8
+ <img src="docs/launch/agent-shadow-brain-v6.0.3-banner.png" alt="Agent Shadow Brain shared local memory layer for AI agents" width="100%">
9
+ </p>
10
+ <p align="center">
11
+ <a href="https://trendshift.io/repositories/20881" target="_blank"><img src="https://trendshift.io/api/badge/repositories/20881" alt="chopratejas%2Fheadroom | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
12
+ </p>
13
+ <p align="center">
14
+ <img src="docs/launch/github-trending-ready.svg" alt="GitHub Trending Ready - Agent Shadow Brain v6.0.3 live on npm" width="420">
15
+ </p>
16
+
17
+ Agent Shadow Brain gives tools like Codex, Claude Code, Cursor, Cline, OpenCode, Aider, and related MCP clients a shared local memory layer. It stores compact, source-backed lessons about projects, recalls them later, generates fresh-session briefings, audits memory quality, and exports JSONL training/eval packs.
18
+
19
+ It does not change model weights by itself. It helps agents work better by giving them relevant, current, source-linked context before and during complex work.
20
+
21
+ ## What's New in 6.2.0
22
+
23
+ A major dashboard upgrade focused on clarity and visibility.
24
+
25
+ - **Simple by default, Advanced on demand.** The dashboard opens with eight plain-English tabs (Home, Brain Map, Memories, Ask the Brain, Activity, Connected Tools, Brain Health, Settings). Flip to Advanced to reveal every feature — nothing was removed, just tidied.
26
+ - **Brain Map.** An interactive graph of everything the brain remembers — memories, projects, tools, and tags — sized by importance (PageRank) and linked by shared context. Zoom, pan, click a node for details, and watch it grow live as new memories arrive.
27
+ - **Realtime activity.** Memory writes, reflections, and tool events stream live over WebSocket instead of polling, with a live pulse on Home.
28
+ - **Live Network.** A refreshed animation of your tools talking to the brain, with flowing signal pulses.
29
+ - **Two-way knowledge seeding.** Quick-Save captures knowledge in one click; "Hand to Agent" generates a ready briefing to pass context back to any tool.
30
+ - **Plain-language everywhere.** Cryptic feature names rewritten (e.g. Calibration → Accuracy, Pre-Mortem → Risk Check, Tokens → Cost & Usage), each with a hover description.
31
+
32
+ <p align="center">
33
+ <img src="docs/screenshots/01-home.png" alt="Shadow Brain dashboard Home — summary of memories, connected tools, and live activity" width="100%">
34
+ </p>
35
+ <p align="center">
36
+ <img src="docs/screenshots/02-brain-map.png" alt="Brain Map — interactive memory constellation graph" width="100%">
37
+ </p>
38
+ <p align="center">
39
+ <img src="docs/screenshots/03-live-network.png" alt="Live Network — animated view of tools communicating with the brain" width="100%">
40
+ </p>
41
+
42
+ ## What It Actually Does
43
+
44
+ - Stores cross-project and cross-agent memories in a local JSON brain at `~/.shadow-brain/global.json`.
45
+ - Recalls memories by project, agent, category, and keywords.
46
+ - Generates source-backed resume packs for fresh sessions, account switches, context compaction, and handoffs.
47
+ - Audits memory quality: source coverage, stale entries, duplicates, low-quality notes, recall health.
48
+ - Creates verified memory seed drafts from dashboard/API, then requires user, agent, or dual approval before writing to durable memory.
49
+ - Exports JSONL rows for evals, distillation, or local fine-tuning pipelines.
50
+ - Provides CLI, dashboard API, and MCP tool surfaces.
51
+ - Includes safety helpers such as hook audit, detach, and action firewall checks.
52
+ - Works without telemetry and without an API key for local memory features.
53
+
54
+ ## What It Does Not Claim
55
+
56
+ - It does not secretly train GPT, Claude, Gemini, or any remote model.
57
+ - It does not guarantee perfect recall.
58
+ - It does not replace project docs, tests, source control, or human review.
59
+ - It does not make every listed agent automatically available. Agent support depends on local installation and hook/config compatibility.
60
+ - It does not publish or sync data unless you explicitly use export, sync, or other sharing commands.
61
+
62
+ ## Install
63
+
64
+ ```bash
65
+ npm install -g @theihtisham/agent-shadow-brain
66
+ ```
67
+
68
+ CLI binaries:
69
+
70
+ ```bash
71
+ shadow-brain --help
72
+ asb --help
73
+ ```
74
+
75
+ You can also run without global install:
76
+
77
+ ```bash
78
+ npx @theihtisham/agent-shadow-brain@latest --help
79
+ ```
80
+
81
+ ## Safe First Run
82
+
83
+ Start by auditing before attaching hooks:
84
+
85
+ ```bash
86
+ shadow-brain audit-hooks .
87
+ shadow-brain live-brain status .
88
+ ```
89
+
90
+ Only attach after you review what will be changed:
91
+
92
+ ```bash
93
+ shadow-brain attach-all .
94
+ ```
95
+
96
+ Detach later if needed:
97
+
98
+ ```bash
99
+ shadow-brain detach-all .
100
+ ```
101
+
102
+ ## v6.0.3: Live Brain
103
+
104
+ The 6.0.3 release focuses on practical long-memory improvement for agents.
105
+
106
+ ### Live Brain Status
107
+
108
+ ```bash
109
+ shadow-brain live-brain status .
110
+ ```
111
+
112
+ Shows:
113
+
114
+ - memory count
115
+ - average memory quality
116
+ - source coverage
117
+ - stale memories
118
+ - duplicate clusters
119
+ - recall eval score
120
+ - recommended cleanup actions
121
+
122
+ JSON output:
123
+
124
+ ```bash
125
+ shadow-brain live-brain status . --json
126
+ ```
127
+
128
+ ### Agent Briefing
129
+
130
+ Generate a markdown briefing for a fresh agent session:
131
+
132
+ ```bash
133
+ shadow-brain live-brain brief . -o SHADOW_BRAIN_AGENT_BRIEF.md
134
+ ```
135
+
136
+ The briefing includes:
137
+
138
+ - rules for agents
139
+ - top source-backed memories
140
+ - memory warnings
141
+ - recall health
142
+ - commands agents should run next
143
+
144
+ ### Recall Eval
145
+
146
+ Check whether the brain can retrieve useful memories for common agent tasks:
147
+
148
+ ```bash
149
+ shadow-brain live-brain eval .
150
+ ```
151
+
152
+ Custom eval queries use pipe separators:
153
+
154
+ ```bash
155
+ shadow-brain live-brain eval . --queries "current blocker|do not repeat|verified command"
156
+ ```
157
+
158
+ ### Memory Hygiene
159
+
160
+ List concrete cleanup and learning actions:
161
+
162
+ ```bash
163
+ shadow-brain live-brain hygiene .
164
+ ```
165
+
166
+ This highlights missing sources, stale memories, duplicates, weak recall, and missing project-scoped memories.
167
+
168
+ ### Training/Eval Export
169
+
170
+ Export source-backed memories as JSONL:
171
+
172
+ ```bash
173
+ shadow-brain live-brain train-pack . --out shadow-brain-training.jsonl
174
+ ```
175
+
176
+ This is useful for:
177
+
178
+ - retrieval evals
179
+ - local distillation experiments
180
+ - supervised fine-tuning datasets
181
+ - memory regression tests
182
+
183
+ The export is only data preparation. You choose the downstream training/eval tool.
184
+
185
+ ## Core Memory Commands
186
+
187
+ Recall from the global brain:
188
+
189
+ ```bash
190
+ shadow-brain global recall --query "current blocker next step" --json --limit 8
191
+ ```
192
+
193
+ Show global stats:
194
+
195
+ ```bash
196
+ shadow-brain global stats
197
+ ```
198
+
199
+ Create a source-backed resume seed:
200
+
201
+ ```bash
202
+ shadow-brain resume-seed . -o SHADOW_BRAIN_RESUME_SEED.md
203
+ ```
204
+
205
+ Show what a project has learned:
206
+
207
+ ```bash
208
+ shadow-brain timeline . --limit 30
209
+ ```
210
+
211
+ Create a cross-agent handoff packet:
212
+
213
+ ```bash
214
+ shadow-brain handoff codex claude-code . --task "continue release verification"
215
+ ```
216
+
217
+ Record a durable memory from a script:
218
+
219
+ ```bash
220
+ node tools/record-global-memory.mjs ^
221
+ --project-dir "." ^
222
+ --project-name "my-project" ^
223
+ --agent codex ^
224
+ --category "project.lesson" ^
225
+ --importance 0.8 ^
226
+ --tags "memory,release" ^
227
+ --sources "README.md,CHANGELOG.md" ^
228
+ --content "Keep release notes source-backed and verify npm metadata before publish."
229
+ ```
230
+
231
+ ## Dashboard
232
+
233
+ Start the local dashboard:
234
+
235
+ ```bash
236
+ shadow-brain dash . --no-open --port 7341
237
+ ```
238
+
239
+ For a fast UI/API-only launch on a large repo:
240
+
241
+ ```bash
242
+ shadow-brain dash . --no-open --no-analysis --host 127.0.0.1 --port 7341
243
+ ```
244
+
245
+ Open:
246
+
247
+ ```text
248
+ http://127.0.0.1:7341
249
+ ```
250
+
251
+ The v6 dashboard includes a **Live Brain** tab for memory health, source coverage, recall evals, hygiene actions, top memories, and the generated agent briefing.
252
+
253
+ It also includes:
254
+
255
+ - **Memory Browser intelligence cards** for total memories, source coverage, fresh learning, seed queue, top categories, agent coverage, and top tags.
256
+ - **Memory Seeder** for controlled research-to-memory workflows. Drafts stay out of the global brain until approval is complete.
257
+ - **Token Economy accuracy split**: current runtime agent is shown separately from historical model spend, so old Claude/Cursor spend records do not imply the dashboard is running that agent.
258
+
259
+ ### Realtime Activity (new in 6.1.0)
260
+
261
+ The dashboard now streams brain activity live over its WebSocket instead of polling. Memory writes, dreams, seed drafts/commits, collisions, sub-agent spawns, and consolidation cycles appear the instant they happen.
262
+
263
+ - **Live Pulse** card on the Overview with a streaming mini-feed and an events/min rate.
264
+ - **Activity Log** tab with filter chips, a pulsing LIVE badge, pause/resume, clear, search, and an events/min sparkline.
265
+ - **Connection indicator** in the header — green when the realtime socket is live, amber while reconnecting.
266
+ - **Cross-process aware**: a memory written by an agent in a *different* terminal is picked up by watching `~/.shadow-brain/global.json`, so the feed reflects the whole machine, not just this process.
267
+
268
+ Polling remains as a 15-second reconciliation fallback; live events arrive in well under a second.
269
+
270
+ ### Intelligence Hub — Memory Constellation (new in 6.2.0)
271
+
272
+ A new **Intelligence** tab turns the brain into an interactive graph. Every memory, project, agent, and tag is a node in a force-directed **Memory Constellation**, sized by importance (PageRank blended with each memory's own score) and linked by project, author, tags, and shared-tag relatedness.
273
+
274
+ - **Interactive**: scroll to zoom, drag to pan, click a node to focus its neighborhood and open a detail drawer; hover for a tooltip.
275
+ - **Filters + search** by node type (memory / project / agent / tag).
276
+ - **Live**: new memories pulse into the graph over the realtime stream.
277
+ - **Analytics strip**: source-coverage gauge, agent-contribution and category charts, tag cloud, and a recent-memory feed.
278
+ - Works instantly on your existing `~/.shadow-brain/global.json` — no project analysis or setup step.
279
+
280
+ Several previously sparse tabs were also rebuilt with real visualizations: **Pre-Mortem** (risk matrix + failure cards), **Attention** (weighted heat bars), **Calibration** (Brier/trust chart), **Reputation** (trust rings), **Causal Chains** (node-link DAG), and **Branch Brains** (stat cards).
281
+
282
+ Constellation API:
283
+
284
+ ```text
285
+ GET /api/v6/memory-graph
286
+ ```
287
+
288
+
289
+ Memory seeding API:
290
+
291
+ ```text
292
+ GET /api/v6/seed-drafts
293
+ POST /api/v6/seed-draft
294
+ POST /api/v6/seed-approve
295
+ POST /api/v6/seed-reject
296
+ POST /api/v6/seed-commit
297
+ GET /api/v6/memory-intelligence
298
+ ```
299
+
300
+ Useful API endpoints:
301
+
302
+ ```text
303
+ GET/POST /api/v6/live-brain
304
+ GET/POST /api/v6/resume-pack
305
+ GET/POST /api/v6/ww2br-recall
306
+ GET/POST /api/v6/memory-browser
307
+ ```
308
+
309
+ Example:
310
+
311
+ ```bash
312
+ curl "http://127.0.0.1:7341/api/v6/live-brain?projectDir=C:/path/to/project"
313
+ ```
314
+
315
+ ## MCP Tools
316
+
317
+ The MCP server exposes memory and agent-control tools for compatible clients.
318
+
319
+ New in 6.0.3:
320
+
321
+ - `live_brain_status`
322
+ - `live_brain_brief`
323
+ - `live_brain_train_pack`
324
+
325
+ Existing useful tools include:
326
+
327
+ - `global_recall`
328
+ - `global_stats`
329
+ - `global_timeline`
330
+ - `subconscious_inject`
331
+ - `agent_handoff`
332
+ - `firewall_check`
333
+
334
+ Start MCP from the dashboard API or existing CLI/server integration, depending on your setup.
335
+
336
+ ## How Agents Should Use It
337
+
338
+ Recommended workflow for complex work:
339
+
340
+ 1. Run `shadow-brain live-brain status <project>`.
341
+ 2. Generate or read a live briefing.
342
+ 3. Verify current project docs and source files.
343
+ 4. Work normally.
344
+ 5. Record only durable, source-backed lessons after proof.
345
+ 6. Run recall evals when memory quality starts to drift.
346
+
347
+ Good memories are short, action-oriented, and source-backed:
348
+
349
+ ```text
350
+ [lesson:release-readme-v1] Before publishing, verify package.json version, package-lock root version, README install commands, build output, and npm pack contents.
351
+ Sources: package.json; package-lock.json; README.md
352
+ Tags: release,npm,verification
353
+ ```
354
+
355
+ Bad memories are vague:
356
+
357
+ ```text
358
+ Make project better.
359
+ ```
360
+
361
+ ## Local Data
362
+
363
+ Default global brain:
364
+
365
+ ```text
366
+ ~/.shadow-brain/global.json
367
+ ```
368
+
369
+ Project-local generated files may include:
370
+
371
+ ```text
372
+ SHADOW_BRAIN_AGENT_BRIEF.md
373
+ SHADOW_BRAIN_RESUME_SEED.md
374
+ shadow-brain-training.jsonl
375
+ ```
376
+
377
+ Do not store secrets, API keys, passwords, private keys, or raw credentials in memory content, metadata, tags, prompts, reports, or exported training data.
378
+
379
+ ## Development
380
+
381
+ ```bash
382
+ npm install
383
+ npm run build
384
+ npm test
385
+ ```
386
+
387
+ Focused tests:
388
+
389
+ ```bash
390
+ npx vitest run tests/brain/live-brain.test.ts tests/brain/context-continuity.test.ts
391
+ ```
392
+
393
+ On Windows PowerShell, if execution policy blocks `npm.ps1`, use:
394
+
395
+ ```powershell
396
+ npm.cmd run build
397
+ npx.cmd vitest run tests\brain\live-brain.test.ts
398
+ ```
399
+
400
+ ## Release Checklist
401
+
402
+ For a 6.0.3 release:
403
+
404
+ ```bash
405
+ npm run build
406
+ npm test
407
+ npm pack --dry-run
408
+ ```
409
+
410
+ Then publish only after verifying the package contents:
411
+
412
+ ```bash
413
+ npm publish --access public
414
+ ```
415
+
416
+ GitHub release should include:
417
+
418
+ - this README
419
+ - `CHANGELOG.md`
420
+ - `docs/launch/RELEASE_NOTES_v6.0.3.md`
421
+ - `docs/launch/RELEASE_CHECKLIST_v6.0.3.md`
422
+ - build/test output
423
+ - npm package dry-run output
424
+
425
+ ## License
426
+
427
+ MIT