bps-kit 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -7
  3. package/bin/cli.js +27 -16
  4. package/package.json +2 -2
  5. package/templates/VAULT_INDEX.md +2 -2
  6. package/templates/agents-template/rules/GEMINI.md +4 -4
  7. package/templates/agents-template/scripts/convert_to_vscode.js +87 -0
  8. package/templates/skills_basic/behavioral-modes/SKILL.md +247 -0
  9. package/templates/skills_basic/brainstorming/SKILL.md +232 -0
  10. package/templates/skills_basic/clean-code/SKILL.md +94 -0
  11. package/templates/skills_basic/concise-planning/SKILL.md +68 -0
  12. package/templates/skills_basic/executing-plans/SKILL.md +82 -0
  13. package/templates/skills_basic/git-pushing/SKILL.md +36 -0
  14. package/templates/skills_basic/git-pushing/scripts/smart_commit.sh +19 -0
  15. package/templates/skills_basic/lint-and-validate/SKILL.md +50 -0
  16. package/templates/skills_basic/lint-and-validate/scripts/lint_runner.py +172 -0
  17. package/templates/skills_basic/lint-and-validate/scripts/type_coverage.py +173 -0
  18. package/templates/skills_basic/plan-writing/SKILL.md +154 -0
  19. package/templates/skills_basic/systematic-debugging/CREATION-LOG.md +119 -0
  20. package/templates/skills_basic/systematic-debugging/SKILL.md +299 -0
  21. package/templates/skills_basic/systematic-debugging/condition-based-waiting-example.ts +158 -0
  22. package/templates/skills_basic/systematic-debugging/condition-based-waiting.md +115 -0
  23. package/templates/skills_basic/systematic-debugging/defense-in-depth.md +122 -0
  24. package/templates/skills_basic/systematic-debugging/find-polluter.sh +63 -0
  25. package/templates/skills_basic/systematic-debugging/root-cause-tracing.md +169 -0
  26. package/templates/skills_basic/systematic-debugging/test-academic.md +14 -0
  27. package/templates/skills_basic/systematic-debugging/test-pressure-1.md +58 -0
  28. package/templates/skills_basic/systematic-debugging/test-pressure-2.md +68 -0
  29. package/templates/skills_basic/systematic-debugging/test-pressure-3.md +69 -0
  30. package/templates/skills_basic/verification-before-completion/SKILL.md +145 -0
  31. package/templates/skills_basic/vulnerability-scanner/SKILL.md +281 -0
  32. package/templates/skills_basic/vulnerability-scanner/checklists.md +121 -0
  33. package/templates/skills_basic/vulnerability-scanner/scripts/security_scan.py +458 -0
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Lint Runner - Unified linting and type checking
4
+ Runs appropriate linters based on project type.
5
+
6
+ Usage:
7
+ python lint_runner.py <project_path>
8
+
9
+ Supports:
10
+ - Node.js: npm run lint, npx tsc --noEmit
11
+ - Python: ruff check, mypy
12
+ """
13
+
14
+ import subprocess
15
+ import sys
16
+ import json
17
+ from pathlib import Path
18
+ from datetime import datetime
19
+
20
+ # Fix Windows console encoding
21
+ try:
22
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
23
+ except:
24
+ pass
25
+
26
+
27
+ def detect_project_type(project_path: Path) -> dict:
28
+ """Detect project type and available linters."""
29
+ result = {
30
+ "type": "unknown",
31
+ "linters": []
32
+ }
33
+
34
+ # Node.js project
35
+ package_json = project_path / "package.json"
36
+ if package_json.exists():
37
+ result["type"] = "node"
38
+ try:
39
+ pkg = json.loads(package_json.read_text(encoding='utf-8'))
40
+ scripts = pkg.get("scripts", {})
41
+ deps = {**pkg.get("dependencies", {}), **pkg.get("devDependencies", {})}
42
+
43
+ # Check for lint script
44
+ if "lint" in scripts:
45
+ result["linters"].append({"name": "npm lint", "cmd": ["npm", "run", "lint"]})
46
+ elif "eslint" in deps:
47
+ result["linters"].append({"name": "eslint", "cmd": ["npx", "eslint", "."]})
48
+
49
+ # Check for TypeScript
50
+ if "typescript" in deps or (project_path / "tsconfig.json").exists():
51
+ result["linters"].append({"name": "tsc", "cmd": ["npx", "tsc", "--noEmit"]})
52
+
53
+ except:
54
+ pass
55
+
56
+ # Python project
57
+ if (project_path / "pyproject.toml").exists() or (project_path / "requirements.txt").exists():
58
+ result["type"] = "python"
59
+
60
+ # Check for ruff
61
+ result["linters"].append({"name": "ruff", "cmd": ["ruff", "check", "."]})
62
+
63
+ # Check for mypy
64
+ if (project_path / "mypy.ini").exists() or (project_path / "pyproject.toml").exists():
65
+ result["linters"].append({"name": "mypy", "cmd": ["mypy", "."]})
66
+
67
+ return result
68
+
69
+
70
+ def run_linter(linter: dict, cwd: Path) -> dict:
71
+ """Run a single linter and return results."""
72
+ result = {
73
+ "name": linter["name"],
74
+ "passed": False,
75
+ "output": "",
76
+ "error": ""
77
+ }
78
+
79
+ try:
80
+ proc = subprocess.run(
81
+ linter["cmd"],
82
+ cwd=str(cwd),
83
+ capture_output=True,
84
+ text=True,
85
+ encoding='utf-8',
86
+ errors='replace',
87
+ timeout=120
88
+ )
89
+
90
+ result["output"] = proc.stdout[:2000] if proc.stdout else ""
91
+ result["error"] = proc.stderr[:500] if proc.stderr else ""
92
+ result["passed"] = proc.returncode == 0
93
+
94
+ except FileNotFoundError:
95
+ result["error"] = f"Command not found: {linter['cmd'][0]}"
96
+ except subprocess.TimeoutExpired:
97
+ result["error"] = "Timeout after 120s"
98
+ except Exception as e:
99
+ result["error"] = str(e)
100
+
101
+ return result
102
+
103
+
104
+ def main():
105
+ project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
106
+
107
+ print(f"\n{'='*60}")
108
+ print(f"[LINT RUNNER] Unified Linting")
109
+ print(f"{'='*60}")
110
+ print(f"Project: {project_path}")
111
+ print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
112
+
113
+ # Detect project type
114
+ project_info = detect_project_type(project_path)
115
+ print(f"Type: {project_info['type']}")
116
+ print(f"Linters: {len(project_info['linters'])}")
117
+ print("-"*60)
118
+
119
+ if not project_info["linters"]:
120
+ print("No linters found for this project type.")
121
+ output = {
122
+ "script": "lint_runner",
123
+ "project": str(project_path),
124
+ "type": project_info["type"],
125
+ "checks": [],
126
+ "passed": True,
127
+ "message": "No linters configured"
128
+ }
129
+ print(json.dumps(output, indent=2))
130
+ sys.exit(0)
131
+
132
+ # Run each linter
133
+ results = []
134
+ all_passed = True
135
+
136
+ for linter in project_info["linters"]:
137
+ print(f"\nRunning: {linter['name']}...")
138
+ result = run_linter(linter, project_path)
139
+ results.append(result)
140
+
141
+ if result["passed"]:
142
+ print(f" [PASS] {linter['name']}")
143
+ else:
144
+ print(f" [FAIL] {linter['name']}")
145
+ if result["error"]:
146
+ print(f" Error: {result['error'][:200]}")
147
+ all_passed = False
148
+
149
+ # Summary
150
+ print("\n" + "="*60)
151
+ print("SUMMARY")
152
+ print("="*60)
153
+
154
+ for r in results:
155
+ icon = "[PASS]" if r["passed"] else "[FAIL]"
156
+ print(f"{icon} {r['name']}")
157
+
158
+ output = {
159
+ "script": "lint_runner",
160
+ "project": str(project_path),
161
+ "type": project_info["type"],
162
+ "checks": results,
163
+ "passed": all_passed
164
+ }
165
+
166
+ print("\n" + json.dumps(output, indent=2))
167
+
168
+ sys.exit(0 if all_passed else 1)
169
+
170
+
171
+ if __name__ == "__main__":
172
+ main()
@@ -0,0 +1,173 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Type Coverage Checker - Measures TypeScript/Python type coverage.
4
+ Identifies untyped functions, any usage, and type safety issues.
5
+ """
6
+ import sys
7
+ import re
8
+ import subprocess
9
+ from pathlib import Path
10
+
11
+ # Fix Windows console encoding for Unicode output
12
+ try:
13
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
14
+ sys.stderr.reconfigure(encoding='utf-8', errors='replace')
15
+ except AttributeError:
16
+ pass # Python < 3.7
17
+
18
+ def check_typescript_coverage(project_path: Path) -> dict:
19
+ """Check TypeScript type coverage."""
20
+ issues = []
21
+ passed = []
22
+ stats = {'any_count': 0, 'untyped_functions': 0, 'total_functions': 0}
23
+
24
+ ts_files = list(project_path.rglob("*.ts")) + list(project_path.rglob("*.tsx"))
25
+ ts_files = [f for f in ts_files if 'node_modules' not in str(f) and '.d.ts' not in str(f)]
26
+
27
+ if not ts_files:
28
+ return {'type': 'typescript', 'files': 0, 'passed': [], 'issues': ["[!] No TypeScript files found"], 'stats': stats}
29
+
30
+ for file_path in ts_files[:30]: # Limit
31
+ try:
32
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
33
+
34
+ # Count 'any' usage
35
+ any_matches = re.findall(r':\s*any\b', content)
36
+ stats['any_count'] += len(any_matches)
37
+
38
+ # Find functions without return types
39
+ # function name(params) { - no return type
40
+ untyped = re.findall(r'function\s+\w+\s*\([^)]*\)\s*{', content)
41
+ # Arrow functions without types: const fn = (x) => or (x) =>
42
+ untyped += re.findall(r'=\s*\([^:)]*\)\s*=>', content)
43
+ stats['untyped_functions'] += len(untyped)
44
+
45
+ # Count typed functions
46
+ typed = re.findall(r'function\s+\w+\s*\([^)]*\)\s*:\s*\w+', content)
47
+ typed += re.findall(r':\s*\([^)]*\)\s*=>\s*\w+', content)
48
+ stats['total_functions'] += len(typed) + len(untyped)
49
+
50
+ except Exception:
51
+ continue
52
+
53
+ # Analyze results
54
+ if stats['any_count'] == 0:
55
+ passed.append("[OK] No 'any' types found")
56
+ elif stats['any_count'] <= 5:
57
+ issues.append(f"[!] {stats['any_count']} 'any' types found (acceptable)")
58
+ else:
59
+ issues.append(f"[X] {stats['any_count']} 'any' types found (too many)")
60
+
61
+ if stats['total_functions'] > 0:
62
+ typed_ratio = (stats['total_functions'] - stats['untyped_functions']) / stats['total_functions'] * 100
63
+ if typed_ratio >= 80:
64
+ passed.append(f"[OK] Type coverage: {typed_ratio:.0f}%")
65
+ elif typed_ratio >= 50:
66
+ issues.append(f"[!] Type coverage: {typed_ratio:.0f}% (improve)")
67
+ else:
68
+ issues.append(f"[X] Type coverage: {typed_ratio:.0f}% (too low)")
69
+
70
+ passed.append(f"[OK] Analyzed {len(ts_files)} TypeScript files")
71
+
72
+ return {'type': 'typescript', 'files': len(ts_files), 'passed': passed, 'issues': issues, 'stats': stats}
73
+
74
+ def check_python_coverage(project_path: Path) -> dict:
75
+ """Check Python type hints coverage."""
76
+ issues = []
77
+ passed = []
78
+ stats = {'untyped_functions': 0, 'typed_functions': 0, 'any_count': 0}
79
+
80
+ py_files = list(project_path.rglob("*.py"))
81
+ py_files = [f for f in py_files if not any(x in str(f) for x in ['venv', '__pycache__', '.git', 'node_modules'])]
82
+
83
+ if not py_files:
84
+ return {'type': 'python', 'files': 0, 'passed': [], 'issues': ["[!] No Python files found"], 'stats': stats}
85
+
86
+ for file_path in py_files[:30]: # Limit
87
+ try:
88
+ content = file_path.read_text(encoding='utf-8', errors='ignore')
89
+
90
+ # Count Any usage
91
+ any_matches = re.findall(r':\s*Any\b', content)
92
+ stats['any_count'] += len(any_matches)
93
+
94
+ # Find functions with type hints
95
+ typed_funcs = re.findall(r'def\s+\w+\s*\([^)]*:[^)]+\)', content)
96
+ typed_funcs += re.findall(r'def\s+\w+\s*\([^)]*\)\s*->', content)
97
+ stats['typed_functions'] += len(typed_funcs)
98
+
99
+ # Find functions without type hints
100
+ all_funcs = re.findall(r'def\s+\w+\s*\(', content)
101
+ stats['untyped_functions'] += len(all_funcs) - len(typed_funcs)
102
+
103
+ except Exception:
104
+ continue
105
+
106
+ total = stats['typed_functions'] + stats['untyped_functions']
107
+
108
+ if total > 0:
109
+ typed_ratio = stats['typed_functions'] / total * 100
110
+ if typed_ratio >= 70:
111
+ passed.append(f"[OK] Type hints coverage: {typed_ratio:.0f}%")
112
+ elif typed_ratio >= 40:
113
+ issues.append(f"[!] Type hints coverage: {typed_ratio:.0f}%")
114
+ else:
115
+ issues.append(f"[X] Type hints coverage: {typed_ratio:.0f}% (add type hints)")
116
+
117
+ if stats['any_count'] == 0:
118
+ passed.append("[OK] No 'Any' types found")
119
+ elif stats['any_count'] <= 3:
120
+ issues.append(f"[!] {stats['any_count']} 'Any' types found")
121
+ else:
122
+ issues.append(f"[X] {stats['any_count']} 'Any' types found")
123
+
124
+ passed.append(f"[OK] Analyzed {len(py_files)} Python files")
125
+
126
+ return {'type': 'python', 'files': len(py_files), 'passed': passed, 'issues': issues, 'stats': stats}
127
+
128
+ def main():
129
+ target = sys.argv[1] if len(sys.argv) > 1 else "."
130
+ project_path = Path(target)
131
+
132
+ print("\n" + "=" * 60)
133
+ print(" TYPE COVERAGE CHECKER")
134
+ print("=" * 60 + "\n")
135
+
136
+ results = []
137
+
138
+ # Check TypeScript
139
+ ts_result = check_typescript_coverage(project_path)
140
+ if ts_result['files'] > 0:
141
+ results.append(ts_result)
142
+
143
+ # Check Python
144
+ py_result = check_python_coverage(project_path)
145
+ if py_result['files'] > 0:
146
+ results.append(py_result)
147
+
148
+ if not results:
149
+ print("[!] No TypeScript or Python files found.")
150
+ sys.exit(0)
151
+
152
+ # Print results
153
+ critical_issues = 0
154
+ for result in results:
155
+ print(f"\n[{result['type'].upper()}]")
156
+ print("-" * 40)
157
+ for item in result['passed']:
158
+ print(f" {item}")
159
+ for item in result['issues']:
160
+ print(f" {item}")
161
+ if item.startswith("[X]"):
162
+ critical_issues += 1
163
+
164
+ print("\n" + "=" * 60)
165
+ if critical_issues == 0:
166
+ print("[OK] TYPE COVERAGE: ACCEPTABLE")
167
+ sys.exit(0)
168
+ else:
169
+ print(f"[X] TYPE COVERAGE: {critical_issues} critical issues")
170
+ sys.exit(1)
171
+
172
+ if __name__ == "__main__":
173
+ main()
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: plan-writing
3
+ description: "Structured task planning with clear breakdowns, dependencies, and verification criteria. Use when implementing features, refactoring, or any multi-step work."
4
+ risk: unknown
5
+ source: community
6
+ date_added: "2026-02-27"
7
+ ---
8
+
9
+ # Plan Writing
10
+
11
+ > Source: obra/superpowers
12
+
13
+ ## Overview
14
+ This skill provides a framework for breaking down work into clear, actionable tasks with verification criteria.
15
+
16
+ ## Task Breakdown Principles
17
+
18
+ ### 1. Small, Focused Tasks
19
+ - Each task should take 2-5 minutes
20
+ - One clear outcome per task
21
+ - Independently verifiable
22
+
23
+ ### 2. Clear Verification
24
+ - How do you know it's done?
25
+ - What can you check/test?
26
+ - What's the expected output?
27
+
28
+ ### 3. Logical Ordering
29
+ - Dependencies identified
30
+ - Parallel work where possible
31
+ - Critical path highlighted
32
+ - **Phase X: Verification is always LAST**
33
+
34
+ ### 4. Dynamic Naming in Project Root
35
+ - Plan files are saved as `{task-slug}.md` in the PROJECT ROOT
36
+ - Name derived from task (e.g., "add auth" → `auth-feature.md`)
37
+ - **NEVER** inside `.claude/`, `docs/`, or temp folders
38
+
39
+ ## Planning Principles (NOT Templates!)
40
+
41
+ > 🔴 **NO fixed templates. Each plan is UNIQUE to the task.**
42
+
43
+ ### Principle 1: Keep It SHORT
44
+
45
+ | ❌ Wrong | ✅ Right |
46
+ |----------|----------|
47
+ | 50 tasks with sub-sub-tasks | 5-10 clear tasks max |
48
+ | Every micro-step listed | Only actionable items |
49
+ | Verbose descriptions | One-line per task |
50
+
51
+ > **Rule:** If plan is longer than 1 page, it's too long. Simplify.
52
+
53
+ ---
54
+
55
+ ### Principle 2: Be SPECIFIC, Not Generic
56
+
57
+ | ❌ Wrong | ✅ Right |
58
+ |----------|----------|
59
+ | "Set up project" | "Run `npx create-next-app`" |
60
+ | "Add authentication" | "Install next-auth, create `/api/auth/[...nextauth].ts`" |
61
+ | "Style the UI" | "Add Tailwind classes to `Header.tsx`" |
62
+
63
+ > **Rule:** Each task should have a clear, verifiable outcome.
64
+
65
+ ---
66
+
67
+ ### Principle 3: Dynamic Content Based on Project Type
68
+
69
+ **For NEW PROJECT:**
70
+ - What tech stack? (decide first)
71
+ - What's the MVP? (minimal features)
72
+ - What's the file structure?
73
+
74
+ **For FEATURE ADDITION:**
75
+ - Which files are affected?
76
+ - What dependencies needed?
77
+ - How to verify it works?
78
+
79
+ **For BUG FIX:**
80
+ - What's the root cause?
81
+ - What file/line to change?
82
+ - How to test the fix?
83
+
84
+ ---
85
+
86
+ ### Principle 4: Scripts Are Project-Specific
87
+
88
+ > 🔴 **DO NOT copy-paste script commands. Choose based on project type.**
89
+
90
+ | Project Type | Relevant Scripts |
91
+ |--------------|------------------|
92
+ | Frontend/React | `ux_audit.py`, `accessibility_checker.py` |
93
+ | Backend/API | `api_validator.py`, `security_scan.py` |
94
+ | Mobile | `mobile_audit.py` |
95
+ | Database | `schema_validator.py` |
96
+ | Full-stack | Mix of above based on what you touched |
97
+
98
+ **Wrong:** Adding all scripts to every plan
99
+ **Right:** Only scripts relevant to THIS task
100
+
101
+ ---
102
+
103
+ ### Principle 5: Verification is Simple
104
+
105
+ | ❌ Wrong | ✅ Right |
106
+ |----------|----------|
107
+ | "Verify the component works correctly" | "Run `npm run dev`, click button, see toast" |
108
+ | "Test the API" | "curl localhost:3000/api/users returns 200" |
109
+ | "Check styles" | "Open browser, verify dark mode toggle works" |
110
+
111
+ ---
112
+
113
+ ## Plan Structure (Flexible, Not Fixed!)
114
+
115
+ ```
116
+ # [Task Name]
117
+
118
+ ## Goal
119
+ One sentence: What are we building/fixing?
120
+
121
+ ## Tasks
122
+ - [ ] Task 1: [Specific action] → Verify: [How to check]
123
+ - [ ] Task 2: [Specific action] → Verify: [How to check]
124
+ - [ ] Task 3: [Specific action] → Verify: [How to check]
125
+
126
+ ## Done When
127
+ - [ ] [Main success criteria]
128
+ ```
129
+
130
+ > **That's it.** No phases, no sub-sections unless truly needed.
131
+ > Keep it minimal. Add complexity only when required.
132
+
133
+ ## Notes
134
+ [Any important considerations]
135
+ ```
136
+
137
+ ---
138
+
139
+ ## Best Practices (Quick Reference)
140
+
141
+ 1. **Start with goal** - What are we building/fixing?
142
+ 2. **Max 10 tasks** - If more, break into multiple plans
143
+ 3. **Each task verifiable** - Clear "done" criteria
144
+ 4. **Project-specific** - No copy-paste templates
145
+ 5. **Update as you go** - Mark `[x]` when complete
146
+
147
+ ---
148
+
149
+ ## When to Use
150
+
151
+ - New project from scratch
152
+ - Adding a feature
153
+ - Fixing a bug (if complex)
154
+ - Refactoring multiple files
@@ -0,0 +1,119 @@
1
+ # Creation Log: Systematic Debugging Skill
2
+
3
+ Reference example of extracting, structuring, and bulletproofing a critical skill.
4
+
5
+ ## Source Material
6
+
7
+ Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
8
+ - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
+ - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
+ - Rules designed to resist time pressure and rationalization
11
+
12
+ ## Extraction Decisions
13
+
14
+ **What to include:**
15
+ - Complete 4-phase framework with all rules
16
+ - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
+ - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
+ - Concrete steps for each phase
19
+
20
+ **What to leave out:**
21
+ - Project-specific context
22
+ - Repetitive variations of same rule
23
+ - Narrative explanations (condensed to principles)
24
+
25
+ ## Structure Following skill-creation/SKILL.md
26
+
27
+ 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
+ 2. **Type: technique** - Concrete process with steps
29
+ 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
+ 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
+ 5. **Phase-by-phase breakdown** - Scannable checklist format
32
+ 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
+
34
+ ## Bulletproofing Elements
35
+
36
+ Framework designed to resist rationalization under pressure:
37
+
38
+ ### Language Choices
39
+ - "ALWAYS" / "NEVER" (not "should" / "try to")
40
+ - "even if faster" / "even if I seem in a hurry"
41
+ - "STOP and re-analyze" (explicit pause)
42
+ - "Don't skip past" (catches the actual behavior)
43
+
44
+ ### Structural Defenses
45
+ - **Phase 1 required** - Can't skip to implementation
46
+ - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
+ - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
+ - **Anti-patterns section** - Shows exactly what shortcuts look like
49
+
50
+ ### Redundancy
51
+ - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
+ - "NEVER fix symptom" appears 4 times in different contexts
53
+ - Each phase has explicit "don't skip" guidance
54
+
55
+ ## Testing Approach
56
+
57
+ Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
+
59
+ ### Test 1: Academic Context (No Pressure)
60
+ - Simple bug, no time pressure
61
+ - **Result:** Perfect compliance, complete investigation
62
+
63
+ ### Test 2: Time Pressure + Obvious Quick Fix
64
+ - User "in a hurry", symptom fix looks easy
65
+ - **Result:** Resisted shortcut, followed full process, found real root cause
66
+
67
+ ### Test 3: Complex System + Uncertainty
68
+ - Multi-layer failure, unclear if can find root cause
69
+ - **Result:** Systematic investigation, traced through all layers, found source
70
+
71
+ ### Test 4: Failed First Fix
72
+ - Hypothesis doesn't work, temptation to add more fixes
73
+ - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
+
75
+ **All tests passed.** No rationalizations found.
76
+
77
+ ## Iterations
78
+
79
+ ### Initial Version
80
+ - Complete 4-phase framework
81
+ - Anti-patterns section
82
+ - Flowchart for "fix failed" decision
83
+
84
+ ### Enhancement 1: TDD Reference
85
+ - Added link to skills/testing/test-driven-development
86
+ - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
+ - Prevents confusion between methodologies
88
+
89
+ ## Final Outcome
90
+
91
+ Bulletproof skill that:
92
+ - ✅ Clearly mandates root cause investigation
93
+ - ✅ Resists time pressure rationalization
94
+ - ✅ Provides concrete steps for each phase
95
+ - ✅ Shows anti-patterns explicitly
96
+ - ✅ Tested under multiple pressure scenarios
97
+ - ✅ Clarifies relationship to TDD
98
+ - ✅ Ready for use
99
+
100
+ ## Key Insight
101
+
102
+ **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
+
104
+ ## Usage Example
105
+
106
+ When encountering a bug:
107
+ 1. Load skill: skills/debugging/systematic-debugging
108
+ 2. Read overview (10 sec) - reminded of mandate
109
+ 3. Follow Phase 1 checklist - forced investigation
110
+ 4. If tempted to skip - see anti-pattern, stop
111
+ 5. Complete all phases - root cause found
112
+
113
+ **Time investment:** 5-10 minutes
114
+ **Time saved:** Hours of symptom-whack-a-mole
115
+
116
+ ---
117
+
118
+ *Created: 2025-10-03*
119
+ *Purpose: Reference example for skill extraction and bulletproofing*