@kata-sh/cli 0.1.0 → 0.1.2

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 (199) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/app-paths.d.ts +4 -0
  4. package/dist/app-paths.js +6 -0
  5. package/dist/cli.d.ts +1 -0
  6. package/dist/cli.js +56 -0
  7. package/dist/loader.d.ts +2 -0
  8. package/dist/loader.js +95 -0
  9. package/dist/resource-loader.d.ts +18 -0
  10. package/dist/resource-loader.js +50 -0
  11. package/dist/wizard.d.ts +15 -0
  12. package/dist/wizard.js +159 -0
  13. package/package.json +50 -21
  14. package/pkg/dist/modes/interactive/theme/dark.json +85 -0
  15. package/pkg/dist/modes/interactive/theme/light.json +84 -0
  16. package/pkg/dist/modes/interactive/theme/theme-schema.json +335 -0
  17. package/pkg/dist/modes/interactive/theme/theme.d.ts +78 -0
  18. package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  19. package/pkg/dist/modes/interactive/theme/theme.js +949 -0
  20. package/pkg/dist/modes/interactive/theme/theme.js.map +1 -0
  21. package/pkg/package.json +8 -0
  22. package/scripts/postinstall.js +45 -0
  23. package/src/resources/AGENTS.md +108 -0
  24. package/src/resources/KATA-WORKFLOW.md +661 -0
  25. package/src/resources/agents/researcher.md +29 -0
  26. package/src/resources/agents/scout.md +56 -0
  27. package/src/resources/agents/worker.md +31 -0
  28. package/src/resources/extensions/ask-user-questions.ts +200 -0
  29. package/src/resources/extensions/bg-shell/index.ts +2758 -0
  30. package/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md +1277 -0
  31. package/src/resources/extensions/browser-tools/core.js +1057 -0
  32. package/src/resources/extensions/browser-tools/index.ts +4916 -0
  33. package/src/resources/extensions/browser-tools/package.json +20 -0
  34. package/src/resources/extensions/context7/index.ts +428 -0
  35. package/src/resources/extensions/context7/package.json +11 -0
  36. package/src/resources/extensions/get-secrets-from-user.ts +352 -0
  37. package/src/resources/extensions/github/formatters.ts +207 -0
  38. package/src/resources/extensions/github/gh-api.ts +537 -0
  39. package/src/resources/extensions/github/index.ts +778 -0
  40. package/src/resources/extensions/kata/activity-log.ts +88 -0
  41. package/src/resources/extensions/kata/auto.ts +2786 -0
  42. package/src/resources/extensions/kata/commands.ts +355 -0
  43. package/src/resources/extensions/kata/crash-recovery.ts +85 -0
  44. package/src/resources/extensions/kata/dashboard-overlay.ts +516 -0
  45. package/src/resources/extensions/kata/docs/preferences-reference.md +103 -0
  46. package/src/resources/extensions/kata/doctor.ts +683 -0
  47. package/src/resources/extensions/kata/files.ts +730 -0
  48. package/src/resources/extensions/kata/gitignore.ts +165 -0
  49. package/src/resources/extensions/kata/guided-flow.ts +976 -0
  50. package/src/resources/extensions/kata/index.ts +556 -0
  51. package/src/resources/extensions/kata/metrics.ts +397 -0
  52. package/src/resources/extensions/kata/observability-validator.ts +408 -0
  53. package/src/resources/extensions/kata/package.json +11 -0
  54. package/src/resources/extensions/kata/paths.ts +346 -0
  55. package/src/resources/extensions/kata/preferences.ts +695 -0
  56. package/src/resources/extensions/kata/prompt-loader.ts +50 -0
  57. package/src/resources/extensions/kata/prompts/complete-milestone.md +25 -0
  58. package/src/resources/extensions/kata/prompts/complete-slice.md +27 -0
  59. package/src/resources/extensions/kata/prompts/discuss.md +151 -0
  60. package/src/resources/extensions/kata/prompts/doctor-heal.md +29 -0
  61. package/src/resources/extensions/kata/prompts/execute-task.md +64 -0
  62. package/src/resources/extensions/kata/prompts/guided-complete-slice.md +1 -0
  63. package/src/resources/extensions/kata/prompts/guided-discuss-milestone.md +3 -0
  64. package/src/resources/extensions/kata/prompts/guided-discuss-slice.md +59 -0
  65. package/src/resources/extensions/kata/prompts/guided-execute-task.md +1 -0
  66. package/src/resources/extensions/kata/prompts/guided-plan-milestone.md +23 -0
  67. package/src/resources/extensions/kata/prompts/guided-plan-slice.md +1 -0
  68. package/src/resources/extensions/kata/prompts/guided-research-slice.md +11 -0
  69. package/src/resources/extensions/kata/prompts/guided-resume-task.md +1 -0
  70. package/src/resources/extensions/kata/prompts/plan-milestone.md +47 -0
  71. package/src/resources/extensions/kata/prompts/plan-slice.md +63 -0
  72. package/src/resources/extensions/kata/prompts/queue.md +85 -0
  73. package/src/resources/extensions/kata/prompts/reassess-roadmap.md +48 -0
  74. package/src/resources/extensions/kata/prompts/replan-slice.md +39 -0
  75. package/src/resources/extensions/kata/prompts/research-milestone.md +37 -0
  76. package/src/resources/extensions/kata/prompts/research-slice.md +28 -0
  77. package/src/resources/extensions/kata/prompts/run-uat.md +109 -0
  78. package/src/resources/extensions/kata/prompts/system.md +341 -0
  79. package/src/resources/extensions/kata/session-forensics.ts +550 -0
  80. package/src/resources/extensions/kata/skill-discovery.ts +137 -0
  81. package/src/resources/extensions/kata/state.ts +509 -0
  82. package/src/resources/extensions/kata/templates/context.md +76 -0
  83. package/src/resources/extensions/kata/templates/decisions.md +8 -0
  84. package/src/resources/extensions/kata/templates/milestone-summary.md +73 -0
  85. package/src/resources/extensions/kata/templates/plan.md +133 -0
  86. package/src/resources/extensions/kata/templates/preferences.md +15 -0
  87. package/src/resources/extensions/kata/templates/project.md +31 -0
  88. package/src/resources/extensions/kata/templates/reassessment.md +28 -0
  89. package/src/resources/extensions/kata/templates/requirements.md +81 -0
  90. package/src/resources/extensions/kata/templates/research.md +46 -0
  91. package/src/resources/extensions/kata/templates/roadmap.md +118 -0
  92. package/src/resources/extensions/kata/templates/slice-context.md +58 -0
  93. package/src/resources/extensions/kata/templates/slice-summary.md +99 -0
  94. package/src/resources/extensions/kata/templates/state.md +19 -0
  95. package/src/resources/extensions/kata/templates/task-plan.md +52 -0
  96. package/src/resources/extensions/kata/templates/task-summary.md +57 -0
  97. package/src/resources/extensions/kata/templates/uat.md +54 -0
  98. package/src/resources/extensions/kata/tests/activity-log-prune.test.ts +327 -0
  99. package/src/resources/extensions/kata/tests/auto-preflight.test.ts +97 -0
  100. package/src/resources/extensions/kata/tests/auto-supervisor.test.mjs +53 -0
  101. package/src/resources/extensions/kata/tests/complete-milestone.test.ts +317 -0
  102. package/src/resources/extensions/kata/tests/cost-projection.test.ts +160 -0
  103. package/src/resources/extensions/kata/tests/derive-state-deps.test.ts +477 -0
  104. package/src/resources/extensions/kata/tests/derive-state.test.ts +1013 -0
  105. package/src/resources/extensions/kata/tests/doctor.test.ts +718 -0
  106. package/src/resources/extensions/kata/tests/idle-recovery.test.ts +490 -0
  107. package/src/resources/extensions/kata/tests/metrics-io.test.ts +254 -0
  108. package/src/resources/extensions/kata/tests/metrics.test.ts +217 -0
  109. package/src/resources/extensions/kata/tests/must-have-parser.test.ts +309 -0
  110. package/src/resources/extensions/kata/tests/parsers.test.ts +1257 -0
  111. package/src/resources/extensions/kata/tests/plan-milestone.test.ts +185 -0
  112. package/src/resources/extensions/kata/tests/plan-quality-validator.test.ts +386 -0
  113. package/src/resources/extensions/kata/tests/reassess-prompt.test.ts +208 -0
  114. package/src/resources/extensions/kata/tests/replan-slice.test.ts +686 -0
  115. package/src/resources/extensions/kata/tests/requirements.test.ts +151 -0
  116. package/src/resources/extensions/kata/tests/resolve-ts-hooks.mjs +17 -0
  117. package/src/resources/extensions/kata/tests/resolve-ts.mjs +11 -0
  118. package/src/resources/extensions/kata/tests/run-uat.test.ts +383 -0
  119. package/src/resources/extensions/kata/tests/unit-runtime.test.ts +388 -0
  120. package/src/resources/extensions/kata/tests/workspace-index.test.ts +118 -0
  121. package/src/resources/extensions/kata/tests/worktree.test.ts +222 -0
  122. package/src/resources/extensions/kata/types.ts +159 -0
  123. package/src/resources/extensions/kata/unit-runtime.ts +163 -0
  124. package/src/resources/extensions/kata/workspace-index.ts +203 -0
  125. package/src/resources/extensions/kata/worktree.ts +182 -0
  126. package/src/resources/extensions/mac-tools/index.ts +852 -0
  127. package/src/resources/extensions/mac-tools/swift-cli/Package.swift +22 -0
  128. package/src/resources/extensions/mac-tools/swift-cli/Sources/main.swift +1318 -0
  129. package/src/resources/extensions/search-the-web/cache.ts +78 -0
  130. package/src/resources/extensions/search-the-web/format.ts +258 -0
  131. package/src/resources/extensions/search-the-web/http.ts +238 -0
  132. package/src/resources/extensions/search-the-web/index.ts +68 -0
  133. package/src/resources/extensions/search-the-web/tool-fetch-page.ts +519 -0
  134. package/src/resources/extensions/search-the-web/tool-llm-context.ts +404 -0
  135. package/src/resources/extensions/search-the-web/tool-search.ts +503 -0
  136. package/src/resources/extensions/search-the-web/url-utils.ts +91 -0
  137. package/src/resources/extensions/shared/confirm-ui.ts +126 -0
  138. package/src/resources/extensions/shared/interview-ui.ts +822 -0
  139. package/src/resources/extensions/shared/next-action-ui.ts +235 -0
  140. package/src/resources/extensions/shared/progress-widget.ts +282 -0
  141. package/src/resources/extensions/shared/thinking-widget.ts +107 -0
  142. package/src/resources/extensions/shared/ui.ts +400 -0
  143. package/src/resources/extensions/shared/wizard-ui.ts +551 -0
  144. package/src/resources/extensions/slash-commands/audit.ts +92 -0
  145. package/src/resources/extensions/slash-commands/create-extension.ts +375 -0
  146. package/src/resources/extensions/slash-commands/create-slash-command.ts +280 -0
  147. package/src/resources/extensions/slash-commands/index.ts +12 -0
  148. package/src/resources/extensions/slash-commands/kata-run.ts +34 -0
  149. package/src/resources/extensions/subagent/agents.ts +126 -0
  150. package/src/resources/extensions/subagent/index.ts +1293 -0
  151. package/src/resources/skills/debug-like-expert/SKILL.md +231 -0
  152. package/src/resources/skills/debug-like-expert/references/debugging-mindset.md +253 -0
  153. package/src/resources/skills/debug-like-expert/references/hypothesis-testing.md +373 -0
  154. package/src/resources/skills/debug-like-expert/references/investigation-techniques.md +337 -0
  155. package/src/resources/skills/debug-like-expert/references/verification-patterns.md +425 -0
  156. package/src/resources/skills/debug-like-expert/references/when-to-research.md +361 -0
  157. package/src/resources/skills/frontend-design/SKILL.md +45 -0
  158. package/src/resources/skills/swiftui/SKILL.md +208 -0
  159. package/src/resources/skills/swiftui/references/animations.md +921 -0
  160. package/src/resources/skills/swiftui/references/architecture.md +1561 -0
  161. package/src/resources/skills/swiftui/references/layout-system.md +1186 -0
  162. package/src/resources/skills/swiftui/references/navigation.md +1492 -0
  163. package/src/resources/skills/swiftui/references/networking-async.md +214 -0
  164. package/src/resources/skills/swiftui/references/performance.md +1706 -0
  165. package/src/resources/skills/swiftui/references/platform-integration.md +204 -0
  166. package/src/resources/skills/swiftui/references/state-management.md +1443 -0
  167. package/src/resources/skills/swiftui/references/swiftdata.md +297 -0
  168. package/src/resources/skills/swiftui/references/testing-debugging.md +247 -0
  169. package/src/resources/skills/swiftui/references/uikit-appkit-interop.md +218 -0
  170. package/src/resources/skills/swiftui/workflows/add-feature.md +191 -0
  171. package/src/resources/skills/swiftui/workflows/build-new-app.md +311 -0
  172. package/src/resources/skills/swiftui/workflows/debug-swiftui.md +192 -0
  173. package/src/resources/skills/swiftui/workflows/optimize-performance.md +197 -0
  174. package/src/resources/skills/swiftui/workflows/ship-app.md +203 -0
  175. package/src/resources/skills/swiftui/workflows/write-tests.md +235 -0
  176. package/dist/commands/task.d.ts +0 -9
  177. package/dist/commands/task.d.ts.map +0 -1
  178. package/dist/commands/task.js +0 -129
  179. package/dist/commands/task.js.map +0 -1
  180. package/dist/commands/task.test.d.ts +0 -2
  181. package/dist/commands/task.test.d.ts.map +0 -1
  182. package/dist/commands/task.test.js +0 -169
  183. package/dist/commands/task.test.js.map +0 -1
  184. package/dist/e2e/task-e2e.test.d.ts +0 -2
  185. package/dist/e2e/task-e2e.test.d.ts.map +0 -1
  186. package/dist/e2e/task-e2e.test.js +0 -173
  187. package/dist/e2e/task-e2e.test.js.map +0 -1
  188. package/dist/index.d.ts +0 -3
  189. package/dist/index.d.ts.map +0 -1
  190. package/dist/index.js +0 -93
  191. package/dist/index.js.map +0 -1
  192. package/dist/slug.d.ts +0 -2
  193. package/dist/slug.d.ts.map +0 -1
  194. package/dist/slug.js +0 -12
  195. package/dist/slug.js.map +0 -1
  196. package/dist/slug.test.d.ts +0 -2
  197. package/dist/slug.test.d.ts.map +0 -1
  198. package/dist/slug.test.js +0 -32
  199. package/dist/slug.test.js.map +0 -1
