Help us improve
Share bugs, ideas, or general feedback.
npx claudepluginhub advenire-consulting/thebrainCognitive layer for Claude Code — code navigation, conversation recall, safety hooks, behavioral learning
Share bugs, ideas, or general feedback.
A Claude Code plugin that makes your AI remember, navigate, and learn.
Out of the box, Claude Code starts every session blank — no memory of past conversations, no awareness of how your codebase connects, no learned preferences. TheBrain fixes that.
Remembers your conversations. Search and recall past sessions across all your projects. "What did we decide about the auth system?" works.
Navigates your code. Maps file relationships, tracks blast radius (what breaks if you change this file), indexes every function and identifier across all your workspaces. Works cross-project — a shared library shows dependents from every project that imports it.
Saves tokens. Every tool the brain provides replaces an exploratory chain that would otherwise burn tokens — and those tokens don't just cost at read time, they persist in the conversation context for every subsequent turn. See Token Savings for the full breakdown.
Keeps you safe. Hooks into every file edit and bash command. Warns before touching high-impact files, flags commands it can't fully analyze, blocks edits to sensitive files like databases without your confirmation.
Learns how you work. A behavioral system that builds up over time. Flag moments that matter — pain points become rules ("never do this"), good patterns get reinforced ("always do this"). Your Claude gets better the more you use it.
Tracks what you're working on. File-level working memory that knows which files are hot right now. Reads and edits build heat; idle files cool off exponentially between sessions. Session start loads the hottest files with context — what you were doing with each one and why — so Claude picks up mid-thought, not mid-codebase.
Carries context across sessions. /wrapup saves where you left off. /continue picks it back up. Short-term recall survives session restarts and context compaction.
Install the plugin, run guided setup (2 minutes), start working. The brain loads automatically on every Claude session.
~/.claude/rules/brain-tools.md) that auto-updates when the plugin changesYour spatial map. Scans all registered workspaces and builds a structured index of how files connect — imports, exports, routes, database references, and what each file does.
Directory maps (--map <project>) give Claude a full project overview in one call: every file with an auto-generated purpose summary (exports, routes, DB refs, import count) and optional narrative descriptions you can add over time. This is the first thing Claude checks when touching a project — it replaces the multi-file exploratory reads that burn tokens and pollute context.
Navigation answers structural questions without grep: --blast-radius shows what depends on a file and what it imports, --find locates every occurrence of an identifier across all projects with line numbers, --structure returns function/class/interface definitions with line numbers, --lookup shows a file's exports, routes, and database references, and --schema returns database table structures.
Content search (grep.js, classify.js) searches actual file content across all projects in one call, returning matches with surrounding context grouped by project. classify.js goes further — give it named regex variants and it categorizes every match by variant, tagging each hit with its direction: is this code making a request, defining a route, setting config, or just a comment? One command replaces the dozens of grep-then-read cycles that burn tokens and context window space. Built for migration audits, convention enforcement, and routing analysis across service boundaries.
Conversational aliases let you say "show me the auth middleware" instead of remembering lib/middleware/auth.js. Aliases are preserved across re-scans. Auto-discovers new projects when you add workspace directories.
Long-term memory. Indexes your Claude Code conversation history (the JSONL files Claude already saves) and makes them searchable. Each conversation gets broken into windows with extracted decisions, summaries, and key terms. When you ask "what was the reasoning behind the database migration?", Claude searches the index, finds the relevant window, and reads back the actual back-and-forth — not a summary, the real conversation. Works across all your workspaces.