StackMap
Subscribe

Graft vs mex

Context layer for large codebases: a graph of plain-English markdown nodes — no embeddings, no index — agents read like any repo file. Claude Code hooks + MCP; 42% fewer tokens in its bench. — versus — A living wiki for your codebase, written by your coding agents: a Tree-sitter graph grounds structured Markdown notes, task-aware routing loads only what's needed, and drift checks catch stale claims.

The curated verdict

Both build a Markdown context layer over a large codebase with no embeddings, served through agent hooks and MCP. Graft keeps it to a graph of prose nodes agents read like files; mex puts a Tree-sitter symbol graph underneath so claims can be grounded and drift detected.

Graftmex
Stars3.8k1.5k
Forks338104
LanguageTypeScriptTypeScript
LicenseMITMIT
Last activity3 days agoyesterday
Topicscode-intel, ragcode-intel, memory
Curated connections44

Graft — the curator's take

The anti-embeddings bet is the story: the codebase map is prose files — senior-engineer explanations, linked and greppable — so agents consume it with the file tools they already have, and a stale map shows up as a diff in review instead of rotting in a vector store. The 162-run controlled benchmark holding correctness equal is more rigor than this category usually shows; still self-run. Claude Code gets the deep integration (hooks, statusline, background rebuild), everyone else gets MCP. When NOT: nodes are LLM-written prose — building them on a big repo costs real tokens, and prose can drift subtly wrong in ways a symbol graph can't; spot-check the nodes on your hot paths. ★437 and young, with NanoNets behind it.

mex — the curator's take

The answer to the instruction file that grew to 2,000 lines: knowledge lives in a routed `.mex/` wiki instead of one giant prompt, claims can be grounded to exact graph nodes by fingerprint, and `mex check` validates paths, commands, links, indexes and symbols spending zero tokens before `mex sync` sends the agent to repair only what drifted. Code stays the source of truth; the wiki is its maintained explanation. Limits worth knowing: the deterministic graph covers TypeScript/TSX, JavaScript/JSX, Python and Rust, so a polyglot monorepo outside that set gets a thinner spine — and the wiki is only as good as what your agents write into it, so it needs review like any other docs.