Codebase Graph
What It Is
understand-anything is a Claude Code plugin that analyzes the codebase and produces an interactive knowledge graph. It maps every file to an architectural layer, extracts relationships between components, and generates a guided tour of the project.
Live dashboard: finapp-graph.ilko.me
Commands
| Command | Description |
|---|---|
/understand | Run analysis - incremental if a graph exists, full if not |
/understand --full | Force a complete rebuild from scratch |
/understand --review | Run LLM graph reviewer on the existing graph (no re-analysis) |
/understand --auto-update | Enable automatic graph updates on every commit |
/understand --no-auto-update | Disable automatic graph updates |
/understand --language ru | Generate all text in the given language (en, ru, zh, ja, ko, etc.) |
/understand /path/to/dir | Analyze a different directory instead of the current one |
Options can be combined: /understand --full --language ru
How It Works
The command runs through 7 phases:
| Phase | What happens |
|---|---|
| 0 | Pre-flight - detects incremental vs full rebuild |
| 0.5 | Reads .understandignore exclusion rules |
| 1 | Scans all project files |
| 1.5 | Groups files into semantic batches |
| 2 | Analyzes each batch with LLM (5 concurrent subagents) |
| 3-5 | Merges batches, assembles graph, reviews |
| 6-7 | Builds tour steps, writes output files |
Output goes to .understand-anything/:
knowledge-graph.json- the full graph (nodes, edges, layers, tour)meta.json- commit hash and timestamp of last analysisfingerprints.json- file hashes for incremental updates
Exclusions
.understand-anything/.understandignore controls what gets excluded. It uses gitignore syntax. Built-in defaults always exclude node_modules/, dist/, *.lock, images, etc.
Current active exclusions:
.playwright-mcp # Playwright MCP screenshots
docs/ # Docs site (separate project)
*.test.* # Test files
*.spec.* # Spec files
*.snap # Snapshots
Uncomment or add patterns to exclude more, then re-run /understand.
Incremental Updates
If a graph already exists, /understand checks the current git commit against meta.json:
- Same commit - asks whether to rebuild or skip
- Changed files - re-analyzes only the changed files, merges into existing graph
--fullflag - forces a complete rebuild from scratch
Updating the Dashboard
After running /understand, redeploy the dashboard:
# 1. Copy the updated graph to the dashboard's public directory
cp .understand-anything/knowledge-graph.json \
~/.claude/plugins/cache/understand-anything/understand-anything/2.7.5/packages/dashboard/public/
cp .understand-anything/meta.json \
~/.claude/plugins/cache/understand-anything/understand-anything/2.7.5/packages/dashboard/public/
# 2. Build (demo mode - serves graph from same origin)
cd ~/.claude/plugins/cache/understand-anything/understand-anything/2.7.5/packages/dashboard
VITE_DEMO_MODE=true pnpm exec vite build --config vite.config.demo.ts --base /
# 3. Deploy
cd dist && vercel deploy --prod --yes
Dashboard Features
The dashboard has three views:
- Knowledge Graph - full file relationship graph with layer coloring, filtering by layer or edge type
- Domain Graph - business domain flows (if domain analysis was run)
- Architecture Layers - files grouped by layer with summaries
From any node you can open the source file inline, see its imports and dependents, and follow the guided tour.
Architecture Layers
Files are assigned to one of 9 layers:
| Layer | Description |
|---|---|
| Entry | App entry points and Nuxt config |
| Config | Build config, ESLint, TypeScript config |
| Backend | Supabase Postgres schema + RLS + PowerSync sync rules (app/supabase/, app/powersync/) |
| Auth | Supabase Auth (email/password); two-layer route guard |
| Store | Pinia stores (categories, wallets, trns, rates, settings) |
| Composables | Vue composables and utilities |
| Components | Vue components grouped by feature |
| Pages | Nuxt pages and layouts |
| Types | Shared TypeScript types and validators |