@caddis/cli 0.0.0 → 0.1.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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +150 -1
  3. package/bundles/antigravity-plugin/agents/code-reviewer.md +47 -0
  4. package/bundles/antigravity-plugin/agents/preflight.md +53 -0
  5. package/bundles/antigravity-plugin/guard_agy.py +338 -0
  6. package/bundles/antigravity-plugin/hooks.json +36 -0
  7. package/bundles/antigravity-plugin/mcp_config.json +8 -0
  8. package/bundles/antigravity-plugin/mcp_ping_server.py +55 -0
  9. package/bundles/antigravity-plugin/plugin.json +5 -0
  10. package/bundles/antigravity-plugin/session_end_agy.py +57 -0
  11. package/bundles/antigravity-plugin/skills/_registry.md +115 -0
  12. package/bundles/antigravity-plugin/skills/add-rules/SKILL.md +45 -0
  13. package/bundles/antigravity-plugin/skills/api-design/SKILL.md +249 -0
  14. package/bundles/antigravity-plugin/skills/backend-development/SKILL.md +305 -0
  15. package/bundles/antigravity-plugin/skills/best-practices/SKILL.md +500 -0
  16. package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +263 -0
  17. package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +326 -0
  18. package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +245 -0
  19. package/bundles/antigravity-plugin/skills/best-practices/references/anti-patterns.md +571 -0
  20. package/bundles/antigravity-plugin/skills/best-practices/references/before-after-examples.md +1114 -0
  21. package/bundles/antigravity-plugin/skills/best-practices/references/best-practices-guide.md +513 -0
  22. package/bundles/antigravity-plugin/skills/best-practices/references/common-workflows.md +692 -0
  23. package/bundles/antigravity-plugin/skills/best-practices/references/prompt-patterns.md +547 -0
  24. package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +57 -0
  25. package/bundles/antigravity-plugin/skills/ci-cd-pipeline/SKILL.md +315 -0
  26. package/bundles/antigravity-plugin/skills/code-documentation/SKILL.md +271 -0
  27. package/bundles/antigravity-plugin/skills/code-review/SKILL.md +122 -0
  28. package/bundles/antigravity-plugin/skills/codebase-audit/SKILL.md +204 -0
  29. package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +157 -0
  30. package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +40 -0
  31. package/bundles/antigravity-plugin/skills/css-architecture/SKILL.md +305 -0
  32. package/bundles/antigravity-plugin/skills/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
  33. package/bundles/antigravity-plugin/skills/database-design/SKILL.md +177 -0
  34. package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +148 -0
  35. package/bundles/antigravity-plugin/skills/db-diagram/scripts/sql_to_graph.py +1212 -0
  36. package/bundles/antigravity-plugin/skills/digress/SKILL.md +61 -0
  37. package/bundles/antigravity-plugin/skills/draw-io/SKILL.md +162 -0
  38. package/bundles/antigravity-plugin/skills/draw-io/references/aws-icons.md +677 -0
  39. package/bundles/antigravity-plugin/skills/draw-io/references/layout-guidelines.md +142 -0
  40. package/bundles/antigravity-plugin/skills/draw-io/references/troubleshooting.md +118 -0
  41. package/bundles/antigravity-plugin/skills/draw-io/references/workflows.md +103 -0
  42. package/bundles/antigravity-plugin/skills/draw-io/scripts/convert-drawio-to-png.sh +25 -0
  43. package/bundles/antigravity-plugin/skills/draw-io/scripts/find_aws_icon.py +79 -0
  44. package/bundles/antigravity-plugin/skills/error-handling/SKILL.md +260 -0
  45. package/bundles/antigravity-plugin/skills/excalidraw-db/SKILL.md +38 -0
  46. package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +300 -0
  47. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +198 -0
  48. package/bundles/antigravity-plugin/skills/frontend-design/SKILL.md +193 -0
  49. package/bundles/antigravity-plugin/skills/frontend-design/references/my-tech-stack.md +127 -0
  50. package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +195 -0
  51. package/bundles/antigravity-plugin/skills/git-commit/SKILL.md +285 -0
  52. package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +577 -0
  53. package/bundles/antigravity-plugin/skills/handoff/SKILL.md +100 -0
  54. package/bundles/antigravity-plugin/skills/implement/SKILL.md +114 -0
  55. package/bundles/antigravity-plugin/skills/javascript-typescript/SKILL.md +142 -0
  56. package/bundles/antigravity-plugin/skills/kb/SKILL.md +60 -0
  57. package/bundles/antigravity-plugin/skills/mermaid-db/SKILL.md +33 -0
  58. package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +236 -0
  59. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
  60. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
  61. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/advanced-features.md +556 -0
  62. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  63. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
  64. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
  65. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
  66. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/flowcharts.md +450 -0
  67. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  68. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/troubleshooting.md +335 -0
  69. package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/workflows.md +418 -0
  70. package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +68 -0
  71. package/bundles/antigravity-plugin/skills/mockup/SKILL.md +242 -0
  72. package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +243 -0
  73. package/bundles/antigravity-plugin/skills/particle-art/references/canvas-utils.ts +171 -0
  74. package/bundles/antigravity-plugin/skills/particle-art/references/dot-field.template.tsx +203 -0
  75. package/bundles/antigravity-plugin/skills/particle-art/references/flow-field.template.tsx +263 -0
  76. package/bundles/antigravity-plugin/skills/particle-art/references/node-shape.template.tsx +261 -0
  77. package/bundles/antigravity-plugin/skills/particle-art/references/shape-sampler.ts +281 -0
  78. package/bundles/antigravity-plugin/skills/particle-art/references/stipple-morph.template.tsx +167 -0
  79. package/bundles/antigravity-plugin/skills/particle-art/references/stipple.template.tsx +175 -0
  80. package/bundles/antigravity-plugin/skills/particle-art/references/trail-ghost.template.tsx +266 -0
  81. package/bundles/antigravity-plugin/skills/particle-art/references/usage-examples.md +320 -0
  82. package/bundles/antigravity-plugin/skills/playwright/API_REFERENCE.md +653 -0
  83. package/bundles/antigravity-plugin/skills/playwright/SKILL.md +454 -0
  84. package/bundles/antigravity-plugin/skills/playwright/lib/helpers.js +441 -0
  85. package/bundles/antigravity-plugin/skills/playwright/package.json +26 -0
  86. package/bundles/antigravity-plugin/skills/playwright/run.js +228 -0
  87. package/bundles/antigravity-plugin/skills/prd/SKILL.md +107 -0
  88. package/bundles/antigravity-plugin/skills/preflight/SKILL.md +435 -0
  89. package/bundles/antigravity-plugin/skills/python/SKILL.md +388 -0
  90. package/bundles/antigravity-plugin/skills/react-best-practices/SKILL.md +269 -0
  91. package/bundles/antigravity-plugin/skills/react-dev/README.md +404 -0
  92. package/bundles/antigravity-plugin/skills/react-dev/SKILL.md +459 -0
  93. package/bundles/antigravity-plugin/skills/react-dev/examples/generic-components.md +579 -0
  94. package/bundles/antigravity-plugin/skills/react-dev/examples/server-components.md +579 -0
  95. package/bundles/antigravity-plugin/skills/react-dev/references/event-handlers.md +574 -0
  96. package/bundles/antigravity-plugin/skills/react-dev/references/hooks.md +456 -0
  97. package/bundles/antigravity-plugin/skills/react-dev/references/react-19-patterns.md +638 -0
  98. package/bundles/antigravity-plugin/skills/react-dev/references/react-router.md +1002 -0
  99. package/bundles/antigravity-plugin/skills/react-dev/references/tanstack-router.md +587 -0
  100. package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +486 -0
  101. package/bundles/antigravity-plugin/skills/resume/SKILL.md +36 -0
  102. package/bundles/antigravity-plugin/skills/security-review/SKILL.md +196 -0
  103. package/bundles/antigravity-plugin/skills/setup-project-ai/SKILL.md +61 -0
  104. package/bundles/antigravity-plugin/skills/ship/SKILL.md +107 -0
  105. package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +103 -0
  106. package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +102 -0
  107. package/bundles/antigravity-plugin/skills/skill-creator/LICENSE.txt +202 -0
  108. package/bundles/antigravity-plugin/skills/skill-creator/SKILL.md +491 -0
  109. package/bundles/antigravity-plugin/skills/skill-creator/agents/analyzer.md +274 -0
  110. package/bundles/antigravity-plugin/skills/skill-creator/agents/comparator.md +202 -0
  111. package/bundles/antigravity-plugin/skills/skill-creator/agents/grader.md +223 -0
  112. package/bundles/antigravity-plugin/skills/skill-creator/assets/eval_review.html +146 -0
  113. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  114. package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  115. package/bundles/antigravity-plugin/skills/skill-creator/references/schemas.md +430 -0
  116. package/bundles/antigravity-plugin/skills/skill-creator/scripts/__init__.py +0 -0
  117. package/bundles/antigravity-plugin/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  118. package/bundles/antigravity-plugin/skills/skill-creator/scripts/generate_report.py +326 -0
  119. package/bundles/antigravity-plugin/skills/skill-creator/scripts/improve_description.py +247 -0
  120. package/bundles/antigravity-plugin/skills/skill-creator/scripts/package_skill.py +136 -0
  121. package/bundles/antigravity-plugin/skills/skill-creator/scripts/quick_validate.py +103 -0
  122. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_eval.py +310 -0
  123. package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_loop.py +328 -0
  124. package/bundles/antigravity-plugin/skills/skill-creator/scripts/utils.py +47 -0
  125. package/bundles/antigravity-plugin/skills/sql/SKILL.md +321 -0
  126. package/bundles/antigravity-plugin/skills/tdd/SKILL.md +37 -0
  127. package/bundles/antigravity-plugin/skills/tdd-workflow/SKILL.md +188 -0
  128. package/bundles/antigravity-plugin/skills/technical-writing/SKILL.md +286 -0
  129. package/bundles/antigravity-plugin/skills/test-strategy/SKILL.md +155 -0
  130. package/bundles/antigravity-plugin/skills/ui-brief/SKILL.md +84 -0
  131. package/bundles/antigravity-plugin/skills/ui-review/SKILL.md +176 -0
  132. package/bundles/antigravity-plugin/skills/ui-review/references/framework-fixes.md +471 -0
  133. package/bundles/antigravity-plugin/skills/ui-review/references/visual-checklist.md +236 -0
  134. package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +77 -0
  135. package/bundles/antigravity-plugin/skills/use-model/SKILL.md +64 -0
  136. package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +217 -0
  137. package/bundles/antigravity-plugin/skills/version/SKILL.md +18 -0
  138. package/bundles/antigravity-plugin/skills/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
  139. package/bundles/antigravity-plugin/skills/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
  140. package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +732 -0
  141. package/bundles/antigravity-plugin/skills/webapp-testing/LICENSE.txt +202 -0
  142. package/bundles/antigravity-plugin/skills/webapp-testing/SKILL.md +97 -0
  143. package/bundles/antigravity-plugin/skills/webapp-testing/examples/console_logging.py +35 -0
  144. package/bundles/antigravity-plugin/skills/webapp-testing/examples/element_discovery.py +40 -0
  145. package/bundles/antigravity-plugin/skills/webapp-testing/examples/static_html_automation.py +33 -0
  146. package/bundles/antigravity-plugin/skills/webapp-testing/scripts/with_server.py +106 -0
  147. package/bundles/antigravity-plugin/skills/windows-deployment/SKILL.md +880 -0
  148. package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +384 -0
  149. package/bundles/antigravity-plugin/statusline-command-agy.sh +91 -0
  150. package/bundles/antigravity-plugin/warm_start_agy.py +149 -0
  151. package/bundles/manifest.json +6 -0
  152. package/dist/cli.js +5363 -0
  153. package/package.json +61 -4
