Skip to main content

NotesEssays

Graph, not grep: what coding agents need from a codebase

Grep gives an agent strings. To change code safely it needs callers, callees, and what a change will break. That is why Rig exists.

What I was looking for

What a coding agent needs from a codebase to change code safely.

What happened

Watch a coding agent work in an unfamiliar repo and most of its effort goes into finding things: grep for a name, open five files, grep again. It gets strings back. What it needs before changing a function is structure: who calls this, what does it call, and what breaks if it changes.

Rig answers those questions directly. It indexes a repo in six stages into a typed graph and exposes it over MCP as tools an agent can call: search, callers and callees, impact, hubs, and dependencies. It wires itself into Claude Code, Cursor and Codex, and a live map of the graph assembles in the browser while indexing runs.

Two choices mattered more than the graph itself. It is local-first: no API key, and nothing leaves the machine, because developers will not hand a whole codebase to a stranger's server for a convenience. And each project gets a stable port, so an agent that restarts finds its index again instead of starting over.

I took it from idea to v0.1.5 on npm in about four days and a hundred commits, and launched it on Show HN. The lesson from that burst: plan the next release before the launch push. A package with one spike of commits reads as abandoned, not finished. It is at v0.3.0 now.