Skip to content

28 eval-informed mental models and critical-thinking skills for Claude Code, GitHub Copilot, Codex, Cursor, and other Agent Skills-compatible tools

feat(m4): rework six high-mechanism cohort skills from pre-registered specs

Travis Boudreauxa0b2554d9ae3
diff --git a/analysis/rework-specs/five-whys-plus.md b/analysis/rework-specs/five-whys-plus.md
new file mode 100644
index 0000000..7b39b28
--- /dev/null
+++ b/analysis/rework-specs/five-whys-plus.md
@@ -0,0 +1,36 @@
+# Rework Spec: five-whys-plus
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-five-whys-plus`
+**Eval Family:** Debugging/fault-localization
+**Value Surface:** localization (post-localization root-cause analysis)
+
+## Hypothesis
+
+Narrowing five-whys-plus to a **post-localization** role (used only AFTER scientific-method or equivalent hypothesis-differential debugging has localized the fault to a specific component) will improve its mechanism-fit by eliminating premature application on unlocalized problems. Adding an explicit evidence-chain requirement, a counterfactual cause test ("would the problem NOT have occurred if X were different?"), and a concrete stop condition will reduce the most common failure modes (premature stopping, speculation depth, single-cause bias).
+
+## Value Surface
+
+The skill delivers value when:
+1. A fault has already been localized to a specific component or subsystem
+2. The proximate cause is known but the systemic root cause is not
+3. The user needs a structured, evidence-gated chain from symptom to actionable root cause
+
+It does NOT deliver value when the fault is unlocalized (multiple candidate components) — that requires scientific-method first.
+
+## Expected Mechanism
+
+1. **Post-localization gate**: Explicit decision flow requires localization before the "why" chain starts
+2. **Evidence chain**: Each "why" step carries a mandatory evidence field and confidence level
+3. **Counterfactual cause test**: Before stopping, test "would the problem NOT have occurred if this cause were absent?"
+4. **Explicit stop condition**: Stop only when the cause is actionable, controllable, evidenced, and passes the counterfactual test
+5. **Bias guards retained**: Branching on "what else?", blame avoidance, devil's advocate review
+
+## Template Sections Applied
+
+Overview, When to Use (situation-named, post-localization gate), When NOT to Use (unlocalized problems, obvious causes), Procedure (gated chain with evidence + counterfactual), Output Contract (structured root-cause report with evidence chain), Anti-Patterns (premature stop, speculation dive, blame stop, circular why)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the narrowed post-localization framing + counterfactual test improves root-cause accuracy on localized SWE-bench items.
diff --git a/analysis/rework-specs/kepner-tregoe.md b/analysis/rework-specs/kepner-tregoe.md
new file mode 100644
index 0000000..b6a0201
--- /dev/null
+++ b/analysis/rework-specs/kepner-tregoe.md
@@ -0,0 +1,36 @@
+# Rework Spec: kepner-tregoe
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-kepner-tregoe`
+**Eval Family:** Debugging/fault-localization
+**Value Surface:** localization (IS/IS-NOT boundary contrast for selective defects)
+
+## Hypothesis
+
+De-emphasizing the Decision Analysis (DA) and Potential Problem Analysis (PPA) sprawl — redirecting those to `thinking-opportunity-cost` and `thinking-pre-mortem` respectively — and focusing kepner-tregoe tightly on **Problem Analysis (PA) with the IS/IS-NOT matrix** for debugging selective defects will concentrate its mechanism on what it does uniquely well: boundary-contrast root-causing of bugs that affect some endpoints/regions/users/times but not all. The Situation Analysis (SA) scaffolding is retained as a lightweight triage entry but trimmed to avoid competing with the PA core.
+
+## Value Surface
+
+The skill delivers value when:
+1. A defect is selective (affects some cases but not others — there IS an IS-vs-IS-NOT boundary to contrast)
+2. The cause is unclear and not obvious from a stack trace or recent change
+3. The IS/IS-NOT matrix can produce a distinction that points at the root cause
+
+It does NOT deliver value for uniform failures (100% affected — no boundary), obvious causes, or pure decision/risk tasks.
+
+## Expected Mechanism
+
+1. **PA-first entry**: Decision flow routes directly to Problem Analysis for debugging; SA only when multiple concerns need triage
+2. **IS/IS-NOT as primary tool**: The matrix is the core — What/Where/When/Extent dimensions with explicit distinctions
+3. **DA/PPA redirected**: Decision analysis → `thinking-opportunity-cost`; risk anticipation → `thinking-pre-mortem`
+4. **Lightweight SA retained**: Only for multi-concern triage, not as a required preamble
+5. **Anti-fabrication**: Each possible cause must explain BOTH the IS and IS-NOT before being pursued
+
+## Template Sections Applied
+
+Overview (PA-focused, IS/IS-NOT as core), When to Use (selective defects with clear boundary), When NOT to Use (uniform failures, obvious causes, pure decisions), Procedure (SA→PA flow, IS/IS-NOT matrix, cause testing), Output Contract (confirmed root cause with evidence from boundary contrast), Anti-Patterns (running full KT on uniform failure, using DA/PPA when simpler tools suffice, over-specifying the matrix)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the PA-focused IS/IS-NOT framing improves root-cause accuracy on selective-defect SWE-bench items vs the broader four-process version.
diff --git a/analysis/rework-specs/map-territory.md b/analysis/rework-specs/map-territory.md
new file mode 100644
index 0000000..067c3c0
--- /dev/null
+++ b/analysis/rework-specs/map-territory.md
@@ -0,0 +1,36 @@
+# Rework Spec: map-territory
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-map-territory`
+**Eval Family:** Debugging/fault-localization
+**Value Surface:** localization (docs/tests/mental-model vs runtime/code reality verification)
+
+## Hypothesis
+
+Narrowing map-territory to the specific agent-relevant domain of **docs/tests/mental-model vs runtime/code reality** — with an agent-executable verification checklist — will make it more actionable for autonomous debugging. The highest-leverage use is when behavior contradicts a description: stop reasoning from the map, go verify the territory directly. Adding a concrete verification checklist (read the actual function body, run it, query the real data, reproduce the behavior) and a "note what maps can't show" step will produce actionable output rather than philosophical observation.
+
+## Value Surface
+
+The skill delivers value when:
+1. Behavior contradicts the docs, tests, diagram, comment, or agent's mental model
+2. The agent is about to theorize instead of verifying against the running code/data
+3. A claim about the system comes from a description rather than direct inspection
+
+It does NOT deliver value when the map IS the artifact being edited, when already verified this session, or when the mismatch doesn't affect the decision.
+
+## Expected Mechanism
+
+1. **Name the map**: Explicitly identify which representation (doc/test/comment/assumption) the surprise is measured against
+2. **Go to the territory**: Agent-executable steps: read the function body, run it with instrumentation, query real data, reproduce
+3. **Let territory overrule**: Code does X and doc says Y → code wins; update the model
+4. **Note what maps can't show**: After verification, name aspects no available map covers (likely next bug site)
+5. **Stop condition**: Don't re-verify something already confirmed this session
+
+## Template Sections Applied
+
+Overview (docs/tests/mental-model vs runtime reality), When to Use (behavior contradicts description, about to theorize without verifying), When NOT to Use (editing the map itself, already verified, mismatch irrelevant), Procedure (Name the map → Go to territory → Let territory overrule → Note uncovered aspects), Output Contract (verified behavior with map-territory delta documented), Anti-Patterns (re-verifying known territory, trusting map over code, over-applying to artifacts being edited)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the narrowed verification-checklist framing improves debugging efficiency on map-territory-mismatch SWE-bench items vs the broader philosophical version.
diff --git a/analysis/rework-specs/occams-razor.md b/analysis/rework-specs/occams-razor.md
new file mode 100644
index 0000000..7f17512
--- /dev/null
+++ b/analysis/rework-specs/occams-razor.md
@@ -0,0 +1,35 @@
+# Rework Spec: occams-razor
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-occams-razor`
+**Eval Family:** Debugging/fault-localization
+**Value Surface:** localization (fewest-assumption hypothesis prioritization)
+
+## Hypothesis
+
+Adding a **trigger-shrink** gate — where the agent first checks whether the simplest hypothesis can be tested in one step, and only escalates to the full procedure (enumerate all hypotheses, count assumptions, verify explanatory power, test in order) when the trigger check doesn't resolve — will reduce over-application. The core mechanism (test fewest-assumption hypotheses first) remains unchanged; the rework adds a fast-path for common cases and reserves the full procedure for situations where it earns its cognitive budget.
+
+## Value Surface
+
+The skill delivers value when:
+1. Multiple hypotheses could explain a bug and the simplest is not obviously testable in one step
+2. The agent is about to investigate a complex hypothesis without first testing a simpler one
+3. The full enumeration-and-scoring procedure provides lift over "just test the simplest first"
+
+It does NOT deliver value when evidence already points to a specific cause, the domain is irreducibly complex, or only one plausible explanation exists.
+
+## Expected Mechanism
+
+1. **Trigger check (fast path)**: "Can I test the simplest hypothesis in one step?" → yes → just test it and report
+2. **Full procedure (when trigger fails)**: Enumerate → count assumptions → verify explanatory power → test in order → escalate complexity only when evidence forces it
+3. **Anti-oversimplification guard**: Einstein's corollary ("as simple as possible, but no simpler") with explicit checks for irreducible domain complexity
+4. **Systemic vs local simplicity**: Prefer systemic simplicity over local simplicity
+
+## Template Sections Applied
+
+Overview (trigger-shrink + fewest-assumption priority), When to Use (multiple competing hypotheses, simplest not obviously testable), When NOT to Use (evidence points to specific cause, irreducible complexity, single hypothesis, trigger-check resolves instantly), Procedure (Trigger check → if unresolved, full enumeration → assumption counting → test in order), Output Contract (hypothesis ranking by assumption count with test results), Anti-Patterns (oversimplifying irreducible domains, complexity bias, testing complex before simple, trigger inflation)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the trigger-shrink gate reduces unnecessary full-procedure invocation without harming accuracy on multi-hypothesis SWE-bench debugging items.
diff --git a/analysis/rework-specs/red-team.md b/analysis/rework-specs/red-team.md
new file mode 100644
index 0000000..ed4f8a0
--- /dev/null
+++ b/analysis/rework-specs/red-team.md
@@ -0,0 +1,36 @@
+# Rework Spec: red-team
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-red-team`
+**Eval Family:** Security/adversarial
+**Value Surface:** false-positive reduction (security vulnerability detection with reproducible attack paths)
+
+## Hypothesis
+
+Narrowing red-team to **security/code vulnerability detection only** — with an explicit anti-fabrication gate requiring every finding to have a concrete, reproducible attack path (entry point → steps → realized impact) — will reduce false positives and speculative claims. De-emphasizing plan/architecture/decision red-teaming (redirecting those to `thinking-pre-mortem` and `thinking-steel-manning`) focuses the skill on its highest-value domain where adversarial thinking is essential rather than optional.
+
+## Value Surface
+
+The skill delivers value when:
+1. Reviewing code, auth, APIs, or infrastructure for security vulnerabilities
+2. Every finding can be supported by a concrete attack path: entry point → exact steps → realized impact
+3. The system is one the user controls and can attack adversarially
+
+It does NOT deliver value for plan stress-testing, decision challenge, or architecture review — those are better served by pre-mortem and steel-manning.
+
+## Expected Mechanism
+
+1. **Security-only scope**: Default domain is security; redirect language for plan/decision/architecture red-teaming
+2. **Anti-fabrication gate**: Every finding MUST have entry point + steps + realized impact; speculative/theoretical weaknesses are dropped, not padded
+3. **Attack-surface enumeration**: Systematic coverage of auth, session, input validation, business logic, trust boundaries
+4. **Reproducibility requirement**: A finding that can't be demonstrated is not a finding
+5. **Severity triage**: Critical/High/Medium/Low with explicit remediation
+
+## Template Sections Applied
+
+Overview (security-focused, anti-fabrication gate), When to Use (security review, pre-launch hardening), When NOT to Use (plan stress-testing, decision challenge, architecture review, speculative best-practice lists), Procedure (define target, enumerate attack surface, execute attack scenarios, attempt bypass, document with reproducible paths), Output Contract (findings report with severity, attack path, remediation), Anti-Patterns (speculative claims, padding with best-practice items, reporting theoretical weaknesses, using for non-security tasks)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the narrowed security-only scope + anti-fabrication gate improves FPR on DiverseVul balanced vulnerable/safe code pairs vs the broader multi-domain version.
diff --git a/analysis/rework-specs/triz.md b/analysis/rework-specs/triz.md
new file mode 100644
index 0000000..b6ad84f
--- /dev/null
+++ b/analysis/rework-specs/triz.md
@@ -0,0 +1,36 @@
+# Rework Spec: triz
+
+**Date:** 2026-06-06
+**Status:** pre-registered (pre-decisive-eval)
+**Skill:** `thinking-triz`
+**Eval Family:** Systems/product/strategy pairwise
+**Value Surface:** paired reasoning quality (architecture/API contradiction resolution)
+
+## Hypothesis
+
+Narrowing TRIZ to **architecture/API design contradictions** — where two requirements seem mutually exclusive (fast vs accurate, stable vs evolving, large cache vs fast invalidation) — and making the separation moves (time, space, condition, scale) the explicit primary procedure will concentrate the skill on what it does uniquely well: systematic contradiction resolution. De-emphasizing the full 40 inventive principles and evolution patterns as secondary reference material reduces the sprawl that makes the skill hard to apply in agent context.
+
+## Value Surface
+
+The skill delivers value when:
+1. An architecture or API design decision is stuck between two requirements that seem mutually exclusive
+2. The agent is about to accept a trade-off because "you can't have both"
+3. The contradiction can be named precisely and attacked with separation principles
+
+It does NOT deliver value for ordinary trade-offs with a correct answer, contradictions that dissolve under measurement, or non-technical/people problems.
+
+## Expected Mechanism
+
+1. **Name the contradiction**: Explicit template: "We need [A] to be [state 1] for [benefit 1] BUT also [state 2] for [benefit 2]"
+2. **Separation moves (primary)**: Try separation in time, space, condition, and scale BEFORE reaching for the 40 principles
+3. **Ideal Final Result**: What would the solution look like if the problem solved itself?
+4. **40 principles as reference**: Available but not the primary procedure; selected principles mapped to software patterns
+5. **Resource analysis**: What already exists that can be used before adding new components?
+
+## Template Sections Applied
+
+Overview (architecture/API contradictions, separation-first), When to Use (stuck between mutually exclusive requirements, about to accept a trade-off), When NOT to Use (ordinary trade-offs, testable contradictions, non-technical problems), Procedure (Name contradiction → Try separation moves → IFR → If unresolved, scan principles → Resource analysis), Output Contract (contradiction statement, separation resolution, concrete design decision), Anti-Patterns (manufacturing contradictions, compromising instead of separating, skipping to principles without trying separation, applying to people problems)
+
+## Comparison Design
+
+Planned comparison: prior version of same skill (pre-edit vs post-edit), measuring whether the narrowed architecture/API-contradiction + separation-first framing improves paired reasoning quality on design-tradeoff items vs the broader 40-principles version.
diff --git a/scripts/quality-report.json b/scripts/quality-report.json
index b671697..1b36499 100644
--- a/scripts/quality-report.json
+++ b/scripts/quality-report.json
@@ -1,4 +1,93 @@
[
+ {
+ "name": "thinking-occams-razor",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-occams-razor/SKILL.md",
+ "sections": [
+ {
+ "name": "YAML Frontmatter",
+ "found": true
+ },
+ {
+ "name": "Overview",
+ "found": true
+ },
+ {
+ "name": "Core Principle",
+ "found": true
+ },
+ {
+ "name": "When to Use",
+ "found": true
+ },
+ {
+ "name": "Decision Flow",
+ "found": true
+ },
+ {
+ "name": "Process/Steps",
+ "found": false
+ },
+ {
+ "name": "Examples",
+ "found": false
+ },
+ {
+ "name": "Template",
+ "found": false
+ },
+ {
+ "name": "Verification Checklist",
+ "found": false
+ },
+ {
+ "name": "Key Questions",
+ "found": false
+ },
+ {
+ "name": "Wisdom/Attribution",
+ "found": true
+ }
+ ],
+ "quality": [
+ {
+ "name": "Description Length",
+ "pass": false,
+ "detail": "218 chars (max 200)"
+ },
+ {
+ "name": "Has Multiple Examples",
+ "pass": false,
+ "detail": "Found 0 example(s)"
+ },
+ {
+ "name": "Has Tables",
+ "pass": true,
+ "detail": "Found 14 table row(s)"
+ },
+ {
+ "name": "Has Checklists",
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
+ },
+ {
+ "name": "Has Code Blocks",
+ "pass": true,
+ "detail": "Found 3 code block(s)"
+ },
+ {
+ "name": "Word Count (500-3000)",
+ "pass": true,
+ "detail": "932 words"
+ },
+ {
+ "name": "Has Anti-patterns/Failure Modes",
+ "pass": true,
+ "detail": "Found warnings"
+ }
+ ],
+ "score": 10,
+ "maxScore": 18
+ },
{
"name": "thinking-cynefin",
"path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-cynefin/SKILL.md",
@@ -177,6 +266,184 @@
"score": 12,
"maxScore": 18
},
+ {
+ "name": "thinking-kepner-tregoe",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-kepner-tregoe/SKILL.md",
+ "sections": [
+ {
+ "name": "YAML Frontmatter",
+ "found": true
+ },
+ {
+ "name": "Overview",
+ "found": true
+ },
+ {
+ "name": "Core Principle",
+ "found": true
+ },
+ {
+ "name": "When to Use",
+ "found": true
+ },
+ {
+ "name": "Decision Flow",
+ "found": true
+ },
+ {
+ "name": "Process/Steps",
+ "found": true
+ },
+ {
+ "name": "Examples",
+ "found": false
+ },
+ {
+ "name": "Template",
+ "found": false
+ },
+ {
+ "name": "Verification Checklist",
+ "found": false
+ },
+ {
+ "name": "Key Questions",
+ "found": false
+ },
+ {
+ "name": "Wisdom/Attribution",
+ "found": true
+ }
+ ],
+ "quality": [
+ {
+ "name": "Description Length",
+ "pass": true,
+ "detail": "192 chars (max 200)"
+ },
+ {
+ "name": "Has Multiple Examples",
+ "pass": false,
+ "detail": "Found 0 example(s)"
+ },
+ {
+ "name": "Has Tables",
+ "pass": true,
+ "detail": "Found 27 table row(s)"
+ },
+ {
+ "name": "Has Checklists",
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
+ },
+ {
+ "name": "Has Code Blocks",
+ "pass": true,
+ "detail": "Found 5 code block(s)"
+ },
+ {
+ "name": "Word Count (500-3000)",
+ "pass": true,
+ "detail": "1192 words"
+ },
+ {
+ "name": "Has Anti-patterns/Failure Modes",
+ "pass": true,
+ "detail": "Found warnings"
+ }
+ ],
+ "score": 12,
+ "maxScore": 18
+ },
+ {
+ "name": "thinking-map-territory",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-map-territory/SKILL.md",
+ "sections": [
+ {
+ "name": "YAML Frontmatter",
+ "found": true
+ },
+ {
+ "name": "Overview",
+ "found": true
+ },
+ {
+ "name": "Core Principle",
+ "found": true
+ },
+ {
+ "name": "When to Use",
+ "found": true
+ },
+ {
+ "name": "Decision Flow",
+ "found": true
+ },
+ {
+ "name": "Process/Steps",
+ "found": true
+ },
+ {
+ "name": "Examples",
+ "found": false
+ },
+ {
+ "name": "Template",
+ "found": false
+ },
+ {
+ "name": "Verification Checklist",
+ "found": false
+ },
+ {
+ "name": "Key Questions",
+ "found": false
+ },
+ {
+ "name": "Wisdom/Attribution",
+ "found": true
+ }
+ ],
+ "quality": [
+ {
+ "name": "Description Length",
+ "pass": true,
+ "detail": "198 chars (max 200)"
+ },
+ {
+ "name": "Has Multiple Examples",
+ "pass": false,
+ "detail": "Found 0 example(s)"
+ },
+ {
+ "name": "Has Tables",
+ "pass": true,
+ "detail": "Found 8 table row(s)"
+ },
+ {
+ "name": "Has Checklists",
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
+ },
+ {
+ "name": "Has Code Blocks",
+ "pass": true,
+ "detail": "Found 4 code block(s)"
+ },
+ {
+ "name": "Word Count (500-3000)",
+ "pass": true,
+ "detail": "1009 words"
+ },
+ {
+ "name": "Has Anti-patterns/Failure Modes",
+ "pass": true,
+ "detail": "Found warnings"
+ }
+ ],
+ "score": 12,
+ "maxScore": 18
+ },
{
"name": "thinking-ooda",
"path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-ooda/SKILL.md",
@@ -267,8 +534,8 @@
"maxScore": 18
},
{
- "name": "thinking-archetypes",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-archetypes/SKILL.md",
+ "name": "thinking-triz",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-triz/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -304,7 +571,7 @@
},
{
"name": "Verification Checklist",
- "found": true
+ "found": false
},
{
"name": "Key Questions",
@@ -318,33 +585,33 @@
"quality": [
{
"name": "Description Length",
- "pass": true,
- "detail": "192 chars (max 200)"
+ "pass": false,
+ "detail": "230 chars (max 200)"
},
{
"name": "Has Multiple Examples",
"pass": false,
- "detail": "Found 0 example(s)"
+ "detail": "Found 1 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 9 table row(s)"
+ "detail": "Found 17 table row(s)"
},
{
"name": "Has Checklists",
- "pass": true,
- "detail": "Found 5 checklist item(s)"
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
},
{
"name": "Has Code Blocks",
- "pass": false,
- "detail": "Found 1 code block(s)"
+ "pass": true,
+ "detail": "Found 8 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "915 words"
+ "detail": "1150 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -352,12 +619,12 @@
"detail": "Found warnings"
}
],
- "score": 14,
+ "score": 12,
"maxScore": 18
},
{
- "name": "thinking-model-router",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-model-router/SKILL.md",
+ "name": "thinking-five-whys-plus",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-five-whys-plus/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -373,7 +640,7 @@
},
{
"name": "When to Use",
- "found": false
+ "found": true
},
{
"name": "Decision Flow",
@@ -389,7 +656,7 @@
},
{
"name": "Template",
- "found": true
+ "found": false
},
{
"name": "Verification Checklist",
@@ -397,7 +664,7 @@
},
{
"name": "Key Questions",
- "found": true
+ "found": false
},
{
"name": "Wisdom/Attribution",
@@ -407,46 +674,46 @@
"quality": [
{
"name": "Description Length",
- "pass": true,
- "detail": "118 chars (max 200)"
+ "pass": false,
+ "detail": "219 chars (max 200)"
},
{
"name": "Has Multiple Examples",
- "pass": false,
- "detail": "Found 1 example(s)"
+ "pass": true,
+ "detail": "Found 3 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 26 table row(s)"
+ "detail": "Found 18 table row(s)"
},
{
"name": "Has Checklists",
- "pass": true,
- "detail": "Found 4 checklist item(s)"
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
},
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 11 code block(s)"
+ "detail": "Found 4 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1761 words"
+ "detail": "1092 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
- "pass": false,
- "detail": "No anti-patterns documented"
+ "pass": true,
+ "detail": "Found warnings"
}
],
- "score": 14,
+ "score": 13,
"maxScore": 18
},
{
- "name": "thinking-circle-of-competence",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-circle-of-competence/SKILL.md",
+ "name": "thinking-red-team",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-red-team/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -470,7 +737,7 @@
},
{
"name": "Process/Steps",
- "found": false
+ "found": true
},
{
"name": "Examples",
@@ -482,11 +749,11 @@
},
{
"name": "Verification Checklist",
- "found": true
+ "found": false
},
{
"name": "Key Questions",
- "found": true
+ "found": false
},
{
"name": "Wisdom/Attribution",
@@ -496,33 +763,33 @@
"quality": [
{
"name": "Description Length",
- "pass": true,
- "detail": "181 chars (max 200)"
+ "pass": false,
+ "detail": "205 chars (max 200)"
},
{
"name": "Has Multiple Examples",
- "pass": false,
- "detail": "Found 0 example(s)"
+ "pass": true,
+ "detail": "Found 4 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 6 table row(s)"
+ "detail": "Found 20 table row(s)"
},
{
"name": "Has Checklists",
- "pass": true,
- "detail": "Found 6 checklist item(s)"
+ "pass": false,
+ "detail": "Found 0 checklist item(s)"
},
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 14 code block(s)"
+ "detail": "Found 5 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1687 words"
+ "detail": "1127 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -530,12 +797,12 @@
"detail": "Found warnings"
}
],
- "score": 15,
+ "score": 13,
"maxScore": 18
},
{
- "name": "thinking-inversion",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-inversion/SKILL.md",
+ "name": "thinking-archetypes",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-archetypes/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -563,7 +830,7 @@
},
{
"name": "Examples",
- "found": false
+ "found": true
},
{
"name": "Template",
@@ -575,7 +842,7 @@
},
{
"name": "Key Questions",
- "found": true
+ "found": false
},
{
"name": "Wisdom/Attribution",
@@ -586,7 +853,7 @@
{
"name": "Description Length",
"pass": true,
- "detail": "181 chars (max 200)"
+ "detail": "192 chars (max 200)"
},
{
"name": "Has Multiple Examples",
@@ -596,22 +863,22 @@
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 16 table row(s)"
+ "detail": "Found 9 table row(s)"
},
{
"name": "Has Checklists",
"pass": true,
- "detail": "Found 6 checklist item(s)"
+ "detail": "Found 5 checklist item(s)"
},
{
"name": "Has Code Blocks",
- "pass": true,
- "detail": "Found 8 code block(s)"
+ "pass": false,
+ "detail": "Found 1 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1088 words"
+ "detail": "915 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -619,12 +886,12 @@
"detail": "Found warnings"
}
],
- "score": 15,
+ "score": 14,
"maxScore": 18
},
{
- "name": "thinking-map-territory",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-map-territory/SKILL.md",
+ "name": "thinking-model-router",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-model-router/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -640,7 +907,7 @@
},
{
"name": "When to Use",
- "found": true
+ "found": false
},
{
"name": "Decision Flow",
@@ -652,15 +919,15 @@
},
{
"name": "Examples",
- "found": false
+ "found": true
},
{
"name": "Template",
- "found": false
+ "found": true
},
{
"name": "Verification Checklist",
- "found": true
+ "found": false
},
{
"name": "Key Questions",
@@ -675,45 +942,45 @@
{
"name": "Description Length",
"pass": true,
- "detail": "169 chars (max 200)"
+ "detail": "118 chars (max 200)"
},
{
"name": "Has Multiple Examples",
"pass": false,
- "detail": "Found 0 example(s)"
+ "detail": "Found 1 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 7 table row(s)"
+ "detail": "Found 26 table row(s)"
},
{
"name": "Has Checklists",
"pass": true,
- "detail": "Found 6 checklist item(s)"
+ "detail": "Found 4 checklist item(s)"
},
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 14 code block(s)"
+ "detail": "Found 11 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1566 words"
+ "detail": "1761 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
- "pass": true,
- "detail": "Found warnings"
+ "pass": false,
+ "detail": "No anti-patterns documented"
}
],
- "score": 15,
+ "score": 14,
"maxScore": 18
},
{
- "name": "thinking-second-order",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-second-order/SKILL.md",
+ "name": "thinking-circle-of-competence",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-circle-of-competence/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -737,7 +1004,7 @@
},
{
"name": "Process/Steps",
- "found": true
+ "found": false
},
{
"name": "Examples",
@@ -753,7 +1020,7 @@
},
{
"name": "Key Questions",
- "found": false
+ "found": true
},
{
"name": "Wisdom/Attribution",
@@ -764,32 +1031,32 @@
{
"name": "Description Length",
"pass": true,
- "detail": "186 chars (max 200)"
+ "detail": "181 chars (max 200)"
},
{
"name": "Has Multiple Examples",
"pass": false,
- "detail": "Found 1 example(s)"
+ "detail": "Found 0 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 11 table row(s)"
+ "detail": "Found 6 table row(s)"
},
{
"name": "Has Checklists",
"pass": true,
- "detail": "Found 7 checklist item(s)"
+ "detail": "Found 6 checklist item(s)"
},
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 10 code block(s)"
+ "detail": "Found 14 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1011 words"
+ "detail": "1687 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -801,8 +1068,8 @@
"maxScore": 18
},
{
- "name": "thinking-socratic",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-socratic/SKILL.md",
+ "name": "thinking-inversion",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-inversion/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -826,11 +1093,11 @@
},
{
"name": "Process/Steps",
- "found": false
+ "found": true
},
{
"name": "Examples",
- "found": true
+ "found": false
},
{
"name": "Template",
@@ -842,7 +1109,7 @@
},
{
"name": "Key Questions",
- "found": false
+ "found": true
},
{
"name": "Wisdom/Attribution",
@@ -853,17 +1120,17 @@
{
"name": "Description Length",
"pass": true,
- "detail": "178 chars (max 200)"
+ "detail": "181 chars (max 200)"
},
{
"name": "Has Multiple Examples",
- "pass": true,
- "detail": "Found 6 example(s)"
+ "pass": false,
+ "detail": "Found 0 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 42 table row(s)"
+ "detail": "Found 16 table row(s)"
},
{
"name": "Has Checklists",
@@ -873,12 +1140,12 @@
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 4 code block(s)"
+ "detail": "Found 8 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1499 words"
+ "detail": "1088 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -890,8 +1157,8 @@
"maxScore": 18
},
{
- "name": "thinking-dual-process",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-dual-process/SKILL.md",
+ "name": "thinking-second-order",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-second-order/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -931,7 +1198,7 @@
},
{
"name": "Key Questions",
- "found": true
+ "found": false
},
{
"name": "Wisdom/Attribution",
@@ -942,7 +1209,7 @@
{
"name": "Description Length",
"pass": true,
- "detail": "175 chars (max 200)"
+ "detail": "186 chars (max 200)"
},
{
"name": "Has Multiple Examples",
@@ -952,7 +1219,7 @@
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 26 table row(s)"
+ "detail": "Found 11 table row(s)"
},
{
"name": "Has Checklists",
@@ -962,12 +1229,12 @@
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 13 code block(s)"
+ "detail": "Found 10 code block(s)"
},
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "2138 words"
+ "detail": "1011 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -975,12 +1242,12 @@
"detail": "Found warnings"
}
],
- "score": 16,
+ "score": 15,
"maxScore": 18
},
{
- "name": "thinking-kepner-tregoe",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-kepner-tregoe/SKILL.md",
+ "name": "thinking-socratic",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-socratic/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -1004,7 +1271,7 @@
},
{
"name": "Process/Steps",
- "found": true
+ "found": false
},
{
"name": "Examples",
@@ -1020,7 +1287,7 @@
},
{
"name": "Key Questions",
- "found": true
+ "found": false
},
{
"name": "Wisdom/Attribution",
@@ -1031,32 +1298,32 @@
{
"name": "Description Length",
"pass": true,
- "detail": "169 chars (max 200)"
+ "detail": "178 chars (max 200)"
},
{
"name": "Has Multiple Examples",
"pass": true,
- "detail": "Found 15 example(s)"
+ "detail": "Found 6 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 154 table row(s)"
+ "detail": "Found 42 table row(s)"
},
{
"name": "Has Checklists",
"pass": true,
- "detail": "Found 10 checklist item(s)"
+ "detail": "Found 6 checklist item(s)"
},
{
"name": "Has Code Blocks",
"pass": true,
- "detail": "Found 19 code block(s)"
+ "detail": "Found 4 code block(s)"
},
{
"name": "Word Count (500-3000)",
- "pass": false,
- "detail": "3216 words"
+ "pass": true,
+ "detail": "1499 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -1064,12 +1331,12 @@
"detail": "Found warnings"
}
],
- "score": 16,
+ "score": 15,
"maxScore": 18
},
{
- "name": "thinking-occams-razor",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-occams-razor/SKILL.md",
+ "name": "thinking-dual-process",
+ "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-dual-process/SKILL.md",
"sections": [
{
"name": "YAML Frontmatter",
@@ -1120,22 +1387,22 @@
{
"name": "Description Length",
"pass": true,
- "detail": "193 chars (max 200)"
+ "detail": "175 chars (max 200)"
},
{
"name": "Has Multiple Examples",
"pass": false,
- "detail": "Found 0 example(s)"
+ "detail": "Found 1 example(s)"
},
{
"name": "Has Tables",
"pass": true,
- "detail": "Found 22 table row(s)"
+ "detail": "Found 26 table row(s)"
},
{
"name": "Has Checklists",
"pass": true,
- "detail": "Found 8 checklist item(s)"
+ "detail": "Found 7 checklist item(s)"
},
{
"name": "Has Code Blocks",
@@ -1145,7 +1412,7 @@
{
"name": "Word Count (500-3000)",
"pass": true,
- "detail": "1464 words"
+ "detail": "2138 words"
},
{
"name": "Has Anti-patterns/Failure Modes",
@@ -2046,95 +2313,6 @@
"score": 18,
"maxScore": 18
},
- {
- "name": "thinking-five-whys-plus",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-five-whys-plus/SKILL.md",
- "sections": [
- {
- "name": "YAML Frontmatter",
- "found": true
- },
- {
- "name": "Overview",
- "found": true
- },
- {
- "name": "Core Principle",
- "found": true
- },
- {
- "name": "When to Use",
- "found": true
- },
- {
- "name": "Decision Flow",
- "found": true
- },
- {
- "name": "Process/Steps",
- "found": true
- },
- {
- "name": "Examples",
- "found": true
- },
- {
- "name": "Template",
- "found": true
- },
- {
- "name": "Verification Checklist",
- "found": true
- },
- {
- "name": "Key Questions",
- "found": true
- },
- {
- "name": "Wisdom/Attribution",
- "found": true
- }
- ],
- "quality": [
- {
- "name": "Description Length",
- "pass": true,
- "detail": "193 chars (max 200)"
- },
- {
- "name": "Has Multiple Examples",
- "pass": true,
- "detail": "Found 7 example(s)"
- },
- {
- "name": "Has Tables",
- "pass": true,
- "detail": "Found 23 table row(s)"
- },
- {
- "name": "Has Checklists",
- "pass": true,
- "detail": "Found 17 checklist item(s)"
- },
- {
- "name": "Has Code Blocks",
- "pass": true,
- "detail": "Found 12 code block(s)"
- },
- {
- "name": "Word Count (500-3000)",
- "pass": true,
- "detail": "1786 words"
- },
- {
- "name": "Has Anti-patterns/Failure Modes",
- "pass": true,
- "detail": "Found warnings"
- }
- ],
- "score": 18,
- "maxScore": 18
- },
{
"name": "thinking-jobs-to-be-done",
"path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-jobs-to-be-done/SKILL.md",
@@ -2669,95 +2847,6 @@
"score": 18,
"maxScore": 18
},
- {
- "name": "thinking-red-team",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-red-team/SKILL.md",
- "sections": [
- {
- "name": "YAML Frontmatter",
- "found": true
- },
- {
- "name": "Overview",
- "found": true
- },
- {
- "name": "Core Principle",
- "found": true
- },
- {
- "name": "When to Use",
- "found": true
- },
- {
- "name": "Decision Flow",
- "found": true
- },
- {
- "name": "Process/Steps",
- "found": true
- },
- {
- "name": "Examples",
- "found": true
- },
- {
- "name": "Template",
- "found": true
- },
- {
- "name": "Verification Checklist",
- "found": true
- },
- {
- "name": "Key Questions",
- "found": true
- },
- {
- "name": "Wisdom/Attribution",
- "found": true
- }
- ],
- "quality": [
- {
- "name": "Description Length",
- "pass": true,
- "detail": "195 chars (max 200)"
- },
- {
- "name": "Has Multiple Examples",
- "pass": true,
- "detail": "Found 12 example(s)"
- },
- {
- "name": "Has Tables",
- "pass": true,
- "detail": "Found 33 table row(s)"
- },
- {
- "name": "Has Checklists",
- "pass": true,
- "detail": "Found 26 checklist item(s)"
- },
- {
- "name": "Has Code Blocks",
- "pass": true,
- "detail": "Found 13 code block(s)"
- },
- {
- "name": "Word Count (500-3000)",
- "pass": true,
- "detail": "1781 words"
- },
- {
- "name": "Has Anti-patterns/Failure Modes",
- "pass": true,
- "detail": "Found warnings"
- }
- ],
- "score": 18,
- "maxScore": 18
- },
{
"name": "thinking-regret-minimization",
"path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-regret-minimization/SKILL.md",
@@ -3292,95 +3381,6 @@
"score": 18,
"maxScore": 18
},
- {
- "name": "thinking-triz",
- "path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-triz/SKILL.md",
- "sections": [
- {
- "name": "YAML Frontmatter",
- "found": true
- },
- {
- "name": "Overview",
- "found": true
- },
- {
- "name": "Core Principle",
- "found": true
- },
- {
- "name": "When to Use",
- "found": true
- },
- {
- "name": "Decision Flow",
- "found": true
- },
- {
- "name": "Process/Steps",
- "found": true
- },
- {
- "name": "Examples",
- "found": true
- },
- {
- "name": "Template",
- "found": true
- },
- {
- "name": "Verification Checklist",
- "found": true
- },
- {
- "name": "Key Questions",
- "found": true
- },
- {
- "name": "Wisdom/Attribution",
- "found": true
- }
- ],
- "quality": [
- {
- "name": "Description Length",
- "pass": true,
- "detail": "175 chars (max 200)"
- },
- {
- "name": "Has Multiple Examples",
- "pass": true,
- "detail": "Found 6 example(s)"
- },
- {
- "name": "Has Tables",
- "pass": true,
- "detail": "Found 44 table row(s)"
- },
- {
- "name": "Has Checklists",
- "pass": true,
- "detail": "Found 7 checklist item(s)"
- },
- {
- "name": "Has Code Blocks",
- "pass": true,
- "detail": "Found 22 code block(s)"
- },
- {
- "name": "Word Count (500-3000)",
- "pass": true,
- "detail": "2037 words"
- },
- {
- "name": "Has Anti-patterns/Failure Modes",
- "pass": true,
- "detail": "Found warnings"
- }
- ],
- "score": 18,
- "maxScore": 18
- },
{
"name": "thinking-via-negativa",
"path": "/Users/tjboudreaux/Sandbox/cc-thinking-skills/skills/thinking-via-negativa/SKILL.md",
diff --git a/skills/thinking-five-whys-plus/SKILL.md b/skills/thinking-five-whys-plus/SKILL.md
index 9588467..66ccadb 100644
--- a/skills/thinking-five-whys-plus/SKILL.md
+++ b/skills/thinking-five-whys-plus/SKILL.md
@@ -1,348 +1,139 @@
---
name: thinking-five-whys-plus
-description: Use after an incident or recurring bug when the proximate cause is known but you must reach the systemic root—chains "why" with evidence and bias guards so you stop at a real, actionable cause.
+description: Use when a fault is localized to a component and the proximate cause is known but the systemic root is not — chain 'why' with evidence, a counterfactual cause test, and an explicit stop condition.
---
# Five Whys Plus
## Overview
-The Five Whys technique from the Toyota Production System is powerful but often misapplied. This enhanced version adds explicit guards against its known failures: premature stopping, single-cause bias, blame-oriented thinking, and confirmation bias. Each "why" carries an evidence requirement, so the chain stays falsifiable rather than speculative.
+Five Whys Plus is a **post-localization root-cause analysis** skill. It assumes a fault has already been localized to a specific component or subsystem (by `thinking-scientific-method` or equivalent hypothesis-differential debugging). From that starting point — the proximate cause is known — it chains "why" questions backward to reach the systemic root cause, with explicit guards against the technique's known failure modes.
-**Core Principle:** Keep asking "why" until you reach an actionable, evidenced root cause—and guard against the technique's known failure modes at every step.
+**Core Principle:** Never ask "why" without evidence for the answer. Chain backward from localized fault to actionable root cause, and stop only when the cause passes a counterfactual test: "Would the problem NOT have occurred if this cause were absent?"
## When to Use
-- Incident post-mortems
-- Bug investigations where the proximate cause is known but the systemic cause isn't
-- A problem that keeps recurring despite previous fixes
-- Any case where you need the root cause, not just the proximate one
+- A fault has been localized to a specific component (use `thinking-scientific-method` first if you don't know which component is at fault)
+- The proximate cause is known but the systemic cause isn't
+- A problem keeps recurring despite previous fixes
+- You need the root cause, not just the proximate one
+
+Decision flow:
```
-Problem occurred?
- → Is the root cause already obvious and verified? → yes → Fix directly
- → Could the symptom have several distinct causes? → yes → first localize with thinking-scientific-method (hypothesis differential), then Five Whys the confirmed cause
- → Proximate cause known, systemic cause unclear? → yes → APPLY FIVE WHYS PLUS
+Fault localized to a specific component?
+ → No → Run thinking-scientific-method first to localize
+ → Yes → Proximate cause known?
+ → No → Gather evidence on proximate cause
+ → Yes → Is the root cause already obvious and verified?
+ → Yes → Fix directly; don't chain
+ → No → APPLY FIVE WHYS PLUS
```
## When NOT to Use
-- The root cause is already obvious and verified → just fix it; the chain adds nothing.
-- You don't yet know *which* component is at fault (multiple candidate causes) → that's a localization problem; use a hypothesis differential first (`thinking-scientific-method`), then run Five Whys on the cause it confirms.
-- The chain would be pure speculation with no evidence for the next "why" → stop and gather evidence; don't speculate deeper (see the Speculation Dive guard).
-
-## Standard Five Whys Failure Modes
-
-| Failure Mode | Description | Guard |
-|--------------|-------------|-------|
-| Premature stopping | Accepting first plausible cause | Minimum depth + actionability test |
-| Single-cause bias | Assuming one root cause | Branch on "what else?" |
-| Blame orientation | Stopping at human error | "Why was error possible?" |
-| Confirmation bias | Finding expected cause | Devil's advocate review |
-| Circular reasoning | Why loops back on itself | Detect and break cycles |
-| Speculation depth | Going beyond evidence | Evidence requirement |
+- **The fault is not yet localized.** If you don't know which component is at fault (multiple candidate causes), this is a localization problem. Use `thinking-scientific-method` (hypothesis-differential debugging) first, then run Five Whys on the cause it confirms.
+- **The root cause is already obvious and verified.** Don't ritualistically chain "why" — just fix it.
+- **The chain would be pure speculation with no evidence for the next "why".** Stop and gather evidence; don't speculate deeper (see Anti-Patterns: Speculation Dive).
+- **The problem is a one-off with no systemic dimension.** If a single fat-finger error caused an outage and there's no process gap, don't force a chain.
-## The Five Whys Plus Process
+## Procedure
### Step 1: State the Problem Precisely
-Bad: "The system was slow"
-Good: "API response times exceeded 2 seconds for 30% of requests between 14:00-14:45 UTC on January 15"
+Document the localized fault with specific, measurable details:
```markdown
Problem Statement:
- What happened: [Specific observable symptom]
+- Localized to: [Component/subsystem confirmed by scientific-method or equivalent]
- When: [Time range]
- Where: [Affected systems/users]
- Extent: [Scope and severity]
- Impact: [Business/user impact]
```
-### Step 2: Apply "Why" with Evidence Requirement
+### Step 2: Build the Evidence Chain
-For each "why," require evidence:
+For each "why," require evidence, confidence, and alternatives considered:
```markdown
-Why #1: Why did [problem] occur?
+Why #N: Why did [answer N-1] occur?
Answer: [Hypothesis]
-Evidence: [Data, logs, metrics that support this]
-Confidence: [High/Medium/Low]
+Evidence: [Data, logs, metrics that support this — NOT speculation]
+Confidence: High / Medium / Low
+What else considered: [Alternative causes checked]
+Ruled out because: [Evidence against alternatives]
```
-**Evidence types:**
-- Logs showing the event
-- Metrics correlating with timeline
-- Code showing the behavior
-- Configuration proving the state
-- Testimony from multiple sources
+**Evidence types:** Logs showing the event, metrics correlating with timeline, code showing the behavior, configuration proving the state, testimony from multiple independent sources.
-### Step 3: Branch on "What Else?"
+**Branch on "what else?"** at each step — explicitly list and rule out alternative explanations before proceeding.
-After each "why," explicitly ask "what else could cause this?"
-
-```markdown
-Why #1: Why did API response times spike?
-Primary answer: Database queries were slow
-Evidence: DB query times increased from 50ms to 1.5s
+### Step 3: Apply the Counterfactual Cause Test
-What else could cause this?
-- [ ] Network latency (checked: normal)
-- [ ] Application code changes (checked: none deployed)
-- [ ] Memory pressure (checked: normal)
-- [ ] External API dependencies (checked: normal)
+Before stopping, test the proposed root cause:
-→ Proceeding with database queries as verified cause
-```
+> **Counterfactual:** "Would the problem NOT have occurred if this cause were absent?"
-### Step 4: Apply "Why Was This Possible?" for Human Error
+If the answer is "no" or "maybe not" — you haven't reached the root cause. Keep going.
-Never stop at "human error" or "someone made a mistake."
+If the answer is "yes, the problem would not have occurred" — AND the cause passes the stop condition (Step 4) — you've found the root cause.
-```
-BAD chain:
-Why did the outage occur? → Config was wrong
-Why was config wrong? → Engineer made a typo
-→ STOP (blames human)
-
-GOOD chain:
-Why did the outage occur? → Config was wrong
-Why was config wrong? → Engineer made a typo
-Why was a typo possible? → No validation on config changes
-Why was there no validation? → Config system doesn't support schemas
-Why doesn't it support schemas? → Tech debt, never prioritized
-→ ROOT CAUSE: Config validation infrastructure gap
-```
+### Step 4: Check the Stop Condition
-### Step 5: Check Stopping Criteria
+Only stop when ALL criteria are met:
-Only stop when ALL are true:
+| Criterion | Question |
+|-----------|----------|
+| Actionable | Can we take concrete action on this cause? |
+| Controllable | Is this within our control to fix? |
+| Fundamental | Would fixing this prevent recurrence? |
+| Evidenced | Do we have evidence, not just speculation? |
+| Counterfactual | Would the problem NOT have occurred if this cause were absent? |
+| Not-blame | Is this a system/process issue, not just "someone messed up"? |
-| Criterion | Question | ✓ |
-|-----------|----------|---|
-| Actionable | Can we take concrete action on this cause? | |
-| Controllable | Is this within our control to fix? | |
-| Fundamental | Would fixing this prevent recurrence? | |
-| Evidenced | Do we have evidence, not just speculation? | |
-| Not-blame | Is this a system issue, not just "someone messed up"? | |
+**Never stop at human error.** When you reach "someone made a mistake," ask "Why was the mistake possible?" — that's the systemic cause.
-### Step 6: Verify with Counter-Analysis
+### Step 5: Apply Devil's Advocate Review
-Before finalizing, apply devil's advocate:
+Before finalizing, challenge the conclusion:
```markdown
-Proposed root cause: [X]
-
Counter-analysis:
1. What evidence contradicts this conclusion?
-2. What other explanation fits the evidence?
-3. Would someone with a different perspective agree?
+2. What other explanation fits the evidence equally well?
+3. Would someone outside our team reach the same conclusion?
4. If we fix X, are we confident the problem won't recur?
5. Are we finding what we expected to find? (confirmation bias check)
```
-## Enhanced Template
-
-```markdown
-# Five Whys Plus Analysis
-
-## Problem Statement
-- **What:** [Specific symptom]
-- **When:** [Time range]
-- **Where:** [Affected scope]
-- **Impact:** [Severity and consequences]
-
-## Why Chain
-
-### Why #1: Why did [problem] occur?
-**Answer:**
-**Evidence:**
-**Confidence:** High / Medium / Low
-**What else considered:**
-**Ruled out because:**
-
-### Why #2: Why did [answer #1] occur?
-**Answer:**
-**Evidence:**
-**Confidence:**
-**What else considered:**
-**Ruled out because:**
-
-### Why #3: Why did [answer #2] occur?
-**Answer:**
-**Evidence:**
-**Confidence:**
-**What else considered:**
-**Ruled out because:**
-
-[Continue as needed...]
-
-## Stopping Criteria Check
-- [ ] Actionable: We can take concrete action
-- [ ] Controllable: Within our control
-- [ ] Fundamental: Prevents recurrence
-- [ ] Evidenced: Supported by data
-- [ ] System-focused: Not blaming individuals
-
-## Counter-Analysis
-**Contradicting evidence:**
-**Alternative explanations:**
-**Confirmation bias check:**
-**Confidence in conclusion:**
-
-## Root Causes Identified
-1. [Primary root cause]
-2. [Contributing factor if applicable]
-
-## Recommended Actions
-| Action | Addresses | Owner | Timeline |
-|--------|-----------|-------|----------|
-| | | | |
-
-## Verification Plan
-How will we know the fix worked?
-```
-
-## Example: Production Outage
-
-```markdown
-# Five Whys Plus: Payment Service Outage
-
-## Problem Statement
-- What: Payment service returned 500 errors
-- When: 2024-01-15 14:00-14:45 UTC
-- Where: Production, US-East region
-- Impact: 2,400 failed transactions, ~$180K revenue impact
-
-## Why Chain
-
-### Why #1: Why did payment service return 500 errors?
-**Answer:** Database connection pool exhausted
-**Evidence:** Connection pool metrics showed 100/100 in use, logs show "connection wait timeout"
-**Confidence:** High
-**What else considered:**
-- Application bugs (no recent deploys)
-- Memory issues (heap normal)
-- Network problems (latency normal)
-
-### Why #2: Why was connection pool exhausted?
-**Answer:** Queries taking 10x longer than normal
-**Evidence:** P99 query time went from 50ms to 500ms at 14:00
-**Confidence:** High
-**What else considered:**
-- Connection leak (connection count stable before incident)
-- Sudden traffic spike (traffic was normal)
-
-### Why #3: Why were queries taking 10x longer?
-**Answer:** Missing index on payment_status table
-**Evidence:** EXPLAIN shows sequential scan on 10M row table
-**Confidence:** High
-**What else considered:**
-- Lock contention (no blocking locks)
-- DB resource exhaustion (CPU/memory normal)
-
-### Why #4: Why was the index missing?
-**Answer:** Migration to add index was rolled back 2 weeks ago
-**Evidence:** Deployment logs show rollback on 2024-01-01
-**Confidence:** High
-
-### Why #5: Why was the migration rolled back?
-**Answer:** Migration timed out during deploy window
-**Evidence:** Deploy log shows "migration timeout after 30 minutes"
-
-### Why #6: Why did migration timeout?
-**Answer:** Table too large for online migration in current window
-**Evidence:** Table has 10M rows, online migration takes ~2 hours
-**Confidence:** High
-
-### Why #7 (System-level): Why wasn't this caught before impact?
-**Answer:** No alerting on query performance degradation
-**Evidence:** No alerts fired until connection pool exhausted
-
-## Stopping Criteria Check
-- [x] Actionable: Can add index, fix alerting
-- [x] Controllable: Within our control
-- [x] Fundamental: Index prevents query issue, alerting prevents impact
-- [x] Evidenced: All steps have supporting data
-- [x] System-focused: Process and tooling issues, not blame
-
-## Root Causes Identified
-1. **Primary:** Index migration process doesn't handle large tables
-2. **Contributing:** No alerting on query latency before connection exhaustion
-
-## Recommended Actions
-| Action | Addresses | Owner | Timeline |
-|--------|-----------|-------|----------|
-| Implement online index creation tool | Root cause 1 | Platform | 2 weeks |
-| Add query latency alerting | Root cause 2 | SRE | 1 week |
-| Create index during maintenance window | Immediate fix | DBA | Tonight |
-```
-
-## Common Patterns to Catch
-
-### The Blame Stop
-
-```
-BAD: "Why did it fail?" → "Engineer didn't test properly" → STOP
-
-BETTER: → "Why was it possible to deploy without proper testing?"
- → "Why doesn't the pipeline enforce testing?"
- → System/process root cause
-```
-
-### The Premature Technical Stop
-
-```
-BAD: "Why was it slow?" → "Query was inefficient" → STOP
-
-BETTER: → "Why was an inefficient query in production?"
- → "Why didn't code review catch it?"
- → "Why don't we have query performance testing?"
-```
-
-### The Circular Why
-
-```
-DETECT: "Why A?" → "Because B" → "Why B?" → "Because A"
-
-BREAK: Introduce external evidence or third factor
-```
-
-### The Speculation Dive
-
-```
-DETECT: Answers become increasingly speculative without evidence
-
-BREAK: "What evidence do we have for this?"
- If none, mark as hypothesis and seek evidence
-```
-
-## Verification Checklist
-
-- [ ] Problem stated with specific details (what, when, where, extent)
-- [ ] Each "why" has supporting evidence
-- [ ] "What else?" asked at each branch point
-- [ ] Didn't stop at human error—asked "why was error possible?"
-- [ ] Stopping criteria all satisfied
-- [ ] Counter-analysis performed
-- [ ] Root cause is actionable and controllable
-- [ ] Actions address root cause, not just symptoms
+### Step 6: Document and Recommend
-## Key Questions
+Record the full chain and prescribe actions that address the root cause (not just the symptom).
-- "What evidence supports this answer?"
-- "What else could explain this?"
-- "Why was this mistake/error/failure possible?"
-- "If we stop here, will the problem actually be prevented?"
-- "Are we finding what we expected, or what the evidence shows?"
-- "Would someone outside our team reach the same conclusion?"
+## Output Contract
-## Ohno's Wisdom (Extended)
+A completed Five Whys Plus analysis produces:
-Taiichi Ohno said: "By asking 'why' five times and answering each time, we can get to the real cause of the problem."
+1. **Problem Statement** — specific, measurable, with localized component
+2. **Evidence Chain** — each "why" step with answer, evidence, confidence, and alternatives ruled out
+3. **Counterfactual Test Result** — explicit answer to "would the problem NOT have occurred?"
+4. **Stop Condition Check** — all six criteria satisfied
+5. **Devil's Advocate Review** — contradicting evidence, alternative explanations, bias check
+6. **Root Cause(s)** — primary and any contributing factors
+7. **Recommended Actions** — addressing root cause, with owner and timeline
+8. **Verification Plan** — how to confirm the fix worked
-The extension: Five is not magic. The real guidance is:
-1. Keep asking until you reach something actionable
-2. But don't speculate past your evidence
-3. And never stop at human blame
+## Anti-Patterns
-The technique is simple. Applying it well requires discipline.
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **Pre-localization application** | Running Five Whys when you don't know which component failed | Use `thinking-scientific-method` first to localize |
+| **Premature stop** | Accepting the first plausible cause without the counterfactual test | Apply the counterfactual: "Would the problem NOT have occurred?" |
+| **Blame stop** | Ending at "someone made a mistake" | Ask "Why was the mistake possible?" — find the systemic gap |
+| **Speculation dive** | Answers become increasingly speculative without evidence | Stop and gather evidence; mark un-evidenced steps as hypotheses |
+| **Circular why** | "Why A?" → "Because B" → "Why B?" → "Because A" | Introduce external evidence or a third factor to break the cycle |
+| **Single-cause bias** | Assuming one root cause without branching | At each step, ask "what else could cause this?" and rule out alternatives |
+| **Confirmation bias** | Finding the cause you expected to find | Devil's advocate review; ask "what evidence contradicts this?" |
+| **Ritualistic chaining** | Asking five whys when one would do | Stop when the counterfactual test passes and the stop condition is met |
diff --git a/skills/thinking-kepner-tregoe/SKILL.md b/skills/thinking-kepner-tregoe/SKILL.md
index 2467391..a33bc13 100644
--- a/skills/thinking-kepner-tregoe/SKILL.md
+++ b/skills/thinking-kepner-tregoe/SKILL.md
@@ -1,650 +1,144 @@
---
name: thinking-kepner-tregoe
-description: When a defect appears in only some places/times/cases and the cause is unclear, map what IS vs IS-NOT affected — the boundary contrast points straight at the root cause.
+description: Use when a defect is selective (some endpoints/regions/users/times affected, not all) and the cause is unclear — map what IS vs IS-NOT affected; the boundary contrast points at the root cause.
---
-# Kepner-Tregoe Rational Process
-
-> Focus note: the high-value process here for an autonomous agent is **Problem Analysis (PA)** — the IS/IS-NOT boundary contrast for root-causing a deviation. Reach for it when a bug is *selective* (some endpoints/regions/users/times, not all). Decision Analysis (DA) overlaps thinking-opportunity-cost; Potential Problem Analysis (PPA) overlaps thinking-pre-mortem — prefer those for pure decision or risk-anticipation tasks, and use the sections below mainly to feed PA's output into them.
+# Kepner-Tregoe Problem Analysis
## 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.
+Kepner-Tregoe (KT) is a structured root-cause method. **This skill focuses on Problem Analysis (PA) — the IS/IS-NOT boundary contrast — which is the high-value KT process for debugging.** When a defect is *selective* (some cases affected, others not), the boundary between IS and IS-NOT reveals the distinction that points at the root cause.
+
+Decision Analysis (DA) and Potential Problem Analysis (PPA) are de-emphasized here. For pure decision-making among alternatives, use `thinking-opportunity-cost`. For risk anticipation before a change, use `thinking-pre-mortem`. Those skills are purpose-built for those tasks; KT's DA/PPA add overhead without unique mechanism.
+
+Situation Analysis (SA) is retained as a lightweight triage step when facing multiple concerns, but it is not a required preamble — jump directly to PA when the problem is already clear.
-**Core Principle:** Separate what you know from what you assume. Use structured comparison to reveal truth.
+**Core Principle:** The boundary between what IS affected and what IS NOT affected encodes the root cause. Find the distinction, find the cause.
## 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
+- A defect is **selective**: affects some endpoints/regions/users/times but NOT others — there is an IS-vs-IS-NOT boundary to contrast
+- The cause is unclear and not obvious from a stack trace, error message, or a single recent change
+- Multiple possible causes exist and you need a systematic way to narrow them
+- A complex situation has multiple concerns that need triage before diving in
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
```
-
-## When NOT to Use
-- The cause is already obvious from a stack trace, error message, or a single recent change — just fix it; IS/IS-NOT is overhead here.
-- The failure is *uniform* (affects 100% of requests/everything) — there's no IS-vs-IS-NOT boundary to contrast, so PA gives no signal; use thinking-systems or direct debugging.
-- A quick hypothesis is cheaply testable — test it (occams-razor) before building a full specification matrix.
-- Pure decision-making or risk-listing with no deviation to diagnose — use thinking-opportunity-cost (choices) or thinking-pre-mortem (risks) instead of the DA/PPA sections.
-
-## 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
+Defect is selective (not 100%)? → No → IS/IS-NOT has no signal; use direct debugging or thinking-systems
+ → Yes → Cause obvious from stack trace/recent change? → Yes → Just fix it
+ → No → APPLY KT PROBLEM ANALYSIS
```
-#### Step 2: Separate and Clarify
+## When NOT to Use
-For each concern, ask: "Is this one issue or multiple?"
+- **The failure is uniform** (affects 100% of requests/everything) — there is no IS-vs-IS-NOT boundary to contrast; PA gives no signal. Use `thinking-systems` or direct debugging.
+- **The cause is already obvious** from a stack trace, error message, or a single recent change — just fix it; IS/IS-NOT is overhead here.
+- **A quick hypothesis is cheaply testable** — test it (`thinking-occams-razor`) before building a full specification matrix.
+- **Pure decision-making with no deviation to diagnose** — use `thinking-opportunity-cost`, not KT's Decision Analysis.
+- **Risk assessment for a planned change** — use `thinking-pre-mortem`, not KT's Potential Problem Analysis.
-```markdown
-"Production performance issues" →
- - API latency (response time)
- - Database connections (resource exhaustion)
- - Memory usage (potential leak)
-```
+## Procedure
-#### Step 3: Set Priority
+### Step 1 (optional): Situation Analysis — Triage Multiple Concerns
-Use Timing, Impact, Trend (TIT):
+Only when facing several problems at once. List all concerns, separate them if compound, and prioritize by Timing/Impact/Trend:
| 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?
+| API latency spike | Urgent | High | Worsening | P0 |
+| Checkout errors | Soon | High | Stable | P1 |
-### SA Template
+For each concern, decide: Problem Analysis (PA), or delegate to another skill.
-```markdown
-# Situation Analysis: [Context]
-Date: [Date]
+### Step 2: State the Problem Precisely
-## Concerns Inventory
-| # | Concern | Clarification Needed? |
-|---|---------|----------------------|
-| 1 | [Concern] | [Yes/No - details] |
+Describe the deviation from expected behavior with specificity:
-## Priority Matrix
-| Concern | Timing | Impact | Trend | Priority | Next Process |
-|---------|--------|--------|-------|----------|--------------|
-| | | | | | SA/PA/DA/PPA |
-
-## Action Plan
-| Priority | Concern | Process | Owner | Deadline |
-|----------|---------|---------|-------|----------|
-| P0 | | | | |
+```
+"API response time increased from 200ms to 800ms for /checkout endpoint,
+US-East only, starting Monday 9 AM, affecting ~30% of requests."
```
----
-
-## 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
+### Step 3: Build 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.
+Specify the problem across four dimensions. The power is in the **distinction** column — what's unique about the IS side?
-### Steps
+| Dimension | IS (affected) | IS NOT (not affected) | Distinction |
+|-----------|---------------|----------------------|-------------|
+| **WHAT** — object | /checkout endpoint | /cart, /product, /user | Payment processing |
+| **WHAT** — defect | 4x latency increase | Errors, timeouts, data corruption | Performance only |
+| **WHERE** — location | Production US-East | EU, US-West, staging | Single region |
+| **WHERE** — on object | Database query phase | Auth, validation, serialization | DB layer |
+| **WHEN** — first seen | Monday 9:00 AM | Before Monday, after 6 PM | Business hours |
+| **WHEN** — pattern | During checkout submit | During browsing, cart add | Write operations |
+| **EXTENT** — how many | ~30% of requests | 100% of requests | Intermittent |
+| **EXTENT** — trend | Stable since Tuesday | Getting worse | Plateaued |
-#### Step 1: State the Problem
+### Step 4: Extract Distinctions
-Be precise about the deviation:
+For each row, ask: "What's unique or distinctive about the IS side compared to the IS-NOT side?"
-```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?)
+Distinctions:
+- Only /checkout (payment processing) — not other endpoints
+- Only US-East (specific DB replica) — not other regions
+- Only during business hours (load-related?) — not off-peak
+- Only ~30% of requests (specific query pattern?) — not all
+- Started Monday 9 AM — what changed?
```
-#### Step 4: Identify Changes
+### Step 5: Identify Changes
-What changed in, on, around, or about the distinctions?
+What changed in, on, around, or about the distinctions near the first observation time?
-```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
+### Step 6: Generate and Test Possible Causes
-For each possible cause, verify it explains ALL IS and IS-NOT:
+Each candidate cause must explain BOTH the IS and the 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 |
+|----------------|-------------|------------------|---------|
+| Fraud rules adding DB queries | ✓ Only checkout, only write ops | ✓ Not other endpoints | **Pursue** |
+| Payment SDK change | ✓ Only checkout | ✗ Would affect all regions | Ruled out |
+| Index rebuild | ✓ DB layer | ✗ Would affect all queries | Ruled out |
-#### Step 7: Verify True Cause
+### Step 7: Verify the True Cause
-Design verification to confirm or rule out:
+Design a test to confirm or rule out the leading candidate:
-```markdown
-Verification plan for "Fraud detection rules":
-1. Check timing: Rules enabled 8:45 AM (matches)
-2. Check scope: Rules only on checkout (matches)
+```
+Verification for "Fraud detection rules":
+1. Check: Rules enabled 8:45 AM (matches timeline)
+2. Check: Rules only on checkout (matches scope)
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?"
+## Output Contract
-### Decision Analysis
+A completed KT Problem Analysis produces:
-- "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?"
+1. **Problem Statement** — specific, measurable deviation
+2. **IS/IS-NOT Matrix** — all four dimensions with distinctions extracted
+3. **Changes List** — what changed near the distinctions around the first observation
+4. **Cause Test Table** — each candidate tested against IS and IS-NOT
+5. **Confirmed Root Cause** — with verification evidence
+6. **If used, SA Triage** — prioritized concern list with assigned processes
-### Potential Problem Analysis
+## Anti-Patterns
-- "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?"
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **KT on uniform failure** | Running PA when 100% of requests fail | No boundary to contrast; use direct debugging or `thinking-systems` |
+| **Over-specifying the matrix** | Filling every IS/IS-NOT cell for a simple bug | Stop when the distinction is clear; don't ritualize |
+| **DA/PPA sprawl** | Running full Decision Analysis or Potential Problem Analysis for routine tasks | Redirect to `thinking-opportunity-cost` (decisions) or `thinking-pre-mortem` (risks) |
+| **Skipping cause testing** | Pursuing the first plausible cause without testing against IS-NOT | Every cause must explain BOTH IS and IS-NOT |
+| **SA as mandatory preamble** | Running full Situation Analysis before every PA | Jump directly to PA when the problem is already clear |
+| **Ignoring the distinction** | Building the matrix but not extracting what's unique about IS | The distinction IS the signal; without it, the matrix is just a table |
diff --git a/skills/thinking-map-territory/SKILL.md b/skills/thinking-map-territory/SKILL.md
index 11761f7..1c47951 100644
--- a/skills/thinking-map-territory/SKILL.md
+++ b/skills/thinking-map-territory/SKILL.md
@@ -1,127 +1,71 @@
---
name: thinking-map-territory
-description: Use when behavior contradicts the docs, tests, diagram, or your assumption. Trust the running code over the description of it; go verify the territory before theorizing.
+description: Use when behavior contradicts the docs, tests, diagram, or your assumption — stop reasoning from the description, go verify the running code or data directly, and let the territory overrule the map.
---
# 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.
+"The map is not the territory." Every representation — doc, test, diagram, comment, mental model — is a simplified view of reality. When behavior contradicts the description, the fastest path to resolution is to **stop reasoning from the map and go verify the territory directly**: read the actual code path, run it with instrumentation, query the real data, reproduce the behavior.
-**Core Principle:** The README, the test, the diagram, the comment, and your mental model are all *maps*. The running code and the actual data are the *territory*. When the two disagree, the territory wins — go look at it before building a theory on top of the map.
+A bug *is* a map–territory mismatch. The README says X, the function name implies Y, the comment claims Z — but the code does something else. The skill is scoped to this specific agent-relevant domain: docs/tests/mental-model vs runtime/code reality. It is NOT a general philosophical framework.
-The highest-leverage use is in debugging: a bug *is* a map–territory mismatch. The fastest way out is almost always to stop reasoning from the description and verify what the code actually does.
+**Core Principle:** The running code and actual data are the territory. The README, the test, the diagram, the comment, and your assumption are all maps. When the two disagree, the territory wins — go look at it before building a theory on top of the map.
## When to Use
-- **Debugging:** behavior contradicts the docs, the test, the comment, the diagram, or "it should work" — go read/trace the real code path.
-- A claim about the system comes from a doc, a comment, or recall rather than from the current code or data.
-- Tests pass but the behavior is wrong (the test is a map of *expected* behavior, not all behavior).
-- A metric "tells the whole story" and you're about to act on it without checking what it omits.
-- You're about to theorize about why something happens instead of looking at what happens.
+- **Debugging:** behavior contradicts the docs, a test's expectation, a comment, a diagram, or "it should work" — go read/trace the real code path
+- A claim about the system comes from a doc, a comment, or recall rather than from the current code or data
+- Tests pass but the behavior is wrong (the test is a map of *expected* behavior, not all behavior)
+- You're about to theorize about *why* something happens instead of looking at *what* happens
Decision flow:
```
-Behavior ≠ what the doc/test/diagram/assumption says? → yes → GO VERIFY THE REAL CODE/DATA, then theorize
- ↘ no → fine, but confirm before high-stakes action
-Building on a description rather than the thing itself? → yes → CHECK THE TERRITORY FIRST
+Behavior ≠ what the doc/test/diagram/assumption says?
+ → Yes → GO VERIFY THE REAL CODE/DATA, then theorize
+ → No → Fine, but confirm before high-stakes action
+
+Building a theory on a description rather than the thing itself?
+ → Yes → CHECK THE TERRITORY FIRST
```
## When NOT to Use
-- **The map is the artifact you're being asked to change.** When editing the docs, the spec, or the diagram itself, that *is* the territory for that task — don't spiral into verifying everything.
+- **The map IS the artifact you're being asked to change.** When editing the docs, the spec, or the diagram itself, that *is* the territory for that task — don't spiral into verifying everything.
- **You've already verified against the territory this session.** Re-checking the same code path repeatedly is wasted budget; trust the verification you just did.
-- **The map is authoritative and current** (e.g. a generated type, a schema the code is derived from). Don't second-guess a source of truth.
+- **The map is authoritative and current** (e.g., a generated type, a schema the code is derived from). Don't second-guess a source of truth.
- **The mismatch doesn't affect the decision.** If the abstraction leaks in a way that can't change your action, note it and move on.
-## Key Concepts
-
-### 1. Maps Are Abstractions
-
-Every representation omits details:
+## Procedure
-| 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 |
+### Step 1: Name the Map
-### 2. Multiple Maps, One Territory
-
-The same reality can have many valid representations:
+When something is surprising, explicitly identify the *representation* the surprise is measured against:
```
-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
+Surprise: "This function should return the user, but the page is blank."
-Abstraction: "The database is ACID"
-Leak: Connection pool exhaustion, replication lag
+The map: the function name + a comment saying it returns the user
+The territory: what the function body actually does on this input
```
-## The Verify-the-Territory Process
-
-### Step 1: Name the map you're trusting
+Be specific about which map you were trusting — the doc, the test name, the variable name, the comment, the architectural diagram, or your own assumption.
-When something is surprising, identify the *representation* the surprise is measured against:
-
-```
-Surprise: "This function should return the user, but the page is blank."
-The map: the function name + a comment saying it returns the user.
-The territory: what the function body actually does on this input.
-```
+### Step 2: Go to the Territory — Agent-Executable Verification
-### Step 2: Go to the territory directly
+Don't reason about what the code *probably* does. Execute these verification actions:
-Don't reason about what the code *probably* does — look:
+1. **Read the actual function body and the path that runs** — not the summary of it, not the docstring, the actual code
+2. **Run it / add a log / inspect the value** — instead of predicting the output from the signature
+3. **Query the real data** — instead of trusting the schema's intent
+4. **Reproduce the behavior** — instead of reasoning from the bug report's wording
+5. **Check what changed recently** — `git log`, the deploy, the config change
-```
-- Read the actual function body and the path that runs, not the summary of it
-- Run it / add a log / inspect the value, instead of predicting the output
-- Query the real data, instead of trusting the schema's intent
-- Reproduce the behavior, instead of reasoning from the bug report's wording
-```
+Only theorize AFTER you've looked at the territory.
-### Step 3: Let the territory overrule the map
+### Step 3: Let the Territory Overrule the Map
If the code does X and the doc says Y, the code is what ships and what breaks. Update your theory to match the territory — never the reverse.
@@ -131,9 +75,9 @@ Territory (measured): 30% hit rate; most reads hit the DB
Conclusion: the mental model was wrong — fix the model, then the caching
```
-### Step 4: Note what the map can't show
+### Step 4: Note What No Map Covers
-Once verified, name the aspects no map in front of you covers — that's where the next bug hides:
+Once verified, name the aspects no available map shows — that's where the next bug hides:
```
Have: the happy-path code, the passing tests
@@ -141,128 +85,27 @@ Don't have a map of: the error/timeout paths, contention behavior, the null case
Action: look at those before declaring it correct
```
-## 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
-
-- [ ] Named the map (doc/test/comment/assumption) the surprise was measured against
-- [ ] Went to the territory directly — read/ran/inspected the actual code or data
-- [ ] Let the territory overrule the map, not the reverse
-- [ ] Updated the theory/model to match what was observed
-- [ ] Noted the aspects no available map covers (likely next bug site)
-- [ ] Did not over-verify something already confirmed this session
-
-## Key Questions
+### Step 5: Stop When Verified
-- "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?"
+Don't re-verify something you already confirmed this session. Trust the verification you just did and move on.
-## Korzybski's Reminders
+## Output Contract
-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)
+A completed Map-Territory verification produces:
-## Practical Mantras
+1. **Map Named** — which representation (doc/test/comment/assumption) was trusted
+2. **Territory Verified** — what the actual code/data showed (specific observation, not interpretation)
+3. **Delta Documented** — the gap between map and territory
+4. **Model Updated** — the corrected understanding after territory observation
+5. **Uncovered Aspects Noted** — what no available map covers (likely next bug site)
-- "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"
+## Anti-Patterns
-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.
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **Theorizing before verifying** | Reasoning about what code *probably* does without looking | Go to the territory first — read/run/query/reproduce |
+| **Trusting the map over the territory** | "The doc says X, so the code must be wrong" when the code is what ships | The territory wins; update the map |
+| **Re-verifying known territory** | Checking the same code path repeatedly in one session | Trust what you just verified; note it and move on |
+| **Map-territory on artifacts being edited** | Spiral into verification when the doc/diagram IS the thing you're changing | The edited artifact IS the territory for that task |
+| **Over-applying to authoritative maps** | Second-guessing generated types or code-derived schemas | Authoritative/generated maps ARE the territory |
+| **Verifying irrelevant mismatches** | Noting a doc-code gap that can't affect the decision | If it doesn't change your action, note it and move on |
diff --git a/skills/thinking-occams-razor/SKILL.md b/skills/thinking-occams-razor/SKILL.md
index 83ad483..d146032 100644
--- a/skills/thinking-occams-razor/SKILL.md
+++ b/skills/thinking-occams-razor/SKILL.md
@@ -1,44 +1,57 @@
---
name: thinking-occams-razor
-description: When several causes could explain a bug or failure, count the assumptions each requires and test the fewest-assumption one first — escalate to complex explanations only when evidence forces it.
+description: Use when multiple causes could explain a bug — test the fewest-assumption hypothesis first; escalate to complex only when evidence forces it. Skip the full procedure when one step resolves it.
---
-# Occam's Razor (Parsimony Principle)
+# Occam's Razor
## 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.
+Occam's Razor states: among competing hypotheses that fit the evidence equally well, prefer the one with the fewest assumptions. This skill operationalizes that principle for debugging: **test the simplest hypothesis first, and escalate to complex explanations only when evidence forces it.**
-**Core Principle:** Among competing hypotheses that explain the data equally well, select the one with the fewest assumptions.
+The skill has a **trigger-shrink gate**: if the simplest hypothesis can be tested in one step, just test it — don't run the full enumeration-and-scoring procedure. Reserve the full procedure for situations where multiple hypotheses genuinely compete and the simplest is not obviously testable.
-**Einstein's Corollary:** "Everything should be made as simple as possible, but no simpler."
+**Core Principle:** "Everything should be made as simple as possible, but no simpler." — Einstein
## 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
+- Multiple hypotheses could explain a bug and the simplest is NOT obviously testable in one step
+- You're about to investigate a complex hypothesis without first testing a simpler one
+- Architecture or design decisions where several approaches are viable and differ in complexity
+- Root cause analysis where several causes seem plausible
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
+Multiple explanations exist?
+ → No → Use the available explanation
+ → Yes → Can the simplest be tested in one step?
+ → Yes → JUST TEST IT (trigger-shrink — skip full procedure)
+ → No → Do they explain the evidence equally well?
+ → No → Prefer the better explanation
+ → Yes → RUN FULL OCCAM'S RAZOR PROCEDURE
```
## When NOT to Use
-- Evidence already points to a specific cause — follow the evidence; don't downgrade to the "simpler" hypothesis it contradicts.
-- The domain is irreducibly complex (distributed consensus, concurrency, security threat models) — the simplest model is wrong; don't oversimplify ("but no simpler").
-- Only one plausible explanation exists — there's nothing to compare, just test it.
-- "Simple" would mean ignoring a known interaction or skipping a load-bearing safeguard — local simplicity that creates systemic risk isn't parsimony.
-## The Process
+- **Evidence already points to a specific cause.** Follow the evidence; don't downgrade to a "simpler" hypothesis it contradicts.
+- **The domain is irreducibly complex** (distributed consensus, concurrency, security threat models). The simplest model is wrong; don't oversimplify ("but no simpler").
+- **Only one plausible explanation exists.** There's nothing to compare — just test it.
+- **"Simple" would mean ignoring a known interaction or skipping a load-bearing safeguard.** Local simplicity that creates systemic risk isn't parsimony.
+- **The trigger check resolves it.** If you can test the simplest hypothesis in one step and it's confirmed, you're done — don't enumerate for completeness.
-### Step 1: Enumerate Competing Hypotheses
+## Procedure
+
+### Trigger Check (Fast Path)
+
+Before running the full procedure, ask: **"Can I test the simplest hypothesis in one step?"**
+
+- Yes → Test it. If confirmed, report and stop. If falsified, move to the next simplest.
+- No → The simplest hypothesis requires non-trivial investigation → run the full procedure below.
+
+### Full Procedure: When the Trigger Check Doesn't Resolve
+
+#### Step 1: Enumerate Competing Hypotheses
List all plausible explanations for the observed behavior:
@@ -49,246 +62,58 @@ 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
+D. Complex interaction between CDN cache, load balancer, and session service
```
-### Step 2: Count the Assumptions
+#### Step 2: Count Assumptions per Hypothesis
-For each hypothesis, list required assumptions:
-
-| Hypothesis | Assumptions Required |
-|------------|---------------------|
-| A. Token expiration | 1. Token validation has edge case |
+| Hypothesis | Assumptions |
+|------------|-------------|
+| A. Token expiration | 1. Token validation has an 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 |
+| D. Complex interaction | 1. CDN caches auth, 2. LB sticky sessions fail, 3. Session sync delayed |
+
+Count each independent assumption: +1 per assumption, +1 per component involved, +2 per external dependency, +2 for timing-dependent behavior, +3 for rare conditions, +5 for "perfect storm" scenarios.
-### Step 3: Verify Explanatory Power
+#### 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
-
+Hypothesis A (token edge case): Doesn't explain traffic correlation ✗
+Hypothesis C (DB pool exhaustion): Explains traffic correlation ✓ — fewer assumptions than D
+→ PREFERRED by Occam's Razor
```
-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 |
+#### Step 4: Test in Order of Fewest Assumptions
-## Verification Checklist
+Investigate hypotheses from fewest to most assumptions. Do not skip to complex hypotheses until simple ones are ruled out.
-- [ ] 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
+#### Step 5: Escalate Complexity Only When Evidence Forces It
-## Combining with Other Models
+When simple explanations are ruled out with evidence, move to more complex ones. Never escalate on intuition alone.
-- **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?
+## Output Contract
-## Key Questions
+A completed Occam's Razor analysis produces:
-- "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?"
+1. **Trigger Check Result** — whether the simplest hypothesis was testable in one step
+2. **Hypothesis Ranking** — ordered by assumption count, with each hypothesis' assumptions listed
+3. **Explanatory Power Check** — which hypotheses fit the evidence
+4. **Test Order and Results** — which hypotheses were tested, in what order, and the outcome
+5. **Conclusion** — the confirmed hypothesis (or the next to test if unresolved)
-## Ockham's Warning
+For trigger-shrink cases, the output may be a single line: "Tested simplest hypothesis X — confirmed/refuted."
-"Plurality must never be posited without necessity."
+## Anti-Patterns
-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?"
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **Oversimplifying irreducible domains** | Applying "simplest" to distributed consensus or security models | "But no simpler" — respect domain complexity |
+| **Complexity bias** | Assuming complex = sophisticated, testing complex hypotheses first | Test fewest-assumption hypotheses first, always |
+| **Trigger inflation** | Running the full enumeration for a one-step test | If the simplest is one-step testable, just test it |
+| **Ignoring explanatory power** | Choosing the simplest hypothesis that doesn't fit the evidence | Fewer assumptions doesn't beat not fitting the data |
+| **Local simplicity, systemic risk** | Choosing a simple local fix that creates fragility elsewhere | Prefer systemic simplicity over local simplicity |
+| **Ritualistic assumption counting** | Spending more time counting assumptions than testing | The point is prioritization, not precision; rough count is enough |
diff --git a/skills/thinking-red-team/SKILL.md b/skills/thinking-red-team/SKILL.md
index bb8434a..7104b3a 100644
--- a/skills/thinking-red-team/SKILL.md
+++ b/skills/thinking-red-team/SKILL.md
@@ -1,400 +1,142 @@
---
name: thinking-red-team
-description: Security review or pre-launch hardening of a system you control. Adopt an attacker mindset, enumerate the attack surface, and report only vulnerabilities with a concrete reproducible attack path.
+description: Use when reviewing code, auth, or APIs for security vulnerabilities — adopt an attacker mindset, enumerate the attack surface, report only findings with a concrete reproducible attack path.
---
# Red Team Thinking
## Overview
-Red teaming, borrowed from military and security practice, involves deliberately attacking your own plans, systems, or ideas to find weaknesses. A dedicated "red team" assumes an adversarial role, trying to defeat the "blue team's" defenses. This reveals vulnerabilities that defenders' blind spots hide.
+Red teaming is **adversarial security review**: deliberately attacking a system you control to find vulnerabilities before an attacker does. This skill is scoped to security/code vulnerability detection — it is NOT for plan stress-testing or decision challenge (use `thinking-pre-mortem` or `thinking-steel-manning` for those).
-**Core Principle:** Attack yourself before others do. The best defense is knowing your weaknesses.
+**The anti-fabrication gate is the most important rule:** every reported finding MUST include a concrete, reproducible attack path — entry point → exact steps → realized impact. If you cannot describe how the attack actually executes against *this* code/config, it is not a finding. Drop it. A short report of real, demonstrable vulnerabilities beats a long list of speculation.
-## When to Use
+**Core Principle:** Attack yourself before others do. But only report what you can actually break.
-**Default domain: security.** Use this when you're attacking a system you control to find security weaknesses before an attacker does:
+## When to Use
-- Security architecture / auth / API review
-- Pre-launch security hardening
-- Code and system review for exploitable flaws
+- Security review of code, authentication, authorization, APIs, or infrastructure you control
+- Pre-launch security hardening of a system that handles auth, data, or money
+- Evaluating whether a specific vulnerability class (injection, XSS, auth bypass, etc.) is present in your code
Decision flow:
```
-About to ship a system that handles auth, data, or money?
- → Have you tried to break it as an attacker would? → no → RED TEAM IT
- → Confident in your defenses without testing them? → yes → RED TEAM YOUR CONFIDENCE
+Reviewing a system for security?
+ → Can you demonstrate an attack path? → No → Don't report it
+ → Is the finding reproducible against this code/config? → No → Drop it
+ → Is this plan stress-testing or decision challenge? → Yes → Use thinking-pre-mortem or thinking-steel-manning
+ → No → RED TEAM IT
```
## When NOT to Use
-- **Anti-fabrication gate (the most important rule): report only vulnerabilities with a concrete, reproducible attack path.** For each finding state the entry point, the exact steps an attacker takes, and the realized impact. If you cannot describe how the attack actually executes against *this* code/config, it is not a finding — drop it. Do not pad the report with theoretical, "best-practice," or hypothetical weaknesses to look thorough. A short report of real, demonstrable vulns beats a long list of speculation.
-- **Not for plan/strategy/decision stress-testing** — for "how could this plan fail," use **thinking-pre-mortem**; for "what's the strongest case against this," use **thinking-steel-manning**. Keep red-team scoped to adversarial security.
-- **Not a substitute for running the tools** — where you can actually run a scanner, fuzzer, or PoC, do that; this skill structures the thinking, it doesn't replace verification.
+- **Speculative claims without a reproducible attack path.** This is the anti-fabrication gate. "Best practice says X" or "this could theoretically be vulnerable" is not a finding. State the entry point, exact steps, and realized impact — or drop it.
+- **Plan, strategy, or decision stress-testing.** For "how could this plan fail," use `thinking-pre-mortem`. For "what's the strongest case against this decision," use `thinking-steel-manning`.
+- **Architecture review without security focus.** For architecture resilience, use `thinking-systems` or `thinking-pre-mortem`.
+- **Running scanners replaces thinking.** Where you can actually run a SAST tool, fuzzer, or PoC, do that. This skill structures the adversarial thinking; it doesn't replace automated verification.
+- **Padding the report to look thorough.** A short list of real vulnerabilities beats a long list of theoretical ones. Resist the incentive to add "informational" or "best-practice" items.
-## The Red Team Process
+## Procedure
-### Step 1: Define the Target
-
-What are you attacking?
+### Step 1: Define the Target and Scope
```markdown
-## Red Team Target
-
-System: User authentication system
-Scope:
-- Login flow
-- Password reset
-- Session management
-- API authentication
-
-Out of scope:
-- Physical security
-- Social engineering of employees
-- Third-party services
-
-Goal: Find vulnerabilities that could lead to:
-- Unauthorized account access
-- Session hijacking
-- Privilege escalation
+Target: [System/component under review]
+Scope: [What to attack — be specific]
+Out of scope: [What to skip]
+Goal: [What constitutes a successful attack — e.g., unauthorized access, data exfiltration, privilege escalation]
```
-### Step 2: Adopt Adversary Mindset
+### Step 2: Adopt the Adversary Mindset
-Think like an attacker:
+Identify who would attack this system and what they want:
```markdown
-## Adversary Profile
+Adversary profiles:
+- External attacker (no access): targets public endpoints, auth bypass, injection
+- Authenticated user (basic access): targets privilege escalation, IDOR, business logic
+- Insider (elevated access): targets data exfiltration, audit bypass
-Who would attack this?
-- Script kiddies: Automated scanning, known exploits
-- Sophisticated attackers: Custom exploits, patience
-- Insiders: Already have some access
-- Competitors: Want data or disruption
-
-Attacker motivations:
-- Financial gain (steal data, ransom)
-- Disruption (take down service)
-- Credential harvesting (sell on dark web)
-- Competitive advantage (steal IP)
-
-What would I do if I were them?
+For each profile, ask: "If I wanted to cause maximum damage with their access level, how would I?"
```
-### Step 3: Enumerate Attack Surfaces
+### Step 3: Enumerate the Attack Surface
-Where can attacks happen?
+Map every entry point and trust boundary:
-```markdown
-## Attack Surface Enumeration
-
-Entry points:
-| Surface | Exposure | Attacker Access |
-|---------|----------|-----------------|
-| Login form | Public | Anyone |
-| API endpoints | Public | Anyone with API key |
-| Password reset | Public | Anyone with email |
-| Admin panel | Internal network | Employees |
-| Database | No direct access | Only if compromised |
-
-Trust boundaries:
-- Public internet → Web server
-- Web server → Application
-- Application → Database
-- User → Authenticated user
-- User → Admin
-```
+| Surface | Exposure | Trust Boundary |
+|---------|----------|----------------|
+| Login form | Public internet | Anonymous → Authenticated |
+| API /graphql | Public (with key) | Authenticated → Application |
+| Password reset flow | Public | Anonymous → Account owner |
+| Admin panel | Internal network | Authenticated → Admin |
+| File upload endpoint | Authenticated | User data → Server storage |
### Step 4: Execute Attack Scenarios
-Systematically try to break things:
-
-```markdown
-## Attack Scenario 1: Credential Stuffing
-
-Attack: Try known breached credentials against login
-Goal: Compromise accounts with reused passwords
-
-Execution:
-1. Obtain breach database (simulated)
-2. Run credentials against login endpoint
-3. Document rate limiting behavior
-4. Test account lockout triggers
-5. Attempt bypass techniques
-
-Findings:
-- Rate limiting triggers at 10 attempts/minute
-- No account lockout
-- No breach credential detection
-- Login response time reveals valid usernames
-```
-
-```markdown
-## Attack Scenario 2: Session Hijacking
-
-Attack: Steal or forge session tokens
-Goal: Access accounts without credentials
-
-Execution:
-1. Analyze session token structure
-2. Test token entropy
-3. Attempt token prediction
-4. Test XSS vectors for token theft
-5. Check secure cookie flags
-
-Findings:
-- Session tokens use secure random
-- Cookies missing HttpOnly flag ←VULNERABILITY
-- No session binding to IP
-- Tokens don't expire on password change
-```
-
-### Step 5: Attempt Bypass
-
-For each defense, try to bypass it:
-
-```markdown
-## Defense Bypass Attempts
-
-Defense: Rate limiting on login
-Bypass attempts:
-| Attempt | Result |
-|---------|--------|
-| Distribute across IPs | BYPASSED - no IP correlation |
-| Vary username slowly | Works - only per-IP limit |
-| Use different user agents | No effect |
-| Target password reset instead | BYPASSED - no rate limit |
-
-Conclusion: Rate limiting is per-IP only, easily distributed
- Password reset has no rate limiting
-```
-
-### Step 6: Document Findings
-
-Create an actionable report:
-
-```markdown
-## Red Team Findings Report
-
-### Critical Vulnerabilities
-
-#### CRIT-1: Password Reset No Rate Limit
-Severity: Critical
-Attack: Brute force password reset tokens
-Impact: Mass account compromise
-Remediation: Add rate limiting to password reset
-Timeline: Immediate
-
-#### CRIT-2: Session Tokens Vulnerable to XSS
-Severity: Critical
-Attack: Inject XSS, steal session cookies
-Impact: Account takeover
-Remediation: Add HttpOnly flag to session cookies
-Timeline: Immediate
-
-### High Vulnerabilities
-
-#### HIGH-1: Rate Limiting Easily Bypassed
-Severity: High
-Attack: Distributed credential stuffing
-Impact: Account compromise at scale
-Remediation: Add account-level rate limiting
-Timeline: 1 week
-
-### Medium Vulnerabilities
-
-#### MED-1: Username Enumeration via Timing
-Severity: Medium
-Attack: Determine valid usernames
-Impact: Enables targeted attacks
-Remediation: Constant-time response for login
-Timeline: 2 weeks
-```
-
-## Red Team Patterns
-
-> The security pattern below is the primary use. The Plan / Architecture / Decision patterns that follow are kept for reference, but for non-security work prefer **thinking-pre-mortem** (plan failure modes) or **thinking-steel-manning** (decision challenge) — and the anti-fabrication gate still applies everywhere: only report a weakness you can show is real.
-
-### Security Red Team
-
-```markdown
-## Security Red Team Checklist
-
-Authentication:
-- [ ] Credential stuffing
-- [ ] Brute force attacks
-- [ ] Session hijacking
-- [ ] Token prediction
-- [ ] Password reset flaws
-
-Authorization:
-- [ ] Privilege escalation
-- [ ] IDOR (insecure direct object reference)
-- [ ] Missing function-level access control
-- [ ] JWT manipulation
-
-Input validation:
-- [ ] SQL injection
-- [ ] XSS (stored, reflected, DOM)
-- [ ] Command injection
-- [ ] Path traversal
-
-Business logic:
-- [ ] Race conditions
-- [ ] State manipulation
-- [ ] Price manipulation
-- [ ] Workflow bypass
-```
-
-### Plan Red Team
-
-```markdown
-## Plan Red Team: Product Launch
-
-Red team the launch plan:
-
-What could go wrong?
-| Failure Mode | Attack Vector | Mitigation |
-|--------------|---------------|------------|
-| Traffic spike | Product goes viral | Auto-scaling, load test |
-| PR disaster | Journalist finds bug | Bug bash before launch |
-| Payment failure | Provider outage | Backup payment provider |
-| Support overwhelmed | Many questions | FAQ, chatbot, staff up |
-
-Assumptions to challenge:
-| Assumption | What if wrong? | How to verify? |
-|------------|----------------|----------------|
-| Users will understand new UI | Confusion, support tickets | User testing |
-| Infrastructure handles 10x | Crashes | Load testing |
-| Marketing will drive traffic | No signups | Organic channel backup |
-```
-
-### Architecture Red Team
+For each attack surface, attempt to break the system:
```markdown
-## Architecture Red Team: Microservices Migration
-
-Attack the architecture:
-
-Single points of failure:
-- API Gateway - if down, everything down
-- Auth service - if down, no logins
-- Message queue - if down, async breaks
-
-Cascade failures:
-- Service A times out → retries → overwhelms B → cascade
-- Database connection exhaustion → app servers stuck → timeout cascade
-
-Data consistency attacks:
-- Eventual consistency window exploits
-- Distributed transaction rollback states
-- Cache invalidation race conditions
-
+Attack: Credential stuffing against login
+Steps:
+1. Obtain breach database of known credentials
+2. Script requests against /login with varied credentials
+3. Observe rate limiting, account lockout, timing differences
Findings:
-1. No circuit breakers between services
-2. Shared database = coupled failure domains
-3. No chaos engineering to verify resilience
+- Rate limiting: 10 req/min per IP (bypassable via distribution)
+- Account lockout: none
+- Timing: response time reveals valid vs invalid usernames ← VULNERABILITY
```
-### Decision Red Team
+For each attack scenario, record: the entry point, exact steps taken, observed behavior, and whether a vulnerability was found.
-```markdown
-## Decision Red Team: Technology Choice
-
-Decision: Adopt Kubernetes for container orchestration
+### Step 5: Attempt Defense Bypass
-Red team the decision:
+For each defense encountered, try to bypass it:
-Arguments AGAINST:
-- Operational complexity high for small team
-- Learning curve delays delivery 3-6 months
-- Could use simpler solutions (ECS, docker-compose)
-- Over-engineering for current scale
+| Defense | Bypass Attempt | Result |
+|---------|---------------|--------|
+| IP-based rate limiting | Distribute requests across IPs | BYPASSED |
+| Input validation | Unicode normalization attacks | RESISTED |
+| Session timeout | Replay expired token with modified timestamp | BYPASSED |
-Counter-arguments:
-- Scale projections justify complexity
-- Team wants to learn K8s anyway
-- Platform engineering investment pays off
-
-Red team verdict:
-The learning curve argument is strongest.
-Consider: Managed K8s (EKS/GKE) to reduce ops burden
- Start with single namespace, expand gradually
-```
+### Step 6: Document Findings — With the Anti-Fabrication Gate
-## Red Team Template
+For EVERY finding, fill out:
```markdown
-# Red Team Report: [Target]
-
-## Scope
-Target: [What's being red teamed]
-In scope: [What to attack]
-Out of scope: [What to skip]
-Goal: [What constitutes a successful attack]
-
-## Adversary Model
-Who: [Who would attack this]
-Capabilities: [What they can do]
-Motivation: [Why they'd attack]
-
-## Attack Surface
-| Surface | Exposure | Notes |
-|---------|----------|-------|
-| | | |
-
-## Attack Scenarios Executed
-| Scenario | Result | Severity |
-|----------|--------|----------|
-| | | |
-
-## Findings
-
-### Critical
-[Findings requiring immediate action]
-
-### High
-[Findings requiring near-term action]
-
-### Medium
-[Findings for backlog]
-
-### Low
-[Informational findings]
-
-## Recommendations
-| Finding | Remediation | Priority | Effort |
-|---------|-------------|----------|--------|
-| | | | |
-
-## Lessons Learned
-[What did the red team reveal about blind spots?]
+Finding: [Title]
+Severity: Critical / High / Medium / Low
+Attack path (REQUIRED):
+ Entry point: [URL, endpoint, parameter, file]
+ Steps: [1. Send X, 2. Observe Y, 3. Escalate to Z]
+ Realized impact: [What the attacker actually achieves — data access, privilege, DoS]
+Remediation: [Concrete fix]
```
-## Verification Checklist
+**If you cannot fill out the attack path completely, drop the finding.** Do not report "Missing HttpOnly flag" as a standalone finding without demonstrating session token theft. Do not report "No rate limiting" without demonstrating a viable brute-force attack.
-- [ ] Defined clear scope and adversary model
-- [ ] Adopted genuine adversary mindset
-- [ ] Enumerated attack surfaces
-- [ ] Executed multiple attack scenarios
-- [ ] Attempted to bypass defenses
-- [ ] **Every reported finding has a concrete, reproducible attack path (entry point → steps → realized impact); dropped everything that was only theoretical**
-- [ ] Documented findings with severity
-- [ ] Provided actionable remediation
-- [ ] Updated defenses based on findings
+## Output Contract
-## Key Questions
+A completed Red Team report produces:
-- "How would an attacker approach this?"
-- "What assumptions am I making that an attacker wouldn't?"
-- "What's the weakest point in this system?"
-- "If I wanted to cause maximum damage, how would I?"
-- "What am I confident about that I haven't actually tested?"
-- "What would I find embarrassing if an attacker found it first?"
+1. **Target and Scope** — what was reviewed and what was excluded
+2. **Attack Surface Map** — entry points with exposure levels and trust boundaries
+3. **Attack Scenarios Executed** — each scenario with steps, observations, and outcome
+4. **Findings Report** — each with severity AND a concrete, reproducible attack path (entry point → steps → impact)
+5. **Defense Bypass Results** — which defenses held and which were circumvented
+6. **Remediation Recommendations** — prioritized by severity with concrete fixes
-## Sun Tzu's Wisdom (Applied)
+Findings without a complete attack path are excluded from the report. A report with zero findings is acceptable if no reproducible vulnerabilities were discovered.
-"If you know the enemy and know yourself, you need not fear the result of a hundred battles."
+## Anti-Patterns
-Red teaming is knowing yourself as the enemy would. You find your weaknesses before they do. You attack your confidence before it betrays you. The purpose isn't pessimism—it's preparation.
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **Speculative claims** | Findings that say "could be vulnerable" or "best practice says" without a demonstrated attack path | Drop them; only report what you can actually break |
+| **Padding the report** | Adding "informational" or "best-practice" items to look thorough | A short report of real vulns beats a long list of theory |
+| **Non-security red-teaming** | Using this skill for plan stress-testing or decision challenge | Use `thinking-pre-mortem` (plans) or `thinking-steel-manning` (decisions) |
+| **Skipping the adversary model** | Attacking without defining who the attacker is and what access they have | Define the adversary profile first; attacks make sense only in context |
+| **Missing the attack path** | Reporting a vulnerability without showing how to reach it | Every finding needs: entry point → steps → impact |
+| **Scanner-as-substitute** | Running a SAST tool and reporting its output without adversarial thinking | The tool finds patterns; red-teaming finds exploitable paths |
diff --git a/skills/thinking-triz/SKILL.md b/skills/thinking-triz/SKILL.md
index 876efa8..5d6a62d 100644
--- a/skills/thinking-triz/SKILL.md
+++ b/skills/thinking-triz/SKILL.md
@@ -1,380 +1,161 @@
---
name: thinking-triz
-description: Stuck between two requirements that seem mutually exclusive (fast vs accurate, stable vs evolving). Use to name the contradiction and separate it in time, space, or condition.
+description: Use when stuck between two architecture or API requirements that seem mutually exclusive — name the contradiction precisely, then separate the conflicting states in time, space, or condition.
---
# 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.
+TRIZ is a systematic method for resolving **architecture and API design contradictions** — situations where two requirements seem mutually exclusive. When you're about to accept a trade-off because "you can't have both," TRIZ says: name the contradiction precisely, then try to **separate** the conflicting states in time, space, or condition so you get both — no compromise.
-**Core Principle:** Behind every difficult problem lies a contradiction. Resolve the contradiction, solve the problem. Great innovations don't compromise—they transcend.
+The separation moves are the primary procedure. The 40 Inventive Principles are a reference library, not a required checklist. The skill is scoped to technical design contradictions (architecture, API, system parameters); it is NOT for non-technical problems, ordinary prioritization, or contradictions that dissolve under measurement.
-## The Core Reframe
-
-When two requirements collide, the instinct is to compromise (pick a point on the trade-off curve). TRIZ says: name the contradiction precisely, then try to **separate** the conflicting states in time, space, or condition so you get both — no compromise. That separation move is the whole skill; everything below is scaffolding for it.
+**Core Principle:** Great design doesn't compromise — it separates. Find the dimension where the conflicting states can coexist.
## When to Use
-- An architecture/API/design decision is stuck between two requirements that seem mutually exclusive (fast vs. accurate, stable vs. evolving, large cache vs. fast invalidation)
+- An architecture or API design decision is stuck between two requirements that seem mutually exclusive (fast vs accurate, stable vs evolving, large cache vs fast invalidation)
- You're about to accept a trade-off because "you can't have both"
-- The same weakness shows up in every solution you've considered
+- The same weakness shows up in every solution you've considered — the contradiction is structural
Decision flow:
```
-Two requirements seem mutually exclusive? → yes → NAME THE CONTRADICTION, TRY SEPARATION
-About to compromise on a trade-off curve? → yes → APPLY TRIZ FIRST
+Two requirements seem mutually exclusive?
+ → Yes → NAME THE CONTRADICTION, TRY SEPARATION
+ → No → About to accept a trade-off curve compromise?
+ → Yes → APPLY TRIZ FIRST
+ → No → This is a routine decision — just pick based on constraints
```
## When NOT to Use
-- **Not for ordinary trade-offs that have a correct answer.** If one option is simply better given your constraints (cheaper, simpler, well-understood), just pick it — don't manufacture a contradiction. TRIZ is for genuine "I need both opposite states" tension, not for routine prioritization.
-- **Not when the "contradiction" dissolves under measurement.** If you can cheaply test which side actually matters, do that instead of inventing a separation.
-- **Not for non-technical/people problems** — separation principles target system parameters, not org dynamics.
+- **Ordinary trade-offs with a correct answer.** If one option is simply better given your constraints (cheaper, simpler, well-understood), just pick it — don't manufacture a contradiction.
+- **The "contradiction" dissolves under measurement.** If you can cheaply test which side actually matters, do that instead of inventing a separation.
+- **Non-technical or people problems.** Separation principles target system parameters, not organizational dynamics or interpersonal conflicts.
+- **The contradiction is already well-solved by standard patterns.** If there's an established pattern (cache-aside, CQRS, feature flags), apply the pattern directly.
-## The Ideal Final Result (IFR)
+## Procedure
-Before solving, envision the ideal outcome—the system that solves itself:
+### Step 1: Name the Contradiction Precisely
-```
-IFR Formula:
-"The [component] [achieves the goal] BY ITSELF,
-without [cost/complexity/side effects],
-while maintaining [all other functions]"
-```
+Use this template:
-**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"
+"We need the API to be STABLE for client compatibility
+ BUT also EVOLVING to support new features"
```
-### Step 2: Identify the Conflicting Requirements
+If you can't write the contradiction in this form, it's not a TRIZ problem — use another skill.
+
+### Step 2: Envision the Ideal Final Result (IFR)
-List what each state provides:
+Before solving, describe the outcome where the problem solves itself:
```
-FAST processing: THOROUGH processing:
-- Better UX - Higher accuracy
-- Lower timeout risk - Complete validation
-- Reduced server load - Fewer edge case bugs
+"The API supports both old and new clients simultaneously,
+without version negotiation overhead,
+while maintaining a single codebase."
```
-### Step 3: Apply Separation Principles
+IFR questions: What if the problem solved itself? What if the harmful element became useful? What's the result with zero cost?
-Try each separation type:
+### Step 3: Try Separation Moves (Primary Procedure)
-```
-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)
-```
+For each separation dimension, ask: "Can the conflicting states exist at different [times/places/conditions/scales]?"
-### Step 4: Apply Inventive Principles
+#### Separation in Time
-Scan relevant principles:
+"Can we be in state 1 at one time and state 2 at another?"
```
-#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
+Contradiction: "Cache must be FRESH AND cached"
+Separation in Time: TTL-based invalidation — cached now, refreshed later
```
-### Step 5: Synthesize Solutions
+#### Separation in Space
-Combine insights into concrete approaches:
+"Can we be in state 1 in one place and state 2 in another?"
```
-Solution: Layered validation with async completion
-- Edge: Fast syntactic validation (immediate)
-- Queue: Thorough semantic validation (async)
-- Response: Immediate acknowledgment, webhook for final result
+Contradiction: "Data must be LOCAL (fast) AND DISTRIBUTED (resilient)"
+Separation in Space: Multi-region with local reads, distributed writes
```
-## Software Engineering Contradiction Patterns
+#### Separation by Condition
-### Speed vs. Accuracy
+"Can we be in state 1 under some conditions and state 2 under others?"
```
-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
+Contradiction: "Auth must be STRICT AND frictionless"
+Separation by Condition: Strict for sensitive operations, frictionless for low-risk — risk-based authentication
```
-### 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
-```
+#### Separation in Scale/Level
-### Consistency vs. Availability
+"Can state 1 and state 2 exist at different levels of the system?"
```
-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
+Contradiction: "API must be STABLE AND evolving"
+Separation in Scale: Stable interface (API contract), evolving implementation — versioned APIs
```
-### Simplicity vs. Capability
+### Step 4: If Separation Fails, Scan the Principles (Reference)
-```
-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
-```
+When no separation dimension resolves the contradiction, scan the software-adapted inventive principles for inspiration:
-## Resource Analysis
+| Principle | Software Pattern |
+|-----------|-----------------|
+| Segmentation (#1) | Microservices, sharding, chunked processing |
+| Preliminary Action (#10) | Pre-computation, caching, warm-up, materialized views |
+| The Other Way Round (#13) | Push vs pull, invert control, event-driven instead of polling |
+| Intermediary (#24) | Proxy, message queue, API gateway, adapter |
+| Copying (#26) | Caching, replication, CDN, read replicas |
+| Dynamization (#15) | Feature flags, runtime configuration, adaptive thresholds |
+| Another Dimension (#17) | Add metadata layer, versioning, event sourcing |
-TRIZ teaches using existing resources before adding new ones:
+The full 40 principles are reference material; scan only the most applicable ones.
-### Resource Types
+### Step 5: Resource Analysis
-| 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 adding new components, ask: what already exists that can be used?
```
Before: "We need a new service to track user sessions"
-Resource Analysis:
-- What data already exists? → Auth tokens have user identity
+Resource check:
+- What data already exists? → Auth tokens carry 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
+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
+### Step 6: Synthesize and Decide
-- **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
+Combine the separation move with resource reuse into a concrete design decision. Document the contradiction, the separation dimension used, and the resolution.
-## Key Questions
+## Output Contract
-- "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?"
+A completed TRIZ analysis produces:
-## Altshuller's Insight
+1. **Contradiction Statement** — in the precise template form (Parameter A must be State 1 for Benefit 1 BUT State 2 for Benefit 2)
+2. **Ideal Final Result** — what the self-solving outcome looks like
+3. **Separation Attempts** — which dimensions were tried (time, space, condition, scale) and the result
+4. **Principles Scanned** (if separation failed) — which inventive principles were considered
+5. **Resources Used** — what existing capabilities were leveraged before adding new ones
+6. **Resolution** — the concrete design decision that resolves the contradiction without compromise
-"You can wait a hundred years for enlightenment, or you can solve the problem in 15 minutes with these principles."
+## Anti-Patterns
-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.
+| Anti-Pattern | Symptom | Correction |
+|---|---|---|
+| **Manufacturing contradictions** | Applying TRIZ to "which database should we use" when one is clearly better | Use it only for genuine "I need both opposite states" tension |
+| **Compromising instead of separating** | Accepting a midpoint on the trade-off curve without trying separation | Try all four separation dimensions before compromising |
+| **Skipping separation, jumping to principles** | Immediately scanning the 40 principles without trying time/space/condition/scale | Separation is the primary procedure; principles are the fallback |
+| **Applying to non-technical problems** | Using TRIZ for org dynamics or interpersonal conflicts | Separation targets system parameters, not people |
+| **Over-applying to testable contradictions** | Running full TRIZ when a quick measurement resolves which side matters | If you can test it cheaply, test it |
+| **Ignoring existing resources** | Adding new components when existing ones could be reused | Resource analysis before new component proposals |