liteagents 2.24.1 → 3.5.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 (160) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/README.md +120 -160
  3. package/installer/cli.js +40 -5
  4. package/installer/installation-engine.js +8 -0
  5. package/package.json +4 -3
  6. package/packages/ampcode/AGENT.md +11 -20
  7. package/packages/ampcode/agents/code-developer.md +11 -17
  8. package/packages/ampcode/agents/orchestrator.md +3 -3
  9. package/packages/ampcode/agents/quality-assurance.md +3 -1
  10. package/packages/ampcode/{commands/brainstorming.md → skills/brainstorming/SKILL.md} +2 -3
  11. package/packages/ampcode/{commands/branch-review.md → skills/branch-review/SKILL.md} +13 -13
  12. package/packages/{claude/commands/docs-builder.md → ampcode/skills/docs-builder/SKILL.md} +1 -1
  13. package/packages/ampcode/{commands/live-canvas.md → skills/live-canvas/SKILL.md} +8 -4
  14. package/packages/ampcode/{commands/refactor.md → skills/refactor/SKILL.md} +57 -9
  15. package/packages/ampcode/{commands/release.md → skills/release/SKILL.md} +4 -4
  16. package/packages/{claude/commands → ampcode/skills}/remember/AGENT_RULES.md +44 -84
  17. package/packages/ampcode/{commands/remember.md → skills/remember/SKILL.md} +86 -13
  18. package/packages/ampcode/{commands → skills}/remember/friction.cjs +0 -0
  19. package/packages/ampcode/skills/remember/stub-check.cjs +206 -0
  20. package/packages/ampcode/skills/remember/sync-rules.cjs +178 -0
  21. package/packages/ampcode/skills/remember/version-check.cjs +214 -0
  22. package/packages/ampcode/skills/root-cause/SKILL.md +220 -0
  23. package/packages/ampcode/{commands/trace-back → skills/root-cause}/find-polluter.sh +0 -0
  24. package/packages/{claude/commands/security.md → ampcode/skills/security/SKILL.md} +1 -1
  25. package/packages/{claude/commands/ship.md → ampcode/skills/ship/SKILL.md} +1 -1
  26. package/packages/ampcode/skills/skill-creator/LICENSE.txt +202 -0
  27. package/packages/ampcode/{commands/skill-creator.md → skills/skill-creator/SKILL.md} +1 -2
  28. package/packages/ampcode/{commands → skills}/skill-creator/scripts/init_skill.py +0 -0
  29. package/packages/ampcode/{commands → skills}/skill-creator/scripts/package_skill.py +0 -0
  30. package/packages/ampcode/{commands → skills}/skill-creator/scripts/quick_validate.py +0 -0
  31. package/packages/ampcode/{commands/stash.md → skills/stash/SKILL.md} +2 -1
  32. package/packages/{claude/commands/test-generate.md → ampcode/skills/test-generate/SKILL.md} +2 -2
  33. package/packages/ampcode/variants.json +2 -2
  34. package/packages/claude/CLAUDE.md +11 -19
  35. package/packages/claude/agents/code-developer.md +11 -17
  36. package/packages/claude/agents/orchestrator.md +4 -5
  37. package/packages/claude/agents/quality-assurance.md +3 -1
  38. package/packages/claude/skills/brainstorming/SKILL.md +1 -2
  39. package/packages/claude/{commands/branch-review.md → skills/branch-review/SKILL.md} +1 -1
  40. package/packages/{ampcode/commands/docs-builder.md → claude/skills/docs-builder/SKILL.md} +7 -7
  41. package/packages/claude/skills/live-canvas/SKILL.md +5 -1
  42. package/packages/claude/{commands/refactor.md → skills/refactor/SKILL.md} +53 -5
  43. package/packages/claude/{commands/release.md → skills/release/SKILL.md} +1 -1
  44. package/packages/{ampcode/commands → claude/skills}/remember/AGENT_RULES.md +38 -78
  45. package/packages/claude/{commands/remember.md → skills/remember/SKILL.md} +86 -13
  46. package/packages/claude/{commands → skills}/remember/friction.cjs +0 -0
  47. package/packages/claude/skills/remember/stub-check.cjs +206 -0
  48. package/packages/claude/skills/remember/sync-rules.cjs +178 -0
  49. package/packages/claude/skills/remember/version-check.cjs +214 -0
  50. package/packages/claude/skills/root-cause/SKILL.md +220 -0
  51. package/packages/{ampcode/commands/security.md → claude/skills/security/SKILL.md} +2 -2
  52. package/packages/{ampcode/commands/ship.md → claude/skills/ship/SKILL.md} +2 -2
  53. package/packages/claude/skills/skill-creator/SKILL.md +1 -2
  54. package/packages/claude/{commands/stash.md → skills/stash/SKILL.md} +2 -1
  55. package/packages/{ampcode/commands/test-generate.md → claude/skills/test-generate/SKILL.md} +3 -3
  56. package/packages/claude/variants.json +1 -2
  57. package/packages/droid/AGENTS.md +10 -16
  58. package/packages/droid/commands/brainstorming.md +1 -4
  59. package/packages/droid/commands/branch-review.md +11 -14
  60. package/packages/droid/commands/docs-builder.md +0 -3
  61. package/packages/droid/commands/live-canvas.md +7 -5
  62. package/packages/droid/commands/refactor.md +55 -10
  63. package/packages/droid/commands/release.md +2 -5
  64. package/packages/droid/commands/remember/AGENT_RULES.md +38 -78
  65. package/packages/droid/commands/remember/stub-check.cjs +206 -0
  66. package/packages/droid/commands/remember/sync-rules.cjs +178 -0
  67. package/packages/droid/commands/remember/version-check.cjs +214 -0
  68. package/packages/droid/commands/remember.md +84 -14
  69. package/packages/droid/commands/root-cause.md +218 -0
  70. package/packages/droid/commands/security.md +0 -3
  71. package/packages/droid/commands/ship.md +0 -3
  72. package/packages/droid/commands/skill-creator/LICENSE.txt +202 -0
  73. package/packages/droid/commands/skill-creator.md +0 -4
  74. package/packages/droid/commands/stash.md +0 -2
  75. package/packages/droid/commands/test-generate.md +1 -4
  76. package/packages/droid/droids/1-create-prd.md +6 -2
  77. package/packages/droid/droids/2-generate-tasks.md +1 -2
  78. package/packages/droid/droids/3-process-task-list.md +1 -2
  79. package/packages/droid/droids/code-developer.md +12 -19
  80. package/packages/droid/droids/feature-planner.md +1 -2
  81. package/packages/droid/droids/market-researcher.md +1 -2
  82. package/packages/droid/droids/orchestrator.md +3 -4
  83. package/packages/droid/droids/quality-assurance.md +4 -3
  84. package/packages/droid/droids/system-architect.md +1 -2
  85. package/packages/droid/droids/ui-designer.md +1 -2
  86. package/packages/opencode/AGENTS.md +10 -16
  87. package/packages/opencode/agent/code-developer.md +11 -17
  88. package/packages/opencode/agent/orchestrator.md +2 -2
  89. package/packages/opencode/agent/quality-assurance.md +3 -1
  90. package/packages/opencode/command/brainstorming.md +1 -4
  91. package/packages/opencode/command/branch-review.md +11 -15
  92. package/packages/opencode/command/docs-builder.md +0 -4
  93. package/packages/opencode/command/live-canvas.md +7 -5
  94. package/packages/opencode/command/refactor.md +55 -11
  95. package/packages/opencode/command/release.md +2 -5
  96. package/packages/opencode/command/remember/AGENT_RULES.md +38 -78
  97. package/packages/opencode/command/remember/stub-check.cjs +206 -0
  98. package/packages/opencode/command/remember/sync-rules.cjs +178 -0
  99. package/packages/opencode/command/remember/version-check.cjs +214 -0
  100. package/packages/opencode/command/remember.md +84 -14
  101. package/packages/opencode/command/root-cause.md +218 -0
  102. package/packages/opencode/command/security.md +0 -4
  103. package/packages/opencode/command/ship.md +0 -3
  104. package/packages/opencode/command/skill-creator/LICENSE.txt +202 -0
  105. package/packages/opencode/command/skill-creator.md +0 -4
  106. package/packages/opencode/command/stash.md +0 -3
  107. package/packages/opencode/command/test-generate.md +1 -5
  108. package/packages/opencode/opencode.jsonc +4 -34
  109. package/packages/subagentic-manual.md +147 -314
  110. package/packages/ampcode/agents/context-builder.md +0 -144
  111. package/packages/ampcode/commands/debug-method.md +0 -297
  112. package/packages/ampcode/commands/live-canvas/README.md +0 -264
  113. package/packages/ampcode/commands/optimize.md +0 -61
  114. package/packages/ampcode/commands/tdd-flow.md +0 -390
  115. package/packages/ampcode/commands/test-traps/example.ts +0 -158
  116. package/packages/ampcode/commands/test-traps.md +0 -378
  117. package/packages/ampcode/commands/trace-back.md +0 -176
  118. package/packages/ampcode/commands/verify-done.md +0 -152
  119. package/packages/claude/agents/context-builder.md +0 -145
  120. package/packages/claude/commands/optimize.md +0 -61
  121. package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/README.md +0 -89
  122. package/packages/claude/skills/debug-method/CREATION-LOG.md +0 -119
  123. package/packages/claude/skills/debug-method/SKILL.md +0 -296
  124. package/packages/claude/skills/debug-method/test-academic.md +0 -14
  125. package/packages/claude/skills/debug-method/test-pressure-1.md +0 -58
  126. package/packages/claude/skills/debug-method/test-pressure-2.md +0 -68
  127. package/packages/claude/skills/debug-method/test-pressure-3.md +0 -69
  128. package/packages/claude/skills/live-canvas/README.md +0 -269
  129. package/packages/claude/skills/tdd-flow/SKILL.md +0 -392
  130. package/packages/claude/skills/test-traps/SKILL.md +0 -378
  131. package/packages/claude/skills/test-traps/example.ts +0 -158
  132. package/packages/claude/skills/trace-back/SKILL.md +0 -176
  133. package/packages/claude/skills/verify-done/SKILL.md +0 -152
  134. package/packages/droid/commands/debug-method.md +0 -297
  135. package/packages/droid/commands/live-canvas/README.md +0 -264
  136. package/packages/droid/commands/optimize.md +0 -61
  137. package/packages/droid/commands/tdd-flow.md +0 -390
  138. package/packages/droid/commands/test-traps/example.ts +0 -158
  139. package/packages/droid/commands/test-traps.md +0 -378
  140. package/packages/droid/commands/trace-back.md +0 -176
  141. package/packages/droid/commands/verify-done.md +0 -152
  142. package/packages/droid/droids/context-builder.md +0 -144
  143. package/packages/opencode/agent/context-builder.md +0 -148
  144. package/packages/opencode/command/debug-method.md +0 -297
  145. package/packages/opencode/command/live-canvas/README.md +0 -264
  146. package/packages/opencode/command/optimize.md +0 -61
  147. package/packages/opencode/command/tdd-flow.md +0 -390
  148. package/packages/opencode/command/test-traps/example.ts +0 -158
  149. package/packages/opencode/command/test-traps.md +0 -378
  150. package/packages/opencode/command/trace-back.md +0 -176
  151. package/packages/opencode/command/verify-done.md +0 -152
  152. /package/packages/ampcode/{commands → skills}/docs-builder/docs-builder.cjs +0 -0
  153. /package/packages/ampcode/{commands → skills}/live-canvas/DESIGN_PRINCIPLES.md +0 -0
  154. /package/packages/ampcode/{commands → skills}/live-canvas/dev/post-variants.html +0 -0
  155. /package/packages/ampcode/{commands → skills}/live-canvas/templates/lab-banner.html +0 -0
  156. /package/packages/ampcode/{commands → skills}/live-canvas/templates/overlay-vanilla.js +0 -0
  157. /package/packages/claude/{commands → skills}/docs-builder/docs-builder.cjs +0 -0
  158. /package/packages/claude/skills/{trace-back → root-cause}/find-polluter.sh +0 -0
  159. /package/packages/droid/commands/{trace-back → root-cause}/find-polluter.sh +0 -0
  160. /package/packages/opencode/command/{trace-back → root-cause}/find-polluter.sh +0 -0
