jessa

Living, writing, learning

I asked Claude to build me a decision-tree tool (and it actually worked)

While I was overwhelmed by housing options, making a decision felt impossible, improbable. Yes, you’d call it decision paralysis. With so many variables to consider (like cost, distance from uni, and commute accessibility), my mind couldn’t keep track of what weighed more. Having too many options made me think of this quote:

Every choice murders an infinite number of potential futures.

How to Live Without Options – and Why It’s the Key to Happiness by Joan Westenberg

While I was letting the emotions drown me and wash the sense out of me, I suddenly snapped out of it, with my inner voice telling me that I needed to map out my decision-making process. Just then, I remembered the concept of decision trees from when I was taking EgyE 231 Energy Economics and Systems Evaluation during my master’s.

Inspired, I asked Claude Code to create a decision-tree builder that let me tweak the inputs and their weights using this prompt:

design a decision tree tool which I can edit the variables depending on the decision i want to make. and the tool should be something i can open via browser and improve the ui using claude design

I set Claude to Sonnet 4.6 on high effort with thinking enabled—basically asking Claude to slow down and actually reason through it.

And then, I asked Claude to add more features:

can there be a section where the variables are explained to make them user friendly? because if i use it without foreknowledge of what a decision tree is, i might be discouraged to use it

So here’s what it created:

After Claude summarized all the additional edits for me to review, I felt like I had a programming assistant always willing to participate in my pet projects. For reference, here’s what Claude told me:

? Guide button (toolbar, purple-outlined) — opens a full reference modal with:

  • Plain-language explanation of what a decision tree is
  • Each node type (Decision / Chance / Outcome) explained with a real-world example
  • How Expected Value is calculated, with a worked example
  • How Multi-Criteria scoring works, with weights and scores explained
  • A probability quick-reference (0 = impossible, 1 = certain)
  • A numbered step-by-step walkthrough for building your first tree

Inline hints throughout the editor panel:

  • Below the EV number — what it represents
  • Below “Node Type” — one-line explanation of each type
  • Below “Payoff Value” — clarifies it can be money, a score, yield, anything consistent
  • Below “Probability” — the 0/0.5/1 reference, plus the must-total-1.0 reminder
  • Below “Criterion Scores” — confirms 1 = worst, 10 = best
  • Below “Branches” — what a branch is
  • Below “Add Branch” — guidance on which type to choose

While Claude did create a self-contained HTML tool that you can open directly in any browser, I did not find it appealing to use (as I initially expected), and so I asked Claude Design to help me out using this prompt:

update decision-tree.html such that the UI looks appealing for users who are new to the decision tree concept. the text/font should be readable.  UI could be minimal but icons that would increase engagement might be useful to add.

Claude was set to Opus 4.8 by default and on medium effort.

Claude also asked me some clarification questions, which added more depth to my request, summarized as follows:

  • onboarding: A welcome/intro state on the empty canvas explaining the basics, An interactive sample tree pre-loaded with a clear example to explore, Inline tips and labels throughout (current guide stays)
  • scope: Full reimagining of the experience
  • icons: Soft filled icons (friendly, rounded)
  • theme: Soft/warm tones (calm, paper-like, low strain)
  • audience: a person who wants to narrow options and come up with a data-backed decision

Satisfied with the improved look, I explored the tool and discovered that the export tool only does JSON format. And so I asked Claude to also add a PDF and image option.

what is the export button for? it downloads the tool in json format. is it helpful to the user? i think what the user needs is the ability to download the decision tree into pdf or image formats.
and what does the import button do?

Claude first explained the export/import functions:

Great questions — and you’re right about what’s more useful. Here’s what they currently do:

  • Export → downloads a .json file of your tree’s data (the structure, labels, values, probabilities). It’s a “save your work” file, not something you’d share or print.
  • Import → loads one of those .json files back in, so you can resume editing a tree you saved earlier (or move it between computers). Useful, but technical.

For your audience, downloadable PNG image and PDF are far more valuable for sharing/printing a finished decision. I’ll add both, keep the JSON save/open as a secondary “back up your work” option, and group them under one clear Export menu.

And then it executed my request.

Here’s the final output:

Explore this free decision-tree builder here.

While I forgot to time the whole process, all it took was less than an hour. And was the project worth it? Definitely! I used it to map out my housing options, and I was finally able to see which alternative is best given my priorities, with data-backed confidence.

Fediverse reactions

Discover more from jessa

Subscribe to get the latest posts sent to your email.

Join 408 other subscribers

Leave a Reply

Discover more from jessa

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from jessa

Subscribe to get the latest posts sent to your email.

Join 408 other subscribers