damiensmith.dev

lode-graph

Read a codebase as a flow of real code. It builds a live graph of how a project fits together and lays it out as cards of actual code joined by arrows. Ask a question with / and the answer comes back as a flow.

TypeScripttree-sitterWeb ComponentsMCPJev
The answer to "how do we create the tabs": six cards of code, starting at addTab, with arrows to closeTab, select and createView and to the tabs state they read and write.
Asking "how do we create the tabs": six cards of real code, built in 0.6s.
The changes sidebar listing the changed declarations in one file, beside two cards showing the diff on askFlow and similar.
Git changes: the changed declarations in the sidebar, the diff on the cards.
About

What it does

Code is stored as text you read top to bottom, but what it describes is a web of functions, types and state with data moving between them, and more and more of it is written by AI and read afterwards. lode builds a live graph of a project (calls, references, shared state, and messages across processes like Electron IPC) and shows it as cards of real code on a canvas. Chips on each line show what it leads to; click one and that code opens beside it with an arrow. Point it at your git changes and it puts the diff on the cards and shows what might break. You can edit right in a card.

TypeScript and JavaScript are read through the TypeScript compiler, and Python and Ruby through tree-sitter, along with their frameworks' conventions: routes, views, templates, jobs and commands become entry points, and the links frameworks make by name (a Rails route to its action, a Django template to its view, a screen name to its React Native screen) become arrows. The graph is incremental: reopening an unchanged project takes 24ms and a changed file re-indexes in about 300ms.

Ask with / in plain words, like "how do we create the tabs". It isn't an LLM writing an answer. A text search finds candidate symbols, forgiving typos, then Jev judges in one request what kind of question it is and where to start, and lode follows the graph from there with Jev deciding whether each next step belongs. Every card is real code, usually in under half a second. On an eval of 51 questions over real repos it picked the right starting point 84% of the time.

I also tried letting Jev crawl the project instead of matching words. It did better where the question's words weren't the code's (82% coverage against 68%), but it was slower and picked worse starting points overall, so it's an option rather than the default. Synonyms the code never uses are still the known limit.

  • +A library first: graph core, an embeddable canvas built from web components, and an MCP server for agents
  • +Embedded in Clance, where Claude sessions build flows and draw note cards beside the real code
  • +105 commits and five npm releases in its first six days