@understand-anything/core (main entry) and from the @understand-anything/core/types subpath export (browser-safe).
KnowledgeGraph
The root structure produced by the analysis pipeline and stored in.understand-anything/knowledge-graph.json.
Schema version string (e.g.
"1.0.0"). Used for forward-compatibility checks.Metadata about the analyzed project.
Logical groupings of nodes (e.g. “API Layer”, “Data Layer”). May be empty.
Ordered steps for the guided learning tour. May be empty.
GraphNode
Represents a single entity in the codebase — a file, function, class, module, or abstract concept.Stable unique identifier. Follows a namespaced convention:
file:<path>— e.g.file:src/index.tsfunc:<path>:<name>— e.g.func:src/auth.ts:validateTokenclass:<path>:<name>— e.g.class:src/server.ts:HttpServer
The kind of entity this node represents.
Short display name. For file nodes this is the filename; for functions and classes it is the symbol name.
Relative path to the source file. Present on
file, function, and class nodes. Omitted for module and concept nodes.Inclusive start/end line numbers within
filePath. Only present on function and class nodes.LLM-generated plain-English description of what this entity does.
Keyword tags used for search ranking. May be empty for auto-generated nodes.
Estimated complexity level of the entity.
Optional notes about language-specific idioms or patterns. Contributes to fuzzy search with weight
0.1.GraphEdge
A directed relationship between two nodes.id of the originating node.id of the destination node.Directionality of the relationship relative to
source → target.Optional human-readable annotation for the edge.
Strength of the relationship in the range
0–1. Used by graph layout algorithms. Default weights assigned by GraphBuilder:importsedges:0.7callsedges:0.8containsedges:1.0
EdgeType
Union of all 18 possible edge relationship types, organized into 5 semantic categories.| Value | Meaning |
|---|---|
imports | Source file imports the target |
exports | Source exposes the target as a public API |
contains | Source structurally contains the target (e.g. file → function) |
inherits | Source class extends the target class |
implements | Source class implements the target interface |
| Value | Meaning |
|---|---|
calls | Source function invokes the target function |
subscribes | Source subscribes to events or messages from the target |
publishes | Source emits events or messages consumed by the target |
middleware | Source is a middleware layer that wraps the target |
| Value | Meaning |
|---|---|
reads_from | Source reads data produced by the target |
writes_to | Source writes data consumed by the target |
transforms | Source transforms the output of the target |
validates | Source validates the schema or output of the target |
| Value | Meaning |
|---|---|
depends_on | Source requires the target to function |
tested_by | Source is tested by the target |
configures | Source configures or initializes the target |
| Value | Meaning |
|---|---|
related | Source and target are conceptually related |
similar_to | Source and target serve a similar purpose |
Layer
A logical grouping of nodes used to represent architectural layers in the dashboard.Stable unique identifier for the layer.
Display name (e.g.
"API Layer", "Data Access Layer").LLM-generated description of the layer’s responsibility.
Array of
GraphNode.id values belonging to this layer.TourStep
One step in the guided onboarding tour, used by the Learn persona in the dashboard.1-based position of this step in the tour sequence.
Short title displayed in the learn panel.
Explanation of what the user should understand at this step.
Nodes highlighted in the graph when this step is active.
Optional language-specific lesson content (Markdown). Present when the step focuses on a language idiom.
ProjectMeta
AnalysisMeta
Persistence metadata written alongside the graph. Not part ofKnowledgeGraph itself.
ISO 8601 timestamp of the most recent analysis.
Git commit SHA from the most recent analysis run.
Core package version used to produce the stored graph.
Number of files included in the analysis.