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