A deep audit of the project-scanner → file-analyzer → merge pipeline
turned up a wide range of silent data-loss bugs. Each one alone is
small; together they were producing graphs with very few import edges,
missing sub-file nodes for non-code formats, and inconsistent metrics.
Root-cause fixes (high impact):
- project-scanner.md: extend import-pattern table to resolve absolute
imports for Python (`from a.b.c import x`), TS/JS (tsconfig.json
paths/baseUrl aliases), Java/Kotlin (`com.foo.Bar` ↔ file paths),
Ruby (`require 'foo/bar'` load-path), PHP (composer PSR-4 namespaces),
and C/C++ (`#include` headers). Was relative-only, which produced
empty importMap entries for the majority of real projects.
- project-scanner.md: add `.ps1`, `.bat`, `.cmd`, `.jsonc` to language
table; require non-null `language` field with an explicit fallback.
- file-analyzer.md: document `sections`, `definitions`, `services`,
`endpoints`, `steps`, `resources` in the extraction-output schema and
spell out the sub-file node-creation rules per category. Was missing,
so per-table / endpoint / resource nodes were never created from
SQL / OpenAPI / Terraform / K8s / Dockerfile parser output.
- file-analyzer.md: add explicit source-reading fallback rules for
PowerShell, Batch, Bash, Swift, Kotlin (no tree-sitter coverage).
- yaml-parser: declare `kubernetes`, `docker-compose`, `github-actions`,
`openapi` languages so files the language-registry tags with those
ids actually get section extraction. Recognize quoted top-level keys
(e.g. `"on":` in GitHub Actions). Emit one section per entry for
array-root YAML documents.
- json-parser: declare `json-schema`, `openapi`; add `stripJsoncSyntax`
helper that removes line / block comments and trailing commas before
parse so `.jsonc` files (wrangler, tsconfig with comments) parse cleanly.
- shell-parser: declare `jenkinsfile`. Tighten function-detection regex
to require a reachable `{` brace so `name() echo hi` and patterns
appearing inside heredocs are no longer false-positives.
- markdown-parser: track fenced-code-block state and skip headings
inside ``` / ~~~ blocks (`# install` shell comments were being
emitted as level-1 sections).
- merge-batch-graphs.py: add `article`, `entity`, `topic`, `claim`,
`source` to VALID_NODE_PREFIXES and TYPE_TO_PREFIX so knowledge-base
node types stop being flagged unknown / coerced to `file:`. Add
`direction` to the edge dedup key so `forward` and `bidirectional`
variants of the same (src, tgt, type) don't overwrite each other.
Use a placeholder in bare-id fallback when `filePath` is missing on
function/class nodes so unrelated `parse()` functions don't merge.
- typescript-extractor: actually compute `isDefault` for default
exports (was always emitted as `false` from buildResult).
- extract-structure.mjs: match `wc -l` semantics for `totalLines` so
the scanner's `sizeLines` and the extractor's `totalLines` agree on
POSIX text files. Filter the parser-imports fallback to relative-only
so `importCount` semantics stay *internal-import* whether the scanner
resolved them or not. Drop unused `isCode` local.
Tests: +19 cases covering JSONC parsing, markdown fenced-code skip,
YAML quoted-keys / array-root, shell function false-positives,
extract-structure import fallback semantics + totalLines off-by-one.
764 passing (was 745).
Bumps version to 2.6.2 across the five tracked manifests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Understand Anything
Turn any codebase, knowledge base, or docs into an interactive knowledge graph you can explore, search, and ask questions about.
Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español | Türkçe
💬 Join the Discord community →
Ask questions, share what you've built, get help from the community.
Tip
A huge thank you to the community! The support for Understand-Anything has been incredible. If this tool saves you a few minutes of digging through complexity, that's all I wanted. 🚀
You just joined a new team. The codebase is 200,000 lines of code. Where do you even start?
Understand Anything is a Claude Code Plugin that analyzes your project with a multi-agent pipeline, builds a knowledge graph of every file, function, class, and dependency, then gives you an interactive dashboard to explore it all visually. Stop reading code blind. Start seeing the big picture.
Graphs that teach > graphs that impress.
✨ Features
Note
Want to skip the reading? Try the live demo in our homepage — a fully interactive dashboard you can pan, zoom, search, and explore right in your browser.
Explore the structural graph
Navigate your codebase as an interactive knowledge graph — every file, function, and class is a node you can click, search, and explore. Select any node to see plain-English summaries, relationships, and guided tours.
Understand business logic
Switch to the domain view and see how your code maps to real business processes — domains, flows, and steps laid out as a horizontal graph.
Analyze knowledge bases
Point /understand-knowledge at a Karpathy-pattern LLM wiki and get a force-directed knowledge graph with community clustering. The deterministic parser extracts wikilinks and categories from index.md, then LLM agents discover implicit relationships, extract entities, and surface claims — turning your wiki into a navigable graph of interconnected ideas.
🧭 Guided ToursAuto-generated walkthroughs of the architecture, ordered by dependency. Learn the codebase in the right order. |
🔍 Fuzzy & Semantic SearchFind anything by name or by meaning. Search "which parts handle auth?" and get relevant results across the graph. |
📊 Diff Impact AnalysisSee which parts of the system your changes affect before you commit. Understand ripple effects across the codebase. |
🎭 Persona-Adaptive UIThe dashboard adjusts its detail level based on who you are — junior dev, PM, or power user. |
🏗️ Layer VisualizationAutomatic grouping by architectural layer — API, Service, Data, UI, Utility — with color-coded legend. |
📚 Language Concepts12 programming patterns (generics, closures, decorators, etc.) explained in context wherever they appear. |
🚀 Quick Start
1. Install the plugin
/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything
2. Analyze your codebase
/understand
A multi-agent pipeline scans your project, extracts every file, function, class, and dependency, then builds a knowledge graph saved to .understand-anything/knowledge-graph.json.
3. Explore the dashboard
/understand-dashboard
An interactive web dashboard opens with your codebase visualized as a graph — color-coded by architectural layer, searchable, and clickable. Select any node to see its code, relationships, and a plain-English explanation.
4. Keep learning
# Ask anything about the codebase
/understand-chat How does the payment flow work?
# Analyze impact of your current changes
/understand-diff
# Deep-dive into a specific file or function
/understand-explain src/auth/login.ts
# Generate an onboarding guide for new team members
/understand-onboard
# Extract business domain knowledge (domains, flows, steps)
/understand-domain
# Analyze a Karpathy-pattern LLM wiki knowledge base
/understand-knowledge ~/path/to/wiki
🌐 Multi-Platform Installation
Understand-Anything works across multiple AI coding platforms.
Claude Code (Native)
/plugin marketplace add Lum1104/Understand-Anything
/plugin install understand-anything
One-line install (Codex / OpenCode / OpenClaw / Antigravity / Gemini CLI / Pi Agent / VS Code Copilot)
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash
# or skip the prompt by passing the platform:
curl -fsSL https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.sh | bash -s codex
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/Lum1104/Understand-Anything/main/install.ps1 | iex
The installer clones the repo to ~/.understand-anything/repo and creates the right symlinks for the chosen platform. Restart your CLI/IDE afterwards.
- Supported
<platform>values:gemini,codex,opencode,pi,openclaw,antigravity,vscode - Update later:
./install.sh --update - Uninstall:
./install.sh --uninstall <platform>
Cursor
Cursor auto-discovers the plugin via .cursor-plugin/plugin.json when this repo is cloned. No manual installation needed — just clone and open in Cursor.
VS Code + GitHub Copilot
VS Code with GitHub Copilot (v1.108+) auto-discovers the plugin via .copilot-plugin/plugin.json when this repo is cloned. No manual installation needed — just clone and open in VS Code.
For personal skills (available across all projects), run the install.sh above with the vscode platform.
Copilot CLI
copilot plugin install Lum1104/Understand-Anything:understand-anything-plugin
Platform Compatibility
| Platform | Status | Install Method |
|---|---|---|
| Claude Code | ✅ Native | Plugin marketplace |
| Cursor | ✅ Supported | Auto-discovery |
| VS Code + GitHub Copilot | ✅ Supported | Auto-discovery |
| Copilot CLI | ✅ Supported | Plugin install |
| Codex | ✅ Supported | install.sh codex |
| OpenCode | ✅ Supported | install.sh opencode |
| OpenClaw | ✅ Supported | install.sh openclaw |
| Antigravity | ✅ Supported | install.sh antigravity |
| Gemini CLI | ✅ Supported | install.sh gemini |
| Pi Agent | ✅ Supported | install.sh pi |
📦 Share the Graph with Your Team
The graph is just JSON — commit it once, and teammates skip the pipeline. Good for onboarding, PR reviews, and docs-as-code.
Example: GoogleCloudPlatform/microservices-demo (fork) — Go / Java / Python / Node reference with a committed graph.
What to commit: everything in .understand-anything/ except intermediate/ and diff-overlay.json (those are local scratch).
.understand-anything/intermediate/
.understand-anything/diff-overlay.json
Keep it fresh: enable /understand --auto-update — a post-commit hook incrementally patches the graph so each commit lands with a matching graph. Or re-run /understand manually before releases.
Large graphs (10 MB+): track with git-lfs.
git lfs install
git lfs track ".understand-anything/*.json"
git add .gitattributes .understand-anything/
🔧 Under the Hood
Multi-Agent Pipeline
The /understand command orchestrates 5 specialized agents, and /understand-domain adds a 6th:
| Agent | Role |
|---|---|
project-scanner |
Discover files, detect languages and frameworks |
file-analyzer |
Extract functions, classes, imports; produce graph nodes and edges |
architecture-analyzer |
Identify architectural layers |
tour-builder |
Generate guided learning tours |
graph-reviewer |
Validate graph completeness and referential integrity (runs inline by default; use --review for full LLM review) |
domain-analyzer |
Extract business domains, flows, and process steps (used by /understand-domain) |
article-analyzer |
Extract entities, claims, and implicit relationships from wiki articles (used by /understand-knowledge) |
File analyzers run in parallel (up to 5 concurrent, 20-30 files per batch). Supports incremental updates — only re-analyzes files that changed since the last run.
🤝 Contributing
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Run the tests (
pnpm --filter @understand-anything/core test) - Commit your changes and open a pull request
Please open an issue first for major changes so we can discuss the approach.
Stop reading code blind. Start understanding everything.
Star History
MIT License © Lum1104


