mindforge-cc 11.5.0 → 11.6.0

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 (177) hide show
  1. package/.agent/mindforge/skill-tdd.md +53 -0
  2. package/.agent/mindforge/skills-index.md +118 -0
  3. package/.agent/mindforge/systematic-debug.md +60 -0
  4. package/.agent/skills/1password-skill/SKILL.md +156 -0
  5. package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
  6. package/.agent/skills/1password-skill/references/get-started.md +21 -0
  7. package/.agent/skills/article-illustrator/SKILL.md +199 -0
  8. package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
  9. package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
  10. package/.agent/skills/article-illustrator/references/styles.md +224 -0
  11. package/.agent/skills/article-illustrator/references/usage.md +50 -0
  12. package/.agent/skills/article-illustrator/references/workflow.md +332 -0
  13. package/.agent/skills/arxiv/SKILL.md +275 -0
  14. package/.agent/skills/blogwatcher/SKILL.md +130 -0
  15. package/.agent/skills/code-wiki/SKILL.md +438 -0
  16. package/.agent/skills/code-wiki/templates/README.md +31 -0
  17. package/.agent/skills/code-wiki/templates/architecture.md +30 -0
  18. package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
  19. package/.agent/skills/code-wiki/templates/module.md +38 -0
  20. package/.agent/skills/codebase-inspection/SKILL.md +109 -0
  21. package/.agent/skills/comic-creator/SKILL.md +240 -0
  22. package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
  23. package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
  24. package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
  25. package/.agent/skills/comic-creator/references/character-template.md +180 -0
  26. package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
  27. package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
  28. package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
  29. package/.agent/skills/comic-creator/references/workflow.md +401 -0
  30. package/.agent/skills/concept-diagrams/SKILL.md +355 -0
  31. package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
  32. package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
  33. package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  34. package/.agent/skills/creative-ideation/SKILL.md +144 -0
  35. package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
  36. package/.agent/skills/devops-cli/SKILL.md +149 -0
  37. package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
  38. package/.agent/skills/devops-cli/references/authentication.md +59 -0
  39. package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
  40. package/.agent/skills/devops-cli/references/running-apps.md +171 -0
  41. package/.agent/skills/devops-watchers/SKILL.md +103 -0
  42. package/.agent/skills/docker-management/SKILL.md +273 -0
  43. package/.agent/skills/domain-intel/SKILL.md +96 -0
  44. package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
  45. package/.agent/skills/github-auth/SKILL.md +240 -0
  46. package/.agent/skills/github-code-review/SKILL.md +474 -0
  47. package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
  48. package/.agent/skills/github-issues/SKILL.md +363 -0
  49. package/.agent/skills/github-issues/templates/bug-report.md +35 -0
  50. package/.agent/skills/github-issues/templates/feature-request.md +31 -0
  51. package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
  52. package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  53. package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
  54. package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  55. package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
  56. package/.agent/skills/github-repo-management/SKILL.md +509 -0
  57. package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
  58. package/.agent/skills/godmode/SKILL.md +396 -0
  59. package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
  60. package/.agent/skills/godmode/references/refusal-detection.md +142 -0
  61. package/.agent/skills/hyperframes/SKILL.md +182 -0
  62. package/.agent/skills/hyperframes/references/cli.md +185 -0
  63. package/.agent/skills/hyperframes/references/composition.md +129 -0
  64. package/.agent/skills/hyperframes/references/features.md +289 -0
  65. package/.agent/skills/hyperframes/references/gsap.md +136 -0
  66. package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
  67. package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
  68. package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
  69. package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
  70. package/.agent/skills/kanban-worker/SKILL.md +188 -0
  71. package/.agent/skills/llm-wiki/SKILL.md +499 -0
  72. package/.agent/skills/meme-generation/SKILL.md +122 -0
  73. package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
  74. package/.agent/skills/obsidian/SKILL.md +60 -0
  75. package/.agent/skills/osint-investigation/SKILL.md +269 -0
  76. package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
  77. package/.agent/skills/oss-forensics/SKILL.md +422 -0
  78. package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
  79. package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
  80. package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
  81. package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
  82. package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
  83. package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
  84. package/.agent/skills/parallel-cli/SKILL.md +384 -0
  85. package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
  86. package/.agent/skills/pixel-art/SKILL.md +209 -0
  87. package/.agent/skills/pixel-art/references/palettes.md +49 -0
  88. package/.agent/skills/plan/SKILL.md +331 -0
  89. package/.agent/skills/polymarket/SKILL.md +75 -0
  90. package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
  91. package/.agent/skills/python-debugpy/SKILL.md +368 -0
  92. package/.agent/skills/requesting-code-review/SKILL.md +273 -0
  93. package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
  94. package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
  95. package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
  96. package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
  97. package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
  98. package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
  99. package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
  100. package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
  101. package/.agent/skills/research-paper-writing/references/sources.md +191 -0
  102. package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
  103. package/.agent/skills/research-paper-writing/templates/README.md +251 -0
  104. package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
  105. package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
  106. package/.agent/skills/scrapling/SKILL.md +328 -0
  107. package/.agent/skills/sherlock/SKILL.md +186 -0
  108. package/.agent/skills/simplify-code/SKILL.md +168 -0
  109. package/.agent/skills/skill-authoring/SKILL.md +158 -0
  110. package/.agent/skills/spike/SKILL.md +190 -0
  111. package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
  112. package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
  113. package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
  114. package/.agent/skills/systematic-debugging/SKILL.md +360 -0
  115. package/.agent/skills/test-driven-development/SKILL.md +336 -0
  116. package/.agent/skills/video-orchestrator/SKILL.md +194 -0
  117. package/.agent/skills/video-orchestrator/references/examples.md +227 -0
  118. package/.agent/skills/video-orchestrator/references/intake.md +166 -0
  119. package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
  120. package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
  121. package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
  122. package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
  123. package/.agent/skills/web-pentest/SKILL.md +332 -0
  124. package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
  125. package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
  126. package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
  127. package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
  128. package/.agent/skills/web-pentest/templates/authorization.md +69 -0
  129. package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
  130. package/.claude/commands/mindforge/skill-tdd.md +53 -0
  131. package/.claude/commands/mindforge/skills-index.md +118 -0
  132. package/.claude/commands/mindforge/systematic-debug.md +60 -0
  133. package/.mindforge/config.json +2 -2
  134. package/.mindforge/memory/sync-manifest.json +1 -1
  135. package/.mindforge/skills/arxiv/SKILL.md +294 -0
  136. package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
  137. package/.mindforge/skills/code-wiki/SKILL.md +457 -0
  138. package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
  139. package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
  140. package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
  141. package/.mindforge/skills/domain-intel/SKILL.md +116 -0
  142. package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
  143. package/.mindforge/skills/github-code-review/SKILL.md +493 -0
  144. package/.mindforge/skills/github-issues/SKILL.md +382 -0
  145. package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
  146. package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
  147. package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
  148. package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
  149. package/.mindforge/skills/meme-generation/SKILL.md +141 -0
  150. package/.mindforge/skills/obsidian/SKILL.md +80 -0
  151. package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
  152. package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
  153. package/.mindforge/skills/pixel-art/SKILL.md +228 -0
  154. package/.mindforge/skills/plan/SKILL.md +350 -0
  155. package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
  156. package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
  157. package/.mindforge/skills/scrapling/SKILL.md +345 -0
  158. package/.mindforge/skills/sherlock/SKILL.md +203 -0
  159. package/.mindforge/skills/simplify-code/SKILL.md +187 -0
  160. package/.mindforge/skills/spike/SKILL.md +209 -0
  161. package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
  162. package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
  163. package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
  164. package/.mindforge/skills/web-pentest/SKILL.md +327 -0
  165. package/CHANGELOG.md +88 -0
  166. package/MINDFORGE.md +3 -3
  167. package/README.md +38 -3
  168. package/RELEASENOTES.md +100 -0
  169. package/bin/dashboard/api-router.js +10 -1
  170. package/bin/governance/approve.js +5 -1
  171. package/bin/memory/federated-sync.js +11 -2
  172. package/bin/memory/knowledge-capture.js +10 -1
  173. package/bin/memory/pillar-health-tracker.js +9 -1
  174. package/bin/review/ads-engine.js +2 -2
  175. package/bin/security/trust-boundaries.js +5 -0
  176. package/docs/getting-started.md +42 -5
  177. package/package.json +1 -1
