@polderlabs/bizar 10.7.0 → 10.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/_shared/AGENT_BASELINE.md +266 -0
- package/.claude/agents/_shared/CLAUDE_TOOLS.md +412 -0
- package/.claude/agents/_shared/SKILLS.md +109 -0
- package/.claude/agents/brand-designer.md +55 -0
- package/.claude/agents/exec-assistant.md +34 -0
- package/.claude/agents/help-desk.md +44 -0
- package/.claude/agents/it-lead.md +53 -0
- package/.claude/agents/knowledge-manager.md +49 -0
- package/.claude/agents/office-coordinator.md +39 -0
- package/.claude/agents/office-greeter.md +53 -0
- package/.claude/agents/office-manager.md +287 -0
- package/.claude/agents/principal-engineer.md +58 -0
- package/.claude/agents/qa-reviewer.md +51 -0
- package/.claude/agents/research-analyst.md +53 -0
- package/.claude/agents/senior-engineer.md +55 -0
- package/.claude/agents/support-tech.md +87 -0
- package/.claude/agents/vp-engineering.md +54 -0
- package/.claude/commands/audit.md +48 -0
- package/.claude/commands/bizar.md +22 -0
- package/.claude/commands/cron.md +36 -0
- package/.claude/commands/explain.md +17 -0
- package/.claude/commands/goal.md +99 -0
- package/.claude/commands/init.md +15 -0
- package/.claude/commands/learn.md +46 -0
- package/.claude/commands/plan.md +35 -0
- package/.claude/commands/plow-through.md +50 -0
- package/.claude/commands/pr-review.md +49 -0
- package/.claude/commands/setup-provider.md +96 -0
- package/.claude/commands/spec.md +47 -0
- package/.claude/commands/sprint.md +43 -0
- package/.claude/commands/tailscale-serve.md +100 -0
- package/.claude/commands/team.md +132 -0
- package/.claude/commands/test.md +62 -0
- package/.claude/commands/validate.md +68 -0
- package/.claude/commands/visual-plan.md +24 -0
- package/.claude/hooks/README.md +108 -0
- package/.claude/hooks/__tests__/pretooluse-editwrite.test.mjs +146 -0
- package/.claude/hooks/__tests__/sessionend-recall.test.mjs +256 -0
- package/.claude/hooks/__tests__/sessionstart-prime.test.mjs +325 -0
- package/.claude/hooks/__tests__/thinking-route.test.mjs +319 -0
- package/.claude/hooks/auto-instinct.sh +81 -0
- package/.claude/hooks/learning-extract.mjs +92 -0
- package/.claude/hooks/post-merge-audit.sh +93 -0
- package/.claude/hooks/posttooluse-editwrite.mjs +91 -0
- package/.claude/hooks/pretooluse-bash.mjs +87 -0
- package/.claude/hooks/pretooluse-editwrite.mjs +117 -0
- package/.claude/hooks/sessionend-recall.mjs +384 -0
- package/.claude/hooks/sessionstart-prime.mjs +278 -0
- package/.claude/hooks/thinking-route.mjs +314 -0
- package/.claude/hooks/worker-suggest.mjs +110 -0
- package/.claude/settings.json +167 -0
- package/.claude/skills/9router/SKILL.md +80 -0
- package/.claude/skills/9router-chat/SKILL.md +73 -0
- package/.claude/skills/9router-embeddings/SKILL.md +69 -0
- package/.claude/skills/9router-image/SKILL.md +86 -0
- package/.claude/skills/9router-stt/SKILL.md +79 -0
- package/.claude/skills/9router-tts/SKILL.md +80 -0
- package/.claude/skills/9router-web-fetch/SKILL.md +99 -0
- package/.claude/skills/9router-web-search/SKILL.md +91 -0
- package/.claude/skills/agent-browser/SKILL.md +64 -0
- package/.claude/skills/bizar/README.md +9 -0
- package/.claude/skills/bizar/SKILL.md +447 -0
- package/.claude/skills/cpp-coding-standards/README.md +28 -0
- package/.claude/skills/cpp-coding-standards/SKILL.md +634 -0
- package/.claude/skills/cpp-coding-standards/references/concurrency.md +320 -0
- package/.claude/skills/cpp-coding-standards/references/error-handling.md +229 -0
- package/.claude/skills/cpp-coding-standards/references/memory-safety.md +216 -0
- package/.claude/skills/cpp-coding-standards/references/modern-idioms.md +282 -0
- package/.claude/skills/cpp-coding-standards/references/review-checklist.md +96 -0
- package/.claude/skills/cpp-testing/README.md +28 -0
- package/.claude/skills/cpp-testing/SKILL.md +304 -0
- package/.claude/skills/cpp-testing/references/coverage.md +370 -0
- package/.claude/skills/cpp-testing/references/framework-compare.md +175 -0
- package/.claude/skills/cpp-testing/references/host-test-for-embedded.md +499 -0
- package/.claude/skills/cpp-testing/references/mocking.md +364 -0
- package/.claude/skills/cpp-testing/references/tdd-workflow.md +308 -0
- package/.claude/skills/cubesandbox/SKILL.md +148 -0
- package/.claude/skills/de-sloppify/SKILL.md +38 -0
- package/.claude/skills/de-sloppify/cleanup.mjs +253 -0
- package/.claude/skills/de-sloppify/cleanup.test.mjs +189 -0
- package/.claude/skills/embedded-esp-idf/README.md +41 -0
- package/.claude/skills/embedded-esp-idf/SKILL.md +439 -0
- package/.claude/skills/embedded-esp-idf/references/freertos-patterns.md +214 -0
- package/.claude/skills/embedded-esp-idf/references/host-tests.md +164 -0
- package/.claude/skills/embedded-esp-idf/references/idf-py-commands.md +157 -0
- package/.claude/skills/embedded-esp-idf/references/kconfig.md +159 -0
- package/.claude/skills/embedded-esp-idf/references/logging-discipline.md +118 -0
- package/.claude/skills/embedded-esp-idf/references/memory-and-iram.md +137 -0
- package/.claude/skills/embedded-esp-idf/references/nvs.md +121 -0
- package/.claude/skills/embedded-esp-idf/references/packed-structs.md +192 -0
- package/.claude/skills/embedded-esp-idf/scripts/idf_env.sh +47 -0
- package/.claude/skills/embedded-esp-idf/scripts/size_check.sh +77 -0
- package/.claude/skills/glyph/SKILL.md +163 -0
- package/.claude/skills/harness-engineering/SKILL.md +142 -0
- package/.claude/skills/lightrag/SKILL.md +81 -0
- package/.claude/skills/memory-protocol/SKILL.md +105 -0
- package/.claude/skills/obsidian/SKILL.md +306 -0
- package/.claude/skills/read-the-damn-docs/SKILL.md +113 -0
- package/.claude/skills/self-improvement/SKILL.md +64 -0
- package/.claude/skills/skillopt/SKILL.md +129 -0
- package/.claude/skills/thinking-archetypes/SKILL.md +90 -0
- package/.claude/skills/thinking-bayesian/SKILL.md +267 -0
- package/.claude/skills/thinking-bounded-rationality/SKILL.md +406 -0
- package/.claude/skills/thinking-circle-of-competence/SKILL.md +216 -0
- package/.claude/skills/thinking-cynefin/SKILL.md +70 -0
- package/.claude/skills/thinking-debiasing/SKILL.md +192 -0
- package/.claude/skills/thinking-dual-process/SKILL.md +282 -0
- package/.claude/skills/thinking-effectuation/SKILL.md +366 -0
- package/.claude/skills/thinking-feedback-loops/SKILL.md +464 -0
- package/.claude/skills/thinking-fermi-estimation/SKILL.md +263 -0
- package/.claude/skills/thinking-first-principles/SKILL.md +167 -0
- package/.claude/skills/thinking-five-whys-plus/SKILL.md +139 -0
- package/.claude/skills/thinking-inversion/SKILL.md +195 -0
- package/.claude/skills/thinking-jobs-to-be-done/SKILL.md +363 -0
- package/.claude/skills/thinking-kepner-tregoe/SKILL.md +154 -0
- package/.claude/skills/thinking-leverage-points/SKILL.md +390 -0
- package/.claude/skills/thinking-lindy-effect/SKILL.md +331 -0
- package/.claude/skills/thinking-map-territory/SKILL.md +111 -0
- package/.claude/skills/thinking-margin-of-safety/SKILL.md +330 -0
- package/.claude/skills/thinking-model-combination/SKILL.md +406 -0
- package/.claude/skills/thinking-model-router/SKILL.md +360 -0
- package/.claude/skills/thinking-model-selection/SKILL.md +341 -0
- package/.claude/skills/thinking-occams-razor/SKILL.md +129 -0
- package/.claude/skills/thinking-ooda/SKILL.md +127 -0
- package/.claude/skills/thinking-opportunity-cost/SKILL.md +360 -0
- package/.claude/skills/thinking-pre-mortem/SKILL.md +170 -0
- package/.claude/skills/thinking-probabilistic/SKILL.md +324 -0
- package/.claude/skills/thinking-red-team/SKILL.md +142 -0
- package/.claude/skills/thinking-regret-minimization/SKILL.md +335 -0
- package/.claude/skills/thinking-reversibility/SKILL.md +326 -0
- package/.claude/skills/thinking-scientific-method/SKILL.md +162 -0
- package/.claude/skills/thinking-second-order/SKILL.md +184 -0
- package/.claude/skills/thinking-socratic/SKILL.md +198 -0
- package/.claude/skills/thinking-steel-manning/SKILL.md +332 -0
- package/.claude/skills/thinking-systems/SKILL.md +238 -0
- package/.claude/skills/thinking-theory-of-constraints/SKILL.md +338 -0
- package/.claude/skills/thinking-thought-experiment/SKILL.md +354 -0
- package/.claude/skills/thinking-triz/SKILL.md +171 -0
- package/.claude/skills/thinking-via-negativa/SKILL.md +358 -0
- package/bizar-dash/skills/publishing/SKILL.md +2 -1
- package/cli/install/postinstall.mjs +54 -28
- package/cli/install/postinstall.test.mjs +98 -0
- package/cli/provision.mjs +29 -0
- package/install.sh +7 -0
- package/package.json +7 -2
- package/scripts/git-hooks/__tests__/commit-msg.test.mjs +61 -0
- package/scripts/git-hooks/commit-msg +38 -0
- package/scripts/install-hooks.sh +9 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thinking-fermi-estimation
|
|
3
|
+
description: Use when you need a number you can't measure and can't look up. Decompose the unknown into estimable factors and multiply for an order-of-magnitude answer. Don't Fermi a lookup-able value.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fermi Estimation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Fermi estimation, named after physicist Enrico Fermi, is the art of making reasonable estimates for quantities that seem impossible to know without direct measurement. By decomposing a question into factors you can estimate, then multiplying, you often get surprisingly accurate order-of-magnitude results.
|
|
11
|
+
|
|
12
|
+
**Core Principle:** Break the unknown into known (or estimable) pieces. Even rough estimates combine to reasonable accuracy due to errors canceling out.
|
|
13
|
+
|
|
14
|
+
## Trigger Card
|
|
15
|
+
|
|
16
|
+
When you need a number you can't measure or look up, and order-of-magnitude is enough:
|
|
17
|
+
|
|
18
|
+
1. **Decompose:** Quantity = Factor₁ × Factor₂ × ... × Factorₙ (by component, by rate×time, or by population×fraction).
|
|
19
|
+
2. **Estimate each factor** with a range, not a point; use geometric mean for order-of-magnitude; round to one significant figure.
|
|
20
|
+
3. **Multiply and sanity-check:** Does the order of magnitude make sense? Would a 10× error change the decision?
|
|
21
|
+
4. **Report:** "~X, within 3-5×" — never false precision.
|
|
22
|
+
|
|
23
|
+
If the number is lookup-able (COUNT(*), pricing page, profile it), do that instead — a made-up estimate where a real value exists is strictly worse.
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
- Capacity planning ("How much storage will we need?")
|
|
28
|
+
- Cost estimation ("What will this infrastructure cost?")
|
|
29
|
+
- Market sizing ("How many potential users exist?")
|
|
30
|
+
- Feasibility assessment ("Is this even plausible?")
|
|
31
|
+
- Sanity checking ("Does this number make sense?")
|
|
32
|
+
- Interview questions ("How many piano tuners in Chicago?")
|
|
33
|
+
- Quick prioritization ("Is this worth pursuing?")
|
|
34
|
+
|
|
35
|
+
Decision flow:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Need a number you don't have? → Can you measure OR look it up cheaply? → yes → DO THAT (don't Fermi it)
|
|
39
|
+
↘ no → Will an order-of-magnitude answer suffice? → yes → FERMI ESTIMATE
|
|
40
|
+
↘ no → you need real data, go get it
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## When NOT to Use
|
|
44
|
+
|
|
45
|
+
- **The number is cheaply lookup-able or measurable.** Don't Fermi the size of a table you can `COUNT(*)`, the latency you can profile, the file size you can `ls`, the price on a pricing page, or any fact one query/search away. A made-up estimate where a real value is available is strictly worse — it adds error and false confidence. Look it up.
|
|
46
|
+
- **You need precision, not order of magnitude.** Fermi gives you "~4 TB, within 3-5x." If the decision turns on 3.8 vs 4.2, estimation can't carry it — get the real number.
|
|
47
|
+
- **The factors are correlated or you'd be inventing the base rates.** If the decomposition is just stacked guesses with no anchor, the result is theater. Either find one real anchor or flag the whole thing as a rough guess.
|
|
48
|
+
- **The decision is identical across the plausible range.** If "somewhere between 1 GB and 1 TB" doesn't change what you do, skip the estimate and act.
|
|
49
|
+
|
|
50
|
+
## The Fermi Process
|
|
51
|
+
|
|
52
|
+
### Step 1: Clarify What You're Estimating
|
|
53
|
+
|
|
54
|
+
Be precise about the quantity:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Vague: "How big is the market?"
|
|
58
|
+
Precise: "How many SaaS companies with 50-500 employees in the US
|
|
59
|
+
would pay $1000/month for our product?"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Step 2: Decompose into Estimable Factors
|
|
63
|
+
|
|
64
|
+
Break into pieces you can estimate:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Storage needs for user data:
|
|
68
|
+
= (Number of users)
|
|
69
|
+
× (Data per user per day)
|
|
70
|
+
× (Days of retention)
|
|
71
|
+
× (Overhead factor)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Decomposition strategies:**
|
|
75
|
+
|
|
76
|
+
| Strategy | Example |
|
|
77
|
+
|----------|---------|
|
|
78
|
+
| By component | Total = Sum of parts |
|
|
79
|
+
| By rate × time | Total = Rate × Duration |
|
|
80
|
+
| By population × fraction | Target = Base × Percentage |
|
|
81
|
+
| By analogy × adjustment | New ≈ Similar × Ratio |
|
|
82
|
+
|
|
83
|
+
### Step 3: Estimate Each Factor
|
|
84
|
+
|
|
85
|
+
For each factor, estimate based on:
|
|
86
|
+
|
|
87
|
+
| Source | Example |
|
|
88
|
+
|--------|---------|
|
|
89
|
+
| Known data | "We have 10,000 DAU" |
|
|
90
|
+
| Industry benchmarks | "Average SaaS churn is 5%" |
|
|
91
|
+
| Physical constraints | "A human can make ~50 decisions/day" |
|
|
92
|
+
| Logical bounds | "At least 1, at most 1 million" |
|
|
93
|
+
| Personal experience | "I've seen systems handle 1000 req/s" |
|
|
94
|
+
|
|
95
|
+
**When estimating:**
|
|
96
|
+
- Use ranges, not point estimates: "10,000 to 50,000"
|
|
97
|
+
- Prefer geometric mean for order-of-magnitude: √(10,000 × 50,000) = 22,360
|
|
98
|
+
- Round to one significant figure: ~20,000
|
|
99
|
+
|
|
100
|
+
### Step 4: Combine Factors
|
|
101
|
+
|
|
102
|
+
Multiply (or add) factors together:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Storage = 50,000 users × 10 KB/user/day × 365 days × 1.5 overhead
|
|
106
|
+
= 50,000 × 10,000 × 365 × 1.5 bytes
|
|
107
|
+
= 274 billion bytes
|
|
108
|
+
≈ 270 GB/year
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 5: Sanity Check
|
|
112
|
+
|
|
113
|
+
Verify reasonableness:
|
|
114
|
+
- Does the order of magnitude make sense?
|
|
115
|
+
- Is it physically possible?
|
|
116
|
+
- Does it match any known data points?
|
|
117
|
+
- Would a 10x error change the decision?
|
|
118
|
+
- **Is any factor actually lookup-able?** If so, replace the estimate with the real value — every measured factor you substitute shrinks the error bars.
|
|
119
|
+
|
|
120
|
+
### Step 6: State Confidence and Implications
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Estimate: ~270 GB/year
|
|
124
|
+
Confidence: Within 3-5x (80-1,500 GB)
|
|
125
|
+
Implication: Standard database tier sufficient; no special infrastructure needed
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Fermi Estimation Template
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
# Fermi Estimate: [Question]
|
|
132
|
+
|
|
133
|
+
## Question (Precise)
|
|
134
|
+
[Exactly what we're estimating]
|
|
135
|
+
|
|
136
|
+
## Decomposition
|
|
137
|
+
[Quantity] = [Factor 1] × [Factor 2] × ... × [Factor N]
|
|
138
|
+
|
|
139
|
+
## Factor Estimates
|
|
140
|
+
|
|
141
|
+
### Factor 1: [Name]
|
|
142
|
+
- Estimate: [Value]
|
|
143
|
+
- Source/Reasoning: [Why this number]
|
|
144
|
+
- Confidence: High / Medium / Low
|
|
145
|
+
|
|
146
|
+
### Factor 2: [Name]
|
|
147
|
+
- Estimate: [Value]
|
|
148
|
+
- Source/Reasoning: [Why this number]
|
|
149
|
+
- Confidence: High / Medium / Low
|
|
150
|
+
|
|
151
|
+
[Continue for all factors...]
|
|
152
|
+
|
|
153
|
+
## Calculation
|
|
154
|
+
[Show the math]
|
|
155
|
+
|
|
156
|
+
## Result
|
|
157
|
+
- Point estimate: [Value]
|
|
158
|
+
- Range: [Low] to [High] (representing Xx uncertainty)
|
|
159
|
+
|
|
160
|
+
## Sanity Check
|
|
161
|
+
- Physical plausibility: [Check]
|
|
162
|
+
- Comparison to known data: [Check]
|
|
163
|
+
- Order of magnitude reasonable: [Check]
|
|
164
|
+
|
|
165
|
+
## Implications
|
|
166
|
+
[What does this estimate mean for the decision?]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Common Decomposition Patterns
|
|
170
|
+
|
|
171
|
+
### Capacity Planning
|
|
172
|
+
```
|
|
173
|
+
Needed = Users × Usage/User × Factor/Usage × Growth × Safety
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Cost Estimation
|
|
177
|
+
```
|
|
178
|
+
Cost = Resources × Unit Cost × Duration × Overhead
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Time Estimation
|
|
182
|
+
```
|
|
183
|
+
Time = Tasks × Time/Task × (1 + Risk Factor)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Market Sizing
|
|
187
|
+
```
|
|
188
|
+
Market = Population × Segment% × Adoption% × Price × Frequency
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Tips for Better Estimates
|
|
192
|
+
|
|
193
|
+
### Use Multiple Approaches
|
|
194
|
+
|
|
195
|
+
Estimate the same thing different ways:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Website traffic estimate:
|
|
199
|
+
Method 1: Bottom-up from user base
|
|
200
|
+
Method 2: Top-down from market share
|
|
201
|
+
Method 3: Analogy to similar company
|
|
202
|
+
|
|
203
|
+
If methods agree within 3x, confidence increases
|
|
204
|
+
If they diverge wildly, investigate assumptions
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Bound First
|
|
208
|
+
|
|
209
|
+
Start with upper and lower bounds:
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
"Definitely more than 1,000, definitely less than 10 million"
|
|
213
|
+
"So somewhere in 10,000-1,000,000 range"
|
|
214
|
+
"Let me narrow from there..."
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Watch for Correlated Errors
|
|
218
|
+
|
|
219
|
+
If factors are correlated, errors don't cancel:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
BAD: Users × Revenue/User (both depend on same growth assumption)
|
|
223
|
+
BETTER: Estimate revenue directly, or use independent factors
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### One Significant Figure
|
|
227
|
+
|
|
228
|
+
Don't false precision:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
Calculation: 47,832,519 bytes
|
|
232
|
+
Report: ~50 MB (not "47.8 MB")
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Verification Checklist
|
|
236
|
+
|
|
237
|
+
- [ ] Question stated precisely
|
|
238
|
+
- [ ] Decomposed into 3-6 estimable factors
|
|
239
|
+
- [ ] Each factor has reasoning/source
|
|
240
|
+
- [ ] Factors are relatively independent
|
|
241
|
+
- [ ] Calculation shown and checked
|
|
242
|
+
- [ ] Result sanity-checked against reality
|
|
243
|
+
- [ ] Uncertainty range stated
|
|
244
|
+
- [ ] Implications for decision clarified
|
|
245
|
+
|
|
246
|
+
## Key Questions
|
|
247
|
+
|
|
248
|
+
- "Can I break this into smaller, estimable pieces?"
|
|
249
|
+
- "What do I already know that constrains this?"
|
|
250
|
+
- "What's the upper bound? Lower bound?"
|
|
251
|
+
- "Does this number pass the smell test?"
|
|
252
|
+
- "Would being off by 10x change my decision?"
|
|
253
|
+
- "Can I estimate this a different way to cross-check?"
|
|
254
|
+
|
|
255
|
+
## Fermi's Wisdom
|
|
256
|
+
|
|
257
|
+
When asked how many piano tuners were in Chicago, Fermi didn't look it up—he estimated from population, households, pianos, tuning frequency, and tuner capacity. His estimate was reportedly within 20% of the actual number.
|
|
258
|
+
|
|
259
|
+
The lesson: You know more than you think. Decompose, estimate, combine. The errors often cancel, and you get surprisingly close to truth.
|
|
260
|
+
|
|
261
|
+
"Never make a calculation until you know the answer." — John Wheeler (Fermi's colleague)
|
|
262
|
+
|
|
263
|
+
Meaning: Estimate first to know what answer to expect, then calculate to verify.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thinking-first-principles
|
|
3
|
+
description: When a constraint is treated as fixed ("too expensive", "impossible", "always done this way"), ask whether it's physics or just convention, then rebuild from what's actually true.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# First Principles Reasoning
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
First principles thinking strips away assumptions and conventions to reveal fundamental truths, then reconstructs solutions from those basics. This approach, championed by Elon Musk and rooted in Aristotle's philosophy, enables breakthrough solutions by escaping the trap of reasoning by analogy.
|
|
10
|
+
|
|
11
|
+
**Core Principle:** Don't accept "that's how it's always done." Reduce to fundamentals, then rebuild.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
- Conventional approaches have failed or seem inadequate
|
|
15
|
+
- You're told something is "impossible" or "too expensive"
|
|
16
|
+
- Designing new systems/products from scratch
|
|
17
|
+
- Challenging industry assumptions or pricing
|
|
18
|
+
- Problem seems intractable using existing mental models
|
|
19
|
+
- You need innovation rather than incremental improvement
|
|
20
|
+
|
|
21
|
+
Decision flow:
|
|
22
|
+
```
|
|
23
|
+
Problem intractable? → yes → Are you reasoning from analogy? → yes → APPLY FIRST PRINCIPLES
|
|
24
|
+
↘ no → Already at fundamentals
|
|
25
|
+
↘ no → Standard problem-solving may suffice
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## When NOT to Use
|
|
29
|
+
- The constraint is genuinely physics/cost/regulation, not convention — verify, then accept it and move on.
|
|
30
|
+
- A well-trodden, working solution already exists; reinventing from scratch adds risk without lift. Use the convention.
|
|
31
|
+
- Routine implementation where the "why" is settled — don't re-derive a standard library, protocol, or known-good pattern.
|
|
32
|
+
- Time-critical incidents: act on the most likely cause first (occams-razor), reserve first-principles for the post-incident redesign.
|
|
33
|
+
|
|
34
|
+
## Trigger Card
|
|
35
|
+
|
|
36
|
+
When a constraint is treated as fixed ("too expensive", "impossible", "always done this way"):
|
|
37
|
+
|
|
38
|
+
1. **Ask: is this constraint physics or convention?** If it's a law of nature, accept it. If it's "how we've always done it," it's negotiable.
|
|
39
|
+
2. **Identify the irreducible truths** — what must be true no matter what solution you pick?
|
|
40
|
+
3. **Rebuild from those truths** — derive a solution that satisfies the real constraints but ignores the artificial ones. If a simpler rebuild solves it, stop.
|
|
41
|
+
|
|
42
|
+
Skip if the "why" is settled (standard library, known-good pattern). In an incident, act on the most likely cause first; reserve this for post-incident redesign.
|
|
43
|
+
|
|
44
|
+
## The Process
|
|
45
|
+
|
|
46
|
+
### Step 1: Identify Current Assumptions
|
|
47
|
+
List everything you "know" or assume about the problem:
|
|
48
|
+
- What are the constraints everyone accepts?
|
|
49
|
+
- What costs/limitations are considered fixed?
|
|
50
|
+
- What's the conventional wisdom?
|
|
51
|
+
- Why do people say it can't be done?
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Example: "Rocket launches cost $65M because that's what aerospace companies charge"
|
|
55
|
+
Assumptions: Must buy from existing suppliers, existing designs are optimal,
|
|
56
|
+
materials must be aerospace-grade, vertical integration is too hard
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 2: Break Down to Fundamentals
|
|
60
|
+
Ask repeatedly: "What are we absolutely certain is true?"
|
|
61
|
+
|
|
62
|
+
Decomposition questions:
|
|
63
|
+
- What are the physical/mathematical constraints?
|
|
64
|
+
- What are the raw inputs required?
|
|
65
|
+
- What laws of physics/economics apply?
|
|
66
|
+
- What would this cost if built from raw materials?
|
|
67
|
+
- What is the minimum viable version?
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Example: Rocket raw materials (aluminum, titanium, copper, carbon fiber)
|
|
71
|
+
= ~2% of typical rocket price
|
|
72
|
+
Fundamental truth: Materials aren't the cost driver;
|
|
73
|
+
manufacturing/overhead/margins are
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 3: Challenge Each Assumption
|
|
77
|
+
For each assumption, ask:
|
|
78
|
+
- Is this actually true, or just convention?
|
|
79
|
+
- What evidence supports this?
|
|
80
|
+
- Under what conditions would this be false?
|
|
81
|
+
- Who benefits from this assumption persisting?
|
|
82
|
+
|
|
83
|
+
Use the "5 Whys" to drill deeper:
|
|
84
|
+
```
|
|
85
|
+
Why is it expensive? → Suppliers charge high margins
|
|
86
|
+
Why? → Limited competition
|
|
87
|
+
Why? → High barriers to entry
|
|
88
|
+
Why? → Assumption that you must use existing supply chain
|
|
89
|
+
Why? → Nobody questioned it
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Step 4: Rebuild from Fundamentals
|
|
93
|
+
Starting ONLY from verified truths:
|
|
94
|
+
- What's the simplest solution that satisfies fundamental requirements?
|
|
95
|
+
- What new approaches become possible without false constraints?
|
|
96
|
+
- How would you solve this if starting from scratch today?
|
|
97
|
+
- What would a solution look like with 10x less resources?
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Example: Build rockets in-house using commodity materials
|
|
101
|
+
= SpaceX reduced launch costs by 10x
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 5: Validate Against Reality
|
|
105
|
+
- Does your reconstructed solution violate any physics/laws?
|
|
106
|
+
- What practical constraints remain?
|
|
107
|
+
- What's the minimum viable test?
|
|
108
|
+
- How can you prove/disprove this quickly?
|
|
109
|
+
|
|
110
|
+
## Mental Traps to Avoid
|
|
111
|
+
|
|
112
|
+
| Trap | Description | Antidote |
|
|
113
|
+
|------|-------------|----------|
|
|
114
|
+
| Reasoning by Analogy | "Others do it this way" | Ask "but is it optimal?" |
|
|
115
|
+
| Appeal to Authority | "Experts say it's impossible" | "What specifically makes it impossible?" |
|
|
116
|
+
| Sunk Cost | "We've always done it this way" | "What if we started fresh today?" |
|
|
117
|
+
| Complexity Bias | Assuming complex = better | "What's the simplest version?" |
|
|
118
|
+
| False Constraints | Accepting artificial limits | "Is this a law of physics or convention?" |
|
|
119
|
+
|
|
120
|
+
## Application Examples
|
|
121
|
+
|
|
122
|
+
### Software Architecture
|
|
123
|
+
```
|
|
124
|
+
Assumption: "We need a microservices architecture"
|
|
125
|
+
First Principles:
|
|
126
|
+
- What problem are we solving? (scalability, team independence, deployment)
|
|
127
|
+
- What's the minimum that achieves this?
|
|
128
|
+
- A modular monolith might suffice for current scale
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Cost Reduction
|
|
132
|
+
```
|
|
133
|
+
Assumption: "This service costs $50k/month, that's just cloud pricing"
|
|
134
|
+
First Principles:
|
|
135
|
+
- What compute/storage do we actually need?
|
|
136
|
+
- What are we paying for that we don't use?
|
|
137
|
+
- Could we reduce by 80% with right-sizing?
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Feature Development
|
|
141
|
+
```
|
|
142
|
+
Assumption: "Users need feature X (because competitor has it)"
|
|
143
|
+
First Principles:
|
|
144
|
+
- What job is the user trying to accomplish?
|
|
145
|
+
- What's the simplest way to enable that job?
|
|
146
|
+
- Maybe a different approach solves it better
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Verification Checklist
|
|
150
|
+
- [ ] Listed all assumptions about the problem
|
|
151
|
+
- [ ] Identified which assumptions are physics/math vs convention
|
|
152
|
+
- [ ] Challenged at least 3 "obvious" constraints
|
|
153
|
+
- [ ] Rebuilt solution using only verified fundamentals
|
|
154
|
+
- [ ] Validated that solution doesn't violate actual constraints
|
|
155
|
+
- [ ] Identified minimum viable test to prove/disprove approach
|
|
156
|
+
|
|
157
|
+
## Combining with Other Models
|
|
158
|
+
- **Inversion**: After first principles, ask "what would make this fail?"
|
|
159
|
+
- **Second-Order Thinking**: Consider downstream effects of your new approach
|
|
160
|
+
- **Pre-Mortem**: Imagine your first-principles solution failed—why?
|
|
161
|
+
|
|
162
|
+
## Key Questions
|
|
163
|
+
- "What do we know to be absolutely true?"
|
|
164
|
+
- "Why does everyone assume this constraint exists?"
|
|
165
|
+
- "What would we do if we had to solve this with 10% of the budget?"
|
|
166
|
+
- "If we were starting from scratch today, would we build it this way?"
|
|
167
|
+
- "What would a complete outsider try?"
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thinking-five-whys-plus
|
|
3
|
+
description: Use when a fault is localized to a component and the proximate cause is known but the systemic root is not — chain 'why' with evidence, a counterfactual cause test, and an explicit stop condition.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Five Whys Plus
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Five Whys Plus is a **post-localization root-cause analysis** skill. It assumes a fault has already been localized to a specific component or subsystem (by `thinking-scientific-method` or equivalent hypothesis-differential debugging). From that starting point — the proximate cause is known — it chains "why" questions backward to reach the systemic root cause, with explicit guards against the technique's known failure modes.
|
|
11
|
+
|
|
12
|
+
**Core Principle:** Never ask "why" without evidence for the answer. Chain backward from localized fault to actionable root cause, and stop only when the cause passes a counterfactual test: "Would the problem NOT have occurred if this cause were absent?"
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- A fault has been localized to a specific component (use `thinking-scientific-method` first if you don't know which component is at fault)
|
|
17
|
+
- The proximate cause is known but the systemic cause isn't
|
|
18
|
+
- A problem keeps recurring despite previous fixes
|
|
19
|
+
- You need the root cause, not just the proximate one
|
|
20
|
+
|
|
21
|
+
Decision flow:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Fault localized to a specific component?
|
|
25
|
+
→ No → Run thinking-scientific-method first to localize
|
|
26
|
+
→ Yes → Proximate cause known?
|
|
27
|
+
→ No → Gather evidence on proximate cause
|
|
28
|
+
→ Yes → Is the root cause already obvious and verified?
|
|
29
|
+
→ Yes → Fix directly; don't chain
|
|
30
|
+
→ No → APPLY FIVE WHYS PLUS
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## When NOT to Use
|
|
34
|
+
|
|
35
|
+
- **The fault is not yet localized.** If you don't know which component is at fault (multiple candidate causes), this is a localization problem. Use `thinking-scientific-method` (hypothesis-differential debugging) first, then run Five Whys on the cause it confirms.
|
|
36
|
+
- **The root cause is already obvious and verified.** Don't ritualistically chain "why" — just fix it.
|
|
37
|
+
- **The chain would be pure speculation with no evidence for the next "why".** Stop and gather evidence; don't speculate deeper (see Anti-Patterns: Speculation Dive).
|
|
38
|
+
- **The problem is a one-off with no systemic dimension.** If a single fat-finger error caused an outage and there's no process gap, don't force a chain.
|
|
39
|
+
|
|
40
|
+
## Procedure
|
|
41
|
+
|
|
42
|
+
### Step 1: State the Problem Precisely
|
|
43
|
+
|
|
44
|
+
Document the localized fault with specific, measurable details:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
Problem Statement:
|
|
48
|
+
- What happened: [Specific observable symptom]
|
|
49
|
+
- Localized to: [Component/subsystem confirmed by scientific-method or equivalent]
|
|
50
|
+
- When: [Time range]
|
|
51
|
+
- Where: [Affected systems/users]
|
|
52
|
+
- Extent: [Scope and severity]
|
|
53
|
+
- Impact: [Business/user impact]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 2: Build the Evidence Chain
|
|
57
|
+
|
|
58
|
+
For each "why," require evidence, confidence, and alternatives considered:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
Why #N: Why did [answer N-1] occur?
|
|
62
|
+
Answer: [Hypothesis]
|
|
63
|
+
Evidence: [Data, logs, metrics that support this — NOT speculation]
|
|
64
|
+
Confidence: High / Medium / Low
|
|
65
|
+
What else considered: [Alternative causes checked]
|
|
66
|
+
Ruled out because: [Evidence against alternatives]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Evidence types:** Logs showing the event, metrics correlating with timeline, code showing the behavior, configuration proving the state, testimony from multiple independent sources.
|
|
70
|
+
|
|
71
|
+
**Branch on "what else?"** at each step — explicitly list and rule out alternative explanations before proceeding.
|
|
72
|
+
|
|
73
|
+
### Step 3: Apply the Counterfactual Cause Test
|
|
74
|
+
|
|
75
|
+
Before stopping, test the proposed root cause:
|
|
76
|
+
|
|
77
|
+
> **Counterfactual:** "Would the problem NOT have occurred if this cause were absent?"
|
|
78
|
+
|
|
79
|
+
If the answer is "no" or "maybe not" — you haven't reached the root cause. Keep going.
|
|
80
|
+
|
|
81
|
+
If the answer is "yes, the problem would not have occurred" — AND the cause passes the stop condition (Step 4) — you've found the root cause.
|
|
82
|
+
|
|
83
|
+
### Step 4: Check the Stop Condition
|
|
84
|
+
|
|
85
|
+
Only stop when ALL criteria are met:
|
|
86
|
+
|
|
87
|
+
| Criterion | Question |
|
|
88
|
+
|-----------|----------|
|
|
89
|
+
| Actionable | Can we take concrete action on this cause? |
|
|
90
|
+
| Controllable | Is this within our control to fix? |
|
|
91
|
+
| Fundamental | Would fixing this prevent recurrence? |
|
|
92
|
+
| Evidenced | Do we have evidence, not just speculation? |
|
|
93
|
+
| Counterfactual | Would the problem NOT have occurred if this cause were absent? |
|
|
94
|
+
| Not-blame | Is this a system/process issue, not just "someone messed up"? |
|
|
95
|
+
|
|
96
|
+
**Never stop at human error.** When you reach "someone made a mistake," ask "Why was the mistake possible?" — that's the systemic cause.
|
|
97
|
+
|
|
98
|
+
### Step 5: Apply Devil's Advocate Review
|
|
99
|
+
|
|
100
|
+
Before finalizing, challenge the conclusion:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
Counter-analysis:
|
|
104
|
+
1. What evidence contradicts this conclusion?
|
|
105
|
+
2. What other explanation fits the evidence equally well?
|
|
106
|
+
3. Would someone outside our team reach the same conclusion?
|
|
107
|
+
4. If we fix X, are we confident the problem won't recur?
|
|
108
|
+
5. Are we finding what we expected to find? (confirmation bias check)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 6: Document and Recommend
|
|
112
|
+
|
|
113
|
+
Record the full chain and prescribe actions that address the root cause (not just the symptom).
|
|
114
|
+
|
|
115
|
+
## Output Contract
|
|
116
|
+
|
|
117
|
+
A completed Five Whys Plus analysis produces:
|
|
118
|
+
|
|
119
|
+
1. **Problem Statement** — specific, measurable, with localized component
|
|
120
|
+
2. **Evidence Chain** — each "why" step with answer, evidence, confidence, and alternatives ruled out
|
|
121
|
+
3. **Counterfactual Test Result** — explicit answer to "would the problem NOT have occurred?"
|
|
122
|
+
4. **Stop Condition Check** — all six criteria satisfied
|
|
123
|
+
5. **Devil's Advocate Review** — contradicting evidence, alternative explanations, bias check
|
|
124
|
+
6. **Root Cause(s)** — primary and any contributing factors
|
|
125
|
+
7. **Recommended Actions** — addressing root cause, with owner and timeline
|
|
126
|
+
8. **Verification Plan** — how to confirm the fix worked
|
|
127
|
+
|
|
128
|
+
## Anti-Patterns
|
|
129
|
+
|
|
130
|
+
| Anti-Pattern | Symptom | Correction |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| **Pre-localization application** | Running Five Whys when you don't know which component failed | Use `thinking-scientific-method` first to localize |
|
|
133
|
+
| **Premature stop** | Accepting the first plausible cause without the counterfactual test | Apply the counterfactual: "Would the problem NOT have occurred?" |
|
|
134
|
+
| **Blame stop** | Ending at "someone made a mistake" | Ask "Why was the mistake possible?" — find the systemic gap |
|
|
135
|
+
| **Speculation dive** | Answers become increasingly speculative without evidence | Stop and gather evidence; mark un-evidenced steps as hypotheses |
|
|
136
|
+
| **Circular why** | "Why A?" → "Because B" → "Why B?" → "Because A" | Introduce external evidence or a third factor to break the cycle |
|
|
137
|
+
| **Single-cause bias** | Assuming one root cause without branching | At each step, ask "what else could cause this?" and rule out alternatives |
|
|
138
|
+
| **Confirmation bias** | Finding the cause you expected to find | Devil's advocate review; ask "what evidence contradicts this?" |
|
|
139
|
+
| **Ritualistic chaining** | Asking five whys when one would do | Stop when the counterfactual test passes and the stop condition is met |
|