learnship 1.9.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 (171) hide show
  1. package/.claude-plugin/plugin.json +26 -0
  2. package/.cursor-plugin/plugin.json +26 -0
  3. package/LICENSE +21 -0
  4. package/README.md +791 -0
  5. package/SKILL.md +86 -0
  6. package/agents/debugger.md +102 -0
  7. package/agents/executor.md +115 -0
  8. package/agents/learnship-debugger.md +146 -0
  9. package/agents/learnship-executor.md +155 -0
  10. package/agents/learnship-phase-researcher.md +128 -0
  11. package/agents/learnship-plan-checker.md +119 -0
  12. package/agents/learnship-planner.md +146 -0
  13. package/agents/learnship-verifier.md +157 -0
  14. package/agents/planner.md +109 -0
  15. package/agents/researcher.md +80 -0
  16. package/agents/verifier.md +114 -0
  17. package/bin/install.js +1242 -0
  18. package/bin/learnship.js +56 -0
  19. package/commands/learnship/add-phase.md +22 -0
  20. package/commands/learnship/add-tests.md +24 -0
  21. package/commands/learnship/add-todo.md +21 -0
  22. package/commands/learnship/audit-milestone.md +21 -0
  23. package/commands/learnship/check-todos.md +22 -0
  24. package/commands/learnship/cleanup.md +22 -0
  25. package/commands/learnship/complete-milestone.md +22 -0
  26. package/commands/learnship/debug.md +27 -0
  27. package/commands/learnship/decision-log.md +22 -0
  28. package/commands/learnship/diagnose-issues.md +23 -0
  29. package/commands/learnship/discovery-phase.md +24 -0
  30. package/commands/learnship/discuss-milestone.md +23 -0
  31. package/commands/learnship/discuss-phase.md +23 -0
  32. package/commands/learnship/execute-phase.md +27 -0
  33. package/commands/learnship/execute-plan.md +26 -0
  34. package/commands/learnship/health.md +20 -0
  35. package/commands/learnship/help.md +19 -0
  36. package/commands/learnship/insert-phase.md +22 -0
  37. package/commands/learnship/knowledge-base.md +21 -0
  38. package/commands/learnship/list-phase-assumptions.md +21 -0
  39. package/commands/learnship/ls.md +20 -0
  40. package/commands/learnship/map-codebase.md +23 -0
  41. package/commands/learnship/milestone-retrospective.md +21 -0
  42. package/commands/learnship/new-milestone.md +23 -0
  43. package/commands/learnship/new-project.md +24 -0
  44. package/commands/learnship/next.md +22 -0
  45. package/commands/learnship/pause-work.md +21 -0
  46. package/commands/learnship/plan-milestone-gaps.md +22 -0
  47. package/commands/learnship/plan-phase.md +24 -0
  48. package/commands/learnship/progress.md +20 -0
  49. package/commands/learnship/quick.md +27 -0
  50. package/commands/learnship/reapply-patches.md +21 -0
  51. package/commands/learnship/release.md +21 -0
  52. package/commands/learnship/remove-phase.md +23 -0
  53. package/commands/learnship/research-phase.md +23 -0
  54. package/commands/learnship/resume-work.md +21 -0
  55. package/commands/learnship/set-profile.md +21 -0
  56. package/commands/learnship/settings.md +21 -0
  57. package/commands/learnship/transition.md +21 -0
  58. package/commands/learnship/update.md +21 -0
  59. package/commands/learnship/validate-phase.md +22 -0
  60. package/commands/learnship/verify-work.md +23 -0
  61. package/cursor-rules/learnship.mdc +60 -0
  62. package/gemini-extension.json +10 -0
  63. package/hooks/hooks-claude.json +15 -0
  64. package/hooks/hooks-cursor.json +10 -0
  65. package/hooks/session-start +43 -0
  66. package/install.sh +254 -0
  67. package/learnship/references/design-commands.md +119 -0
  68. package/learnship/references/git-integration.md +249 -0
  69. package/learnship/references/learning-design.md +142 -0
  70. package/learnship/references/model-profiles.md +90 -0
  71. package/learnship/references/planning-config.md +184 -0
  72. package/learnship/references/questioning.md +162 -0
  73. package/learnship/references/ui-brand.md +160 -0
  74. package/learnship/references/verification-patterns.md +608 -0
  75. package/learnship/templates/agents.md +166 -0
  76. package/learnship/templates/context.md +72 -0
  77. package/learnship/templates/plan.md +202 -0
  78. package/learnship/templates/project.md +184 -0
  79. package/learnship/templates/requirements.md +231 -0
  80. package/learnship/templates/state.md +176 -0
  81. package/learnship/templates/uat.md +80 -0
  82. package/learnship/workflows/add-phase.md +84 -0
  83. package/learnship/workflows/add-tests.md +191 -0
  84. package/learnship/workflows/add-todo.md +108 -0
  85. package/learnship/workflows/audit-milestone.md +178 -0
  86. package/learnship/workflows/check-todos.md +138 -0
  87. package/learnship/workflows/cleanup.md +107 -0
  88. package/learnship/workflows/complete-milestone.md +191 -0
  89. package/learnship/workflows/debug.md +245 -0
  90. package/learnship/workflows/decision-log.md +131 -0
  91. package/learnship/workflows/diagnose-issues.md +145 -0
  92. package/learnship/workflows/discovery-phase.md +183 -0
  93. package/learnship/workflows/discuss-milestone.md +136 -0
  94. package/learnship/workflows/discuss-phase.md +244 -0
  95. package/learnship/workflows/execute-phase.md +345 -0
  96. package/learnship/workflows/execute-plan.md +149 -0
  97. package/learnship/workflows/health.md +171 -0
  98. package/learnship/workflows/help.md +153 -0
  99. package/learnship/workflows/insert-phase.md +106 -0
  100. package/learnship/workflows/knowledge-base.md +168 -0
  101. package/learnship/workflows/list-phase-assumptions.md +129 -0
  102. package/learnship/workflows/ls.md +145 -0
  103. package/learnship/workflows/map-codebase.md +142 -0
  104. package/learnship/workflows/milestone-retrospective.md +178 -0
  105. package/learnship/workflows/new-milestone.md +200 -0
  106. package/learnship/workflows/new-project.md +340 -0
  107. package/learnship/workflows/next.md +100 -0
  108. package/learnship/workflows/pause-work.md +122 -0
  109. package/learnship/workflows/plan-milestone-gaps.md +160 -0
  110. package/learnship/workflows/plan-phase.md +288 -0
  111. package/learnship/workflows/progress.md +118 -0
  112. package/learnship/workflows/quick.md +256 -0
  113. package/learnship/workflows/reapply-patches.md +130 -0
  114. package/learnship/workflows/release.md +217 -0
  115. package/learnship/workflows/remove-phase.md +128 -0
  116. package/learnship/workflows/research-phase.md +137 -0
  117. package/learnship/workflows/resume-work.md +162 -0
  118. package/learnship/workflows/set-profile.md +78 -0
  119. package/learnship/workflows/settings.md +204 -0
  120. package/learnship/workflows/sync-upstream-skills.md +269 -0
  121. package/learnship/workflows/transition.md +165 -0
  122. package/learnship/workflows/update.md +166 -0
  123. package/learnship/workflows/validate-phase.md +174 -0
  124. package/learnship/workflows/verify-work.md +264 -0
  125. package/package.json +62 -0
  126. package/references/design-commands.md +119 -0
  127. package/references/git-integration.md +249 -0
  128. package/references/learning-design.md +142 -0
  129. package/references/model-profiles.md +90 -0
  130. package/references/planning-config.md +184 -0
  131. package/references/questioning.md +162 -0
  132. package/references/ui-brand.md +160 -0
  133. package/references/verification-patterns.md +608 -0
  134. package/skills/agentic-learning/SKILL.md +373 -0
  135. package/skills/agentic-learning/references/either-or-format.md +161 -0
  136. package/skills/agentic-learning/references/learning-science.md +190 -0
  137. package/skills/agentic-learning/references/struggle-ladder.md +140 -0
  138. package/skills/impeccable/SKILL.md +125 -0
  139. package/skills/impeccable/adapt/SKILL.md +199 -0
  140. package/skills/impeccable/animate/SKILL.md +190 -0
  141. package/skills/impeccable/audit/SKILL.md +129 -0
  142. package/skills/impeccable/bolder/SKILL.md +132 -0
  143. package/skills/impeccable/clarify/SKILL.md +180 -0
  144. package/skills/impeccable/colorize/SKILL.md +158 -0
  145. package/skills/impeccable/critique/SKILL.md +118 -0
  146. package/skills/impeccable/delight/SKILL.md +317 -0
  147. package/skills/impeccable/distill/SKILL.md +137 -0
  148. package/skills/impeccable/extract/SKILL.md +95 -0
  149. package/skills/impeccable/frontend-design/SKILL.md +127 -0
  150. package/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  151. package/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  152. package/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  153. package/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  154. package/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  155. package/skills/impeccable/frontend-design/reference/typography.md +131 -0
  156. package/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  157. package/skills/impeccable/harden/SKILL.md +358 -0
  158. package/skills/impeccable/normalize/SKILL.md +67 -0
  159. package/skills/impeccable/onboard/SKILL.md +243 -0
  160. package/skills/impeccable/optimize/SKILL.md +269 -0
  161. package/skills/impeccable/polish/SKILL.md +202 -0
  162. package/skills/impeccable/quieter/SKILL.md +118 -0
  163. package/skills/impeccable/teach-impeccable/SKILL.md +69 -0
  164. package/templates/agents.md +166 -0
  165. package/templates/config.json +22 -0
  166. package/templates/context.md +72 -0
  167. package/templates/plan.md +202 -0
  168. package/templates/project.md +184 -0
  169. package/templates/requirements.md +231 -0
  170. package/templates/state.md +176 -0
  171. package/templates/uat.md +80 -0
