clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

main
diagramzip / apps / docs / static / skills / decision-tree / SKILL.md
SKILL.md 1.8K rendered
1---2name: decision-tree3description: Use when the user needs to show a sequence of choices, branching rules, outcomes, or diagnostic paths.4---56# Decision tree78## What / why910A decision tree tells the story “which question or rule leads to which next branch and outcome?” It is for explicit branching logic, not a general process or arbitrary hierarchy.1112## How to model1314- Start with one entry condition and make each decision node a question or predicate.15- Label every outgoing edge with understandable, mutually exclusive conditions; include the default/else branch.16- Keep outcomes distinct from subsequent decisions and identify terminal nodes.17- State precedence, probability, owner, or evidence when decisions depend on them.18- If rules are complex, separate the readable tree from the authoritative decision table.1920## Styling and customization2122Use diamonds or clearly differentiated decision nodes, rounded/colored terminal outcomes, and directional flow. Keep branch labels near edges and avoid color-only meaning. Use line styles for confidence or exception paths only with a legend.2324## Renderer choices2526Preserve the user’s renderer. Mermaid flowcharts, Graphviz, D2, PlantUML activity diagrams, and diagrams.net can render decision trees. diagram.zip does not implement DMN decision requirements diagrams or FEEL evaluation; that is an unsupported integration opportunity. Use BPMN when the user needs formal process events/tasks, not merely branching.2728## Review2930Trace every path from entry to outcome. Check branch completeness, overlap, unreachable nodes, contradictory predicates, and whether visual order matches evaluation order. Call out any informal rule that needs DMN or a decision table.3132## Prior art and gaps3334See [references/prior-art.md](references/prior-art.md).