@ia-ccun/code-agent-cli 0.0.3 → 0.0.4-8.beta.1

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 (189) hide show
  1. package/README.md +92 -11
  2. package/bin/cli.js +212 -59
  3. package/config/agent/APPEND_SYSTEM.md +46 -5
  4. package/config/agent/bin/fd +0 -0
  5. package/config/agent/bin/rg +0 -0
  6. package/config/agent/dangerous-patterns.json +106 -0
  7. package/config/agent/extensions/aicode-tips.ts +191 -0
  8. package/config/agent/extensions/bash-check.ts +227 -0
  9. package/config/agent/extensions/context-monitor.ts +275 -0
  10. package/config/agent/extensions/context.ts +1 -0
  11. package/config/agent/extensions/custom-footer.ts +33 -2
  12. package/config/agent/extensions/custom.ts +24 -91
  13. package/config/agent/extensions/error-monitor.ts +142 -0
  14. package/config/agent/extensions/msg-debug.ts +185 -0
  15. package/config/agent/extensions/review.ts +4 -0
  16. package/config/agent/extensions/working-msg.ts +39 -20
  17. package/config/agent/mcp.json +4 -0
  18. package/config/agent/models.json +16 -43
  19. package/config/agent/prompts/code-simplifier.md +51 -0
  20. package/config/agent/prompts/feat.md +2 -2
  21. package/config/agent/prompts/git-commit.md +9 -15
  22. package/config/agent/prompts/init-project.md +2 -1
  23. package/config/agent/prompts/workflow.md +3 -2
  24. package/config/agent/settings.json +17 -5
  25. package/config/agent/skills/brainstorming/SKILL.md +167 -0
  26. package/config/agent/skills/brainstorming/scripts/frame-template.html +214 -0
  27. package/config/agent/skills/brainstorming/scripts/helper.js +88 -0
  28. package/config/agent/skills/brainstorming/scripts/server.cjs +338 -0
  29. package/config/agent/skills/brainstorming/scripts/start-server.sh +153 -0
  30. package/config/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
  31. package/config/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  32. package/config/agent/skills/brainstorming/visual-companion.md +286 -0
  33. package/config/agent/skills/code-review/SKILL.md +4 -2
  34. package/config/agent/skills/commit/SKILL.md +10 -5
  35. package/config/agent/skills/csv-data-summarizer/SKILL.md +2 -1
  36. package/config/agent/skills/design-md/README.md +34 -0
  37. package/config/agent/skills/design-md/SKILL.md +172 -0
  38. package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
  39. package/config/agent/skills/dispatching-parallel-agents/SKILL.md +185 -0
  40. package/config/agent/skills/executing-plans/SKILL.md +73 -0
  41. package/config/agent/skills/find-skills/SKILL.md +5 -1
  42. package/config/agent/skills/finishing-a-development-branch/SKILL.md +204 -0
  43. package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
  44. package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
  45. package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
  46. package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
  47. package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
  48. package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
  49. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
  50. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
  51. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
  52. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
  53. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
  54. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
  55. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
  56. package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
  57. package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
  58. package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
  59. package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
  60. package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
  61. package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
  62. package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
  63. package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
  64. package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
  65. package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
  66. package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
  67. package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
  68. package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
  69. package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
  70. package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
  71. package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
  72. package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
  73. package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
  74. package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
  75. package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
  76. package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
  77. package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
  78. package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
  79. package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
  80. package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
  81. package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
  82. package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
  83. package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
  84. package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
  85. package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
  86. package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
  87. package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
  88. package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
  89. package/config/agent/skills/frontend-design/SKILL.md +4 -1
  90. package/config/agent/skills/hello/SKILL.md +5 -2
  91. package/config/agent/skills/impeccable/adapt/SKILL.md +204 -0
  92. package/config/agent/skills/impeccable/animate/SKILL.md +177 -0
  93. package/config/agent/skills/impeccable/arrange/SKILL.md +127 -0
  94. package/config/agent/skills/impeccable/audit/SKILL.md +128 -0
  95. package/config/agent/skills/impeccable/bolder/SKILL.md +119 -0
  96. package/config/agent/skills/impeccable/clarify/SKILL.md +185 -0
  97. package/config/agent/skills/impeccable/colorize/SKILL.md +145 -0
  98. package/config/agent/skills/impeccable/critique/SKILL.md +122 -0
  99. package/config/agent/skills/impeccable/delight/SKILL.md +306 -0
  100. package/config/agent/skills/impeccable/distill/SKILL.md +124 -0
  101. package/config/agent/skills/impeccable/extract/SKILL.md +94 -0
  102. package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  103. package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  104. package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  105. package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  106. package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  107. package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
  108. package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  109. package/config/agent/skills/impeccable/harden/SKILL.md +357 -0
  110. package/config/agent/skills/impeccable/normalize/SKILL.md +73 -0
  111. package/config/agent/skills/impeccable/onboard/SKILL.md +248 -0
  112. package/config/agent/skills/impeccable/optimize/SKILL.md +268 -0
  113. package/config/agent/skills/impeccable/overdrive/SKILL.md +144 -0
  114. package/config/agent/skills/impeccable/polish/SKILL.md +205 -0
  115. package/config/agent/skills/impeccable/quieter/SKILL.md +105 -0
  116. package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +71 -0
  117. package/config/agent/skills/impeccable/typeset/SKILL.md +118 -0
  118. package/config/agent/skills/librarian/SKILL.md +5 -1
  119. package/config/agent/skills/markdown-to-html/SKILL.md +5 -2
  120. package/config/agent/skills/owasp-security/SKILL.md +539 -0
  121. package/config/agent/skills/pr/SKILL.md +5 -2
  122. package/config/agent/skills/receiving-code-review/SKILL.md +216 -0
  123. package/config/agent/skills/refactor/SKILL.md +5 -2
  124. package/config/agent/skills/requesting-code-review/SKILL.md +108 -0
  125. package/config/agent/skills/requesting-code-review/code-reviewer.md +146 -0
  126. package/config/agent/skills/session-learning/SKILL.md +185 -0
  127. package/config/agent/skills/skill-creator/SKILL.md +339 -213
  128. package/config/agent/skills/skill-creator/agents/analyzer.md +274 -0
  129. package/config/agent/skills/skill-creator/agents/comparator.md +202 -0
  130. package/config/agent/skills/skill-creator/agents/grader.md +223 -0
  131. package/config/agent/skills/skill-creator/assets/eval_review.html +146 -0
  132. package/config/agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  133. package/config/agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  134. package/config/agent/skills/skill-creator/references/schemas.md +430 -0
  135. package/config/agent/skills/skill-creator/scripts/__init__.py +0 -0
  136. package/config/agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  137. package/config/agent/skills/skill-creator/scripts/generate_report.py +326 -0
  138. package/config/agent/skills/skill-creator/scripts/improve_description.py +248 -0
  139. package/config/agent/skills/skill-creator/scripts/package_skill.py +33 -7
  140. package/config/agent/skills/skill-creator/scripts/quick_validate.py +11 -3
  141. package/config/agent/skills/skill-creator/scripts/run_eval.py +310 -0
  142. package/config/agent/skills/skill-creator/scripts/run_loop.py +332 -0
  143. package/config/agent/skills/skill-creator/scripts/utils.py +47 -0
  144. package/config/agent/skills/subagent-driven-development/SKILL.md +280 -0
  145. package/config/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  146. package/config/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
  147. package/config/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  148. package/config/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
  149. package/config/agent/skills/systematic-debugging/SKILL.md +300 -0
  150. package/config/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  151. package/config/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
  152. package/config/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
  153. package/config/agent/skills/systematic-debugging/find-polluter.sh +63 -0
  154. package/config/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
  155. package/config/agent/skills/systematic-debugging/test-academic.md +14 -0
  156. package/config/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
  157. package/config/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
  158. package/config/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
  159. package/config/agent/skills/test-driven-development/SKILL.md +375 -0
  160. package/config/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
  161. package/config/agent/skills/ui-ux-pro-max/SKILL.md +4 -1
  162. package/config/agent/skills/unit-test/SKILL.md +4 -2
  163. package/config/agent/skills/using-git-worktrees/SKILL.md +222 -0
  164. package/config/agent/skills/using-superpowers/SKILL.md +118 -0
  165. package/config/agent/skills/using-superpowers/references/codex-tools.md +25 -0
  166. package/config/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
  167. package/config/agent/skills/verification-before-completion/SKILL.md +142 -0
  168. package/config/agent/skills/writing-plans/SKILL.md +148 -0
  169. package/config/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  170. package/config/agent/skills/writing-skills/SKILL.md +669 -0
  171. package/config/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
  172. package/config/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  173. package/config/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
  174. package/config/agent/skills/writing-skills/persuasion-principles.md +187 -0
  175. package/config/agent/skills/writing-skills/render-graphs.js +168 -0
  176. package/config/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  177. package/config.json +23 -2
  178. package/dist/banner.js +3 -3
  179. package/dist/banner.js.map +1 -1
  180. package/package.json +21 -16
  181. package/scripts/banner.txt +4 -3
  182. package/scripts/postinstall.js +203 -11
  183. package/config/agent/prompts/git-rollback.md +0 -91
  184. package/config/agent/prompts/git-worktree.md +0 -277
  185. package/config/agent/prompts/help.md +0 -10
  186. package/config/agent/skills/github/SKILL.md +0 -47
  187. package/config/agent/skills/skill-creator/references/output-patterns.md +0 -82
  188. package/config/agent/skills/skill-creator/references/workflows.md +0 -28
  189. package/config/agent/skills/skill-creator/scripts/init_skill.py +0 -303