@@ -0,0 +1,358 @@
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
+ args:
5
+ - name: target
6
+ description: The feature or area to harden (optional)
7
+ required: false
8
+ user-invokable: true
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.
358
+
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: normalize
3
+ description: Normalize design to match your design system and ensure consistency
4
+ args:
5
+ - name: feature
6
+ description: The page, route, or feature to normalize (optional)
7
+ required: false
8
+ user-invokable: true
9
+ ---
10
+
11
+ Analyze and redesign the feature to perfectly match our design system standards, aesthetics, and established patterns.
12
+
13
+ ## Plan
14
+
15
+ Before making changes, deeply understand the context:
16
+
17
+ 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:
18
+ - Core design principles and aesthetic direction
19
+ - Target audience and personas
20
+ - Component patterns and conventions
21
+ - Design tokens (colors, typography, spacing)
22
+
23
+ **CRITICAL**: If something isn't clear, ask. Don't guess at design system principles.
24
+
25
+ 2. **Analyze the current feature**: Assess what works and what doesn't:
26
+ - Where does it deviate from design system patterns?
27
+ - Which inconsistencies are cosmetic vs. functional?
28
+ - What's the root cause—missing tokens, one-off implementations, or conceptual misalignment?
29
+
30
+ 3. **Create a normalization plan**: Define specific changes that will align the feature with the design system:
31
+ - Which components can be replaced with design system equivalents?
32
+ - Which styles need to use design tokens instead of hard-coded values?
33
+ - How can UX patterns match established user flows?
34
+
35
+ **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.
36
+
37
+ ## Execute
38
+
39
+ Systematically address all inconsistencies across these dimensions:
40
+
41
+ - **Typography**: Use design system fonts, sizes, weights, and line heights. Replace hard-coded values with typographic tokens or classes.
42
+ - **Color & Theme**: Apply design system color tokens. Remove one-off color choices that break the palette.
43
+ - **Spacing & Layout**: Use spacing tokens (margins, padding, gaps). Align with grid systems and layout patterns used elsewhere.
44
+ - **Components**: Replace custom implementations with design system components. Ensure props and variants match established patterns.
45
+ - **Motion & Interaction**: Match animation timing, easing, and interaction patterns to other features.
46
+ - **Responsive Behavior**: Ensure breakpoints and responsive patterns align with design system standards.
47
+ - **Accessibility**: Verify contrast ratios, focus states, ARIA labels match design system requirements.
48
+ - **Progressive Disclosure**: Match information hierarchy and complexity management to established patterns.
49
+
50
+ **NEVER**:
51
+ - Create new one-off components when design system equivalents exist
52
+ - Hard-code values that should use design tokens
53
+ - Introduce new patterns that diverge from the design system
54
+ - Compromise accessibility for visual consistency
55
+
56
+ This is not an exhaustive list—apply judgment to identify all areas needing normalization.
57
+
58
+ ## Clean Up
59
+
60
+ After normalization, ensure code quality:
61
+
62
+ - **Consolidate reusable components**: If you created new components that should be shared, move them to the design system or shared UI component path.
63
+ - **Remove orphaned code**: Delete unused implementations, styles, or files made obsolete by normalization.
64
+ - **Verify quality**: Lint, type-check, and test according to repository guidelines. Ensure normalization didn't introduce regressions.
65
+ - **Ensure DRYness**: Look for duplication introduced during refactoring and consolidate.
66
+
67
+ 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,243 @@
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
+ args:
5
+ - name: target
6
+ description: The feature or area needing onboarding (optional)
7
+ required: false
8
+ user-invokable: true
9
+ ---
10
+
11
+ Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly.
12
+
13
+ ## Assess Onboarding Needs
14
+
15
+ Understand what users need to learn and why:
16
+
17
+ 1. **Identify the challenge**:
18
+ - What are users trying to accomplish?
19
+ - What's confusing or unclear about current experience?
20
+ - Where do users get stuck or drop off?
21
+ - What's the "aha moment" we want users to reach?
22
+
23
+ 2. **Understand the users**:
24
+ - What's their experience level? (Beginners, power users, mixed?)
25
+ - What's their motivation? (Excited and exploring? Required by work?)
26
+ - What's their time commitment? (5 minutes? 30 minutes?)
27
+ - What alternatives do they know? (Coming from competitor? New to category?)
28
+
29
+ 3. **Define success**:
30
+ - What's the minimum users need to learn to be successful?
31
+ - What's the key action we want them to take? (First project? First invite?)
32
+ - How do we know onboarding worked? (Completion rate? Time to value?)
33
+
34
+ **CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible.
35
+
36
+ ## Onboarding Principles
37
+
38
+ Follow these core principles:
39
+
40
+ ### Show, Don't Tell
41
+ - Demonstrate with working examples, not just descriptions
42
+ - Provide real functionality in onboarding, not separate tutorial mode
43
+ - Use progressive disclosure - teach one thing at a time
44
+
45
+ ### Make It Optional (When Possible)
46
+ - Let experienced users skip onboarding
47
+ - Don't block access to product
48
+ - Provide "Skip" or "I'll explore on my own" options
49
+
50
+ ### Time to Value
51
+ - Get users to their "aha moment" ASAP
52
+ - Front-load most important concepts
53
+ - Teach 20% that delivers 80% of value
54
+ - Save advanced features for contextual discovery
55
+
56
+ ### Context Over Ceremony
57
+ - Teach features when users need them, not upfront
58
+ - Empty states are onboarding opportunities
59
+ - Tooltips and hints at point of use
60
+
61
+ ### Respect User Intelligence
62
+ - Don't patronize or over-explain
63
+ - Be concise and clear
64
+ - Assume users can figure out standard patterns
65
+
66
+ ## Design Onboarding Experiences
67
+
68
+ Create appropriate onboarding for the context:
69
+
70
+ ### Initial Product Onboarding
71
+
72
+ **Welcome Screen**:
73
+ - Clear value proposition (what is this product?)
74
+ - What users will learn/accomplish
75
+ - Time estimate (honest about commitment)
76
+ - Option to skip (for experienced users)
77
+
78
+ **Account Setup**:
79
+ - Minimal required information (collect more later)
80
+ - Explain why you're asking for each piece of information
81
+ - Smart defaults where possible
82
+ - Social login when appropriate
83
+
84
+ **Core Concept Introduction**:
85
+ - Introduce 1-3 core concepts (not everything)
86
+ - Use simple language and examples
87
+ - Interactive when possible (do, don't just read)
88
+ - Progress indication (step 1 of 3)
89
+
90
+ **First Success**:
91
+ - Guide users to accomplish something real
92
+ - Pre-populated examples or templates
93
+ - Celebrate completion (but don't overdo it)
94
+ - Clear next steps
95
+
96
+ ### Feature Discovery & Adoption
97
+
98
+ **Empty States**:
99
+ Instead of blank space, show:
100
+ - What will appear here (description + screenshot/illustration)
101
+ - Why it's valuable
102
+ - Clear CTA to create first item
103
+ - Example or template option
104
+
105
+ Example:
106
+ ```
107
+ No projects yet
108
+ Projects help you organize your work and collaborate with your team.
109
+ [Create your first project] or [Start from template]
110
+ ```
111
+
112
+ **Contextual Tooltips**:
113
+ - Appear at relevant moment (first time user sees feature)
114
+ - Point directly at relevant UI element
115
+ - Brief explanation + benefit
116
+ - Dismissable (with "Don't show again" option)
117
+ - Optional "Learn more" link
118
+
119
+ **Feature Announcements**:
120
+ - Highlight new features when they're released
121
+ - Show what's new and why it matters
122
+ - Let users try immediately
123
+ - Dismissable
124
+
125
+ **Progressive Onboarding**:
126
+ - Teach features when users encounter them
127
+ - Badges or indicators on new/unused features
128
+ - Unlock complexity gradually (don't show all options immediately)
129
+
130
+ ### Guided Tours & Walkthroughs
131
+
132
+ **When to use**:
133
+ - Complex interfaces with many features
134
+ - Significant changes to existing product
135
+ - Industry-specific tools needing domain knowledge
136
+
137
+ **How to design**:
138
+ - Spotlight specific UI elements (dim rest of page)
139
+ - Keep steps short (3-7 steps max per tour)
140
+ - Allow users to click through tour freely
141
+ - Include "Skip tour" option
142
+ - Make replayable (help menu)
143
+
144
+ **Best practices**:
145
+ - Interactive > passive (let users click real buttons)
146
+ - Focus on workflow, not features ("Create a project" not "This is the project button")
147
+ - Provide sample data so actions work
148
+
149
+ ### Interactive Tutorials
150
+
151
+ **When to use**:
152
+ - Users need hands-on practice
153
+ - Concepts are complex or unfamiliar
154
+ - High stakes (better to practice in safe environment)
155
+
156
+ **How to design**:
157
+ - Sandbox environment with sample data
158
+ - Clear objectives ("Create a chart showing sales by region")
159
+ - Step-by-step guidance
160
+ - Validation (confirm they did it right)
161
+ - Graduation moment (you're ready!)
162
+
163
+ ### Documentation & Help
164
+
165
+ **In-product help**:
166
+ - Contextual help links throughout interface
167
+ - Keyboard shortcut reference
168
+ - Search-able help center
169
+ - Video tutorials for complex workflows
170
+
171
+ **Help patterns**:
172
+ - `?` icon near complex features
173
+ - "Learn more" links in tooltips
174
+ - Keyboard shortcut hints (`⌘K` shown on search box)
175
+
176
+ ## Empty State Design
177
+
178
+ Every empty state needs:
179
+
180
+ ### What Will Be Here
181
+ "Your recent projects will appear here"
182
+
183
+ ### Why It Matters
184
+ "Projects help you organize your work and collaborate with your team"
185
+
186
+ ### How to Get Started
187
+ [Create project] or [Import from template]
188
+
189
+ ### Visual Interest
190
+ Illustration or icon (not just text on blank page)
191
+
192
+ ### Contextual Help
193
+ "Need help getting started? [Watch 2-min tutorial]"
194
+
195
+ **Empty state types**:
196
+ - **First use**: Never used this feature (emphasize value, provide template)
197
+ - **User cleared**: Intentionally deleted everything (light touch, easy to recreate)
198
+ - **No results**: Search or filter returned nothing (suggest different query, clear filters)
199
+ - **No permissions**: Can't access (explain why, how to get access)
200
+ - **Error state**: Failed to load (explain what happened, retry option)
201
+
202
+ ## Implementation Patterns
203
+
204
+ ### Technical approaches:
205
+
206
+ **Tooltip libraries**: Tippy.js, Popper.js
207
+ **Tour libraries**: Intro.js, Shepherd.js, React Joyride
208
+ **Modal patterns**: Focus trap, backdrop, ESC to close
209
+ **Progress tracking**: LocalStorage for "seen" states
210
+ **Analytics**: Track completion, drop-off points
211
+
212
+ **Storage patterns**:
213
+ ```javascript
214
+ // Track which onboarding steps user has seen
215
+ localStorage.setItem('onboarding-completed', 'true');
216
+ localStorage.setItem('feature-tooltip-seen-reports', 'true');
217
+ ```
218
+
219
+ **IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals.
220
+
221
+ **NEVER**:
222
+ - Force users through long onboarding before they can use product
223
+ - Patronize users with obvious explanations
224
+ - Show same tooltip repeatedly (respect dismissals)
225
+ - Block all UI during tour (let users explore)
226
+ - Create separate tutorial mode disconnected from real product
227
+ - Overwhelm with information upfront (progressive disclosure!)
228
+ - Hide "Skip" or make it hard to find
229
+ - Forget about returning users (don't show initial onboarding again)
230
+
231
+ ## Verify Onboarding Quality
232
+
233
+ Test with real users:
234
+
235
+ - **Time to completion**: Can users complete onboarding quickly?
236
+ - **Comprehension**: Do users understand after completing?
237
+ - **Action**: Do users take desired next step?
238
+ - **Skip rate**: Are too many users skipping? (Maybe it's too long/not valuable)
239
+ - **Completion rate**: Are users completing? (If low, simplify)
240
+ - **Time to value**: How long until users get first value?
241
+
242
+ 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.
243
+