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