Java interface dispatch: resolving s.area() in a code graph
Shape s = ...; s.area() produced no edge in CGraph, because the name was ambiguous. How interface dispatch resolves it, the overload regression it caused, and what it costs.
Essays on building tools, running open source communities, and working in public.
Shape s = ...; s.area() produced no edge in CGraph, because the name was ambiguous. How interface dispatch resolves it, the overload regression it caused, and what it costs.
CGraph listed Kotlin as a supported language while extracting zero symbols from it. The cause was a tree-sitter grammar with no named fields — and what finally measured it.
Your AI agent claims it updated every call site. blastline check queries a code graph for what still references the symbol, with file:line evidence — and refuses to certify.
Four releases since launch: cross-repo seams, C/C++, base-graph automation, a safety-audit loop that runs on every merge, and the dispatch barrier that cut Go selections by a third without losing a single test.
Blastline scored 6/12 on tokio and it looked like a recall crisis. A dependency-filtered oracle showed five of the six "misses" depended on nothing — and chasing the one real miss uncovered a macro-blindness bug in CGraph. Tokio reachability went 0.59 → 0.91.
Blastline picks the tests a diff actually reaches by querying a CGraph code graph — deterministic, fail-open, benchmarked on 80 historical commits. Now open source.
CGraph now extracts Rust — structs, traits, functions, and call edges including method calls — via a pinned tree-sitter grammar, with honest v1 limits.
Every CGraph answer is stamped with a merkle content root of the indexed source, and reads can pin that root — so a stale index errors instead of lying.
A safe-refactoring workflow on a real repo: pin the node with query, size the blast radius with impact, explain surprise dependents with path — before editing.
How our live demo embeds an interactive graph of 1,300 nodes: a self-contained graph.html export, a click-to-load sandboxed iframe, and a provenance gate.
How CGraph keeps a code graph current as you edit: content-hashed fold-ins within a couple of seconds, and why a branch switch becomes one full rescan.
cgraph daemon install keeps a resident code-graph daemon warm for every repo you track — auto-discovered, restarted on crash, started at login via launchd.
Which MCP tools does your coding agent actually use? CGraph records every daemon op in a ledger; cgraph stats rolls up counts, latency, and zero-hit rate.
Checkpoint a coding session into the code graph and recall it after /clear or a daemon restart. How CGraph stores durable, code-linked memory that never pollutes retrieval.
Layer prose, concepts, and design intent onto a deterministic code graph — without the binary ever calling an LLM. How CGraph plans chunks and merges host-authored semantic fragments.
Fuse per-repo code graphs into one queryable cross-service graph: declare the wire contract, anchor it to real code, and trace blast radius across services.
A localhost socket is still a trust boundary. How four latent bugs in CGraph's resident daemon survived a green test suite, and what fixing them looked like.
RAG for code: how CGraph gathers a neighborhood around a symbol and packs it into an LLM token budget with a knapsack, returning an inspectable result.
Code graphs, LSP, and ctags answer different questions about a codebase. A decision guide to when each one wins, and where the three usefully overlap.
CGraph extraction is deterministic: the same tree yields the same graph. That makes a code graph diffable in CI with the one-shot CLI and plain diff tooling.
CGraph writes the same code graph in six shapes — JSON, HTML, SVG, an Obsidian vault, Cypher, and a call-flow view. Here is when to reach for each export.
Give a coding agent your repo as a queryable graph over MCP instead of dumping raw files — precise answers, fewer tokens, and a one-line Claude Code setup.
Find the blast radius of a code change in one query. CGraph keeps a resolved graph warm in a daemon, so "what breaks if I change this?" returns in about 10ms.
CGraph exposes eight MCP tools that let a coding agent query a codebase as a graph. What each tool answers, and when an agent should reach for each one.
CGraph parses 11 languages with vendored tree-sitter grammars, then resolves imports, calls, and relations into one deterministic code graph. Stage by stage.
We measured CGraph against Graphify and against the grep-and-read loop agents use today: 12–198x faster builds, a 15.8x faster warm query, and ~82% fewer tokens on realistic navigation tasks — with the caveats that matter.
The NxtSoft blog now renders MDX, links tags to browsable index pages, and publishes an RSS feed.
A practical guide to contributing to CGraph — pick a good first issue, build it locally with CMake and vcpkg, keep extraction deterministic, and open a PR we can review quickly.
CGraph is an open-source code-intelligence engine that builds a queryable graph of any repository — a self-hosted alternative to proprietary code-search and analysis tools.