🧠 Shadow Brain v6.0.2

May 13, 2026 Ā· View on GitHub

Shadow Brain v6.0.2 — Singularity Ā· 35 new modules Ā· 5 viral features Ā· 10 brain-quality upgrades Ā· One brain, every agent lsdefine%2FGenericAgent | Trendshift

šŸŽ¬ 2-minute v6.0.2 hero above — auto-plays muted Ā· click šŸ”Š to unmute Ā· v6.0.2 release page Ā· original 2-min explainer Ā· dashboard tour

npm version npm downloads GitHub stars license TypeScript node Brain Modules CLI Commands MCP Tools Tests Local First Free


🧠 Shadow Brain v6.0.2 — Singularity

The first open-source brain that every AI coding agent on your machine can share.

Claude Code Ā· Cursor Ā· Cline Ā· Codex Ā· Copilot Ā· Windsurf Ā· Kilo Ā· Roo Ā· OpenCode Ā· Aider — all running on one local brain. What one agent learns, every agent knows. What one sub-agent discovers, every sub-agent inherits.

šŸ†• v6.0.2 "Singularity" — 19 world-first features. Every one of them shareable.

The 5 viral artifacts — each renders as a tweet-ready PNG/SVG/MP4: šŸŽ¬ Brain Replay Ā· 🧬 Brain DNA Ā· šŸ—³ļø Hive Voice Ā· ā° Time Capsule Ā· šŸ”¬ Brain Diff

