Skip to content

How the brain works

Your AI runs /neuroplex to map your project into a brain repository, then queries it over MCP

Neuroplex splits the work between a deterministic tool and your own AI.

Layer What it captures Who produces it Cost
Structural Files, modules, symbols, imports, calls, inheritance, HTTP routes and clients The neuroplex CLI, parsing code with tree-sitter No LLM tokens, seconds to minutes
Semantic What a module does and why, domain concepts, end-to-end flows Your AI, guided by the /neuroplex skill Runs on the assistant you already use

The CLI hands your AI focused enrichment tasks (neuroplex tasks). The AI reads the code and writes results back (neuroplex write). Every node records whether its data is structural or semantic, and the content hash it was built from, so Neuroplex always knows what is stale.

  1. Scan. neuroplex scan parses the project into graph/nodes.jsonl and graph/edges.jsonl.
  2. Enrich. Your AI works through the tasks: module summaries, the project overview, concepts, then flows.
  3. Build. neuroplex build writes Markdown notes, an Obsidian vault and the brain’s README. With --git it commits.
  4. Serve. neuroplex serve answers MCP calls from the graph, over stdio or HTTP.
  5. Update. neuroplex update rescans what changed and flags the AI knowledge that depends on it.

The brain lives next to your project, never inside it, and is versioned on its own.

your-project-brain/
├── neuroplex.json # brain config (committed)
├── graph/
│ ├── nodes.jsonl
│ └── edges.jsonl
├── notes/ # Markdown written by the AI: overview, modules, concepts, flows
├── vault/ # generated Obsidian vault
├── .neuroplex/ # git-ignored local state: index, cache, machine paths
└── README.md # generated
Node type ID format Example
project project the root
module module:<path> module:src/auth
file file:<path> file:src/auth/login.ts
symbol symbol:<path>#<name> symbol:src/auth/login.ts#login
package package:<name> package:react
concept concept:<slug> concept:authentication
flow flow:<slug> flow:checkout

Symbols are functions, classes, methods, interfaces, types, variables, components and routes. Edges are contains, imports, calls, extends, implements, depends_on and requests (structural), plus implements_concept, step_of and related_to (semantic).

Tools accept a node ID, a file or module path, or a symbol name.

Every MCP response includes indexedCommit, the source commit the brain reflects. Nodes whose code changed since their summary was written are marked stale: true, so the assistant knows to check the source.