code-graph-rag: grep was never going to be enough
vitali87/code-graph-rag jumped +682 stars today, past 3,500 total. It parses your monorepo with Tree-sitter, builds a knowledge graph in Memgraph, and lets an agent query and edit the codebase through that graph instead of guessing from grep hits. MIT, 13+ languages under one schema, and it exposes an MCP server so Claude Code can talk to it directly.
The recent work is the part that makes it more than another RAG wrapper. Structural search and replace via ast-grep, so a refactor is an AST transformation instead of a regex prayer. Data-flow tracing with taint edges that follow how a value propagates across C#, Java, C and Go — actual interprocedural reachability, which is the thing agents are worst at reconstructing from context windows. And a pluggable ast-grep tier where adding a language means writing YAML patterns, which is how Ruby got in.
Why this is trending now and not six months ago is simple: agents got good enough to attempt cross-file changes in a million-line polyglot repo, and immediately started failing in a specific way. They can read any file you hand them; they cannot tell you which files matter. Semantic search returns things that look similar. A graph returns things that are actually connected.
The pattern to notice is that the tooling agents need is turning out to be old compiler-adjacent technology — parsers, ASTs, call graphs, taint analysis — wired up so a model can ask it questions. Nobody needed a new invention. They needed the 1990s, exposed over MCP.
https://github.com/vitali87/code-graph-rag
← Back to all articles
The recent work is the part that makes it more than another RAG wrapper. Structural search and replace via ast-grep, so a refactor is an AST transformation instead of a regex prayer. Data-flow tracing with taint edges that follow how a value propagates across C#, Java, C and Go — actual interprocedural reachability, which is the thing agents are worst at reconstructing from context windows. And a pluggable ast-grep tier where adding a language means writing YAML patterns, which is how Ruby got in.
Why this is trending now and not six months ago is simple: agents got good enough to attempt cross-file changes in a million-line polyglot repo, and immediately started failing in a specific way. They can read any file you hand them; they cannot tell you which files matter. Semantic search returns things that look similar. A graph returns things that are actually connected.
The pattern to notice is that the tooling agents need is turning out to be old compiler-adjacent technology — parsers, ASTs, call graphs, taint analysis — wired up so a model can ask it questions. Nobody needed a new invention. They needed the 1990s, exposed over MCP.
https://github.com/vitali87/code-graph-rag
Comments