跳到主要内容
知仓学习社ZHICANG

decision-tree-solver

Turn a fork-in-the-road decision into a computed expected-value tree — settle or sue, launch or wait, fix or replace — rolled back by the bundled sc…

不碰外部(只输出文字)无严重或高危命中mohitagw15856/pm-claude-skills

它会碰到什么

扫了多少2 个文本文件,13 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Decision Tree Solver

"Should we settle or go to trial" is not answered by instinct or by whoever argues longest — it is three numbers and a probability, and most people have never actually multiplied them. This skill extracts the tree hiding inside a messy decision (the choices, the chances, the payoffs, the costs of playing), computes the rollback with the bundled script, and — the part instinct can never do — finds the break-even: the probability at which the recommendation flips. Because "trial is worth it if you win 60% of the time" is an opinion, but "the answer flips at 90% — are you more than 90% sure?" is a decision made tractable. The script is deterministic, stdlib-only, and shows its arithmetic.

What This Skill Produces

  • The extracted tree — decisions, chance nodes with probabilities, outcomes with values, and the costs of each path, pulled from the situation as described
  • The rollback — expected value at every node, the best choice named at every fork, from the script
  • The break-even scan — for each two-way uncertainty, the probability at which the top-level choice flips, which is the number that makes probability arguments productive
  • The robustness read — whether the answer survives the probabilities being argued about, or hinges on a number nobody can defend
  • The leaves-out list — what expected value cannot see here: risk appetite, one-shot vs repeated, the unquantified costs

Required Inputs

Ask for these if not provided:

  • The choices — the real options on the table, including the do-nothing one
  • The uncertainties — what could happen under each choice, and the requester's honest probability for each (pushing back on false precision is part of the job)
  • The payoffs and costs — the money (or a stated proxy) at each end point, and what each path costs to walk: fees, time priced honestly, deposits
  • The stakes context — one-shot or repeatable, and whether the worst branch is survivable — because expected value is the right tool for repeatable bets and needs a caveat for ruinous one-shots

Framework: Extract, Roll Back, Stress the Probabilities

  1. Extract before computing. The tree is usually mis-drawn before it is mis-computed: options that are really the same option, a "risk" that is actually two sequential risks, a payoff that forgot the cost of getting it. Draw it in the script's JSON, read it back to the requester, fix it there.
  2. Run the rollback.
   python3 scripts/decision_tree.py --input tree.json          # tree with EVs and best choices
   python3 scripts/decision_tree.py --input tree.json --json   # machine-readable
   python3 scripts/decision_tree.py --demo                     # settle-vs-trial worked example

Outcomes carry values; chance nodes take probability-weighted sums; decisions take the best child; costs subtract along the way. The best path falls out, with the arithmetic visible.

  1. Read the break-even before the recommendation. The scan reports where the choice flips. A decision that holds from p=0.3 to p=0.9 is robust and the probability argument can stop; one that flips at 0.55 when the room believes 0.5-to-0.6 is the argument itself, now named precisely.
  2. Stress the values too. Nudge the big payoffs ±30% and rerun. An answer that survives sloppy values and sloppy probabilities is a real answer; one that does not is a request for better information, and the tree shows exactly which information.
  3. Say what EV cannot see. A 10% chance of ruin is not "priced in" by multiplication for someone who cannot survive it once; reputational and relationship costs sit outside the tree unless explicitly valued. The recommendation carries these as words, not silently.

Output Format

Decision tree: [the decision] · [date]

The tree (as computed — from decision_tree.py)

[rendered tree: choices ▣, chances ◔, outcomes •, EV at every node, best marked]

Recommendation: [the best path] · EV [amount] vs next-best [amount]

Break-even scan

| Uncertainty | Flips the choice at | You believe | Verdict |

|---|---|---|---|

| [chance node] | p ≈ [x] | [their estimate] | robust / hinges here |

Value stress: [the payoffs nudged ±30% — held / flipped, and on which number]

What the numbers leave out: [ruin risk on the worst branch · one-shot vs repeated framing · the unpriced costs, named]

> Decision support, not legal, financial, or any other advice. The probabilities are the requester's own beliefs made explicit — the tree cannot make them true, only make their consequences consistent.

Quality Checks

  • [ ] The tree was read back and corrected before anything was computed
  • [ ] Every path's costs are on the path, not forgotten at the leaves
  • [ ] The break-even scan appears and is compared against the requester's stated belief
  • [ ] Values were stressed, not just probabilities
  • [ ] The leaves-out list names ruin risk explicitly when the worst branch is severe
  • [ ] The recommendation states robustness, not just the EV winner

Anti-Patterns

  • Computing the mis-drawn tree. Ten minutes of extraction beats any amount of arithmetic on the wrong structure.
  • False precision in probabilities. "About 60%" is honest; "62.5%" from nowhere is decoration — the break-even scan is the cure, since it shows whether the difference even matters.
  • EV-maximising a ruinous one-shot. The tool's cleanest failure mode; the caveat is mandatory, not optional.
  • Hiding the arithmetic. The script prints every node's EV because a recommendation nobody can check convinces nobody who matters.
  • Letting the tree end the conversation. It ends the circular part; the values conversation it surfaces is the productive one.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 1,367
本站分层T1
该仓技能数3611
原文件路径plugins/pm-calculators/skills/decision-tree-solver/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 3611 个技能

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 decision-tree-solver 的技能。它们内容并不相同,别混用: