28 eval-informed mental models and critical-thinking skills for Claude Code, GitHub Copilot, Codex, Cursor, and other Agent Skills-compatible tools
JavaScript agent-skillsai-toolsanthropicclaudeclaude-codecritical-thinkingdecision-makingfirst-principlesmental-modelsproblem-solvingsystems-thinking
Initial release: 18 thinking skills for Claude Code
Travis Boudreaux114a97c62f21
diff --git a/.claude/skills/thinking-archetypes/SKILL.md b/.claude/skills/thinking-archetypes/SKILL.mdnew file mode 100644index 0000000..f5a51c9--- /dev/null+++ b/.claude/skills/thinking-archetypes/SKILL.md@@ -0,0 +1,469 @@+---+name: thinking-archetypes+description: Recognize Senge's Systems Archetypes to diagnose recurring organizational and technical problems, identify why fixes keep failing, and design interventions that address root structure.+---++# Systems Archetypes++## Overview++Systems archetypes, developed by Peter Senge in "The Fifth Discipline," are recurring patterns of behavior in organizations and systems. Like design patterns in software, once you recognize them, you see them everywhere—and more importantly, you can predict where they lead and intervene effectively.++**Core Principle:** Most organizational problems aren't unique. They follow predictable patterns with predictable consequences. Recognizing the pattern reveals the leverage points.++## When to Use++- The same problems keep recurring despite multiple "fixes"+- Quick fixes seem to make things worse over time+- Teams or departments are stuck in counterproductive cycles+- Growth has stalled without obvious cause+- Competition or conflict is escalating destructively+- Shared resources are being depleted+- Success in one area is starving others++Decision flow:++```+Problem keeps recurring despite fixes? → yes → APPLY ARCHETYPES+Growth hit invisible ceiling? → yes → APPLY ARCHETYPES+Competition escalating destructively? → yes → APPLY ARCHETYPES+Shared resource degrading? → yes → APPLY ARCHETYPES+```++## The Seven Core Archetypes++### 1. Fixes That Fail++**Pattern:** A quick fix addresses symptoms but creates side effects that eventually make the original problem worse.++```+ Problem+ │+ ▼+ ┌─────────────┐+ │ Quick Fix │──────────────┐+ └─────────────┘ │+ │ │+ ▼ │+ Symptom Relief │+ (short-term) │+ ▼+ Unintended+ Consequence+ │+ │ (delay)+ │+ ▼+ Problem+ Worsens+```++**Recognition Signs:**++- "We fixed this last quarter, why is it back?"+- Solution requires repeated application with increasing doses+- New problems emerged after implementing the fix+- The fix addresses symptoms, not root cause++**Software Examples:**++- Adding more servers instead of fixing memory leak → costs spiral, leak remains+- Hiring contractors to meet deadline → knowledge loss increases future delays+- Skipping tests to ship faster → bugs multiply, requiring more hotfixes+- Silencing alerts instead of investigating → system degrades until outage++**Leverage Points:**++- Identify and address root cause, not symptoms+- Ask "What side effects might this create?"+- Build in delay to observe consequences before scaling fix+- Make unintended consequences visible early++---++### 2. Shifting the Burden++**Pattern:** A symptomatic solution is used instead of a fundamental solution, reducing pressure to address the real problem and creating dependency.++```+ Problem Symptom+ ┌─────┴─────┐+ ▼ ▼+ ┌──────────┐ ┌──────────────┐+ │Symptomatic│ │ Fundamental │+ │ Solution │ │ Solution │+ └────┬─────┘ └──────┬───────┘+ │ │+ │ (quick) │ (slow, hard)+ │ │+ ▼ ▼+ Relief + Actual+ Dependency Resolution+ │+ ▼+ Fundamental+ Solution Atrophies+```++**Recognition Signs:**++- Heavy reliance on workarounds+- "We know the real fix, but we don't have time"+- Expertise for fundamental solution is disappearing+- External helpers (consultants, contractors) are permanent++**Software Examples:**++- Using feature flags to hide bugs → never fixing underlying issues+- Operations team manually intervening → no investment in automation+- Senior devs always fixing junior code → juniors never learn+- Buying SaaS tools instead of building core capability → vendor lock-in++**Leverage Points:**++- Make the fundamental solution visible and valued+- Track and limit use of symptomatic solutions+- Invest in building internal capability+- Ask "What capability are we not developing by using this workaround?"++---++### 3. Limits to Growth++**Pattern:** A reinforcing loop drives growth, but eventually encounters a balancing constraint that slows or stops growth.++```+ ┌───────────────────────────────────┐+ │ │+ ▼ │+ Growing ────(+)────▶ Results+ Action │+ │+ │+ ┌────────────────────┘+ │+ ▼+ ┌───────────┐+ │ Limiting │+ │ Condition │+ └─────┬─────┘+ │+ │ (-)+ ▼+ Slowing+ Action+```++**Recognition Signs:**++- Growth was strong, then plateaued without obvious cause+- More effort yields diminishing returns+- A resource or capability is maxed out+- Success is creating its own bottlenecks++**Software Examples:**++- Team velocity drops as codebase grows (complexity limit)+- Adding engineers doesn't speed delivery (communication overhead)+- Feature growth slows due to technical debt (architectural limit)+- User growth outpaces database capacity (infrastructure limit)++**Leverage Points:**++- Identify the limiting factor early, before it binds+- Invest in removing constraints BEFORE they become critical+- Don't push harder on the reinforcing loop—address the constraint+- Ask "What will limit our growth at 10x scale?"++---++### 4. Tragedy of the Commons++**Pattern:** Individuals gain by using a shared resource, but collective overuse depletes the resource for everyone.++```+ ┌──────────────┐ ┌──────────────┐+ │ Actor A's │ │ Actor B's │+ │ Activity │ │ Activity │+ └──────┬───────┘ └──────┬───────┘+ │ │+ │ (individual gain) │ (individual gain)+ │ │+ ▼ ▼+ ┌────────────────────────────────┐+ │ Shared Resource │+ │ (depletes over time) │+ └────────────────────────────────┘+ │+ │ (delay)+ ▼+ Resource Degradation+ Affects All Actors+```++**Recognition Signs:**++- Shared resources are degrading (CI/CD, staging environments, shared services)+- Everyone optimizes locally at expense of global system+- "Somebody else will fix it" mentality+- No clear ownership of shared infrastructure++**Software Examples:**++- Teams overload shared CI/CD → everyone's builds slow down+- No one invests in shared libraries → they rot+- Staging environment becomes unreliable → everyone bypasses it+- On-call knowledge isn't documented → tribal knowledge concentrates+- Cloud costs spike as teams spin up resources without cleanup++**Leverage Points:**++- Make usage visible and attributable+- Create feedback loops (chargebacks, quotas, dashboards)+- Establish shared governance with clear ownership+- Align individual incentives with collective health+- Ask "Who is responsible for the long-term health of this?"++---++### 5. Escalation++**Pattern:** Two parties perceive their success as relative to each other. Each side's actions provoke response, leading to escalating competition that harms both.++```+ ┌─────────────┐ ┌─────────────┐+ │ Actor A │ │ Actor B │+ │ Action │ │ Action │+ └──────┬──────┘ └──────┬──────┘+ │ │+ │ ┌───────────────┐ │+ └────▶│ Relative │◀─────┘+ │ Standing │+ └───────────────┘+ │+ │ (perceived threat)+ ┌─────────────┴─────────────┐+ ▼ ▼+ A Increases B Increases+ Action Action+ │ │+ └───────────────────────────┘+ (cycle repeats)+```++**Recognition Signs:**++- "They did X, so we have to do Y"+- Arms race dynamics in spending, features, or resources+- Each side feels defensive, not aggressive+- Win-lose framing of what could be win-win++**Software Examples:**++- Feature war with competitor → both over-invest, neither profits+- Microservices teams duplicating functionality → bloat and inconsistency+- Departments hoarding headcount → organizational inefficiency+- Interview arms race → absurd technical interviews that don't predict success++**Leverage Points:**++- Step back and question the "game" being played+- Find ways to opt out or change the rules+- Establish shared standards or agreements+- Focus on absolute value, not relative position+- Ask "What would happen if we stopped competing on this dimension?"++---++### 6. Success to the Successful++**Pattern:** If success gives access to more resources, initial advantages compound while others are starved, creating winner-take-all dynamics.++```+ ┌─────────────┐ ┌─────────────┐+ │ Actor A │ │ Actor B │+ │ (initial │ │ (initial │+ │ success) │ │ struggle) │+ └──────┬──────┘ └──────┬──────┘+ │ │+ ▼ ▼+ More Resources Fewer Resources+ Allocated to A Allocated to B+ │ │+ ▼ ▼+ A More Likely B Less Likely+ to Succeed to Succeed+ │ │+ └───────────────────────────┘+ (cycle compounds)+```++**Recognition Signs:**++- Star performers get more opportunities, others stagnate+- Successful products get more investment, experiments are starved+- Some teams have surplus resources while others are underwater+- Past success is the main predictor of future investment++**Software Examples:**++- Legacy monolith gets all attention → new architecture never matures+- Star engineer gets all interesting projects → others disengage+- Flagship product consumes resources → innovation pipeline dies+- Cloud costs centralized → teams with budget dominate++**Leverage Points:**++- Ensure fair initial resource allocation+- Create protected space for emerging initiatives+- Evaluate on trajectory, not just current position+- Deliberately invest in "underdogs" with potential+- Ask "Are we starving future successes to feed current ones?"++---++### 7. Growth and Underinvestment++**Pattern:** Growth approaches a limit that could be addressed by investment in capacity, but the investment isn't made until performance degrades, triggering a crisis.++```+ Demand+ │+ │ (grows)+ ▼+ ┌───────────┐+ │ Capacity │ (fixed or slowly growing)+ └───────────┘+ │+ │ (demand > capacity)+ ▼+ Performance+ Degradation+ │+ │ (finally triggers)+ ▼+ Investment+ Decision+ │+ │ (but with delay)+ ▼+ Capacity+ Increase+ (too late, crisis already happened)+```++**Recognition Signs:**++- "We'll invest in X when we really need it"+- Performance degrades, then investment happens reactively+- Chronic underinvestment in infrastructure, platform, or people+- Standard is "good enough for now"++**Software Examples:**++- Database not upgraded until it crashes under load+- Security investment only after breach+- Team not grown until burnout causes attrition+- Technical debt addressed only during outages+- Documentation written only when onboarding fails++**Leverage Points:**++- Define performance standards and invest to maintain them+- Lead indicators (not lag) should trigger investment+- Calculate cost of delayed investment (opportunity cost, crisis cost)+- Build investment into growth plans proactively+- Ask "What will fail if we grow 50% without additional investment?"++---++## Archetype Diagnosis Process++### Step 1: Describe the Problem Neutrally++Document what's happening without blame:++- What symptoms are visible?+- Who is involved?+- What has been tried?+- What keeps recurring?++### Step 2: Map the Feedback Loops++Draw the causal connections:++- What causes what?+- Where are reinforcing loops (amplifying)?+- Where are balancing loops (limiting)?+- Where are delays?++### Step 3: Match to Archetype++Compare your map to the seven patterns:++| If You See... | Consider Archetype |+|---------------|-------------------|+| Fix that makes problem worse over time | Fixes That Fail |+| Workaround becoming dependency | Shifting the Burden |+| Growth hitting invisible ceiling | Limits to Growth |+| Shared resource degrading | Tragedy of the Commons |+| Competitive spiral harming both sides | Escalation |+| Winner-take-all resource dynamics | Success to the Successful |+| Reactive investment after crisis | Growth and Underinvestment |++### Step 4: Identify Leverage Points++Don't push on the obvious—find where small changes have large effects:++- Where can you break a reinforcing loop?+- Where can you remove a constraint?+- What information is missing that would change behavior?+- What incentives are misaligned?++### Step 5: Design Intervention++Target the structure, not the symptoms:++- What fundamental solution is being avoided?+- What constraint needs investment?+- What feedback loop is missing or delayed?+- How can you make the system self-correcting?++---++## Quick Reference Card++| Archetype | Pattern | Key Question |+|-----------|---------|--------------|+| Fixes That Fail | Quick fix creates long-term problems | "What side effects will this create?" |+| Shifting the Burden | Dependency on symptomatic solutions | "What capability are we not building?" |+| Limits to Growth | Reinforcing loop hits constraint | "What will limit us at 10x?" |+| Tragedy of the Commons | Individual gain depletes shared resource | "Who owns the long-term health?" |+| Escalation | Competitive loop worsens both | "Can we change the game?" |+| Success to the Successful | Winner-take-all dynamics | "Are we starving future successes?" |+| Growth and Underinvestment | Capacity lags demand until crisis | "What fails at 50% growth?" |++## Verification Checklist++- [ ] Problem described without blame+- [ ] Feedback loops mapped (reinforcing and balancing)+- [ ] Delays identified in the system+- [ ] Matched to one or more archetypes+- [ ] Leverage points identified (not just symptoms)+- [ ] Intervention targets structure, not behavior+- [ ] Unintended consequences of intervention considered++## Key Questions++- "What pattern is this system stuck in?"+- "Where would a small change have a large effect?"+- "What fundamental solution are we avoiding?"+- "What would make this system self-correcting?"+- "If we do nothing, where does this pattern lead?"+- "Who benefits from the current structure persisting?"++## Senge's Wisdom++"Structures of which we are unaware hold us prisoner. Once we can see them, they no longer have the same hold on us."++Recognizing the archetype is the first step to escaping it. The pattern will continue until someone sees it and changes the underlying structure—not the behaviors, but what's driving them.diff --git a/.claude/skills/thinking-bayesian/SKILL.md b/.claude/skills/thinking-bayesian/SKILL.mdnew file mode 100644index 0000000..c71b906--- /dev/null+++ b/.claude/skills/thinking-bayesian/SKILL.md@@ -0,0 +1,247 @@+---+name: thinking-bayesian+description: Update beliefs systematically based on new evidence using probabilistic reasoning. Use when estimating probabilities, learning from data, or making decisions under uncertainty.+---++# Bayesian Reasoning++## Overview+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.++**Core Principle:** Beliefs are probabilities that should update incrementally as evidence arrives. Strong priors require strong evidence to shift.++## When to Use+- Estimating probabilities or likelihoods+- Interpreting test results or metrics+- Making decisions with incomplete information+- Evaluating competing hypotheses+- Learning from experiments or A/B tests+- Diagnosing problems with uncertain causes+- Predicting outcomes based on historical data++Decision flow:+```+Uncertain about something? → yes → Have prior belief? → yes → New evidence? → APPLY BAYESIAN UPDATE+ ↘ no → Establish base rate first+ ↘ no → Standard analysis may suffice+```++## Key Concepts++### Prior Probability+Your belief BEFORE seeing new evidence:+```+P(H) = probability that hypothesis H is true++Example: Before any symptoms, what's the probability someone has disease X?+ Use base rate: If 1 in 1000 people have it, P(disease) = 0.001+```++### Likelihood+How probable is the evidence IF the hypothesis is true?+```+P(E|H) = probability of seeing evidence E, given H is true++Example: If someone HAS the disease, what's the probability of a positive test?+ If test is 99% sensitive: P(positive|disease) = 0.99+```++### Posterior Probability+Your belief AFTER seeing the evidence:+```+P(H|E) = updated probability of H, given you observed E++This is what Bayes' Theorem calculates.+```++## Bayes' Theorem++```+ P(E|H) × P(H)+P(H|E) = ─────────────────────────+ P(E)++Where:+ P(H|E) = posterior (what we want)+ P(E|H) = likelihood (how expected is evidence if H true)+ P(H) = prior (initial belief)+ P(E) = total probability of evidence+```++### Intuitive Form++```+Posterior odds = Prior odds × Likelihood ratio++If evidence is 10x more likely under H than under not-H,+your odds should shift by factor of 10.+```++## The Process++### Step 1: Establish Your Prior+What did you believe before this evidence?+- Use base rates when available+- Be explicit about uncertainty+- Don't anchor on 50% just because you're unsure++```+Question: Will this feature increase conversion?+Prior: Based on similar features, ~30% succeed significantly+ P(success) = 0.30+```++### Step 2: Assess the Evidence+How strong is this evidence? Consider:+- How likely is this evidence if hypothesis is TRUE?+- How likely is this evidence if hypothesis is FALSE?+- What's the ratio?++```+Evidence: Early A/B test shows 5% lift (p=0.08)+P(this result | feature works) = 0.60 (moderately expected)+P(this result | feature doesn't work) = 0.15 (possible but less likely)+Likelihood ratio = 0.60 / 0.15 = 4x+```++### Step 3: Update Your Belief+Apply the likelihood ratio to your prior:++```+Prior odds: 0.30 / 0.70 = 0.43+Likelihood ratio: 4x+Posterior odds: 0.43 × 4 = 1.72+Posterior probability: 1.72 / (1 + 1.72) = 0.63++Updated belief: 63% confidence feature will succeed+(up from 30% prior)+```++### Step 4: Iterate as More Evidence Arrives+Yesterday's posterior becomes today's prior:++```+New evidence: Week 2 shows lift holding at 4.5%+Prior (from step 3): 0.63+[Repeat update process]+New posterior: 0.78+```++## Common Applications++### Interpreting Test Results+```+Scenario: Test for rare disease (1 in 10,000 prevalence)+Test: 99% sensitive, 99% specific++Prior: P(disease) = 0.0001+If positive test:+ P(positive|disease) = 0.99+ P(positive|no disease) = 0.01+ P(positive) = 0.99 × 0.0001 + 0.01 × 0.9999 ≈ 0.0101++Posterior: P(disease|positive) = (0.99 × 0.0001) / 0.0101 ≈ 0.0098++Even with 99% accurate test, positive result only means ~1% chance of disease!+Base rate dominates when condition is rare.+```++### Debugging+```+Bug report: Users see error X+Prior beliefs:+ P(database issue) = 0.20+ P(network issue) = 0.30+ P(code bug) = 0.40+ P(user error) = 0.10++Evidence: Error happens only on mobile+ P(mobile-only | database) = 0.05+ P(mobile-only | network) = 0.30+ P(mobile-only | code bug) = 0.60+ P(mobile-only | user error) = 0.40++Update: Code bug becomes most likely (posterior ~0.55)+Next step: Investigate mobile-specific code paths+```++### Project Estimation+```+Prior: Based on similar projects, P(on-time) = 0.40++Evidence 1: Team is experienced with this stack+ Likelihood ratio: 1.5x → Posterior: 0.50++Evidence 2: Requirements are unclear+ Likelihood ratio: 0.6x → Posterior: 0.38++Evidence 3: Critical dependency has risk+ Likelihood ratio: 0.7x → Posterior: 0.30++Final estimate: 30% chance of on-time delivery+```++## Mental Shortcuts++### Strong vs Weak Evidence+| Evidence Type | Typical Likelihood Ratio |+|---------------|-------------------------|+| Definitive proof | 100x+ |+| Strong evidence | 10-100x |+| Moderate evidence | 3-10x |+| Weak evidence | 1.5-3x |+| Noise | ~1x (no update) |++### When to Update Significantly+Update strongly when:+- Evidence is surprising under your current belief+- Evidence comes from reliable source+- Evidence is specific to your hypothesis++Update weakly when:+- Evidence is expected regardless of hypothesis+- Source has unknown reliability+- Evidence is circumstantial++### Base Rate Neglect (Avoid This)+Common error: Ignoring prior probability when evidence arrives+```+Wrong: "Positive test = probably have disease"+Right: "Positive test shifts probability, but base rate matters"+```++## Calibration Check++### Are You Well-Calibrated?+Track predictions and outcomes:+- Of things you said were "70% likely," did ~70% happen?+- If you're always overconfident, widen your uncertainty+- If you're always underconfident, trust your assessments more++### Confidence Levels+| Stated Confidence | Should Mean |+|-------------------|-------------|+| 50% | Coin flip |+| 70% | Would bet 2:1 |+| 90% | Would bet 9:1 |+| 99% | Would bet 99:1 |++## Verification Checklist+- [ ] Established explicit prior probability (not just "I think...")+- [ ] Assessed likelihood ratio of evidence+- [ ] Applied update mathematically (not just "more/less likely")+- [ ] Considered base rates for rare events+- [ ] Checked for base rate neglect+- [ ] Documented reasoning for future calibration++## Key Questions+- "What was my belief before this evidence?"+- "How likely is this evidence if my belief is true? If false?"+- "What's the likelihood ratio?"+- "Am I anchoring on the evidence and ignoring base rates?"+- "How would I bet on this? At what odds?"++## Kahneman's Warning+"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."++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.diff --git a/.claude/skills/thinking-bounded-rationality/SKILL.md b/.claude/skills/thinking-bounded-rationality/SKILL.mdnew file mode 100644index 0000000..4370ccd--- /dev/null+++ b/.claude/skills/thinking-bounded-rationality/SKILL.md@@ -0,0 +1,391 @@+---+name: thinking-bounded-rationality+description: Apply Herbert Simon's Bounded Rationality and satisficing to make good-enough decisions under real-world constraints. Use for design decisions under time pressure, recognizing cognitive limits, and setting appropriate stopping criteria.+---++# Bounded Rationality and Satisficing++## Overview++Herbert Simon's Bounded Rationality recognizes that human decision-making is limited by three fundamental constraints: available information, cognitive capacity, and time. Rather than pursuing optimal solutions (which is often impossible), Simon proposed "satisficing"—a portmanteau of satisfy + suffice—choosing solutions that are good enough to meet requirements.++**Core Principle:** "Decision makers can satisfice either by finding optimum solutions for a simplified world, or by finding satisfactory solutions for a more realistic world." — Herbert Simon++## When to Use++- Making design decisions under time pressure+- Facing complex problems with incomplete information+- Analysis paralysis is blocking progress+- Optimization costs exceed potential benefits+- Need to set stopping criteria for searches/research+- Evaluating when "good enough" beats "perfect"+- Resource allocation under constraints++Decision flow:++```+Decision needed? → yes → Do you have perfect information? → rarely+ ↘+ Is optimization cost justified? → no → SATISFICE+ ↘ yes → Optimize (but verify cost)+```++## The Three Constraints++### 1. Information Bounds++**What you can know is limited**++- Complete information rarely exists+- Gathering more information has costs+- Information has diminishing returns+- Future states are inherently uncertain++```+Example: Choosing a technology stack+Reality: You can't test every option in production+ You can't predict 5-year industry shifts+ You can't know your future team composition+Satisfice: Pick a well-supported option that meets current needs+```++### 2. Cognitive Bounds++**What you can process is limited**++- Working memory holds ~4-7 items+- Complex comparisons overwhelm analysis+- Decision fatigue degrades quality+- Expertise helps but doesn't eliminate limits++```+Example: Reviewing architecture options+Reality: You can't hold 20 tradeoffs in mind simultaneously+ You can't model all interaction effects+ You can't foresee all edge cases+Satisfice: Focus on the 3-5 most critical criteria+```++### 3. Time Bounds++**When you must decide is constrained**++- Deadlines are real+- Markets move+- Opportunities expire+- Perfect is the enemy of shipped++```+Example: Technical design for Q1 deadline+Reality: You have 2 weeks, not 2 months+ The business needs an answer now+ Delaying has its own costs+Satisfice: Make the best decision possible with available time+```++## Satisficing vs. Optimizing++### When to Satisfice++| Signal | Why Satisfice |+|--------|---------------|+| Reversible decision | Can adjust later with more information |+| Time pressure | Cost of delay exceeds value of more analysis |+| Diminishing returns | 80% solution found, 100% would take 10x effort |+| High uncertainty | More analysis won't reduce uncertainty meaningfully |+| Many acceptable options | Several solutions meet requirements adequately |+| Low stakes | Consequences of suboptimal choice are minor |++### When to Optimize++| Signal | Why Optimize |+|--------|--------------|+| Irreversible decision | Mistakes are permanent or very costly to undo |+| High stakes | Wrong choice has severe consequences |+| Clear criteria | You know exactly what "best" means |+| Bounded search space | All options can actually be evaluated |+| Available time | Deadline allows for thorough analysis |+| Clear value of optimal | Difference between good and best is significant |++## The Satisficing Process++### Step 1: Define Aspiration Level++Set the minimum acceptable threshold for each criterion:++```+Example: Hiring a senior engineer+Optimizing: Find the absolute best candidate+Satisficing: Find a candidate who:+- Has 5+ years relevant experience ✓+- Can pass technical interview ✓+- Salary expectations fit budget ✓+- Available to start within 4 weeks ✓+- Culture fit (team confirms) ✓++First candidate who meets all criteria → Hire+```++### Step 2: Search Sequentially++Evaluate options one at a time against aspiration level:++```+Option A: Meets 4/5 criteria → Continue search+Option B: Meets 3/5 criteria → Continue search+Option C: Meets 5/5 criteria → STOP, choose this one+```++Key insight: You don't compare options against each other, you compare each option against your threshold.++### Step 3: Adjust Aspiration If Needed++If search is too long or too short, recalibrate:++```+Too many options qualify → Raise aspiration level+Nothing qualifies after reasonable search → Lower aspiration level+```++### Step 4: Commit and Move On++Once threshold is met:++- Stop searching+- Accept the decision+- Resist second-guessing+- Redirect energy to execution++## Application Patterns++### For Technical Design++```+Scenario: Choose a message queue for new service++Satisficing approach:+1. Define requirements (aspiration level):+ - At-least-once delivery ✓+ - Handles 10k msg/sec ✓+ - Team familiarity or fast learning curve ✓+ - Managed option available ✓+ - Within cost budget ✓++2. Evaluate sequentially:+ - RabbitMQ: Meets all → STOP, use RabbitMQ++3. Don't continue researching Kafka, SQS, etc.+ unless RabbitMQ fails threshold+```++### For Code Review++```+Scenario: Reviewing a PR under time pressure++Satisficing approach:+1. Define "good enough" criteria:+ - No security vulnerabilities ✓+ - Tests pass ✓+ - No obvious performance issues ✓+ - Code is readable ✓+ - Follows project conventions ✓++2. Stop when criteria met+ Don't perfect every line if shipping matters+```++### For Research/Investigation++```+Scenario: Debugging production issue++Satisficing approach:+1. Define stopping criteria:+ - Root cause identified ✓+ - Fix verified in staging ✓+ - Rollback plan exists ✓++2. Stop investigating once you can fix+ Don't exhaustively trace every code path+ if you have a working solution+```++### For Feature Scope++```+Scenario: MVP feature set decisions++Satisficing approach:+1. Define "enough to learn":+ - Core user job addressed ✓+ - Measurable success metric exists ✓+ - Usable enough for feedback ✓+ - Can ship within sprint ✓++2. First scope that meets criteria → Ship it+ Don't polish what you might throw away+```++## Setting Appropriate Aspiration Levels++### Too High → Analysis Paralysis++Symptoms:++- Nothing ever meets the bar+- Endless research and comparison+- Decisions perpetually delayed+- Perfect becomes enemy of good++Fix: Ask "What's the minimum that would be acceptable?"++### Too Low → Poor Outcomes++Symptoms:++- Frequent rework required+- Quality issues in production+- Technical debt accumulation+- Stakeholder dissatisfaction++Fix: Ask "What past decisions do I regret? What threshold would have prevented them?"++### Calibration Heuristics++```+Reversibility Check:+- Easily reversible → Lower aspiration OK+- Hard to reverse → Raise aspiration++Consequence Check:+- Minor consequences → Lower aspiration OK+- Major consequences → Raise aspiration++Time Check:+- Tight deadline → Accept lower aspiration+- Ample time → Can afford higher aspiration+```++## Common Traps++### Trap 1: Satisficing Feels Like Settling++**Reality:** Satisficing is rational under constraints, not lazy.++```+Optimizing with infinite time = mathematically correct+Optimizing with real constraints = often irrational+Satisficing = adapted to actual world+```++### Trap 2: Post-Decision Regret++**Reality:** Finding a better option later doesn't mean the decision was wrong.++```+You chose Option B (met threshold)+Later discovered Option D was "better"+This is expected—you stopped searching at B+Regret is only valid if B didn't meet your threshold+```++### Trap 3: Creeping Aspiration++**Reality:** Moving goalposts prevent closure.++```+Original: "Need 100ms response time"+After meeting it: "Actually, 50ms would be better"+After that: "Hmm, 25ms would be ideal..."++Fix: Lock aspiration level before search begins+```++### Trap 4: Satisficing the Wrong Things++**Reality:** Some decisions warrant optimization.++```+Wrong to satisfice:+- Security critical systems+- Legal compliance+- Safety-critical code+- Irreversible architectural choices++Right to satisfice:+- Internal tooling+- Reversible experiments+- Style preferences+- Low-stakes choices+```++## Integration with Other Thinking Models++### With First Principles++```+Use First Principles to determine:+- What constraints are real vs assumed?+- What is the fundamental requirement?+Then satisfice against those fundamentals+```++### With Inversion++```+Use Inversion to set aspiration level:+- "What would make this solution unacceptable?"+- Avoid those failure modes+- Any option avoiding them satisfices+```++### With Circle of Competence++```+Outside your circle:+- You can't evaluate "optimal" anyway+- Satisficing is your only realistic option+- Set thresholds based on expert input++Inside your circle:+- You can choose when to optimize vs satisfice+- Trust your calibrated aspiration levels+```++### With Pre-Mortem++```+Run pre-mortem to validate aspiration level:+- "If this satisficed solution fails, why?"+- Adjust thresholds to prevent likely failures+- Don't over-engineer against unlikely failures+```++## Verification Checklist++- [ ] Identified whether this decision warrants optimizing or satisficing+- [ ] Set clear aspiration level before searching+- [ ] Defined explicit stopping criteria+- [ ] Evaluated options against threshold, not against each other+- [ ] Stopped when threshold was met (or adjusted threshold rationally)+- [ ] Committed to decision without continued comparison shopping+- [ ] Documented reasoning for future reference++## Key Questions++- "What's the minimum acceptable solution here?"+- "What would 'good enough' look like for this decision?"+- "Is more research likely to change my decision?"+- "What's the cost of continued analysis vs acting now?"+- "Can I reverse this decision if I learn more later?"+- "Am I searching for best, or searching to avoid deciding?"+- "What threshold would I set for someone else in my position?"++## Simon's Insight++"A wealth of information creates a poverty of attention."++In a world of infinite information and finite attention, satisficing isn't settling—it's adapting to reality. The goal isn't to make perfect decisions, but to make good decisions efficiently, preserving cognitive resources for the problems that truly require optimization.++The satisficer who ships beats the optimizer who's still researching.diff --git a/.claude/skills/thinking-circle-of-competence/SKILL.md b/.claude/skills/thinking-circle-of-competence/SKILL.mdnew file mode 100644index 0000000..bb71005--- /dev/null+++ b/.claude/skills/thinking-circle-of-competence/SKILL.md@@ -0,0 +1,273 @@+---+name: thinking-circle-of-competence+description: Know the boundaries of your expertise and operate within them. Use when evaluating opportunities, making decisions outside your domain, or assessing when to defer to experts.+---++# Circle of Competence++## Overview+The Circle of Competence, articulated by Warren Buffett and Charlie Munger, emphasizes knowing the boundaries of your genuine expertise. The key insight isn't about having a large circle—it's about knowing precisely where your circle ends. Operating within your circle leads to better decisions; operating outside it without recognizing it leads to costly mistakes.++**Core Principle:** "Know what you don't know. The boundaries of your circle are more important than its size." — Warren Buffett++## When to Use+- Evaluating new opportunities or projects+- Making decisions in unfamiliar domains+- Assessing whether to delegate or learn+- Investment or resource allocation decisions+- Taking on new responsibilities+- Advising others on topics+- Hiring or team composition decisions++Decision flow:+```+Decision to make? → yes → Inside your circle? → yes → Proceed with confidence+ ↘ no → Delegate, learn, or pass+ ↘ no → Not applicable+```++## The Three Zones++### Zone 1: Inside Your Circle+**True competence through deep experience**++Characteristics:+- You've made decisions here repeatedly+- You've seen failure modes firsthand+- You can predict second-order effects+- You know what you don't know within this area+- You can teach others the nuances++```+Example: Senior backend engineer+Inside circle:+- API design patterns that scale+- Database optimization strategies+- When to use caching vs. not+- Common failure modes in distributed systems+- Debugging production issues+```++### Zone 2: Edge of Your Circle+**Familiar but not expert**++Characteristics:+- You know the basics+- You can have informed conversations+- You might miss edge cases+- You need to verify your assumptions+- You should seek review from experts++```+Example: Same backend engineer+Edge of circle:+- Frontend performance optimization+- Basic security practices+- Cloud cost optimization+- Team management fundamentals+```++### Zone 3: Outside Your Circle+**Dangerous territory**++Characteristics:+- Knowledge is superficial or outdated+- You don't know what you don't know+- Decisions feel confident but are often wrong+- High risk of Dunning-Kruger effect+- Should delegate or deeply learn before deciding++```+Example: Same backend engineer+Outside circle:+- Mobile app development+- Machine learning model tuning+- Legal/compliance decisions+- Financial forecasting+```++## Mapping Your Circle++### Step 1: List Your Domains+What areas do you have experience in?+- Professional skills+- Industry knowledge+- Technical domains+- Business functions++### Step 2: Assess Depth Honestly+For each domain, ask:++| Question | Inside | Edge | Outside |+|----------|--------|------|---------|+| Could I teach this to an expert? | ✓ | | |+| Have I made real decisions here? | ✓ | ✓ | |+| Do I know the failure modes? | ✓ | | |+| Can I predict second-order effects? | ✓ | | |+| Do I know what I don't know here? | ✓ | ✓ | |+| Is my knowledge current? | ✓ | | |++### Step 3: Be Brutally Honest+Common self-deceptions:+- "I read a lot about it" ≠ competence+- "I understand the concepts" ≠ can execute+- "I did it once years ago" ≠ current competence+- "I'm smart, I can figure it out" ≠ expertise++### Step 4: Verify with Track Record+Look at past decisions:+- In areas you consider "inside," were you right?+- In areas you consider "edge," did you make mistakes?+- This calibrates your self-assessment++## Operating Within Your Circle++### When Inside: Act with Confidence+```+✓ Make decisions directly+✓ Move quickly+✓ Trust your intuition (it's trained)+✓ Teach and mentor others+✓ Push back on outside opinions if warranted+```++### When at Edge: Proceed with Caution+```+→ Seek input from those with deeper expertise+→ Validate assumptions before acting+→ Build in more margin for error+→ Document reasoning for review+→ Use this as learning opportunity+```++### When Outside: Delegate or Learn+```+Option A: Delegate+- Find someone with this in their circle+- Trust their judgment+- Don't override without strong reason++Option B: Learn First+- Invest significant time (months/years)+- Get hands-on experience+- Make small decisions first, learn from mistakes+- Gradually expand circle++Option C: Pass+- Some opportunities aren't for you+- "I don't know enough" is valid+- Opportunity cost of learning may be too high+```++## Common Traps++### Trap 1: Circle Creep+Your circle in one area doesn't extend to adjacent areas:+```+Inside: iOS development+Doesn't mean inside: Android development+Doesn't mean inside: iOS design+Doesn't mean inside: iOS project management+```++### Trap 2: Stale Expertise+Circles shrink if not maintained:+```+2015: Expert in jQuery+2024: jQuery knowledge is inside, but modern frontend is edge/outside+```++### Trap 3: Confidence Misread as Competence+Feeling confident ≠ being competent:+```+Dunning-Kruger peak: Know just enough to feel expert+Actually expert: Know enough to know how much you don't know+```++### Trap 4: Smart Person Syndrome+General intelligence doesn't expand circles:+```+Being smart at X doesn't make you competent at Y+Many smart people fail at investments, businesses, etc.+because they operate outside their circle confidently+```++## Application Examples++### Technical Decisions+```+Question: Should we adopt GraphQL?++Self-assessment:+- Have I built and maintained GraphQL at scale? No → Outside+- Do I know the failure modes? No → Outside+- Have I seen it succeed/fail in similar contexts? Partially → Edge++Decision: Consult with team members who have deep GraphQL experience,+ or run small pilot before committing+```++### Career Decisions+```+Question: Should I become a manager?++Self-assessment:+- Have I led teams before? A little → Edge+- Do I know management failure modes? Not really → Outside+- Can I predict what makes a good manager? Vaguely → Edge++Decision: Don't assume IC success transfers; seek mentorship,+ start with small team, treat as learning opportunity+```++### Business Decisions+```+Question: Should I invest in this startup?++Self-assessment:+- Do I understand this market? Superficially → Edge+- Can I evaluate the technology? No → Outside+- Do I know startup failure modes? Generally → Edge+- Have I made successful startup investments? No → Outside++Decision: This is outside my circle; either pass or find+ co-investors who have this in their circle+```++## Expanding Your Circle++### The Right Way+1. Start at the edge, not outside+2. Make small, reversible decisions+3. Get feedback on those decisions+4. Learn from mistakes in low-stakes situations+5. Build pattern recognition over time+6. Graduate to larger decisions as track record develops++### The Wrong Way+- Jump straight to big decisions in new domain+- Assume competence transfers+- Learn only theory without practice+- Avoid feedback on decisions+- Never acknowledge mistakes++## Verification Checklist+- [ ] Identified which zone this decision falls in+- [ ] If edge/outside: acknowledged uncertainty explicitly+- [ ] If outside: identified who has this in their circle+- [ ] If proceeding outside circle: limited downside exposure+- [ ] Honest about track record in this domain+- [ ] Not conflating confidence with competence++## Key Questions+- "Would I bet significant money on my judgment here?"+- "Have I made similar decisions successfully before?"+- "What don't I know that an expert would know?"+- "If I'm wrong, how would I know?"+- "Who has this in their circle that I could consult?"+- "Is my knowledge here current or stale?"++## Buffett's Reminder+"What counts for most people in investing is not how much they know, but rather how realistically they define what they don't know."++The advantage comes not from having the biggest circle, but from staying inside whatever circle you have—and knowing exactly where the boundary is.diff --git a/.claude/skills/thinking-debiasing/SKILL.md b/.claude/skills/thinking-debiasing/SKILL.mdnew file mode 100644index 0000000..48407c4--- /dev/null+++ b/.claude/skills/thinking-debiasing/SKILL.md@@ -0,0 +1,196 @@+---+name: thinking-debiasing+description: Systematic checklist to identify and counteract cognitive biases in decision-making. Use before major decisions, when evaluating recommendations, or when stakes are high.+---++# Cognitive Debiasing++## Overview+Based on Daniel Kahneman, Dan Lovallo, and Olivier Sibony's research, this skill provides a systematic checklist to identify cognitive biases that distort decisions. Awareness of biases alone doesn't prevent them—structured checklists and processes do.++**Core Principle:** Your brain is systematically wrong in predictable ways. Use checklists to catch errors your intuition will miss.++## When to Use+- Before making or approving major decisions+- Evaluating recommendations from others+- When stakes are high and errors costly+- When you feel very confident (overconfidence is a bias)+- During investment, hiring, or strategic decisions+- When a decision "feels right" but you can't articulate why++## System 1 vs System 2++| System 1 (Fast) | System 2 (Slow) |+|-----------------|-----------------|+| Automatic, effortless | Deliberate, effortful |+| Emotional, intuitive | Analytical, logical |+| Pattern-matching | Rule-following |+| Prone to biases | Can catch biases |+| Default mode | Requires activation |++**Goal:** Activate System 2 for important decisions using structured processes.++## The 12-Point Decision Quality Checklist++Before approving any significant recommendation, evaluate:++### Self-Interest Biases+**1. Is there self-interest at play?**+- Does the recommender benefit from this decision?+- Would they recommend the same if incentives were different?+- Are there conflicts of interest?++**2. Is there emotional attachment (affect heuristic)?**+- Has the team fallen in love with the proposal?+- Are they dismissing concerns too quickly?+- Is criticism being taken personally?++### Group Dynamics+**3. Has dissenting opinion been suppressed (groupthink)?**+- Were alternative views genuinely explored?+- Is there pressure to conform?+- Has a devil's advocate been assigned?++**4. Is there appropriate diversity of opinion?**+- Did independent thinkers contribute?+- Were estimates made independently before discussion?+- Has anyone with a different perspective reviewed this?++### Pattern Recognition Errors+**5. Are we over-relying on a single analogy (saliency bias)?**+- Is there one "this is just like X" dominating thinking?+- Have we sought disconfirming analogies?+- Are we cherry-picking the comparison?++**6. Are we anchored on an initial number?**+- Where did the first estimate come from?+- Would a different starting point change the conclusion?+- Have we re-estimated from scratch?++### Confirmation Bias+**7. Were credible alternatives seriously considered?**+- Did we explore at least 2-3 real alternatives?+- Were alternatives given fair evaluation?+- Or were they strawmen to justify the preferred option?++**8. Are we seeking confirming evidence only?**+- What evidence would disprove this thesis?+- Have we actively looked for disconfirming data?+- Are we explaining away contradictory evidence?++### Planning Fallacies+**9. Is the base case realistic?**+- Is this more optimistic than similar past projects?+- What's the base rate of success for similar efforts?+- Have we adjusted for "this time is different" thinking?++**10. Is the worst case bad enough?**+- Does worst case assume only one thing goes wrong?+- What if multiple risks materialize simultaneously?+- Have we considered tail risks?++**11. Are we discounting sunk costs appropriately?**+- Would we make this decision if starting fresh?+- Are we continuing because we've "invested too much"?+- What would an outsider with no history decide?++### Halo Effects+**12. Are we assuming success transfers?**+- Are we trusting this team/approach because of past wins?+- Were past successes in similar contexts?+- Are we attributing success to skill when luck played a role?++## Quick Debiasing Techniques++### For Anchoring+- Generate estimate BEFORE seeing others' numbers+- Ask: "What if the true number is 2x or 0.5x?"+- Use multiple independent estimators++### For Confirmation Bias+- Assign someone to argue the opposite position+- Ask: "What would make us wrong?"+- Seek out critics, not supporters++### For Overconfidence+- Widen confidence intervals (usually too narrow)+- Use reference class forecasting (base rates)+- Ask: "How often have similar predictions been right?"++### For Sunk Cost+- Ask: "Would we start this project today knowing what we know?"+- Ignore past investment when evaluating future returns+- Consider opportunity cost of continuing++### For Groupthink+- Collect independent opinions before discussion+- Assign devil's advocate role+- Make it safe to dissent++## Decision Quality Audit Template++```markdown+# Decision Quality Audit: [Decision Name]++## Recommendation Summary+[Brief description]++## Bias Checklist++### Self-Interest & Emotion+- [ ] Self-interest checked: [Notes]+- [ ] Emotional attachment assessed: [Notes]++### Group Dynamics+- [ ] Dissent encouraged: [Notes]+- [ ] Independent input gathered: [Notes]++### Pattern Recognition+- [ ] Multiple analogies considered: [Notes]+- [ ] Anchoring effects checked: [Notes]++### Confirmation Bias+- [ ] Alternatives genuinely evaluated: [Notes]+- [ ] Disconfirming evidence sought: [Notes]++### Planning Realism+- [ ] Base case reality-checked: [Notes]+- [ ] Worst case severe enough: [Notes]+- [ ] Sunk costs ignored: [Notes]++### Halo Effects+- [ ] Success transfer questioned: [Notes]++## Red Flags Identified+[List any concerns from checklist]++## Mitigations+[How will identified biases be addressed?]++## Decision+- [ ] Proceed as recommended+- [ ] Proceed with modifications+- [ ] Requires more analysis+- [ ] Reject recommendation+```++## Verification Checklist+- [ ] Systematically evaluated all 12 bias categories+- [ ] Identified at least 2 potential biases affecting this decision+- [ ] Applied specific debiasing technique to each identified bias+- [ ] Sought independent/outside perspective+- [ ] Documented reasoning for future reference+- [ ] Comfortable defending decision process (not just outcome)++## Key Questions+- "What would have to be true for this to be wrong?"+- "How confident am I, and what's driving that confidence?"+- "What would an outsider with fresh eyes conclude?"+- "Am I reasoning toward a conclusion I already want?"+- "What's the base rate of success for decisions like this?"+- "If I'm wrong, how will I know, and when?"++## Kahneman's Warning+"We can be blind to the obvious, and we are also blind to our blindness."++You cannot debias through willpower alone. Use checklists, processes, and outside perspectives to catch what your intuition misses.diff --git a/.claude/skills/thinking-dual-process/SKILL.md b/.claude/skills/thinking-dual-process/SKILL.mdnew file mode 100644index 0000000..c13763c--- /dev/null+++ b/.claude/skills/thinking-dual-process/SKILL.md@@ -0,0 +1,338 @@+---+name: thinking-dual-process+description: Apply Kahneman's Dual-Process Theory to recognize when to trust intuition vs engage deliberate analysis. Use for high-stakes decisions, error-prone contexts, or when balancing speed vs accuracy.+---++# Dual-Process Thinking++## Overview+Based on Daniel Kahneman's research (popularized in "Thinking, Fast and Slow"), Dual-Process Theory describes two distinct modes of thought: System 1 (fast, intuitive, automatic) and System 2 (slow, deliberate, analytical). Understanding when each system is active—and when each is appropriate—helps you avoid cognitive errors and make better decisions.++**Core Principle:** Know which system is driving your thinking. Engage System 2 for high-stakes decisions; trust System 1 for routine tasks and expert domains.++## When to Use+- Making decisions with significant consequences+- Recognizing when intuition may mislead+- Balancing speed vs accuracy tradeoffs+- Reviewing work for cognitive errors+- Teaching or coaching decision-making+- When "something feels off" but you can't articulate why+- Before trusting a gut feeling on important matters++Decision flow:+```+Making a decision? → High stakes? → yes → Unfamiliar domain? → yes → ENGAGE SYSTEM 2+ ↘ no → System 1 may suffice+ ↘ no → Time pressure? → yes → System 1 appropriate+ ↘ no → Choose based on complexity+```++## The Two Systems++### System 1: Fast Thinking+| Characteristic | Description |+|----------------|-------------|+| **Speed** | Instant, automatic |+| **Effort** | Effortless, no strain |+| **Control** | Involuntary, always on |+| **Mode** | Intuitive, associative |+| **Emotion** | Emotionally charged |+| **Basis** | Pattern recognition, heuristics |++System 1 excels at:+- Recognizing faces and emotions+- Detecting hostility in a voice+- Reading text effortlessly+- Driving on an empty road+- Finding 2 + 2+- Expert pattern recognition (chess masters, experienced doctors)++System 1 fails at:+- Complex calculations (17 × 24)+- Logical analysis of arguments+- Statistical reasoning+- Resisting cognitive biases+- Novel, unfamiliar problems++### System 2: Slow Thinking+| Characteristic | Description |+|----------------|-------------|+| **Speed** | Slow, sequential |+| **Effort** | Effortful, depleting |+| **Control** | Deliberate, voluntary |+| **Mode** | Analytical, rule-following |+| **Emotion** | Can override emotions |+| **Basis** | Logic, computation, rules |++System 2 excels at:+- Complex computations+- Logical reasoning+- Comparing options systematically+- Following explicit rules+- Self-monitoring and correction+- Novel problem-solving++System 2 fails at:+- Sustaining attention (gets tired)+- Operating under time pressure+- Processing when cognitively depleted+- Noticing when it should activate++## The Process++### Step 1: Identify Active System+Which system is currently driving your thinking?++System 1 indicators:+- Answer came immediately+- Feels obvious or intuitive+- High confidence without analysis+- Emotional reaction present+- "I just know"++System 2 indicators:+- Had to concentrate+- Worked through steps explicitly+- Mental effort required+- Considered alternatives+- "Let me think about this"++```+Example: "Should we approve this vendor contract?"+Gut says "yes" immediately → System 1 active+Pause: Is this appropriate for this decision?+```++### Step 2: Assess Appropriateness+Is the active system appropriate for this context?++**Trust System 1 when:**+- Domain is familiar with clear feedback loops+- You have extensive relevant experience+- Patterns are valid and stable+- Decision is reversible+- Speed matters more than precision+- Cost of error is low++**Engage System 2 when:**+- Domain is unfamiliar or complex+- Stakes are high+- Statistical reasoning required+- System 1 biases likely apply+- Decision is irreversible+- You feel very confident (check for overconfidence)+- "Obvious" answer benefits you (check for motivated reasoning)++### Step 3: Override if Needed+If System 1 is active but System 2 is appropriate:++```+1. PAUSE - Interrupt automatic response+2. ARTICULATE - State the decision explicitly+3. ANALYZE - Apply structured thinking+4. CHECK - Look for bias indicators+5. DECIDE - Make deliberate choice+```++Override triggers (red flags):+- High emotional charge+- Time pressure being used tactically+- "Everyone agrees" (groupthink)+- Round numbers without analysis+- First option presented+- Confirmation of existing beliefs++### Step 4: Execute Appropriately+Match your process to the system:++| System | Process |+|--------|---------|+| System 1 (validated) | Trust intuition, act quickly, monitor outcomes |+| System 2 (engaged) | Use checklists, seek outside view, document reasoning |++## System 1 Failure Modes++### Substitution+System 1 replaces hard questions with easier ones:+```+Hard: "How much should I pay for this stock?"+Substituted: "How much do I like this company?"++Hard: "Is this candidate qualified?"+Substituted: "Does this candidate seem likeable?"+```++### Heuristic Errors++| Heuristic | What It Does | When It Fails |+|-----------|--------------|---------------|+| Availability | Judges by ease of recall | Vivid events seem more common |+| Representativeness | Matches to stereotypes | Ignores base rates |+| Anchoring | Starts from given number | Arbitrary anchors still influence |+| Affect | Decides by feeling | Emotions override data |+| Confirmation | Seeks supporting evidence | Misses contradicting evidence |++### WYSIATI (What You See Is All There Is)+System 1 builds the best story from available information:+```+Given: "John is tall and muscular"+System 1 concludes: "John is probably athletic"+Missing: John's actual athletic ability, base rates, context+```++System 1 doesn't flag missing information—it works with what's available.++## Cognitive Ease vs Strain++### Cognitive Ease (System 1 Active)+Feels: Familiar, true, good, effortless+Risks:+- Reduced vigilance+- Accepting false statements+- Overconfidence+- Missing errors++Induced by:+- Repeated exposure+- Clear display+- Primed ideas+- Good mood++### Cognitive Strain (System 2 Engaged)+Feels: Unfamiliar, requiring effort, suspicious+Benefits:+- Increased vigilance+- More analytical processing+- Reduced biases+- Better accuracy++Induced by:+- Poor print quality+- Complex language+- Novel situations+- Bad mood++**Tactical tip:** For important decisions, deliberately induce mild cognitive strain (different format, pause before answering) to engage System 2.++## Application Examples++### Code Review+```+System 1 mode: "This looks fine" (pattern matches familiar code)+Engage System 2:+- Is this a high-risk change?+- Am I the right reviewer for this domain?+- Have I actually traced the logic?+- What edge cases might I miss?+```++### Hiring Decisions+```+System 1 mode: "Great interview, strong hire" (likeability heuristic)+Engage System 2:+- Structured scorecard vs overall impression+- Compare to job requirements, not to other candidates+- Check for halo effect from one strong answer+- Seek disconfirming information+```++### Architecture Decisions+```+System 1 mode: "Let's use [familiar technology]" (availability)+Engage System 2:+- Explicit requirements analysis+- Evaluate alternatives against criteria+- Consider long-term implications+- Document reasoning+```++### Debugging+```+System 1 mode: "It's probably X" (first hypothesis feels right)+Engage System 2:+- List all possible causes+- Assign probabilities (Bayesian)+- Test systematically, not just hunches+- Consider unlikely explanations+```++## Integration with Other Thinking Skills++### With Debiasing+System 1 is the source of most cognitive biases. The debiasing checklist is essentially a System 2 override protocol:+```+Automatic response → Pause → Apply debiasing checklist → Override if needed+```++### With Bayesian Reasoning+System 1 ignores base rates; System 2 applies them:+```+System 1: "Positive test result = probably have condition"+System 2: Apply Bayes' Theorem with actual base rates+```++### With First Principles+System 1 reasons by analogy; System 2 enables first principles:+```+System 1: "Competitors do X, so we should too"+System 2: "What are the fundamental requirements? Build from there"+```++### With Pre-Mortem+System 1 is optimistic; pre-mortem forces System 2 pessimism:+```+System 1: "This plan will work" (overconfidence)+System 2: "Imagine it failed. Why?" (deliberate analysis)+```++### With OODA Loop+Balance speed (System 1) with accuracy (System 2) based on context:+```+Incident response: System 1 pattern matching for speed+Post-incident: System 2 analysis for root cause+```++## Expert Intuition: When System 1 Is Valid++Not all intuition is suspect. Expert intuition can be trusted when:++1. **High-validity environment**: Clear patterns exist+2. **Extensive practice**: Thousands of hours of deliberate practice+3. **Rapid feedback**: Immediate correction signals+4. **Stable patterns**: Domain rules don't change frequently++```+Valid expert intuition:+- Chess grandmasters recognizing positions+- Firefighters sensing danger+- Experienced nurses detecting deterioration++Suspect expert intuition:+- Stock pickers predicting markets+- Political pundits forecasting elections+- Interviewers predicting job performance+```++Ask: "Has this person had opportunities to learn the valid patterns through repeated, well-calibrated feedback?"++## Verification Checklist+- [ ] Identified which system is currently active+- [ ] Assessed if active system is appropriate for stakes/context+- [ ] Checked for cognitive ease that might mask errors+- [ ] Applied System 2 override if high-stakes or unfamiliar+- [ ] Used structured process for System 2 decisions+- [ ] Documented reasoning for important decisions+- [ ] Considered base rates and statistics, not just intuition++## Key Questions+- "Did this answer come too easily?"+- "Am I in a domain where my intuition is calibrated?"+- "What would System 2 analysis reveal?"+- "Is my confidence justified by analysis or just feeling?"+- "What information am I not seeing (WYSIATI)?"+- "Would I decide the same way if I had to defend the reasoning?"++## Kahneman's Warning+"The confidence people have in their beliefs is not a measure of the quality of evidence but of the coherence of the story the mind has managed to construct."++System 1 builds compelling stories from limited information and feels very confident doing so. That confidence is often unwarranted. Engage System 2 when the stakes matter.diff --git a/.claude/skills/thinking-feedback-loops/SKILL.md b/.claude/skills/thinking-feedback-loops/SKILL.mdnew file mode 100644index 0000000..95384da--- /dev/null+++ b/.claude/skills/thinking-feedback-loops/SKILL.md@@ -0,0 +1,509 @@+---+name: thinking-feedback-loops+description: Analyze systems using Donella Meadows' feedback loop framework to identify reinforcing loops, balancing loops, delays, and leverage points. Use for organizational dynamics, product growth design, debugging runaway or oscillating systems, and finding high-impact interventions.+---++# Feedback Loop Analysis++## Overview++Feedback loop analysis, developed by Donella Meadows in "Thinking in Systems," provides a rigorous framework for understanding how systems behave over time. All dynamic systems—software, organizations, markets, products—are driven by feedback loops that either amplify change (reinforcing) or stabilize toward goals (balancing). Understanding these loops reveals why systems grow, collapse, oscillate, or resist change.++**Core Principle:** System behavior emerges from feedback structure. To change behavior, change the loops.++## When to Use++- Analyzing organizational dynamics (growth, stagnation, dysfunction)+- Designing product growth loops and retention mechanisms+- Debugging systems exhibiting runaway growth or collapse+- Understanding why a system oscillates instead of stabilizing+- Finding high-leverage intervention points+- Predicting unintended consequences of changes+- Understanding why "obvious" fixes fail or backfire++Decision flow:++```+System behavior is puzzling or problematic?+ → Is it growing/shrinking unexpectedly? → Look for REINFORCING LOOPS+ → Is it oscillating around a target? → Look for DELAYS in BALANCING LOOPS+ → Is it stuck/resistant to change? → Look for dominant BALANCING LOOPS+ → Need to intervene effectively? → Find LEVERAGE POINTS+```++## Core Concepts++### 1. Reinforcing Loops (Positive Feedback)++Reinforcing loops amplify change in the same direction—growth or decline. They create exponential behavior: the more you have, the more you get (or lose).++**Structure:** A → increases B → increases A (or: A → decreases B → decreases A)++```+┌─────────────────────────────────────────────────────────┐+│ REINFORCING LOOP (R) │+│ │+│ ┌──────────┐ ┌──────────┐ │+│ │ Users │───(+)──▶│ Content │ │+│ └──────────┘ └────┬─────┘ │+│ ▲ │ │+│ │ (+) │+│ │ │ │+│ └────────────────────┘ │+│ │+│ More users → More content → More users (Growth) │+│ OR: Fewer users → Less content → Fewer users (Death) │+└─────────────────────────────────────────────────────────┘+```++**Characteristics:**++- Exponential growth or collapse+- Self-fulfilling prophecies+- "Rich get richer" dynamics+- Virtuous cycles (when beneficial)+- Vicious cycles (when harmful)++**Software/Product Examples:**++```+Network Effect Loop:+Users → Value to other users → More users → More value+(Slack, social networks, marketplaces)++Technical Debt Loop:+Shortcuts → Bugs → Firefighting → Less time → More shortcuts+(Vicious cycle toward collapse)++Learning Loop:+Practice → Skill → Confidence → More practice → More skill+(Virtuous cycle of improvement)++Viral Growth Loop:+Users → Invitations → New users → More invitations+(Product-led growth)+```++### 2. Balancing Loops (Negative Feedback)++Balancing loops counteract change, pushing the system toward a goal or equilibrium. They create goal-seeking behavior.++**Structure:** Gap between actual and goal → corrective action → reduces gap++```+┌─────────────────────────────────────────────────────────┐+│ BALANCING LOOP (B) │+│ │+│ ┌──────────┐ ┌──────────┐ │+│ │ Goal │ │ Actual │ │+│ │ State │ │ State │ │+│ └────┬─────┘ └────┬─────┘ │+│ │ │ │+│ └──────────┬────────────────────┘ │+│ ▼ │+│ ┌──────────┐ │+│ │ Gap │ │+│ └────┬─────┘ │+│ │ │+│ (-) │+│ ▼ │+│ ┌────────────┐ │+│ │ Corrective │ │+│ │ Action │────────▶ Closes gap │+│ └────────────┘ │+└─────────────────────────────────────────────────────────┘+```++**Characteristics:**++- Goal-seeking behavior+- Resistance to change+- Stability (when working well)+- Oscillation (when delays exist)++**Software/Product Examples:**++```+Auto-scaling Loop:+Load increases → Gap from target → Scale up → Load per instance decreases+(Goal: maintain target response time)++Thermostat Pattern:+Temperature differs from setpoint → HVAC adjusts → Temperature approaches setpoint+(Goal-seeking to maintain state)++Hiring Loop:+Work exceeds capacity → Hire → Capacity increases → Work/person normalizes+(Goal: sustainable workload)++Quality Gate Loop:+Defects detected → Review/fix required → Quality improves → Fewer defects+(Goal: maintain quality standards)+```++### 3. Delays++Delays are the time between cause and effect. They are the primary source of oscillation and instability in systems.++```+┌─────────────────────────────────────────────────────────┐+│ DELAY EFFECTS │+│ │+│ Action ───────[DELAY]─────────▶ Effect │+│ │+│ Short delay: System responds smoothly │+│ Long delay: Overshoot and oscillation │+│ │+│ Examples: │+│ • Code deploy → [Cache TTL] → Users see change │+│ • New hire → [Ramp-up time] → Productivity impact │+│ • Feature ship → [Adoption] → Metric movement │+│ • Training → [Skill development] → Performance gain │+└─────────────────────────────────────────────────────────┘+```++**Why Delays Cause Oscillation:**++```+Without delay:+ Gap detected → Correction → Gap closes → Done++With delay:+ Gap detected → Correction → [DELAY] → Gap persists →+ More correction → [DELAY] → Original correction arrives →+ Overshoot → Gap in opposite direction → Oscillation+```++**Classic Example: Shower Temperature**++```+Too cold → Turn hot → [Delay: water travels through pipes] →+Still cold → Turn hotter → Hot water arrives → Too hot! →+Turn cold → [Delay] → Still hot → Turn colder →+Cold water arrives → Too cold! → Oscillation continues+```++## Common System Patterns++### Pattern 1: Exponential Growth++**Structure:** Single dominant reinforcing loop++```+┌─────────┐ ┌─────────┐+│ Revenue │─(+)─▶│ Invest- │+│ │ │ ment │+└────▲────┘ └────┬────┘+ │ │+ (+) (+)+ │ │+ └────────────────┘+ Growth+```++**Behavior:** J-curve growth (or collapse if running in reverse)++**Examples:**++- Startup hypergrowth phase+- Viral spread+- Compounding interest+- Technical debt accumulation++**Intervention:** Find or create balancing loops before runaway++### Pattern 2: Goal-Seeking (with Oscillation)++**Structure:** Balancing loop with significant delay++```+┌────────┐ ┌────────┐+│ Goal │ │ Actual │+└───┬────┘ └───┬────┘+ │ │+ └───────┬───────┘+ ▼+ [Gap]+ │+ (-)+ │+ ▼+ ┌────────────┐+ │ Correction │───[DELAY]───▶ Effect+ └────────────┘+```++**Behavior:** Oscillation around goal, amplitude depends on delay length++**Examples:**++- Inventory management (bullwhip effect)+- Hiring cycles (overhire → layoffs → understaffed → overhire)+- Feature prioritization swings+- Performance optimization iterations++**Intervention:** Shorten delays, reduce correction magnitude, accept longer settling time++### Pattern 3: Limits to Growth++**Structure:** Reinforcing loop eventually hits a balancing constraint++```+ ┌─────────────────────────────────────┐+ │ │+ ▼ │+┌────────┐ ┌─────┴────┐+│ Growth │──(+)──▶ Success ──(-)──▶│ Resource │+│ Effort │ │ Limit │+└────────┘ └──────────┘+ │+ └──(+)──▶ Results (initially)+```++**Behavior:** S-curve—growth, plateau, then stagnation or decline++**Examples:**++- Market saturation+- Team scaling limits+- System capacity constraints+- Feature exhaustion++**Intervention:** Identify and address the constraint before hitting it++### Pattern 4: Shifting the Burden++**Structure:** Symptomatic solution undermines fundamental solution++```+ ┌──────────────┐+ │ Problem │+ │ Symptom │+ └──────┬───────┘+ │+ ┌────────────┼────────────┐+ ▼ │ ▼+ ┌───────────┐ │ ┌───────────────┐+ │ Quick │ │ │ Fundamental │+ │ Fix │ │ │ Solution │+ └─────┬─────┘ │ └───────┬───────┘+ │ │ │+ (+) │ (+)+ │ │ │+ ▼ │ ▼+ Symptom relief ────────┘ Root cause fixed+ │ ▲+ (-) │+ ▼ │+ Motivation to ─────────────────────┘+ fix root cause+```++**Behavior:** Addiction to quick fixes; fundamental capability atrophies++**Examples:**++- Heroic firefighting vs. systemic reliability+- Overtime vs. hiring/process improvement+- Manual workarounds vs. automation+- External consultants vs. internal capability++**Intervention:** Deliberately invest in fundamental solution while managing symptoms++### Pattern 5: Escalation (Arms Race)++**Structure:** Two competing reinforcing loops++```+┌─────────┐ ┌─────────┐+│ Party A │──▶ │ Party B │+│ Action │ ▲ │ Action │+└────┬────┘ │ └────┬────┘+ │ │ │+ (+) │ (+)+ │ │ │+ └───────┴────────┘+ Threat+```++**Behavior:** Mutual escalation until resource exhaustion or intervention++**Examples:**++- Feature wars between competitors+- Meeting proliferation+- Process/bureaucracy accumulation+- Alert fatigue spirals++**Intervention:** Break the loop through agreement, constraint, or reframing++## Identifying Loops in Systems++### Step 1: Map the Variables++List all relevant quantities that change over time:++```+Team productivity system:+- Team size+- Individual workload+- Code quality+- Technical debt+- Bug rate+- Firefighting time+- Feature velocity+- Morale+```++### Step 2: Draw Causal Connections++For each pair, ask: "Does A affect B? In which direction?"++```+(+) Same direction: A increases → B increases, A decreases → B decreases+(-) Opposite direction: A increases → B decreases+```++### Step 3: Trace the Loops++Follow the arrows back to starting point. Count the negative signs:++```+Even number of (-) = Reinforcing loop+Odd number of (-) = Balancing loop+```++### Step 4: Identify Dominant Loops++The system behavior is driven by currently dominant loops:++- Growing exponentially? Reinforcing loop dominates+- Oscillating? Balancing loop with delay+- Stable? Balancing loop working well+- Declining? Reinforcing loop in reverse++## Leverage Points++Donella Meadows' hierarchy of intervention effectiveness (increasing power):++| Level | Intervention | Example | Impact |+|-------|-------------|---------|--------|+| 12 | Constants/parameters | Adjust timeout values | Lowest |+| 11 | Buffer sizes | Increase queue limits | Low |+| 10 | Stock-flow structure | Add caching layer | Low |+| 9 | Delays | Shorten feedback cycles | Medium |+| 8 | Balancing loop strength | Improve monitoring | Medium |+| 7 | Reinforcing loop gain | Amplify growth drivers | Medium-High |+| 6 | Information flows | Make metrics visible | High |+| 5 | System rules | Change deployment policy | High |+| 4 | Self-organization | Enable team autonomy | Very High |+| 3 | System goals | Redefine success metrics | Very High |+| 2 | Paradigm/mindset | Shift from output to outcomes | Transformational |+| 1 | Transcend paradigms | Question the frame itself | Highest |++**Key insight:** Most interventions happen at levels 10-12 (parameters). The highest leverage is in goals, rules, and mental models.++## Application Framework++### Analyzing a Problematic System++```markdown+## Feedback Loop Analysis: [System Name]++### Current Behavior+[Describe: growing, declining, oscillating, stuck]++### Key Variables+- [List stocks and flows]++### Loop Diagram+[Draw or describe the loops]++### Identified Loops+| Loop Name | Type | Variables | Currently Dominant? |+|-----------|------|-----------|---------------------|+| | | | |++### Delays Present+| Delay | Duration | Effect |+|-------|----------|--------|+| | | |++### Leverage Points+| Level | Intervention | Expected Effect |+|-------|-------------|-----------------|+| | | |++### Recommended Intervention+[Highest-leverage, lowest-risk option]+```++### Designing a Growth System++```markdown+## Growth Loop Design: [Product/System]++### Core Reinforcing Loop+[User action] → [Value created] → [Trigger for more users] → [More user action]++### Supporting Loops+[Additional loops that feed the core]++### Balancing Constraints+[What limits growth and when it kicks in]++### Delays to Minimize+[Where feedback needs to be faster]++### Metrics to Monitor+[Leading indicators of loop health]+```++## Integration with Systems Thinking++This skill extends the `thinking-systems` skill by providing:++1. **Specific loop identification techniques** (vs. general systems mapping)+2. **Meadows' leverage point hierarchy** (vs. general intervention ideas)+3. **Pattern library** (exponential, oscillating, limits to growth, etc.)+4. **Delay analysis methodology** (root cause of oscillation)++Use together:++- `thinking-systems`: Map the overall system structure+- `thinking-feedback-loops`: Identify and analyze specific loops+- `thinking-second-order`: Trace consequences of interventions+- `thinking-pre-mortem`: Identify loops that could cause failure++## Verification Checklist++- [ ] Identified key variables that change over time+- [ ] Mapped causal connections with direction (+/-)+- [ ] Traced at least one reinforcing loop+- [ ] Traced at least one balancing loop+- [ ] Identified significant delays+- [ ] Determined currently dominant loop+- [ ] Identified leverage points at multiple levels+- [ ] Selected intervention with appropriate leverage+- [ ] Considered unintended effects of intervention++## Key Questions++- "What feeds back into itself here?"+- "Is this self-reinforcing or self-correcting?"+- "What's the goal this system is seeking?"+- "Where are the delays, and how long are they?"+- "Which loop is currently dominant?"+- "What would shift dominance to a different loop?"+- "What's the highest-leverage intervention available?"+- "If I change X, what loops are affected?"++## Meadows' Wisdom++"We can't control systems or figure them out. But we can dance with them."++"The least obvious part of the system, its function or purpose, is often the most crucial determinant of the system's behavior."++"Pay attention to what is important, not just what is quantifiable."++Systems are not puzzles to be solved but patterns to be understood and influenced. Effective intervention requires humility about control and attention to feedback.diff --git a/.claude/skills/thinking-first-principles/SKILL.md b/.claude/skills/thinking-first-principles/SKILL.mdnew file mode 100644index 0000000..9ea3158--- /dev/null+++ b/.claude/skills/thinking-first-principles/SKILL.md@@ -0,0 +1,151 @@+---+name: thinking-first-principles+description: Break complex problems into fundamental truths by questioning assumptions and rebuilding from irreducible components. Use for innovation, challenging status quo, or when conventional solutions fail.+---++# First Principles Reasoning++## Overview+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.++**Core Principle:** Don't accept "that's how it's always done." Reduce to fundamentals, then rebuild.++## When to Use+- Conventional approaches have failed or seem inadequate+- You're told something is "impossible" or "too expensive"+- Designing new systems/products from scratch+- Challenging industry assumptions or pricing+- Problem seems intractable using existing mental models+- You need innovation rather than incremental improvement++Decision flow:+```+Problem intractable? → yes → Are you reasoning from analogy? → yes → APPLY FIRST PRINCIPLES+ ↘ no → Already at fundamentals+ ↘ no → Standard problem-solving may suffice+```++## The Process++### Step 1: Identify Current Assumptions+List everything you "know" or assume about the problem:+- What are the constraints everyone accepts?+- What costs/limitations are considered fixed?+- What's the conventional wisdom?+- Why do people say it can't be done?++```+Example: "Rocket launches cost $65M because that's what aerospace companies charge"+Assumptions: Must buy from existing suppliers, existing designs are optimal,+ materials must be aerospace-grade, vertical integration is too hard+```++### Step 2: Break Down to Fundamentals+Ask repeatedly: "What are we absolutely certain is true?"++Decomposition questions:+- What are the physical/mathematical constraints?+- What are the raw inputs required?+- What laws of physics/economics apply?+- What would this cost if built from raw materials?+- What is the minimum viable version?++```+Example: Rocket raw materials (aluminum, titanium, copper, carbon fiber)+ = ~2% of typical rocket price+Fundamental truth: Materials aren't the cost driver;+ manufacturing/overhead/margins are+```++### Step 3: Challenge Each Assumption+For each assumption, ask:+- Is this actually true, or just convention?+- What evidence supports this?+- Under what conditions would this be false?+- Who benefits from this assumption persisting?++Use the "5 Whys" to drill deeper:+```+Why is it expensive? → Suppliers charge high margins+Why? → Limited competition+Why? → High barriers to entry+Why? → Assumption that you must use existing supply chain+Why? → Nobody questioned it+```++### Step 4: Rebuild from Fundamentals+Starting ONLY from verified truths:+- What's the simplest solution that satisfies fundamental requirements?+- What new approaches become possible without false constraints?+- How would you solve this if starting from scratch today?+- What would a solution look like with 10x less resources?++```+Example: Build rockets in-house using commodity materials+ = SpaceX reduced launch costs by 10x+```++### Step 5: Validate Against Reality+- Does your reconstructed solution violate any physics/laws?+- What practical constraints remain?+- What's the minimum viable test?+- How can you prove/disprove this quickly?++## Mental Traps to Avoid++| Trap | Description | Antidote |+|------|-------------|----------|+| Reasoning by Analogy | "Others do it this way" | Ask "but is it optimal?" |+| Appeal to Authority | "Experts say it's impossible" | "What specifically makes it impossible?" |+| Sunk Cost | "We've always done it this way" | "What if we started fresh today?" |+| Complexity Bias | Assuming complex = better | "What's the simplest version?" |+| False Constraints | Accepting artificial limits | "Is this a law of physics or convention?" |++## Application Examples++### Software Architecture+```+Assumption: "We need a microservices architecture"+First Principles:+- What problem are we solving? (scalability, team independence, deployment)+- What's the minimum that achieves this?+- A modular monolith might suffice for current scale+```++### Cost Reduction+```+Assumption: "This service costs $50k/month, that's just cloud pricing"+First Principles:+- What compute/storage do we actually need?+- What are we paying for that we don't use?+- Could we reduce by 80% with right-sizing?+```++### Feature Development+```+Assumption: "Users need feature X (because competitor has it)"+First Principles:+- What job is the user trying to accomplish?+- What's the simplest way to enable that job?+- Maybe a different approach solves it better+```++## Verification Checklist+- [ ] Listed all assumptions about the problem+- [ ] Identified which assumptions are physics/math vs convention+- [ ] Challenged at least 3 "obvious" constraints+- [ ] Rebuilt solution using only verified fundamentals+- [ ] Validated that solution doesn't violate actual constraints+- [ ] Identified minimum viable test to prove/disprove approach++## Combining with Other Models+- **Inversion**: After first principles, ask "what would make this fail?"+- **Second-Order Thinking**: Consider downstream effects of your new approach+- **Pre-Mortem**: Imagine your first-principles solution failed—why?++## Key Questions+- "What do we know to be absolutely true?"+- "Why does everyone assume this constraint exists?"+- "What would we do if we had to solve this with 10% of the budget?"+- "If we were starting from scratch today, would we build it this way?"+- "What would a complete outsider try?"diff --git a/.claude/skills/thinking-inversion/SKILL.md b/.claude/skills/thinking-inversion/SKILL.mdnew file mode 100644index 0000000..7218361--- /dev/null+++ b/.claude/skills/thinking-inversion/SKILL.md@@ -0,0 +1,175 @@+---+name: thinking-inversion+description: Approach problems backward by identifying paths to failure, then systematically avoiding them. Use for risk identification, planning, and avoiding obvious mistakes.+---++# Inversion Thinking++## Overview+Inversion thinking, championed by Charlie Munger and rooted in mathematician Carl Jacobi's principle "Invert, always invert," approaches problems by considering their opposite. Instead of asking "How do I succeed?", ask "How would I guarantee failure?" then avoid those paths.++**Core Principle:** "All I want to know is where I'm going to die, so I'll never go there." — Charlie Munger++## When to Use+- Planning a new project, feature, or initiative+- Evaluating a decision before committing+- Identifying risks that optimistic thinking obscures+- Stuck on how to achieve a positive outcome+- Need to challenge assumptions in a plan+- Writing requirements or acceptance criteria++Decision flow:+```+Have a goal? → yes → Can you list ways to achieve it? → maybe → INVERT FIRST+ ↘ no → Definitely invert+ ↘ no → Define goal, then invert+```++## The Process++### Step 1: Define the Goal Clearly+State what success looks like:+```+Goal: "Ship a reliable authentication system by Q2"+Goal: "Build a high-performing engineering team"+Goal: "Launch product with strong user retention"+```++### Step 2: Invert — Ask "How Would I Fail?"+List all ways to guarantee failure, ruin, or the opposite of your goal:++```+Goal: Ship reliable auth system+Inversions (How to guarantee failure):+- Skip security review and pen testing+- No rate limiting or brute force protection+- Store passwords in plaintext+- No monitoring or alerting+- Skip edge cases in testing+- No documentation for on-call+- Single point of failure, no redundancy+- Ignore compliance requirements+- No rollback plan+- Deploy on Friday before vacation+```++### Step 3: Categorize the Failure Modes+Group by type and severity:++| Category | Failure Mode | Severity |+|----------|--------------|----------|+| Security | Plaintext passwords | Critical |+| Security | No rate limiting | High |+| Operations | No monitoring | High |+| Operations | No rollback plan | High |+| Process | Skip security review | Critical |+| Process | No documentation | Medium |+| Reliability | Single point of failure | High |++### Step 4: Convert to Avoidance Checklist+Transform each failure mode into a requirement:++```+Anti-goal: Store passwords in plaintext+→ Requirement: Use bcrypt/argon2 with appropriate work factor++Anti-goal: No rate limiting+→ Requirement: Implement rate limiting with exponential backoff++Anti-goal: Deploy Friday before vacation+→ Requirement: No deploys within 48h of team unavailability+```++### Step 5: Prioritize by Impact+Focus on avoiding the failures that would be:+- Most damaging if they occurred+- Most likely to occur without explicit prevention+- Hardest to recover from++## Application Patterns++### For Technical Design+```+Goal: Build scalable API+Invert: How to make it fail under load?+- No caching → Add caching layer+- Synchronous everything → Add async where appropriate+- No connection pooling → Implement pooling+- N+1 queries → Eager loading, query optimization+- No circuit breakers → Add circuit breakers+```++### For Code Review+```+Goal: Merge high-quality code+Invert: What would make this PR problematic?+- Introduces security vulnerability+- Breaks existing functionality+- No tests for new behavior+- Unclear intent/poor naming+- Performance regression+- Missing error handling+```++### For Career/Team Building+```+Goal: Build successful engineering career+Invert (Munger's list of what to avoid):+- Be unreliable+- Learn only from your own mistakes (ignore others')+- Give up after first failure+- Be resentful and envious+- Stay within comfort zone+- Avoid difficult conversations+- Don't learn continuously+```++### For Project Planning+```+Goal: Successful product launch+Invert: How to guarantee launch failure?+- No user research → Validate with users+- No load testing → Load test before launch+- No rollback capability → Build rollback+- No success metrics defined → Define metrics upfront+- Team burnout → Sustainable pace+- No communication plan → Prepare stakeholder comms+```++## Combining with Pre-Mortem+Inversion + Pre-Mortem creates powerful risk identification:++1. **Inversion**: List ways the project could fail (theoretical)+2. **Pre-Mortem**: Imagine it DID fail, explain why (narrative)+3. **Synthesize**: Combine both lists, prioritize, mitigate++## Common Inversions for Software++| Domain | Goal | Key Inversions to Avoid |+|--------|------|------------------------|+| Security | Secure system | Trusting user input, weak auth, exposed secrets |+| Performance | Fast system | No caching, blocking calls, no indexes |+| Reliability | Stable system | No monitoring, no redundancy, no graceful degradation |+| Maintainability | Clean code | No tests, cryptic names, tight coupling |+| Team | High performance | Poor communication, no psychological safety, unclear goals |++## Verification Checklist+- [ ] Goal clearly defined+- [ ] Listed 10+ ways to fail/achieve opposite+- [ ] Categorized failures by type and severity+- [ ] Converted top failures to explicit requirements+- [ ] Verified plan addresses the most critical inversions+- [ ] Shared inversions with team for blind spot check++## Key Questions+- "What would guarantee failure here?"+- "What mistakes do others commonly make?"+- "What am I most likely to overlook?"+- "If this fails spectacularly, what will the postmortem say?"+- "What would I tell someone else to avoid?"+- "What would the opposite of success look like, specifically?"++## Munger's Warning+"It is remarkable how much long-term advantage people like us have gotten by trying to be consistently not stupid, instead of trying to be very intelligent."++The power of inversion is in avoiding obvious errors that optimism blinds us to. Simple avoidance often beats clever optimization.diff --git a/.claude/skills/thinking-kepner-tregoe/SKILL.md b/.claude/skills/thinking-kepner-tregoe/SKILL.mdnew file mode 100644index 0000000..d518c9b--- /dev/null+++ b/.claude/skills/thinking-kepner-tregoe/SKILL.md@@ -0,0 +1,642 @@+---+name: thinking-kepner-tregoe+description: Systematic rational process for complex problem analysis, decision making, and risk assessment. Use for high-stakes engineering decisions, root cause analysis beyond 5 Whys, and multi-factor evaluations requiring structured criteria.+---++# Kepner-Tregoe Rational Process++## Overview++The Kepner-Tregoe (KT) methodology, developed by Charles Kepner and Benjamin Tregoe in the 1950s, provides four integrated analytical processes for rational thinking. Unlike heuristic approaches, KT offers rigorous frameworks for separating fact from speculation and making defensible decisions.++**Core Principle:** Separate what you know from what you assume. Use structured comparison to reveal truth.++## When to Use++- Complex engineering problems with multiple potential causes+- High-stakes decisions requiring documented rationale+- Root cause analysis when 5 Whys yields ambiguous results+- Evaluating alternatives with competing criteria+- Post-implementation risk assessment+- Incident response requiring systematic triage+- Architecture decisions with long-term implications++Decision flow:++```text+Complex problem? → yes → Multiple concerns/unclear priority? → yes → Start with SA+ ↘ no → Known single problem? → yes → PA+ ↘ no → Decision needed? → yes → DA+ ↘ no → Implementation risk? → yes → PPA+ ↘ no → Simpler frameworks may suffice+```++## The Four Processes++| Process | Purpose | Key Question |+|---------|---------|--------------|+| **SA** - Situation Analysis | Clarify and prioritize | "What's going on?" |+| **PA** - Problem Analysis | Find root cause | "Why did this happen?" |+| **DA** - Decision Analysis | Evaluate alternatives | "What should we do?" |+| **PPA** - Potential Problem Analysis | Anticipate risks | "What could go wrong?" |++---++## Process 1: Situation Analysis (SA)++Use when facing multiple concerns, unclear priorities, or overwhelm.++### Purpose++Break complex situations into manageable components, set priorities, and plan approach.++### Steps++#### Step 1: List All Concerns++Brainstorm everything that needs attention:++```markdown+Concerns:+- Production API latency increased 3x+- New feature deployment blocked+- Team velocity dropped 40%+- Customer complaints about checkout errors+- Database connection pool exhaustion+- Unclear requirements for Q2 roadmap+```++#### Step 2: Separate and Clarify++For each concern, ask: "Is this one issue or multiple?"++```markdown+"Production performance issues" →+ - API latency (response time)+ - Database connections (resource exhaustion)+ - Memory usage (potential leak)+```++#### Step 3: Set Priority++Use Timing, Impact, Trend (TIT):++| Concern | Timing | Impact | Trend | Priority |+|---------|--------|--------|-------|----------|+| API latency | Urgent | High | Worsening | P0 |+| DB connections | Urgent | Critical | Stable | P0 |+| Checkout errors | Soon | High | Worsening | P1 |+| Velocity drop | Soon | Medium | Stable | P2 |++**Timing:** When must action be taken?+**Impact:** What's the consequence of inaction?+**Trend:** Is it getting better, worse, or stable?++#### Step 4: Plan Approach++For each prioritized concern, determine:++- Which KT process applies (PA, DA, PPA)?+- Who should be involved?+- What information is needed?++### SA Template++```markdown+# Situation Analysis: [Context]+Date: [Date]++## Concerns Inventory+| # | Concern | Clarification Needed? |+|---|---------|----------------------|+| 1 | [Concern] | [Yes/No - details] |++## Priority Matrix+| Concern | Timing | Impact | Trend | Priority | Next Process |+|---------|--------|--------|-------|----------|--------------|+| | | | | | SA/PA/DA/PPA |++## Action Plan+| Priority | Concern | Process | Owner | Deadline |+|----------|---------|---------|-------|----------|+| P0 | | | | |+```++---++## Process 2: Problem Analysis (PA)++Use when you need to find root cause of a deviation from expected performance.++### Purpose++Systematically identify the true cause by comparing what IS happening vs. what IS NOT.++### Key Concept: The IS/IS-NOT Matrix++The power of PA lies in specification through contrast. A problem exists in a specific context—understanding boundaries reveals cause.++### Steps++#### Step 1: State the Problem++Be precise about the deviation:++```text+BAD: "The system is slow"+GOOD: "API response time increased from 200ms to 800ms for /checkout endpoint starting Monday 9 AM"+```++#### Step 2: Specify the Problem (IS/IS-NOT)++| Dimension | IS | IS NOT | Distinction |+|-----------|-----|---------|-------------|+| **WHAT** | | | |+| What object has the problem? | /checkout endpoint | /cart, /product, /user endpoints | Only payment-related |+| What is the defect? | 4x latency increase | Errors, timeouts, data corruption | Performance only |+| **WHERE** | | | |+| Where is the object when observed? | Production US-East | Production EU, US-West, staging | Single region |+| Where on the object? | Database query phase | Auth, validation, response serialization | DB layer |+| **WHEN** | | | |+| When was it first observed? | Monday 9:00 AM | Before Monday, after 6 PM | Business hours |+| When in lifecycle/pattern? | During checkout submit | During browsing, cart add | Write operations |+| **EXTENT** | | | |+| How many objects affected? | ~30% of checkout requests | 100% of requests | Intermittent |+| How much of object affected? | 600ms additional latency | Complete failure | Degradation |+| Is it growing/spreading? | Stable since Tuesday | Getting worse | Plateaued |++#### Step 3: Identify Distinctions++For each IS/IS-NOT pair, ask: "What's unique or distinctive about the IS side?"++```markdown+Distinctions identified:+- Only /checkout endpoint (payment processing)+- Only US-East region (specific DB replica)+- Only during business hours (load-related?)+- Only ~30% of requests (specific query pattern?)+- Started Monday 9 AM (deployment? config change?)+```++#### Step 4: Identify Changes++What changed in, on, around, or about the distinctions?++```markdown+Changes near Monday 9 AM:+- Payment provider SDK updated (Sunday night deploy)+- Database index rebuild scheduled (Sunday maintenance)+- New fraud detection rules enabled (Monday 8:45 AM)+```++#### Step 5: Generate Possible Causes++Combine distinctions and changes:++```markdown+Possible causes:+1. Fraud detection rules causing additional DB queries+2. Payment SDK making synchronous external calls+3. Index rebuild affected checkout-related queries+```++#### Step 6: Test Against Specification++For each possible cause, verify it explains ALL IS and IS-NOT:++| Possible Cause | Explains IS? | Explains IS-NOT? | Verdict |+|----------------|--------------|------------------|---------|+| Fraud rules | ✓ Only checkout | ✓ Only write ops | ✓ Possible |+| Payment SDK | ✓ Only checkout | ✗ Would affect all regions | ✗ Ruled out |+| Index rebuild | ✓ DB layer | ✗ Would affect all queries | ✗ Ruled out |++#### Step 7: Verify True Cause++Design verification to confirm or rule out:++```markdown+Verification plan for "Fraud detection rules":+1. Check timing: Rules enabled 8:45 AM (matches)+2. Check scope: Rules only on checkout (matches)+3. Test: Disable rules in canary, measure latency+4. Examine: Query logs for fraud check queries+```++### IS/IS-NOT Template++```markdown+# Problem Analysis: [Problem Statement]+Date: [Date]++## Problem Specification++### What+| Question | IS | IS NOT | Distinction |+|----------|-----|---------|-------------|+| What object has the problem? | | | |+| What specifically is wrong? | | | |++### Where+| Question | IS | IS NOT | Distinction |+|----------|-----|---------|-------------|+| Where is the problem observed? | | | |+| Where on the object is it? | | | |++### When+| Question | IS | IS NOT | Distinction |+|----------|-----|---------|-------------|+| When first observed? | | | |+| Any pattern to occurrence? | | | |++### Extent+| Question | IS | IS NOT | Distinction |+|----------|-----|---------|-------------|+| How many/much affected? | | | |+| Is it changing? | | | |++## Distinctions Summary+1. [Unique characteristic]+2. [Unique characteristic]++## Changes Near Distinctions+| Change | When | What Changed |+|--------|------|--------------|+| | | |++## Possible Causes+| # | Cause | Based on |+|---|-------|----------|+| 1 | | Distinction + Change |++## Cause Testing+| Cause | Explains IS | Explains IS-NOT | Verdict |+|-------|-------------|-----------------|---------|+| | | | |++## Verification Plan+- [ ] [Test to confirm/rule out most likely cause]++## Confirmed Root Cause+[Cause with evidence]+```++---++## Process 3: Decision Analysis (DA)++Use when choosing among alternatives with multiple criteria.++### Purpose++Make systematic, defensible decisions by separating MUSTS from WANTS and scoring alternatives objectively.++### Steps++#### Step 1: Clarify the Decision++State the decision clearly:++```text+"Select a message queue system for order processing"+"Choose deployment strategy for the new auth service"+```++#### Step 2: Develop Objectives++List what the decision must accomplish:++```markdown+Objectives:+- Handle 10K messages/second throughput+- Provide at-least-once delivery guarantees+- Support multiple consumer groups+- Minimize operational overhead+- Stay within $5K/month budget+- Integrate with existing monitoring+```++#### Step 3: Classify as MUST vs WANT++**MUST:** Non-negotiable requirements (pass/fail)+**WANT:** Desirable attributes (weighted scoring)++| Objective | MUST/WANT | Weight (1-10) |+|-----------|-----------|---------------|+| 10K msg/sec throughput | MUST | - |+| At-least-once delivery | MUST | - |+| Under $5K/month | MUST | - |+| Multiple consumer groups | WANT | 9 |+| Low operational overhead | WANT | 8 |+| Existing monitoring integration | WANT | 6 |+| Strong community/docs | WANT | 5 |+| Team familiarity | WANT | 4 |++#### Step 4: Generate Alternatives++List viable options:++```markdown+Alternatives:+A. Apache Kafka (self-managed)+B. AWS SQS + SNS+C. RabbitMQ (self-managed)+D. Amazon MSK (managed Kafka)+```++#### Step 5: Screen Against MUSTs++| Alternative | 10K msg/sec | At-least-once | Under $5K | MUST Score |+|-------------|-------------|---------------|-----------|------------|+| Kafka | ✓ Yes | ✓ Yes | ✓ Yes | PASS |+| SQS+SNS | ✓ Yes | ✓ Yes | ✓ Yes | PASS |+| RabbitMQ | ✗ ~5K limit | ✓ Yes | ✓ Yes | FAIL |+| MSK | ✓ Yes | ✓ Yes | ✗ ~$8K | FAIL |++RabbitMQ and MSK eliminated—don't meet MUSTs.++#### Step 6: Score Against WANTs++Rate each alternative 1-10 on each WANT:++| WANT (Weight) | Kafka | SQS+SNS |+|---------------|-------|---------|+| Consumer groups (9) | 10 | 7 |+| Low ops overhead (8) | 4 | 9 |+| Monitoring integration (6) | 7 | 10 |+| Community/docs (5) | 10 | 8 |+| Team familiarity (4) | 3 | 8 |++#### Step 7: Calculate Weighted Scores++| WANT | Weight | Kafka Score | Kafka Weighted | SQS Score | SQS Weighted |+|------|--------|-------------|----------------|-----------|--------------|+| Consumer groups | 9 | 10 | 90 | 7 | 63 |+| Low ops overhead | 8 | 4 | 32 | 9 | 72 |+| Monitoring | 6 | 7 | 42 | 10 | 60 |+| Community | 5 | 10 | 50 | 8 | 40 |+| Team familiarity | 4 | 3 | 12 | 8 | 32 |+| **TOTAL** | | | **226** | | **267** |++SQS+SNS scores higher on weighted WANTs.++#### Step 8: Assess Risks (→ feeds into PPA)++Before final decision, consider adverse consequences:++| Alternative | Risk | Likelihood | Severity |+|-------------|------|------------|----------|+| SQS+SNS | Message ordering challenges | Medium | High |+| SQS+SNS | Vendor lock-in | High | Medium |+| Kafka | Operational complexity | High | High |++#### Step 9: Make Decision++Consider scores AND risks to make final choice. Document rationale.++### DA Template++```markdown+# Decision Analysis: [Decision Statement]+Date: [Date]+Decision Maker: [Name]++## Objectives+| Objective | MUST/WANT | Weight |+|-----------|-----------|--------|+| | | |++## Alternatives+1. [Option A]+2. [Option B]+3. [Option C]++## MUST Screening+| Alternative | MUST 1 | MUST 2 | MUST 3 | Pass/Fail |+|-------------|--------|--------|--------|-----------|+| | | | | |++## WANT Scoring+| WANT (Weight) | Alt A | Alt B | Alt C |+|---------------|-------|-------|-------|+| (w) | score | score | score |+| **Weighted Total** | | | |++## Risk Assessment+| Alternative | Risk | L | S | Mitigation |+|-------------|------|---|---|------------|+| | | | | |++## Decision+**Selected:** [Alternative]+**Rationale:** [Why this choice given scores and risks]+```++---++## Process 4: Potential Problem Analysis (PPA)++Use after making a decision or before implementation to anticipate and prevent problems.++### Purpose++Identify what could go wrong with a planned action and develop preventive/contingent actions.++### Steps++#### Step 1: State the Plan++Describe what will be implemented:++```markdown+Plan: Migrate order service from monolith to microservice+Timeline: 4 weeks+Key changes: New service, message queue, database split+```++#### Step 2: Identify Potential Problems++Walk through the plan and ask "What could go wrong?":++```markdown+Potential problems:+1. Message queue loses orders during migration+2. New service has undiscovered bugs in production+3. Database sync fails, causing data inconsistency+4. Rollback needed but unclear how to reverse+5. Performance degradation under load+6. Team lacks Kafka operational knowledge+```++#### Step 3: Assess Each Potential Problem++Rate probability (P) and seriousness (S):++| Potential Problem | Probability | Seriousness | P×S |+|-------------------|-------------|-------------|-----|+| Lost orders | Medium | Critical | HIGH |+| Undiscovered bugs | High | High | HIGH |+| Data sync failure | Medium | Critical | HIGH |+| Rollback unclear | Medium | High | MEDIUM |+| Performance issues | Medium | Medium | MEDIUM |+| Kafka knowledge gap | High | Medium | MEDIUM |++#### Step 4: Identify Likely Causes++For high P×S problems, determine probable causes:++```markdown+Problem: Message queue loses orders+Likely causes:+- Consumer crashes before acknowledgment+- Queue overflow during peak+- Network partition between services+- Misconfigured dead letter queue+```++#### Step 5: Develop Preventive Actions++Actions to reduce probability of cause occurring:++| Cause | Preventive Action | Owner |+|-------|-------------------|-------|+| Consumer crash | Implement idempotent processing with transactional outbox | Dev team |+| Queue overflow | Configure auto-scaling, set appropriate limits | Platform |+| Network partition | Deploy in same availability zone initially | Infra |+| DLQ misconfigured | Pre-production DLQ testing with failure injection | QA |++#### Step 6: Develop Contingent Actions++Actions to reduce impact IF problem occurs:++| Problem | Contingent Action | Trigger |+|---------|-------------------|---------|+| Lost orders | Replay from audit log, manual reconciliation | Order count mismatch > 0.1% |+| Data sync failure | Activate sync monitor, pause writes, manual fix | Sync lag > 5 minutes |+| Performance issues | Activate circuit breaker, failover to monolith | p99 > 2s for 5 min |++#### Step 7: Build Monitoring/Triggers++Define how you'll detect problems and when to activate contingent actions.++### PPA Template++```markdown+# Potential Problem Analysis: [Plan Name]+Date: [Date]++## Plan Summary+[Brief description of what will be implemented]++## Potential Problems+| # | Problem | P (H/M/L) | S (H/M/L) | Priority |+|---|---------|-----------|-----------|----------|+| 1 | | | | |++## High-Priority Problem Analysis++### Problem: [Name]+**Likely Causes:**+1. [Cause]++**Preventive Actions:**+| Cause | Action | Owner | Due |+|-------|--------|-------|-----|+| | | | |++**Contingent Actions:**+| Trigger | Action | Owner |+|---------|--------|-------|+| | | |++## Monitoring Plan+| What to Monitor | Threshold | Alert | Response |+|-----------------|-----------|-------|----------|+| | | | |++## Review Schedule+- Pre-implementation review: [Date]+- Post-implementation check: [Date]+```++---++## Integrating the Four Processes++Typical flow for complex situations:++```text+1. SA: "We have multiple issues after the release"+ → Separate concerns, prioritize+ → P0: Production errors (needs PA)+ → P1: Architecture decision (needs DA)+ → P2: Future release risks (needs PPA)++2. PA: Investigate production errors+ → IS/IS-NOT analysis+ → Identify root cause+ → Feeds solution options into DA++3. DA: Choose solution approach+ → Define objectives+ → Score alternatives+ → Select best option+ → Risk assessment feeds PPA++4. PPA: Plan implementation+ → Identify what could go wrong+ → Preventive and contingent actions+ → Monitoring plan+```++## Integration with Other Thinking Skills++| Skill | Integration Point |+|-------|-------------------|+| **thinking-pre-mortem** | Use as input to PPA—pre-mortem identifies problems, PPA develops mitigations |+| **thinking-inversion** | Use in PA—invert "what would cause this?" to identify possible causes |+| **thinking-first-principles** | Use in DA—challenge MUST criteria, are they truly fundamental? |+| **thinking-debiasing** | Apply checklist when scoring DA alternatives, evaluating PA causes |+| **thinking-systems** | Use in SA—understand how concerns interconnect, avoid siloed analysis |+| **tools-debugging-root-cause** | PA complements debugging—PA for systematic cause identification, debugging for code-level investigation |++## Verification Checklist++- [ ] Used appropriate KT process for the situation type+- [ ] SA: All concerns listed, separated, and prioritized with TIT criteria+- [ ] PA: IS/IS-NOT fully specified across all four dimensions+- [ ] PA: Each possible cause tested against specification+- [ ] DA: MUST/WANT clearly separated, MUSTs are truly non-negotiable+- [ ] DA: Weighted scores calculated, not just intuition+- [ ] PPA: High P×S problems have both preventive and contingent actions+- [ ] PPA: Triggers defined for contingent action activation+- [ ] Analysis documented for future reference and team alignment++## Key Questions by Process++### Situation Analysis++- "What are ALL the concerns we're facing?"+- "Is this one problem or several?"+- "What's the timing, impact, and trend?"+- "Which process should we use for each concern?"++### Problem Analysis++- "What specifically IS happening vs IS NOT?"+- "What's unique about where/when this occurs?"+- "What changed in, on, or around the distinctions?"+- "Does this cause explain BOTH the IS and IS-NOT?"++### Decision Analysis++- "What are the MUST-have requirements?"+- "How important is each WANT relative to others?"+- "How well does each alternative satisfy each objective?"+- "What risks come with each alternative?"++### Potential Problem Analysis++- "What could go wrong with this plan?"+- "What would cause each problem?"+- "How can we prevent the cause?"+- "If it happens anyway, how do we minimize damage?"diff --git a/.claude/skills/thinking-map-territory/SKILL.md b/.claude/skills/thinking-map-territory/SKILL.mdnew file mode 100644index 0000000..dec9f11--- /dev/null+++ b/.claude/skills/thinking-map-territory/SKILL.md@@ -0,0 +1,284 @@+---+name: thinking-map-territory+description: Recognize limits of mental models and diagrams. Use when models diverge from reality, debugging expectation mismatches, or questioning abstraction accuracy.+---++# Map-Territory Thinking++## Overview++Map-Territory thinking, originated by Alfred Korzybski and popularized in general semantics, reminds us that **"the map is not the territory."** Every representation—mental model, diagram, metric, specification, or abstraction—is a simplified view that necessarily loses information. Confusing the map with the territory leads to flawed decisions, debugging dead-ends, and misaligned expectations.++**Core Principle:** All models are wrong; some are useful. The question is: how wrong, and useful for what?++## When to Use++- Debugging when behavior doesn't match expectations+- Evaluating whether documentation/specs match implementation+- Questioning metrics that seem to tell the "full story"+- Architecture decisions based on diagrams or models+- When a "perfect plan" meets messy reality+- Resolving disagreements where parties hold different mental models+- Analyzing why estimates consistently miss reality++Decision flow:++```+Expectation ≠ Reality? → yes → Are you trusting a model/abstraction? → yes → CHECK MAP-TERRITORY FIT+ ↘ no → Model exists but isn't explicit+ ↘ no → Model may be accurate (verify anyway)+```++## Key Concepts++### 1. Maps Are Abstractions++Every representation omits details:++| Territory (Reality) | Map (Representation) | What's Lost |+|---------------------|----------------------|-------------|+| Running code | Architecture diagram | Timing, error paths, state |+| User behavior | Analytics dashboard | Context, emotion, edge cases |+| System performance | SLO metrics | Tail latencies, correlations |+| Team dynamics | Org chart | Informal influence, trust |+| Customer need | User story | Nuance, unstated assumptions |++### 2. Multiple Maps, One Territory++The same reality can have many valid representations:++```+Territory: E-commerce checkout flow++Maps:+├── Sequence diagram (shows interactions)+├── State machine (shows transitions)+├── User journey (shows experience)+├── Data flow (shows information movement)+├── Code (shows implementation)+└── Metrics (shows performance)++Each map reveals AND conceals different aspects+```++### 3. Map-Territory Confusion++When we mistake the map for the territory:++```+Confusion: "The tests pass, so the code works"+Reality: Tests are a map of expected behavior, not the territory of all behavior++Confusion: "The architecture diagram shows this is simple"+Reality: The diagram omits error handling, edge cases, and race conditions++Confusion: "Our metrics show users are happy"+Reality: Metrics measure what we chose to measure, not satisfaction itself+```++### 4. Abstraction Leakage++Even good abstractions eventually break:++```+Abstraction: "The network is reliable"+Leak: Timeout, partition, packet loss++Abstraction: "Memory is infinite"+Leak: OOM, cache eviction, GC pause++Abstraction: "The database is ACID"+Leak: Connection pool exhaustion, replication lag+```++## The Map-Territory Alignment Process++### Step 1: Identify Your Maps++List all representations you're relying on:++```+Decision: Scaling the payment service+Maps in use:+- Architecture diagram (last updated 6 months ago)+- Performance benchmarks (from staging, not prod)+- Capacity planning spreadsheet (based on assumptions)+- Team's mental model (from building v1)+```++### Step 2: Assess Map Freshness++For each map, determine:++| Map | Last Updated | Created From | Drift Risk |+|-----|--------------|--------------|------------|+| Arch diagram | 6 months | Original design | High |+| Benchmarks | 2 months | Staging env | Medium |+| Capacity sheet | 1 month | Extrapolation | High |+| Mental model | 2 years | Building v1 | Very High |++### Step 3: Check Correspondence++For critical maps, verify against territory:++```+Test: Does the architecture diagram match the code?+Method: Trace a request through actual code, compare to diagram++Test: Do benchmarks reflect production?+Method: Run production traffic sample through benchmark setup++Test: Do metrics capture what matters?+Method: Interview users, compare their experience to metric story+```++### Step 4: Identify Missing Maps++What aspects of the territory have no map?++```+Existing maps: Sequence diagrams, API specs, test coverage+Missing maps:+- Failure modes and recovery paths+- Implicit dependencies+- Performance under contention+- Operational runbooks+```++### Step 5: Calibrate Confidence++Adjust trust in maps based on verification:++```+Map: Test suite+Verification: Tests pass, but manual testing found 3 bugs+Calibration: Tests cover happy path, not edge cases+Action: Add edge case tests, reduce confidence in "green = good"+```++## Map-Territory Mismatches by Domain++### Documentation vs. Code++```+Map: README says "run npm install"+Territory: Requires Node 18+, specific npm version, env vars+Mismatch: Documentation abstracts away prerequisites++Verification: Try setup from scratch on clean machine+Fix: Document actual requirements, automate verification+```++### Specs vs. Implementation++```+Map: Spec says "API returns user object"+Territory: Sometimes returns 404, sometimes 500, sometimes times out+Mismatch: Spec describes happy path only++Verification: Test error cases, edge cases, failure modes+Fix: Spec error responses, add contract tests+```++### Metrics vs. Outcomes++```+Map: "DAU increased 20%"+Territory: Users signing up but churning within a week+Mismatch: DAU doesn't capture retention quality++Verification: Add cohort retention, engagement depth metrics+Fix: Choose metrics closer to actual business outcomes+```++### Estimates vs. Reality++```+Map: "This will take 2 weeks"+Territory: Took 6 weeks due to unforeseen complexity+Mismatch: Estimate was based on mental model, not investigation++Verification: Time-box investigation before estimating+Fix: Add uncertainty buffers, track estimate accuracy+```++### Mental Models vs. Systems++```+Map: "The cache makes reads fast"+Territory: Cache has 30% hit rate, most reads hit DB+Mismatch: Mental model assumed better cache performance++Verification: Measure actual cache hit rates+Fix: Update mental model, improve caching strategy+```++## Map Quality Indicators++### Signs of a Good Map++- Explicitly states what it omits+- Has a clear purpose and audience+- Recently verified against territory+- Includes uncertainty ranges+- Acknowledged as a model, not truth++### Signs of a Dangerous Map++- Treated as complete truth+- No update mechanism+- Created by someone who never saw the territory+- Optimistic without error cases+- No validation feedback loop++## Integration with Systems Thinking++Map-Territory thinking complements systems thinking:++```+Systems Thinking asks: What are the feedback loops and emergent behaviors?+Map-Territory asks: Is my systems diagram actually capturing those dynamics?++Combined approach:+1. Draw the system map (feedback loops, stocks, flows)+2. Verify: Does measured behavior match predicted behavior?+3. Iterate: Where does the map fail? What's the territory really doing?+4. Update: Refine the map or accept its limitations+```++## Verification Checklist++- [ ] Listed all maps/models being relied upon+- [ ] Assessed freshness of each map+- [ ] Identified highest-risk map-territory gaps+- [ ] Verified at least one critical map against reality+- [ ] Acknowledged what the maps don't capture+- [ ] Calibrated confidence based on verification results+- [ ] Documented map limitations for others++## Key Questions++- "What representation am I trusting here?"+- "When was this model last verified against reality?"+- "What does this abstraction hide from me?"+- "How would I know if this map is wrong?"+- "What would I see if I looked at the territory directly?"+- "Who created this map, and did they see the actual territory?"+- "What happens in the territory that this map can't represent?"++## Korzybski's Reminders++1. **The map is not the territory** — The word "water" won't quench thirst+2. **The map doesn't cover all the territory** — No model is complete+3. **The map is self-reflexive** — We can make maps of maps (meta-models)++## Practical Mantras++- "All models are wrong, some are useful" — George Box+- "The menu is not the meal"+- "The org chart is not the organization"+- "The test suite is not correctness"+- "The metric is not the goal"+- "The estimate is not the timeline"++When the map and territory diverge, update the map or change your navigation—but never insist the territory is wrong because your map says so.diff --git a/.claude/skills/thinking-occams-razor/SKILL.md b/.claude/skills/thinking-occams-razor/SKILL.mdnew file mode 100644index 0000000..726851b--- /dev/null+++ b/.claude/skills/thinking-occams-razor/SKILL.md@@ -0,0 +1,288 @@+---+name: thinking-occams-razor+description: Apply parsimony principle to prefer simpler explanations with fewer assumptions. Use for hypothesis selection in debugging, architecture decisions, and choosing between competing approaches.+---++# Occam's Razor (Parsimony Principle)++## Overview++Occam's Razor, attributed to 14th-century philosopher William of Ockham, states: "Entities should not be multiplied beyond necessity" (entia non sunt multiplicanda praeter necessitatem). When multiple explanations fit the evidence equally well, prefer the simplest one—the one with the fewest assumptions.++**Core Principle:** Among competing hypotheses that explain the data equally well, select the one with the fewest assumptions.++**Einstein's Corollary:** "Everything should be made as simple as possible, but no simpler."++## When to Use++- Debugging: Multiple hypotheses could explain a bug+- Architecture: Choosing between design approaches+- Root cause analysis: Several causes seem plausible+- Code review: Evaluating implementation complexity+- Technical decisions: Selecting between tools or patterns+- Incident response: Narrowing down failure causes++Decision flow:++```+Multiple explanations exist? → yes → Do they explain the evidence equally? → yes → APPLY OCCAM'S RAZOR+ ↘ no → Prefer better explanation+ ↘ no → Use available explanation+```++## The Process++### Step 1: Enumerate Competing Hypotheses++List all plausible explanations for the observed behavior:++```+Bug: Users intermittently can't log in++Hypotheses:+A. Session token expiration edge case+B. Race condition in auth service+C. Database connection pool exhaustion+D. Cosmic rays flipping bits in memory+E. Complex interaction between CDN cache, load balancer, and session service+```++### Step 2: Count the Assumptions++For each hypothesis, list required assumptions:++| Hypothesis | Assumptions Required |+|------------|---------------------|+| A. Token expiration | 1. Token validation has edge case |+| B. Race condition | 1. Concurrent requests possible, 2. Shared mutable state exists |+| C. DB pool exhaustion | 1. Pool is undersized, 2. Connections are leaking |+| D. Cosmic rays | 1. Hardware failure, 2. No ECC memory, 3. Perfect timing |+| E. Complex interaction | 1. CDN caches auth, 2. LB sticky sessions fail, 3. Session sync delayed |++### Step 3: Verify Explanatory Power++Ensure simpler hypotheses actually explain the evidence:++```+Evidence: Failures correlate with high traffic periods++Hypothesis A (token edge case):+ - Doesn't explain traffic correlation ❌++Hypothesis C (DB pool exhaustion):+ - Explains traffic correlation ✓+ - Fewer assumptions than E+ - PREFERRED by Occam's Razor ✓+```++### Step 4: Test Simplest First++Investigate hypotheses in order of simplicity:++```+1. Check DB connection pool metrics (simplest)+2. Review token validation code (simple)+3. Analyze race condition potential (moderate)+4. Instrument complex service interactions (complex)+5. Check for hardware issues (last resort)+```++### Step 5: Escalate Complexity Only When Needed++If simple explanations are ruled out, move to complex ones with new evidence.++## Complexity Assessment Framework++### Counting Complexity++| Factor | Complexity Cost |+|--------|-----------------|+| Each independent assumption | +1 |+| Each component involved | +1 |+| Each external dependency | +2 |+| Timing-dependent behavior | +2 |+| Requires rare conditions | +3 |+| "Perfect storm" scenarios | +5 |++### Example Comparison++```+Solution A: Add caching layer+- New component (Redis): +1+- Cache invalidation logic: +1+- New failure mode: +1+Total: 3++Solution B: Optimize existing query+- Query modification: +1+Total: 1++→ Prefer Solution B unless evidence shows it's insufficient+```++## When Simplicity Yields to Complexity++Occam's Razor is a heuristic, not an absolute law. Prefer complexity when:++### 1. Evidence Demands It++```+Simple hypothesis: Single bug in auth service+Evidence: Failures only occur when Feature X AND Feature Y are both enabled++→ Complex interaction hypothesis now has supporting evidence+→ Accept complexity that explains the evidence+```++### 2. Domain Complexity Is Irreducible++```+Problem: Distributed consensus+Simple solution: Single leader (but single point of failure)+Reality: Distributed systems require complex solutions (Raft, Paxos)++→ Some domains have irreducible complexity+→ Don't oversimplify beyond what's correct+```++### 3. Future Requirements Are Known++```+Current need: Store user preferences+Simple: JSON file+Future need: Multi-device sync, conflict resolution++→ Database is more complex but necessary+→ Known future needs justify upfront complexity+```++### 4. Simplicity Introduces Technical Debt++```+Simple now: Copy-paste code in 5 places+Simpler long-term: Extract shared function++→ Local simplicity vs. systemic simplicity+→ Prefer systemic simplicity+```++## Application Examples++### Debugging Example++```+Bug: API returns 500 errors sporadically++Hypothesis A: Null pointer in rare code path+ Assumptions: 1++Hypothesis B: Memory pressure causes GC pauses that timeout requests+ Assumptions: 3 (memory issues + GC behavior + timeout settings)++Hypothesis C: Race condition between cache refresh and request handling+ Assumptions: 4 (concurrent access + shared state + timing + cache implementation)++Occam's Razor: Start with Hypothesis A+Action: Search logs for null pointer exceptions+Result: Found! NPE in user profile edge case+```++### Architecture Example++```+Requirement: Service needs to call another service++Option A: Direct HTTP call+ Components: 1 (HTTP client)+ Assumptions: Target available, network reliable++Option B: Message queue with retry+ Components: 3 (queue, producer, consumer)+ Assumptions: Need async, need retry, need decoupling++Option C: Service mesh with circuit breaker, retry, timeout+ Components: 5+ (sidecar, control plane, observability)+ Assumptions: At scale, need observability, need traffic management++Occam's Razor: Start with Option A+Escalate to B/C only when evidence shows need for resilience+```++### Code Implementation Example++```python+# Complex (unnecessary assumptions)+def is_even(n):+ binary = bin(n)+ last_bit = binary[-1]+ return last_bit == '0'++# Simple (minimal assumptions)+def is_even(n):+ return n % 2 == 0++# Occam's Razor: Prefer the modulo approach+# Fewer concepts, fewer operations, same result+```++### Root Cause Analysis Example++```+Symptom: Deployment failed++Complex hypothesis:+"The CI server's Docker daemon ran out of disk space because+a cron job that cleans old images was disabled when we upgraded+the server OS last month, and nobody noticed because the monitoring+alert was routed to a deprecated Slack channel."++Simple hypothesis:+"The build script has a typo in the new environment variable name."++Occam's Razor: Check the build script first+Result: Typo found. DATABSE_URL instead of DATABASE_URL+```++## Common Anti-Patterns++| Anti-Pattern | Description | Correction |+|--------------|-------------|------------|+| Rube Goldberg | Complex solution to simple problem | Ask "what's the minimum needed?" |+| Premature abstraction | Abstracting for hypothetical cases | Wait for evidence of need |+| Resume-driven development | Using complex tech to learn it | Match tool to problem |+| Cargo culting | Copying complex patterns blindly | Understand why patterns exist |+| Conspiracy thinking | Assuming coordinated complex causes | Check simple causes first |++## Verification Checklist++- [ ] Listed all plausible hypotheses/solutions+- [ ] Counted assumptions required for each+- [ ] Verified simpler options have equal explanatory power+- [ ] Investigated in order of simplicity+- [ ] Escalated to complexity only with evidence+- [ ] Confirmed solution is "as simple as possible, but no simpler"+- [ ] Checked for domain-irreducible complexity+- [ ] Considered systemic vs. local simplicity++## Combining with Other Models++- **First Principles**: Reduce to fundamentals, then apply Occam's to solutions+- **Inversion**: "What would make this unnecessarily complex?"+- **Debiasing**: Watch for complexity bias (assuming complex = sophisticated)+- **Pre-Mortem**: Would a simpler approach have fewer failure modes?++## Key Questions++- "What's the simplest explanation that fits all the evidence?"+- "How many things have to be true for this hypothesis to hold?"+- "Am I adding complexity to handle cases I haven't seen?"+- "Would a junior engineer understand this solution?"+- "If I explained this to a non-technical person, how many steps would it take?"+- "What's the minimum change that could fix this?"+- "Am I solving the problem I have, or a problem I might have?"++## Ockham's Warning++"Plurality must never be posited without necessity."++The simplest solution isn't always correct, but it should always be tested first. Complexity should be earned through evidence, not assumed through speculation. When you find yourself building elaborate explanations, step back and ask: "What's the minimum hypothesis that explains what I'm seeing?"diff --git a/.claude/skills/thinking-ooda/SKILL.md b/.claude/skills/thinking-ooda/SKILL.mdnew file mode 100644index 0000000..42d5fbf--- /dev/null+++ b/.claude/skills/thinking-ooda/SKILL.md@@ -0,0 +1,232 @@+---+name: thinking-ooda+description: Rapid decision-making loop for dynamic situations. Use for incident response, competitive scenarios, time-sensitive decisions, and situations requiring quick adaptation.+---++# OODA Loop++## Overview+The OODA Loop (Observe, Orient, Decide, Act), developed by military strategist Colonel John Boyd, is a framework for rapid decision-making in dynamic, competitive, or time-sensitive situations. The key insight: speed through the loop creates advantage. In competitive scenarios, operating faster than your opponent disrupts their decision-making.++**Core Principle:** Agility beats perfection. Cycle through OODA faster than the situation changes (or faster than your opponent).++## When to Use+- Incident response and outages+- Competitive market situations+- Time-sensitive decisions+- Rapidly changing requirements+- Crisis management+- Debugging under pressure+- Any situation requiring quick adaptation++Decision flow:+```+Situation changing rapidly? → yes → Need quick decisions? → yes → APPLY OODA LOOP+ ↘ no → Standard analysis+ ↘ no → Deliberate analysis may be better+```++## The Four Phases++### 1. OBSERVE+**Gather information rapidly**++What to observe:+- Current state of the system/situation+- Changes since last observation+- External factors and environment+- Feedback from previous actions+- Competitor/opponent movements++```+Incident Example:+- Error rates: Spiking 10x normal+- Affected services: API gateway, user service+- Timeline: Started 5 minutes ago+- Recent changes: Deploy 15 min ago+- User reports: "Can't log in"+```++Observation principles:+- Cast wide net initially, narrow as pattern emerges+- Don't filter prematurely—gather raw data+- Include lagging AND leading indicators+- Time-bound: Don't observe forever++### 2. ORIENT+**Make sense of observations**++Orientation factors (Boyd's framework):+- **Cultural traditions**: How does our org typically respond?+- **Genetic heritage**: Our built-in biases and tendencies+- **Previous experience**: What have we seen before?+- **New information**: What's different this time?+- **Analysis/Synthesis**: Combining all of the above++```+Incident Example:+- Pattern matches: Similar to DB connection pool exhaustion last month+- But different: No DB metrics anomaly this time+- Recent deploy touched: Auth service rate limiting+- Hypothesis: Rate limit config too aggressive+```++Orient is the CRITICAL phase:+- This is where mental models apply+- Misorientation leads to wrong decisions+- Update orientation as new info arrives+- Challenge your initial framing++### 3. DECIDE+**Select course of action**++Decision characteristics:+- Based on current orientation+- Acknowledges uncertainty+- Identifies what to observe next+- Has implicit/explicit hypothesis++```+Incident Example:+Decision: Roll back auth service deploy+Hypothesis: This will restore normal error rates+Observation plan: Watch error rates for 2 minutes post-rollback+Fallback: If no improvement, investigate DB connections+```++Decision speed vs. quality tradeoff:+- 70% confidence now beats 90% confidence too late+- Reversible decisions: Bias toward action+- Irreversible decisions: Gather more info first+- "Good enough" decision executed fast > perfect decision too slow++### 4. ACT+**Execute the decision**++Action principles:+- Execute decisively+- Immediately return to OBSERVE+- Don't wait for complete results+- Create new observations through action++```+Incident Example:+Action: kubectl rollback deployment/auth-service+Immediate observe: Error rates, response times+Time limit: 2 minutes to see effect+```++The loop restarts:+- Actions create new situation+- New situation requires new observation+- Cycle continues until stable state++## OODA Loop Speed++### Tempo Advantage+Operating inside opponent's loop:+```+You: O → O → D → A → O → O → D → A → O ...+Opponent: O → O → O → ... → D → A (too late)+```++When you complete loops faster:+- Your actions change situation before they decide+- Their orientation becomes outdated+- They react to old information+- You maintain initiative++### Speed Multipliers+| Factor | Effect |+|--------|--------|+| Pre-planned responses | Skip D phase for known scenarios |+| Distributed authority | Parallel loops at different levels |+| Clear mental models | Faster O (orientation) |+| Training/practice | Faster execution (A) |+| Good observability | Faster O (observation) |++### Speed Killers+| Factor | Effect |+|--------|--------|+| Waiting for certainty | Loop stalls at O or D |+| Hierarchical approval | Adds latency to D |+| Information overload | O phase never completes |+| Analysis paralysis | Loop stalls at Orient |+| Perfect solution seeking | D phase never completes |++## Application Patterns++### Incident Response+```+OBSERVE: Metrics, logs, alerts, user reports+ORIENT: Match pattern, form hypothesis, assess blast radius+DECIDE: Mitigation action (rollback, scale, disable)+ACT: Execute mitigation, immediately observe results+LOOP: Continue until stable+```++### Competitive Response+```+OBSERVE: Competitor announcement, market reaction, customer feedback+ORIENT: Assess threat level, identify our advantages, gaps+DECIDE: Response strategy (match, differentiate, ignore)+ACT: Execute response, observe market reaction+LOOP: Adjust based on effectiveness+```++### Debugging Under Pressure+```+OBSERVE: Error messages, stack traces, recent changes+ORIENT: Form hypothesis about cause+DECIDE: Test most likely hypothesis first+ACT: Add logging, try fix, or eliminate possibility+LOOP: Update hypothesis based on results+```++## OODA for Teams++### Parallel Loops+Different team members can run loops simultaneously:+```+SRE: Infrastructure OODA (scaling, failover)+Dev: Code OODA (debugging, fixes)+Support: Communication OODA (users, stakeholders)+Lead: Strategy OODA (coordination, escalation)+```++### Shared Orientation+Teams need synchronized mental models:+- Runbooks create shared orientation+- Incident channels share observations+- Clear roles enable parallel action+- Post-incident updates orientation for next time++## Verification Checklist+- [ ] Observing actual current state, not assumptions+- [ ] Orientation considers multiple hypotheses+- [ ] Decision is actionable and time-bound+- [ ] Action creates observable feedback+- [ ] Loop is actually cycling (not stuck in one phase)+- [ ] Speed is appropriate to situation urgency++## Common Failure Modes++| Failure | Symptom | Fix |+|---------|---------|-----|+| Observation overload | Can't process all data | Filter to key indicators |+| Orientation lock | Stuck on one hypothesis | Force alternative framing |+| Decision paralysis | Waiting for certainty | Set decision deadline |+| Action without observation | Blind execution | Mandate observe after act |+| Single loop | Not cycling | Time-box each phase |++## Key Questions+- "What do I observe RIGHT NOW?" (not 5 minutes ago)+- "What does this mean? What pattern does it match?"+- "What's my best action given current understanding?"+- "How will I know if my action worked?"+- "Am I cycling fast enough?"++## Boyd's Insight+"He who can handle the quickest rate of change survives."++The goal isn't just making decisions—it's making decisions faster than the situation evolves, faster than competitors adapt, faster than problems compound. Speed creates options; delay eliminates them.diff --git a/.claude/skills/thinking-pre-mortem/SKILL.md b/.claude/skills/thinking-pre-mortem/SKILL.mdnew file mode 100644index 0000000..959bee9--- /dev/null+++ b/.claude/skills/thinking-pre-mortem/SKILL.md@@ -0,0 +1,172 @@+---+name: thinking-pre-mortem+description: Imagine a project has failed and work backward to identify why. Use at project kickoffs, before major decisions, or when optimism may be obscuring risks.+---++# Pre-Mortem Analysis++## Overview+The pre-mortem, developed by psychologist Gary Klein, uses "prospective hindsight" to improve risk identification. Instead of asking "What could go wrong?" (which triggers defensiveness), assume the project HAS failed and ask "Why did it fail?" This simple reframe improves risk identification by approximately 30%.++**Core Principle:** It's easier to explain failure after the fact than predict it beforehand. Use this bias productively.++## When to Use+- Project kickoff (before work begins)+- Before committing to a major technical decision+- Sprint planning for high-risk work+- Before launch or major release+- When team seems overconfident+- After a plan is formed but before execution++Decision flow:+```+Starting significant work? → yes → Team confident? → yes → PRE-MORTEM ESSENTIAL+ ↘ no → Pre-mortem still valuable+ ↘ no → Standard risk assessment may suffice+```++## The Process++### Step 1: Set the Stage (2 min)+Gather the team. Explain:+> "Imagine we're 6 months in the future. The project has failed—not just missed a deadline, but failed spectacularly. We're in the postmortem. Your job: explain what went wrong."++Key: Use past tense. The failure has already happened.++### Step 2: Silent Brainstorming (5-7 min)+Each person independently writes reasons for failure:+- No discussion during this phase+- Aim for 5-10 reasons each+- Include technical, process, people, and external factors+- Think about what YOU specifically might have contributed to failure++Prompt: "It's [future date]. The project failed. Write down all the reasons why."++### Step 3: Round-Robin Sharing (10-15 min)+Go around the room, each person shares ONE reason per round:+- No critiquing or dismissing+- Facilitator captures all items+- Continue until all unique reasons surfaced+- Duplicates show consensus on key risks++### Step 4: Categorize and Prioritize (5-10 min)+Group by theme and assess:++| Category | Risk | Likelihood | Impact | Priority |+|----------|------|------------|--------|----------|+| Technical | API integration fails | High | Critical | P0 |+| Process | Requirements unclear | Medium | High | P1 |+| People | Key person leaves | Low | Critical | P1 |+| External | Vendor delays | Medium | Medium | P2 |++### Step 5: Develop Mitigations (10-15 min)+For top risks, define:+```+Risk: API integration fails+Mitigation:+- Spike on integration in week 1+- Identify fallback vendor+- Build abstraction layer for swap-ability+Owner: [Name]+Checkpoint: Week 2 review+```++### Step 6: Update the Plan+Incorporate mitigations into project plan:+- Add spike/investigation tasks+- Build in contingency time+- Assign risk owners+- Schedule risk review checkpoints++## Pre-Mortem Template++```markdown+# Pre-Mortem: [Project Name]+Date: [Date]+Participants: [Names]++## The Scenario+It is [Future Date]. [Project] has failed spectacularly.++## Failure Reasons Identified++### Technical+- [Reason 1]+- [Reason 2]++### Process+- [Reason 1]+- [Reason 2]++### People/Team+- [Reason 1]+- [Reason 2]++### External/Dependencies+- [Reason 1]+- [Reason 2]++## Priority Risks and Mitigations++### P0: [Risk Name]+- **Description**: [What went wrong]+- **Mitigation**: [How to prevent]+- **Owner**: [Who]+- **Checkpoint**: [When to verify]++### P1: [Risk Name]+...++## Plan Updates+- [ ] [Action item from pre-mortem]+- [ ] [Action item from pre-mortem]++## Review Schedule+- [Date]: First risk checkpoint+- [Date]: Mid-project risk review+```++## Why Pre-Mortems Work++1. **Legitimizes Pessimism**: Team members can voice concerns without seeming negative+2. **Bypasses Groupthink**: Individual brainstorming before sharing prevents anchoring+3. **Uses Hindsight Bias**: Easier to explain past than predict future+4. **Creates Psychological Safety**: "The project failed" removes blame+5. **Surfaces Hidden Knowledge**: People share concerns they wouldn't otherwise raise++## Common Failure Categories to Prompt++| Category | Example Failures |+|----------|-----------------|+| Requirements | Scope creep, unclear success criteria, missing stakeholder |+| Technical | Wrong architecture, integration failures, scale issues |+| Timeline | Underestimation, dependencies delayed, parallel work blocked |+| Team | Key person unavailable, skill gaps, communication breakdown |+| External | Vendor issues, regulatory changes, market shift |+| Process | Insufficient testing, deployment problems, no rollback |++## Facilitation Tips+- **Enforce silence** during brainstorming—no discussion+- **Use past tense** consistently ("failed" not "might fail")+- **Capture everything**—don't filter during collection+- **Include yourself**—what might YOU have done wrong?+- **Follow up**—pre-mortem is worthless without action++## Verification Checklist+- [ ] Conducted at appropriate time (before significant work)+- [ ] All team members participated+- [ ] Silent brainstorming enforced+- [ ] 20+ failure reasons collected+- [ ] Risks prioritized by likelihood × impact+- [ ] Top 3-5 risks have explicit mitigations+- [ ] Mitigations assigned owners and checkpoints+- [ ] Plan updated to incorporate findings+- [ ] Follow-up risk review scheduled++## Key Questions+- "The project failed. Why?"+- "What did we miss that was obvious in retrospect?"+- "What warning signs did we ignore?"+- "What did I personally contribute to the failure?"+- "What did we assume that turned out to be wrong?"+- "Who did we forget to involve?"diff --git a/.claude/skills/thinking-second-order/SKILL.md b/.claude/skills/thinking-second-order/SKILL.mdnew file mode 100644index 0000000..ff1cf8f--- /dev/null+++ b/.claude/skills/thinking-second-order/SKILL.md@@ -0,0 +1,178 @@+---+name: thinking-second-order+description: Think beyond immediate consequences to second and third-order effects. Use for strategic decisions, policy changes, and avoiding unintended consequences.+---++# Second-Order Thinking++## Overview+Second-order thinking, articulated by Howard Marks, moves beyond immediate effects to consider what happens next, and what that leads to. First-order thinking is simplistic ("This action solves the problem"); second-order thinking asks "And then what?" repeatedly.++**Core Principle:** The obvious answer to "What should I do?" is often wrong because it ignores downstream effects.++## When to Use+- Making strategic or architectural decisions+- Evaluating policy or process changes+- Considering incentive structures+- Planning features that change user behavior+- Decisions with long-term consequences+- When the "obvious" solution feels too easy++Decision flow:+```+Decision with consequences beyond immediate? → yes → APPLY SECOND-ORDER THINKING+ ↘ no → First-order may suffice+```++## First vs Second-Order Thinking++| Situation | First-Order | Second-Order |+|-----------|-------------|--------------|+| Team is slow | Add more engineers | More engineers → more coordination → slower decisions → may get slower |+| Users complain | Add the feature they request | Feature → complexity → more support load → less time for core work |+| Costs too high | Cut spending | Cuts → reduced quality → customer churn → revenue drop → worse situation |+| Bug in prod | Hotfix immediately | Hotfix → skip testing → more bugs → trust erosion → slower deployments |++## The Process++### Step 1: Identify the Decision and First-Order Effect+```+Decision: Add a feature flag system+First-order: Teams can ship features independently ✓+```++### Step 2: Ask "And Then What?"+Chain the consequences:+```+Feature flags → More flags created → Flag debt accumulates+ → Teams don't clean up → Combinatorial testing complexity+ → Bugs from flag interactions → "Turn it off" becomes risky+ → Flags become permanent → Codebase complexity explodes+```++### Step 3: Apply the 10/10/10 Framework+Evaluate impact across time horizons:++| Timeframe | Question | Analysis |+|-----------|----------|----------|+| 10 minutes | How will I feel right after? | Relief—problem solved |+| 10 months | How will this affect things in 10 months? | Flag sprawl emerging |+| 10 years | What's the long-term trajectory? | Technical debt crisis |++### Step 4: Consider Systemic Effects+Ask: "What if everyone did this?"+```+Decision: Skip code review for urgent fixes+If everyone: All urgent fixes skip review+Result: Definition of "urgent" expands → most things skip review+Outcome: Quality collapses, more urgent fixes needed+```++### Step 5: Map the Consequence Chain+```+┌─────────────────┐+│ Decision: X │+└────────┬────────┘+ ▼+┌─────────────────┐+│ 1st Order: A │ ← Obvious, intended+└────────┬────────┘+ ▼+┌─────────────────┐+│ 2nd Order: B │ ← Less obvious+└────────┬────────┘+ ▼+┌─────────────────┐+│ 3rd Order: C │ ← Often counterintuitive+└────────┬────────┘+ ▼+┌─────────────────┐+│ Feedback Loop │ ← May reinforce or counteract+└─────────────────┘+```++## Common Second-Order Effects in Software++### Optimization+```+1st: Optimize critical path → Faster+2nd: Team focuses on optimization → Less feature work+3rd: Premature optimization spreads → Complexity increases+4th: Maintenance burden grows → Slower overall+```++### Hiring+```+1st: Hire senior engineers → More capacity+2nd: Salary expectations rise → Budget pressure+3rd: Junior engineers feel stuck → Attrition+4th: Knowledge concentrated in seniors → Bus factor risk+```++### Process Addition+```+1st: Add approval process → More oversight+2nd: Approvals create bottleneck → Slower delivery+3rd: People route around process → Shadow processes+4th: Formal process becomes theater → Worst of both worlds+```++### Technical Shortcuts+```+1st: Skip tests to ship faster → Feature delivered+2nd: Bugs emerge → Support load increases+3rd: Team fights fires → Less time for features+4th: More shortcuts taken → Quality death spiral+```++## Application Framework++For any significant decision, fill out:++```markdown+## Second-Order Analysis: [Decision]++### Immediate Effect (1st Order)+[What happens right away]++### Near-Term Consequences (2nd Order)+[What does the immediate effect cause? 1-3 months]++### Medium-Term Consequences (3rd Order)+[What do the near-term effects cause? 3-12 months]++### Long-Term Trajectory+[Where does this path lead? 1+ years]++### Feedback Loops+[Does this create reinforcing or balancing dynamics?]++### If Scaled+[What happens if this becomes standard practice?]++### Revised Decision+[Given analysis, what should we actually do?]+```++## Questions to Surface Second-Order Effects+- "And then what?"+- "Who else is affected, and how will they respond?"+- "What incentives does this create?"+- "What behavior does this encourage/discourage?"+- "If this works, what problems does success create?"+- "What will we wish we had done differently in a year?"+- "What does this look like if everyone does it?"++## Verification Checklist+- [ ] Identified first-order effect clearly+- [ ] Asked "and then what?" at least 3 times+- [ ] Applied 10/10/10 framework+- [ ] Considered systemic/scaled effects+- [ ] Identified potential feedback loops+- [ ] Revised decision based on full consequence chain+- [ ] Documented reasoning for future reference++## Marks' Warning+"First-level thinking is simplistic and superficial, and just about everyone can do it. Second-level thinking is deep, complex, and convoluted."++The crowd uses first-order thinking. Competitive advantage comes from thinking one level deeper—seeing what happens after the obvious effect.diff --git a/.claude/skills/thinking-socratic/SKILL.md b/.claude/skills/thinking-socratic/SKILL.mdnew file mode 100644index 0000000..e2c2ff0--- /dev/null+++ b/.claude/skills/thinking-socratic/SKILL.md@@ -0,0 +1,193 @@+---+name: thinking-socratic+description: Systematic questioning framework to deepen understanding, challenge assumptions, and uncover hidden beliefs. Use for requirements gathering, debugging, coaching, and critical analysis.+---++# Socratic Questioning++## Overview+The Socratic Method, developed by the ancient Greek philosopher Socrates, uses systematic questioning to stimulate critical thinking and illuminate ideas. Rather than providing answers, it draws out knowledge by challenging assumptions and exploring implications.++**Core Principle:** Questions are more powerful than answers. The right question reveals what we don't know we don't know.++## When to Use+- Requirements gathering (understanding what stakeholders really need)+- Debugging (tracing assumptions to find root causes)+- Code review (understanding design decisions)+- Coaching and mentoring (helping others reach insights)+- Self-reflection (examining your own beliefs)+- Evaluating proposals or designs+- When someone says "obvious" or "everyone knows"++Decision flow:+```+Understanding seems shallow? → yes → APPLY SOCRATIC QUESTIONING+Assumptions unexamined? → yes → APPLY SOCRATIC QUESTIONING+Root cause unclear? → yes → APPLY SOCRATIC QUESTIONING+```++## The Six Types of Socratic Questions++### 1. Clarification Questions+**Purpose:** Ensure clear understanding of the claim or concept++| Question | Use When |+|----------|----------|+| "What do you mean by X?" | Term is ambiguous |+| "Can you give me an example?" | Concept is abstract |+| "How does this relate to Y?" | Connection unclear |+| "Can you rephrase that?" | Statement is confusing |+| "What is the main point?" | Discussion is scattered |++**Example:**+> "The system needs to be fast."+> → "What do you mean by 'fast'? What latency is acceptable?"+> → "Fast for whom? End users? Batch processes?"++### 2. Assumption-Probing Questions+**Purpose:** Expose underlying beliefs that may be unexamined++| Question | Use When |+|----------|----------|+| "What are we assuming here?" | Conclusion seems too quick |+| "Is this always true?" | Generalization made |+| "What if that assumption is wrong?" | Testing robustness |+| "Why do we believe this?" | Basis unclear |+| "What would have to change for this to be false?" | Finding conditions |++**Example:**+> "We need microservices for scale."+> → "What are we assuming about our scale requirements?"+> → "Is it always true that microservices scale better?"+> → "What if a modular monolith could meet our needs?"++### 3. Reason & Evidence Questions+**Purpose:** Examine the support for a claim++| Question | Use When |+|----------|----------|+| "What evidence supports this?" | Claim is asserted |+| "How do we know this?" | Source unclear |+| "Are there other explanations?" | Causation assumed |+| "What would prove this wrong?" | Testing falsifiability |+| "Is this evidence sufficient?" | Conclusion seems strong |++**Example:**+> "Users don't want feature X."+> → "What evidence do we have for this?"+> → "How many users did we ask? How were they selected?"+> → "Could there be other explanations for the feedback?"++### 4. Perspective & Viewpoint Questions+**Purpose:** Consider alternative angles and stakeholders++| Question | Use When |+|----------|----------|+| "How would X see this?" | Single perspective dominates |+| "What's the opposite view?" | No alternatives considered |+| "Who disagrees, and why?" | Consensus seems too easy |+| "What are we not seeing?" | Blind spots suspected |+| "How does this look from [role]?" | Stakeholder impact unclear |++**Example:**+> "This API design is intuitive."+> → "How would a new developer view this?"+> → "What would someone from a different language background expect?"+> → "Who might find this confusing, and why?"++### 5. Implication & Consequence Questions+**Purpose:** Explore downstream effects and logical conclusions++| Question | Use When |+|----------|----------|+| "What follows from this?" | Implications unexplored |+| "If this is true, what else must be true?" | Testing consistency |+| "What are the consequences?" | Impact unclear |+| "How does this affect X?" | Ripple effects not considered |+| "What are the second-order effects?" | Only immediate effects seen |++**Example:**+> "We'll add this field to the API response."+> → "What follows from adding this field?"+> → "How does this affect clients that don't need it?"+> → "What are the implications for backward compatibility?"++### 6. Questions About the Question+**Purpose:** Reflect on the inquiry itself; meta-level examination++| Question | Use When |+|----------|----------|+| "Why is this question important?" | Purpose unclear |+| "What would answering this tell us?" | Value of question unclear |+| "Is this the right question?" | May be missing the point |+| "What question should we be asking?" | Reframing needed |+| "Why are we asking this now?" | Timing or priority unclear |++**Example:**+> "Which database should we use?"+> → "Why is this question important right now?"+> → "What would answering this tell us that we don't know?"+> → "Is the real question about database, or about data modeling?"++## Application Patterns++### For Requirements Gathering+```+Stakeholder: "We need a dashboard."+Clarification: "What decisions will the dashboard help you make?"+Assumptions: "What are we assuming about who will use this?"+Evidence: "What data shows this is the highest priority?"+Perspective: "How do different user roles need different views?"+Implications: "If we build this, what won't we build?"+Meta: "Is a dashboard the best solution, or is there another approach?"+```++### For Debugging+```+Report: "The system is slow."+Clarification: "Which operations are slow? How slow?"+Assumptions: "What are we assuming about where the bottleneck is?"+Evidence: "What metrics/traces support this?"+Perspective: "Is it slow for all users or specific patterns?"+Implications: "If we fix this, what else might change?"+Meta: "Is 'slow' the right frame? Could it be 'inconsistent'?"+```++### For Design Review+```+Proposal: "We should use event sourcing."+Clarification: "What do you mean by event sourcing in this context?"+Assumptions: "What are we assuming about our query patterns?"+Evidence: "What evidence suggests this fits our use case?"+Perspective: "How would ops view this? New team members?"+Implications: "What are the consequences for debugging? Storage?"+Meta: "Is the real question about event sourcing or auditability?"+```++## Facilitation Tips+- **Genuine curiosity**: Ask because you want to understand, not to trap+- **Follow the thread**: Let answers guide next questions+- **Comfortable silence**: Allow time for reflection+- **Non-judgmental tone**: Questions should feel safe+- **Build on answers**: "That's interesting. Can you say more about..."+- **Admit ignorance**: "I don't understand. Help me see..."++## Verification Checklist+- [ ] Used questions from at least 3 of the 6 categories+- [ ] Probed assumptions underlying the topic+- [ ] Explored at least one alternative perspective+- [ ] Examined implications and consequences+- [ ] Reached deeper understanding than starting point+- [ ] Documented key insights from questioning++## Key Meta-Questions+- "What do I think I know, and how do I know it?"+- "What question am I not asking?"+- "What would change my mind about this?"+- "Who knows more about this than I do?"+- "What's the question behind the question?"++## Socrates' Reminder+"I know that I know nothing."++The goal is not to prove others wrong but to discover truth together. The best questions reveal what everyone—including the questioner—doesn't yet understand.diff --git a/.claude/skills/thinking-systems/SKILL.md b/.claude/skills/thinking-systems/SKILL.mdnew file mode 100644index 0000000..b207b41--- /dev/null+++ b/.claude/skills/thinking-systems/SKILL.md@@ -0,0 +1,233 @@+---+name: thinking-systems+description: Analyze problems as interconnected systems with feedback loops, emergent behavior, and non-linear effects. Use for debugging complex systems, architecture decisions, and understanding unexpected behavior.+---++# Systems Thinking++## Overview+Systems thinking views problems as part of interconnected wholes rather than isolated components. It focuses on relationships, feedback loops, and emergent properties—behaviors that arise from interactions and can't be predicted from parts alone. Essential for debugging complex distributed systems and understanding why "obvious" fixes often fail.++**Core Principle:** The behavior of a system cannot be understood by analyzing components in isolation. Look at connections, feedback, and emergence.++## When to Use+- Debugging issues that span multiple services/components+- Understanding unexpected emergent behavior+- Designing resilient architectures+- Analyzing incidents and outages+- When fixing one thing breaks another+- Performance issues with non-obvious causes+- Organizational/process problems++Decision flow:+```+Problem spans multiple components? → yes → APPLY SYSTEMS THINKING+Fix in one place caused issue in another? → yes → APPLY SYSTEMS THINKING+Behavior seems "emergent" or unexpected? → yes → APPLY SYSTEMS THINKING+```++## Key Concepts++### 1. Feedback Loops++**Reinforcing (Positive) Loops:** Amplify change+```+Technical Debt Loop:+Deadline pressure → Shortcuts → More bugs → More firefighting+ ↓+ ← Less time for quality ←+```++**Balancing (Negative) Loops:** Counteract change+```+Auto-scaling Loop:+Load increases → More instances spawn → Load per instance decreases+ ↓+ ← Fewer instances needed ←+```++**Questions to identify loops:**+- Does this effect feed back into its cause?+- Is this self-reinforcing or self-correcting?+- What keeps this system in equilibrium?++### 2. Stocks and Flows+**Stocks:** Accumulated quantities (users, technical debt, cache size)+**Flows:** Rates of change (registrations/day, bugs fixed/sprint)++```+┌─────────────────────────────────────┐+│ Inflow → [Stock] → Outflow │+│ │+│ New bugs → [Bug Backlog] → Fixes │+│ Requests → [Queue Depth] → Processed│+│ Hires → [Team Size] → Attrition │+└─────────────────────────────────────┘+```++**Key insight:** Stocks change slowly even when flows change quickly. Queue depth doesn't drop instantly when you add capacity.++### 3. Delays+Time lags between cause and effect obscure relationships:+```+Code deployed → [Delay: Cache TTL] → Users see change+Feature shipped → [Delay: Adoption curve] → Metrics change+New hire starts → [Delay: Ramp-up] → Productivity impact+```++**Danger:** Acting before feedback arrives leads to overcorrection.++### 4. Non-Linear Relationships+Small changes can have large effects (and vice versa):+```+Linear assumption: 2x traffic = 2x latency+Reality: Traffic crosses threshold → 10x latency (queue buildup)++Linear assumption: Adding engineer adds capacity+Reality: Communication overhead grows O(n²)+```++### 5. Emergent Properties+Behaviors that arise from interactions, not individual components:+- **Distributed system:** No single service is slow, but the system is slow (cascading delays)+- **Team dynamics:** No individual is toxic, but collaboration is toxic (incentive interactions)+- **Market behavior:** No actor intends a bubble, but bubble emerges++## Systems Debugging Process++### Step 1: Map the System+Draw components, connections, and data/control flows:+```+┌─────────┐ ┌─────────┐ ┌─────────┐+│ Client │────▶│ API │────▶│ DB │+└─────────┘ └────┬────┘ └─────────┘+ │+ ▼+ ┌─────────┐+ │ Cache │+ └─────────┘+```++### Step 2: Identify Feedback Loops+For each loop, determine:+- Is it reinforcing or balancing?+- What's the delay in the loop?+- What could make it unstable?++```+Retry Storm Loop (Reinforcing - Dangerous):+Service slow → Clients retry → More load → Service slower → More retries+```++### Step 3: Trace Upstream+Follow the symptom backward to find originating cause:+```+Symptom: High latency in Service C+→ Service C waiting on Service B+ → Service B waiting on Service A+ → Service A doing full table scan (ROOT CAUSE)+```++### Step 4: Look for Interactions+What happens when components interact under stress?+- Circuit breakers tripping+- Cascading timeouts+- Resource contention+- Thundering herd++### Step 5: Consider Time Dynamics+- When did this start?+- What changed recently (deploys, config, traffic)?+- Is it periodic? (Cron jobs, cache expiration, batch processes)+- Is it growing or stabilizing?++## Common System Patterns++### Cascading Failure+```+One component fails → Dependent components overload → They fail+ ↓+ ← More traffic to remaining ←+```+**Mitigation:** Circuit breakers, bulkheads, graceful degradation++### Thundering Herd+```+Cache expires → All requests hit backend simultaneously → Overload+```+**Mitigation:** Jittered expiration, cache warming, request coalescing++### Queue Backup+```+Processing rate < Arrival rate → Queue grows → Memory pressure → OOM+```+**Mitigation:** Backpressure, rate limiting, queue bounds++### Resource Contention+```+Multiple processes → Same resource → Lock contention → Serialization+ ↓+ Throughput collapses despite available CPU+```+**Mitigation:** Sharding, optimistic locking, resource isolation++## Causal Loop Diagram Template++```+┌──────────────────────────────────────────────────────────────┐+│ System: [Name] │+├──────────────────────────────────────────────────────────────┤+│ │+│ ┌─────────┐ ┌─────────┐ │+│ │ Factor │──────(+)──────────────▶│ Factor │ │+│ │ A │ │ B │ │+│ └─────────┘ └────┬────┘ │+│ ▲ │ │+│ │ │ │+│ (-) (+) │+│ │ │ │+│ │ ┌─────────┐ │ │+│ └─────────│ Factor │◀─────────────┘ │+│ │ C │ │+│ └─────────┘ │+│ │+│ Legend: (+) = same direction, (-) = opposite direction │+│ Loop type: Reinforcing / Balancing │+└──────────────────────────────────────────────────────────────┘+```++## Leverage Points+Where small changes have large effects (Donella Meadows):++| Leverage | Example | Impact |+|----------|---------|--------|+| Parameters | Timeout values | Low |+| Buffer sizes | Queue limits | Low-Medium |+| Feedback loops | Add monitoring | Medium |+| Information flows | Make metrics visible | Medium-High |+| Rules | Change retry policy | High |+| Goals | Redefine SLOs | Very High |+| Paradigm | Rethink architecture | Transformational |++## Verification Checklist+- [ ] Mapped system components and connections+- [ ] Identified at least one feedback loop+- [ ] Traced symptom upstream to potential root causes+- [ ] Considered time delays in the system+- [ ] Looked for emergent/interaction effects+- [ ] Identified leverage points for intervention+- [ ] Considered unintended consequences of fix++## Key Questions+- "What feeds back into what?"+- "Where are the delays in this system?"+- "What happens when this scales 10x?"+- "What would an observer see vs. what's actually happening?"+- "If I fix this here, what breaks over there?"+- "What behavior emerges that no single component intends?"+- "Where is the smallest change with the largest effect?"++## Meadows' Reminder+"We can't control systems or figure them out. But we can dance with them."++Systems resist simple fixes. Effective intervention requires understanding the whole, finding leverage points, and accepting that you're influencing, not controlling.diff --git a/.claude/skills/thinking-triz/SKILL.md b/.claude/skills/thinking-triz/SKILL.mdnew file mode 100644index 0000000..efc4831--- /dev/null+++ b/.claude/skills/thinking-triz/SKILL.md@@ -0,0 +1,376 @@+---+name: thinking-triz+description: Apply TRIZ (Theory of Inventive Problem Solving) methodology to resolve technical contradictions and find innovative solutions. Use for engineering design, breaking through impossible constraints, and systematic innovation.+---++# TRIZ Thinking++## Overview++TRIZ (Teoriya Resheniya Izobretatelskikh Zadatch) is a systematic innovation methodology developed by Genrich Altshuller from analyzing 200,000+ patents. It provides structured approaches to solve "impossible" problems by identifying and resolving contradictions rather than accepting trade-offs.++**Core Principle:** Behind every difficult problem lies a contradiction. Resolve the contradiction, solve the problem. Great innovations don't compromise—they transcend.++## When to Use++- Facing "impossible" trade-offs (fast vs. accurate, secure vs. convenient)+- Stuck choosing between two conflicting requirements+- Need innovation beyond incremental improvement+- Design has hit fundamental constraints+- Competitors all accept the same trade-off you're facing+- Requirements seem mutually exclusive+- Breaking through performance plateaus++Decision flow:++```+Stuck between trade-offs? → yes → APPLY TRIZ+Requirements seem contradictory? → yes → APPLY TRIZ+Need breakthrough, not compromise? → yes → APPLY TRIZ+All solutions have same weakness? → yes → APPLY TRIZ+```++## The Ideal Final Result (IFR)++Before solving, envision the ideal outcome—the system that solves itself:++```+IFR Formula:+"The [component] [achieves the goal] BY ITSELF,+without [cost/complexity/side effects],+while maintaining [all other functions]"+```++**Software Examples:**++```+Traditional: "We need a caching layer to improve performance"+IFR: "The system is instantly fast without any cache complexity"+→ Leads to: Data structures that are inherently fast, lazy evaluation,+ computation at write-time instead of read-time++Traditional: "We need monitoring to detect failures"+IFR: "The system never fails, or failures instantly self-heal"+→ Leads to: Self-healing architectures, chaos engineering,+ designing for failure from the start+```++**IFR Questions:**++- What if the problem solved itself?+- What if the harmful element became useful?+- What if we needed zero of the problematic component?+- What's the result we want with zero cost/complexity?++## Contradiction Types++### Technical Contradictions++Improving one parameter worsens another:++| Improving | Worsens | Example |+|-----------|---------|---------|+| Speed | Accuracy | Fast processing loses precision |+| Security | Usability | Strong auth frustrates users |+| Reliability | Cost | Redundancy is expensive |+| Features | Simplicity | More capability, more complexity |+| Throughput | Latency | Batching improves throughput, hurts latency |++### Physical Contradictions++Same element must have opposite properties:++```+"The timeout must be SHORT (for fast failure detection)+ AND LONG (to tolerate network variance)"++"The cache must be LARGE (for high hit rate)+ AND SMALL (for fast invalidation and low memory)"++"The API must be STABLE (for clients)+ AND CHANGING (for evolution)"+```++## The 40 Inventive Principles (Software-Adapted)++### Most Applicable to Software Engineering++| # | Principle | Software Application |+|---|-----------|---------------------|+| 1 | **Segmentation** | Microservices, sharding, pagination, chunked processing |+| 2 | **Taking Out** | Extract the problematic part; separation of concerns |+| 3 | **Local Quality** | Different configs per environment; adaptive algorithms |+| 5 | **Merging** | Combine operations (batch), merge services, reduce round-trips |+| 6 | **Universality** | Multi-purpose components, plugins, generic abstractions |+| 10 | **Preliminary Action** | Pre-computation, caching, lazy loading, warm-up |+| 11 | **Beforehand Cushioning** | Circuit breakers, graceful degradation, fallbacks |+| 13 | **The Other Way Round** | Push vs. pull, invert control, event-driven vs. polling |+| 15 | **Dynamization** | Dynamic scaling, feature flags, runtime configuration |+| 17 | **Another Dimension** | Add metadata layer, versioning, time dimension (event sourcing) |+| 22 | **Blessing in Disguise** | Use errors as signals, leverage constraints, fail-fast |+| 24 | **Intermediary** | Proxy, adapter, facade, message queue, API gateway |+| 25 | **Self-Service** | Automation, self-healing, auto-scaling, self-documenting |+| 26 | **Copying** | Caching, replication, CDN, read replicas, memoization |+| 28 | **Mechanics Substitution** | Replace polling with webhooks, sync with async |+| 32 | **Color Changes** | Status indicators, logging levels, visual feedback |+| 34 | **Discarding/Recovering** | Immutability, event sourcing, garbage collection |+| 35 | **Parameter Changes** | Feature flags, A/B testing, configuration over code |+| 37 | **Thermal Expansion** | Elastic scaling, auto-tuning, adaptive thresholds |+| 40 | **Composite Structures** | Composition over inheritance, layered architecture |++### Principle Application Examples++**Segmentation (#1):**++```+Problem: Monolith is slow to deploy and scale+Contradiction: Need unified system (consistency) AND independent scaling+Apply: Segment by bounded context → Microservices with clear boundaries+```++**Preliminary Action (#10):**++```+Problem: Complex queries are slow+Contradiction: Need real-time results AND complex aggregations+Apply: Pre-compute during write → Materialized views, denormalization+```++**The Other Way Round (#13):**++```+Problem: Polling for updates wastes resources+Contradiction: Need immediate updates AND low server load+Apply: Invert the flow → Webhooks, Server-Sent Events, WebSockets+```++**Intermediary (#24):**++```+Problem: Direct client-service coupling is fragile+Contradiction: Need loose coupling AND reliable communication+Apply: Add intermediary → Message queue, API gateway, service mesh+```++## Resolving Physical Contradictions++When the same element needs opposite properties, use separation:++### Separation in Time++```+"Cache must be fresh AND cached"+→ Time-based invalidation: cached now, fresh later+→ TTL strategies, cache warming schedules++"System must accept AND reject requests"+→ Rate limiting: accept up to threshold, reject after+→ Token bucket, sliding window+```++### Separation in Space++```+"Data must be local (fast) AND distributed (resilient)"+→ Multi-region with local reads, distributed writes+→ Read replicas, write-through caching++"Logs must be detailed (debugging) AND minimal (performance)"+→ Detailed in dev, minimal in prod+→ Different log levels per environment+```++### Separation by Condition++```+"Authentication must be strict AND frictionless"+→ Strict for sensitive operations, frictionless for low-risk+→ Step-up authentication, risk-based auth++"Validation must be thorough AND fast"+→ Thorough for untrusted input, fast for internal+→ Trust boundaries, schema validation at edges only+```++### Separation in Scale/Level++```+"API must be stable AND evolving"+→ Stable interface, evolving implementation+→ Versioning, backward compatibility, API contracts+```++## Contradiction Analysis Framework++### Step 1: State the Contradiction Clearly++```+Template:+"We need [PARAMETER A] to be [STATE 1] for [BENEFIT 1]+ BUT also [STATE 2] for [BENEFIT 2]"++Example:+"We need response time to be FAST for user experience+ BUT also processing to be THOROUGH for accuracy"+```++### Step 2: Identify the Conflicting Requirements++List what each state provides:++```+FAST processing: THOROUGH processing:+- Better UX - Higher accuracy+- Lower timeout risk - Complete validation+- Reduced server load - Fewer edge case bugs+```++### Step 3: Apply Separation Principles++Try each separation type:++```+Time: Can we be fast first, thorough later? (async processing)+Space: Can we be fast here, thorough there? (edge vs. origin)+Condition: Can we be fast sometimes, thorough others? (adaptive)+Scale: Can fast and thorough exist at different levels? (layered validation)+```++### Step 4: Apply Inventive Principles++Scan relevant principles:++```+#1 Segmentation: Break into fast-path and slow-path+#10 Preliminary Action: Pre-compute thorough checks+#13 Other Way Round: Push complexity to write-time+#24 Intermediary: Queue for async thorough processing+#26 Copying: Cache thorough results for fast retrieval+```++### Step 5: Synthesize Solutions++Combine insights into concrete approaches:++```+Solution: Layered validation with async completion+- Edge: Fast syntactic validation (immediate)+- Queue: Thorough semantic validation (async)+- Response: Immediate acknowledgment, webhook for final result+```++## Software Engineering Contradiction Patterns++### Speed vs. Accuracy++```+Contradiction: Need fast results AND accurate results+TRIZ Solutions:+- #1 Segmentation: Fast approximate first, accurate refinement+- #10 Preliminary Action: Pre-compute accurate, serve cached+- #26 Copying: Cache accurate results, serve instantly+Example: Typeahead with fast fuzzy match, async precise ranking+```++### Security vs. Usability++```+Contradiction: Need strong security AND frictionless UX+TRIZ Solutions:+- Separation by Condition: Risk-based authentication+- #3 Local Quality: Stricter for sensitive operations+- #15 Dynamization: Adaptive security based on context+Example: Passwordless for trusted device, MFA for new device+```++### Consistency vs. Availability++```+Contradiction: Need strong consistency AND high availability (CAP)+TRIZ Solutions:+- Separation in Space: Consistent within region, eventually across+- #1 Segmentation: Some data strongly consistent, some eventual+- #17 Another Dimension: Version vectors, conflict resolution+Example: CRDT for collaborative editing, strong consistency for transactions+```++### Simplicity vs. Capability++```+Contradiction: Need powerful features AND simple interface+TRIZ Solutions:+- #1 Segmentation: Progressive disclosure, advanced mode+- #6 Universality: Composable primitives vs. monolithic features+- #24 Intermediary: Abstraction layers hiding complexity+Example: Simple API with sensible defaults, advanced options available+```++## Resource Analysis++TRIZ teaches using existing resources before adding new ones:++### Resource Types++| Type | Examples | Software Analog |+|------|----------|-----------------|+| Substance | Materials at hand | Existing data, unused fields |+| Field | Energy sources | Compute, network, existing events |+| Space | Unused volume | Memory, disk, idle cores |+| Time | Idle periods | Off-peak processing, startup time |+| Information | Available signals | Logs, metrics, existing state |+| Function | Existing capabilities | Libraries, services already running |++### Finding Hidden Resources++```+Before: "We need a new service to track user sessions"+Resource Analysis:+- What data already exists? → Auth tokens have user identity+- What's already running? → Load balancer sees all requests+- What's unused? → Request headers have room for session ID+Solution: Encode session in existing auth flow, no new service+```++## Evolution Patterns++TRIZ identifies how systems evolve—use to anticipate future state:++| Pattern | Description | Software Example |+|---------|-------------|------------------|+| Increasing Ideality | Systems evolve toward IFR | Serverless (no server management) |+| Uneven Development | Parts evolve at different rates | Legacy + modern microservices |+| Transition to Micro | Components get smaller | Monolith → microservices → functions |+| Dynamization | Static becomes dynamic | Config files → feature flags → ML |+| Increased Controllability | More fine-grained control | Manual → automated → autonomous |++## Verification Checklist++- [ ] Stated the contradiction explicitly (technical or physical)+- [ ] Defined the Ideal Final Result+- [ ] Attempted separation (time, space, condition, scale)+- [ ] Reviewed applicable inventive principles+- [ ] Analyzed available resources before adding new ones+- [ ] Solution resolves contradiction, not just compromises+- [ ] Considered evolution trajectory of the system++## Integration with Other Thinking Models++- **First Principles**: Break down assumptions before applying TRIZ+- **Inversion**: What would make the contradiction worse? Avoid that.+- **Systems Thinking**: Trace contradiction through feedback loops+- **Second-Order**: Consider downstream effects of resolving the contradiction++## Key Questions++- "What is the exact contradiction I'm facing?"+- "What would the Ideal Final Result look like?"+- "Can I separate the conflicting requirements in time, space, or condition?"+- "What resources already exist that I'm not using?"+- "Which inventive principle fits this contradiction pattern?"+- "Am I truly resolving the contradiction, or just compromising?"++## Altshuller's Insight++"You can wait a hundred years for enlightenment, or you can solve the problem in 15 minutes with these principles."++The power of TRIZ is that inventive solutions follow patterns. What seems like creative genius is often systematic application of principles that have worked across domains for decades.diff --git a/.gitignore b/.gitignorenew file mode 100644index 0000000..6926cfa--- /dev/null+++ b/.gitignore@@ -0,0 +1,26 @@+# OS generated files+.DS_Store+.DS_Store?+._*+.Spotlight-V100+.Trashes+ehthumbs.db+Thumbs.db++# Editor directories and files+.idea/+.vscode/+*.swp+*.swo+*~++# Node modules (if we add any tooling later)+node_modules/++# Logs+*.log+npm-debug.log*++# Local environment+.env+.env.localdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdnew file mode 100644index 0000000..2426432--- /dev/null+++ b/CONTRIBUTING.md@@ -0,0 +1,154 @@+# Contributing to Claude Code Thinking Skills++Thank you for your interest in contributing to this collection of thinking skills for Claude Code!++## How to Contribute++### Adding New Thinking Skills++We welcome new mental models and thinking frameworks that would benefit Claude Code users. Here's how to add one:++#### 1. Choose a Valid Mental Model++Good candidates for new skills:+- Established frameworks from cognitive science, systems thinking, or decision theory+- Battle-tested methodologies used in engineering, business, or science+- Frameworks with clear, actionable steps++Avoid:+- Unproven or pseudoscientific frameworks+- Highly specialized domain knowledge that's too narrow+- Frameworks that duplicate existing skills++#### 2. Create the Skill Structure++```bash+mkdir .claude/skills/thinking-{your-skill-name}+touch .claude/skills/thinking-{your-skill-name}/SKILL.md+```++#### 3. Write the SKILL.md File++Follow this template:++```markdown+---+name: thinking-your-skill-name+description: Brief description (1-2 sentences) that helps Claude Code understand when to invoke this skill.+---++# Skill Name++## Overview+Explain the framework, its origins, and core principle.++**Core Principle:** One-sentence summary of the key insight.++## When to Use+- Bullet points of scenarios+- When this is applicable+- Signs this skill would help++Decision flow:+```+Visual decision tree showing when to apply+```++## The Process++### Step 1: First Step+Clear instructions with examples.++### Step 2: Second Step+Continue with actionable guidance.++## Application Examples++### Example 1: [Context]+Show how to apply in a real scenario.++## Common Pitfalls+What to avoid when using this framework.++## Verification Checklist+- [ ] Checklist items+- [ ] For users to verify+- [ ] They've applied it correctly++## Key Questions+- Questions to ask yourself+- When using this framework++## Attribution/Quote+Quote from the framework's creator or key thinker.+```++### Improving Existing Skills++1. Fork the repository+2. Make your improvements+3. Submit a pull request with clear description of changes++#### What to Improve++- **Clarity**: Make explanations more understandable+- **Examples**: Add software engineering examples+- **Completeness**: Fill gaps in the process+- **Accuracy**: Correct misrepresentations of the framework++### Reporting Issues++If you find problems with existing skills:++1. Open an issue describing the problem+2. Reference the specific skill and section+3. Suggest a fix if you have one++## Style Guidelines++### Writing Style++- **Active voice**: "Apply this when..." not "This should be applied when..."+- **Second person**: "You should..." not "One should..."+- **Concrete examples**: Always include software engineering examples+- **No fluff**: Every sentence should add value++### Formatting++- Use consistent heading hierarchy (##, ###, ####)+- Tables for comparisons+- Code blocks for examples and templates+- Bullet points for lists+- Decision flow diagrams using ASCII art++### YAML Frontmatter++The `description` field is critical - it helps Claude Code understand when to invoke the skill:+- Keep under 200 characters+- Focus on the use case, not the theory+- Include keywords that users might mention++## Pull Request Process++1. **Fork** the repository+2. **Create** a feature branch: `git checkout -b add-thinking-skillname`+3. **Commit** with clear messages: `git commit -m "Add thinking-skillname: [brief description]"`+4. **Push** to your fork: `git push origin add-thinking-skillname`+5. **Open** a Pull Request with:+ - Clear description of the skill/change+ - Why it's valuable for Claude Code users+ - Any references to source material++## Code of Conduct++- Be respectful and constructive+- Attribute sources properly+- Focus on making the skills better for everyone++## Questions?++Open an issue with the "question" label if you're unsure about anything.++---++Thank you for helping make Claude Code smarter!diff --git a/LICENSE b/LICENSEnew file mode 100644index 0000000..4ead38f--- /dev/null+++ b/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2025 TJ Boudreaux++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/README.md b/README.mdnew file mode 100644index 0000000..403dd45--- /dev/null+++ b/README.md@@ -0,0 +1,186 @@+# Claude Code Thinking Skills++> **18 Mental Models and Frameworks for Critical Thinking in Claude Code**++A comprehensive collection of thinking skills for [Claude Code](https://claude.ai/claude-code) that enhance AI-assisted problem solving, decision making, and strategic analysis. These skills provide structured frameworks based on proven mental models from leaders in systems thinking, cognitive science, and strategic analysis.++[](https://github.com/tjboudreaux/cc-thinking-skills)+[](https://opensource.org/licenses/MIT)+[](https://github.com/tjboudreaux/cc-thinking-skills)++## Features++- **18 Thinking Frameworks** - Comprehensive mental models for better decision-making+- **Battle-Tested** - Based on proven frameworks from cognitive science and systems thinking+- **Claude Code Native** - Designed specifically for Claude Code's skill system+- **Zero Configuration** - Just install and invoke with skill names++## Quick Start++### Installation++Clone this repository and copy the skills to your Claude Code configuration:++```bash+# Clone the repository+git clone https://github.com/tjboudreaux/cc-thinking-skills.git++# Copy skills to your global Claude Code config+cp -r cc-thinking-skills/.claude/skills/* ~/.claude/skills/++# Or copy to a specific project+cp -r cc-thinking-skills/.claude/skills/* /path/to/your/project/.claude/skills/+```++### Usage++Once installed, invoke any skill by name in Claude Code:++```+> Use first-principles thinking to analyze this architecture decision+> Apply the pre-mortem framework to this project plan+> Help me use Bayesian reasoning to evaluate this hypothesis+```++## Available Skills++### Decision Making & Analysis++| Skill | Description | Best For |+|-------|-------------|----------|+| `thinking-first-principles` | Break problems into fundamental truths | Innovation, challenging assumptions |+| `thinking-second-order` | Think beyond immediate consequences | Strategic decisions, policy changes |+| `thinking-inversion` | Approach problems by identifying paths to failure | Risk identification, planning |+| `thinking-pre-mortem` | Imagine failure and work backward | Project kickoffs, risk assessment |+| `thinking-kepner-tregoe` | Systematic rational process for complex analysis | High-stakes decisions, root cause analysis |++### Cognitive & Behavioral++| Skill | Description | Best For |+|-------|-------------|----------|+| `thinking-bayesian` | Update beliefs based on evidence | Probability estimation, uncertainty |+| `thinking-debiasing` | Identify and counteract cognitive biases | Major decisions, high stakes |+| `thinking-dual-process` | Recognize when to trust intuition vs. analysis | Speed vs. accuracy tradeoffs |+| `thinking-bounded-rationality` | Make good-enough decisions under constraints | Time pressure, satisficing |+| `thinking-socratic` | Systematic questioning framework | Requirements, debugging, coaching |++### Systems & Strategy++| Skill | Description | Best For |+|-------|-------------|----------|+| `thinking-systems` | Analyze interconnected systems | Complex debugging, architecture |+| `thinking-feedback-loops` | Identify reinforcing and balancing loops | Growth design, organizational dynamics |+| `thinking-archetypes` | Recognize recurring system patterns | Organizational problems, recurring issues |+| `thinking-ooda` | Rapid decision-making for dynamic situations | Incident response, competitive scenarios |++### Problem Solving & Innovation++| Skill | Description | Best For |+|-------|-------------|----------|+| `thinking-occams-razor` | Prefer simpler explanations | Debugging, architecture decisions |+| `thinking-map-territory` | Recognize limits of mental models | Expectation mismatches, abstractions |+| `thinking-circle-of-competence` | Know the boundaries of expertise | Delegation, learning decisions |+| `thinking-triz` | Resolve technical contradictions | Engineering design, innovation |++## Detailed Skill Descriptions++### First Principles Thinking+Strip away assumptions to reveal fundamental truths, then rebuild solutions from basics. Championed by Elon Musk and rooted in Aristotle's philosophy.++**When to use:**+- Conventional approaches have failed+- You're told something is "impossible"+- Need innovation, not incremental improvement++### Bayesian Reasoning+Update beliefs systematically based on new evidence. Provides a framework for thinking about probability and uncertainty.++**When to use:**+- Estimating probabilities or likelihoods+- Interpreting test results or metrics+- Making decisions with incomplete information++### Systems Thinking+View problems as part of interconnected wholes with feedback loops and emergent properties. Essential for debugging complex distributed systems.++**When to use:**+- Debugging spans multiple components+- Fix in one place breaks another+- Behavior seems emergent or unexpected++### OODA Loop+Rapid decision-making framework (Observe, Orient, Decide, Act) for dynamic situations. Speed through the loop creates competitive advantage.++**When to use:**+- Incident response and outages+- Time-sensitive decisions+- Rapidly changing requirements++### Pre-Mortem Analysis+Imagine a project has failed and work backward to identify why. Improves risk identification by approximately 30%.++**When to use:**+- Project kickoffs+- Before major technical decisions+- When team seems overconfident++### Cognitive Debiasing+Systematic checklist to identify cognitive biases. Based on Kahneman, Lovallo, and Sibony's research.++**When to use:**+- Before making major decisions+- When stakes are high+- When you feel very confident++### TRIZ Innovation+Systematic innovation methodology from analyzing 200,000+ patents. Resolve contradictions rather than accepting trade-offs.++**When to use:**+- Facing "impossible" trade-offs+- Need breakthrough innovation+- Stuck between conflicting requirements++## Contributing++We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.++### Adding New Skills++1. Create a new directory under `.claude/skills/` with the format `thinking-{name}`+2. Add a `SKILL.md` file with YAML frontmatter:+```yaml+---+name: thinking-your-skill-name+description: Brief description (used by Claude Code for skill matching)+---+```+3. Write comprehensive documentation with:+ - Overview and core principle+ - When to use decision flow+ - Step-by-step process+ - Examples and templates+ - Verification checklist+ - Key questions++## Keywords++`claude-code` `claude` `anthropic` `ai` `skills` `mental-models` `critical-thinking` `decision-making` `problem-solving` `systems-thinking` `first-principles` `bayesian-reasoning` `cognitive-bias` `strategic-thinking` `frameworks` `triz` `ooda` `pre-mortem` `socratic-method`++## Related Resources++- [Claude Code Documentation](https://docs.anthropic.com/claude-code)+- [Charlie Munger's Mental Models](https://fs.blog/mental-models/)+- [Thinking in Systems - Donella Meadows](https://www.chelseagreen.com/product/thinking-in-systems/)+- [Thinking, Fast and Slow - Daniel Kahneman](https://www.amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555)++## License++MIT License - see [LICENSE](LICENSE) for details.++## Author++Created by [TJ Boudreaux](https://github.com/tjboudreaux)++---++**Found this useful?** Give it a star and share with others who could benefit from better thinking frameworks in Claude Code.