@@ -0,0 +1,379 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: "4-phase root cause debugging: understand bugs before fixing."
4
+ version: 1.1.0
5
+ status: stable
6
+ min_mindforge_version: 11.5.1
7
+ triggers: systematic debugging, root cause analysis, debug methodology, 4-phase debug, investigate bug, find root cause, diagnose bug, debug systematically, understand before fixing, rca protocol, bug investigation, reproduce the bug
8
+ ---
9
+
10
+ # Systematic Debugging
11
+
12
+ ## Overview
13
+
14
+ Random fixes waste time and create new bugs. Quick patches mask underlying issues.
15
+
16
+ **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
17
+
18
+ **Violating the letter of this process is violating the spirit of debugging.**
19
+
20
+ ## The Iron Law
21
+
22
+ ```
23
+ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
24
+ ```
25
+
26
+ If you haven't completed Phase 1, you cannot propose fixes.
27
+
28
+ ## When to Use
29
+
30
+ Use for ANY technical issue:
31
+ - Test failures
32
+ - Bugs in production
33
+ - Unexpected behavior
34
+ - Performance problems
35
+ - Build failures
36
+ - Integration issues
37
+
38
+ **Use this ESPECIALLY when:**
39
+ - Under time pressure (emergencies make guessing tempting)
40
+ - "Just one quick fix" seems obvious
41
+ - You've already tried multiple fixes
42
+ - Previous fix didn't work
43
+ - You don't fully understand the issue
44
+
45
+ **Don't skip when:**
46
+ - Issue seems simple (simple bugs have root causes too)
47
+ - You're in a hurry (rushing guarantees rework)
48
+ - Someone wants it fixed NOW (systematic is faster than thrashing)
49
+
50
+ ## The Four Phases
51
+
52
+ You MUST complete each phase before proceeding to the next.
53
+
54
+ ---
55
+
56
+ ## Phase 1: Root Cause Investigation
57
+
58
+ **BEFORE attempting ANY fix:**
59
+
60
+ ### 1. Read Error Messages Carefully
61
+
62
+ - Don't skip past errors or warnings
63
+ - They often contain the exact solution
64
+ - Read stack traces completely
65
+ - Note line numbers, file paths, error codes
66
+
67
+ **Action:** Use `read_file` on the relevant source files. Use `search_files` to find the error string in the codebase.
68
+
69
+ ### 2. Reproduce Consistently
70
+
71
+ - Can you trigger it reliably?
72
+ - What are the exact steps?
73
+ - Does it happen every time?
74
+ - If not reproducible → gather more data, don't guess
75
+
76
+ **Action:** Use the `terminal` tool to run the failing test or trigger the bug:
77
+
78
+ ```bash
79
+ # Run specific failing test
80
+ pytest tests/test_module.py::test_name -v
81
+
82
+ # Run with verbose output
83
+ pytest tests/test_module.py -v --tb=long
84
+ ```
85
+
86
+ ### 3. Check Recent Changes
87
+
88
+ - What changed that could cause this?
89
+ - Git diff, recent commits
90
+ - New dependencies, config changes
91
+
92
+ **Action:**
93
+
94
+ ```bash
95
+ # Recent commits
96
+ git log --oneline -10
97
+
98
+ # Uncommitted changes
99
+ git diff
100
+
101
+ # Changes in specific file
102
+ git log -p --follow src/problematic_file.py | head -100
103
+ ```
104
+
105
+ ### 4. Gather Evidence in Multi-Component Systems
106
+
107
+ **WHEN system has multiple components (API → service → database, CI → build → deploy):**
108
+
109
+ **BEFORE proposing fixes, add diagnostic instrumentation:**
110
+
111
+ For EACH component boundary:
112
+ - Log what data enters the component
113
+ - Log what data exits the component
114
+ - Verify environment/config propagation
115
+ - Check state at each layer
116
+
117
+ Run once to gather evidence showing WHERE it breaks.
118
+ THEN analyze evidence to identify the failing component.
119
+ THEN investigate that specific component.
120
+
121
+ ### 5. Trace Data Flow
122
+
123
+ **WHEN error is deep in the call stack:**
124
+
125
+ - Where does the bad value originate?
126
+ - What called this function with the bad value?
127
+ - Keep tracing upstream until you find the source
128
+ - Fix at the source, not at the symptom
129
+
130
+ **Action:** Use `search_files` to trace references:
131
+
132
+ ```python
133
+ # Find where the function is called
134
+ search_files("function_name(", path="src/", file_glob="*.py")
135
+
136
+ # Find where the variable is set
137
+ search_files("variable_name\\s*=", path="src/", file_glob="*.py")
138
+ ```
139
+
140
+ ### Phase 1 Completion Checklist
141
+
142
+ - [ ] Error messages fully read and understood
143
+ - [ ] Issue reproduced consistently
144
+ - [ ] Recent changes identified and reviewed
145
+ - [ ] Evidence gathered (logs, state, data flow)
146
+ - [ ] Problem isolated to specific component/code
147
+ - [ ] Root cause hypothesis formed
148
+
149
+ **STOP:** Do not proceed to Phase 2 until you understand WHY it's happening.
150
+
151
+ ---
152
+
153
+ ## Phase 2: Pattern Analysis
154
+
155
+ **Find the pattern before fixing:**
156
+
157
+ ### 1. Find Working Examples
158
+
159
+ - Locate similar working code in the same codebase
160
+ - What works that's similar to what's broken?
161
+
162
+ **Action:** Use `search_files` to find comparable patterns:
163
+
164
+ ```python
165
+ search_files("similar_pattern", path="src/", file_glob="*.py")
166
+ ```
167
+
168
+ ### 2. Compare Against References
169
+
170
+ - If implementing a pattern, read the reference implementation COMPLETELY
171
+ - Don't skim — read every line
172
+ - Understand the pattern fully before applying
173
+
174
+ ### 3. Identify Differences
175
+
176
+ - What's different between working and broken?
177
+ - List every difference, however small
178
+ - Don't assume "that can't matter"
179
+
180
+ ### 4. Understand Dependencies
181
+
182
+ - What other components does this need?
183
+ - What settings, config, environment?
184
+ - What assumptions does it make?
185
+
186
+ ---
187
+
188
+ ## Phase 3: Hypothesis and Testing
189
+
190
+ **Scientific method:**
191
+
192
+ ### 1. Form a Single Hypothesis
193
+
194
+ - State clearly: "I think X is the root cause because Y"
195
+ - Write it down
196
+ - Be specific, not vague
197
+
198
+ ### 2. Test Minimally
199
+
200
+ - Make the SMALLEST possible change to test the hypothesis
201
+ - One variable at a time
202
+ - Don't fix multiple things at once
203
+
204
+ ### 3. Verify Before Continuing
205
+
206
+ - Did it work? → Phase 4
207
+ - Didn't work? → Form NEW hypothesis
208
+ - DON'T add more fixes on top
209
+
210
+ ### 4. When You Don't Know
211
+
212
+ - Say "I don't understand X"
213
+ - Don't pretend to know
214
+ - Ask the user for help
215
+ - Research more
216
+
217
+ ---
218
+
219
+ ## Phase 4: Implementation
220
+
221
+ **Fix the root cause, not the symptom:**
222
+
223
+ ### 1. Create Failing Test Case
224
+
225
+ - Simplest possible reproduction
226
+ - Automated test if possible
227
+ - MUST have before fixing
228
+ - Use the `test-driven-development` skill
229
+
230
+ ### 2. Implement Single Fix
231
+
232
+ - Address the root cause identified
233
+ - ONE change at a time
234
+ - No "while I'm here" improvements
235
+ - No bundled refactoring
236
+
237
+ ### 3. Verify Fix
238
+
239
+ ```bash
240
+ # Run the specific regression test
241
+ pytest tests/test_module.py::test_regression -v
242
+
243
+ # Run full suite — no regressions
244
+ pytest tests/ -q
245
+ ```
246
+
247
+ ### 4. If Fix Doesn't Work — The Rule of Three
248
+
249
+ - **STOP.**
250
+ - Count: How many fixes have you tried?
251
+ - If < 3: Return to Phase 1, re-analyze with new information
252
+ - **If ≥ 3: STOP and question the architecture (step 5 below)**
253
+ - DON'T attempt Fix #4 without architectural discussion
254
+
255
+ ### 5. If 3+ Fixes Failed: Question Architecture
256
+
257
+ **Pattern indicating an architectural problem:**
258
+ - Each fix reveals new shared state/coupling in a different place
259
+ - Fixes require "massive refactoring" to implement
260
+ - Each fix creates new symptoms elsewhere
261
+
262
+ **STOP and question fundamentals:**
263
+ - Is this pattern fundamentally sound?
264
+ - Are we "sticking with it through sheer inertia"?
265
+ - Should we refactor the architecture vs. continue fixing symptoms?
266
+
267
+ **Discuss with the user before attempting more fixes.**
268
+
269
+ This is NOT a failed hypothesis — this is a wrong architecture.
270
+
271
+ ---
272
+
273
+ ## Red Flags — STOP and Follow Process
274
+
275
+ If you catch yourself thinking:
276
+ - "Quick fix for now, investigate later"
277
+ - "Just try changing X and see if it works"
278
+ - "Add multiple changes, run tests"
279
+ - "Skip the test, I'll manually verify"
280
+ - "It's probably X, let me fix that"
281
+ - "I don't fully understand but this might work"
282
+ - "Pattern says X but I'll adapt it differently"
283
+ - "Here are the main problems: [lists fixes without investigation]"
284
+ - Proposing solutions before tracing data flow
285
+ - **"One more fix attempt" (when already tried 2+)**
286
+ - **Each fix reveals a new problem in a different place**
287
+
288
+ **ALL of these mean: STOP. Return to Phase 1.**
289
+
290
+ **If 3+ fixes failed:** Question the architecture (Phase 4 step 5).
291
+
292
+ ## Common Rationalizations
293
+
294
+ | Excuse | Reality |
295
+ |--------|---------|
296
+ | "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
297
+ | "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
298
+ | "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
299
+ | "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
300
+ | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
301
+ | "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
302
+ | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
303
+ | "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question the pattern, don't fix again. |
304
+
305
+ ## Quick Reference
306
+
307
+ | Phase | Key Activities | Success Criteria |
308
+ |-------|---------------|------------------|
309
+ | **1. Root Cause** | Read errors, reproduce, check changes, gather evidence, trace data flow | Understand WHAT and WHY |
310
+ | **2. Pattern** | Find working examples, compare, identify differences | Know what's different |
311
+ | **3. Hypothesis** | Form theory, test minimally, one variable at a time | Confirmed or new hypothesis |
312
+ | **4. Implementation** | Create regression test, fix root cause, verify | Bug resolved, all tests pass |
313
+
314
+ ##
315
+
316
+ ### Investigation Tools
317
+
318
+ Use these available tools during Phase 1:
319
+
320
+ - **`search_files`** — Find error strings, trace function calls, locate patterns
321
+ - **`read_file`** — Read source code with line numbers for precise analysis
322
+ - **`terminal`** — Run tests, check git history, reproduce bugs
323
+ - **`web_search`/`web_extract`** — Research error messages, library docs
324
+
325
+ ### With delegate_task
326
+
327
+ For complex multi-component debugging, dispatch investigation subagents:
328
+
329
+ ```python
330
+ delegate_task(
331
+ goal="Investigate why [specific test/behavior] fails",
332
+ context="""
333
+ Follow systematic-debugging skill:
334
+ 1. Read the error message carefully
335
+ 2. Reproduce the issue
336
+ 3. Trace the data flow to find root cause
337
+ 4. Report findings — do NOT fix yet
338
+
339
+ Error: [paste full error]
340
+ File: [path to failing code]
341
+ Test command: [exact command]
342
+ """,
343
+ toolsets=['terminal', 'file']
344
+ )
345
+ ```
346
+
347
+ ### With test-driven-development
348
+
349
+ When fixing bugs:
350
+ 1. Write a test that reproduces the bug (RED)
351
+ 2. Debug systematically to find root cause
352
+ 3. Fix the root cause (GREEN)
353
+ 4. The test proves the fix and prevents regression
354
+
355
+ ## Real-World Impact
356
+
357
+ From debugging sessions:
358
+ - Systematic approach: 15-30 minutes to fix
359
+ - Random fixes approach: 2-3 hours of thrashing
360
+ - First-time fix rate: 95% vs 40%
361
+ - New bugs introduced: Near zero vs common
362
+
363
+ **No shortcuts. No guessing. Systematic always wins.**
364
+
365
+ ## Mandatory actions when this skill is active
366
+
367
+ Before applying this skill:
368
+ - [ ] Read the task requirements fully before acting
369
+ - [ ] Confirm you understand the goal and constraints
370
+ - [ ] Check for existing work or prior context in the codebase
371
+
372
+ While working:
373
+ - [ ] Follow the methodology described above step by step
374
+ - [ ] Document any decisions or findings as you go
375
+
376
+ After completing:
377
+ - [ ] Self-check: does the output satisfy the original requirement?
378
+ - [ ] Verify no regressions or unintended side effects
379
+