@@ -0,0 +1,357 @@
1
+ ---
2
+ name: harden
3
+ description: Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready.
4
+ user-invocable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or area to harden (optional)
8
+ required: false
9
+ ---
10
+
11
+ Strengthen interfaces against edge cases, errors, internationalization issues, and real-world usage scenarios that break idealized designs.
12
+
13
+ ## Assess Hardening Needs
14
+
15
+ Identify weaknesses and edge cases:
16
+
17
+ 1. **Test with extreme inputs**:
18
+ - Very long text (names, descriptions, titles)
19
+ - Very short text (empty, single character)
20
+ - Special characters (emoji, RTL text, accents)
21
+ - Large numbers (millions, billions)
22
+ - Many items (1000+ list items, 50+ options)
23
+ - No data (empty states)
24
+
25
+ 2. **Test error scenarios**:
26
+ - Network failures (offline, slow, timeout)
27
+ - API errors (400, 401, 403, 404, 500)
28
+ - Validation errors
29
+ - Permission errors
30
+ - Rate limiting
31
+ - Concurrent operations
32
+
33
+ 3. **Test internationalization**:
34
+ - Long translations (German is often 30% longer than English)
35
+ - RTL languages (Arabic, Hebrew)
36
+ - Character sets (Chinese, Japanese, Korean, emoji)
37
+ - Date/time formats
38
+ - Number formats (1,000 vs 1.000)
39
+ - Currency symbols
40
+
41
+ **CRITICAL**: Designs that only work with perfect data aren't production-ready. Harden against reality.
42
+
43
+ ## Hardening Dimensions
44
+
45
+ Systematically improve resilience:
46
+
47
+ ### Text Overflow & Wrapping
48
+
49
+ **Long text handling**:
50
+ ```css
51
+ /* Single line with ellipsis */
52
+ .truncate {
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
55
+ white-space: nowrap;
56
+ }
57
+
58
+ /* Multi-line with clamp */
59
+ .line-clamp {
60
+ display: -webkit-box;
61
+ -webkit-line-clamp: 3;
62
+ -webkit-box-orient: vertical;
63
+ overflow: hidden;
64
+ }
65
+
66
+ /* Allow wrapping */
67
+ .wrap {
68
+ word-wrap: break-word;
69
+ overflow-wrap: break-word;
70
+ hyphens: auto;
71
+ }
72
+ ```
73
+
74
+ **Flex/Grid overflow**:
75
+ ```css
76
+ /* Prevent flex items from overflowing */
77
+ .flex-item {
78
+ min-width: 0; /* Allow shrinking below content size */
79
+ overflow: hidden;
80
+ }
81
+
82
+ /* Prevent grid items from overflowing */
83
+ .grid-item {
84
+ min-width: 0;
85
+ min-height: 0;
86
+ }
87
+ ```
88
+
89
+ **Responsive text sizing**:
90
+ - Use `clamp()` for fluid typography
91
+ - Set minimum readable sizes (14px on mobile)
92
+ - Test text scaling (zoom to 200%)
93
+ - Ensure containers expand with text
94
+
95
+ ### Internationalization (i18n)
96
+
97
+ **Text expansion**:
98
+ - Add 30-40% space budget for translations
99
+ - Use flexbox/grid that adapts to content
100
+ - Test with longest language (usually German)
101
+ - Avoid fixed widths on text containers
102
+
103
+ ```jsx
104
+ // ❌ Bad: Assumes short English text
105
+ <button className="w-24">Submit</button>
106
+
107
+ // ✅ Good: Adapts to content
108
+ <button className="px-4 py-2">Submit</button>
109
+ ```
110
+
111
+ **RTL (Right-to-Left) support**:
112
+ ```css
113
+ /* Use logical properties */
114
+ margin-inline-start: 1rem; /* Not margin-left */
115
+ padding-inline: 1rem; /* Not padding-left/right */
116
+ border-inline-end: 1px solid; /* Not border-right */
117
+
118
+ /* Or use dir attribute */
119
+ [dir="rtl"] .arrow { transform: scaleX(-1); }
120
+ ```
121
+
122
+ **Character set support**:
123
+ - Use UTF-8 encoding everywhere
124
+ - Test with Chinese/Japanese/Korean (CJK) characters
125
+ - Test with emoji (they can be 2-4 bytes)
126
+ - Handle different scripts (Latin, Cyrillic, Arabic, etc.)
127
+
128
+ **Date/Time formatting**:
129
+ ```javascript
130
+ // ✅ Use Intl API for proper formatting
131
+ new Intl.DateTimeFormat('en-US').format(date); // 1/15/2024
132
+ new Intl.DateTimeFormat('de-DE').format(date); // 15.1.2024
133
+
134
+ new Intl.NumberFormat('en-US', {
135
+ style: 'currency',
136
+ currency: 'USD'
137
+ }).format(1234.56); // $1,234.56
138
+ ```
139
+
140
+ **Pluralization**:
141
+ ```javascript
142
+ // ❌ Bad: Assumes English pluralization
143
+ `${count} item${count !== 1 ? 's' : ''}`
144
+
145
+ // ✅ Good: Use proper i18n library
146
+ t('items', { count }) // Handles complex plural rules
147
+ ```
148
+
149
+ ### Error Handling
150
+
151
+ **Network errors**:
152
+ - Show clear error messages
153
+ - Provide retry button
154
+ - Explain what happened
155
+ - Offer offline mode (if applicable)
156
+ - Handle timeout scenarios
157
+
158
+ ```jsx
159
+ // Error states with recovery
160
+ {error && (
161
+ <ErrorMessage>
162
+ <p>Failed to load data. {error.message}</p>
163
+ <button onClick={retry}>Try again</button>
164
+ </ErrorMessage>
165
+ )}
166
+ ```
167
+
168
+ **Form validation errors**:
169
+ - Inline errors near fields
170
+ - Clear, specific messages
171
+ - Suggest corrections
172
+ - Don't block submission unnecessarily
173
+ - Preserve user input on error
174
+
175
+ **API errors**:
176
+ - Handle each status code appropriately
177
+ - 400: Show validation errors
178
+ - 401: Redirect to login
179
+ - 403: Show permission error
180
+ - 404: Show not found state
181
+ - 429: Show rate limit message
182
+ - 500: Show generic error, offer support
183
+
184
+ **Graceful degradation**:
185
+ - Core functionality works without JavaScript
186
+ - Images have alt text
187
+ - Progressive enhancement
188
+ - Fallbacks for unsupported features
189
+
190
+ ### Edge Cases & Boundary Conditions
191
+
192
+ **Empty states**:
193
+ - No items in list
194
+ - No search results
195
+ - No notifications
196
+ - No data to display
197
+ - Provide clear next action
198
+
199
+ **Loading states**:
200
+ - Initial load
201
+ - Pagination load
202
+ - Refresh
203
+ - Show what's loading ("Loading your projects...")
204
+ - Time estimates for long operations
205
+
206
+ **Large datasets**:
207
+ - Pagination or virtual scrolling
208
+ - Search/filter capabilities
209
+ - Performance optimization
210
+ - Don't load all 10,000 items at once
211
+
212
+ **Concurrent operations**:
213
+ - Prevent double-submission (disable button while loading)
214
+ - Handle race conditions
215
+ - Optimistic updates with rollback
216
+ - Conflict resolution
217
+
218
+ **Permission states**:
219
+ - No permission to view
220
+ - No permission to edit
221
+ - Read-only mode
222
+ - Clear explanation of why
223
+
224
+ **Browser compatibility**:
225
+ - Polyfills for modern features
226
+ - Fallbacks for unsupported CSS
227
+ - Feature detection (not browser detection)
228
+ - Test in target browsers
229
+
230
+ ### Input Validation & Sanitization
231
+
232
+ **Client-side validation**:
233
+ - Required fields
234
+ - Format validation (email, phone, URL)
235
+ - Length limits
236
+ - Pattern matching
237
+ - Custom validation rules
238
+
239
+ **Server-side validation** (always):
240
+ - Never trust client-side only
241
+ - Validate and sanitize all inputs
242
+ - Protect against injection attacks
243
+ - Rate limiting
244
+
245
+ **Constraint handling**:
246
+ ```html
247
+ <!-- Set clear constraints -->
248
+ <input
249
+ type="text"
250
+ maxlength="100"
251
+ pattern="[A-Za-z0-9]+"
252
+ required
253
+ aria-describedby="username-hint"
254
+ />
255
+ <small id="username-hint">
256
+ Letters and numbers only, up to 100 characters
257
+ </small>
258
+ ```
259
+
260
+ ### Accessibility Resilience
261
+
262
+ **Keyboard navigation**:
263
+ - All functionality accessible via keyboard
264
+ - Logical tab order
265
+ - Focus management in modals
266
+ - Skip links for long content
267
+
268
+ **Screen reader support**:
269
+ - Proper ARIA labels
270
+ - Announce dynamic changes (live regions)
271
+ - Descriptive alt text
272
+ - Semantic HTML
273
+
274
+ **Motion sensitivity**:
275
+ ```css
276
+ @media (prefers-reduced-motion: reduce) {
277
+ * {
278
+ animation-duration: 0.01ms !important;
279
+ animation-iteration-count: 1 !important;
280
+ transition-duration: 0.01ms !important;
281
+ }
282
+ }
283
+ ```
284
+
285
+ **High contrast mode**:
286
+ - Test in Windows high contrast mode
287
+ - Don't rely only on color
288
+ - Provide alternative visual cues
289
+
290
+ ### Performance Resilience
291
+
292
+ **Slow connections**:
293
+ - Progressive image loading
294
+ - Skeleton screens
295
+ - Optimistic UI updates
296
+ - Offline support (service workers)
297
+
298
+ **Memory leaks**:
299
+ - Clean up event listeners
300
+ - Cancel subscriptions
301
+ - Clear timers/intervals
302
+ - Abort pending requests on unmount
303
+
304
+ **Throttling & Debouncing**:
305
+ ```javascript
306
+ // Debounce search input
307
+ const debouncedSearch = debounce(handleSearch, 300);
308
+
309
+ // Throttle scroll handler
310
+ const throttledScroll = throttle(handleScroll, 100);
311
+ ```
312
+
313
+ ## Testing Strategies
314
+
315
+ **Manual testing**:
316
+ - Test with extreme data (very long, very short, empty)
317
+ - Test in different languages
318
+ - Test offline
319
+ - Test slow connection (throttle to 3G)
320
+ - Test with screen reader
321
+ - Test keyboard-only navigation
322
+ - Test on old browsers
323
+
324
+ **Automated testing**:
325
+ - Unit tests for edge cases
326
+ - Integration tests for error scenarios
327
+ - E2E tests for critical paths
328
+ - Visual regression tests
329
+ - Accessibility tests (axe, WAVE)
330
+
331
+ **IMPORTANT**: Hardening is about expecting the unexpected. Real users will do things you never imagined.
332
+
333
+ **NEVER**:
334
+ - Assume perfect input (validate everything)
335
+ - Ignore internationalization (design for global)
336
+ - Leave error messages generic ("Error occurred")
337
+ - Forget offline scenarios
338
+ - Trust client-side validation alone
339
+ - Use fixed widths for text
340
+ - Assume English-length text
341
+ - Block entire interface when one component errors
342
+
343
+ ## Verify Hardening
344
+
345
+ Test thoroughly with edge cases:
346
+
347
+ - **Long text**: Try names with 100+ characters
348
+ - **Emoji**: Use emoji in all text fields
349
+ - **RTL**: Test with Arabic or Hebrew
350
+ - **CJK**: Test with Chinese/Japanese/Korean
351
+ - **Network issues**: Disable internet, throttle connection
352
+ - **Large datasets**: Test with 1000+ items
353
+ - **Concurrent actions**: Click submit 10 times rapidly
354
+ - **Errors**: Force API errors, test all error states
355
+ - **Empty**: Remove all data, test empty states
356
+
357
+ Remember: You're hardening for production reality, not demo perfection. Expect users to input weird data, lose connection mid-flow, and use your product in unexpected ways. Build resilience into every component.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: normalize
3
+ description: Normalize design to match your design system and ensure consistency
4
+ user-invocable: true
5
+ args:
6
+ - name: feature
7
+ description: The page, route, or feature to normalize (optional)
8
+ required: false
9
+ ---
10
+
11
+ Analyze and redesign the feature to perfectly match our design system standards, aesthetics, and established patterns.
12
+
13
+ ## MANDATORY PREPARATION
14
+
15
+ Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first.
16
+
17
+ ---
18
+
19
+ ## Plan
20
+
21
+ Before making changes, deeply understand the context:
22
+
23
+ 1. **Discover the design system**: Search for design system documentation, UI guidelines, component libraries, or style guides (grep for "design system", "ui guide", "style guide", etc.). Study it thoroughly until you understand:
24
+ - Core design principles and aesthetic direction
25
+ - Target audience and personas
26
+ - Component patterns and conventions
27
+ - Design tokens (colors, typography, spacing)
28
+
29
+ **CRITICAL**: If something isn't clear, ask. Don't guess at design system principles.
30
+
31
+ 2. **Analyze the current feature**: Assess what works and what doesn't:
32
+ - Where does it deviate from design system patterns?
33
+ - Which inconsistencies are cosmetic vs. functional?
34
+ - What's the root cause—missing tokens, one-off implementations, or conceptual misalignment?
35
+
36
+ 3. **Create a normalization plan**: Define specific changes that will align the feature with the design system:
37
+ - Which components can be replaced with design system equivalents?
38
+ - Which styles need to use design tokens instead of hard-coded values?
39
+ - How can UX patterns match established user flows?
40
+
41
+ **IMPORTANT**: Great design is effective design. Prioritize UX consistency and usability over visual polish alone. Think through the best possible experience for your use case and personas first.
42
+
43
+ ## Execute
44
+
45
+ Systematically address all inconsistencies across these dimensions:
46
+
47
+ - **Typography**: Use design system fonts, sizes, weights, and line heights. Replace hard-coded values with typographic tokens or classes.
48
+ - **Color & Theme**: Apply design system color tokens. Remove one-off color choices that break the palette.
49
+ - **Spacing & Layout**: Use spacing tokens (margins, padding, gaps). Align with grid systems and layout patterns used elsewhere.
50
+ - **Components**: Replace custom implementations with design system components. Ensure props and variants match established patterns.
51
+ - **Motion & Interaction**: Match animation timing, easing, and interaction patterns to other features.
52
+ - **Responsive Behavior**: Ensure breakpoints and responsive patterns align with design system standards.
53
+ - **Accessibility**: Verify contrast ratios, focus states, ARIA labels match design system requirements.
54
+ - **Progressive Disclosure**: Match information hierarchy and complexity management to established patterns.
55
+
56
+ **NEVER**:
57
+ - Create new one-off components when design system equivalents exist
58
+ - Hard-code values that should use design tokens
59
+ - Introduce new patterns that diverge from the design system
60
+ - Compromise accessibility for visual consistency
61
+
62
+ This is not an exhaustive list—apply judgment to identify all areas needing normalization.
63
+
64
+ ## Clean Up
65
+
66
+ After normalization, ensure code quality:
67
+
68
+ - **Consolidate reusable components**: If you created new components that should be shared, move them to the design system or shared UI component path.
69
+ - **Remove orphaned code**: Delete unused implementations, styles, or files made obsolete by normalization.
70
+ - **Verify quality**: Lint, type-check, and test according to repository guidelines. Ensure normalization didn't introduce regressions.
71
+ - **Ensure DRYness**: Look for duplication introduced during refactoring and consolidate.
72
+
73
+ Remember: You are a brilliant frontend designer with impeccable taste, equally strong in UX and UI. Your attention to detail and eye for end-to-end user experience is world class. Execute with precision and thoroughness.
@@ -0,0 +1,248 @@
1
+ ---
2
+ name: onboard
3
+ description: Design or improve onboarding flows, empty states, and first-time user experiences. Helps users get started successfully and understand value quickly.
4
+ user-invocable: true
5
+ args:
6
+ - name: target
7
+ description: The feature or area needing onboarding (optional)
8
+ required: false
9
+ ---
10
+
11
+ ## MANDATORY PREPARATION
12
+
13
+ Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first. Additionally gather: the "aha moment" you want users to reach, and users' experience level.
14
+
15
+ ---
16
+
17
+ Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly.
18
+
19
+ ## Assess Onboarding Needs
20
+
21
+ Understand what users need to learn and why:
22
+
23
+ 1. **Identify the challenge**:
24
+ - What are users trying to accomplish?
25
+ - What's confusing or unclear about current experience?
26
+ - Where do users get stuck or drop off?
27
+ - What's the "aha moment" we want users to reach?
28
+
29
+ 2. **Understand the users**:
30
+ - What's their experience level? (Beginners, power users, mixed?)
31
+ - What's their motivation? (Excited and exploring? Required by work?)
32
+ - What's their time commitment? (5 minutes? 30 minutes?)
33
+ - What alternatives do they know? (Coming from competitor? New to category?)
34
+
35
+ 3. **Define success**:
36
+ - What's the minimum users need to learn to be successful?
37
+ - What's the key action we want them to take? (First project? First invite?)
38
+ - How do we know onboarding worked? (Completion rate? Time to value?)
39
+
40
+ **CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible.
41
+
42
+ ## Onboarding Principles
43
+
44
+ Follow these core principles:
45
+
46
+ ### Show, Don't Tell
47
+ - Demonstrate with working examples, not just descriptions
48
+ - Provide real functionality in onboarding, not separate tutorial mode
49
+ - Use progressive disclosure - teach one thing at a time
50
+
51
+ ### Make It Optional (When Possible)
52
+ - Let experienced users skip onboarding
53
+ - Don't block access to product
54
+ - Provide "Skip" or "I'll explore on my own" options
55
+
56
+ ### Time to Value
57
+ - Get users to their "aha moment" ASAP
58
+ - Front-load most important concepts
59
+ - Teach 20% that delivers 80% of value
60
+ - Save advanced features for contextual discovery
61
+
62
+ ### Context Over Ceremony
63
+ - Teach features when users need them, not upfront
64
+ - Empty states are onboarding opportunities
65
+ - Tooltips and hints at point of use
66
+
67
+ ### Respect User Intelligence
68
+ - Don't patronize or over-explain
69
+ - Be concise and clear
70
+ - Assume users can figure out standard patterns
71
+
72
+ ## Design Onboarding Experiences
73
+
74
+ Create appropriate onboarding for the context:
75
+
76
+ ### Initial Product Onboarding
77
+
78
+ **Welcome Screen**:
79
+ - Clear value proposition (what is this product?)
80
+ - What users will learn/accomplish
81
+ - Time estimate (honest about commitment)
82
+ - Option to skip (for experienced users)
83
+
84
+ **Account Setup**:
85
+ - Minimal required information (collect more later)
86
+ - Explain why you're asking for each piece of information
87
+ - Smart defaults where possible
88
+ - Social login when appropriate
89
+
90
+ **Core Concept Introduction**:
91
+ - Introduce 1-3 core concepts (not everything)
92
+ - Use simple language and examples
93
+ - Interactive when possible (do, don't just read)
94
+ - Progress indication (step 1 of 3)
95
+
96
+ **First Success**:
97
+ - Guide users to accomplish something real
98
+ - Pre-populated examples or templates
99
+ - Celebrate completion (but don't overdo it)
100
+ - Clear next steps
101
+
102
+ ### Feature Discovery & Adoption
103
+
104
+ **Empty States**:
105
+ Instead of blank space, show:
106
+ - What will appear here (description + screenshot/illustration)
107
+ - Why it's valuable
108
+ - Clear CTA to create first item
109
+ - Example or template option
110
+
111
+ Example:
112
+ ```
113
+ No projects yet
114
+ Projects help you organize your work and collaborate with your team.
115
+ [Create your first project] or [Start from template]
116
+ ```
117
+
118
+ **Contextual Tooltips**:
119
+ - Appear at relevant moment (first time user sees feature)
120
+ - Point directly at relevant UI element
121
+ - Brief explanation + benefit
122
+ - Dismissable (with "Don't show again" option)
123
+ - Optional "Learn more" link
124
+
125
+ **Feature Announcements**:
126
+ - Highlight new features when they're released
127
+ - Show what's new and why it matters
128
+ - Let users try immediately
129
+ - Dismissable
130
+
131
+ **Progressive Onboarding**:
132
+ - Teach features when users encounter them
133
+ - Badges or indicators on new/unused features
134
+ - Unlock complexity gradually (don't show all options immediately)
135
+
136
+ ### Guided Tours & Walkthroughs
137
+
138
+ **When to use**:
139
+ - Complex interfaces with many features
140
+ - Significant changes to existing product
141
+ - Industry-specific tools needing domain knowledge
142
+
143
+ **How to design**:
144
+ - Spotlight specific UI elements (dim rest of page)
145
+ - Keep steps short (3-7 steps max per tour)
146
+ - Allow users to click through tour freely
147
+ - Include "Skip tour" option
148
+ - Make replayable (help menu)
149
+
150
+ **Best practices**:
151
+ - Interactive > passive (let users click real buttons)
152
+ - Focus on workflow, not features ("Create a project" not "This is the project button")
153
+ - Provide sample data so actions work
154
+
155
+ ### Interactive Tutorials
156
+
157
+ **When to use**:
158
+ - Users need hands-on practice
159
+ - Concepts are complex or unfamiliar
160
+ - High stakes (better to practice in safe environment)
161
+
162
+ **How to design**:
163
+ - Sandbox environment with sample data
164
+ - Clear objectives ("Create a chart showing sales by region")
165
+ - Step-by-step guidance
166
+ - Validation (confirm they did it right)
167
+ - Graduation moment (you're ready!)
168
+
169
+ ### Documentation & Help
170
+
171
+ **In-product help**:
172
+ - Contextual help links throughout interface
173
+ - Keyboard shortcut reference
174
+ - Search-able help center
175
+ - Video tutorials for complex workflows
176
+
177
+ **Help patterns**:
178
+ - `?` icon near complex features
179
+ - "Learn more" links in tooltips
180
+ - Keyboard shortcut hints (`⌘K` shown on search box)
181
+
182
+ ## Empty State Design
183
+
184
+ Every empty state needs:
185
+
186
+ ### What Will Be Here
187
+ "Your recent projects will appear here"
188
+
189
+ ### Why It Matters
190
+ "Projects help you organize your work and collaborate with your team"
191
+
192
+ ### How to Get Started
193
+ [Create project] or [Import from template]
194
+
195
+ ### Visual Interest
196
+ Illustration or icon (not just text on blank page)
197
+
198
+ ### Contextual Help
199
+ "Need help getting started? [Watch 2-min tutorial]"
200
+
201
+ **Empty state types**:
202
+ - **First use**: Never used this feature (emphasize value, provide template)
203
+ - **User cleared**: Intentionally deleted everything (light touch, easy to recreate)
204
+ - **No results**: Search or filter returned nothing (suggest different query, clear filters)
205
+ - **No permissions**: Can't access (explain why, how to get access)
206
+ - **Error state**: Failed to load (explain what happened, retry option)
207
+
208
+ ## Implementation Patterns
209
+
210
+ ### Technical approaches:
211
+
212
+ **Tooltip libraries**: Tippy.js, Popper.js
213
+ **Tour libraries**: Intro.js, Shepherd.js, React Joyride
214
+ **Modal patterns**: Focus trap, backdrop, ESC to close
215
+ **Progress tracking**: LocalStorage for "seen" states
216
+ **Analytics**: Track completion, drop-off points
217
+
218
+ **Storage patterns**:
219
+ ```javascript
220
+ // Track which onboarding steps user has seen
221
+ localStorage.setItem('onboarding-completed', 'true');
222
+ localStorage.setItem('feature-tooltip-seen-reports', 'true');
223
+ ```
224
+
225
+ **IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals.
226
+
227
+ **NEVER**:
228
+ - Force users through long onboarding before they can use product
229
+ - Patronize users with obvious explanations
230
+ - Show same tooltip repeatedly (respect dismissals)
231
+ - Block all UI during tour (let users explore)
232
+ - Create separate tutorial mode disconnected from real product
233
+ - Overwhelm with information upfront (progressive disclosure!)
234
+ - Hide "Skip" or make it hard to find
235
+ - Forget about returning users (don't show initial onboarding again)
236
+
237
+ ## Verify Onboarding Quality
238
+
239
+ Test with real users:
240
+
241
+ - **Time to completion**: Can users complete onboarding quickly?
242
+ - **Comprehension**: Do users understand after completing?
243
+ - **Action**: Do users take desired next step?
244
+ - **Skip rate**: Are too many users skipping? (Maybe it's too long/not valuable)
245
+ - **Completion rate**: Are users completing? (If low, simplify)
246
+ - **Time to value**: How long until users get first value?
247
+
248
+ Remember: You're a product educator with excellent teaching instincts. Get users to their "aha moment" as quickly as possible. Teach the essential, make it contextual, respect user time and intelligence.