Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Nodes/get_tree

get_tree

Assemble a canonical tree pattern (ost, okr, user, product, validation, strategy, feature_areas, delivery, architecture, journey, design_system, commercial, north_star, org) from the active product graph, server-side. Returns NESTED data (roots with children) plus structural `gaps` (nodes whose pattern expects children the graph lacks). Walks the pattern type-driven child map over the live graph, so it follows whatever edge wired a parent to a child of the expected type (no hardcoded edge names to drift). Roots at the pattern anchor, falling back through fallback anchors when the anchor has no nodes or reaches nothing, and reports the substitution in `anchor_resolved_from`/`anchor_used`. Rendering stays in the client. Composes with `query`.

Nodesatomic (read-only). Reads the active product only.

Arguments

patternstringrequired

Tree pattern id: ost, okr, user, product, validation, strategy, feature_areas, delivery, architecture, journey, design_system, commercial, north_star, or org.

from_idstringoptional

Explicit root node id; otherwise the pattern canonical anchor.

depthnumberoptional

Max levels (default = the pattern natural depth; max 12).

include_propertiesarrayoptional

Node property keys to inline on each tree node.

max_nodesnumberoptional

Cap on nodes; the tree is summarised (stats.truncated) rather than silently cut (default 400, max 2000).

Returns

Shape
{ pattern, framework_id?, anchor_type, anchor_used, anchor_resolved_from?, roots: TreeNode[], stats: { nodes, levels, truncated }, gaps: [{ node_id, type, title, missing }] }

Structured data, never rendered text.

See Also