@friedbotstudio/create-baseline 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +222 -0
  3. package/bin/cli.js +247 -0
  4. package/obj/template/.claude/agents/swarm-worker.md +52 -0
  5. package/obj/template/.claude/bin/LICENSE +201 -0
  6. package/obj/template/.claude/bin/NOTICE +48 -0
  7. package/obj/template/.claude/commands/approve-spec.md +29 -0
  8. package/obj/template/.claude/commands/approve-swarm.md +27 -0
  9. package/obj/template/.claude/commands/grant-commit.md +19 -0
  10. package/obj/template/.claude/commands/init-project.md +191 -0
  11. package/obj/template/.claude/hooks/artifact_template_guard.sh +141 -0
  12. package/obj/template/.claude/hooks/consent_gate_grant.sh +89 -0
  13. package/obj/template/.claude/hooks/destructive_cmd_guard.sh +42 -0
  14. package/obj/template/.claude/hooks/env_guard.sh +36 -0
  15. package/obj/template/.claude/hooks/git_commit_guard.sh +93 -0
  16. package/obj/template/.claude/hooks/harness_continuation.sh +121 -0
  17. package/obj/template/.claude/hooks/lib/__pycache__/resume_writer.cpython-314.pyc +0 -0
  18. package/obj/template/.claude/hooks/lib/common.sh +328 -0
  19. package/obj/template/.claude/hooks/lib/resume_writer.py +341 -0
  20. package/obj/template/.claude/hooks/lint_runner.sh +55 -0
  21. package/obj/template/.claude/hooks/memory_pre_compact.sh +36 -0
  22. package/obj/template/.claude/hooks/memory_session_start.sh +244 -0
  23. package/obj/template/.claude/hooks/memory_stop.sh +173 -0
  24. package/obj/template/.claude/hooks/plantuml_syntax_guard.sh +161 -0
  25. package/obj/template/.claude/hooks/process_lifecycle_guard.sh +89 -0
  26. package/obj/template/.claude/hooks/setup_guard.sh +50 -0
  27. package/obj/template/.claude/hooks/spec_approval_guard.sh +81 -0
  28. package/obj/template/.claude/hooks/spec_design_calls_guard.sh +183 -0
  29. package/obj/template/.claude/hooks/spec_diagram_presence_guard.sh +141 -0
  30. package/obj/template/.claude/hooks/swarm_approval_guard.sh +39 -0
  31. package/obj/template/.claude/hooks/swarm_boundary_guard.sh +136 -0
  32. package/obj/template/.claude/hooks/tdd_order_guard.sh +176 -0
  33. package/obj/template/.claude/hooks/test_runner.sh +75 -0
  34. package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +12 -0
  35. package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +285 -0
  36. package/obj/template/.claude/hooks/track_guard.sh +127 -0
  37. package/obj/template/.claude/hooks/verify_pass_guard.sh +88 -0
  38. package/obj/template/.claude/memory/README.md +108 -0
  39. package/obj/template/.claude/memory/_pending.md +15 -0
  40. package/obj/template/.claude/memory/_resume.md +12 -0
  41. package/obj/template/.claude/memory/conventions.md +26 -0
  42. package/obj/template/.claude/memory/decisions.md +29 -0
  43. package/obj/template/.claude/memory/landmarks.md +26 -0
  44. package/obj/template/.claude/memory/landmines.md +27 -0
  45. package/obj/template/.claude/memory/libraries.md +27 -0
  46. package/obj/template/.claude/memory/pending-questions.md +28 -0
  47. package/obj/template/.claude/project.json +221 -0
  48. package/obj/template/.claude/settings.json +110 -0
  49. package/obj/template/.claude/skills/archive/SKILL.md +48 -0
  50. package/obj/template/.claude/skills/archive/archive.sh +145 -0
  51. package/obj/template/.claude/skills/audit-baseline/SKILL.md +80 -0
  52. package/obj/template/.claude/skills/audit-baseline/audit.sh +919 -0
  53. package/obj/template/.claude/skills/brd/SKILL.md +44 -0
  54. package/obj/template/.claude/skills/brd/template.md +83 -0
  55. package/obj/template/.claude/skills/chore/SKILL.md +99 -0
  56. package/obj/template/.claude/skills/claude-automation-recommender/LICENSE +202 -0
  57. package/obj/template/.claude/skills/claude-automation-recommender/NOTICE +69 -0
  58. package/obj/template/.claude/skills/claude-automation-recommender/SKILL.md +358 -0
  59. package/obj/template/.claude/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
  60. package/obj/template/.claude/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
  61. package/obj/template/.claude/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
  62. package/obj/template/.claude/skills/claude-automation-recommender/references/skills-reference.md +408 -0
  63. package/obj/template/.claude/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
  64. package/obj/template/.claude/skills/code-structure/SKILL.md +204 -0
  65. package/obj/template/.claude/skills/commit/SKILL.md +21 -0
  66. package/obj/template/.claude/skills/copywriting/SKILL.md +252 -0
  67. package/obj/template/.claude/skills/copywriting/evals/evals.json +111 -0
  68. package/obj/template/.claude/skills/copywriting/references/ai-writing-detection.md +200 -0
  69. package/obj/template/.claude/skills/copywriting/references/copy-frameworks.md +344 -0
  70. package/obj/template/.claude/skills/copywriting/references/natural-transitions.md +272 -0
  71. package/obj/template/.claude/skills/design-ui/SKILL.md +175 -0
  72. package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +89 -0
  73. package/obj/template/.claude/skills/design-ui/references/intent-table.md +64 -0
  74. package/obj/template/.claude/skills/design-ui/references/orchestration.md +121 -0
  75. package/obj/template/.claude/skills/design-ui/references/state-machine.md +125 -0
  76. package/obj/template/.claude/skills/document/SKILL.md +66 -0
  77. package/obj/template/.claude/skills/documentation/SKILL.md +50 -0
  78. package/obj/template/.claude/skills/harness/SKILL.md +169 -0
  79. package/obj/template/.claude/skills/humanizer/SKILL.md +489 -0
  80. package/obj/template/.claude/skills/humanizer/references/ai-writing-detection.md +208 -0
  81. package/obj/template/.claude/skills/impeccable/PROJECT_NOTES.md +22 -0
  82. package/obj/template/.claude/skills/impeccable/SKILL.md +153 -0
  83. package/obj/template/.claude/skills/impeccable/agents/openai.yaml +4 -0
  84. package/obj/template/.claude/skills/impeccable/reference/adapt.md +190 -0
  85. package/obj/template/.claude/skills/impeccable/reference/animate.md +173 -0
  86. package/obj/template/.claude/skills/impeccable/reference/audit.md +134 -0
  87. package/obj/template/.claude/skills/impeccable/reference/bolder.md +113 -0
  88. package/obj/template/.claude/skills/impeccable/reference/brand.md +104 -0
  89. package/obj/template/.claude/skills/impeccable/reference/clarify.md +174 -0
  90. package/obj/template/.claude/skills/impeccable/reference/cognitive-load.md +106 -0
  91. package/obj/template/.claude/skills/impeccable/reference/color-and-contrast.md +105 -0
  92. package/obj/template/.claude/skills/impeccable/reference/colorize.md +154 -0
  93. package/obj/template/.claude/skills/impeccable/reference/craft.md +138 -0
  94. package/obj/template/.claude/skills/impeccable/reference/critique.md +213 -0
  95. package/obj/template/.claude/skills/impeccable/reference/delight.md +302 -0
  96. package/obj/template/.claude/skills/impeccable/reference/distill.md +111 -0
  97. package/obj/template/.claude/skills/impeccable/reference/document.md +427 -0
  98. package/obj/template/.claude/skills/impeccable/reference/extract.md +70 -0
  99. package/obj/template/.claude/skills/impeccable/reference/harden.md +347 -0
  100. package/obj/template/.claude/skills/impeccable/reference/heuristics-scoring.md +234 -0
  101. package/obj/template/.claude/skills/impeccable/reference/interaction-design.md +195 -0
  102. package/obj/template/.claude/skills/impeccable/reference/layout.md +141 -0
  103. package/obj/template/.claude/skills/impeccable/reference/live.md +513 -0
  104. package/obj/template/.claude/skills/impeccable/reference/motion-design.md +99 -0
  105. package/obj/template/.claude/skills/impeccable/reference/onboard.md +234 -0
  106. package/obj/template/.claude/skills/impeccable/reference/optimize.md +258 -0
  107. package/obj/template/.claude/skills/impeccable/reference/overdrive.md +130 -0
  108. package/obj/template/.claude/skills/impeccable/reference/personas.md +178 -0
  109. package/obj/template/.claude/skills/impeccable/reference/polish.md +232 -0
  110. package/obj/template/.claude/skills/impeccable/reference/product.md +62 -0
  111. package/obj/template/.claude/skills/impeccable/reference/quieter.md +99 -0
  112. package/obj/template/.claude/skills/impeccable/reference/responsive-design.md +114 -0
  113. package/obj/template/.claude/skills/impeccable/reference/shape.md +136 -0
  114. package/obj/template/.claude/skills/impeccable/reference/spatial-design.md +100 -0
  115. package/obj/template/.claude/skills/impeccable/reference/teach.md +137 -0
  116. package/obj/template/.claude/skills/impeccable/reference/typeset.md +124 -0
  117. package/obj/template/.claude/skills/impeccable/reference/typography.md +159 -0
  118. package/obj/template/.claude/skills/impeccable/reference/ux-writing.md +107 -0
  119. package/obj/template/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
  120. package/obj/template/.claude/skills/impeccable/scripts/command-metadata.json +94 -0
  121. package/obj/template/.claude/skills/impeccable/scripts/design-parser.mjs +820 -0
  122. package/obj/template/.claude/skills/impeccable/scripts/detect-csp.mjs +198 -0
  123. package/obj/template/.claude/skills/impeccable/scripts/is-generated.mjs +69 -0
  124. package/obj/template/.claude/skills/impeccable/scripts/live-accept.mjs +465 -0
  125. package/obj/template/.claude/skills/impeccable/scripts/live-browser.js +4684 -0
  126. package/obj/template/.claude/skills/impeccable/scripts/live-inject.mjs +436 -0
  127. package/obj/template/.claude/skills/impeccable/scripts/live-poll.mjs +187 -0
  128. package/obj/template/.claude/skills/impeccable/scripts/live-server.mjs +679 -0
  129. package/obj/template/.claude/skills/impeccable/scripts/live-wrap.mjs +395 -0
  130. package/obj/template/.claude/skills/impeccable/scripts/live.mjs +247 -0
  131. package/obj/template/.claude/skills/impeccable/scripts/load-context.mjs +93 -0
  132. package/obj/template/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  133. package/obj/template/.claude/skills/impeccable/scripts/pin.mjs +214 -0
  134. package/obj/template/.claude/skills/implement/SKILL.md +83 -0
  135. package/obj/template/.claude/skills/intake/SKILL.md +46 -0
  136. package/obj/template/.claude/skills/intake/template.md +61 -0
  137. package/obj/template/.claude/skills/integrate/SKILL.md +62 -0
  138. package/obj/template/.claude/skills/memory-flush/SKILL.md +172 -0
  139. package/obj/template/.claude/skills/memory-flush/sweep.py +286 -0
  140. package/obj/template/.claude/skills/memory-flush/tests/run.sh +327 -0
  141. package/obj/template/.claude/skills/prose/SKILL.md +119 -0
  142. package/obj/template/.claude/skills/rca/SKILL.md +42 -0
  143. package/obj/template/.claude/skills/rca/template.md +83 -0
  144. package/obj/template/.claude/skills/research/SKILL.md +75 -0
  145. package/obj/template/.claude/skills/scenario/SKILL.md +64 -0
  146. package/obj/template/.claude/skills/scout/SKILL.md +72 -0
  147. package/obj/template/.claude/skills/security/SKILL.md +75 -0
  148. package/obj/template/.claude/skills/simplify/SKILL.md +67 -0
  149. package/obj/template/.claude/skills/spec/SKILL.md +69 -0
  150. package/obj/template/.claude/skills/spec/template.md +274 -0
  151. package/obj/template/.claude/skills/spec-diagram-review/SKILL.md +81 -0
  152. package/obj/template/.claude/skills/spec-lint/SKILL.md +55 -0
  153. package/obj/template/.claude/skills/spec-lint/lint.sh +218 -0
  154. package/obj/template/.claude/skills/spec-render/SKILL.md +45 -0
  155. package/obj/template/.claude/skills/spec-render/render.sh +109 -0
  156. package/obj/template/.claude/skills/spec-traceability-review/SKILL.md +72 -0
  157. package/obj/template/.claude/skills/swarm-dispatch/SKILL.md +212 -0
  158. package/obj/template/.claude/skills/swarm-dispatch/swarm_merge.sh +154 -0
  159. package/obj/template/.claude/skills/swarm-plan/SKILL.md +90 -0
  160. package/obj/template/.claude/skills/swarm-plan/validate.sh +181 -0
  161. package/obj/template/.claude/skills/tdd/SKILL.md +100 -0
  162. package/obj/template/.claude/skills/technical-tutorials/SKILL.md +569 -0
  163. package/obj/template/.claude/skills/technical-tutorials/references/audience-context-README.md +53 -0
  164. package/obj/template/.claude/skills/technical-tutorials/references/audience-context.md +246 -0
  165. package/obj/template/.claude/skills/technical-tutorials/references/audience-example.md +175 -0
  166. package/obj/template/.claude/skills/technical-tutorials/references/audience-template.md +152 -0
  167. package/obj/template/.claude/skills/triage/SKILL.md +55 -0
  168. package/obj/template/.claude/skills/verify/SKILL.md +74 -0
  169. package/obj/template/.mcp.json +24 -0
  170. package/obj/template/CLAUDE.md +327 -0
  171. package/obj/template/docs/init/seed.md +585 -0
  172. package/obj/template/manifest.json +214 -0
  173. package/package.json +48 -0
  174. package/src/.mcp.template.json +24 -0
  175. package/src/.npmrc.template +2 -0
  176. package/src/CLAUDE.template.md +327 -0
  177. package/src/agents/swarm-worker.template.md +51 -0
  178. package/src/cli/conflict.js +31 -0
  179. package/src/cli/doctor.js +152 -0
  180. package/src/cli/install.js +93 -0
  181. package/src/cli/io.js +27 -0
  182. package/src/cli/manifest.js +38 -0
  183. package/src/cli/mcp.js +54 -0
  184. package/src/cli/merge.js +107 -0
  185. package/src/cli/plantuml.js +121 -0
  186. package/src/cli/util.js +10 -0
  187. package/src/memory/_pending.template.md +15 -0
  188. package/src/memory/_resume.template.md +12 -0
  189. package/src/memory/conventions.template.md +26 -0
  190. package/src/memory/decisions.template.md +29 -0
  191. package/src/memory/landmarks.template.md +26 -0
  192. package/src/memory/landmines.template.md +27 -0
  193. package/src/memory/libraries.template.md +27 -0
  194. package/src/memory/pending-questions.template.md +28 -0
  195. package/src/project.template.json +221 -0
  196. package/src/seed.template.md +585 -0
  197. package/src/settings.template.json +110 -0
