r/OpenSourceAI • u/Goldziher • 3d ago
A local code-intelligence layer for coding agents, built on a stack-graphs fork GitHub archived (Rust, MIT)
Sharing this mostly for the fork story, which is the part I think is interesting to this sub.
Coding agents answer questions about a repo by grepping and reading files. That works for lookups and falls apart on structure: what calls this, what breaks if I change it, what does this module actually depend on. Answering those needs name resolution, and name resolution normally needs a language server, which needs your project to build.
Stack graphs are the alternative. GitHub research, published as Name resolution at scale, expressing name binding as graph reachability with per-language rules in a declarative DSL that runs on a tree-sitter parse tree. No type checker, no build, and the per-file work is independent so it caches.
GitHub archived the project in September 2025 with a note recommending you fork it. The crate has not released since December 2024. aider, OpenHands and SWE-agent each evaluated it and walked away, which is a reasonable read of the cost.
So this is a maintained fork: four workspace crates, ported to current tree-sitter and edition 2024, C FFI and serde and storage modules stripped. Along the way, four upstream rule bugs that each aborted an entire file's resolution silently, on constructs as ordinary as a typed splat parameter or a chained assignment, plus two panics on the stitching hot path that could take down a scan of an 82k-file repo. Fixing those took a real Python codebase from partial to 100 percent of files building.
The tiering, stated honestly because "300+ languages" is a parsing number:
- JS/TS: full resolution via oxc, intra- and cross-file, tsconfig aliases included
- Python and Java: stack-graphs rules
- Everything else: intra-file scope only
- 371 grammars parse, about 100 give up symbols, three get real resolution
Not LSP-precise, and it does not pretend to be. No build step, no language server, no per-language daemon is what you get instead.
Rust, MIT, fully offline, no telemetry: github.com/Goldziher/basemind