Hierarchy

A hierarchy diagram represents a tree of labeled nodes connected by parent-child relationships. The view field determines how the tree is rendered.

Fields

FieldRequiredTypeDescription
kindyes"hierarchy"Must be exactly "hierarchy"
viewnostringRendering intent. Auto-selected if omitted.
titlenostringChart title (rendered above the diagram)
effectnostringFishbone view only: spine-end effect label. Falls back to title if omitted.
nodesyesarray of NodeAt least one node required

Node fields

FieldRequiredTypeDescription
labelyesstringDisplay text
idnostringStable identifier for parent references. If set, other nodes reference this node by id, not label.
parentnostringid (preferred) or label of the parent node; omit for root nodes

View values

valueMeaningAuto-selected when
org_chartTop-down tree; exactly one root requiredexactly 1 root node
fishboneCause-and-effect diagram2+ root nodes
mind_mapRadial tree centered on the root nodenever (must be explicit)

Auto-selection: When view is omitted, the engine selects org_chart for exactly one root node, fishbone for two or more root nodes. The CLI emits a warning when view is auto-selected; add an explicit view to suppress it.

View-specific constraints

org_chart: exactly one root node required.
fishbone: 2–20 root nodes (cause categories); effect (or title if effect is omitted) is rendered as the effect label at the right end of the spine. Recommend 8 or fewer root nodes — 9+ cause categories on the same side of the spine may overlap.
mind_map: exactly one root node required. The root is placed at the center; its subtree radiates outward in all directions. Use for learning maps, brainstorm notes, and topic exploration.

Long labels

In the org_chart view a node label that does not fit on one line — even shrunk to 85% of the label size — is wrapped onto the lines the node holds, shrinking toward the theme's minimum label size as needed; only a label that still overflows at that size is truncated with …. Hangul, CJK and other fullwidth characters are measured one em wide.

Example — org_chart view (auto-selected)

Engineering Division Hierarchy: VP Engineering (Backend Team, Frontend Team). Engineering Division VP Engineering Backend Team Frontend Team

Example — fishbone view

Slow Page Load Causes of High Latency: Server (CPU saturation); Network (Bandwidth). High Latency Server CPU saturation Network Bandwidth

Example — mind_map view

Machine Learning Mind map: ML Concepts (Supervised (Classification, Regression), Unsupervised, Reinforce). Machine Learning Supervised Unsupervised Reinforce Classification Regression ML Concepts

Example — org_chart with stable id references

Engineering Team Hierarchy: VP Engineering (Backend Team, Frontend Team). Engineering Team VP Engineering Backend Team Frontend Team

Label capacity

How long a label can be before the engine sets it smaller, wraps it, or cuts it short with "…". Each number is measured by rendering a small reference declaration with a growing label and reading the diagnostics render_detailed returns, so the table always agrees with them. Lengths are in characters written without spaces: Hangul syllables are one em wide, Latin lowercase letters about half that. unchanged is the longest label shown at the usual size on one line; whole is the longest shown without "…". A slot's width depends on its siblings, so read a number as a guide for the reference declaration named in the second column and use declart validate --strict for the declaration itself.

A dash means the engine reports nothing for the slot up to 120 characters. That is not a promise that any length fits: a slot the engine does not fit at all draws a long label past the picture without a warning.

org_chart

SlotMeasured inHangul (unchanged / whole)Latin (unchanged / whole)
nodes[].label (no parent)a root, 2 children7 / 2014 / 38
nodes[].label (parent set)a root, 2 children7 / 2014 / 38

fishbone

SlotMeasured inHangul (unchanged / whole)Latin (unchanged / whole)
nodes[].label (no parent)2 categories, 2 causes9 / 915 / 15
nodes[].label (parent set)2 categories, 2 causes7 / 714 / 14
effect2 categories, 2 causes10 / 1019 / 19

mind_map

SlotMeasured inHangul (unchanged / whole)Latin (unchanged / whole)
nodes[].label (no parent)a root, 2 children6 / 613 / 13
nodes[].label (parent set)a root, 2 children8 / 816 / 16

Schema

What a declaration of this kind may contain, as declart schema and schema() report it. The value lists and counts are the ones the parser checks, and a test holds every field, count and rule to the parser in both directions, so a declaration written to this page parses. The prose above is the explanation; this is the reference.

Without view

Fields

FieldTypeRequiredValues / meaning
kindenumyeshierarchy
viewenumnoorg_chart, fishbone, mind_map
titlestringno
effectstringnofishbone: the label at the end of the spine; falls back to title

nodes — 1 or more elements

FieldTypeRequiredValues / meaning
labelstringyes
idstringnoa short name to refer to the node by
parentreferencenothe id or label of the node above; a node without one is a root

Rules

  • node labels are unique
  • node ids are unique
  • parent names another node's id or label, never the node itself
  • without view: one node without a parent makes an org_chart, more make a fishbone (2 to 20 of them)

org_chart

Fields

FieldTypeRequiredValues / meaning
kindenumyeshierarchy
viewenumnoorg_chart, fishbone, mind_map
titlestringno
effectstringnofishbone: the label at the end of the spine; falls back to title

nodes — 1 or more elements

FieldTypeRequiredValues / meaning
labelstringyes
idstringnoa short name to refer to the node by
parentreferencenothe id or label of the node above; a node without one is a root

Rules

  • node labels are unique
  • node ids are unique
  • parent names another node's id or label, never the node itself
  • exactly one node has no parent (the root)

fishbone

Fields

FieldTypeRequiredValues / meaning
kindenumyeshierarchy
viewenumnoorg_chart, fishbone, mind_map
titlestringno
effectstringnofishbone: the label at the end of the spine; falls back to title

nodes — 1 or more elements

FieldTypeRequiredValues / meaning
labelstringyes
idstringnoa short name to refer to the node by
parentreferencenothe id or label of the node above; a node without one is a root

Rules

  • node labels are unique
  • node ids are unique
  • parent names another node's id or label, never the node itself
  • 2 to 20 nodes have no parent (the cause categories)

mind_map

Fields

FieldTypeRequiredValues / meaning
kindenumyeshierarchy
viewenumnoorg_chart, fishbone, mind_map
titlestringno
effectstringnofishbone: the label at the end of the spine; falls back to title

nodes — 1 or more elements

FieldTypeRequiredValues / meaning
labelstringyes
idstringnoa short name to refer to the node by
parentreferencenothe id or label of the node above; a node without one is a root

Rules

  • node labels are unique
  • node ids are unique
  • parent names another node's id or label, never the node itself
  • exactly one node has no parent (the root)