neuralmind.uk / NeuralMind vs. Graft — a rebuilt-on-demand code graph, or a graph that learns from how you use the repo? Edit this page on GitHub ↗

NeuralMind vs. Graft

TL;DR — Graft and NeuralMind are the closest architectural neighbours in this comparison set: both build a local code graph, both wire themselves into Claude Code / Cursor / Codex, both are MIT, and both exist to stop an agent re-exploring a repo from scratch. They differ on what the graph is made of and whether it changes with use. Graft compiles a two-pass graph — deterministic tree-sitter structure plus an optional LLM-written semantic layer — into a folder of plain-English markdown nodes, rebuilt against the working tree on every query. NeuralMind serves progressive-disclosure slices (L0→L3) from a graph whose edges are reinforced and decayed by actual usage. Graft’s headline evidence is stronger in kind than ours: it publishes agent-loop task outcomes on SWE-bench Verified, where we publish retrieval ranking. We have not run a head-to-head. Assessed September 2026 — re-check before relying on specifics.

What Graft is

Graft (MIT, npm install -g @nanonets/graft) builds a per-symbol code graph in two passes:

  1. Structural — tree-sitter, deterministic, scope-aware call resolution. No model, no API key, no network.
  2. Semantic — an optional LLM pass (graft build --deep) that summarizes files and groups them into concept nodes with typed links, cached so you pay for it once.

The output is a folder of linked markdown files where, in the project’s words, “each node says, in plain English, what a part of the system does and how it connects to the rest.” The graph is treated as a regenerable local cache — graft init adds it to .gitignore the way you’d treat node_modules.

Its freshness story is a genuine design strength: every query rebuilds the structural graph against the working tree first — reported as ~3ms when nothing moved — so answers reflect uncommitted edits, not the last indexing run.

graft init wires into agents three ways: a native Claude Code skill (.claude/skills/graft/SKILL.md), instruction files for CLI agents (AGENTS.md, .github/copilot-instructions.md), and an MCP server exposing six tools (graft_find_code, graft_file_api, graft_trace_calls, graft_find_all, graft_repo_map, graft_check_freshness). On Claude Code it also installs a statusline, auto-sync hooks, and post-edit blast-radius warnings.

Its published numbers (cited as-is; we have reproduced none of them): an internal 162-run sweep across two repos reporting 46% fewer tool calls, 42% fewer tokens, 60% less latency at equal 93% correctness; and SWE-bench Verified (50 issues, Claude Sonnet 5) reporting 66% vs. 54% baseline correctness, 23% fewer tokens, and $42.43 vs. $52.34 cost.

How NeuralMind differs

Both tools answer “give the agent less, better context.” The divergence is on two axes.

1. The graph learns, or it doesn’t. This is the substantive difference. Graft’s graph is a pure function of the code at build time — excellent for freshness and reproducibility, and the project is explicit that it is a regenerable cache rather than an adaptive system. NeuralMind’s synapse layer applies Hebbian reinforcement to edges that actually co-activate during real queries and edits, with exponential half-life decay (60 days for the shared team baseline, 1 day for session scratch) so stale associations fade. After a month on one repo, the two tools’ graphs encode different things: Graft’s encodes the code, NeuralMind’s encodes the code plus how this team moves through it. Whether that’s worth having is workload-dependent — on a repo you touch rarely, it isn’t.

2. Portable team memory. NeuralMind exports learned associations to a git-portable .neuralmind-team-memory.json plus a markdown memory file any MCP-capable agent reads. Graft’s graph is deliberately git-ignored and per-checkout.

Dimension Graft NeuralMind
Structural extraction Tree-sitter, deterministic, no key Tree-sitter, deterministic, no key
Semantic layer LLM pass (--deep), cached, your provider/key Local embeddings (MiniLM ONNX); no LLM in the build loop
Graph artifact Folder of plain-English markdown concept nodes Embedded graph + ChromaDB vectors under .neuralmind/
Freshness Rebuilt against working tree per query (~3ms unchanged), sees uncommitted edits Incremental rebuild + file watcher
Learns from usage No — fixed at build time, regenerable cache Yes — Hebbian reinforcement with half-life decay
Tool-output compression No — reduces the need for calls, doesn’t compress their output No (its PostToolUse hooks on Read/Bash/Grep used to; measured, that added tokens — benchmark)
Blast radius Yes — graft callers -d N, post-edit warnings Spreading activation over synapses (different shape, not a transitive caller set)
Team memory Git-ignored, per-checkout Git-portable .neuralmind-team-memory.json
Language coverage 8 full-fidelity, ~14 name-resolved, optional LSP refinement 10 tree-sitter, optional SCIP precision on Python/TS/Go
Agent wiring Skill + AGENTS.md + MCP (6 tools); statusline, auto-sync hooks MCP + Claude Code lifecycle hooks; VS Code extension
Published evidence Agent-loop task outcomes (SWE-bench Verified, internal sweep) Retrieval ranking + token reduction, CI-gated and reproducible
License MIT MIT (core); source-available commercial modules for the Team tier

When to pick which

Pick Graft if:

Pick NeuralMind if:

Running both is coherent and we’d expect it to work: they occupy the same retrieval slot, so the honest reason to run both is evaluation — point them at the same repo and compare — rather than stacking.

The honest caveats

See also