@theihtisham/agent-shadow-brain 5.0.0 → 5.0.1
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 +359 -283
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/brain/auto-setup.d.ts +54 -0
- package/dist/brain/auto-setup.d.ts.map +1 -0
- package/dist/brain/auto-setup.js +660 -0
- package/dist/brain/auto-setup.js.map +1 -0
- package/dist/brain/brain-portability.d.ts +81 -0
- package/dist/brain/brain-portability.d.ts.map +1 -0
- package/dist/brain/brain-portability.js +329 -0
- package/dist/brain/brain-portability.js.map +1 -0
- package/dist/brain/mcp-server.d.ts +12 -0
- package/dist/brain/mcp-server.d.ts.map +1 -1
- package/dist/brain/mcp-server.js +396 -37
- package/dist/brain/mcp-server.js.map +1 -1
- package/dist/brain/plugin-system.d.ts +97 -0
- package/dist/brain/plugin-system.d.ts.map +1 -0
- package/dist/brain/plugin-system.js +404 -0
- package/dist/brain/plugin-system.js.map +1 -0
- package/dist/cli.js +179 -3
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/server.d.ts +4 -0
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +453 -330
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +79 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +28 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="docs/images/v5-banner.svg" alt="Agent Shadow Brain v5.0.
|
|
3
|
+
<img src="docs/images/v5-banner.svg" alt="Agent Shadow Brain v5.0.1 — Infinite Intelligence Edition" width="100%">
|
|
4
4
|
|
|
5
5
|
<br/>
|
|
6
6
|
|
|
@@ -11,16 +11,19 @@
|
|
|
11
11
|
[](https://github.com/theihtisham/agent-shadow-brain/stargazers)
|
|
12
12
|
[](https://arxiv.org/abs/2504.17033)
|
|
13
13
|
[](https://openreview.net/forum?id=TbqSEUXWaO)
|
|
14
|
+
[](#)
|
|
15
|
+
[](#)
|
|
16
|
+
[](#)
|
|
14
17
|
|
|
15
18
|
<br/>
|
|
16
19
|
|
|
17
|
-
### **The World's
|
|
20
|
+
### **The World's #1 Infinite-Intelligence AI Coding Brain**
|
|
18
21
|
|
|
19
|
-
**Shadow Brain** is a self-evolving, infinite-memory intelligence layer
|
|
22
|
+
**Shadow Brain** is a zero-config, self-evolving, infinite-memory intelligence layer that makes **every AI coding agent** write better, safer, faster code. Install it once, and it automatically detects your project, your AI tools, your frameworks — and starts making your agents smarter forever.
|
|
20
23
|
|
|
21
|
-
> **v5.0.
|
|
24
|
+
> **v5.0.1 — Infinite Intelligence Edition**: Zero-config auto-setup with MCP server for **Claude Code + Cursor + 8 AI tools**, rich web dashboard with real-time WebSocket updates, natural language brain queries, plugin system, brain export/import for team sync, git hook integration, and all v5.0.0 infinite intelligence features — 4-tier hierarchical memory, context-triggered associative recall, multi-agent consensus, collective cross-project learning, TurboQuant 6x compression, SSSP routing, self-evolving genetic rules, adversarial hallucination defense, swarm intelligence, knowledge graph with PageRank, and predictive bug forecasting.
|
|
22
25
|
|
|
23
|
-
[**Install Now**](#-getting-started) · [**v5.0.
|
|
26
|
+
[**Install Now**](#-getting-started-30-seconds) · [**Dashboard**](#-web-dashboard) · [**v5.0.1 New**](#-v501-whats-new) · [**Algorithms**](#-algorithms--research) · [**CLI Reference**](#-cli-reference) · [**Architecture**](#-architecture)
|
|
24
27
|
|
|
25
28
|
</div>
|
|
26
29
|
|
|
@@ -33,50 +36,236 @@ You use AI coding agents. They're powerful, but:
|
|
|
33
36
|
| Problem | Impact |
|
|
34
37
|
|---|---|
|
|
35
38
|
| Agents **forget everything** between sessions | Same mistakes, zero learning |
|
|
36
|
-
| Multiple agents **don't communicate** | Claude doesn't know what
|
|
39
|
+
| Multiple agents **don't communicate** | Claude doesn't know what Cursor learned |
|
|
37
40
|
| Generated code has **hallucinations** | LLMs fabricate APIs that don't exist |
|
|
38
41
|
| No **cross-session memory** | Every conversation starts from zero |
|
|
39
42
|
| No **cross-project learning** | Discoveries in one project don't help others |
|
|
40
|
-
|
|
|
41
|
-
|
|
|
43
|
+
| Setup is **complicated** | 30 minutes of config before anything works |
|
|
44
|
+
| Each tool needs **separate config** | Claude, Cursor, Cline all need different setup |
|
|
42
45
|
|
|
43
46
|
## The Solution
|
|
44
47
|
|
|
45
|
-
**Shadow Brain v5.0.
|
|
48
|
+
**Shadow Brain v5.0.1** — zero-config, auto-detecting, infinite-intelligence shadow layer:
|
|
46
49
|
|
|
47
50
|
```
|
|
48
|
-
┌──────────────┐
|
|
49
|
-
│ AI Agents │
|
|
50
|
-
│ Claude Code │
|
|
51
|
-
│
|
|
52
|
-
│
|
|
53
|
-
│
|
|
54
|
-
│
|
|
55
|
-
│
|
|
56
|
-
│
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
│
|
|
61
|
-
│
|
|
62
|
-
│
|
|
63
|
-
│
|
|
64
|
-
│
|
|
65
|
-
│
|
|
66
|
-
│
|
|
67
|
-
│
|
|
68
|
-
│
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
┌──────────────┐ auto-detect ┌──────────────────────────────────────────┐
|
|
52
|
+
│ AI Agents │ ◀──────────────── │ SHADOW BRAIN v5.0.1 │
|
|
53
|
+
│ Claude Code │ MCP auto-install │ │
|
|
54
|
+
│ Cursor │ zero-config │ ┌─ ZERO-CONFIG (v5.0.1 NEW) ────────┐ │
|
|
55
|
+
│ Kilo Code │ │ │ Auto-detect project, tools, langs │ │
|
|
56
|
+
│ Cline │ watches │ │ MCP server for ALL AI tools │ │
|
|
57
|
+
│ OpenCode │ ──────────────▶ │ │ Rich web dashboard (real-time) │ │
|
|
58
|
+
│ Codex │ file changes │ │ Natural language brain queries │ │
|
|
59
|
+
│ Roo Code │ git commits │ │ Plugin system + export/import │ │
|
|
60
|
+
│ Aider │ activity │ └────────────────────────────────────┘ │
|
|
61
|
+
│ Windsurf │ │ ┌─ INFINITE MEMORY (v5.0.0) ────────┐ │
|
|
62
|
+
└──────────────┘ │ │ 4-tier hierarchical compression │ │
|
|
63
|
+
▲ │ │ Context-triggered recall │ │
|
|
64
|
+
│ │ │ Multi-agent consensus + trust │ │
|
|
65
|
+
│ │ │ Collective cross-project learning │ │
|
|
66
|
+
│ │ └────────────────────────────────────┘ │
|
|
67
|
+
│ │ ┌─ HYPER-INTELLIGENCE (v4) ──────────┐ │
|
|
68
|
+
│ │ │ TurboQuant 6x Compression │ │
|
|
69
|
+
│ │ │ SSSP BMSSP Quantum Routing │ │
|
|
70
|
+
│ │ │ Self-Evolution + CAIP + Swarm │ │
|
|
71
|
+
│ │ │ PageRank + Predictive + Adversarial │ │
|
|
72
|
+
└──────────────────────────┴──────────────────────────────────────────┘
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## v5.0.1 — What's New
|
|
78
|
+
|
|
79
|
+
### Zero-Config Auto-Setup
|
|
80
|
+
|
|
81
|
+
Install it. That's it. Shadow Brain automatically:
|
|
82
|
+
|
|
83
|
+
- Detects your project type (frontend, backend, fullstack, mobile, game, systems, data-science)
|
|
84
|
+
- Detects 25+ languages, 15+ frameworks, 5+ build tools, 5+ test frameworks
|
|
85
|
+
- Detects which AI tools are installed (Claude Code, Cursor, Kilo Code, Cline, OpenCode, Codex, Aider, Windsurf)
|
|
86
|
+
- Auto-installs MCP server configuration for every detected AI tool
|
|
87
|
+
- Auto-installs git pre-commit and pre-push hooks
|
|
88
|
+
- Generates an optimal brain config based on project complexity
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install @theihtisham/agent-shadow-brain
|
|
92
|
+
# → Shadow Brain v5.0.1 auto-configured for my-app (fullstack)
|
|
93
|
+
# → AI tools detected: Claude Code, Cursor
|
|
94
|
+
# → Run: shadow-brain start
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### MCP Server — Works with EVERY AI Tool
|
|
98
|
+
|
|
99
|
+
The brain exposes itself as a **Model Context Protocol (MCP) server** with 19 tools that any AI tool can call:
|
|
100
|
+
|
|
101
|
+
| MCP Tool | What It Does |
|
|
102
|
+
|---|---|
|
|
103
|
+
| `brain_status` | Get full brain status |
|
|
104
|
+
| `brain_analyze` | Trigger code analysis |
|
|
105
|
+
| `brain_health` | Get health score (A-F) |
|
|
106
|
+
| `brain_insights` | Get recent insights |
|
|
107
|
+
| `brain_fixes` | Get smart fix suggestions |
|
|
108
|
+
| `brain_memory_store` | Store knowledge in hierarchical memory |
|
|
109
|
+
| `brain_memory_search` | Search across all memory tiers |
|
|
110
|
+
| `brain_memory_stats` | Memory compression statistics |
|
|
111
|
+
| `brain_recall` | Context-triggered associative recall |
|
|
112
|
+
| `brain_consensus_propose` | Submit a proposal for agent consensus |
|
|
113
|
+
| `brain_consensus_vote` | Vote on a pending proposal |
|
|
114
|
+
| `brain_collective_propose` | Propose a cross-project rule |
|
|
115
|
+
| `brain_collective_search` | Search collective learning rules |
|
|
116
|
+
| `brain_turbo_search` | Semantic search in compressed memory |
|
|
117
|
+
| `brain_predict` | Predict bug risk for files |
|
|
118
|
+
| `brain_graph_query` | Query knowledge graph |
|
|
119
|
+
| `brain_defense_scan` | Scan for hallucination patterns |
|
|
120
|
+
| `brain_evolve_status` | Get self-evolution status |
|
|
121
|
+
| `brain_dashboard_url` | Get dashboard URL |
|
|
122
|
+
|
|
123
|
+
Works with **Claude Code**, **Cursor**, **Kilo Code**, **Cline**, **OpenCode**, and any MCP-compatible AI tool.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Start MCP server (auto-started by AI tools)
|
|
127
|
+
shadow-brain mcp
|
|
128
|
+
|
|
129
|
+
# Cursor compatibility (root path POST + /v1/chat)
|
|
130
|
+
# Claude Code compatibility (JSON-RPC 2.0 over stdio/HTTP)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Rich Web Dashboard
|
|
134
|
+
|
|
135
|
+
Real-time browser dashboard at `http://localhost:7341` with WebSocket live updates:
|
|
136
|
+
|
|
137
|
+
- **Stats Topbar**: 8 live counters — Insights, Fixes, Memory KB, Modules, AI Tools, Evolution Gen, Swarm Convergence, Turbo Compression
|
|
138
|
+
- **Health Score**: A-F grading with dimension breakdown (Security, Quality, Performance, Architecture, Maintainability, Test Coverage)
|
|
139
|
+
- **Memory Tiers**: Visual bars showing Raw (50K), Summary (10K), Pattern (2K), Principle (500) with Turbo compression ratio
|
|
140
|
+
- **Live Insights Stream**: Real-time feed of brain insights with priority badges
|
|
141
|
+
- **Smart Fixes**: Actionable fix suggestions with file/line references
|
|
142
|
+
- **AI Tools Panel**: 8 tools showing connected/detected status
|
|
143
|
+
- **Brain Modules**: 13 modules with active/idle/error indicators
|
|
144
|
+
- **Control Buttons**: Trigger analysis on-demand, refresh data
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
shadow-brain start . # Dashboard auto-starts at http://localhost:7341
|
|
148
|
+
shadow-brain dash . # Dashboard only mode
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Natural Language Queries
|
|
152
|
+
|
|
153
|
+
Ask your brain questions in plain English:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
shadow-brain ask "What security issues exist in the auth module?"
|
|
157
|
+
shadow-brain ask "Which files have the highest bug risk?"
|
|
158
|
+
shadow-brain ask "What patterns have we learned about React hooks?"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Brain Export/Import — Team Sync
|
|
162
|
+
|
|
163
|
+
Export your brain state and share it with your team:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
shadow-brain export # Full export with all modules
|
|
167
|
+
shadow-brain export -o ./team-brain # Custom output directory
|
|
168
|
+
shadow-brain import brain-export.json # Import + merge
|
|
169
|
+
shadow-brain import brain-export.json --merge --skip swarm,evolution
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Plugin System
|
|
173
|
+
|
|
174
|
+
Extend Shadow Brain with custom plugins:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
shadow-brain plugin list # List installed plugins
|
|
178
|
+
shadow-brain plugin create my-plugin # Create from template
|
|
179
|
+
shadow-brain plugin stats # Plugin system statistics
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Plugins can hook into `pre-analysis` and `post-analysis` pipelines to add custom insights, filter results, or integrate with external services.
|
|
183
|
+
|
|
184
|
+
### 5 New Commands
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
shadow-brain off # Clean shutdown
|
|
188
|
+
shadow-brain ask "..." # Natural language query
|
|
189
|
+
shadow-brain export # Export brain state
|
|
190
|
+
shadow-brain import FILE # Import brain state
|
|
191
|
+
shadow-brain plugin CMD # Plugin management
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Getting Started — 30 Seconds
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Install globally
|
|
200
|
+
npm install -g @theihtisham/agent-shadow-brain
|
|
201
|
+
|
|
202
|
+
# Or use npx (no install needed)
|
|
203
|
+
npx @theihtisham/agent-shadow-brain start .
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
That's literally it. Shadow Brain will:
|
|
207
|
+
1. **Auto-detect** your project, languages, frameworks, AI tools (zero config)
|
|
208
|
+
2. **Auto-install** MCP server config for Claude Code, Cursor, Kilo Code, Cline, etc.
|
|
209
|
+
3. **Auto-install** git hooks for pre-commit and pre-push
|
|
210
|
+
4. Watch your project files for changes
|
|
211
|
+
5. Analyze every change with LLM + 13 brain modules
|
|
212
|
+
6. Inject expert insights into your agent's memory
|
|
213
|
+
7. Store all knowledge in hierarchical memory for infinite retention
|
|
214
|
+
8. Activate past memories automatically based on context
|
|
215
|
+
9. Share verified patterns across projects via collective learning
|
|
216
|
+
10. Compress knowledge with TurboQuant for infinite retention
|
|
217
|
+
11. Evolve its own rules via genetic algorithm
|
|
218
|
+
12. Share insights across agents via CAIP
|
|
219
|
+
13. Detect hallucinations with adversarial verification
|
|
220
|
+
14. Run consensus when multiple agents disagree
|
|
221
|
+
15. Serve a rich web dashboard at `localhost:7341`
|
|
222
|
+
|
|
223
|
+
### Quick Review (No Watch Mode)
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
shadow-brain review . # One-shot analysis
|
|
227
|
+
shadow-brain review . --show-health # + health score
|
|
228
|
+
shadow-brain review . --show-fixes # + fix suggestions
|
|
229
|
+
shadow-brain review . --output json # JSON for scripting
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Web Dashboard
|
|
235
|
+
|
|
236
|
+
The v5.0.1 dashboard provides a real-time view into your brain:
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
240
|
+
│ Shadow Brain v5.0.1 [Analyze] [↻] │
|
|
241
|
+
├──────────────────────────────────────────────────────────────────────────┤
|
|
242
|
+
│ Insights: 142 │ Fixes: 38 │ Memory: 247KB │ Modules: 13/13 │ ... │
|
|
243
|
+
├──────────────┬─────────────────────────────────────┬───────────────────┤
|
|
244
|
+
│ Health: 87% │ Live Insights Stream │ AI Tools │
|
|
245
|
+
│ ████████░░ │ ● [HIGH] SQL injection in login.ts │ ● Claude Code ✓ │
|
|
246
|
+
│ Security: A │ ● [MED] Missing error handling │ ● Cursor ✓ │
|
|
247
|
+
│ Quality: B+ │ ● [LOW] Unused import in utils │ ● Kilo Code ✓ │
|
|
248
|
+
│ Perf: A- │ ● [CRIT] Exposed API key │ ● Cline — │
|
|
249
|
+
│ Arch: B │ │ ● OpenCode — │
|
|
250
|
+
│ Maintain: A ├─────────────────────────────────────┤ ● Codex — │
|
|
251
|
+
│ Tests: C+ │ Smart Fixes │ ● Aider — │
|
|
252
|
+
│ │ 1. Add parameterized query... │ ● Windsurf — │
|
|
253
|
+
├──────────────┤ 2. Wrap in try/catch with... ├───────────────────┤
|
|
254
|
+
│ Memory Tiers │ 3. Remove unused import on L42 │ Brain Modules │
|
|
255
|
+
│ Raw: 8421 │ │ ● Hierarchical ✓ │
|
|
256
|
+
│ Summ: 1203 │ │ ● TurboMemory ✓ │
|
|
257
|
+
│ Patt: 187 │ │ ● Consensus ✓ │
|
|
258
|
+
│ Princ: 24 │ │ ● Swarm ✓ │
|
|
259
|
+
│ Turbo: 6.2x │ │ ● Evolution ✓ │
|
|
260
|
+
│ │ │ ● Adversarial ✓ │
|
|
261
|
+
└──────────────┴─────────────────────────────────────┴───────────────────┘
|
|
73
262
|
```
|
|
74
263
|
|
|
75
264
|
---
|
|
76
265
|
|
|
77
266
|
## v5.0.0 Infinite Intelligence Engine
|
|
78
267
|
|
|
79
|
-
### 4
|
|
268
|
+
### 4 Breakthrough Modules
|
|
80
269
|
|
|
81
270
|
<table>
|
|
82
271
|
<tr>
|
|
@@ -129,10 +318,10 @@ When multiple AI agents observe the same codebase, they may produce conflicting
|
|
|
129
318
|
5. Tracks long-term agent trust based on proposal accuracy
|
|
130
319
|
|
|
131
320
|
```bash
|
|
132
|
-
shadow-brain consensus status
|
|
321
|
+
shadow-brain consensus status
|
|
133
322
|
shadow-brain consensus propose "Use bcrypt for all password hashing" security 0.95
|
|
134
323
|
shadow-brain consensus vote <id> agree 0.9 "Industry standard"
|
|
135
|
-
shadow-brain consensus results
|
|
324
|
+
shadow-brain consensus results
|
|
136
325
|
```
|
|
137
326
|
|
|
138
327
|
**Collective Learning** — discoveries flow across all projects.
|
|
@@ -145,9 +334,9 @@ When you discover a pattern in Project A, it becomes a verified rule available i
|
|
|
145
334
|
- Trust scores for rule sources
|
|
146
335
|
|
|
147
336
|
```bash
|
|
148
|
-
shadow-brain collective status
|
|
337
|
+
shadow-brain collective status
|
|
149
338
|
shadow-brain collective propose "Always validate file upload MIME types" security
|
|
150
|
-
shadow-brain collective search performance
|
|
339
|
+
shadow-brain collective search performance
|
|
151
340
|
```
|
|
152
341
|
|
|
153
342
|
</td>
|
|
@@ -158,7 +347,7 @@ shadow-brain collective search performance # Cross-project performance rules
|
|
|
158
347
|
|
|
159
348
|
## v4.0.0 Hyper-Intelligence Engine
|
|
160
349
|
|
|
161
|
-
### 8 Breakthrough Modules (included in v5.0.
|
|
350
|
+
### 8 Breakthrough Modules (included in v5.0.1)
|
|
162
351
|
|
|
163
352
|
<table>
|
|
164
353
|
<tr>
|
|
@@ -175,7 +364,7 @@ Based on Google Research's **TurboQuant** (ICLR 2026):
|
|
|
175
364
|
- **Result**: Infinite retention — old knowledge is compressed, never deleted
|
|
176
365
|
|
|
177
366
|
```bash
|
|
178
|
-
shadow-brain turbo stats
|
|
367
|
+
shadow-brain turbo stats
|
|
179
368
|
shadow-brain turbo search "authentication patterns"
|
|
180
369
|
```
|
|
181
370
|
|
|
@@ -186,7 +375,7 @@ Based on **"Breaking the Sorting Barrier"** (arXiv 2504.17033, Duan et al.):
|
|
|
186
375
|
- **Deterministic**: No randomization, provably correct
|
|
187
376
|
|
|
188
377
|
```bash
|
|
189
|
-
shadow-brain route status
|
|
378
|
+
shadow-brain route status
|
|
190
379
|
shadow-brain route find node-A node-B
|
|
191
380
|
```
|
|
192
381
|
|
|
@@ -200,8 +389,8 @@ shadow-brain route find node-A node-B
|
|
|
200
389
|
- **Population**: 50 genetic rule chromosomes
|
|
201
390
|
- **Selection**: Tournament (k=5) — survival of the fittest
|
|
202
391
|
- **Crossover**: Single-point recombination
|
|
203
|
-
- **Mutation**: Gaussian noise (Box-Muller transform,
|
|
204
|
-
- **Fitness**: accuracy
|
|
392
|
+
- **Mutation**: Gaussian noise (Box-Muller transform, sigma=0.1)
|
|
393
|
+
- **Fitness**: accuracy x coverage x (1 / falsePositiveRate)
|
|
205
394
|
|
|
206
395
|
```bash
|
|
207
396
|
shadow-brain evolve status
|
|
@@ -211,7 +400,7 @@ shadow-brain evolve best-rules security
|
|
|
211
400
|
|
|
212
401
|
**Cross-Agent Intelligence Protocol (CAIP)** — agents that talk to each other.
|
|
213
402
|
|
|
214
|
-
Your Claude Code session learns what your
|
|
403
|
+
Your Claude Code session learns what your Cursor session discovered:
|
|
215
404
|
- Zero-config broadcast protocol
|
|
216
405
|
- Agent identification + insight tagging
|
|
217
406
|
- Multi-agent consensus building
|
|
@@ -284,13 +473,13 @@ shadow-brain predict bugs .
|
|
|
284
473
|
|
|
285
474
|
## Algorithms & Research
|
|
286
475
|
|
|
287
|
-
Shadow Brain v5.0.
|
|
476
|
+
Shadow Brain v5.0.1 implements algorithms from **peer-reviewed research**:
|
|
288
477
|
|
|
289
478
|
| Algorithm | Paper / Origin | Application | Complexity |
|
|
290
479
|
|---|---|---|---|
|
|
291
480
|
| **Hierarchical Compression** | Novel 4-tier system | Infinite memory with drill-down | O(n) per tier |
|
|
292
|
-
| **Associative Recall** | Spreading activation model | Context-triggered memory activation | O(n
|
|
293
|
-
| **Consensus Protocol** | Byzantine fault tolerance | Multi-agent agreement with trust | O(v
|
|
481
|
+
| **Associative Recall** | Spreading activation model | Context-triggered memory activation | O(n x k) |
|
|
482
|
+
| **Consensus Protocol** | Byzantine fault tolerance | Multi-agent agreement with trust | O(v x log v) |
|
|
294
483
|
| **TurboQuant** | Google Research, ICLR 2026 | Vector compression (PolarQuant + QJL) | O(n) per vector |
|
|
295
484
|
| **BMSSP (SSSP)** | arXiv 2504.17033, Duan et al. | Neural mesh message routing | O(m log<sup>2/3</sup> n) |
|
|
296
485
|
| **Shannon Entropy** | Claude Shannon, 1948 | Cross-project insight relevance scoring | O(n) |
|
|
@@ -300,54 +489,30 @@ Shadow Brain v5.0.0 implements algorithms from **peer-reviewed research**:
|
|
|
300
489
|
| **Tarjan's SCC** | Robert Tarjan, 1972 | Dependency cycle detection | O(V + E) |
|
|
301
490
|
| **Winnowing** | Schleimer et al., 2003 | Code duplicate fingerprinting | O(n) |
|
|
302
491
|
| **Box-Muller** | Box & Muller, 1958 | Gaussian mutation in genetic algorithm | O(1) per sample |
|
|
303
|
-
| **Ant Colony (ACO)** | Dorigo, 1992 | File priority pheromone system | O(n
|
|
492
|
+
| **Ant Colony (ACO)** | Dorigo, 1992 | File priority pheromone system | O(n x m) |
|
|
304
493
|
| **Tournament Selection** | Goldberg, 1989 | Genetic rule selection (k=5) | O(k) per selection |
|
|
305
494
|
|
|
306
495
|
### TurboQuant Pipeline Detail
|
|
307
496
|
|
|
308
497
|
```
|
|
309
498
|
Input Vector (64-dim, float64)
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
499
|
+
|
|
|
500
|
+
v
|
|
501
|
+
+-------------+
|
|
502
|
+
| PolarQuant |-- Cartesian -> Polar coordinates
|
|
503
|
+
| 2 bits/dim |-- Quantize angles to 4 levels (2 bits each)
|
|
504
|
+
+------+-------+ Pack into Uint8Array
|
|
505
|
+
|
|
|
506
|
+
v
|
|
507
|
+
+-------------+
|
|
508
|
+
| QJL Residual|-- Random rotation (Hadamard-like)
|
|
509
|
+
| 1 bit/dim |-- Sign extraction (1 bit per dim)
|
|
510
|
+
+------+-------+ Pack into Uint8Array
|
|
511
|
+
|
|
|
512
|
+
v
|
|
324
513
|
TurboVector { polar: Uint8Array, qjl: Uint8Array, dim: number, radius: number }
|
|
325
514
|
= 3 bits/dim total = 6x compression from float64
|
|
326
|
-
= ZERO FORGETTING
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Hierarchical Memory Drill-Down
|
|
330
|
-
|
|
331
|
-
```
|
|
332
|
-
┌─────────────┐
|
|
333
|
-
│ PRINCIPLE │ 500 entries — timeless design rules
|
|
334
|
-
│ (top tier) │ "Always validate inputs at system boundaries"
|
|
335
|
-
└──────┬──────┘
|
|
336
|
-
│ drill-down
|
|
337
|
-
┌──────┴──────┐
|
|
338
|
-
│ PATTERN │ 2K entries — recurring patterns
|
|
339
|
-
│ │ "Input validation pattern: zod schema → middleware → handler"
|
|
340
|
-
└──────┬──────┘
|
|
341
|
-
│ drill-down
|
|
342
|
-
┌──────┴──────┐
|
|
343
|
-
│ SUMMARY │ 10K entries — condensed key points
|
|
344
|
-
│ │ "auth/login.ts uses JWT with bcrypt — verified secure"
|
|
345
|
-
└──────┬──────┘
|
|
346
|
-
│ drill-down
|
|
347
|
-
┌──────┴──────┐
|
|
348
|
-
│ RAW │ 50K entries — full detail, hot path
|
|
349
|
-
│ (base tier) │ Complete analysis of login.ts with all evidence
|
|
350
|
-
└─────────────┘
|
|
515
|
+
= ZERO FORGETTING -- compressed knowledge stays searchable forever
|
|
351
516
|
```
|
|
352
517
|
|
|
353
518
|
---
|
|
@@ -358,6 +523,18 @@ Input Vector (64-dim, float64)
|
|
|
358
523
|
<tr>
|
|
359
524
|
<td width="25%">
|
|
360
525
|
|
|
526
|
+
### Zero Config (v5.0.1)
|
|
527
|
+
- Auto-detect project + tools
|
|
528
|
+
- MCP for ALL AI tools
|
|
529
|
+
- Rich web dashboard
|
|
530
|
+
- Natural language queries
|
|
531
|
+
- Plugin system
|
|
532
|
+
- Brain export/import
|
|
533
|
+
- Git hook auto-install
|
|
534
|
+
|
|
535
|
+
</td>
|
|
536
|
+
<td width="25%">
|
|
537
|
+
|
|
361
538
|
### Infinite Intelligence (v5)
|
|
362
539
|
- 4-tier hierarchical memory
|
|
363
540
|
- Context-triggered recall
|
|
@@ -380,23 +557,14 @@ Input Vector (64-dim, float64)
|
|
|
380
557
|
</td>
|
|
381
558
|
<td width="25%">
|
|
382
559
|
|
|
383
|
-
### Real-Time Intelligence
|
|
384
|
-
- File watching (chokidar)
|
|
385
|
-
- Git monitoring (commits, diffs)
|
|
386
|
-
- LLM analysis (Anthropic, OpenAI, Ollama)
|
|
387
|
-
- Pattern memory across sessions
|
|
388
|
-
- Learning engine (automatic)
|
|
389
|
-
|
|
390
|
-
</td>
|
|
391
|
-
<td width="25%">
|
|
392
|
-
|
|
393
560
|
### Developer Experience
|
|
394
|
-
- **
|
|
395
|
-
- MCP Server
|
|
396
|
-
- Web dashboard
|
|
397
|
-
- Terminal UI
|
|
398
|
-
- Pre-commit hooks
|
|
399
|
-
- GitHub Actions
|
|
561
|
+
- **50+ CLI commands**
|
|
562
|
+
- MCP Server (19 tools)
|
|
563
|
+
- Web dashboard (real-time)
|
|
564
|
+
- Terminal UI (Ink/React)
|
|
565
|
+
- Pre-commit hooks
|
|
566
|
+
- GitHub Actions CI
|
|
567
|
+
- Plugin architecture
|
|
400
568
|
|
|
401
569
|
</td>
|
|
402
570
|
</tr>
|
|
@@ -406,18 +574,21 @@ Input Vector (64-dim, float64)
|
|
|
406
574
|
|
|
407
575
|
## Architecture
|
|
408
576
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
### v5.0.0 Module Map
|
|
577
|
+
### v5.0.1 Module Map (16 modules)
|
|
412
578
|
|
|
413
579
|
| Module | File | What It Does | Since |
|
|
414
580
|
|---|---|---|---|
|
|
415
|
-
| **
|
|
416
|
-
| **
|
|
417
|
-
| **
|
|
581
|
+
| **Auto Setup** | `brain/auto-setup.ts` | Zero-config project + tool detection | v5.0.1 |
|
|
582
|
+
| **MCP Server** | `brain/mcp-server.ts` | 19-tool MCP server for all AI tools | v5.0.1 |
|
|
583
|
+
| **Plugin System** | `brain/plugin-system.ts` | Hookable analysis pipeline | v5.0.1 |
|
|
584
|
+
| **Brain Portability** | `brain/brain-portability.ts` | Export/import brain state | v5.0.1 |
|
|
585
|
+
| **Dashboard** | `dashboard/server.ts` | Real-time WebSocket dashboard | v5.0.1 |
|
|
586
|
+
| **Hierarchical Memory** | `brain/hierarchical-memory.ts` | 4-tier infinite memory | v5.0.0 |
|
|
587
|
+
| **Context Recall** | `brain/context-recall.ts` | Associative memory activation | v5.0.0 |
|
|
588
|
+
| **Consensus Engine** | `brain/consensus-engine.ts` | Multi-agent voting + trust | v5.0.0 |
|
|
418
589
|
| **Collective Learning** | `brain/collective-learning.ts` | Cross-project rule sharing | v5.0.0 |
|
|
419
590
|
| **TurboMemory** | `brain/turbo-memory.ts` | 6x compressed infinite memory | v4.0.0 |
|
|
420
|
-
| **SSSP Router** | `brain/sssp-router.ts` | Sub-sorting
|
|
591
|
+
| **SSSP Router** | `brain/sssp-router.ts` | Sub-sorting routing | v4.0.0 |
|
|
421
592
|
| **Self-Evolution** | `brain/self-evolution.ts` | Genetic rule optimization | v4.0.0 |
|
|
422
593
|
| **Cross-Agent** | `brain/cross-agent-protocol.ts` | Multi-agent broadcast | v4.0.0 |
|
|
423
594
|
| **Adversarial** | `brain/adversarial-defense.ts` | Hallucination detection | v4.0.0 |
|
|
@@ -427,110 +598,14 @@ Input Vector (64-dim, float64)
|
|
|
427
598
|
|
|
428
599
|
---
|
|
429
600
|
|
|
430
|
-
## Getting Started
|
|
431
|
-
|
|
432
|
-
### Install
|
|
433
|
-
|
|
434
|
-
```bash
|
|
435
|
-
# Install globally
|
|
436
|
-
npm install -g @theihtisham/agent-shadow-brain
|
|
437
|
-
|
|
438
|
-
# Or use with npx (no install needed)
|
|
439
|
-
npx @theihtisham/agent-shadow-brain review .
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
### One-Command Setup
|
|
443
|
-
|
|
444
|
-
```bash
|
|
445
|
-
shadow-brain setup
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
### Start Watching
|
|
449
|
-
|
|
450
|
-
```bash
|
|
451
|
-
shadow-brain start .
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
That's it. Shadow Brain will:
|
|
455
|
-
1. Auto-detect which AI agents are running (7 supported)
|
|
456
|
-
2. Watch your project files for changes
|
|
457
|
-
3. Analyze every change with LLM + mathematical algorithms
|
|
458
|
-
4. Inject expert insights into your agent's memory
|
|
459
|
-
5. Store all knowledge in hierarchical memory for infinite retention
|
|
460
|
-
6. Activate past memories automatically based on context
|
|
461
|
-
7. Share verified patterns across projects via collective learning
|
|
462
|
-
8. Compress knowledge with TurboQuant for infinite retention
|
|
463
|
-
9. Evolve its own rules via genetic algorithm
|
|
464
|
-
10. Share insights across agents via CAIP
|
|
465
|
-
11. Detect hallucinations with adversarial verification
|
|
466
|
-
12. Run consensus when multiple agents disagree
|
|
467
|
-
|
|
468
|
-
### Quick Review (No Watch Mode)
|
|
469
|
-
|
|
470
|
-
```bash
|
|
471
|
-
shadow-brain review . # One-shot analysis
|
|
472
|
-
shadow-brain review . --show-health # + health score
|
|
473
|
-
shadow-brain review . --show-fixes # + fix suggestions
|
|
474
|
-
shadow-brain review . --output json # JSON for scripting
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
### v5.0.0 Commands
|
|
478
|
-
|
|
479
|
-
```bash
|
|
480
|
-
# Infinite hierarchical memory
|
|
481
|
-
shadow-brain memory stats # 4-tier compression stats
|
|
482
|
-
shadow-brain memory store "knowledge" # Store at raw tier
|
|
483
|
-
shadow-brain memory search "auth" # Cross-tier search
|
|
484
|
-
|
|
485
|
-
# Context-triggered recall
|
|
486
|
-
shadow-brain recall . --file src/auth.ts --keywords "jwt,token"
|
|
487
|
-
|
|
488
|
-
# Multi-agent consensus
|
|
489
|
-
shadow-brain consensus status # Proposal + trust stats
|
|
490
|
-
shadow-brain consensus propose "..." security 0.95
|
|
491
|
-
shadow-brain consensus vote <id> agree 0.9 "Reason"
|
|
492
|
-
shadow-brain consensus results # All resolved proposals
|
|
493
|
-
|
|
494
|
-
# Collective cross-project learning
|
|
495
|
-
shadow-brain collective status # Rule count + categories
|
|
496
|
-
shadow-brain collective propose "Rule" security
|
|
497
|
-
shadow-brain collective search performance
|
|
498
|
-
|
|
499
|
-
# Run EVERYTHING at once
|
|
500
|
-
shadow-brain v5 . # Full v5.0.0 infinite-intelligence analysis
|
|
501
|
-
```
|
|
502
|
-
|
|
503
|
-
### v4.0.0 Commands (still available)
|
|
504
|
-
|
|
505
|
-
```bash
|
|
506
|
-
shadow-brain turbo stats # TurboQuant compression stats
|
|
507
|
-
shadow-brain turbo search "auth" # Semantic search in compressed memory
|
|
508
|
-
shadow-brain route status # SSSP mesh routing status
|
|
509
|
-
shadow-brain route find node-A node-B # Shortest path between brain nodes
|
|
510
|
-
shadow-brain caip status # Connected agents
|
|
511
|
-
shadow-brain caip broadcast "message" # Broadcast to all agents
|
|
512
|
-
shadow-brain evolve status # Genetic algorithm stats
|
|
513
|
-
shadow-brain evolve run # Evolve one generation
|
|
514
|
-
shadow-brain evolve best-rules security # Top evolved security rules
|
|
515
|
-
shadow-brain predict bugs . # Bug risk scoring
|
|
516
|
-
shadow-brain graph build . # Build + PageRank
|
|
517
|
-
shadow-brain graph pagerank # Top impact entities
|
|
518
|
-
shadow-brain swarm status # Convergence + pheromone stats
|
|
519
|
-
shadow-brain swarm priorities # File hotspot ranking
|
|
520
|
-
shadow-brain defense status # Accuracy + blocked count
|
|
521
|
-
shadow-brain defense scan "claim text" # Verify a specific claim
|
|
522
|
-
shadow-brain v4 . # Full v4.0.0 hyper-analysis
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
601
|
## CLI Reference
|
|
528
602
|
|
|
529
603
|
### Core Commands
|
|
530
604
|
|
|
531
605
|
| Command | Description |
|
|
532
606
|
|---|---|
|
|
533
|
-
| `shadow-brain start [dir]` | Start real-time watching |
|
|
607
|
+
| `shadow-brain start [dir]` | Start real-time watching + dashboard + MCP |
|
|
608
|
+
| `shadow-brain off` | Clean shutdown |
|
|
534
609
|
| `shadow-brain review [dir]` | One-shot code analysis |
|
|
535
610
|
| `shadow-brain health [dir]` | Health score (A-F grading) |
|
|
536
611
|
| `shadow-brain fix [dir]` | Smart fix suggestions |
|
|
@@ -542,10 +617,24 @@ shadow-brain v4 . # Full v4.0.0 hyper-analysis
|
|
|
542
617
|
| `shadow-brain ci [dir]` | GitHub Actions workflow |
|
|
543
618
|
| `shadow-brain hook [dir]` | Pre-commit hook |
|
|
544
619
|
| `shadow-brain dash [dir]` | Web dashboard |
|
|
620
|
+
| `shadow-brain mcp` | MCP server mode |
|
|
545
621
|
| `shadow-brain inject <msg>` | Inject into agent memory |
|
|
546
622
|
| `shadow-brain status` | Current configuration |
|
|
547
623
|
| `shadow-brain setup` | Interactive setup wizard |
|
|
548
624
|
| `shadow-brain doctor` | Health check & diagnostics |
|
|
625
|
+
| `shadow-brain ask <question>` | Natural language brain query |
|
|
626
|
+
|
|
627
|
+
### v5.0.1 Commands (NEW)
|
|
628
|
+
|
|
629
|
+
| Command | Description |
|
|
630
|
+
|---|---|
|
|
631
|
+
| `shadow-brain off` | Clean shutdown of all brain processes |
|
|
632
|
+
| `shadow-brain ask <question>` | Natural language query to the brain |
|
|
633
|
+
| `shadow-brain export [-o dir]` | Export full brain state to JSON |
|
|
634
|
+
| `shadow-brain import <file> [--merge]` | Import brain state |
|
|
635
|
+
| `shadow-brain plugin list` | List installed plugins |
|
|
636
|
+
| `shadow-brain plugin create <name>` | Create plugin from template |
|
|
637
|
+
| `shadow-brain plugin stats` | Plugin system statistics |
|
|
549
638
|
|
|
550
639
|
### v5.0.0 Infinite Intelligence Commands
|
|
551
640
|
|
|
@@ -585,28 +674,6 @@ shadow-brain v4 . # Full v4.0.0 hyper-analysis
|
|
|
585
674
|
| `shadow-brain defense scan <text>` | Scan text for hallucination patterns |
|
|
586
675
|
| `shadow-brain v4 [dir]` | Run ALL v4.0.0 analyses |
|
|
587
676
|
|
|
588
|
-
### Super-Intelligence Commands (v2.0+)
|
|
589
|
-
|
|
590
|
-
| Command | Description |
|
|
591
|
-
|---|---|
|
|
592
|
-
| `shadow-brain semantic [dir]` | Symbol extraction, dead code |
|
|
593
|
-
| `shadow-brain deps [dir]` | Dependency graph, cycles, hubs |
|
|
594
|
-
| `shadow-brain duplicates [dir]` | Duplicate code detection |
|
|
595
|
-
| `shadow-brain adr [dir]` | Architecture Decision Records |
|
|
596
|
-
| `shadow-brain typesafety [dir]` | TypeScript type analysis |
|
|
597
|
-
| `shadow-brain perf [dir]` | Performance profiling |
|
|
598
|
-
| `shadow-brain knowledge [dir]` | Project knowledge base |
|
|
599
|
-
| `shadow-brain learn [dir]` | Extract patterns & lessons |
|
|
600
|
-
|
|
601
|
-
### Neural Mesh Commands (v2.1+)
|
|
602
|
-
|
|
603
|
-
| Command | Description |
|
|
604
|
-
|---|---|
|
|
605
|
-
| `shadow-brain mesh status` | Mesh state + quantum state |
|
|
606
|
-
| `shadow-brain mesh insights` | Cross-session insights |
|
|
607
|
-
| `shadow-brain mesh knowledge` | Shared knowledge base |
|
|
608
|
-
| `shadow-brain mesh nodes` | Connected brain nodes |
|
|
609
|
-
|
|
610
677
|
---
|
|
611
678
|
|
|
612
679
|
## Programmatic API
|
|
@@ -614,6 +681,9 @@ shadow-brain v4 . # Full v4.0.0 hyper-analysis
|
|
|
614
681
|
```typescript
|
|
615
682
|
import {
|
|
616
683
|
Orchestrator,
|
|
684
|
+
AutoSetup,
|
|
685
|
+
PluginSystem,
|
|
686
|
+
BrainPortability,
|
|
617
687
|
HierarchicalMemory,
|
|
618
688
|
ContextRecall,
|
|
619
689
|
ConsensusEngine,
|
|
@@ -629,20 +699,36 @@ import {
|
|
|
629
699
|
NeuralMesh,
|
|
630
700
|
} from '@theihtisham/agent-shadow-brain';
|
|
631
701
|
|
|
702
|
+
// v5.0.1 — Zero-config auto-setup
|
|
703
|
+
const setup = new AutoSetup('./my-project');
|
|
704
|
+
const config = await setup.detect();
|
|
705
|
+
// → { projectType: 'fullstack', languages: ['typescript','python'], frameworks: ['next.js'], aiTools: [...] }
|
|
706
|
+
await setup.installMCPForTools(['Claude Code', 'Cursor']);
|
|
707
|
+
await setup.installGitHooks();
|
|
708
|
+
|
|
632
709
|
// Create the brain
|
|
633
710
|
const brain = new Orchestrator({
|
|
634
711
|
provider: 'anthropic',
|
|
635
712
|
projectDir: './my-project',
|
|
636
|
-
agents: ['claude-code', '
|
|
713
|
+
agents: ['claude-code', 'cursor', 'cline'],
|
|
637
714
|
watchMode: true,
|
|
638
715
|
autoInject: true,
|
|
639
716
|
brainPersonality: 'balanced',
|
|
640
717
|
});
|
|
641
718
|
|
|
719
|
+
// v5.0.1 — Plugin system
|
|
720
|
+
const plugins = new PluginSystem('./my-project');
|
|
721
|
+
await plugins.loadAll();
|
|
722
|
+
await plugins.preAnalysis({ files: ['src/auth.ts'], projectDir: './my-project' });
|
|
723
|
+
|
|
724
|
+
// v5.0.1 — Brain portability
|
|
725
|
+
const porter = new BrainPortability('./my-project');
|
|
726
|
+
const { filePath, sizeBytes, checksum } = await porter.exportBrain();
|
|
727
|
+
|
|
642
728
|
// v5.0.0 — Infinite Intelligence
|
|
643
729
|
const hmem = new HierarchicalMemory();
|
|
644
730
|
await hmem.store('JWT rotation pattern: rotate every 24h with refresh tokens', 'security', 0.9);
|
|
645
|
-
const results = hmem.search('jwt');
|
|
731
|
+
const results = hmem.search('jwt');
|
|
646
732
|
|
|
647
733
|
const recall = new ContextRecall(hmem);
|
|
648
734
|
const activated = recall.recall({
|
|
@@ -651,27 +737,10 @@ const activated = recall.recall({
|
|
|
651
737
|
recentEdits: ['src/auth/login.ts', 'src/middleware/auth.ts'],
|
|
652
738
|
projectType: 'node',
|
|
653
739
|
keywords: ['jwt', 'authentication', 'session'],
|
|
654
|
-
timeOfDay: 14,
|
|
655
|
-
dayOfWeek: 2,
|
|
656
740
|
});
|
|
657
741
|
|
|
658
742
|
const consensus = new ConsensusEngine('my-agent');
|
|
659
743
|
const proposalId = consensus.propose('Use bcrypt cost factor 12', 'security', 0.95);
|
|
660
|
-
consensus.vote(proposalId, 'agree', 0.9, 'Industry standard per OWASP');
|
|
661
|
-
|
|
662
|
-
const collective = new CollectiveLearning();
|
|
663
|
-
collective.proposeRule('Validate file upload MIME types', 'security', 'my-agent', ['./uploads']);
|
|
664
|
-
|
|
665
|
-
// v4.0.0 — Direct module access
|
|
666
|
-
const turbo = new TurboMemory({ maxEntries: 100000 });
|
|
667
|
-
await turbo.store('auth-pattern', vector, { category: 'security' });
|
|
668
|
-
|
|
669
|
-
const evolution = new SelfEvolution({ populationSize: 50 });
|
|
670
|
-
const snapshot = await evolution.evolve(insights);
|
|
671
|
-
|
|
672
|
-
const kg = new KnowledgeGraph('./my-project');
|
|
673
|
-
await kg.build();
|
|
674
|
-
const topEntities = kg.getTopEntities(10);
|
|
675
744
|
|
|
676
745
|
// Start everything
|
|
677
746
|
await brain.start();
|
|
@@ -694,14 +763,25 @@ await brain.start();
|
|
|
694
763
|
|
|
695
764
|
## Version History
|
|
696
765
|
|
|
697
|
-
### v5.0.
|
|
698
|
-
- **
|
|
699
|
-
- **
|
|
700
|
-
- **
|
|
701
|
-
- **
|
|
766
|
+
### v5.0.1 — Zero-Config Intelligence Edition (Current)
|
|
767
|
+
- **Zero-Config Auto-Setup** — auto-detect project, AI tools, languages, frameworks; auto-install MCP config + git hooks
|
|
768
|
+
- **MCP Server** — 19-tool Model Context Protocol server for Claude Code, Cursor, and all AI tools
|
|
769
|
+
- **Rich Web Dashboard** — real-time WebSocket dashboard with 8 panels (health, memory tiers, insights, fixes, AI tools, modules, stats, controls)
|
|
770
|
+
- **Natural Language Queries** — `shadow-brain ask "..."` for plain-English brain interaction
|
|
771
|
+
- **Plugin System** — hookable analysis pipeline with npm plugin discovery
|
|
772
|
+
- **Brain Export/Import** — full brain state portability for team sync and backup
|
|
773
|
+
- **5 new CLI commands** — off, ask, export, import, plugin
|
|
774
|
+
- **Cursor MCP Compatibility** — root path POST + /v1/chat endpoint support
|
|
775
|
+
- **Postinstall Auto-Setup** — runs automatically after npm install
|
|
776
|
+
- **50+ npm keywords** for discoverability
|
|
777
|
+
- All v5.0.0 and v4.0.0 features included and enhanced
|
|
778
|
+
|
|
779
|
+
### v5.0.0 — Infinite Intelligence Edition
|
|
780
|
+
- **Hierarchical Memory Compression** — 4-tier pyramid (raw -> summary -> pattern -> principle) with drill-down/up
|
|
781
|
+
- **Context-Triggered Associative Recall** — automatic memory activation based on file paths, keywords, categories
|
|
782
|
+
- **Multi-Agent Consensus Protocol** — trust-weighted voting, confidence intervals, conflict resolution
|
|
783
|
+
- **Collective Cross-Project Learning** — verified rule sharing, viral propagation, accuracy tracking
|
|
702
784
|
- **5 new CLI commands** — memory, recall, consensus, collective, v5
|
|
703
|
-
- **4 new modules**, 2,000+ lines of new code
|
|
704
|
-
- All v4.0.0 features included and enhanced
|
|
705
785
|
|
|
706
786
|
### v4.0.0 — Hyper-Intelligence Edition
|
|
707
787
|
- **TurboQuant Infinite Memory** — 6x compression, zero forgetting (Google Research, ICLR 2026)
|
|
@@ -712,42 +792,34 @@ await brain.start();
|
|
|
712
792
|
- **Swarm Intelligence** — Ant Colony pheromone file prioritization
|
|
713
793
|
- **Knowledge Graph + PageRank** — code impact radar with d=0.85 damping
|
|
714
794
|
- **Predictive Engine** — bug risk scoring, debt forecasting, anomaly detection
|
|
715
|
-
- **9 new CLI commands** — turbo, route, caip, evolve, predict, graph, swarm, defense, v4
|
|
716
795
|
|
|
717
796
|
### v3.0.0 — Hyper-Intelligence Edition
|
|
718
|
-
- Cognitive load analysis
|
|
719
|
-
- Security audit engine
|
|
720
|
-
- Influence map (cross-file impact)
|
|
797
|
+
- Cognitive load analysis, security audit engine, influence map
|
|
721
798
|
|
|
722
799
|
### v2.1.0 — Quantum Neural Mesh
|
|
723
|
-
- Cross-session shared intelligence
|
|
724
|
-
- Shannon entropy relevance scoring
|
|
725
|
-
- Cosine similarity knowledge dedup
|
|
726
|
-
- Bayesian confidence updating
|
|
800
|
+
- Cross-session shared intelligence, Shannon entropy, cosine similarity, Bayesian confidence
|
|
727
801
|
|
|
728
802
|
### v2.0.0 — Super-Intelligence Edition
|
|
729
|
-
- Semantic analyzer, dependency graph, code similarity
|
|
730
|
-
- ADR engine, type safety, performance profiler
|
|
731
|
-
- MCP Server, team mode, multi-project
|
|
803
|
+
- Semantic analyzer, dependency graph, code similarity, MCP Server, team mode
|
|
732
804
|
|
|
733
805
|
### v1.x — Foundation
|
|
734
|
-
- 7 agent adapters, health scoring, smart fixes
|
|
735
|
-
- Vulnerability scanning, custom rules, notifications
|
|
736
|
-
- CI/CD integration, pre-commit hooks
|
|
806
|
+
- 7 agent adapters, health scoring, smart fixes, vulnerability scanning, CI/CD
|
|
737
807
|
|
|
738
808
|
---
|
|
739
809
|
|
|
740
|
-
## Supported Agents
|
|
810
|
+
## Supported Agents & Tools
|
|
741
811
|
|
|
742
|
-
| Agent | Status | Injection Target |
|
|
743
|
-
|
|
744
|
-
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | Full Support | `CLAUDE.md`, `.claude/` |
|
|
745
|
-
| [
|
|
746
|
-
| [
|
|
747
|
-
| [
|
|
748
|
-
| [
|
|
749
|
-
| [
|
|
750
|
-
| [
|
|
812
|
+
| Agent | Status | MCP Support | Injection Target |
|
|
813
|
+
|---|---|---|---|
|
|
814
|
+
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | Full Support | Auto-install | `CLAUDE.md`, `.claude/` |
|
|
815
|
+
| [Cursor](https://cursor.sh/) | Full Support | Auto-install | `.cursor/mcp.json` |
|
|
816
|
+
| [Kilo Code](https://kilocode.ai/) | Full Support | Auto-install | `.kilocode/rules.md` |
|
|
817
|
+
| [Cline](https://github.com/cline/cline) | Full Support | Auto-install | `.clinerules` |
|
|
818
|
+
| [OpenCode](https://github.com/opencode-ai/opencode) | Full Support | Yes | `AGENT.md` |
|
|
819
|
+
| [Codex](https://github.com/openai/codex) | Full Support | Yes | `AGENTS.md` |
|
|
820
|
+
| [Roo Code](https://roocode.com/) | Full Support | Yes | `.roo/rules.md` |
|
|
821
|
+
| [Aider](https://aider.chat/) | Full Support | Yes | `.aider.conf.yml` |
|
|
822
|
+
| [Windsurf](https://codeium.com/windsurf) | Detection | Yes | `.windsurfrules` |
|
|
751
823
|
|
|
752
824
|
---
|
|
753
825
|
|
|
@@ -776,11 +848,15 @@ npm test
|
|
|
776
848
|
- [x] ~~Context-triggered associative recall~~ (v5.0)
|
|
777
849
|
- [x] ~~Multi-agent consensus protocol~~ (v5.0)
|
|
778
850
|
- [x] ~~Collective cross-project learning~~ (v5.0)
|
|
851
|
+
- [x] ~~Zero-config auto-setup~~ (v5.0.1)
|
|
852
|
+
- [x] ~~MCP server for Cursor + all tools~~ (v5.0.1)
|
|
853
|
+
- [x] ~~Rich web dashboard with real-time WebSocket~~ (v5.0.1)
|
|
854
|
+
- [x] ~~Plugin system + brain export/import~~ (v5.0.1)
|
|
779
855
|
- [ ] **IDE extensions** — VS Code extension for inline insights
|
|
780
856
|
- [ ] **Custom LLM fine-tuning** — train on your codebase patterns
|
|
781
857
|
- [ ] **Docker image** — one-command containerized deployment
|
|
782
|
-
- [ ] **Web dashboard v2** — React-based interactive analytics
|
|
783
858
|
- [ ] **Language server** — LSP protocol for real-time feedback
|
|
859
|
+
- [ ] **Web dashboard v3** — collaborative team dashboard
|
|
784
860
|
|
|
785
861
|
---
|
|
786
862
|
|
|
@@ -807,6 +883,6 @@ MIT License — see [LICENSE](LICENSE) for details.
|
|
|
807
883
|
|
|
808
884
|
**Built with brains by [theihtisham](https://github.com/theihtisham)**
|
|
809
885
|
|
|
810
|
-
**Topics:** `ai` `artificial-intelligence` `llm` `claude-code` `cline` `kilo-code` `codex` `roo-code` `aider` `opencode` `code-review` `static-analysis` `developer-tools` `npm-package` `typescript` `ollama` `openai` `anthropic` `code-quality` `security-scanner` `health-score` `smart-fix` `vulnerability-scanner` `pattern-learning` `agent-tools` `ai-agent` `code-metrics` `pre-commit-hook` `github-actions` `developer-productivity` `neural-mesh` `quantum-computing` `shannon-entropy` `bayesian-inference` `mcp-server` `semantic-analysis` `dependency-graph` `turboquant` `sssp-algorithm` `genetic-algorithm` `swarm-intelligence` `pagerank` `knowledge-graph` `hallucination-detection` `cross-agent` `self-evolving` `predictive-engine` `ant-colony` `infinite-memory` `vector-compression` `iclr-2026` `arxiv` `super-intelligence` `hyper-intelligence` `autonomous-agents` `ai-engineering` `agentic-coding` `vibe-coding` `hierarchical-memory` `context-recall` `consensus-engine` `collective-learning` `infinite-intelligence`
|
|
886
|
+
**Topics:** `ai` `artificial-intelligence` `llm` `claude-code` `cursor` `cline` `kilo-code` `codex` `roo-code` `aider` `opencode` `windsurf` `code-review` `static-analysis` `developer-tools` `npm-package` `typescript` `ollama` `openai` `anthropic` `code-quality` `security-scanner` `health-score` `smart-fix` `vulnerability-scanner` `pattern-learning` `agent-tools` `ai-agent` `code-metrics` `pre-commit-hook` `github-actions` `developer-productivity` `neural-mesh` `quantum-computing` `shannon-entropy` `bayesian-inference` `mcp-server` `model-context-protocol` `semantic-analysis` `dependency-graph` `turboquant` `sssp-algorithm` `genetic-algorithm` `swarm-intelligence` `pagerank` `knowledge-graph` `hallucination-detection` `cross-agent` `self-evolving` `predictive-engine` `ant-colony` `infinite-memory` `vector-compression` `iclr-2026` `arxiv` `super-intelligence` `hyper-intelligence` `autonomous-agents` `ai-engineering` `agentic-coding` `vibe-coding` `cursor-ai` `zero-config` `auto-setup` `dashboard` `plugin-system` `brain-export` `natural-language` `real-time` `websocket` `team-collaboration` `ci-cd` `open-source` `trending` `hierarchical-memory` `context-recall` `consensus-engine` `collective-learning` `infinite-intelligence` `coding-assistant`
|
|
811
887
|
|
|
812
888
|
</div>
|