Understand Anything: Graphs That Teach, Not Graphs That Impress

8 min read Tiếng Việt
Featured image for Lum1104/Understand-Anything — Understand Anything: Graphs That Teach, Not Graphs That Impress

TL;DR

  • What it solves: Reading 200,000 lines of code blind. You inherit a codebase. The senior who knew where everything lived left two months ago. The README is from 2023.
  • Why it matters: Onboarding shrinks from “two weeks of grep” to “one afternoon of clicking around a graph.” That delta multiplies on every new hire and every PR review.
  • Best for: Engineers landing on a new team, anyone doing a refactor across an unfamiliar service, and teams shipping libraries whose users have to understand the call graph.
  • Main differentiator: Tree-sitter does the deterministic parsing. The LLM does what tree-sitter can’t - plain-English summaries, architectural layer tags, business-domain mapping. Both pieces in the same JSON.
  • Best use case: /understand followed by /understand-chat How does the payment flow work? on a repo you have never opened before. Reply lands in minutes with the actual files and call chain.

First day. They Slack you a repo link. 200,000 lines. The README’s last commit was the founder’s, in 2023. The one person who knew where the payment flow lived left two months ago.

Every team has the same artifact. A photo from a 2019 Confluence page of an architecture whiteboard, three Slack-message arrows scrawled across it in Sharpie, two of the boxes labeled “TBD”. Nobody has touched it since. Nobody is sure if it is still right. Nobody asks.

Understand Anything is a Claude Code plugin (also works as Cursor, Codex, Copilot, Gemini CLI, Vibe, Trae - 14 platforms total) that scans your codebase with a multi-agent pipeline, writes a single JSON file at .understand-anything/knowledge-graph.json, and opens a web dashboard that lets you pan, zoom, search, and click on every node.

Inside Shinjuku Station  -  six route information boards over a busy concourse

The Mental Model

Think of it as a subway map for your codebase. Not the engineering diagram. The tourist map - the one that shows you which colored line goes from your hotel to the museum, what the transfer station is called, and what the next station looks like when you get there. You do not need to understand civil engineering to get from A to B. You need a map that someone with patience drew.

That is what the README’s tagline buys you. “Graphs that teach > graphs that impress.” Most code-visualization tools render every dependency they can find, give you a hairball, and call it engineering. You stare at it. You learn nothing. The trick here is the LLM doing what tree-sitter cannot - writing a plain-English label for every node and a guided tour through the dependencies in the order somebody who knew the codebase would walk you through them.

Four Commands

# Install (Claude Code)
/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything

# Scan the repo (multi-agent pipeline)
/understand

# Open the interactive dashboard in your browser
/understand-dashboard

# Ask the graph a question instead of grepping
/understand-chat How does the payment flow work?

That is the entire user surface for the first week. Install, scan, open, ask. Everything else - diff impact, onboarding guides, business-domain maps, knowledge-base ingestion - is one more slash command away when you need it.

A coder's workspace, multiple monitors, code on every screen

Tree-sitter + LLM: Why This Hybrid Actually Works

Two passes, two jobs, no overlap. Tree-sitter parses every file into a concrete syntax tree and pulls out the structural facts: imports, exports, functions, classes, call sites, inheritance. Same code in, same edges out, every time. That is what makes the graph reproducible.

Then the LLM reads the same file with that structural context already in hand. It does not have to re-derive the imports - they are passed to it. It is free to spend its tokens on what it is actually good at: writing a short summary, assigning an architectural layer, mapping the file to a business domain, picking the next file a learner should read.

The Multi-Agent Pipeline

/understand is a relay race between five specialists. Each one passes a slightly richer artifact to the next.

AgentJob
project-scannerWalks the tree. Detects languages and frameworks
file-analyzerParses each file. Emits nodes and edges (runs in parallel)
architecture-analyzerTags every node with its layer (API, Service, Data, UI, Util)
tour-builderGenerates the guided learning route
graph-reviewerChecks every edge actually exists. Catches dangling references

The file-analyzer is the bottleneck and the part that should have been the bottleneck. It runs five files concurrently, twenty to thirty per batch, and only re-analyzes files whose tree-sitter fingerprint changed since the last run. That last detail is the difference between “re-running takes an hour” and “re-running takes a coffee.”

Commit The Graph, Skip The Pipeline

The graph is a single JSON file. Commit it. Your teammates clone the repo, open the dashboard, and skip the scan entirely. This is the move the README quietly buries - most projects assume the graph is local scratch. Here, it is shippable infrastructure. The README points at a GoogleCloudPlatform/microservices-demo fork (Go / Java / Python / Node) with the graph already committed as the canonical example.

14 Platforms, One Install

The plugin lands natively in Claude Code, but the same skill set runs in Cursor and VS Code Copilot (auto-discovery), and in twelve others via a one-line install script: Codex, OpenCode, Antigravity, Gemini CLI, Pi Agent, Vibe CLI, Hermes, Cline, KIMI CLI, Trae, OpenClaw, Copilot CLI. The installer drops a symlink in the right place per platform.

Where It Fits, Where It Does Not

Use it when:

  • You inherited a repo nobody on your current team wrote.
  • You are about to refactor across a service you don’t fully understand yet.
  • Your team’s onboarding doc is two screenshots and a sigh.
  • You ship a library and want users to navigate it without reading every file.

Skip it when:

  • The codebase is 5,000 lines. Just read it. Honestly.
  • You’re allergic to running an LLM over your source for policy reasons.
  • You wanted “AI explains my code line by line.” That’s a different tool. This is the map, not the tour guide who stands next to you.

The Rough Edges

First run on a 200k-line repo is not fast. The README says 20 to 30 files per batch with five parallel workers, which is reasonable engineering, but it still has to read every file once. Plan for an hour and a coffee. After that, incremental updates bring it down to seconds for normal commit-sized changes.

The quality of the labels depends on which model you point it at. A small open-weights model will write a summary that reads like a junior intern guessing. A frontier model will write one that reads like the senior who left two months ago. The graph structure is the same. The legibility is not.

If you don’t enable --auto-update, the committed graph drifts the moment somebody merges without running /understand. The post-commit hook is in the README. Set it up the same day you commit the first graph, or you will be in the same situation as that 2019 whiteboard, except this time it was your fault.

Graphs larger than 10 MB need git-lfs. The README is upfront about it and gives the exact .gitattributes lines. Fine, but it’s a “don’t forget” item that bites at the wrong moment.

Final Thoughts

Tokyo subway entrance, the city behind it

The first day on a new codebase used to mean Confluence archaeology, Slack searches for “@deleteduser anyone know where login lives”, and the slow, embarrassing process of running grep -r across folders you couldn’t pronounce. Two weeks before you wrote anything that wasn’t a typo fix.

The graph does not understand the code for you. It just shows you the map. You still take the train. You still walk from the station. But you no longer have to guess which colored line you’re on, and you no longer have to apologize for asking your manager where the payment flow lives - because you already clicked the node labeled “payment” and read what came up.

Graphs that teach beat graphs that impress. That sentence is doing a lot of work in the README, and after a week of using this on a real codebase, it earns it.


Lum1104/Understand-Anything · MIT · 33k · docs

Hoang Yell

Hoang Yell

A software developer and technical storyteller. I spend my time exploring the most interesting open-source repositories on GitHub and presenting them as accessible stories for everyone.