@@ -1,152 +0,0 @@
1
- ---
2
- name: verify-done
3
- description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
4
- usage: /verify-done <work-to-verify>
5
- auto_trigger: true
6
- ---
7
-
8
- # Verify Done
9
-
10
- ## Auto-Trigger
11
-
12
- **APPLIES WHEN:**
13
- - About to say: done, fixed, complete, passing, success
14
- - About to commit, push, create PR
15
- - About to mark task [x]
16
-
17
- **APPLIES TO:** All agents, all invocation paths
18
-
19
- **NEVER SKIP:** Even for "obvious" tasks
20
-
21
- ## Overview
22
-
23
- Claiming work is complete without verification is dishonesty, not efficiency.
24
-
25
- **Core principle:** Evidence before claims, always.
26
-
27
- **Violating the letter of this rule is violating the spirit of this rule.**
28
-
29
- ## The Iron Law
30
-
31
- ```
32
- NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
33
- ```
34
-
35
- If you haven't run the verification command in this message, you cannot claim it passes.
36
-
37
- ## The Gate Function
38
-
39
- ```
40
- BEFORE claiming any status or expressing satisfaction:
41
-
42
- 1. IDENTIFY: What command proves this claim?
43
- 2. RUN: Execute the FULL command (fresh, complete)
44
- 3. READ: Full output, check exit code, count failures
45
- 4. VERIFY: Does output confirm the claim?
46
- - If NO: State actual status with evidence
47
- - If YES: State claim WITH evidence
48
- 5. ONLY THEN: Make the claim
49
-
50
- Skip any step = lying, not verifying
51
- ```
52
-
53
- ## Common Failures
54
-
55
- | Claim | Requires | Not Sufficient |
56
- |-------|----------|----------------|
57
- | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
58
- | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
59
- | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
60
- | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
61
- | Regression test works | Red-green cycle verified | Test passes once |
62
- | Agent completed | VCS diff shows changes | Agent reports "success" |
63
- | Requirements met | Line-by-line checklist | Tests passing |
64
-
65
- ## Red Flags - STOP
66
-
67
- - Using "should", "probably", "seems to"
68
- - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
69
- - About to commit/push/PR without verification
70
- - Trusting agent success reports
71
- - Relying on partial verification
72
- - Thinking "just this once"
73
- - Tired and wanting work over
74
- - **ANY wording implying success without having run verification**
75
-
76
- ## Rationalization Prevention
77
-
78
- | Excuse | Reality |
79
- |--------|---------|
80
- | "Should work now" | RUN the verification |
81
- | "I'm confident" | Confidence ≠ evidence |
82
- | "Just this once" | No exceptions |
83
- | "Linter passed" | Linter ≠ compiler |
84
- | "Agent said success" | Verify independently |
85
- | "I'm tired" | Exhaustion ≠ excuse |
86
- | "Partial check is enough" | Partial proves nothing |
87
- | "Different words so rule doesn't apply" | Spirit over letter |
88
-
89
- ## Key Patterns
90
-
91
- **Tests:**
92
- ```
93
- ✅ [Run test command] [See: 34/34 pass] "All tests pass"
94
- ❌ "Should pass now" / "Looks correct"
95
- ```
96
-
97
- **Regression tests (TDD Red-Green):**
98
- ```
99
- ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
100
- ❌ "I've written a regression test" (without red-green verification)
101
- ```
102
-
103
- **Build:**
104
- ```
105
- ✅ [Run build] [See: exit 0] "Build passes"
106
- ❌ "Linter passed" (linter doesn't check compilation)
107
- ```
108
-
109
- **Requirements:**
110
- ```
111
- ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
112
- ❌ "Tests pass, phase complete"
113
- ```
114
-
115
- **Agent delegation:**
116
- ```
117
- ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
118
- ❌ Trust agent report
119
- ```
120
-
121
- ## Why This Matters
122
-
123
- From 24 failure memories:
124
- - your human partner said "I don't believe you" - trust broken
125
- - Undefined functions shipped - would crash
126
- - Missing requirements shipped - incomplete features
127
- - Time wasted on false completion → redirect → rework
128
- - Violates: "Honesty is a core value. If you lie, you'll be replaced."
129
-
130
- ## When To Apply
131
-
132
- **ALWAYS before:**
133
- - ANY variation of success/completion claims
134
- - ANY expression of satisfaction
135
- - ANY positive statement about work state
136
- - Committing, PR creation, task completion
137
- - Moving to next task
138
- - Delegating to agents
139
-
140
- **Rule applies to:**
141
- - Exact phrases
142
- - Paraphrases and synonyms
143
- - Implications of success
144
- - ANY communication suggesting completion/correctness
145
-
146
- ## The Bottom Line
147
-
148
- **No shortcuts for verification.**
149
-
150
- Run the command. Read the output. THEN claim the result.
151
-
152
- This is non-negotiable.
@@ -1,297 +0,0 @@
1
- ---
2
- name: debug-method
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: /debug-method <bug-or-error-description>
5
- auto_trigger: false
6
- ---
7
-
8
- # Debug Method
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 trace-back 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 tdd-flow 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
- - **trace-back** - REQUIRED when error is deep in call stack (see Phase 1, Step 5)
284
- - **tdd-flow** - 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
- - **test-traps** (Anti-Pattern 6) - Replace arbitrary timeouts identified in Phase 2
289
- - **verify-done** - 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