@@ -0,0 +1,571 @@
1
+ # Prompt Anti-Patterns to Avoid
2
+
3
+ This document catalogs common prompt mistakes and how to fix them. When transforming prompts, actively look for and correct these anti-patterns.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Vagueness Anti-Patterns](#vagueness-anti-patterns)
8
+ 2. [Missing Context Anti-Patterns](#missing-context-anti-patterns)
9
+ 3. [Verification Anti-Patterns](#verification-anti-patterns)
10
+ 4. [Scope Anti-Patterns](#scope-anti-patterns)
11
+ 5. [Instruction Anti-Patterns](#instruction-anti-patterns)
12
+ 6. [Session Anti-Patterns](#session-anti-patterns)
13
+
14
+ ---
15
+
16
+ ## Vagueness Anti-Patterns
17
+
18
+ ### Anti-Pattern: The Generic Request
19
+
20
+ **BAD:**
21
+ ```
22
+ fix the bug
23
+ ```
24
+
25
+ **WHY IT FAILS:** No information about what bug, where it is, what symptoms, or how to verify it's fixed.
26
+
27
+ **GOOD:**
28
+ ```
29
+ users report login fails after session timeout. check the auth flow in src/auth/, especially token refresh. write a failing test that reproduces the issue, then fix it.
30
+ ```
31
+
32
+ ---
33
+
34
+ ### Anti-Pattern: The Ambiguous Improvement
35
+
36
+ **BAD:**
37
+ ```
38
+ make the code better
39
+ ```
40
+
41
+ **WHY IT FAILS:** "Better" is subjective. Better performance? Readability? Type safety? Fewer lines?
42
+
43
+ **GOOD:**
44
+ ```
45
+ refactor utils.js to use ES2024 features while maintaining the same behavior. specifically: convert callbacks to async/await, use optional chaining. run the test suite after each change.
46
+ ```
47
+
48
+ ---
49
+
50
+ ### Anti-Pattern: The Undefined Problem
51
+
52
+ **BAD:**
53
+ ```
54
+ something's wrong with the API
55
+ ```
56
+
57
+ **WHY IT FAILS:** No error message, no endpoint, no reproduction steps.
58
+
59
+ **GOOD:**
60
+ ```
61
+ the GET /api/users endpoint returns 500 with this error: [paste error]. I can reproduce by calling the endpoint without an auth header. check src/api/users.ts line 45 where the request is handled.
62
+ ```
63
+
64
+ ---
65
+
66
+ ### Anti-Pattern: The Wishful Feature
67
+
68
+ **BAD:**
69
+ ```
70
+ add a nice login page
71
+ ```
72
+
73
+ **WHY IT FAILS:** "Nice" is undefined. No design reference, no requirements, no patterns to follow.
74
+
75
+ **GOOD:**
76
+ ```
77
+ create a login page with email and password fields. follow the form patterns in @src/components/SignupForm.tsx. include: validation feedback, remember me checkbox, forgot password link. test at 320px and 1024px widths.
78
+ ```
79
+
80
+ ---
81
+
82
+ ### Anti-Pattern: The Partial Error
83
+
84
+ **BAD:**
85
+ ```
86
+ getting an error
87
+ ```
88
+
89
+ **WHY IT FAILS:** Which error? What file? What line? What action triggered it?
90
+
91
+ **GOOD:**
92
+ ```
93
+ getting "TypeError: Cannot read property 'map' of undefined" at src/components/UserList.tsx:45 when loading the users page without being logged in. check the data fetching and add proper null handling.
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Missing Context Anti-Patterns
99
+
100
+ ### Anti-Pattern: The Locationless Request
101
+
102
+ **BAD:**
103
+ ```
104
+ update the validation logic
105
+ ```
106
+
107
+ **WHY IT FAILS:** Validation is everywhere. Which validation? Which file? Which form?
108
+
109
+ **GOOD:**
110
+ ```
111
+ update the email validation in @src/utils/validators.ts to also check for common disposable email domains. the domain list is in @src/config/blocked-domains.json.
112
+ ```
113
+
114
+ ---
115
+
116
+ ### Anti-Pattern: The Pattern-Free Feature
117
+
118
+ **BAD:**
119
+ ```
120
+ add a new component
121
+ ```
122
+
123
+ **WHY IT FAILS:** No reference to existing patterns, no example of similar components.
124
+
125
+ **GOOD:**
126
+ ```
127
+ add a ProductCard component following the patterns in @src/components/UserCard.tsx. include: image, title, price, and "Add to cart" button. use the same CSS modules approach.
128
+ ```
129
+
130
+ ---
131
+
132
+ ### Anti-Pattern: The Orphan Request
133
+
134
+ **BAD:**
135
+ ```
136
+ implement user authentication
137
+ ```
138
+
139
+ **WHY IT FAILS:** No context about existing auth, no framework info, no session strategy preference.
140
+
141
+ **GOOD:**
142
+ ```
143
+ read src/auth/ to understand current session handling. add Google OAuth following the existing patterns. use the session strategy already in place. test the complete flow from login to protected page access.
144
+ ```
145
+
146
+ ---
147
+
148
+ ### Anti-Pattern: The Technology Vacuum
149
+
150
+ **BAD:**
151
+ ```
152
+ add a database
153
+ ```
154
+
155
+ **WHY IT FAILS:** Which database? What schema? What connection library? What patterns?
156
+
157
+ **GOOD:**
158
+ ```
159
+ add PostgreSQL using the existing Prisma setup. create a new Product model with: id, name, price, description, createdAt. follow the User model in @prisma/schema.prisma for patterns. add a migration and seed some test data.
160
+ ```
161
+
162
+ ---
163
+
164
+ ### Anti-Pattern: The Assumed Knowledge
165
+
166
+ **BAD:**
167
+ ```
168
+ do the same thing for products
169
+ ```
170
+
171
+ **WHY IT FAILS:** Assumes Claude remembers what was done and where.
172
+
173
+ **GOOD:**
174
+ ```
175
+ create a ProductRepository following the same pattern as UserRepository in @src/repositories/UserRepository.ts. include methods for: findAll, findById, create, update, delete. use the same database connection approach.
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Verification Anti-Patterns
181
+
182
+ ### Anti-Pattern: The Trust-and-Ship
183
+
184
+ **BAD:**
185
+ ```
186
+ implement email validation
187
+ ```
188
+
189
+ **WHY IT FAILS:** No way to verify correctness. Plausible-looking code might not handle edge cases.
190
+
191
+ **GOOD:**
192
+ ```
193
+ implement validateEmail function. test cases: [email protected] → true, invalid → false, [email protected] → false, empty string → false. run the tests after implementing.
194
+ ```
195
+
196
+ ---
197
+
198
+ ### Anti-Pattern: The Visual Guess
199
+
200
+ **BAD:**
201
+ ```
202
+ make the dashboard look good
203
+ ```
204
+
205
+ **WHY IT FAILS:** No design reference to compare against.
206
+
207
+ **GOOD:**
208
+ ```
209
+ [paste screenshot] implement this design. take a screenshot of the result and compare to the original. list differences and fix them.
210
+ ```
211
+
212
+ ---
213
+
214
+ ### Anti-Pattern: The Symptom Suppression
215
+
216
+ **BAD:**
217
+ ```
218
+ make the error go away
219
+ ```
220
+
221
+ **WHY IT FAILS:** Encourages suppressing errors rather than fixing root causes.
222
+
223
+ **GOOD:**
224
+ ```
225
+ the build fails with this error: [paste error]. fix the root cause, don't suppress the error with @ts-ignore. run the build to verify it succeeds.
226
+ ```
227
+
228
+ ---
229
+
230
+ ### Anti-Pattern: The Unchecked Refactor
231
+
232
+ **BAD:**
233
+ ```
234
+ refactor the utilities
235
+ ```
236
+
237
+ **WHY IT FAILS:** Refactoring without verification often introduces regressions.
238
+
239
+ **GOOD:**
240
+ ```
241
+ refactor utils.js to use modern JavaScript features. maintain the same behavior. run the existing test suite after each change to ensure nothing breaks. add tests for any untested functions before refactoring them.
242
+ ```
243
+
244
+ ---
245
+
246
+ ### Anti-Pattern: The Deployment Prayer
247
+
248
+ **BAD:**
249
+ ```
250
+ should be ready to deploy
251
+ ```
252
+
253
+ **WHY IT FAILS:** No verification steps. "Should be" isn't certainty.
254
+
255
+ **GOOD:**
256
+ ```
257
+ verify the changes are ready for deployment:
258
+ 1. run the full test suite
259
+ 2. run the linter
260
+ 3. run the type checker
261
+ 4. build for production
262
+ 5. test the build locally
263
+ list any issues found.
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Scope Anti-Patterns
269
+
270
+ ### Anti-Pattern: The Kitchen Sink
271
+
272
+ **BAD:**
273
+ ```
274
+ fix the login bug, also update the styling, and add some tests, and maybe refactor the auth module
275
+ ```
276
+
277
+ **WHY IT FAILS:** Too many unrelated tasks mixed together. Context gets polluted.
278
+
279
+ **GOOD:**
280
+ Split into separate prompts, use `/clear` between:
281
+ 1. "fix the login bug in src/auth/. write a failing test first, then fix it."
282
+ 2. (new session) "update the login page styling to match this mockup: [paste]"
283
+ 3. (new session) "add tests for the auth module covering: login, logout, token refresh"
284
+
285
+ ---
286
+
287
+ ### Anti-Pattern: The Infinite Scope
288
+
289
+ **BAD:**
290
+ ```
291
+ add tests for everything
292
+ ```
293
+
294
+ **WHY IT FAILS:** Unscoped. Will read hundreds of files filling context.
295
+
296
+ **GOOD:**
297
+ ```
298
+ add tests for @src/services/PaymentService.ts covering:
299
+ - calculateTotal with various inputs
300
+ - validateCard (valid/expired/invalid)
301
+ - processPayment (success/failure)
302
+ target 80% coverage for this file.
303
+ ```
304
+
305
+ ---
306
+
307
+ ### Anti-Pattern: The Implied Requirements
308
+
309
+ **BAD:**
310
+ ```
311
+ add user management
312
+ ```
313
+
314
+ **WHY IT FAILS:** What does "user management" include? List users? Edit? Delete? Roles?
315
+
316
+ **GOOD:**
317
+ ```
318
+ add user management to the admin panel:
319
+ - list users with pagination (20 per page)
320
+ - view user details
321
+ - edit user email and role
322
+ - soft-delete user (no hard delete)
323
+ follow the admin patterns in @src/admin/ProductManagement.tsx
324
+ ```
325
+
326
+ ---
327
+
328
+ ### Anti-Pattern: The Unbounded Investigation
329
+
330
+ **BAD:**
331
+ ```
332
+ figure out why the app is slow
333
+ ```
334
+
335
+ **WHY IT FAILS:** Could lead to reading the entire codebase.
336
+
337
+ **GOOD:**
338
+ ```
339
+ the product listing page takes 5+ seconds to load. profile using Chrome DevTools:
340
+ 1. identify the slowest network requests
341
+ 2. check for blocking resources
342
+ 3. look for long JavaScript execution
343
+ report the top 3 bottlenecks with suggested fixes.
344
+ ```
345
+
346
+ ---
347
+
348
+ ### Anti-Pattern: The Feature Creep
349
+
350
+ **BAD:**
351
+ ```
352
+ add a search feature with autocomplete and fuzzy matching and recent searches and trending suggestions
353
+ ```
354
+
355
+ **WHY IT FAILS:** Combines multiple features. Should be phased.
356
+
357
+ **GOOD:**
358
+ Start with MVP:
359
+ ```
360
+ add basic search to the products page:
361
+ - text input with search button
362
+ - filter products by name (case-insensitive contains)
363
+ - show "no results" when empty
364
+ follow the existing input patterns in @src/components/forms/
365
+ ```
366
+ Then iterate in follow-up prompts.
367
+
368
+ ---
369
+
370
+ ## Instruction Anti-Patterns
371
+
372
+ ### Anti-Pattern: The Dictation
373
+
374
+ **BAD:**
375
+ ```
376
+ open src/utils.js, go to line 45, change the if statement to check for null, then save the file, then open tests/utils.test.js and add a test
377
+ ```
378
+
379
+ **WHY IT FAILS:** Micromanaging Claude instead of delegating.
380
+
381
+ **GOOD:**
382
+ ```
383
+ update the getUserById function in src/utils.js to handle null user IDs gracefully. add a test for the null case. run the tests after.
384
+ ```
385
+
386
+ ---
387
+
388
+ ### Anti-Pattern: The Contradictory Instructions
389
+
390
+ **BAD:**
391
+ ```
392
+ add comprehensive tests but keep it simple and quick
393
+ ```
394
+
395
+ **WHY IT FAILS:** Contradictory. Comprehensive takes time. Quick isn't comprehensive.
396
+
397
+ **GOOD:**
398
+ Choose one:
399
+ - "add tests covering the critical paths: login, checkout, account creation"
400
+ - "add comprehensive tests for the payment module including all edge cases"
401
+
402
+ ---
403
+
404
+ ### Anti-Pattern: The Unsaid Constraint
405
+
406
+ **BAD:**
407
+ ```
408
+ add a date picker
409
+ ```
410
+ (User actually wanted no external dependencies, but didn't say so)
411
+
412
+ **WHY IT FAILS:** Claude might add a library when user wanted vanilla implementation.
413
+
414
+ **GOOD:**
415
+ ```
416
+ add a date picker to the form. build from scratch without external libraries. use only the utilities already in the codebase. follow the existing form input patterns.
417
+ ```
418
+
419
+ ---
420
+
421
+ ### Anti-Pattern: The Vague Rejection
422
+
423
+ **BAD:**
424
+ ```
425
+ that's not quite right
426
+ ```
427
+
428
+ **WHY IT FAILS:** No specific feedback about what's wrong or what's expected.
429
+
430
+ **GOOD:**
431
+ ```
432
+ the date format should be MM/DD/YYYY not YYYY-MM-DD. also the validation should reject dates in the past. update the function and its tests.
433
+ ```
434
+
435
+ ---
436
+
437
+ ### Anti-Pattern: The Suppressed Error
438
+
439
+ **BAD:**
440
+ ```
441
+ add a try/catch to stop the error
442
+ ```
443
+
444
+ **WHY IT FAILS:** Encourages hiding problems instead of fixing them.
445
+
446
+ **GOOD:**
447
+ ```
448
+ the function throws when receiving null. add proper null validation at the start of the function. if null, return a sensible default or throw a descriptive error. add a test for the null case.
449
+ ```
450
+
451
+ ---
452
+
453
+ ## Session Anti-Patterns
454
+
455
+ ### Anti-Pattern: The Eternal Session
456
+
457
+ **BAD:**
458
+ Working on multiple unrelated tasks without clearing:
459
+ ```
460
+ > fix the login bug
461
+ [work happens]
462
+ > also add the search feature
463
+ [more work]
464
+ > and refactor the utilities
465
+ [context is now full of three unrelated things]
466
+ ```
467
+
468
+ **WHY IT FAILS:** Context fills with irrelevant information from previous tasks.
469
+
470
+ **GOOD:**
471
+ ```
472
+ > fix the login bug...
473
+ [work completes]
474
+ > /clear
475
+ > add the search feature...
476
+ ```
477
+
478
+ ---
479
+
480
+ ### Anti-Pattern: The Correction Spiral
481
+
482
+ **BAD:**
483
+ ```
484
+ > do X
485
+ > no, I meant Y
486
+ > that's not right either, try Z
487
+ > still wrong, maybe A?
488
+ > let me explain again...
489
+ ```
490
+
491
+ **WHY IT FAILS:** Context polluted with failed approaches. Claude gets confused.
492
+
493
+ **GOOD:**
494
+ After 2 failed corrections, `/clear` and write a better initial prompt:
495
+ ```
496
+ > /clear
497
+ > implement [clear description with specific requirements and verification]. follow patterns in @[similar code].
498
+ ```
499
+
500
+ ---
501
+
502
+ ### Anti-Pattern: The Overstuffed CLAUDE.md
503
+
504
+ **BAD:**
505
+ A 2000-line CLAUDE.md with every possible instruction.
506
+
507
+ **WHY IT FAILS:** Claude ignores important rules lost in the noise.
508
+
509
+ **GOOD:**
510
+ Keep CLAUDE.md concise:
511
+ - Commands Claude can't guess
512
+ - Style rules that differ from defaults
513
+ - Critical project-specific conventions
514
+ Move details to linked documents or skills.
515
+
516
+ ---
517
+
518
+ ### Anti-Pattern: The Context Hog
519
+
520
+ **BAD:**
521
+ ```
522
+ read all the files in src/ and then tell me about the architecture
523
+ ```
524
+
525
+ **WHY IT FAILS:** Reads entire codebase into context, leaving no room for actual work.
526
+
527
+ **GOOD:**
528
+ ```
529
+ read the main entry point and top-level directories to understand the architecture. don't read every file - just enough to explain the main patterns.
530
+ ```
531
+ Or use subagents:
532
+ ```
533
+ use a subagent to investigate the codebase architecture and report a summary.
534
+ ```
535
+
536
+ ---
537
+
538
+ ### Anti-Pattern: The Lost History
539
+
540
+ **BAD:**
541
+ ```
542
+ do what we discussed earlier
543
+ ```
544
+
545
+ **WHY IT FAILS:** After compaction, earlier discussion might be summarized or lost.
546
+
547
+ **GOOD:**
548
+ Be explicit about what was decided:
549
+ ```
550
+ implement the user notification system using WebSocket as we decided. the spec is in @NOTIFICATIONS_SPEC.md. start with the backend WebSocket handler.
551
+ ```
552
+ Or use ledger files to track state across sessions.
553
+
554
+ ---
555
+
556
+ ## Summary: Quick Fix Reference
557
+
558
+ | Anti-Pattern | Quick Fix |
559
+ |--------------|-----------|
560
+ | Generic request | Add symptom + location + verification |
561
+ | Ambiguous improvement | Specify exact changes |
562
+ | Locationless request | Add file paths with `@` |
563
+ | Pattern-free feature | Reference similar existing code |
564
+ | Trust-and-ship | Add test cases with expected outputs |
565
+ | Visual guess | Paste screenshot for comparison |
566
+ | Kitchen sink | Split tasks, `/clear` between |
567
+ | Infinite scope | Bound to specific files/functions |
568
+ | Dictation | Delegate outcome, not steps |
569
+ | Vague rejection | Specify what's wrong and expected |
570
+ | Eternal session | `/clear` between unrelated tasks |
571
+ | Correction spiral | After 2 fails, `/clear` + better prompt |