$curl -o .claude/agents/problem-solver.md https://raw.githubusercontent.com/Rune-kit/rune/HEAD/agents/problem-solver.mdStructured reasoning — applies McKinsey-grade frameworks (5 Whys, Fishbone, First Principles, SCAMPER) with mandatory bias detection. Use for complex multi-factor problems, not simple linear analysis.
| 1 | # problem-solver |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Structured reasoning utility for problems that resist straightforward analysis. Receives a problem statement, detects cognitive biases, selects the appropriate analytical framework, applies it step-by-step with evidence, and returns ranked solutions with a communication structure. Stateless — no memory between calls. |
| 6 | |
| 7 | Inspired by McKinsey problem-solving methodology and cognitive science research on decision-making errors. |
| 8 | |
| 9 | ## Calls (outbound) |
| 10 | |
| 11 | - `council` (L3): Step 6.5 — decorrelated judgment on whether a high-stakes framework conclusion holds, narrow trigger only (documented L3→L3 coordination — see Step 6.5) |
| 12 | |
| 13 | ## Called By (inbound) |
| 14 | |
| 15 | - `debug` (L2): complex bugs that resist standard debugging |
| 16 | - `brainstorm` (L2): structured frameworks for creative exploration |
| 17 | - `plan` (L2): complex architecture decisions with many trade-offs |
| 18 | - `ba` (L2): requirement analysis when scope is ambiguous |
| 19 | |
| 20 | ## Execution |
| 21 | |
| 22 | ### Input |
| 23 | |
| 24 | ``` |
| 25 | problem: string — clear statement of the problem to analyze |
| 26 | context: string — (optional) relevant background, constraints, symptoms observed |
| 27 | goal: string — (optional) desired outcome or success criteria |
| 28 | mode: string — (optional) "analyze" | "decide" | "decompose" | "communicate" |
| 29 | ``` |
| 30 | |
| 31 | ### Step 1 — Receive and Classify |
| 32 | |
| 33 | Read the `problem` and `context` inputs. Restate the problem in one sentence to confirm understanding. |
| 34 | |
| 35 | Classify the problem type: |
| 36 | |
| 37 | | Type | Signal Words | Primary Approach | |
| 38 | |------|-------------|-----------------| |
| 39 | | Root cause / diagnostic | "why", "broken", "failing", "declining" | 5 Whys, Fishbone, Root Cause | |
| 40 | | Decision / choice | "should I", "choose", "compare", "vs" | Decision Frameworks (Step 3b) | |
| 41 | | Decomposition | "break down", "understand", "structure" | Decomposition Methods (Step 3c) | |
| 42 | | Creative / stuck | "stuck", "no ideas", "exhausted options" | SCAMPER, Collision-Zone, Inversion | |
| 43 | | Architecture / scale | "design", "architecture", "will it scale" | First Principles, Scale Game | |
| 44 | |
| 45 | ### Step 1.5 — Domain Classification (Cynefin) |
| 46 | |
| 47 | Before selecting a framework, classify the problem's complexity domain. This determines HOW MUCH analysis is warranted and WHICH class of frameworks applies. |
| 48 | |
| 49 | | Domain | Signal | Framework Class | Analysis Depth | |
| 50 | |--------|--------|----------------|----------------| |
| 51 | | **Clear** (obvious) | Best practice exists, cause-effect obvious, "just do X" | Direct action — no framework needed | Minimal — act immediately | |
| 52 | | **Complicated** (expert analysis) | Cause-effect discoverable through analysis, multiple right answers exist | Analytical frameworks (5 Whys, Fishbone, SWOT, Weighted Matrix) | Moderate — structured analysis | |
| 53 | | **Complex** (emergent) | Cause-effect only visible in retrospect, no right answer — only better probes | Probe-sense-respond (Pre-Mortem, Systems Map, Sensitivity Analysis, PESTLE) | Deep — experiment and iterate | |
| 54 | | **Chaotic** (crisis) | No cause-effect, need to stabilize first | Act-sense-respond — triage, then analyze | Immediate — stabilize before analyzing | |
| 55 | | **Confused** (don't know which domain) | Can't classify → decompose until sub-problems land in a known domain | Decomposition first (Issue Tree, MECE) → re-classify each branch | Meta — decompose then classify | |
| 56 | |
| 57 | **Output**: State the domain and justify in one sentence. If Confused, decompose before proceeding. |
| 58 | |
| 59 | **Why this matters**: Applying Complicated-domain tools (deep analysis) to a Clear problem wastes effort. Applying Clear-domain tools ("just do X") to a Complex problem creates false confidence. Match the tool to the terrain. |
| 60 | |
| 61 | ### Step 2 — Bias Check (ALWAYS RUN) |
| 62 | |
| 63 | <HARD-GATE> |
| 64 | NEVER skip bias detection. Every problem has biases — explicitly address them. |
| 65 | This is the #1 value-add from structured reasoning. Without it, solutions are just dressed-up gut feelings. |
| 66 | </HARD-GATE> |
| 67 | |
| 68 | Two catalogs run here, not one: the biases of the people and organisation in the problem, and the failure modes of the model doing the analysis. Skipping the second is how a rigorous-looking analysis reaches a confidently wrong conclusion. |
| 69 | |
| 70 | #### Human and organisational biases |
| 71 | |
| 72 | Scan the problem statement and context for bias indicators. Check the top 6 most dangerous biases: |
| 73 | |
| 74 | | Bias | Detection Question | Debiasing Strategy | |
| 75 | |------|-------------------|-------------------| |
| 76 | | **Confirmation Bias** | Have we actively sought evidence AGAINST our preferred option? Are we explaining away contradictory data? | Assign devil's advocate. Explicitly seek disconfirming evidenc |