@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,547 @@
1
+ # Prompt Transformation Patterns
2
+
3
+ This document contains reusable templates and patterns for transforming prompts. Use these as building blocks when optimizing user prompts.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Core Pattern Templates](#core-pattern-templates)
8
+ 2. [Verification Patterns](#verification-patterns)
9
+ 3. [Context Patterns](#context-patterns)
10
+ 4. [Scoping Patterns](#scoping-patterns)
11
+ 5. [Phasing Patterns](#phasing-patterns)
12
+ 6. [Constraint Patterns](#constraint-patterns)
13
+ 7. [Investigation Patterns](#investigation-patterns)
14
+
15
+ ---
16
+
17
+ ## Core Pattern Templates
18
+
19
+ ### The Complete Prompt Template
20
+
21
+ ```
22
+ [WHAT] - Clear description of what to do
23
+ [WHERE] - Specific files/locations involved
24
+ [HOW] - Constraints, patterns to follow, approaches to use/avoid
25
+ [VERIFY] - How to confirm success (tests, commands, visual check)
26
+ ```
27
+
28
+ **Example:**
29
+ ```
30
+ Implement user email verification [WHAT]
31
+ in src/auth/verification.ts [WHERE]
32
+ following the existing auth patterns in @src/auth/login.ts, without external libraries [HOW]
33
+ run the auth test suite and verify a test user can complete the flow [VERIFY]
34
+ ```
35
+
36
+ ---
37
+
38
+ ### The Bug Fix Template
39
+
40
+ ```
41
+ [SYMPTOM] - What users experience
42
+ [LOCATION] - Where to look
43
+ [REPRODUCE] - How to trigger the bug (if known)
44
+ [FIX APPROACH] - Suggested investigation/fix
45
+ [VERIFY] - How to confirm the fix works
46
+ ```
47
+
48
+ **Example:**
49
+ ```
50
+ Users see "undefined" instead of their username after login [SYMPTOM]
51
+ Check the user context provider in src/context/UserContext.tsx and the login handler in src/api/auth.ts [LOCATION]
52
+ Happens when logging in after session expires [REPRODUCE]
53
+ Write a failing test for the expired session case, then fix the null handling [FIX APPROACH]
54
+ Run the auth test suite and manually verify the login flow [VERIFY]
55
+ ```
56
+
57
+ ---
58
+
59
+ ### The Feature Template
60
+
61
+ ```
62
+ [GOAL] - What the feature should do
63
+ [CONTEXT] - Existing code to reference
64
+ [REQUIREMENTS] - Specific behaviors/acceptance criteria
65
+ [CONSTRAINTS] - What to avoid or limitations
66
+ [VERIFY] - How to test the feature
67
+ ```
68
+
69
+ **Example:**
70
+ ```
71
+ Add a "remember me" option to the login form [GOAL]
72
+ Follow the existing form patterns in @src/components/LoginForm.tsx [CONTEXT]
73
+ Requirements:
74
+ - Checkbox below password field
75
+ - If checked, extend session to 30 days
76
+ - Store preference in localStorage
77
+ - Default to unchecked [REQUIREMENTS]
78
+ No external libraries, use existing cookie utilities [CONSTRAINTS]
79
+ Add tests for both checked and unchecked states, verify session duration in DevTools [VERIFY]
80
+ ```
81
+
82
+ ---
83
+
84
+ ### The Refactor Template
85
+
86
+ ```
87
+ [TARGET] - What to refactor
88
+ [GOAL] - Why/what improvement
89
+ [APPROACH] - Specific changes to make
90
+ [PRESERVE] - What must stay the same
91
+ [VERIFY] - How to ensure nothing broke
92
+ ```
93
+
94
+ **Example:**
95
+ ```
96
+ Refactor the OrderProcessor class in src/services/OrderProcessor.ts [TARGET]
97
+ Convert from class-based to functional approach for better testability [GOAL]
98
+ - Extract pure functions for calculations
99
+ - Use dependency injection for services
100
+ - Convert methods to exported functions [APPROACH]
101
+ All existing tests must continue to pass, API signatures unchanged [PRESERVE]
102
+ Run the full test suite after each change, check coverage remains above 80% [VERIFY]
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Verification Patterns
108
+
109
+ ### Test Case Pattern
110
+
111
+ ```
112
+ [action]. test cases:
113
+ - [input1] → [expected output1]
114
+ - [input2] → [expected output2]
115
+ - [edge case] → [expected handling]
116
+ run the tests after implementing.
117
+ ```
118
+
119
+ **Example:**
120
+ ```
121
+ write a slugify function. test cases:
122
+ - "Hello World" → "hello-world"
123
+ - "Already-Slugged" → "already-slugged"
124
+ - "Multiple Spaces" → "multiple-spaces"
125
+ - "" → ""
126
+ - "Special $#@ Chars!" → "special-chars"
127
+ run the tests after implementing.
128
+ ```
129
+
130
+ ---
131
+
132
+ ### Visual Verification Pattern
133
+
134
+ ```
135
+ [paste screenshot/mockup]
136
+ implement this design.
137
+ take a screenshot of the result and compare it to the original.
138
+ list any differences and fix them.
139
+ verify at [breakpoints] widths.
140
+ ```
141
+
142
+ **Example:**
143
+ ```
144
+ [paste mockup]
145
+ implement this card design for the product listing.
146
+ take a screenshot of the result and compare it to the mockup.
147
+ list any differences and fix them.
148
+ verify at 320px, 768px, and 1200px widths.
149
+ ```
150
+
151
+ ---
152
+
153
+ ### Build Verification Pattern
154
+
155
+ ```
156
+ [describe problem/change].
157
+ [investigation/fix approach].
158
+ run [build command] to verify success.
159
+ address the root cause, don't suppress errors.
160
+ ```
161
+
162
+ **Example:**
163
+ ```
164
+ the TypeScript build fails with "Property 'user' does not exist on type 'Session'".
165
+ add the user property to the Session interface in src/types/auth.ts.
166
+ run `npm run build` to verify success.
167
+ address the root cause, don't suppress errors with @ts-ignore.
168
+ ```
169
+
170
+ ---
171
+
172
+ ### Regression Verification Pattern
173
+
174
+ ```
175
+ [make change].
176
+ run the existing test suite after each change.
177
+ if any tests fail, investigate why before proceeding.
178
+ [final verification step].
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Context Patterns
184
+
185
+ ### File Reference Pattern
186
+
187
+ ```
188
+ look at @[file path] to understand [what].
189
+ follow the same pattern to [action].
190
+ ```
191
+
192
+ **Example:**
193
+ ```
194
+ look at @src/components/UserCard.tsx to understand the card component pattern.
195
+ follow the same pattern to create a ProductCard component.
196
+ ```
197
+
198
+ ---
199
+
200
+ ### Git History Pattern
201
+
202
+ ```
203
+ look through [file/module]'s git history and [action]:
204
+ - when was it [created/changed]?
205
+ - what were the major changes and why?
206
+ - are there related issues or PRs?
207
+ summarize [specific aspect].
208
+ ```
209
+
210
+ ---
211
+
212
+ ### Codebase Search Pattern
213
+
214
+ ```
215
+ search the codebase for [pattern/usage].
216
+ identify all places where [condition].
217
+ [action based on findings].
218
+ ```
219
+
220
+ **Example:**
221
+ ```
222
+ search the codebase for uses of the deprecated `oldApiCall` function.
223
+ identify all places where it's imported or called.
224
+ update each usage to use `newApiCall` instead, following the migration guide in @docs/api-migration.md.
225
+ ```
226
+
227
+ ---
228
+
229
+ ### Pattern Discovery Pattern
230
+
231
+ ```
232
+ look at how [similar feature] is implemented in [location].
233
+ understand the patterns used for [specific aspects].
234
+ follow these patterns to implement [new feature].
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Scoping Patterns
240
+
241
+ ### Single Responsibility Pattern
242
+
243
+ ```
244
+ [action] for [specific case only].
245
+ do not [out of scope action].
246
+ [verify within scope].
247
+ ```
248
+
249
+ **Example:**
250
+ ```
251
+ add validation for the email field only.
252
+ do not change other form fields or validation logic.
253
+ test email validation with valid, invalid, and edge case inputs.
254
+ ```
255
+
256
+ ---
257
+
258
+ ### Edge Case Specification Pattern
259
+
260
+ ```
261
+ [action] covering these cases:
262
+ - [normal case]
263
+ - [edge case 1]
264
+ - [edge case 2]
265
+ - [error case]
266
+ [verify each case].
267
+ ```
268
+
269
+ **Example:**
270
+ ```
271
+ implement the calculateDiscount function covering these cases:
272
+ - standard percentage discount (10% off $100 = $90)
273
+ - discount exceeds price (cap at $0, no negative)
274
+ - zero quantity (return 0)
275
+ - invalid discount code (throw DiscountError)
276
+ test each case explicitly.
277
+ ```
278
+
279
+ ---
280
+
281
+ ### Exclusion Pattern
282
+
283
+ ```
284
+ [action].
285
+ specifically:
286
+ - do [included action 1]
287
+ - do [included action 2]
288
+ - do NOT [excluded action]
289
+ - avoid [constraint]
290
+ ```
291
+
292
+ **Example:**
293
+ ```
294
+ refactor the utility functions in src/utils/.
295
+ specifically:
296
+ - do convert to TypeScript
297
+ - do add JSDoc comments
298
+ - do NOT change function signatures
299
+ - avoid adding new dependencies
300
+ ```
301
+
302
+ ---
303
+
304
+ ## Phasing Patterns
305
+
306
+ ### Explore-Plan-Implement Pattern
307
+
308
+ ```
309
+ PHASE 1 - EXPLORE:
310
+ read [files/areas] and understand [aspects].
311
+
312
+ PHASE 2 - PLAN:
313
+ create a plan for [implementation].
314
+ write the plan to [location] for review.
315
+
316
+ PHASE 3 - IMPLEMENT (after approval):
317
+ implement following the plan.
318
+ [specific steps].
319
+
320
+ PHASE 4 - VERIFY:
321
+ [verification steps].
322
+ ```
323
+
324
+ ---
325
+
326
+ ### Incremental Change Pattern
327
+
328
+ ```
329
+ make changes incrementally:
330
+ 1. [first change] - run tests
331
+ 2. [second change] - run tests
332
+ 3. [third change] - run tests
333
+ if any step fails, investigate before proceeding.
334
+ ```
335
+
336
+ ---
337
+
338
+ ### Investigation-First Pattern
339
+
340
+ ```
341
+ before making changes:
342
+ 1. [gather information]
343
+ 2. [analyze findings]
344
+ 3. [propose approach]
345
+ then, with understanding:
346
+ 4. [implement]
347
+ 5. [verify]
348
+ ```
349
+
350
+ ---
351
+
352
+ ### Parallel Workstream Pattern
353
+
354
+ ```
355
+ this task has independent parts that can be done in parallel:
356
+
357
+ WORKSTREAM A:
358
+ - [task A1]
359
+ - [task A2]
360
+
361
+ WORKSTREAM B:
362
+ - [task B1]
363
+ - [task B2]
364
+
365
+ after both complete:
366
+ - [integration step]
367
+ - [final verification]
368
+ ```
369
+
370
+ ---
371
+
372
+ ## Constraint Patterns
373
+
374
+ ### Dependency Constraint Pattern
375
+
376
+ ```
377
+ [action].
378
+ do not add new dependencies.
379
+ use only libraries already in package.json.
380
+ build from scratch if needed.
381
+ ```
382
+
383
+ ---
384
+
385
+ ### Compatibility Constraint Pattern
386
+
387
+ ```
388
+ [action].
389
+ maintain backward compatibility:
390
+ - existing API signatures must not change
391
+ - existing tests must continue to pass
392
+ - deprecated methods should log warnings but still work
393
+ ```
394
+
395
+ ---
396
+
397
+ ### Performance Constraint Pattern
398
+
399
+ ```
400
+ [action].
401
+ performance requirements:
402
+ - response time under [X]ms for [operation]
403
+ - memory usage under [X]MB
404
+ - support [X] concurrent [operations]
405
+ measure before and after, document improvements.
406
+ ```
407
+
408
+ ---
409
+
410
+ ### Style Constraint Pattern
411
+
412
+ ```
413
+ [action].
414
+ follow existing code style:
415
+ - match patterns in @[similar file]
416
+ - use project's naming conventions
417
+ - follow the linter configuration
418
+ run `npm run lint` before committing.
419
+ ```
420
+
421
+ ---
422
+
423
+ ## Investigation Patterns
424
+
425
+ ### Debugging Investigation Pattern
426
+
427
+ ```
428
+ [symptom description].
429
+
430
+ INVESTIGATE:
431
+ 1. check [likely location 1]
432
+ 2. check [likely location 2]
433
+ 3. add logging to trace [flow]
434
+
435
+ IDENTIFY:
436
+ - what is the actual vs expected behavior?
437
+ - when did this start happening?
438
+ - what changed recently?
439
+
440
+ FIX:
441
+ - write a failing test first
442
+ - implement the fix
443
+ - verify the test passes
444
+ ```
445
+
446
+ ---
447
+
448
+ ### Performance Investigation Pattern
449
+
450
+ ```
451
+ [performance symptom].
452
+
453
+ PROFILE:
454
+ 1. run [profiling tool/command]
455
+ 2. identify bottlenecks
456
+ 3. measure baseline metrics
457
+
458
+ ANALYZE:
459
+ - what operations are slow?
460
+ - what resources are constrained?
461
+ - where are the quick wins?
462
+
463
+ OPTIMIZE:
464
+ - implement top 3 improvements
465
+ - measure after each change
466
+ - document improvements
467
+ ```
468
+
469
+ ---
470
+
471
+ ### Root Cause Analysis Pattern
472
+
473
+ ```
474
+ [problem description].
475
+
476
+ don't just fix the symptom, find the root cause:
477
+ 1. what is the immediate error?
478
+ 2. what caused that error?
479
+ 3. what caused THAT?
480
+ 4. continue until you find the root
481
+
482
+ fix at the appropriate level.
483
+ verify the fix addresses the root, not just the symptom.
484
+ ```
485
+
486
+ ---
487
+
488
+ ## Combination Examples
489
+
490
+ ### Full Bug Fix (combining patterns)
491
+
492
+ ```
493
+ Users see a blank screen when loading the dashboard after being idle for 30+ minutes. [SYMPTOM]
494
+
495
+ INVESTIGATE:
496
+ - check browser console for errors
497
+ - check network tab for failed requests
498
+ - look at src/context/AuthContext.tsx for session handling [LOCATION]
499
+
500
+ REPRODUCE:
501
+ - log in, wait 30 minutes (or manually expire the session token)
502
+ - refresh the dashboard page [REPRODUCE]
503
+
504
+ FIX:
505
+ - write a failing test for the expired session case
506
+ - add proper error handling for 401 responses
507
+ - implement token refresh or redirect to login [FIX APPROACH]
508
+
509
+ VERIFY:
510
+ - test passes
511
+ - manually verify: expire session, refresh page, should redirect to login gracefully [VERIFY]
512
+ ```
513
+
514
+ ---
515
+
516
+ ### Full Feature (combining patterns)
517
+
518
+ ```
519
+ Add export functionality to the reports page. [GOAL]
520
+
521
+ CONTEXT:
522
+ - look at @src/components/ReportsList.tsx for current report display
523
+ - check @src/api/reports.ts for data fetching patterns [CONTEXT]
524
+
525
+ REQUIREMENTS:
526
+ - "Export" dropdown button in report header
527
+ - Options: CSV, PDF, Excel
528
+ - Show progress indicator during export
529
+ - Download file when complete [REQUIREMENTS]
530
+
531
+ CONSTRAINTS:
532
+ - use existing UI components from @src/components/ui/
533
+ - use the pdf-lib library already in dependencies
534
+ - no server-side generation (client-side only) [CONSTRAINTS]
535
+
536
+ APPROACH:
537
+ 1. add ExportButton component
538
+ 2. implement CSV export first (simplest)
539
+ 3. add PDF export
540
+ 4. add Excel export
541
+ 5. add loading states [PHASING]
542
+
543
+ VERIFY:
544
+ - add tests for each export format
545
+ - manually test with a report containing 1000+ rows
546
+ - verify files open correctly in respective applications [VERIFY]
547
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ ## Overview
9
+
10
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
11
+
12
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design in small sections (200-300 words), checking after each section whether it looks right so far.
13
+
14
+ **Constraint priority order:** (1) always ask one question per message; (2) use multiple choice when options are well-defined; (3) validate incrementally after each design section.
15
+
16
+ ## The Process
17
+
18
+ **Understanding the idea:**
19
+ - Check out the current project state first (files, docs, recent commits)
20
+ - Ask questions one at a time to refine the idea
21
+ - Prefer multiple choice questions when the options are well-defined and constrained; use open-ended questions when exploring new or unclear ideas
22
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
23
+ - Focus on understanding: purpose, constraints, success criteria
24
+
25
+ **Exploring approaches:**
26
+ - Propose 2-3 different approaches with trade-offs
27
+ - Present options conversationally with your recommendation and reasoning
28
+ - Lead with your recommended option and explain why
29
+
30
+ **Presenting the design:**
31
+ - Once you believe you understand what you're building, present the design
32
+ - Break it into sections of 200-300 words
33
+ - Ask after each section whether it looks right so far
34
+ - Cover: architecture, components, data flow, error handling, testing
35
+ - Be ready to go back and clarify if something doesn't make sense
36
+
37
+ ## After the Design
38
+
39
+ **Documentation:**
40
+ - Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
41
+ - Apply `.github/instructions/document-frontmatter.instructions.md` when creating or updating the design doc
42
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
43
+ - Commit the design document to git
44
+
45
+ **Implementation (if continuing):**
46
+ - Ask: "Ready to set up for implementation?"
47
+ - Use superpowers:using-git-worktrees to create isolated workspace
48
+ - Use superpowers:writing-plans to create detailed implementation plan
49
+
50
+ ## Key Principles
51
+
52
+ - **One question at a time** - Don't overwhelm with multiple questions
53
+ - **Multiple choice preferred** - Use when options are well-defined; use open-ended when exploring new or unclear ideas
54
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
55
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
56
+ - **Incremental validation** - Present design in sections, validate each
57
+ - **Be flexible** - Go back and clarify when something doesn't make sense