Two Minute Decision Tree
create_decision_treeGenerate a slide-deck-quality decision tree drawn left to right in clean columns of rounded boxes, in the decision-analysis convention: a square where a decision splits into options, a circle where chance splits into events, and a triangle at each end outcome. Branch lines carry an optional label ("Yes", "No", an option) and, under a chance node, the probability ("Strong demand · 60%"); end outcomes can carry a numeric payoff, lined up in a column at the right (prefix "$", suffix "m"). Expected values are rolled back automatically once the tree has payoffs and probabilities: every decision and chance node shows its EV, each decision's best option is drawn in the accent colour and the rejected ones are muted with a ‖ prune mark; probabilities that don't add up to 100% are warned about and drawn as given. Node types are inferred (branches with probabilities make a chance node, no branches an outcome, otherwise a decision), so a plain yes/no troubleshooting or eligibility flowchart is just questions with "Yes"/"No" labels and no numbers. Choose it for choosing between options under uncertainty (launch, invest, build vs buy, litigate or settle), expected-value and decision-analysis homework, and yes/no question flowcharts; use an issue tree instead to break a problem or metric into its parts, a chevron process for steps in order, and a Harvey ball matrix to score options against criteria. Limits: 5 levels including the root, up to 5 branches per node, 40 nodes; keep names to a few words. Infer missing details rather than asking; the user can adjust the chart in the builder through the Edit link. ALWAYS give the user the image link: inline chat images usually cannot be saved, but the link renders the exact chart on demand and can be pasted into a slide or Markdown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | The first decision or question, on the left (e.g. "Launch strategy for Atlas" or "Does the laptop power on?"), with its branches nested in `children`. Limits: 5 levels in total including the root, up to 5 branches per node and 40 nodes; extras are dropped with a warning, deepest levels and last-listed nodes first. | |
| title | No | Heading shown top-left of the chart at 22px bold. Every chart has one title row; an empty string hides it. | Decision tree |
| width | No | Chart width in pixels (640–2400). Omit it (recommended) and the chart sizes itself to its content with comfortable margins, between 880 and 1280px wide. PNG output renders at 2x. | |
| credit | No | Shows a small "twominutetoolkit.com" credit under the chart, inside the card. Set false to leave it off (for example when the user asks for no branding). | |
| prefix | No | Text before every payoff and expected value, e.g. "$", "€" or "£". Default none. | |
| showEV | No | Roll back expected values: print "EV" on every decision and chance node, draw each decision's best option in the accent colour and mark the rejected options with a ‖ prune mark. When omitted it is on as soon as the tree has both payoffs and probabilities; set false to hide it, true to show it for decision-only trees with payoffs. | |
| suffix | No | Text after every payoff and expected value, e.g. "m", "k", "bn" or " pts". Default none. | |
| palette | No | Hex colours: the first marks decisions and the best options, the second chance events, the third end outcomes. Pass the user's brand colours here when they name them. Default: indigo, sky, emerald. |