@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.
Files changed (148) hide show
  1. package/.claude/agents/_shared/AGENT_BASELINE.md +266 -0
  2. package/.claude/agents/_shared/CLAUDE_TOOLS.md +412 -0
  3. package/.claude/agents/_shared/SKILLS.md +109 -0
  4. package/.claude/agents/brand-designer.md +55 -0
  5. package/.claude/agents/exec-assistant.md +34 -0
  6. package/.claude/agents/help-desk.md +44 -0
  7. package/.claude/agents/it-lead.md +53 -0
  8. package/.claude/agents/knowledge-manager.md +49 -0
  9. package/.claude/agents/office-coordinator.md +39 -0
  10. package/.claude/agents/office-greeter.md +53 -0
  11. package/.claude/agents/office-manager.md +287 -0
  12. package/.claude/agents/principal-engineer.md +58 -0
  13. package/.claude/agents/qa-reviewer.md +51 -0
  14. package/.claude/agents/research-analyst.md +53 -0
  15. package/.claude/agents/senior-engineer.md +55 -0
  16. package/.claude/agents/support-tech.md +87 -0
  17. package/.claude/agents/vp-engineering.md +54 -0
  18. package/.claude/commands/audit.md +48 -0
  19. package/.claude/commands/bizar.md +22 -0
  20. package/.claude/commands/cron.md +36 -0
  21. package/.claude/commands/explain.md +17 -0
  22. package/.claude/commands/goal.md +99 -0
  23. package/.claude/commands/init.md +15 -0
  24. package/.claude/commands/learn.md +46 -0
  25. package/.claude/commands/plan.md +35 -0
  26. package/.claude/commands/plow-through.md +50 -0
  27. package/.claude/commands/pr-review.md +49 -0
  28. package/.claude/commands/setup-provider.md +96 -0
  29. package/.claude/commands/spec.md +47 -0
  30. package/.claude/commands/sprint.md +43 -0
  31. package/.claude/commands/tailscale-serve.md +100 -0
  32. package/.claude/commands/team.md +132 -0
  33. package/.claude/commands/test.md +62 -0
  34. package/.claude/commands/validate.md +68 -0
  35. package/.claude/commands/visual-plan.md +24 -0
  36. package/.claude/hooks/README.md +108 -0
  37. package/.claude/hooks/__tests__/pretooluse-editwrite.test.mjs +146 -0
  38. package/.claude/hooks/__tests__/sessionend-recall.test.mjs +256 -0
  39. package/.claude/hooks/__tests__/sessionstart-prime.test.mjs +325 -0
  40. package/.claude/hooks/__tests__/thinking-route.test.mjs +319 -0
  41. package/.claude/hooks/auto-instinct.sh +81 -0
  42. package/.claude/hooks/learning-extract.mjs +92 -0
  43. package/.claude/hooks/post-merge-audit.sh +93 -0
  44. package/.claude/hooks/posttooluse-editwrite.mjs +91 -0
  45. package/.claude/hooks/pretooluse-bash.mjs +87 -0
  46. package/.claude/hooks/pretooluse-editwrite.mjs +117 -0
  47. package/.claude/hooks/sessionend-recall.mjs +384 -0
  48. package/.claude/hooks/sessionstart-prime.mjs +278 -0
  49. package/.claude/hooks/thinking-route.mjs +314 -0
  50. package/.claude/hooks/worker-suggest.mjs +110 -0
  51. package/.claude/settings.json +167 -0
  52. package/.claude/skills/9router/SKILL.md +80 -0
  53. package/.claude/skills/9router-chat/SKILL.md +73 -0
  54. package/.claude/skills/9router-embeddings/SKILL.md +69 -0
  55. package/.claude/skills/9router-image/SKILL.md +86 -0
  56. package/.claude/skills/9router-stt/SKILL.md +79 -0
  57. package/.claude/skills/9router-tts/SKILL.md +80 -0
  58. package/.claude/skills/9router-web-fetch/SKILL.md +99 -0
  59. package/.claude/skills/9router-web-search/SKILL.md +91 -0
  60. package/.claude/skills/agent-browser/SKILL.md +64 -0
  61. package/.claude/skills/bizar/README.md +9 -0
  62. package/.claude/skills/bizar/SKILL.md +447 -0
  63. package/.claude/skills/cpp-coding-standards/README.md +28 -0
  64. package/.claude/skills/cpp-coding-standards/SKILL.md +634 -0
  65. package/.claude/skills/cpp-coding-standards/references/concurrency.md +320 -0
  66. package/.claude/skills/cpp-coding-standards/references/error-handling.md +229 -0
  67. package/.claude/skills/cpp-coding-standards/references/memory-safety.md +216 -0
  68. package/.claude/skills/cpp-coding-standards/references/modern-idioms.md +282 -0
  69. package/.claude/skills/cpp-coding-standards/references/review-checklist.md +96 -0
  70. package/.claude/skills/cpp-testing/README.md +28 -0
  71. package/.claude/skills/cpp-testing/SKILL.md +304 -0
  72. package/.claude/skills/cpp-testing/references/coverage.md +370 -0
  73. package/.claude/skills/cpp-testing/references/framework-compare.md +175 -0
  74. package/.claude/skills/cpp-testing/references/host-test-for-embedded.md +499 -0
  75. package/.claude/skills/cpp-testing/references/mocking.md +364 -0
  76. package/.claude/skills/cpp-testing/references/tdd-workflow.md +308 -0
  77. package/.claude/skills/cubesandbox/SKILL.md +148 -0
  78. package/.claude/skills/de-sloppify/SKILL.md +38 -0
  79. package/.claude/skills/de-sloppify/cleanup.mjs +253 -0
  80. package/.claude/skills/de-sloppify/cleanup.test.mjs +189 -0
  81. package/.claude/skills/embedded-esp-idf/README.md +41 -0
  82. package/.claude/skills/embedded-esp-idf/SKILL.md +439 -0
  83. package/.claude/skills/embedded-esp-idf/references/freertos-patterns.md +214 -0
  84. package/.claude/skills/embedded-esp-idf/references/host-tests.md +164 -0
  85. package/.claude/skills/embedded-esp-idf/references/idf-py-commands.md +157 -0
  86. package/.claude/skills/embedded-esp-idf/references/kconfig.md +159 -0
  87. package/.claude/skills/embedded-esp-idf/references/logging-discipline.md +118 -0
  88. package/.claude/skills/embedded-esp-idf/references/memory-and-iram.md +137 -0
  89. package/.claude/skills/embedded-esp-idf/references/nvs.md +121 -0
  90. package/.claude/skills/embedded-esp-idf/references/packed-structs.md +192 -0
  91. package/.claude/skills/embedded-esp-idf/scripts/idf_env.sh +47 -0
  92. package/.claude/skills/embedded-esp-idf/scripts/size_check.sh +77 -0
  93. package/.claude/skills/glyph/SKILL.md +163 -0
  94. package/.claude/skills/harness-engineering/SKILL.md +142 -0
  95. package/.claude/skills/lightrag/SKILL.md +81 -0
  96. package/.claude/skills/memory-protocol/SKILL.md +105 -0
  97. package/.claude/skills/obsidian/SKILL.md +306 -0
  98. package/.claude/skills/read-the-damn-docs/SKILL.md +113 -0
  99. package/.claude/skills/self-improvement/SKILL.md +64 -0
  100. package/.claude/skills/skillopt/SKILL.md +129 -0
  101. package/.claude/skills/thinking-archetypes/SKILL.md +90 -0
  102. package/.claude/skills/thinking-bayesian/SKILL.md +267 -0
  103. package/.claude/skills/thinking-bounded-rationality/SKILL.md +406 -0
  104. package/.claude/skills/thinking-circle-of-competence/SKILL.md +216 -0
  105. package/.claude/skills/thinking-cynefin/SKILL.md +70 -0
  106. package/.claude/skills/thinking-debiasing/SKILL.md +192 -0
  107. package/.claude/skills/thinking-dual-process/SKILL.md +282 -0
  108. package/.claude/skills/thinking-effectuation/SKILL.md +366 -0
  109. package/.claude/skills/thinking-feedback-loops/SKILL.md +464 -0
  110. package/.claude/skills/thinking-fermi-estimation/SKILL.md +263 -0
  111. package/.claude/skills/thinking-first-principles/SKILL.md +167 -0
  112. package/.claude/skills/thinking-five-whys-plus/SKILL.md +139 -0
  113. package/.claude/skills/thinking-inversion/SKILL.md +195 -0
  114. package/.claude/skills/thinking-jobs-to-be-done/SKILL.md +363 -0
  115. package/.claude/skills/thinking-kepner-tregoe/SKILL.md +154 -0
  116. package/.claude/skills/thinking-leverage-points/SKILL.md +390 -0
  117. package/.claude/skills/thinking-lindy-effect/SKILL.md +331 -0
  118. package/.claude/skills/thinking-map-territory/SKILL.md +111 -0
  119. package/.claude/skills/thinking-margin-of-safety/SKILL.md +330 -0
  120. package/.claude/skills/thinking-model-combination/SKILL.md +406 -0
  121. package/.claude/skills/thinking-model-router/SKILL.md +360 -0
  122. package/.claude/skills/thinking-model-selection/SKILL.md +341 -0
  123. package/.claude/skills/thinking-occams-razor/SKILL.md +129 -0
  124. package/.claude/skills/thinking-ooda/SKILL.md +127 -0
  125. package/.claude/skills/thinking-opportunity-cost/SKILL.md +360 -0
  126. package/.claude/skills/thinking-pre-mortem/SKILL.md +170 -0
  127. package/.claude/skills/thinking-probabilistic/SKILL.md +324 -0
  128. package/.claude/skills/thinking-red-team/SKILL.md +142 -0
  129. package/.claude/skills/thinking-regret-minimization/SKILL.md +335 -0
  130. package/.claude/skills/thinking-reversibility/SKILL.md +326 -0
  131. package/.claude/skills/thinking-scientific-method/SKILL.md +162 -0
  132. package/.claude/skills/thinking-second-order/SKILL.md +184 -0
  133. package/.claude/skills/thinking-socratic/SKILL.md +198 -0
  134. package/.claude/skills/thinking-steel-manning/SKILL.md +332 -0
  135. package/.claude/skills/thinking-systems/SKILL.md +238 -0
  136. package/.claude/skills/thinking-theory-of-constraints/SKILL.md +338 -0
  137. package/.claude/skills/thinking-thought-experiment/SKILL.md +354 -0
  138. package/.claude/skills/thinking-triz/SKILL.md +171 -0
  139. package/.claude/skills/thinking-via-negativa/SKILL.md +358 -0
  140. package/bizar-dash/skills/publishing/SKILL.md +2 -1
  141. package/cli/install/postinstall.mjs +54 -28
  142. package/cli/install/postinstall.test.mjs +98 -0
  143. package/cli/provision.mjs +29 -0
  144. package/install.sh +7 -0
  145. package/package.json +7 -2
  146. package/scripts/git-hooks/__tests__/commit-msg.test.mjs +61 -0
  147. package/scripts/git-hooks/commit-msg +38 -0
  148. package/scripts/install-hooks.sh +9 -0
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: thinking-archetypes
3
+ description: Use when the same problem keeps recurring despite fixes, growth stalled with no obvious cause, or a pam fix made things worse—match it to a known structural pattern instead of re-diagnosing.
4
+ ---
5
+
6
+ # Systems Archetypes
7
+
8
+ ## Overview
9
+
10
+ Systems archetypes (Peter Senge, "The Fifth Discipline") are recurring structural patterns. Like design patterns in software, once you recognize one you can predict where it leads and where to intervene. Most stubborn, recurring problems aren't unique—they're an instance of a known pattern, and the pattern names the leverage point.
11
+
12
+ **Core Principle:** A recurring problem usually has a structural pattern. Match the pattern and the intervention follows.
13
+
14
+ ## Trigger Card
15
+
16
+ When the same problem keeps recurring despite multiple fixes:
17
+
18
+ 1. **Describe the problem neutrally** — symptoms, what's been tried, what keeps coming back.
19
+ 2. **Match to an archetype** using the Quick Reference Card below (Fixes That Fail, Shifting the Burden, Limits to Growth, Tragedy of the Commons, Escalation, Success to the Successful, Growth and Underinvestment).
20
+ 3. **Intervene at the structure, not the symptom** — use the Key Question for that archetype.
21
+
22
+ If no archetype fits after a genuine look, don't force one — drop to `thinking-systems` and map from scratch. For a first-time one-off problem, just fix it.
23
+
24
+ ## When to Use
25
+
26
+ - The same problem keeps recurring despite multiple "fixes"
27
+ - A pam fix made things worse over time
28
+ - Growth stalled without an obvious cause
29
+ - A shared resource (CI, staging, a cache, a service quota) keeps degrading
30
+ - Two efforts are escalating against each other (duplicated services, alert/threshold arms races)
31
+
32
+ ```
33
+ Problem keeps recurring despite fixes? → match an archetype
34
+ Quick fix made it worse? → match an archetype
35
+ Growth hit an invisible ceiling? → match an archetype
36
+ Shared resource degrading? → match an archetype
37
+ ```
38
+
39
+ ## When NOT to Use
40
+
41
+ - **You need to map the system from scratch** (components, interactions, emergent behavior) — use `thinking-systems` instead. Archetypes are pattern-matching shortcuts for recurring structures; if the system is unfamiliar, map it first, then see if an archetype fits.
42
+ - **You've found the pattern and need to know where to intervene** — use `thinking-leverage-points` (Meadows' hierarchy). Archetypes name the structure; leverage-points tell you where in that structure to act for maximum effect.
43
+ - A first-time, one-off problem with a clear cause → just fix it; there's no recurring structure to match.
44
+ - No candidate archetype fits after a genuine look → don't force one. Drop to `thinking-systems` and map the actual structure from scratch.
45
+ - You need to localize a specific faulty codepath → use a hypothesis differential, not pattern-matching.
46
+
47
+ ## Quick Reference Card
48
+
49
+ Match the symptom to the pattern; the Key Question points at the leverage.
50
+
51
+ | Archetype | Structure | Recognize it by | Key Question (leverage) |
52
+ |-----------|-----------|-----------------|-------------------------|
53
+ | **Fixes That Fail** | Quick fix relieves symptom but a delayed side effect makes it worse | "We fixed this last quarter, why is it back?"; the fix needs ever-larger doses | "What side effect will this fix create?" |
54
+ | **Shifting the Burden** | A symptomatic workaround is used instead of the fundamental fix, creating dependency | Permanent workarounds; "we know the real fix but have no time"; the real capability is atrophying | "What capability are we not building by leaning on this workaround?" |
55
+ | **Limits to Growth** | A reinforcing growth loop hits a balancing constraint | Strong growth that plateaued; more effort, diminishing returns; a resource maxed out | "What will limit us at 10x scale?" |
56
+ | **Tragedy of the Commons** | Each actor gains by using a shared resource; collective overuse depletes it | Shared CI/staging/cache/quota degrading; everyone optimizes locally; no clear owner | "Who owns the long-term health of this resource?" |
57
+ | **Escalation** | Two parties react to each other's moves in a competitive spiral | "They did X so we must do Y"; arms-race dynamics; each side feels defensive | "Can we change the game instead of playing it harder?" |
58
+ | **Success to the Successful** | Initial success grants more resources, compounding advantage and starving alternatives | Past success is the main predictor of new investment; experiments starved to feed the incumbent | "Are we starving future successes to feed current ones?" |
59
+ | **Growth and Underinvestment** | Demand grows toward a limit; capacity investment is delayed until performance degrades into crisis | Reactive investment after the incident; chronic "good enough for now" | "What fails if we grow 50% without adding capacity now?" |
60
+
61
+ ## Software Examples (per archetype)
62
+
63
+ - **Fixes That Fail:** Adding servers to mask a memory leak → cost spirals, leak remains. Silencing alerts → system degrades until outage.
64
+ - **Shifting the Burden:** Ops manually intervening forever instead of automating; feature flags hiding bugs that never get fixed.
65
+ - **Limits to Growth:** Velocity drops as the codebase grows (complexity limit); adding engineers doesn't speed delivery (coordination overhead).
66
+ - **Tragedy of the Commons:** Teams overload shared CI → everyone's builds slow; cloud costs spike as nobody cleans up resources.
67
+ - **Escalation:** Microservice teams duplicating functionality in response to each other; ever-stricter alert thresholds chasing each other.
68
+ - **Success to the Successful:** Legacy monolith gets all attention so the new architecture never matures.
69
+ - **Growth and Underinvestment:** Database not upgraded until it crashes under load; security investment only after a breach.
70
+
71
+ ## Diagnosis Process
72
+
73
+ 1. **Describe the problem neutrally** — symptoms, who/what is involved, what's been tried, what keeps recurring. No blame.
74
+ 2. **Sketch the loops** — what causes what; where reinforcing (amplifying) loops are, where balancing (limiting) loops are, and where the delays sit.
75
+ 3. **Match to an archetype** using the Quick Reference Card. If two fit, the system may be layered—note both.
76
+ 4. **Intervene at the structure, not the symptom** — use the Key Question to find the fundamental solution, the constraint to remove, or the missing/ delayed feedback to add. If none match, stop and use `thinking-systems`.
77
+
78
+ ## Verification Checklist
79
+
80
+ - [ ] Problem described without blame
81
+ - [ ] Loops sketched (reinforcing, balancing, delays)
82
+ - [ ] Matched to a specific archetype (or escalated to `thinking-systems` because none fit)
83
+ - [ ] Intervention targets structure, not the recurring symptom
84
+ - [ ] Considered the side effects of the intervention
85
+
86
+ ## Senge's Wisdom
87
+
88
+ "Structures of which we are unaware hold us prisoner. Once we can see them, they no longer have the same hold on us."
89
+
90
+ The pattern continues until someone sees it and changes the structure driving it—not the behaviors, but what produces them.
@@ -0,0 +1,267 @@
1
+ ---
2
+ name: thinking-bayesian
3
+ description: Use when interpreting a test result, metric, or new evidence and you risk over-reacting to it. State the base rate first, then update belief by the likelihood ratio.
4
+ ---
5
+
6
+ # Bayesian Reasoning
7
+
8
+ ## Overview
9
+ Bayesian thinking provides a framework for updating beliefs based on new evidence. Rather than treating beliefs as binary (true/false), it recognizes degrees of confidence that should shift as evidence accumulates. This approach, rooted in Bayes' Theorem, helps avoid both overconfidence and underreaction to new information.
10
+
11
+ **Core Principle:** State the base rate *before* you look at the evidence, then update. The single most common error is anchoring on a vivid result and skipping the prior — a positive test for a rare condition is usually still a false alarm.
12
+
13
+ > **Redirect:** For nearly all uncertainty-reasoning tasks, prefer `thinking-probabilistic` — it covers forecasting with ranges, calibration, and uncertainty communication without requiring explicit priors and likelihood ratios. Reserve this skill for the narrow case where you have a specific, quantified prior AND a specific piece of evidence to combine via Bayes' rule. If you only need a rough updated number, the base-rate-then-likelihood-ratio trigger below is enough — don't run the full theorem.
14
+
15
+ ## Trigger Card
16
+
17
+ When interpreting a test result, metric, or new evidence where overreaction is a risk:
18
+
19
+ 1. **State the base rate first** — what was the probability before the evidence?
20
+ 2. **Estimate the likelihood ratio** — how much more expected is the evidence under the hypothesis vs. not?
21
+ 3. **Update:** posterior odds = prior odds × likelihood ratio.
22
+
23
+ If the base rate is very low (rare condition), a positive result is usually still a false alarm. Always start with the prior.
24
+
25
+ ## When to Use
26
+ - Estimating probabilities or likelihoods
27
+ - Interpreting test results or metrics
28
+ - Making decisions with incomplete information
29
+ - Evaluating competing hypotheses
30
+ - Learning from experiments or A/B tests
31
+ - Diagnosing problems with uncertain causes
32
+ - Predicting outcomes based on historical data
33
+
34
+ Decision flow:
35
+ ```
36
+ Uncertain about something? → yes → Have prior belief? → yes → New evidence? → APPLY BAYESIAN UPDATE
37
+ ↘ no → Establish base rate first
38
+ ↘ no → Standard analysis may suffice
39
+ ```
40
+
41
+ ## When NOT to Use
42
+
43
+ - **You're reasoning under uncertainty and don't have a specific prior + evidence pair.** Use `thinking-probabilistic` instead — it handles forecasting with ranges, calibration, and uncertainty communication without requiring formal Bayesian machinery.
44
+ - **The evidence is conclusive or directly observable.** If you can read the logs, run the query, or look up the answer, do that — don't dress up a near-certainty as a probability.
45
+ - **No meaningful prior exists** and you'd just be inventing numbers. A fabricated base rate gives false rigor; say the prior is unknown instead.
46
+ - **The decision is the same at any plausible posterior.** If you'd act identically whether the probability is 40% or 70%, skip the update and act.
47
+ - **You need to express uncertainty as a calibrated range**, not a point update from a single piece of evidence — that's `thinking-probabilistic` territory.
48
+
49
+ ## Key Concepts
50
+
51
+ ### Prior Probability
52
+ Your belief BEFORE seeing new evidence:
53
+ ```
54
+ P(H) = probability that hypothesis H is true
55
+
56
+ Example: Before any symptoms, what's the probability someone has disease X?
57
+ Use base rate: If 1 in 1000 people have it, P(disease) = 0.001
58
+ ```
59
+
60
+ ### Likelihood
61
+ How probable is the evidence IF the hypothesis is true?
62
+ ```
63
+ P(E|H) = probability of seeing evidence E, given H is true
64
+
65
+ Example: If someone HAS the disease, what's the probability of a positive test?
66
+ If test is 99% sensitive: P(positive|disease) = 0.99
67
+ ```
68
+
69
+ ### Posterior Probability
70
+ Your belief AFTER seeing the evidence:
71
+ ```
72
+ P(H|E) = updated probability of H, given you observed E
73
+
74
+ This is what Bayes' Theorem calculates.
75
+ ```
76
+
77
+ ## Bayes' Theorem
78
+
79
+ ```
80
+ P(E|H) × P(H)
81
+ P(H|E) = ─────────────────────────
82
+ P(E)
83
+
84
+ Where:
85
+ P(H|E) = posterior (what we want)
86
+ P(E|H) = likelihood (how expected is evidence if H true)
87
+ P(H) = prior (initial belief)
88
+ P(E) = total probability of evidence
89
+ ```
90
+
91
+ ### Intuitive Form
92
+
93
+ ```
94
+ Posterior odds = Prior odds × Likelihood ratio
95
+
96
+ If evidence is 10x more likely under H than under not-H,
97
+ your odds should shift by factor of 10.
98
+ ```
99
+
100
+ ## The Process
101
+
102
+ ### Step 1: Establish Your Prior
103
+ What did you believe before this evidence?
104
+ - Use base rates when available
105
+ - Be explicit about uncertainty
106
+ - Don't anchor on 50% just because you're unsure
107
+
108
+ ```
109
+ Question: Will this feature increase conversion?
110
+ Prior: Based on similar features, ~30% succeed significantly
111
+ P(success) = 0.30
112
+ ```
113
+
114
+ ### Step 2: Assess the Evidence
115
+ How strong is this evidence? Consider:
116
+ - How likely is this evidence if hypothesis is TRUE?
117
+ - How likely is this evidence if hypothesis is FALSE?
118
+ - What's the ratio?
119
+
120
+ ```
121
+ Evidence: Early A/B test shows 5% lift (p=0.08)
122
+ P(this result | feature works) = 0.60 (moderately expected)
123
+ P(this result | feature doesn't work) = 0.15 (possible but less likely)
124
+ Likelihood ratio = 0.60 / 0.15 = 4x
125
+ ```
126
+
127
+ ### Step 3: Update Your Belief
128
+ Apply the likelihood ratio to your prior:
129
+
130
+ ```
131
+ Prior odds: 0.30 / 0.70 = 0.43
132
+ Likelihood ratio: 4x
133
+ Posterior odds: 0.43 × 4 = 1.72
134
+ Posterior probability: 1.72 / (1 + 1.72) = 0.63
135
+
136
+ Updated belief: 63% confidence feature will succeed
137
+ (up from 30% prior)
138
+ ```
139
+
140
+ ### Step 4: Iterate as More Evidence Arrives
141
+ Yesterday's posterior becomes today's prior:
142
+
143
+ ```
144
+ New evidence: Week 2 shows lift holding at 4.5%
145
+ Prior (from step 3): 0.63
146
+ [Repeat update process]
147
+ New posterior: 0.78
148
+ ```
149
+
150
+ ## Common Applications
151
+
152
+ ### Interpreting Test Results
153
+ ```
154
+ Scenario: Test for rare disease (1 in 10,000 prevalence)
155
+ Test: 99% sensitive, 99% specific
156
+
157
+ Prior: P(disease) = 0.0001
158
+ If positive test:
159
+ P(positive|disease) = 0.99
160
+ P(positive|no disease) = 0.01
161
+ P(positive) = 0.99 × 0.0001 + 0.01 × 0.9999 ≈ 0.0101
162
+
163
+ Posterior: P(disease|positive) = (0.99 × 0.0001) / 0.0101 ≈ 0.0098
164
+
165
+ Even with 99% accurate test, positive result only means ~1% chance of disease!
166
+ Base rate dominates when condition is rare.
167
+ ```
168
+
169
+ ### Debugging
170
+ ```
171
+ Bug report: Users see error X
172
+ Prior beliefs:
173
+ P(database issue) = 0.20
174
+ P(network issue) = 0.30
175
+ P(code bug) = 0.40
176
+ P(user error) = 0.10
177
+
178
+ Evidence: Error happens only on mobile
179
+ P(mobile-only | database) = 0.05
180
+ P(mobile-only | network) = 0.30
181
+ P(mobile-only | code bug) = 0.60
182
+ P(mobile-only | user error) = 0.40
183
+
184
+ Update: Code bug becomes most likely (posterior ~0.55)
185
+ Next step: Investigate mobile-specific code paths
186
+ ```
187
+
188
+ ### Project Estimation
189
+ ```
190
+ Prior: Based on similar projects, P(on-time) = 0.40
191
+
192
+ Evidence 1: Team is experienced with this stack
193
+ Likelihood ratio: 1.5x → Posterior: 0.50
194
+
195
+ Evidence 2: Requirements are unclear
196
+ Likelihood ratio: 0.6x → Posterior: 0.38
197
+
198
+ Evidence 3: Critical dependency has risk
199
+ Likelihood ratio: 0.7x → Posterior: 0.30
200
+
201
+ Final estimate: 30% chance of on-time delivery
202
+ ```
203
+
204
+ ## Mental Shortcuts
205
+
206
+ ### Strong vs Weak Evidence
207
+ | Evidence Type | Typical Likelihood Ratio |
208
+ |---------------|-------------------------|
209
+ | Definitive proof | 100x+ |
210
+ | Strong evidence | 10-100x |
211
+ | Moderate evidence | 3-10x |
212
+ | Weak evidence | 1.5-3x |
213
+ | Noise | ~1x (no update) |
214
+
215
+ ### When to Update Significantly
216
+ Update strongly when:
217
+ - Evidence is surprising under your current belief
218
+ - Evidence comes from reliable source
219
+ - Evidence is specific to your hypothesis
220
+
221
+ Update weakly when:
222
+ - Evidence is expected regardless of hypothesis
223
+ - Source has unknown reliability
224
+ - Evidence is circumstantial
225
+
226
+ ### Base Rate Neglect (Avoid This)
227
+ Common error: Ignoring prior probability when evidence arrives
228
+ ```
229
+ Wrong: "Positive test = probably have disease"
230
+ Right: "Positive test shifts probability, but base rate matters"
231
+ ```
232
+
233
+ ## Calibration Check
234
+
235
+ ### Are You Well-Calibrated?
236
+ Track predictions and outcomes:
237
+ - Of things you said were "70% likely," did ~70% happen?
238
+ - If you're always overconfident, widen your uncertainty
239
+ - If you're always underconfident, trust your assessments more
240
+
241
+ ### Confidence Levels
242
+ | Stated Confidence | Should Mean |
243
+ |-------------------|------------|
244
+ | 50% | Coin flip |
245
+ | 70% | Would bet 2:1 |
246
+ | 90% | Would bet 9:1 |
247
+ | 99% | Would bet 99:1 |
248
+
249
+ ## Verification Checklist
250
+ - [ ] Established explicit prior probability (not just "I think...")
251
+ - [ ] Assessed likelihood ratio of evidence
252
+ - [ ] Applied update mathematically (not just "more/less likely")
253
+ - [ ] Considered base rates for rare events
254
+ - [ ] Checked for base rate neglect
255
+ - [ ] Documented reasoning for future calibration
256
+
257
+ ## Key Questions
258
+ - "What was my belief before this evidence?"
259
+ - "How likely is this evidence if my belief is true? If false?"
260
+ - "What's the likelihood ratio?"
261
+ - "Am I anchoring on the evidence and ignoring base rates?"
262
+ - "How would I bet on this? At what odds?"
263
+
264
+ ## Kahneman's Warning
265
+ "People tend to assess the relative importance of issues by the ease with which they are retrieved from memory—and this is largely determined by the extent of coverage in the media."
266
+
267
+ Don't let vivid evidence override base rates. A plane crash doesn't make flying more dangerous than driving, even though it feels that way.