@@ -0,0 +1,234 @@
1
+ > **Additional context needed**: the "aha moment" you want users to reach, and users' experience level.
2
+
3
+ Create or improve onboarding experiences that help users understand, adopt, and succeed with the product quickly.
4
+
5
+ ## Assess Onboarding Needs
6
+
7
+ Understand what users need to learn and why:
8
+
9
+ 1. **Identify the challenge**:
10
+ - What are users trying to accomplish?
11
+ - What's confusing or unclear about current experience?
12
+ - Where do users get stuck or drop off?
13
+ - What's the "aha moment" we want users to reach?
14
+
15
+ 2. **Understand the users**:
16
+ - What's their experience level? (Beginners, power users, mixed?)
17
+ - What's their motivation? (Excited and exploring? Required by work?)
18
+ - What's their time commitment? (5 minutes? 30 minutes?)
19
+ - What alternatives do they know? (Coming from competitor? New to category?)
20
+
21
+ 3. **Define success**:
22
+ - What's the minimum users need to learn to be successful?
23
+ - What's the key action we want them to take? (First project? First invite?)
24
+ - How do we know onboarding worked? (Completion rate? Time to value?)
25
+
26
+ **CRITICAL**: Onboarding should get users to value as quickly as possible, not teach everything possible.
27
+
28
+ ## Onboarding Principles
29
+
30
+ Follow these core principles:
31
+
32
+ ### Show, Don't Tell
33
+ - Demonstrate with working examples, not just descriptions
34
+ - Provide real functionality in onboarding, not separate tutorial mode
35
+ - Use progressive disclosure, teach one thing at a time
36
+
37
+ ### Make It Optional (When Possible)
38
+ - Let experienced users skip onboarding
39
+ - Don't block access to product
40
+ - Provide "Skip" or "I'll explore on my own" options
41
+
42
+ ### Time to Value
43
+ - Get users to their "aha moment" ASAP
44
+ - Front-load most important concepts
45
+ - Teach 20% that delivers 80% of value
46
+ - Save advanced features for contextual discovery
47
+
48
+ ### Context Over Ceremony
49
+ - Teach features when users need them, not upfront
50
+ - Empty states are onboarding opportunities
51
+ - Tooltips and hints at point of use
52
+
53
+ ### Respect User Intelligence
54
+ - Don't patronize or over-explain
55
+ - Be concise and clear
56
+ - Assume users can figure out standard patterns
57
+
58
+ ## Design Onboarding Experiences
59
+
60
+ Create appropriate onboarding for the context:
61
+
62
+ ### Initial Product Onboarding
63
+
64
+ **Welcome Screen**:
65
+ - Clear value proposition (what is this product?)
66
+ - What users will learn/accomplish
67
+ - Time estimate (honest about commitment)
68
+ - Option to skip (for experienced users)
69
+
70
+ **Account Setup**:
71
+ - Minimal required information (collect more later)
72
+ - Explain why you're asking for each piece of information
73
+ - Smart defaults where possible
74
+ - Social login when appropriate
75
+
76
+ **Core Concept Introduction**:
77
+ - Introduce 1-3 core concepts (not everything)
78
+ - Use simple language and examples
79
+ - Interactive when possible (do, don't just read)
80
+ - Progress indication (step 1 of 3)
81
+
82
+ **First Success**:
83
+ - Guide users to accomplish something real
84
+ - Pre-populated examples or templates
85
+ - Celebrate completion (but don't overdo it)
86
+ - Clear next steps
87
+
88
+ ### Feature Discovery & Adoption
89
+
90
+ **Empty States**:
91
+ Instead of blank space, show:
92
+ - What will appear here (description + screenshot/illustration)
93
+ - Why it's valuable
94
+ - Clear CTA to create first item
95
+ - Example or template option
96
+
97
+ Example:
98
+ ```
99
+ No projects yet
100
+ Projects help you organize your work and collaborate with your team.
101
+ [Create your first project] or [Start from template]
102
+ ```
103
+
104
+ **Contextual Tooltips**:
105
+ - Appear at relevant moment (first time user sees feature)
106
+ - Point directly at relevant UI element
107
+ - Brief explanation + benefit
108
+ - Dismissable (with "Don't show again" option)
109
+ - Optional "Learn more" link
110
+
111
+ **Feature Announcements**:
112
+ - Highlight new features when they're released
113
+ - Show what's new and why it matters
114
+ - Let users try immediately
115
+ - Dismissable
116
+
117
+ **Progressive Onboarding**:
118
+ - Teach features when users encounter them
119
+ - Badges or indicators on new/unused features
120
+ - Unlock complexity gradually (don't show all options immediately)
121
+
122
+ ### Guided Tours & Walkthroughs
123
+
124
+ **When to use**:
125
+ - Complex interfaces with many features
126
+ - Significant changes to existing product
127
+ - Industry-specific tools needing domain knowledge
128
+
129
+ **How to design**:
130
+ - Spotlight specific UI elements (dim rest of page)
131
+ - Keep steps short (3-7 steps max per tour)
132
+ - Allow users to click through tour freely
133
+ - Include "Skip tour" option
134
+ - Make replayable (help menu)
135
+
136
+ **Best practices**:
137
+ - Interactive over passive (let users click real buttons)
138
+ - Focus on workflow, not features ("Create a project" not "This is the project button")
139
+ - Provide sample data so actions work
140
+
141
+ ### Interactive Tutorials
142
+
143
+ **When to use**:
144
+ - Users need hands-on practice
145
+ - Concepts are complex or unfamiliar
146
+ - High stakes (better to practice in safe environment)
147
+
148
+ **How to design**:
149
+ - Sandbox environment with sample data
150
+ - Clear objectives ("Create a chart showing sales by region")
151
+ - Step-by-step guidance
152
+ - Validation (confirm they did it right)
153
+ - Graduation moment (you're ready!)
154
+
155
+ ### Documentation & Help
156
+
157
+ **In-product help**:
158
+ - Contextual help links throughout interface
159
+ - Keyboard shortcut reference
160
+ - Search-able help center
161
+ - Video tutorials for complex workflows
162
+
163
+ **Help patterns**:
164
+ - `?` icon near complex features
165
+ - "Learn more" links in tooltips
166
+ - Keyboard shortcut hints (`⌘K` shown on search box)
167
+
168
+ ## Empty State Design
169
+
170
+ Every empty state needs:
171
+
172
+ ### What Will Be Here
173
+ "Your recent projects will appear here"
174
+
175
+ ### Why It Matters
176
+ "Projects help you organize your work and collaborate with your team"
177
+
178
+ ### How to Get Started
179
+ [Create project] or [Import from template]
180
+
181
+ ### Visual Interest
182
+ Illustration or icon (not just text on blank page)
183
+
184
+ ### Contextual Help
185
+ "Need help getting started? [Watch 2-min tutorial]"
186
+
187
+ **Empty state types**:
188
+ - **First use**: Never used this feature (emphasize value, provide template)
189
+ - **User cleared**: Intentionally deleted everything (light touch, easy to recreate)
190
+ - **No results**: Search or filter returned nothing (suggest different query, clear filters)
191
+ - **No permissions**: Can't access (explain why, how to get access)
192
+ - **Error state**: Failed to load (explain what happened, retry option)
193
+
194
+ ## Implementation Patterns
195
+
196
+ ### Technical approaches:
197
+
198
+ **Tooltip libraries**: Tippy.js, Popper.js
199
+ **Tour libraries**: Intro.js, Shepherd.js, React Joyride
200
+ **Modal patterns**: Focus trap, backdrop, ESC to close
201
+ **Progress tracking**: LocalStorage for "seen" states
202
+ **Analytics**: Track completion, drop-off points
203
+
204
+ **Storage patterns**:
205
+ ```javascript
206
+ // Track which onboarding steps user has seen
207
+ localStorage.setItem('onboarding-completed', 'true');
208
+ localStorage.setItem('feature-tooltip-seen-reports', 'true');
209
+ ```
210
+
211
+ **IMPORTANT**: Don't show same onboarding twice (annoying). Track completion and respect dismissals.
212
+
213
+ **NEVER**:
214
+ - Force users through long onboarding before they can use product
215
+ - Patronize users with obvious explanations
216
+ - Show same tooltip repeatedly (respect dismissals)
217
+ - Block all UI during tour (let users explore)
218
+ - Create separate tutorial mode disconnected from real product
219
+ - Overwhelm with information upfront (progressive disclosure!)
220
+ - Hide "Skip" or make it hard to find
221
+ - Forget about returning users (don't show initial onboarding again)
222
+
223
+ ## Verify Onboarding Quality
224
+
225
+ Test with real users:
226
+
227
+ - **Time to completion**: Can users complete onboarding quickly?
228
+ - **Comprehension**: Do users understand after completing?
229
+ - **Action**: Do users take desired next step?
230
+ - **Skip rate**: Are too many users skipping? (Maybe it's too long or not valuable)
231
+ - **Completion rate**: Are users completing? (If low, simplify)
232
+ - **Time to value**: How long until users get first value?
233
+
234
+ 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.
@@ -0,0 +1,258 @@
1
+ Identify and fix performance issues to create faster, smoother user experiences.
2
+
3
+ ## Assess Performance Issues
4
+
5
+ Understand current performance and identify problems:
6
+
7
+ 1. **Measure current state**:
8
+ - **Core Web Vitals**: LCP, FID/INP, CLS scores
9
+ - **Load time**: Time to interactive, first contentful paint
10
+ - **Bundle size**: JavaScript, CSS, image sizes
11
+ - **Runtime performance**: Frame rate, memory usage, CPU usage
12
+ - **Network**: Request count, payload sizes, waterfall
13
+
14
+ 2. **Identify bottlenecks**:
15
+ - What's slow? (Initial load? Interactions? Animations?)
16
+ - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?)
17
+ - How bad is it? (Perceivable? Annoying? Blocking?)
18
+ - Who's affected? (All users? Mobile only? Slow connections?)
19
+
20
+ **CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters.
21
+
22
+ ## Optimization Strategy
23
+
24
+ Create systematic improvement plan:
25
+
26
+ ### Loading Performance
27
+
28
+ **Optimize Images**:
29
+ - Use modern formats (WebP, AVIF)
30
+ - Proper sizing (don't load 3000px image for 300px display)
31
+ - Lazy loading for below-fold images
32
+ - Responsive images (`srcset`, `picture` element)
33
+ - Compress images (80-85% quality is usually imperceptible)
34
+ - Use CDN for faster delivery
35
+
36
+ ```html
37
+ <img
38
+ src="hero.webp"
39
+ srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
40
+ sizes="(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"
41
+ loading="lazy"
42
+ alt="Hero image"
43
+ />
44
+ ```
45
+
46
+ **Reduce JavaScript Bundle**:
47
+ - Code splitting (route-based, component-based)
48
+ - Tree shaking (remove unused code)
49
+ - Remove unused dependencies
50
+ - Lazy load non-critical code
51
+ - Use dynamic imports for large components
52
+
53
+ ```javascript
54
+ // Lazy load heavy component
55
+ const HeavyChart = lazy(() => import('./HeavyChart'));
56
+ ```
57
+
58
+ **Optimize CSS**:
59
+ - Remove unused CSS
60
+ - Critical CSS inline, rest async
61
+ - Minimize CSS files
62
+ - Use CSS containment for independent regions
63
+
64
+ **Optimize Fonts**:
65
+ - Use `font-display: swap` or `optional`
66
+ - Subset fonts (only characters you need)
67
+ - Preload critical fonts
68
+ - Use system fonts when appropriate
69
+ - Limit font weights loaded
70
+
71
+ ```css
72
+ @font-face {
73
+ font-family: 'CustomFont';
74
+ src: url('/fonts/custom.woff2') format('woff2');
75
+ font-display: swap; /* Show fallback immediately */
76
+ unicode-range: U+0020-007F; /* Basic Latin only */
77
+ }
78
+ ```
79
+
80
+ **Optimize Loading Strategy**:
81
+ - Critical resources first (async/defer non-critical)
82
+ - Preload critical assets
83
+ - Prefetch likely next pages
84
+ - Service worker for offline/caching
85
+ - HTTP/2 or HTTP/3 for multiplexing
86
+
87
+ ### Rendering Performance
88
+
89
+ **Avoid Layout Thrashing**:
90
+ ```javascript
91
+ // ❌ Bad: Alternating reads and writes (causes reflows)
92
+ elements.forEach(el => {
93
+ const height = el.offsetHeight; // Read (forces layout)
94
+ el.style.height = height * 2; // Write
95
+ });
96
+
97
+ // ✅ Good: Batch reads, then batch writes
98
+ const heights = elements.map(el => el.offsetHeight); // All reads
99
+ elements.forEach((el, i) => {
100
+ el.style.height = heights[i] * 2; // All writes
101
+ });
102
+ ```
103
+
104
+ **Optimize Rendering**:
105
+ - Use CSS `contain` property for independent regions
106
+ - Minimize DOM depth (flatter is faster)
107
+ - Reduce DOM size (fewer elements)
108
+ - Use `content-visibility: auto` for long lists
109
+ - Virtual scrolling for very long lists (react-window, react-virtualized)
110
+
111
+ **Reduce Paint & Composite**:
112
+ - Use `transform` and `opacity` for animations (GPU-accelerated)
113
+ - Avoid animating layout properties (width, height, top, left)
114
+ - Use `will-change` sparingly for known expensive operations
115
+ - Minimize paint areas (smaller is faster)
116
+
117
+ ### Animation Performance
118
+
119
+ **GPU Acceleration**:
120
+ ```css
121
+ /* ✅ GPU-accelerated (fast) */
122
+ .animated {
123
+ transform: translateX(100px);
124
+ opacity: 0.5;
125
+ }
126
+
127
+ /* ❌ CPU-bound (slow) */
128
+ .animated {
129
+ left: 100px;
130
+ width: 300px;
131
+ }
132
+ ```
133
+
134
+ **Smooth 60fps**:
135
+ - Target 16ms per frame (60fps)
136
+ - Use `requestAnimationFrame` for JS animations
137
+ - Debounce/throttle scroll handlers
138
+ - Use CSS animations when possible
139
+ - Avoid long-running JavaScript during animations
140
+
141
+ **Intersection Observer**:
142
+ ```javascript
143
+ // Efficiently detect when elements enter viewport
144
+ const observer = new IntersectionObserver((entries) => {
145
+ entries.forEach(entry => {
146
+ if (entry.isIntersecting) {
147
+ // Element is visible, lazy load or animate
148
+ }
149
+ });
150
+ });
151
+ ```
152
+
153
+ ### React/Framework Optimization
154
+
155
+ **React-specific**:
156
+ - Use `memo()` for expensive components
157
+ - `useMemo()` and `useCallback()` for expensive computations
158
+ - Virtualize long lists
159
+ - Code split routes
160
+ - Avoid inline function creation in render
161
+ - Use React DevTools Profiler
162
+
163
+ **Framework-agnostic**:
164
+ - Minimize re-renders
165
+ - Debounce expensive operations
166
+ - Memoize computed values
167
+ - Lazy load routes and components
168
+
169
+ ### Network Optimization
170
+
171
+ **Reduce Requests**:
172
+ - Combine small files
173
+ - Use SVG sprites for icons
174
+ - Inline small critical assets
175
+ - Remove unused third-party scripts
176
+
177
+ **Optimize APIs**:
178
+ - Use pagination (don't load everything)
179
+ - GraphQL to request only needed fields
180
+ - Response compression (gzip, brotli)
181
+ - HTTP caching headers
182
+ - CDN for static assets
183
+
184
+ **Optimize for Slow Connections**:
185
+ - Adaptive loading based on connection (navigator.connection)
186
+ - Optimistic UI updates
187
+ - Request prioritization
188
+ - Progressive enhancement
189
+
190
+ ## Core Web Vitals Optimization
191
+
192
+ ### Largest Contentful Paint (LCP < 2.5s)
193
+ - Optimize hero images
194
+ - Inline critical CSS
195
+ - Preload key resources
196
+ - Use CDN
197
+ - Server-side rendering
198
+
199
+ ### First Input Delay (FID < 100ms) / INP (< 200ms)
200
+ - Break up long tasks
201
+ - Defer non-critical JavaScript
202
+ - Use web workers for heavy computation
203
+ - Reduce JavaScript execution time
204
+
205
+ ### Cumulative Layout Shift (CLS < 0.1)
206
+ - Set dimensions on images and videos
207
+ - Don't inject content above existing content
208
+ - Use `aspect-ratio` CSS property
209
+ - Reserve space for ads/embeds
210
+ - Avoid animations that cause layout shifts
211
+
212
+ ```css
213
+ /* Reserve space for image */
214
+ .image-container {
215
+ aspect-ratio: 16 / 9;
216
+ }
217
+ ```
218
+
219
+ ## Performance Monitoring
220
+
221
+ **Tools to use**:
222
+ - Chrome DevTools (Lighthouse, Performance panel)
223
+ - WebPageTest
224
+ - Core Web Vitals (Chrome UX Report)
225
+ - Bundle analyzers (webpack-bundle-analyzer)
226
+ - Performance monitoring (Sentry, DataDog, New Relic)
227
+
228
+ **Key metrics**:
229
+ - LCP, FID/INP, CLS (Core Web Vitals)
230
+ - Time to Interactive (TTI)
231
+ - First Contentful Paint (FCP)
232
+ - Total Blocking Time (TBT)
233
+ - Bundle size
234
+ - Request count
235
+
236
+ **IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative.
237
+
238
+ **NEVER**:
239
+ - Optimize without measuring (premature optimization)
240
+ - Sacrifice accessibility for performance
241
+ - Break functionality while optimizing
242
+ - Use `will-change` everywhere (creates new layers, uses memory)
243
+ - Lazy load above-fold content
244
+ - Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first)
245
+ - Forget about mobile performance (often slower devices, slower connections)
246
+
247
+ ## Verify Improvements
248
+
249
+ Test that optimizations worked:
250
+
251
+ - **Before/after metrics**: Compare Lighthouse scores
252
+ - **Real user monitoring**: Track improvements for real users
253
+ - **Different devices**: Test on low-end Android, not just flagship iPhone
254
+ - **Slow connections**: Throttle to 3G, test experience
255
+ - **No regressions**: Ensure functionality still works
256
+ - **User perception**: Does it *feel* faster?
257
+
258
+ Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance.
@@ -0,0 +1,130 @@
1
+ Start your response with:
2
+
3
+ ```
4
+ ──────────── ⚡ OVERDRIVE ─────────────
5
+ 》》》 Entering overdrive mode...
6
+ ```
7
+
8
+ Push an interface past conventional limits. This isn't just about visual effects. It's about using the full power of the browser to make any part of an interface feel extraordinary: a table that handles a million rows, a dialog that morphs from its trigger, a form that validates in real-time with streaming feedback, a page transition that feels cinematic.
9
+
10
+ **EXTRA IMPORTANT FOR THIS COMMAND**: Context determines what "extraordinary" means. A particle system on a creative portfolio is impressive. The same particle system on a settings page is embarrassing. But a settings page with instant optimistic saves and animated state transitions? That's extraordinary too. Understand the project's personality and goals before deciding what's appropriate.
11
+
12
+ ### Propose Before Building
13
+
14
+ This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
15
+
16
+ 1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like.
17
+ 2. **ask the user directly to clarify what you cannot infer.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
18
+ 3. Only proceed with the direction the user confirms.
19
+
20
+ Skipping this step risks building something embarrassing that needs to be thrown away.
21
+
22
+ ### Iterate with Browser Automation
23
+
24
+ Technically ambitious effects almost never work on the first try. You MUST actively use browser automation tools to preview your work, visually verify the result, and iterate. Do not assume the effect looks right, check it. Expect multiple rounds of refinement. The gap between "technically works" and "looks extraordinary" is closed through visual iteration, not code alone.
25
+
26
+ ---
27
+
28
+ ## Assess What "Extraordinary" Means Here
29
+
30
+ The right kind of technical ambition depends entirely on what you're working with. Before choosing a technique, ask: **what would make a user of THIS specific interface say "wow, that's nice"?**
31
+
32
+ ### For visual/marketing surfaces
33
+ Pages, hero sections, landing pages, portfolios — the "wow" is often sensory: a scroll-driven reveal, a shader background, a cinematic page transition, generative art that responds to the cursor.
34
+
35
+ ### For functional UI
36
+ Tables, forms, dialogs, navigation — the "wow" is in how it FEELS: a dialog that morphs from the button that triggered it via View Transitions, a data table that renders 100k rows at 60fps via virtual scrolling, a form with streaming validation that feels instant, drag-and-drop with spring physics.
37
+
38
+ ### For performance-critical UI
39
+ The "wow" is invisible but felt: a search that filters 50k items without a flicker, a complex form that never blocks the main thread, an image editor that processes in near-real-time. The interface just never hesitates.
40
+
41
+ ### For data-heavy interfaces
42
+ Charts and dashboards — the "wow" is in fluidity: GPU-accelerated rendering via Canvas/WebGL for massive datasets, animated transitions between data states, force-directed graph layouts that settle naturally.
43
+
44
+ **The common thread**: something about the implementation goes beyond what users expect from a web interface. The technique serves the experience, not the other way around.
45
+
46
+ ## The Toolkit
47
+
48
+ Organized by what you're trying to achieve, not by technology name.
49
+
50
+ ### Make transitions feel cinematic
51
+ - **View Transitions API** (same-document: all browsers; cross-document: no Firefox) — shared element morphing between states. A list item expanding into a detail page. A button morphing into a dialog. This is the closest thing to native FLIP animations.
52
+ - **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes
53
+ - **Spring physics** — natural motion with mass, tension, and damping instead of cubic-bezier. Libraries: motion (formerly Framer Motion), GSAP, or roll your own spring solver.
54
+
55
+ ### Tie animation to scroll position
56
+ - **Scroll-driven animations** (`animation-timeline: scroll()`) — CSS-only, no JS. Parallax, progress bars, reveal sequences all driven by scroll position. (Chrome/Edge/Safari; Firefox: flag only — always provide a static fallback)
57
+
58
+ ### Render beyond CSS
59
+ - **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express.
60
+ - **WebGPU** (Chrome/Edge; Safari partial; Firefox: flag only) — next-gen GPU compute. More powerful than WebGL but limited browser support. Always fall back to WebGL2.
61
+ - **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas.
62
+ - **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable.
63
+
64
+ ### Make data feel alive
65
+ - **Virtual scrolling** — render only visible rows for tables/lists with tens of thousands of items. No library required for simple cases; TanStack Virtual for complex ones.
66
+ - **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers.
67
+ - **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts.
68
+
69
+ ### Animate complex properties
70
+ - **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate.
71
+ - **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography.
72
+
73
+ ### Push performance boundaries
74
+ - **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank.
75
+ - **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background.
76
+ - **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs.
77
+
78
+ ### Interact with the device
79
+ - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start.
80
+ - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission.
81
+
82
+ **NOTE**: This command is about enhancing how an interface FEELS, not changing what a product DOES. Adding real-time collaboration, offline support, or new backend capabilities are product decisions, not UI enhancements. Focus on making existing features feel extraordinary.
83
+
84
+ ## Implement with Discipline
85
+
86
+ ### Progressive enhancement is non-negotiable
87
+
88
+ Every technique must degrade gracefully. The experience without the enhancement must still be good.
89
+
90
+ ```css
91
+ @supports (animation-timeline: scroll()) {
92
+ .hero { animation-timeline: scroll(); }
93
+ }
94
+ ```
95
+
96
+ ```javascript
97
+ if ('gpu' in navigator) { /* WebGPU */ }
98
+ else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ }
99
+ /* CSS-only fallback must still look good */
100
+ ```
101
+
102
+ ### Performance rules
103
+
104
+ - Target 60fps. If dropping below 50, simplify.
105
+ - Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative.
106
+ - Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport.
107
+ - Pause off-screen rendering. Kill what you can't see.
108
+ - Test on real mid-range devices, not just your development machine.
109
+
110
+ ### Polish is the difference
111
+
112
+ The gap between "cool" and "extraordinary" is in the last 20% of refinement: the easing curve on a spring animation, the timing offset in a staggered reveal, the subtle secondary motion that makes a transition feel physical. Don't ship the first version that works — ship the version that feels inevitable.
113
+
114
+ **NEVER**:
115
+ - Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion
116
+ - Ship effects that cause jank on mid-range devices
117
+ - Use bleeding-edge APIs without a functional fallback
118
+ - Add sound without explicit user opt-in
119
+ - Use technical ambition to mask weak design fundamentals; fix those first with other commands
120
+ - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise
121
+
122
+ ## Verify the Result
123
+
124
+ - **The wow test**: Show it to someone who hasn't seen it. Do they react?
125
+ - **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice?
126
+ - **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth?
127
+ - **The accessibility test**: Enable reduced motion. Still beautiful?
128
+ - **The context test**: Does this make sense for THIS brand and audience?
129
+
130
+ Remember: "Technically extraordinary" isn't about using the newest API. It's about making an interface do something users didn't think a website could do.