The 14 advanced features — Spotify-Wrapped-meets-AI-codebase: šŸŽµ Brain Cinema (auto 60s SVG-animated video of brain growth) Ā· šŸŽ¼ Brain Sonification (your codebase as music) Ā· šŸ† Brain Trophies (25 achievements + share cards) Ā· šŸŽ Brain Holiday Card (year-in-review) Ā· 🧭 Brain Coach (proactive idle suggestions) Ā· šŸ—ŗļø Brain Quest (gamified onboarding adventures) Ā· šŸ““ Brain Notebook (Jupyter-style brain explorer) Ā· ⚔ Brain Reflex (local-model inline completion) Ā· šŸ”„ Brain Roast (comedy code reviews, 6 personas) Ā· šŸ”® Brain Tarot (78-card divination from git+brain) Ā· šŸŽØ Brain ASCII (terminal art representations) Ā· šŸ˜‚ Brain Memes (auto-generated dev memes) Ā· 🌌 Brain 3D (Three.js rotatable graph viewer) Ā· šŸ’ž Brain Doppelganger (find your codebase's twin)

The infrastructure — real ANN HNSW index Ā· Constitution layer Ā· Confidence Gate Ā· multimodal vision (llava) Ā· LoRA distillation pipeline Ā· SWE-Bench-Lite eval harness Ā· OpenTelemetry-lite tracing Ā· git-trackable Markdown brain export/import.

Full release notes →

# 30 seconds. Every agent + sub-agent on your machine becomes smarter.
npx @theihtisham/agent-shadow-brain@latest attach-all

# Or — the 30-second wow tour
npx @theihtisham/agent-shadow-brain@latest demo

šŸŽ¬ Video Ā· šŸ“¦ npm Ā· ⭐ Star on GitHub Ā· šŸ“š Docs Ā· šŸ› Issues


⚔ Install in 30 seconds

# Method 1 — one command, every agent wired, dashboard launches
npx @theihtisham/agent-shadow-brain@latest attach-all

# Method 2 — global install
npm install -g @theihtisham/agent-shadow-brain
shadow-brain attach-all
shadow-brain dash .                 # → http://localhost:7341/

# Method 3 — in a specific project only
cd my-project
npx @theihtisham/agent-shadow-brain attach-all

Zero config. Zero API key required. 100 % local-first.


šŸ†• What's New in v6.0.2 — "Singularity"

35 new modules + 27 new CLI commands + 7 sample artifacts. Zero new npm deps. tsc-clean.

🌟 The 5 World-First Viral Features

Every one of these renders as a tweet-ready PNG/SVG. Cursor doesn't have these. Cline doesn't have these. Nobody has these.

FeatureWhat it does
šŸŽ¬Brain ReplayScrubbable timeline of every brain event since day-zero. Drag the cursor, rewind to any moment. SVG export.
🧬Brain DNASpotify-Wrapped-style fingerprint card. 8 personality archetypes (The Architect, The Debugger, …). 1080Ɨ1080 share card.
šŸ—³ļøHive Voice3 local models debate-vote on every architecture question. See consensus, dissent, and confidence — live. SVG bar chart.
ā°Brain Time CapsuleFreeze + label + resurrect brain snapshots. "Here's what we knew about React in January." Ed25519-signed bundles.
šŸ”¬Brain DiffSemantic diff between two brains. Venn-diagram SVG + English narrative. "What did Team A learn that Team B didn't?"
shadow-brain dna card --out my-brain.svg                    # 🧬 generate your DNA card
shadow-brain replay export --format svg --out timeline.svg  # šŸŽ¬ scrubbable timeline
shadow-brain hive-voice ask "Server Components by default?" # šŸ—³ļø multi-model vote
shadow-brain capsule freeze --label "pre-redesign"          # ā° freeze a snapshot
shadow-brain brain-diff compare brain-a/ brain-b/           # šŸ”¬ semantic diff

šŸŽ 14 More Advanced Features

šŸŽµ Brain Cinema — auto-procedural 60-sec SVG videošŸŽ¼ Brain Sonification — your codebase as music (WAV)šŸ† Brain Trophies — 25 achievements w/ share cardsšŸŽ Brain Holiday Card — year-in-review SVG
🧭 Brain Coach — 10 proactive idle-suggestion rulesšŸ—ŗļø Brain Quest — 5 gamified onboarding adventuresšŸ““ Brain Notebook — Jupyter-style brain explorer⚔ Brain Reflex — local-model inline completion
šŸ”„ Brain Roast — comedy code review (6 personas)šŸ”® Brain Tarot — 78-card divination from git+brainšŸŽØ Brain ASCII — terminal-art brain (6 styles)šŸ˜‚ Brain Memes — auto-generated dev memes (10 templates)
🌌 Brain 3D — rotatable Three.js graph vieweršŸ’ž Brain Doppelganger — find your codebase's twin

🧠 10 Brain-Quality Upgrades (the engineering wins)

Recall qualityMemory archEfficiencyIntelligenceSize + Learning
Rerank (BM25 + cosine hybrid)Memory Tiers (episodic/semantic)Working Memory (LRU + predictive prefetch)Contradictions (46 polarity pairs)Quantize (int8 vectors, 4Ɨ smaller, 0.000298 mean error)
Query Expander (synonyms + abbrev + HyDE)Consolidator (dedup + abstractions)Recall Cache (bloom filter, 65k bits, ~4% FP @ 10k keys)Graph Walker (5 edge types, 3-hop BFS)Active Learner (accept/reject feedback bias)

āš™ļø Production Infrastructure

  • Real ANN vector index (embeddings-v2.ts) — HNSW-style graph, M=8, sub-100ms recall over 10k vectors, sharded persistence (5MB cap), auto-pulls nomic-embed-text from Ollama on first run
  • Constitution layer — <project>/.shadow-brain/constitution.md parser + hot-reload + injection
  • Confidence Gate — active output filter, Brier score + ECE stats
  • Multimodal vision — Ollama llava / llava-llama3 / bakllava ingestion
  • Markdown brain export/import — git-trackable .shadow-brain.md round-trip
  • OpenTelemetry-lite tracing — OTel-compatible JSONL, daily rotation
  • LoRA distillation pipeline (tools/lora-pipeline/) — turn your brain into a Qwen2.5-Coder-1.5B adapter
  • SWE-Bench-Lite harness (tools/swe-bench-lite/) — 10 curated bugs, brain-on vs brain-off, statistical scoring
  • 30-second demo: npx @theihtisham/agent-shadow-brain demo

šŸ“Š v6.0.2 by the numbers

New brain modules35 (25 features + 10 quality stack)
New CLI command groups27
New LOC~16,000 (TypeScript)
New npm dependencies0
Sample artifacts shipped7 (DNA card, Replay timeline, Cinema, Holiday wrapped, Tarot, Trophy wall, 3D viewer HTML)
Quantization roundtrip error0.000298 (16Ɨ better than spec)
TypeScript errors0

Full release notes: docs/launch/RELEASE_NOTES_v6.0.2.md Strategic roadmap (v7+): docs/ROADMAP-v7.md Launch playbook: docs/VIRAL-PLAYBOOK.md


šŸ”„ Why Shadow Brain? (the 60-second pitch)

Without Shadow BrainWith Shadow Brain v6
Every new session → agent starts from zero2K-token briefing injected before the first prompt
Cursor learns X → Claude doesn't knowOne singleton brain every agent shares
Claude Task spawns sub-agent → sub-agent starts blindSABB injects focused context slivers into every sub-agent
You can't explain why the AI made a choiceCausal Memory Chains render the full DAG of causes
Two agents touching the same file = merge hellCollision Detective catches it in real time
Agents work, then go idle — wasted computeDream Engine reflects during idle, runs counterfactuals
No verifiable record of agent decisionsEd25519-signed Reputation Ledger — tamper-proof receipts
Token bills explode across Opus / GPT / GeminiToken Economy routes to cheapest model that passes confidence
Needs its own API key for everythingAgent-proxy mode reuses your existing Claude/Cursor/Codex config
Every tool runs hot, every key leaksAir-Gap mode + ChaCha20 encryption at rest

🌟 22 Novel Modules — None Exist in Any Other Tool

This isn't a wrapper around someone else's API. All 22 are first-party research-grade implementations, persisted to disk, with real tests.

🧠 Cognition

  1. Sub-Agent Brain Bridge (SABB) — sync brain context into Claude Task / Cursor Composer / CrewAI / LangGraph / AutoGen sub-agents
  2. Causal Memory Chains — every decision links to its causes; Graphviz DOT export
  3. Dream Engine — idle-time reflection: revisit / counterfactual / consolidation / contradiction / pattern-discovery
  4. Swarm Debate Protocol — pro / con / arbiter sub-agents for critical decisions
  5. Pre-Mortem Assistant — surfaces past failures from your project before you start
  6. Branch Brains — git-branch-aware memory context

šŸ” Transparency & Trust

  1. Agent Reputation Ledger — Ed25519-signed receipts, portable accuracy score
  2. Attention Heatmap — weighted attribution showing which memories shaped a decision
  3. Confidence Calibration Monitor — Brier scores + automatic trust-weighting
  4. Formal Verification Bridge — natural-language rules → ESLint / Semgrep / LSP diagnostics
  5. Agent Collision Detective — real-time overlap detection with advisory locks

šŸ’° Economy & Memory

  1. Token Economy Engine — cross-agent spend, savings suggestions, routing advice
  2. Cost-Aware Sub-Agent Spawner — auto-route trivial tasks to cheaper models
  3. Forgetting Curve + Sleep Consolidation — Ebbinghaus-inspired biological memory

šŸ”’ Privacy & Safety

  1. Air-Gap Mode — zero outbound network, localhost-only
  2. E2E Encryption — ChaCha20-Poly1305 at rest
  3. Hallucination Quarantine — isolate suspect memories, auto-expire in 7 days

✨ Delight & Network Effects

  1. Voice Mode — natural-language intent parser for transcripts
  2. Brain Garden — animated visualization of memory as a living constellation
  3. PR Auto-Review — GitHub PR comments citing project memories
  4. Team Brain Sync (WebRTC) — peer-to-peer shared brain, no server
  5. Brain Exchange — export / import curated shareable brain slices

⚔ Accelerators

  • Local-First LLM — Ollama default; optional Anthropic / OpenAI / OpenRouter / Moonshot / Gemini / DeepSeek / Mistral
  • Hive Accelerator — SSSP (arXiv 2504.17033) + TurboQuant (ICLR 2026) for fast causal traversal + 6Ɨ vector compression

šŸ–„ļø Complete Web Control Dashboard

Start it:

shadow-brain dash .
# → http://localhost:7341/

28 tabs. Real-time data. Full control. Every feature has live monitoring + interactive controls. Preview:

OverviewLive GraphAgents
Overview — live counters, chartsLive Graph — animated signal flowAgents — connect / disconnect per agent
ChatMemorySABB
Chat with Brain — RAG with citationsMemory Browser — semantic searchSABB — sliver generator + quarantine
CausalDreamReputation
Causal Chains — traceable decisionsDream Engine — reflection insightsReputation — Ed25519 leaderboard
TokensModelsCommand
Token Economy — $ saved liveModels & Intelligence — 8 providers⌘K Command Palette

→ Browse all 29 tab screenshots

Features: dark + light theme · command palette (⌘K) · keyboard shortcuts · toast notifications · Chart.js analytics · responsive (mobile / tablet / desktop) · real-time WebSocket · stop button that actually stops the process.


🧩 Works With Every AI Coding Agent

AgentAdapterHook target
Claude Codeāœ… Native~/.claude/settings.json hooks.SessionStart
Cursorāœ… Native.cursor/rules/shadow-brain.md + MCP
Clineāœ… NativeVS Code globalStorage MCP
Codexāœ… Native~/.codex/config.json
GitHub Copilotāœ… Native.github/copilot-instructions.md
Windsurfāœ… Native.windsurfrules + MCP
Kilo Codeāœ… Native~/.kilocode/settings.json
Roo Codeāœ… Native~/.roocode/mcp.json
OpenCodeāœ… NativeAGENT.md
Aiderāœ… Native.aider.conf.yml

Custom agent? Add its config path in the dashboard "Custom Agent Paths" panel — Shadow Brain will auto-read its provider + model + API key.

Sub-agent frameworks supported by SABB: Claude Task, Cursor Composer, Cline Sub-step, CrewAI, LangGraph, AutoGen, generic.


šŸ¤– Use Your Own LLM — or Your Agent's Already-Configured One

Shadow Brain's ModelRegistry supports 8 providers out of the box:

Ollama (default, local, free) Ā· Anthropic Claude Ā· OpenAI Ā· OpenRouter Ā· Moonshot / Kimi Ā· Google Gemini Ā· DeepSeek Ā· Mistral

Plus a unique Agent Proxy mode: if you already use Claude Code / Cursor / Codex with their own API key, Shadow Brain borrows their intelligence — zero new API keys, zero cost.

Auto-discovery reads every agent config on your machine so you never retype a key.


šŸ“Š Real Numbers

MetricValue
Brain modules48
CLI commands90+
MCP tools60+
REST endpoints50+
Tests passing148 / 148
TypeScript errors0
Supported agents10 (plus custom)
Supported LLM providers8 (plus agent-proxy)
Novel features nobody else has22
LicenseMIT
Cost to run$0 forever (local-first)

šŸš€ 30-Second Quickstart

# 1. Install
npx @theihtisham/agent-shadow-brain@latest attach-all

# 2. Launch the dashboard
shadow-brain dash .
# → open http://localhost:7341/

# 3. Seed the brain (optional — populates example data)
shadow-brain reputation sign --agent claude-code --ver 4.7 --project demo \
  --decision "use bcrypt cost 12 for all password hashing" \
  --category security --confidence 0.92

# 4. Every new AI agent session automatically gets context injected

That's it. Open any project in Claude Code / Cursor / any supported agent — Shadow Brain is already running under the hood.


🧪 The Hive Mind Explainer (2 minutes)

Shadow Brain Hive Mind Explainer — 2 minutes

ā–¶ Click here to watch Ā· Full motion graphics explainer with voice-over walking through every feature, the live dashboard, and the 30-second install.

Local file: docs/launch/shadow-brain-motion-explainer-narrated.mp4 (2:05 Ā· 1080p Ā· narrated).


šŸ“– CLI Reference (top commands)

# Attachment + lifecycle
shadow-brain attach-all          # wire every detected agent
shadow-brain detach-all          # remove every hook
shadow-brain audit-hooks         # list what's installed
shadow-brain dash .              # launch web dashboard at :7341
shadow-brain mcp                 # start MCP server at :7342

# v6 Hive Mind
shadow-brain hive status         # cross-module status
shadow-brain subagent sliver --parent claude-code --task "refactor auth"
shadow-brain causal trace <id>   # render ancestor DAG
shadow-brain dream run           # trigger idle reflection now
shadow-brain debate "Redis or Postgres?" --context "10k users"
shadow-brain premortem "migrate auth to passkeys"
shadow-brain reputation sign --agent claude-code --ver 4.7 --project X \
  --decision "..." --category security --confidence 0.92
shadow-brain reputation badge claude-code --ver 4.7

# Memory + analytics
shadow-brain global recall --keywords "auth"
shadow-brain tokens report       # cross-agent spend + savings
shadow-brain forget consolidate  # run sleep cycle
shadow-brain formal generate "always use parameterized SQL"
shadow-brain formal export-eslint

# Privacy + trust
shadow-brain airgap enable --policy strict
shadow-brain encrypt file ~/.shadow-brain/global.json --passphrase ...
shadow-brain quarantine list

# Sharing
shadow-brain exchange export --name "react-expert-v1" --tags react,auth
shadow-brain exchange import ~/brain-packs/react-expert-v1.json

# Full list
shadow-brain --help

šŸŽÆ Tweetable Talking Points

"Shadow Brain is the first open-source brain that works with sub-agents. Claude Task, Cursor Composer, CrewAI, LangGraph, AutoGen — all finally share context. One npx command. Zero API keys."

"Every AI decision Shadow Brain makes is Ed25519-signed. Every cause is traced. Every collision is caught before it happens. Free forever."

"22 novel features nobody else has. Free. Open source. Local-first. npx @theihtisham/agent-shadow-brain."


šŸ› ļø For Contributors

git clone https://github.com/theihtisham/agent-shadow-brain.git
cd agent-shadow-brain
npm install
npm run build
npm test                # 148/148 tests
npm run dev             # ts-node dev mode

# Rebuild the explainer video
node tools/record-motion-explainer.mjs

# Capture fresh dashboard screenshots
node tools/capture-screenshots.mjs

# Seed the brain with demo data
node tools/seed-brain.mjs

Issues, PRs, discussions welcome. See CONTRIBUTING.md.


šŸ“š Documentation


šŸ’¬ Community

If Shadow Brain makes your AI agents smarter, star the repo ⭐


⭐ Stargazers Over Time

Star History Chart


šŸ“œ License

MIT — see LICENSE.

Free to use, modify, fork, commercialize. Local-first by default. Works offline, in air-gapped environments, in privacy-constrained enterprises. No telemetry. No phone-home. No trial expiration.


Built by @theihtisham

GitHub npm

The Hive Mind for every AI coding agent on your machine.

npx @theihtisham/agent-shadow-brain@latest attach-all

Topics: ai Ā· llm Ā· claude-code Ā· cursor Ā· cline Ā· codex Ā· copilot Ā· hive-mind Ā· sub-agent Ā· sabb Ā· causal-chains Ā· dream-engine Ā· reputation-ledger Ā· swarm-debate Ā· pre-mortem Ā· branch-brain Ā· attention-heatmap Ā· token-economy Ā· forgetting-curve Ā· formal-verification Ā· calibration-monitor Ā· air-gap Ā· e2e-encryption Ā· hallucination-quarantine Ā· voice-mode Ā· brain-garden Ā· pr-review Ā· team-brain Ā· brain-exchange Ā· local-first Ā· ollama Ā· anthropic Ā· openai Ā· openrouter Ā· gemini Ā· deepseek Ā· moonshot Ā· mistral Ā· mcp-server Ā· model-context-protocol Ā· lsp-server Ā· cross-agent Ā· multi-agent Ā· autonomous-agents Ā· agentic-ai Ā· vibe-coding Ā· cursor-ai Ā· developer-tools Ā· developer-productivity Ā· coding-assistant Ā· ai-coding Ā· code-review Ā· static-analysis Ā· knowledge-graph Ā· semantic-search Ā· vector-embeddings Ā· prompt-caching Ā· json-mode Ā· chat-with-memory Ā· ed25519 Ā· chacha20-poly1305 Ā· sssp Ā· turboquant Ā· iclr-2026 Ā· arxiv Ā· zero-config Ā· typescript Ā· open-source Ā· free-forever Ā· mit-license