liteagents 2.4.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 (215) hide show
  1. package/CHANGELOG.md +441 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -0
  4. package/cli.js +230 -0
  5. package/docs/.gitkeep +1 -0
  6. package/docs/CONTRIBUTING.md +739 -0
  7. package/docs/DUAL_PUBLISH_SUMMARY.md +177 -0
  8. package/docs/ERROR_HANDLING_IMPLEMENTATION.md +327 -0
  9. package/docs/GITHUB_PACKAGES.md +181 -0
  10. package/docs/GITHUB_SETUP.md +158 -0
  11. package/docs/INSTALLATION_DEMO.md +691 -0
  12. package/docs/INSTALLATION_LOCATIONS.md +299 -0
  13. package/docs/INSTALLER_GUIDE.md +1586 -0
  14. package/docs/INTEGRATION_ISSUES_9.1.md +341 -0
  15. package/docs/KNOWLEDGE_BASE.md +727 -0
  16. package/docs/MIGRATION.md +384 -0
  17. package/docs/PACKAGE_BASELINE.md +557 -0
  18. package/docs/PACKAGE_VALIDATION_REPORT.md +427 -0
  19. package/docs/PASS_INTEGRATION.md +307 -0
  20. package/docs/PASS_QUICK_START.md +150 -0
  21. package/docs/PRIVACY.md +203 -0
  22. package/docs/PUBLISHING.md +494 -0
  23. package/docs/QUICK-START.md +318 -0
  24. package/docs/RELEASE_NOTES_1.2.0.md +323 -0
  25. package/docs/SECURITY.md +317 -0
  26. package/docs/SILENT_MODE_GUIDE.md +526 -0
  27. package/docs/SKILLS_CONVERSION.md +154 -0
  28. package/docs/TESTING.md +582 -0
  29. package/docs/TEST_COVERAGE.md +347 -0
  30. package/docs/TROUBLESHOOTING.md +788 -0
  31. package/docs/UPDATED_VARIANT_CONFIGURATION.md +274 -0
  32. package/docs/VARIANT_CONFIGURATION.md +440 -0
  33. package/installer/cli.js +761 -0
  34. package/installer/installation-engine.js +1536 -0
  35. package/installer/package-manager.js +640 -0
  36. package/installer/path-manager.js +427 -0
  37. package/installer/report-template.js +298 -0
  38. package/installer/verification-system.js +274 -0
  39. package/package.json +83 -0
  40. package/packages/ampcode/AGENT.md +58 -0
  41. package/packages/ampcode/README.md +17 -0
  42. package/packages/ampcode/agents/1-create-prd.md +175 -0
  43. package/packages/ampcode/agents/2-generate-tasks.md +190 -0
  44. package/packages/ampcode/agents/3-process-task-list.md +225 -0
  45. package/packages/ampcode/agents/code-developer.md +198 -0
  46. package/packages/ampcode/agents/context-builder.md +142 -0
  47. package/packages/ampcode/agents/feature-planner.md +199 -0
  48. package/packages/ampcode/agents/market-researcher.md +89 -0
  49. package/packages/ampcode/agents/orchestrator.md +116 -0
  50. package/packages/ampcode/agents/quality-assurance.md +115 -0
  51. package/packages/ampcode/agents/system-architect.md +135 -0
  52. package/packages/ampcode/agents/ui-designer.md +184 -0
  53. package/packages/ampcode/commands/brainstorming.md +56 -0
  54. package/packages/ampcode/commands/code-review.md +107 -0
  55. package/packages/ampcode/commands/condition-based-waiting/example.ts +158 -0
  56. package/packages/ampcode/commands/condition-based-waiting.md +122 -0
  57. package/packages/ampcode/commands/debug.md +20 -0
  58. package/packages/ampcode/commands/docs-builder/templates.md +572 -0
  59. package/packages/ampcode/commands/docs-builder.md +106 -0
  60. package/packages/ampcode/commands/explain.md +18 -0
  61. package/packages/ampcode/commands/git-commit.md +14 -0
  62. package/packages/ampcode/commands/optimize.md +20 -0
  63. package/packages/ampcode/commands/refactor.md +21 -0
  64. package/packages/ampcode/commands/review.md +18 -0
  65. package/packages/ampcode/commands/root-cause-tracing/find-polluter.sh +63 -0
  66. package/packages/ampcode/commands/root-cause-tracing.md +176 -0
  67. package/packages/ampcode/commands/security.md +21 -0
  68. package/packages/ampcode/commands/ship.md +18 -0
  69. package/packages/ampcode/commands/skill-creator/scripts/init_skill.py +303 -0
  70. package/packages/ampcode/commands/skill-creator/scripts/package_skill.py +110 -0
  71. package/packages/ampcode/commands/skill-creator/scripts/quick_validate.py +65 -0
  72. package/packages/ampcode/commands/skill-creator.md +211 -0
  73. package/packages/ampcode/commands/stash.md +45 -0
  74. package/packages/ampcode/commands/systematic-debugging.md +297 -0
  75. package/packages/ampcode/commands/test-driven-development.md +390 -0
  76. package/packages/ampcode/commands/test-generate.md +18 -0
  77. package/packages/ampcode/commands/testing-anti-patterns.md +304 -0
  78. package/packages/ampcode/commands/verification-before-completion.md +152 -0
  79. package/packages/ampcode/settings.json +13 -0
  80. package/packages/ampcode/variants.json +8 -0
  81. package/packages/claude/CLAUDE.md +58 -0
  82. package/packages/claude/README.md +23 -0
  83. package/packages/claude/agents/1-create-prd.md +175 -0
  84. package/packages/claude/agents/2-generate-tasks.md +190 -0
  85. package/packages/claude/agents/3-process-task-list.md +225 -0
  86. package/packages/claude/agents/code-developer.md +198 -0
  87. package/packages/claude/agents/context-builder.md +142 -0
  88. package/packages/claude/agents/feature-planner.md +199 -0
  89. package/packages/claude/agents/market-researcher.md +89 -0
  90. package/packages/claude/agents/orchestrator.md +117 -0
  91. package/packages/claude/agents/quality-assurance.md +115 -0
  92. package/packages/claude/agents/system-architect.md +135 -0
  93. package/packages/claude/agents/ui-designer.md +184 -0
  94. package/packages/claude/commands/debug.md +20 -0
  95. package/packages/claude/commands/explain.md +18 -0
  96. package/packages/claude/commands/git-commit.md +14 -0
  97. package/packages/claude/commands/optimize.md +20 -0
  98. package/packages/claude/commands/refactor.md +21 -0
  99. package/packages/claude/commands/review.md +18 -0
  100. package/packages/claude/commands/security.md +21 -0
  101. package/packages/claude/commands/ship.md +18 -0
  102. package/packages/claude/commands/stash.md +45 -0
  103. package/packages/claude/commands/test-generate.md +18 -0
  104. package/packages/claude/skills/brainstorming/SKILL.md +56 -0
  105. package/packages/claude/skills/code-review/SKILL.md +107 -0
  106. package/packages/claude/skills/code-review/code-reviewer.md +146 -0
  107. package/packages/claude/skills/condition-based-waiting/SKILL.md +122 -0
  108. package/packages/claude/skills/condition-based-waiting/example.ts +158 -0
  109. package/packages/claude/skills/docs-builder/SKILL.md +106 -0
  110. package/packages/claude/skills/docs-builder/references/templates.md +572 -0
  111. package/packages/claude/skills/root-cause-tracing/SKILL.md +176 -0
  112. package/packages/claude/skills/root-cause-tracing/find-polluter.sh +63 -0
  113. package/packages/claude/skills/skill-creator/LICENSE.txt +202 -0
  114. package/packages/claude/skills/skill-creator/SKILL.md +211 -0
  115. package/packages/claude/skills/skill-creator/scripts/init_skill.py +303 -0
  116. package/packages/claude/skills/skill-creator/scripts/package_skill.py +110 -0
  117. package/packages/claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  118. package/packages/claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  119. package/packages/claude/skills/systematic-debugging/SKILL.md +296 -0
  120. package/packages/claude/skills/systematic-debugging/test-academic.md +14 -0
  121. package/packages/claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  122. package/packages/claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  123. package/packages/claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  124. package/packages/claude/skills/test-driven-development/SKILL.md +392 -0
  125. package/packages/claude/skills/testing-anti-patterns/SKILL.md +304 -0
  126. package/packages/claude/skills/verification-before-completion/SKILL.md +152 -0
  127. package/packages/claude/variants.json +9 -0
  128. package/packages/droid/AGENTS.md +52 -0
  129. package/packages/droid/README.md +17 -0
  130. package/packages/droid/change_settings.json +61 -0
  131. package/packages/droid/commands/brainstorming.md +56 -0
  132. package/packages/droid/commands/code-review.md +107 -0
  133. package/packages/droid/commands/condition-based-waiting/example.ts +158 -0
  134. package/packages/droid/commands/condition-based-waiting.md +122 -0
  135. package/packages/droid/commands/debug.md +20 -0
  136. package/packages/droid/commands/docs-builder/templates.md +572 -0
  137. package/packages/droid/commands/docs-builder.md +106 -0
  138. package/packages/droid/commands/explain.md +18 -0
  139. package/packages/droid/commands/git-commit.md +14 -0
  140. package/packages/droid/commands/optimize.md +20 -0
  141. package/packages/droid/commands/refactor.md +21 -0
  142. package/packages/droid/commands/review.md +18 -0
  143. package/packages/droid/commands/root-cause-tracing/find-polluter.sh +63 -0
  144. package/packages/droid/commands/root-cause-tracing.md +176 -0
  145. package/packages/droid/commands/security.md +21 -0
  146. package/packages/droid/commands/ship.md +18 -0
  147. package/packages/droid/commands/skill-creator/scripts/init_skill.py +303 -0
  148. package/packages/droid/commands/skill-creator/scripts/package_skill.py +110 -0
  149. package/packages/droid/commands/skill-creator/scripts/quick_validate.py +65 -0
  150. package/packages/droid/commands/skill-creator.md +211 -0
  151. package/packages/droid/commands/stash.md +45 -0
  152. package/packages/droid/commands/systematic-debugging.md +297 -0
  153. package/packages/droid/commands/test-driven-development.md +390 -0
  154. package/packages/droid/commands/test-generate.md +18 -0
  155. package/packages/droid/commands/testing-anti-patterns.md +304 -0
  156. package/packages/droid/commands/verification-before-completion.md +152 -0
  157. package/packages/droid/droids/1-create-prd.md +170 -0
  158. package/packages/droid/droids/2-generate-tasks.md +190 -0
  159. package/packages/droid/droids/3-process-task-list.md +225 -0
  160. package/packages/droid/droids/code-developer.md +198 -0
  161. package/packages/droid/droids/context-builder.md +142 -0
  162. package/packages/droid/droids/feature-planner.md +199 -0
  163. package/packages/droid/droids/market-researcher.md +89 -0
  164. package/packages/droid/droids/orchestrator.md +116 -0
  165. package/packages/droid/droids/quality-assurance.md +115 -0
  166. package/packages/droid/droids/system-architect.md +135 -0
  167. package/packages/droid/droids/ui-designer.md +184 -0
  168. package/packages/droid/variants.json +8 -0
  169. package/packages/opencode/AGENTS.md +52 -0
  170. package/packages/opencode/README.md +17 -0
  171. package/packages/opencode/agent/1-create-prd.md +179 -0
  172. package/packages/opencode/agent/2-generate-tasks.md +194 -0
  173. package/packages/opencode/agent/3-process-task-list.md +229 -0
  174. package/packages/opencode/agent/code-developer.md +202 -0
  175. package/packages/opencode/agent/context-builder.md +146 -0
  176. package/packages/opencode/agent/feature-planner.md +203 -0
  177. package/packages/opencode/agent/market-researcher.md +93 -0
  178. package/packages/opencode/agent/orchestrator.md +120 -0
  179. package/packages/opencode/agent/quality-assurance.md +119 -0
  180. package/packages/opencode/agent/system-architect.md +139 -0
  181. package/packages/opencode/agent/ui-designer.md +188 -0
  182. package/packages/opencode/command/brainstorming.md +56 -0
  183. package/packages/opencode/command/code-review.md +107 -0
  184. package/packages/opencode/command/condition-based-waiting/example.ts +158 -0
  185. package/packages/opencode/command/condition-based-waiting.md +122 -0
  186. package/packages/opencode/command/debug.md +20 -0
  187. package/packages/opencode/command/docs-builder/templates.md +572 -0
  188. package/packages/opencode/command/docs-builder.md +106 -0
  189. package/packages/opencode/command/explain.md +18 -0
  190. package/packages/opencode/command/git-commit.md +14 -0
  191. package/packages/opencode/command/optimize.md +20 -0
  192. package/packages/opencode/command/refactor.md +21 -0
  193. package/packages/opencode/command/review.md +18 -0
  194. package/packages/opencode/command/root-cause-tracing/find-polluter.sh +63 -0
  195. package/packages/opencode/command/root-cause-tracing.md +176 -0
  196. package/packages/opencode/command/security.md +21 -0
  197. package/packages/opencode/command/ship.md +18 -0
  198. package/packages/opencode/command/skill-creator/scripts/init_skill.py +303 -0
  199. package/packages/opencode/command/skill-creator/scripts/package_skill.py +110 -0
  200. package/packages/opencode/command/skill-creator/scripts/quick_validate.py +65 -0
  201. package/packages/opencode/command/skill-creator.md +211 -0
  202. package/packages/opencode/command/stash.md +45 -0
  203. package/packages/opencode/command/systematic-debugging.md +297 -0
  204. package/packages/opencode/command/test-driven-development.md +390 -0
  205. package/packages/opencode/command/test-generate.md +18 -0
  206. package/packages/opencode/command/testing-anti-patterns.md +304 -0
  207. package/packages/opencode/command/verification-before-completion.md +152 -0
  208. package/packages/opencode/opencode.jsonc +201 -0
  209. package/packages/opencode/variants.json +8 -0
  210. package/packages/subagentic-manual.md +349 -0
  211. package/postinstall.js +21 -0
  212. package/tools/ampcode/manifest-template.json +14 -0
  213. package/tools/claude/manifest-template.json +14 -0
  214. package/tools/droid/manifest-template.json +14 -0
  215. package/tools/opencode/manifest-template.json +14 -0
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: stash
3
+ description: Stash session context [name]
4
+ usage: /stash ["optional-name"]
5
+ argument-hint: [optional stash name]
6
+ ---
7
+
8
+ Save session context for compaction recovery or handoffs.
9
+
10
+ **Guardrails**
11
+ - Favor straightforward, minimal implementations first and add complexity only when requested or clearly required.
12
+ - Keep changes tightly scoped to the requested outcome.
13
+
14
+ **What it does**
15
+ 1. Captures current conversation context and key decisions
16
+ 2. Records active work in progress
17
+ 3. Stores important findings and insights
18
+ 4. Creates stash file in `.factory/stash/`
19
+ 5. Enables context restoration after compaction
20
+
21
+ **When to use**
22
+ - Before long-running tasks that may trigger compaction
23
+ - When handing off work to another agent or session
24
+ - After completing major investigation or analysis
25
+ - Before taking a break from complex multi-step work
26
+
27
+ **Commands**
28
+ ```bash
29
+ # Stash with auto-generated name
30
+ /stash
31
+
32
+ # Stash with custom name
33
+ /stash "feature-auth-investigation"
34
+
35
+ # List available stashes
36
+ ls .factory/stash/
37
+
38
+ # Restore from stash
39
+ cat .factory/stash/<name>.md
40
+ ```
41
+
42
+ **Reference**
43
+ - Stashes stored in `.factory/stash/` (project-local)
44
+ - Automatically includes: timestamp, active plan, recent decisions
45
+ - Maximum context retention with minimal token usage
@@ -0,0 +1,297 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis testing, implementation) that ensures understanding before attempting solutions
4
+ usage: /systematic-debugging <bug-or-error-description>
5
+ auto_trigger: false
6
+ ---
7
+
8
+ # Systematic Debugging
9
+
10
+ ## Overview
11
+
12
+ Random fixes waste time and create new bugs. Quick patches mask underlying issues.
13
+
14
+ **Core principle:** ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
15
+
16
+ **Violating the letter of this process is violating the spirit of debugging.**
17
+
18
+ ## The Iron Law
19
+
20
+ ```
21
+ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
22
+ ```
23
+
24
+ If you haven't completed Phase 1, you cannot propose fixes.
25
+
26
+ ## When to Use
27
+
28
+ Use for ANY technical issue:
29
+ - Test failures
30
+ - Bugs in production
31
+ - Unexpected behavior
32
+ - Performance problems
33
+ - Build failures
34
+ - Integration issues
35
+
36
+ **Use this ESPECIALLY when:**
37
+ - Under time pressure (emergencies make guessing tempting)
38
+ - "Just one quick fix" seems obvious
39
+ - You've already tried multiple fixes
40
+ - Previous fix didn't work
41
+ - You don't fully understand the issue
42
+
43
+ **Don't skip when:**
44
+ - Issue seems simple (simple bugs have root causes too)
45
+ - You're in a hurry (rushing guarantees rework)
46
+ - Manager wants it fixed NOW (systematic is faster than thrashing)
47
+
48
+ ## The Four Phases
49
+
50
+ You MUST complete each phase before proceeding to the next.
51
+
52
+ ### Phase 1: Root Cause Investigation
53
+
54
+ **BEFORE attempting ANY fix:**
55
+
56
+ 1. **Read Error Messages Carefully**
57
+ - Don't skip past errors or warnings
58
+ - They often contain the exact solution
59
+ - Read stack traces completely
60
+ - Note line numbers, file paths, error codes
61
+
62
+ 2. **Reproduce Consistently**
63
+ - Can you trigger it reliably?
64
+ - What are the exact steps?
65
+ - Does it happen every time?
66
+ - If not reproducible → gather more data, don't guess
67
+
68
+ 3. **Check Recent Changes**
69
+ - What changed that could cause this?
70
+ - Git diff, recent commits
71
+ - New dependencies, config changes
72
+ - Environmental differences
73
+
74
+ 4. **Gather Evidence in Multi-Component Systems**
75
+
76
+ **WHEN system has multiple components (CI → build → signing, API → service → database):**
77
+
78
+ **BEFORE proposing fixes, add diagnostic instrumentation:**
79
+ ```
80
+ For EACH component boundary:
81
+ - Log what data enters component
82
+ - Log what data exits component
83
+ - Verify environment/config propagation
84
+ - Check state at each layer
85
+
86
+ Run once to gather evidence showing WHERE it breaks
87
+ THEN analyze evidence to identify failing component
88
+ THEN investigate that specific component
89
+ ```
90
+
91
+ **Example (multi-layer system):**
92
+ ```bash
93
+ # Layer 1: Workflow
94
+ echo "=== Secrets available in workflow: ==="
95
+ echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
96
+
97
+ # Layer 2: Build script
98
+ echo "=== Env vars in build script: ==="
99
+ env | grep IDENTITY || echo "IDENTITY not in environment"
100
+
101
+ # Layer 3: Signing script
102
+ echo "=== Keychain state: ==="
103
+ security list-keychains
104
+ security find-identity -v
105
+
106
+ # Layer 4: Actual signing
107
+ codesign --sign "$IDENTITY" --verbose=4 "$APP"
108
+ ```
109
+
110
+ **This reveals:** Which layer fails (secrets → workflow ✓, workflow → build ✗)
111
+
112
+ 5. **Trace Data Flow**
113
+
114
+ **WHEN error is deep in call stack:**
115
+
116
+ **REQUIRED SUB-SKILL:** Use root-cause-tracing for backward tracing technique
117
+
118
+ **Quick version:**
119
+ - Where does bad value originate?
120
+ - What called this with bad value?
121
+ - Keep tracing up until you find the source
122
+ - Fix at source, not at symptom
123
+
124
+ ### Phase 2: Pattern Analysis
125
+
126
+ **Find the pattern before fixing:**
127
+
128
+ 1. **Find Working Examples**
129
+ - Locate similar working code in same codebase
130
+ - What works that's similar to what's broken?
131
+
132
+ 2. **Compare Against References**
133
+ - If implementing pattern, read reference implementation COMPLETELY
134
+ - Don't skim - read every line
135
+ - Understand the pattern fully before applying
136
+
137
+ 3. **Identify Differences**
138
+ - What's different between working and broken?
139
+ - List every difference, however small
140
+ - Don't assume "that can't matter"
141
+
142
+ 4. **Understand Dependencies**
143
+ - What other components does this need?
144
+ - What settings, config, environment?
145
+ - What assumptions does it make?
146
+
147
+ ### Phase 3: Hypothesis and Testing
148
+
149
+ **Scientific method:**
150
+
151
+ 1. **Form Single Hypothesis**
152
+ - State clearly: "I think X is the root cause because Y"
153
+ - Write it down
154
+ - Be specific, not vague
155
+
156
+ 2. **Test Minimally**
157
+ - Make the SMALLEST possible change to test hypothesis
158
+ - One variable at a time
159
+ - Don't fix multiple things at once
160
+
161
+ 3. **Verify Before Continuing**
162
+ - Did it work? Yes → Phase 4
163
+ - Didn't work? Form NEW hypothesis
164
+ - DON'T add more fixes on top
165
+
166
+ 4. **When You Don't Know**
167
+ - Say "I don't understand X"
168
+ - Don't pretend to know
169
+ - Ask for help
170
+ - Research more
171
+
172
+ ### Phase 4: Implementation
173
+
174
+ **Fix the root cause, not the symptom:**
175
+
176
+ 1. **Create Failing Test Case**
177
+ - Simplest possible reproduction
178
+ - Automated test if possible
179
+ - One-off test script if no framework
180
+ - MUST have before fixing
181
+ - **REQUIRED SUB-SKILL:** Use test-driven-development for writing proper failing tests
182
+
183
+ 2. **Implement Single Fix**
184
+ - Address the root cause identified
185
+ - ONE change at a time
186
+ - No "while I'm here" improvements
187
+ - No bundled refactoring
188
+
189
+ 3. **Verify Fix**
190
+ - Test passes now?
191
+ - No other tests broken?
192
+ - Issue actually resolved?
193
+
194
+ 4. **If Fix Doesn't Work**
195
+ - STOP
196
+ - Count: How many fixes have you tried?
197
+ - If < 3: Return to Phase 1, re-analyze with new information
198
+ - **If ≥ 3: STOP and question the architecture (step 5 below)**
199
+ - DON'T attempt Fix #4 without architectural discussion
200
+
201
+ 5. **If 3+ Fixes Failed: Question Architecture**
202
+
203
+ **Pattern indicating architectural problem:**
204
+ - Each fix reveals new shared state/coupling/problem in different place
205
+ - Fixes require "massive refactoring" to implement
206
+ - Each fix creates new symptoms elsewhere
207
+
208
+ **STOP and question fundamentals:**
209
+ - Is this pattern fundamentally sound?
210
+ - Are we "sticking with it through sheer inertia"?
211
+ - Should we refactor architecture vs. continue fixing symptoms?
212
+
213
+ **Discuss with your human partner before attempting more fixes**
214
+
215
+ This is NOT a failed hypothesis - this is a wrong architecture.
216
+
217
+ ## Red Flags - STOP and Follow Process
218
+
219
+ If you catch yourself thinking:
220
+ - "Quick fix for now, investigate later"
221
+ - "Just try changing X and see if it works"
222
+ - "Add multiple changes, run tests"
223
+ - "Skip the test, I'll manually verify"
224
+ - "It's probably X, let me fix that"
225
+ - "I don't fully understand but this might work"
226
+ - "Pattern says X but I'll adapt it differently"
227
+ - "Here are the main problems: [lists fixes without investigation]"
228
+ - Proposing solutions before tracing data flow
229
+ - **"One more fix attempt" (when already tried 2+)**
230
+ - **Each fix reveals new problem in different place**
231
+
232
+ **ALL of these mean: STOP. Return to Phase 1.**
233
+
234
+ **If 3+ fixes failed:** Question the architecture (see Phase 4.5)
235
+
236
+ ## your human partner's Signals You're Doing It Wrong
237
+
238
+ **Watch for these redirections:**
239
+ - "Is that not happening?" - You assumed without verifying
240
+ - "Will it show us...?" - You should have added evidence gathering
241
+ - "Stop guessing" - You're proposing fixes without understanding
242
+ - "Ultrathink this" - Question fundamentals, not just symptoms
243
+ - "We're stuck?" (frustrated) - Your approach isn't working
244
+
245
+ **When you see these:** STOP. Return to Phase 1.
246
+
247
+ ## Common Rationalizations
248
+
249
+ | Excuse | Reality |
250
+ |--------|---------|
251
+ | "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
252
+ | "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
253
+ | "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
254
+ | "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
255
+ | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
256
+ | "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
257
+ | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
258
+ | "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
259
+
260
+ ## Quick Reference
261
+
262
+ | Phase | Key Activities | Success Criteria |
263
+ |-------|---------------|------------------|
264
+ | **1. Root Cause** | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
265
+ | **2. Pattern** | Find working examples, compare | Identify differences |
266
+ | **3. Hypothesis** | Form theory, test minimally | Confirmed or new hypothesis |
267
+ | **4. Implementation** | Create test, fix, verify | Bug resolved, tests pass |
268
+
269
+ ## When Process Reveals "No Root Cause"
270
+
271
+ If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
272
+
273
+ 1. You've completed the process
274
+ 2. Document what you investigated
275
+ 3. Implement appropriate handling (retry, timeout, error message)
276
+ 4. Add monitoring/logging for future investigation
277
+
278
+ **But:** 95% of "no root cause" cases are incomplete investigation.
279
+
280
+ ## Integration with Other Skills
281
+
282
+ **This skill requires using:**
283
+ - **root-cause-tracing** - REQUIRED when error is deep in call stack (see Phase 1, Step 5)
284
+ - **test-driven-development** - REQUIRED for creating failing test case (see Phase 4, Step 1)
285
+
286
+ **Complementary skills:**
287
+ - **defense-in-depth** - Add validation at multiple layers after finding root cause
288
+ - **condition-based-waiting** - Replace arbitrary timeouts identified in Phase 2
289
+ - **verification-before-completion** - Verify fix worked before claiming success
290
+
291
+ ## Real-World Impact
292
+
293
+ From debugging sessions:
294
+ - Systematic approach: 15-30 minutes to fix
295
+ - Random fixes approach: 2-3 hours of thrashing
296
+ - First-time fix rate: 95% vs 40%
297
+ - New bugs introduced: Near zero vs common