@@ -0,0 +1,425 @@
1
+
2
+ <overview>
3
+ The most common debugging mistake: declaring victory too early. A fix isn't complete until it's verified. This document defines what "verified" means and provides systematic approaches to proving your fix works.
4
+ </overview>
5
+
6
+
7
+ <definition>
8
+ A fix is verified when:
9
+
10
+ 1. **The original issue no longer occurs**
11
+ - The exact reproduction steps now produce correct behavior
12
+ - Not "it seems better" - it definitively works
13
+
14
+ 2. **You understand why the fix works**
15
+ - You can explain the mechanism
16
+ - Not "I changed X and it worked" but "X was causing Y, and changing it prevents Y"
17
+
18
+ 3. **Related functionality still works**
19
+ - You haven't broken adjacent features
20
+ - Regression testing passes
21
+
22
+ 4. **The fix works across environments**
23
+ - Not just on your machine
24
+ - In production-like conditions
25
+
26
+ 5. **The fix is stable**
27
+ - Works consistently, not intermittently
28
+ - Not just "worked once" but "works reliably"
29
+
30
+ **Anything less than this is not verified.**
31
+ </definition>
32
+
33
+ <examples>
34
+ ❌ **Not verified**:
35
+ - "I ran it once and it didn't crash"
36
+ - "It seems to work now"
37
+ - "The error message is gone" (but is the behavior correct?)
38
+ - "Works on my machine"
39
+
40
+ ✅ **Verified**:
41
+ - "I ran the original reproduction steps 20 times - zero failures"
42
+ - "The data now saves correctly and I can retrieve it"
43
+ - "All existing tests pass, plus I added a test for this scenario"
44
+ - "Verified in dev, staging, and production environments"
45
+ </examples>
46
+
47
+
48
+ <pattern name="reproduction_verification">
49
+ **The golden rule**: If you can't reproduce the bug, you can't verify it's fixed.
50
+
51
+ **Process**:
52
+
53
+ 1. **Before fixing**: Document exact steps to reproduce
54
+ ```markdown
55
+ Reproduction steps:
56
+ 1. Login as admin user
57
+ 2. Navigate to /settings
58
+ 3. Click "Export Data" button
59
+ 4. Observe: Error "Cannot read property 'data' of undefined"
60
+ ```
61
+
62
+ 2. **After fixing**: Execute the same steps exactly
63
+ ```markdown
64
+ Verification:
65
+ 1. Login as admin user ✓
66
+ 2. Navigate to /settings ✓
67
+ 3. Click "Export Data" button ✓
68
+ 4. Observe: CSV downloads successfully ✓
69
+ ```
70
+
71
+ 3. **Test edge cases** related to the bug
72
+ ```markdown
73
+ Additional tests:
74
+ - Export with empty data set ✓
75
+ - Export with 1000+ records ✓
76
+ - Export while another request is pending ✓
77
+ ```
78
+
79
+ **If you can't reproduce the original bug**:
80
+ - You don't know if your fix worked
81
+ - Maybe it's still broken
82
+ - Maybe your "fix" did nothing
83
+ - Maybe you fixed a different bug
84
+
85
+ **Solution**: Revert your fix. If the bug comes back, you've verified your fix addressed it.
86
+ </pattern>
87
+
88
+
89
+ <pattern name="regression_testing">
90
+ **The problem**: You fix one thing, break another.
91
+
92
+ **Why it happens**:
93
+ - Your fix changed shared code
94
+ - Your fix had unintended side effects
95
+ - Your fix broke an assumption other code relied on
96
+
97
+ **Protection strategy**:
98
+
99
+ **1. Identify adjacent functionality**
100
+ - What else uses the code you changed?
101
+ - What features depend on this behavior?
102
+ - What workflows include this step?
103
+
104
+ **2. Test each adjacent area**
105
+ - Manually test the happy path
106
+ - Check error handling
107
+ - Verify data integrity
108
+
109
+ **3. Run existing tests**
110
+ - Unit tests for the module
111
+ - Integration tests for the feature
112
+ - End-to-end tests for the workflow
113
+
114
+ <example>
115
+ **Fix**: Changed how user sessions are stored (from memory to database)
116
+
117
+ **Adjacent functionality to verify**:
118
+ - Login still works ✓
119
+ - Logout still works ✓
120
+ - Session timeout still works ✓
121
+ - Concurrent logins are handled correctly ✓
122
+ - Session data persists across server restarts ✓ (new capability)
123
+ - Password reset flow still works ✓
124
+ - OAuth login still works ✓
125
+
126
+ If you only tested "login works", you missed 6 other things that could break.
127
+ </example>
128
+ </pattern>
129
+
130
+
131
+ <pattern name="test_first_debugging">
132
+ **Strategy**: Write a failing test that reproduces the bug, then fix until the test passes.
133
+
134
+ **Benefits**:
135
+ - Proves you can reproduce the bug
136
+ - Provides automatic verification
137
+ - Prevents regression in the future
138
+ - Forces you to understand the bug precisely
139
+
140
+ **Process**:
141
+
142
+ 1. **Write a test that reproduces the bug**
143
+ ```javascript
144
+ test('should handle undefined user data gracefully', () => {
145
+ const result = processUserData(undefined);
146
+ expect(result).toBe(null); // Currently throws error
147
+ });
148
+ ```
149
+
150
+ 2. **Verify the test fails** (confirms it reproduces the bug)
151
+ ```
152
+ ✗ should handle undefined user data gracefully
153
+ TypeError: Cannot read property 'name' of undefined
154
+ ```
155
+
156
+ 3. **Fix the code**
157
+ ```javascript
158
+ function processUserData(user) {
159
+ if (!user) return null; // Add defensive check
160
+ return user.name;
161
+ }
162
+ ```
163
+
164
+ 4. **Verify the test passes**
165
+ ```
166
+ ✓ should handle undefined user data gracefully
167
+ ```
168
+
169
+ 5. **Test is now regression protection**
170
+ - If someone breaks this again, the test will catch it
171
+
172
+ **When to use**:
173
+ - Clear, reproducible bugs
174
+ - Code that has test infrastructure
175
+ - Bugs that could recur
176
+
177
+ **When not to use**:
178
+ - Exploratory debugging (you don't understand the bug yet)
179
+ - Infrastructure issues (can't easily test)
180
+ - One-off data issues
181
+ </pattern>
182
+
183
+
184
+ <pattern name="environment_verification">
185
+ **The trap**: "Works on my machine"
186
+
187
+ **Reality**: Production is different.
188
+
189
+ **Differences to consider**:
190
+
191
+ **Environment variables**:
192
+ - `NODE_ENV=development` vs `NODE_ENV=production`
193
+ - Different API keys
194
+ - Different database connections
195
+ - Different feature flags
196
+
197
+ **Dependencies**:
198
+ - Different package versions (if not locked)
199
+ - Different system libraries
200
+ - Different Node/Python/etc versions
201
+
202
+ **Data**:
203
+ - Volume (100 records locally, 1M in production)
204
+ - Quality (clean test data vs messy real data)
205
+ - Edge cases (nulls, special characters, extreme values)
206
+
207
+ **Network**:
208
+ - Latency (local: 5ms, production: 200ms)
209
+ - Reliability (local: perfect, production: occasional failures)
210
+ - Firewalls, proxies, load balancers
211
+
212
+ **Verification checklist**:
213
+ ```markdown
214
+ - [ ] Works locally (dev environment)
215
+ - [ ] Works in Docker container (mimics production)
216
+ - [ ] Works in staging (production-like)
217
+ - [ ] Works in production (the real test)
218
+ ```
219
+
220
+ <example>
221
+ **Bug**: Batch processing fails in production but works locally
222
+
223
+ **Investigation**:
224
+ - Local: 100 test records, completes in 2 seconds
225
+ - Production: 50,000 records, times out at 30 seconds
226
+
227
+ **The difference**: Volume. Local testing didn't catch it.
228
+
229
+ **Fix verification**:
230
+ - Test locally with 50,000 records
231
+ - Verify performance in staging
232
+ - Monitor first production run
233
+ - Confirm all environments work
234
+ </example>
235
+ </pattern>
236
+
237
+
238
+ <pattern name="stability_testing">
239
+ **The problem**: It worked once, but will it work reliably?
240
+
241
+ **Intermittent bugs are the worst**:
242
+ - Hard to reproduce
243
+ - Hard to verify fixes
244
+ - Easy to declare fixed when they're not
245
+
246
+ **Verification strategies**:
247
+
248
+ **1. Repeated execution**
249
+ ```bash
250
+ for i in {1..100}; do
251
+ npm test -- specific-test.js || echo "Failed on run $i"
252
+ done
253
+ ```
254
+
255
+ If it fails even once, it's not fixed.
256
+
257
+ **2. Stress testing**
258
+ ```javascript
259
+ // Run many instances in parallel
260
+ const promises = Array(50).fill().map(() =>
261
+ processData(testInput)
262
+ );
263
+
264
+ const results = await Promise.all(promises);
265
+ // All results should be correct
266
+ ```
267
+
268
+ **3. Soak testing**
269
+ - Run for extended period (hours, days)
270
+ - Monitor for memory leaks, performance degradation
271
+ - Ensure stability over time
272
+
273
+ **4. Timing variations**
274
+ ```javascript
275
+ // For race conditions, add random delays
276
+ async function testWithRandomTiming() {
277
+ await randomDelay(0, 100);
278
+ triggerAction1();
279
+ await randomDelay(0, 100);
280
+ triggerAction2();
281
+ await randomDelay(0, 100);
282
+ verifyResult();
283
+ }
284
+
285
+ // Run this 1000 times
286
+ ```
287
+
288
+ <example>
289
+ **Bug**: Race condition in file upload
290
+
291
+ **Weak verification**:
292
+ - Upload one file
293
+ - "It worked!"
294
+ - Ship it
295
+
296
+ **Strong verification**:
297
+ - Upload 100 files sequentially: all succeed ✓
298
+ - Upload 20 files in parallel: all succeed ✓
299
+ - Upload while navigating away: handles correctly ✓
300
+ - Upload, cancel, upload again: works ✓
301
+ - Run all tests 50 times: zero failures ✓
302
+
303
+ Now it's verified.
304
+ </example>
305
+ </pattern>
306
+
307
+
308
+ <checklist>
309
+ Copy this checklist when verifying a fix:
310
+
311
+ ```markdown
312
+
313
+ ### Original Issue
314
+ - [ ] Can reproduce the original bug before the fix
315
+ - [ ] Have documented exact reproduction steps
316
+
317
+ ### Fix Validation
318
+ - [ ] Original reproduction steps now work correctly
319
+ - [ ] Can explain WHY the fix works
320
+ - [ ] Fix is minimal and targeted
321
+
322
+ ### Regression Testing
323
+ - [ ] Adjacent feature 1: [name] works
324
+ - [ ] Adjacent feature 2: [name] works
325
+ - [ ] Adjacent feature 3: [name] works
326
+ - [ ] Existing tests pass
327
+ - [ ] Added test to prevent regression
328
+
329
+ ### Environment Testing
330
+ - [ ] Works in development
331
+ - [ ] Works in staging/QA
332
+ - [ ] Works in production
333
+ - [ ] Tested with production-like data volume
334
+
335
+ ### Stability Testing
336
+ - [ ] Tested multiple times (n=__): zero failures
337
+ - [ ] Tested edge cases: [list them]
338
+ - [ ] Tested under load/stress: stable
339
+
340
+ ### Documentation
341
+ - [ ] Code comments explain the fix
342
+ - [ ] Commit message explains the root cause
343
+ - [ ] If needed, updated user-facing docs
344
+
345
+ ### Sign-off
346
+ - [ ] I understand why this bug occurred
347
+ - [ ] I understand why this fix works
348
+ - [ ] I've verified it works in all relevant environments
349
+ - [ ] I've tested for regressions
350
+ - [ ] I'm confident this won't recur
351
+ ```
352
+
353
+ **Do not merge/deploy until all checkboxes are checked.**
354
+ </checklist>
355
+
356
+
357
+ <distrust>
358
+ Your verification might be wrong if:
359
+
360
+ **1. You can't reproduce the original bug anymore**
361
+ - Maybe you forgot how
362
+ - Maybe the environment changed
363
+ - Maybe you're testing the wrong thing
364
+ - **Action**: Document reproduction steps FIRST, before fixing
365
+
366
+ **2. The fix is large or complex**
367
+ - Changed 10 files, modified 200 lines
368
+ - Too many moving parts
369
+ - **Action**: Simplify the fix, then verify each piece
370
+
371
+ **3. You're not sure why it works**
372
+ - "I changed X and the bug went away"
373
+ - But you can't explain the mechanism
374
+ - **Action**: Investigate until you understand, then verify
375
+
376
+ **4. It only works sometimes**
377
+ - "Usually works now"
378
+ - "Seems more stable"
379
+ - **Action**: Not verified. Find and fix the remaining issue
380
+
381
+ **5. You can't test in production-like conditions**
382
+ - Only tested locally
383
+ - Different data, different scale
384
+ - **Action**: Set up staging environment or use production data in dev
385
+
386
+ **Red flag phrases**:
387
+ - "It seems to work"
388
+ - "I think it's fixed"
389
+ - "Looks good to me"
390
+ - "Can't reproduce anymore" (but you never could reliably)
391
+
392
+ **Trust-building phrases**:
393
+ - "I've verified 50 times - zero failures"
394
+ - "All tests pass including new regression test"
395
+ - "Deployed to staging, tested for 3 days, no issues"
396
+ - "Root cause was X, fix addresses X directly, verified by Y"
397
+ </distrust>
398
+
399
+
400
+ <mindset>
401
+ **Assume your fix is wrong until proven otherwise.**
402
+
403
+ This isn't pessimism - it's professionalism.
404
+
405
+ **Questions to ask yourself**:
406
+ - "How could this fix fail?"
407
+ - "What haven't I tested?"
408
+ - "What am I assuming?"
409
+ - "Would this survive production?"
410
+
411
+ **The cost of insufficient verification**:
412
+ - Bug returns in production
413
+ - User frustration
414
+ - Lost trust
415
+ - Emergency debugging sessions
416
+ - Rollbacks
417
+
418
+ **The benefit of thorough verification**:
419
+ - Confidence in deployment
420
+ - Prevention of regressions
421
+ - Trust from team
422
+ - Learning from the investigation
423
+
424
+ **Verification is not optional. It's the most important part of debugging.**
425
+ </mindset>