# dev3h/understand-anything architecture

> Architecture diagram of the GitHub repository dev3h/understand-anything, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dev3h/understand-anything
- Repository: https://github.com/dev3h/understand-anything

## Overview

Understand Anything analyzes codebases and knowledge bases into explorable graphs, then supports learning, search, and change analysis. The main path is project analysis → graph generation → dashboard exploration; domain and wiki analysis are distinct branches. The graph preserves README-documented capabilities, while source-level edges are limited to relationships visible in the excerpts or SOURCE INDEX. Several skill and core internals were not sampled, so their detailed calls are not inferred.

Main entry points: [`understand-anything-plugin/skills/understand/scan-project.mjs`](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/scan-project.mjs) (Analyze project), [`understand-anything-plugin/packages/dashboard/src/App.tsx`](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/App.tsx) (Dashboard shell), [`understand-anything-plugin/skills/understand/extract-structure.mjs`](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/extract-structure.mjs) (Structure extraction), [`understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts`](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts) (Graph construction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Project analysis"]
  node_understand["Analyze project<br/>[scan-project.mjs]"]
  node_structure["Structure extraction"]
  node_imports["Dependency extraction"]
  node_extractors["Language extractors"]
  node_parsers["Config parsers"]
end

subgraph group_graph["Graph intelligence"]
  node_graphbuilder["Graph construction<br/>[graph-builder.ts]"]
  node_llmanalyzer["LLM analysis<br/>[llm-analyzer.ts]"]
  node_graphstore[("Knowledge graph")]
  node_layers["Layers and tours<br/>[layer-detector.ts]"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["Dashboard shell<br/>[App.tsx]"]
  node_graphviews["Graph views<br/>[GraphView.tsx]"]
  node_domainview["Domain view"]
  node_knowledgeview["Knowledge graph view"]
  node_state["Dashboard state and search<br/>[store.ts]"]
  node_inspection["Code and node inspection<br/>[CodeViewer.tsx]"]
end

subgraph group_learning["Learning tools"]
  node_context["Chat context<br/>[context-builder.ts]"]
  node_chat["Ask about code<br/>[understand-chat.ts]"]
  node_diff["Diff impact analysis<br/>[diff-analyzer.ts]"]
  node_explain["Component explanations<br/>[explain-builder.ts]"]
  node_onboard["Onboarding guide<br/>[onboard-builder.ts]"]
end

subgraph group_knowledge["Knowledge analysis"]
  node_wiki["Wiki analysis"]
  node_domain["Domain extraction"]
end

node_developer(("Developer"))

node_developer -->|"analyzes project"| node_understand
node_understand -->|"extracts structure"| node_structure
node_understand -->|"extracts dependencies"| node_imports
node_structure -.->|"uses language plugins"| node_extractors
node_structure -.->|"uses config parsers"| node_parsers
node_understand -->|"builds graph"| node_graphbuilder
node_graphbuilder -.->|"enriches analysis"| node_llmanalyzer
node_graphbuilder -->|"writes graph"| node_graphstore
node_understand -->|"generates tours and layers"| node_layers
node_developer -->|"opens dashboard"| node_dashboard
node_dashboard -->|"renders structural graph"| node_graphviews
node_dashboard -->|"renders domain graph"| node_domainview
node_dashboard -->|"renders knowledge graph"| node_knowledgeview
node_dashboard -->|"reads and updates"| node_state
node_state -.->|"loads graph"| node_graphstore
node_state -.->|"supplies selected node"| node_inspection
node_developer -->|"analyzes wiki"| node_wiki
node_wiki -->|"produces knowledge graph"| node_graphstore
node_developer -->|"extracts business domains"| node_domain
node_developer -->|"asks a question"| node_chat
node_chat -->|"builds relevant context"| node_context
node_context -.->|"searches graph"| node_graphstore
node_developer -->|"requests impact analysis"| node_diff
node_developer -->|"requests deep dive"| node_explain
node_developer -->|"requests onboarding guide"| node_onboard

click node_understand "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/scan-project.mjs"
click node_structure "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/extract-structure.mjs"
click node_imports "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/extract-import-map.mjs"
click node_extractors "https://github.com/dev3h/understand-anything/tree/main/understand-anything-plugin/packages/core/src/plugins/extractors"
click node_parsers "https://github.com/dev3h/understand-anything/tree/main/understand-anything-plugin/packages/core/src/plugins/parsers"
click node_graphbuilder "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts"
click node_llmanalyzer "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/llm-analyzer.ts"
click node_layers "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/layer-detector.ts"
click node_dashboard "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/App.tsx"
click node_graphviews "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx"
click node_domainview "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/DomainGraphView.tsx"
click node_knowledgeview "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/KnowledgeGraphView.tsx"
click node_state "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/store.ts"
click node_inspection "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx"
click node_wiki "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand-knowledge/parse-knowledge-base.py"
click node_domain "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand-domain/extract-domain-context.py"
click node_context "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/context-builder.ts"
click node_chat "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/understand-chat.ts"
click node_diff "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/diff-analyzer.ts"
click node_explain "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/explain-builder.ts"
click node_onboard "https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/onboard-builder.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_understand,node_structure,node_imports,node_extractors,node_parsers toneBlue
class node_graphbuilder,node_llmanalyzer,node_graphstore,node_layers toneAmber
class node_dashboard,node_graphviews,node_domainview,node_knowledgeview,node_state,node_inspection toneMint
class node_context,node_chat,node_diff,node_explain,node_onboard toneRose
class node_wiki,node_domain,node_developer toneIndigo
```

## Components

### Project analysis

- [Analyze project](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/scan-project.mjs): `understand-anything-plugin/skills/understand/scan-project.mjs`
- [Structure extraction](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/extract-structure.mjs): `understand-anything-plugin/skills/understand/extract-structure.mjs`
- [Dependency extraction](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand/extract-import-map.mjs): `understand-anything-plugin/skills/understand/extract-import-map.mjs`
- [Language extractors](https://github.com/dev3h/understand-anything/tree/main/understand-anything-plugin/packages/core/src/plugins/extractors): `understand-anything-plugin/packages/core/src/plugins/extractors`
- [Config parsers](https://github.com/dev3h/understand-anything/tree/main/understand-anything-plugin/packages/core/src/plugins/parsers): `understand-anything-plugin/packages/core/src/plugins/parsers`

### Graph intelligence

- [Graph construction](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts): `understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts`
- [LLM analysis](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/llm-analyzer.ts): `understand-anything-plugin/packages/core/src/analyzer/llm-analyzer.ts`
- **Knowledge graph**
- [Layers and tours](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/core/src/analyzer/layer-detector.ts): `understand-anything-plugin/packages/core/src/analyzer/layer-detector.ts`

### Dashboard

- [Dashboard shell](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/App.tsx): `understand-anything-plugin/packages/dashboard/src/App.tsx`
- [Graph views](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx): `understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx`
- [Domain view](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/DomainGraphView.tsx): `understand-anything-plugin/packages/dashboard/src/components/DomainGraphView.tsx`
- [Knowledge graph view](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/KnowledgeGraphView.tsx): `understand-anything-plugin/packages/dashboard/src/components/KnowledgeGraphView.tsx`
- [Dashboard state and search](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/store.ts): `understand-anything-plugin/packages/dashboard/src/store.ts`
- [Code and node inspection](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx): `understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx`

### Learning tools

- [Chat context](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/context-builder.ts): `understand-anything-plugin/src/context-builder.ts`
- [Ask about code](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/understand-chat.ts): `understand-anything-plugin/src/understand-chat.ts`
- [Diff impact analysis](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/diff-analyzer.ts): `understand-anything-plugin/src/diff-analyzer.ts`
- [Component explanations](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/explain-builder.ts): `understand-anything-plugin/src/explain-builder.ts`
- [Onboarding guide](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/src/onboard-builder.ts): `understand-anything-plugin/src/onboard-builder.ts`

### Knowledge analysis

- [Wiki analysis](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand-knowledge/parse-knowledge-base.py): `understand-anything-plugin/skills/understand-knowledge/parse-knowledge-base.py`
- [Domain extraction](https://github.com/dev3h/understand-anything/blob/main/understand-anything-plugin/skills/understand-domain/extract-domain-context.py): `understand-anything-plugin/skills/understand-domain/extract-domain-context.py`

### Other components

- **Developer**

## Connections

- Developer → Analyze project: analyzes project (evidence: `README.md`)
- Analyze project → Structure extraction: extracts structure (evidence: `README.md`)
- Analyze project → Dependency extraction: extracts dependencies (evidence: `README.md`)
- Structure extraction → Language extractors: uses language plugins
- Structure extraction → Config parsers: uses config parsers
- Analyze project → Graph construction: builds graph (evidence: `README.md`)
- Graph construction → LLM analysis: enriches analysis
- Graph construction → Knowledge graph: writes graph (evidence: `README.md`)
- Analyze project → Layers and tours: generates tours and layers (evidence: `README.md`)
- Developer → Dashboard shell: opens dashboard (evidence: `README.md`)
- Dashboard shell → Graph views: renders structural graph (evidence: `understand-anything-plugin/packages/dashboard/src/App.tsx`)
- Dashboard shell → Domain view: renders domain graph (evidence: `understand-anything-plugin/packages/dashboard/src/App.tsx`)
- Dashboard shell → Knowledge graph view: renders knowledge graph (evidence: `understand-anything-plugin/packages/dashboard/src/App.tsx`)
- Dashboard shell → Dashboard state and search: reads and updates (evidence: `understand-anything-plugin/packages/dashboard/src/App.tsx`)
- Dashboard state and search → Knowledge graph: loads graph
- Dashboard state and search → Code and node inspection: supplies selected node (evidence: `understand-anything-plugin/packages/dashboard/src/components/CodeViewer.tsx`)
- Developer → Wiki analysis: analyzes wiki (evidence: `README.md`)
- Wiki analysis → Knowledge graph: produces knowledge graph (evidence: `README.md`)
- Developer → Domain extraction: extracts business domains (evidence: `README.md`)
- Developer → Ask about code: asks a question (evidence: `README.md`)
- Ask about code → Chat context: builds relevant context (evidence: `understand-anything-plugin/src/understand-chat.ts`)
- Chat context → Knowledge graph: searches graph
- Developer → Diff impact analysis: requests impact analysis (evidence: `README.md`)
- Developer → Component explanations: requests deep dive (evidence: `README.md`)
- Developer → Onboarding guide: requests onboarding guide (evidence: `README.md`)
