ccg-workflow 1.8.1 → 1.8.4

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.B875X4bw.mjs → ccg-workflow.BngAQymM.mjs} +205 -7
  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,266 @@
1
+ ---
2
+ name: optimize
3
+ description: "Diagnoses and fixes UI performance across loading speed, rendering, animations, images, and bundle size. Use when the user mentions slow, laggy, janky, performance, bundle size, load time, or wants a faster, smoother experience."
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ Identify and fix performance issues to create faster, smoother user experiences.
9
+
10
+ ## Assess Performance Issues
11
+
12
+ Understand current performance and identify problems:
13
+
14
+ 1. **Measure current state**:
15
+ - **Core Web Vitals**: LCP, FID/INP, CLS scores
16
+ - **Load time**: Time to interactive, first contentful paint
17
+ - **Bundle size**: JavaScript, CSS, image sizes
18
+ - **Runtime performance**: Frame rate, memory usage, CPU usage
19
+ - **Network**: Request count, payload sizes, waterfall
20
+
21
+ 2. **Identify bottlenecks**:
22
+ - What's slow? (Initial load? Interactions? Animations?)
23
+ - What's causing it? (Large images? Expensive JavaScript? Layout thrashing?)
24
+ - How bad is it? (Perceivable? Annoying? Blocking?)
25
+ - Who's affected? (All users? Mobile only? Slow connections?)
26
+
27
+ **CRITICAL**: Measure before and after. Premature optimization wastes time. Optimize what actually matters.
28
+
29
+ ## Optimization Strategy
30
+
31
+ Create systematic improvement plan:
32
+
33
+ ### Loading Performance
34
+
35
+ **Optimize Images**:
36
+ - Use modern formats (WebP, AVIF)
37
+ - Proper sizing (don't load 3000px image for 300px display)
38
+ - Lazy loading for below-fold images
39
+ - Responsive images (`srcset`, `picture` element)
40
+ - Compress images (80-85% quality is usually imperceptible)
41
+ - Use CDN for faster delivery
42
+
43
+ ```html
44
+ <img
45
+ src="hero.webp"
46
+ srcset="hero-400.webp 400w, hero-800.webp 800w, hero-1200.webp 1200w"
47
+ sizes="(max-width: 400px) 400px, (max-width: 800px) 800px, 1200px"
48
+ loading="lazy"
49
+ alt="Hero image"
50
+ />
51
+ ```
52
+
53
+ **Reduce JavaScript Bundle**:
54
+ - Code splitting (route-based, component-based)
55
+ - Tree shaking (remove unused code)
56
+ - Remove unused dependencies
57
+ - Lazy load non-critical code
58
+ - Use dynamic imports for large components
59
+
60
+ ```javascript
61
+ // Lazy load heavy component
62
+ const HeavyChart = lazy(() => import('./HeavyChart'));
63
+ ```
64
+
65
+ **Optimize CSS**:
66
+ - Remove unused CSS
67
+ - Critical CSS inline, rest async
68
+ - Minimize CSS files
69
+ - Use CSS containment for independent regions
70
+
71
+ **Optimize Fonts**:
72
+ - Use `font-display: swap` or `optional`
73
+ - Subset fonts (only characters you need)
74
+ - Preload critical fonts
75
+ - Use system fonts when appropriate
76
+ - Limit font weights loaded
77
+
78
+ ```css
79
+ @font-face {
80
+ font-family: 'CustomFont';
81
+ src: url('/fonts/custom.woff2') format('woff2');
82
+ font-display: swap; /* Show fallback immediately */
83
+ unicode-range: U+0020-007F; /* Basic Latin only */
84
+ }
85
+ ```
86
+
87
+ **Optimize Loading Strategy**:
88
+ - Critical resources first (async/defer non-critical)
89
+ - Preload critical assets
90
+ - Prefetch likely next pages
91
+ - Service worker for offline/caching
92
+ - HTTP/2 or HTTP/3 for multiplexing
93
+
94
+ ### Rendering Performance
95
+
96
+ **Avoid Layout Thrashing**:
97
+ ```javascript
98
+ // ❌ Bad: Alternating reads and writes (causes reflows)
99
+ elements.forEach(el => {
100
+ const height = el.offsetHeight; // Read (forces layout)
101
+ el.style.height = height * 2; // Write
102
+ });
103
+
104
+ // ✅ Good: Batch reads, then batch writes
105
+ const heights = elements.map(el => el.offsetHeight); // All reads
106
+ elements.forEach((el, i) => {
107
+ el.style.height = heights[i] * 2; // All writes
108
+ });
109
+ ```
110
+
111
+ **Optimize Rendering**:
112
+ - Use CSS `contain` property for independent regions
113
+ - Minimize DOM depth (flatter is faster)
114
+ - Reduce DOM size (fewer elements)
115
+ - Use `content-visibility: auto` for long lists
116
+ - Virtual scrolling for very long lists (react-window, react-virtualized)
117
+
118
+ **Reduce Paint & Composite**:
119
+ - Use `transform` and `opacity` for animations (GPU-accelerated)
120
+ - Avoid animating layout properties (width, height, top, left)
121
+ - Use `will-change` sparingly for known expensive operations
122
+ - Minimize paint areas (smaller is faster)
123
+
124
+ ### Animation Performance
125
+
126
+ **GPU Acceleration**:
127
+ ```css
128
+ /* ✅ GPU-accelerated (fast) */
129
+ .animated {
130
+ transform: translateX(100px);
131
+ opacity: 0.5;
132
+ }
133
+
134
+ /* ❌ CPU-bound (slow) */
135
+ .animated {
136
+ left: 100px;
137
+ width: 300px;
138
+ }
139
+ ```
140
+
141
+ **Smooth 60fps**:
142
+ - Target 16ms per frame (60fps)
143
+ - Use `requestAnimationFrame` for JS animations
144
+ - Debounce/throttle scroll handlers
145
+ - Use CSS animations when possible
146
+ - Avoid long-running JavaScript during animations
147
+
148
+ **Intersection Observer**:
149
+ ```javascript
150
+ // Efficiently detect when elements enter viewport
151
+ const observer = new IntersectionObserver((entries) => {
152
+ entries.forEach(entry => {
153
+ if (entry.isIntersecting) {
154
+ // Element is visible, lazy load or animate
155
+ }
156
+ });
157
+ });
158
+ ```
159
+
160
+ ### React/Framework Optimization
161
+
162
+ **React-specific**:
163
+ - Use `memo()` for expensive components
164
+ - `useMemo()` and `useCallback()` for expensive computations
165
+ - Virtualize long lists
166
+ - Code split routes
167
+ - Avoid inline function creation in render
168
+ - Use React DevTools Profiler
169
+
170
+ **Framework-agnostic**:
171
+ - Minimize re-renders
172
+ - Debounce expensive operations
173
+ - Memoize computed values
174
+ - Lazy load routes and components
175
+
176
+ ### Network Optimization
177
+
178
+ **Reduce Requests**:
179
+ - Combine small files
180
+ - Use SVG sprites for icons
181
+ - Inline small critical assets
182
+ - Remove unused third-party scripts
183
+
184
+ **Optimize APIs**:
185
+ - Use pagination (don't load everything)
186
+ - GraphQL to request only needed fields
187
+ - Response compression (gzip, brotli)
188
+ - HTTP caching headers
189
+ - CDN for static assets
190
+
191
+ **Optimize for Slow Connections**:
192
+ - Adaptive loading based on connection (navigator.connection)
193
+ - Optimistic UI updates
194
+ - Request prioritization
195
+ - Progressive enhancement
196
+
197
+ ## Core Web Vitals Optimization
198
+
199
+ ### Largest Contentful Paint (LCP < 2.5s)
200
+ - Optimize hero images
201
+ - Inline critical CSS
202
+ - Preload key resources
203
+ - Use CDN
204
+ - Server-side rendering
205
+
206
+ ### First Input Delay (FID < 100ms) / INP (< 200ms)
207
+ - Break up long tasks
208
+ - Defer non-critical JavaScript
209
+ - Use web workers for heavy computation
210
+ - Reduce JavaScript execution time
211
+
212
+ ### Cumulative Layout Shift (CLS < 0.1)
213
+ - Set dimensions on images and videos
214
+ - Don't inject content above existing content
215
+ - Use `aspect-ratio` CSS property
216
+ - Reserve space for ads/embeds
217
+ - Avoid animations that cause layout shifts
218
+
219
+ ```css
220
+ /* Reserve space for image */
221
+ .image-container {
222
+ aspect-ratio: 16 / 9;
223
+ }
224
+ ```
225
+
226
+ ## Performance Monitoring
227
+
228
+ **Tools to use**:
229
+ - Chrome DevTools (Lighthouse, Performance panel)
230
+ - WebPageTest
231
+ - Core Web Vitals (Chrome UX Report)
232
+ - Bundle analyzers (webpack-bundle-analyzer)
233
+ - Performance monitoring (Sentry, DataDog, New Relic)
234
+
235
+ **Key metrics**:
236
+ - LCP, FID/INP, CLS (Core Web Vitals)
237
+ - Time to Interactive (TTI)
238
+ - First Contentful Paint (FCP)
239
+ - Total Blocking Time (TBT)
240
+ - Bundle size
241
+ - Request count
242
+
243
+ **IMPORTANT**: Measure on real devices with real network conditions. Desktop Chrome with fast connection isn't representative.
244
+
245
+ **NEVER**:
246
+ - Optimize without measuring (premature optimization)
247
+ - Sacrifice accessibility for performance
248
+ - Break functionality while optimizing
249
+ - Use `will-change` everywhere (creates new layers, uses memory)
250
+ - Lazy load above-fold content
251
+ - Optimize micro-optimizations while ignoring major issues (optimize the biggest bottleneck first)
252
+ - Forget about mobile performance (often slower devices, slower connections)
253
+
254
+ ## Verify Improvements
255
+
256
+ Test that optimizations worked:
257
+
258
+ - **Before/after metrics**: Compare Lighthouse scores
259
+ - **Real user monitoring**: Track improvements for real users
260
+ - **Different devices**: Test on low-end Android, not just flagship iPhone
261
+ - **Slow connections**: Throttle to 3G, test experience
262
+ - **No regressions**: Ensure functionality still works
263
+ - **User perception**: Does it *feel* faster?
264
+
265
+ Remember: Performance is a feature. Fast experiences feel more responsive, more polished, more professional. Optimize systematically, measure ruthlessly, and prioritize user-perceived performance.
266
+
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: overdrive
3
+ description: "Pushes interfaces past conventional limits with technically ambitious implementations — shaders, spring physics, scroll-driven reveals, 60fps animations. Use when the user wants to wow, impress, go all-out, or make something that feels extraordinary."
4
+ argument-hint: "[target]"
5
+ user-invocable: true
6
+ ---
7
+
8
+ Start your response with:
9
+
10
+ ```
11
+ ──────────── ⚡ OVERDRIVE ─────────────
12
+ 》》》 Entering overdrive mode...
13
+ ```
14
+
15
+ 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.
16
+
17
+ ## MANDATORY PREPARATION
18
+
19
+ 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.
20
+
21
+ **EXTRA IMPORTANT FOR THIS SKILL**: 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.
22
+
23
+ ### Propose Before Building
24
+
25
+ This skill has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
26
+
27
+ 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.
28
+ 2. **Ask the user using AskUserQuestion.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
29
+ 3. Only proceed with the direction the user confirms.
30
+
31
+ Skipping this step risks building something embarrassing that needs to be thrown away.
32
+
33
+ ### Iterate with Browser Automation
34
+
35
+ 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.
36
+
37
+ ---
38
+
39
+ ## Assess What "Extraordinary" Means Here
40
+
41
+ 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"?**
42
+
43
+ ### For visual/marketing surfaces
44
+ 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.
45
+
46
+ ### For functional UI
47
+ 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.
48
+
49
+ ### For performance-critical UI
50
+ 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.
51
+
52
+ ### For data-heavy interfaces
53
+ 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.
54
+
55
+ **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.
56
+
57
+ ## The Toolkit
58
+
59
+ Organized by what you're trying to achieve, not by technology name.
60
+
61
+ ### Make transitions feel cinematic
62
+ - **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.
63
+ - **`@starting-style`** (all browsers) — animate elements from `display: none` to visible with CSS only, including entry keyframes
64
+ - **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.
65
+
66
+ ### Tie animation to scroll position
67
+ - **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)
68
+
69
+ ### Render beyond CSS
70
+ - **WebGL** (all browsers) — shader effects, post-processing, particle systems. Libraries: Three.js, OGL (lightweight), regl. Use for effects CSS can't express.
71
+ - **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.
72
+ - **Canvas 2D / OffscreenCanvas** — custom rendering, pixel manipulation, or moving heavy rendering off the main thread entirely via Web Workers + OffscreenCanvas.
73
+ - **SVG filter chains** — displacement maps, turbulence, morphology for organic distortion effects. CSS-animatable.
74
+
75
+ ### Make data feel alive
76
+ - **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.
77
+ - **GPU-accelerated charts** — Canvas or WebGL-rendered data visualization for datasets too large for SVG/DOM. Libraries: deck.gl, regl-based custom renderers.
78
+ - **Animated data transitions** — morph between chart states rather than replacing. D3's `transition()` or View Transitions for DOM-based charts.
79
+
80
+ ### Animate complex properties
81
+ - **`@property`** (all browsers) — register custom CSS properties with types, enabling animation of gradients, colors, and complex values that CSS can't normally interpolate.
82
+ - **Web Animations API** (all browsers) — JavaScript-driven animations with the performance of CSS. Composable, cancellable, reversible. The foundation for complex choreography.
83
+
84
+ ### Push performance boundaries
85
+ - **Web Workers** — move computation off the main thread. Heavy data processing, image manipulation, search indexing — anything that would cause jank.
86
+ - **OffscreenCanvas** — render in a Worker thread. The main thread stays free while complex visuals render in the background.
87
+ - **WASM** — near-native performance for computation-heavy features. Image processing, physics simulations, codecs.
88
+
89
+ ### Interact with the device
90
+ - **Web Audio API** — spatial audio, audio-reactive visualizations, sonic feedback. Requires user gesture to start.
91
+ - **Device APIs** — orientation, ambient light, geolocation. Use sparingly and always with user permission.
92
+
93
+ **NOTE**: This skill 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.
94
+
95
+ ## Implement with Discipline
96
+
97
+ ### Progressive enhancement is non-negotiable
98
+
99
+ Every technique must degrade gracefully. The experience without the enhancement must still be good.
100
+
101
+ ```css
102
+ @supports (animation-timeline: scroll()) {
103
+ .hero { animation-timeline: scroll(); }
104
+ }
105
+ ```
106
+
107
+ ```javascript
108
+ if ('gpu' in navigator) { /* WebGPU */ }
109
+ else if (canvas.getContext('webgl2')) { /* WebGL2 fallback */ }
110
+ /* CSS-only fallback must still look good */
111
+ ```
112
+
113
+ ### Performance rules
114
+
115
+ - Target 60fps. If dropping below 50, simplify.
116
+ - Respect `prefers-reduced-motion` — always. Provide a beautiful static alternative.
117
+ - Lazy-initialize heavy resources (WebGL contexts, WASM modules) only when near viewport.
118
+ - Pause off-screen rendering. Kill what you can't see.
119
+ - Test on real mid-range devices, not just your development machine.
120
+
121
+ ### Polish is the difference
122
+
123
+ 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.
124
+
125
+ **NEVER**:
126
+ - Ignore `prefers-reduced-motion` — this is an accessibility requirement, not a suggestion
127
+ - Ship effects that cause jank on mid-range devices
128
+ - Use bleeding-edge APIs without a functional fallback
129
+ - Add sound without explicit user opt-in
130
+ - Use technical ambition to mask weak design fundamentals — fix those first with other skills
131
+ - Layer multiple competing extraordinary moments — focus creates impact, excess creates noise
132
+
133
+ ## Verify the Result
134
+
135
+ - **The wow test**: Show it to someone who hasn't seen it. Do they react?
136
+ - **The removal test**: Take it away. Does the experience feel diminished, or does nobody notice?
137
+ - **The device test**: Run it on a phone, a tablet, a Chromebook. Still smooth?
138
+ - **The accessibility test**: Enable reduced motion. Still beautiful?
139
+ - **The context test**: Does this make sense for THIS brand and audience?
140
+
141
+ 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.
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: polish
3
+ description: "Performs a final quality pass fixing alignment, spacing, consistency, and micro-detail issues before shipping. Use when the user mentions polish, finishing touches, pre-launch review, something looks off, or wants to go from good to great."
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: quality bar (MVP vs flagship).
11
+
12
+ ---
13
+
14
+ Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished.
15
+
16
+ ## Pre-Polish Assessment
17
+
18
+ Understand the current state and goals:
19
+
20
+ 1. **Review completeness**:
21
+ - Is it functionally complete?
22
+ - Are there known issues to preserve (mark with TODOs)?
23
+ - What's the quality bar? (MVP vs flagship feature?)
24
+ - When does it ship? (How much time for polish?)
25
+
26
+ 2. **Identify polish areas**:
27
+ - Visual inconsistencies
28
+ - Spacing and alignment issues
29
+ - Interaction state gaps
30
+ - Copy inconsistencies
31
+ - Edge cases and error states
32
+ - Loading and transition smoothness
33
+
34
+ **CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete.
35
+
36
+ ## Polish Systematically
37
+
38
+ Work through these dimensions methodically:
39
+
40
+ ### Visual Alignment & Spacing
41
+
42
+ - **Pixel-perfect alignment**: Everything lines up to grid
43
+ - **Consistent spacing**: All gaps use spacing scale (no random 13px gaps)
44
+ - **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering)
45
+ - **Responsive consistency**: Spacing and alignment work at all breakpoints
46
+ - **Grid adherence**: Elements snap to baseline grid
47
+
48
+ **Check**:
49
+ - Enable grid overlay and verify alignment
50
+ - Check spacing with browser inspector
51
+ - Test at multiple viewport sizes
52
+ - Look for elements that "feel" off
53
+
54
+ ### Typography Refinement
55
+
56
+ - **Hierarchy consistency**: Same elements use same sizes/weights throughout
57
+ - **Line length**: 45-75 characters for body text
58
+ - **Line height**: Appropriate for font size and context
59
+ - **Widows & orphans**: No single words on last line
60
+ - **Hyphenation**: Appropriate for language and column width
61
+ - **Kerning**: Adjust letter spacing where needed (especially headlines)
62
+ - **Font loading**: No FOUT/FOIT flashes
63
+
64
+ ### Color & Contrast
65
+
66
+ - **Contrast ratios**: All text meets WCAG standards
67
+ - **Consistent token usage**: No hard-coded colors, all use design tokens
68
+ - **Theme consistency**: Works in all theme variants
69
+ - **Color meaning**: Same colors mean same things throughout
70
+ - **Accessible focus**: Focus indicators visible with sufficient contrast
71
+ - **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma)
72
+ - **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency
73
+
74
+ ### Interaction States
75
+
76
+ Every interactive element needs all states:
77
+
78
+ - **Default**: Resting state
79
+ - **Hover**: Subtle feedback (color, scale, shadow)
80
+ - **Focus**: Keyboard focus indicator (never remove without replacement)
81
+ - **Active**: Click/tap feedback
82
+ - **Disabled**: Clearly non-interactive
83
+ - **Loading**: Async action feedback
84
+ - **Error**: Validation or error state
85
+ - **Success**: Successful completion
86
+
87
+ **Missing states create confusion and broken experiences**.
88
+
89
+ ### Micro-interactions & Transitions
90
+
91
+ - **Smooth transitions**: All state changes animated appropriately (150-300ms)
92
+ - **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
93
+ - **No jank**: 60fps animations, only animate transform and opacity
94
+ - **Appropriate motion**: Motion serves purpose, not decoration
95
+ - **Reduced motion**: Respects `prefers-reduced-motion`
96
+
97
+ ### Content & Copy
98
+
99
+ - **Consistent terminology**: Same things called same names throughout
100
+ - **Consistent capitalization**: Title Case vs Sentence case applied consistently
101
+ - **Grammar & spelling**: No typos
102
+ - **Appropriate length**: Not too wordy, not too terse
103
+ - **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them)
104
+
105
+ ### Icons & Images
106
+
107
+ - **Consistent style**: All icons from same family or matching style
108
+ - **Appropriate sizing**: Icons sized consistently for context
109
+ - **Proper alignment**: Icons align with adjacent text optically
110
+ - **Alt text**: All images have descriptive alt text
111
+ - **Loading states**: Images don't cause layout shift, proper aspect ratios
112
+ - **Retina support**: 2x assets for high-DPI screens
113
+
114
+ ### Forms & Inputs
115
+
116
+ - **Label consistency**: All inputs properly labeled
117
+ - **Required indicators**: Clear and consistent
118
+ - **Error messages**: Helpful and consistent
119
+ - **Tab order**: Logical keyboard navigation
120
+ - **Auto-focus**: Appropriate (don't overuse)
121
+ - **Validation timing**: Consistent (on blur vs on submit)
122
+
123
+ ### Edge Cases & Error States
124
+
125
+ - **Loading states**: All async actions have loading feedback
126
+ - **Empty states**: Helpful empty states, not just blank space
127
+ - **Error states**: Clear error messages with recovery paths
128
+ - **Success states**: Confirmation of successful actions
129
+ - **Long content**: Handles very long names, descriptions, etc.
130
+ - **No content**: Handles missing data gracefully
131
+ - **Offline**: Appropriate offline handling (if applicable)
132
+
133
+ ### Responsiveness
134
+
135
+ - **All breakpoints**: Test mobile, tablet, desktop
136
+ - **Touch targets**: 44x44px minimum on touch devices
137
+ - **Readable text**: No text smaller than 14px on mobile
138
+ - **No horizontal scroll**: Content fits viewport
139
+ - **Appropriate reflow**: Content adapts logically
140
+
141
+ ### Performance
142
+
143
+ - **Fast initial load**: Optimize critical path
144
+ - **No layout shift**: Elements don't jump after load (CLS)
145
+ - **Smooth interactions**: No lag or jank
146
+ - **Optimized images**: Appropriate formats and sizes
147
+ - **Lazy loading**: Off-screen content loads lazily
148
+
149
+ ### Code Quality
150
+
151
+ - **Remove console logs**: No debug logging in production
152
+ - **Remove commented code**: Clean up dead code
153
+ - **Remove unused imports**: Clean up unused dependencies
154
+ - **Consistent naming**: Variables and functions follow conventions
155
+ - **Type safety**: No TypeScript `any` or ignored errors
156
+ - **Accessibility**: Proper ARIA labels and semantic HTML
157
+
158
+ ## Polish Checklist
159
+
160
+ Go through systematically:
161
+
162
+ - [ ] Visual alignment perfect at all breakpoints
163
+ - [ ] Spacing uses design tokens consistently
164
+ - [ ] Typography hierarchy consistent
165
+ - [ ] All interactive states implemented
166
+ - [ ] All transitions smooth (60fps)
167
+ - [ ] Copy is consistent and polished
168
+ - [ ] Icons are consistent and properly sized
169
+ - [ ] All forms properly labeled and validated
170
+ - [ ] Error states are helpful
171
+ - [ ] Loading states are clear
172
+ - [ ] Empty states are welcoming
173
+ - [ ] Touch targets are 44x44px minimum
174
+ - [ ] Contrast ratios meet WCAG AA
175
+ - [ ] Keyboard navigation works
176
+ - [ ] Focus indicators visible
177
+ - [ ] No console errors or warnings
178
+ - [ ] No layout shift on load
179
+ - [ ] Works in all supported browsers
180
+ - [ ] Respects reduced motion preference
181
+ - [ ] Code is clean (no TODOs, console.logs, commented code)
182
+
183
+ **IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up.
184
+
185
+ **NEVER**:
186
+ - Polish before it's functionally complete
187
+ - Spend hours on polish if it ships in 30 minutes (triage)
188
+ - Introduce bugs while polishing (test thoroughly)
189
+ - Ignore systematic issues (if spacing is off everywhere, fix the system)
190
+ - Perfect one thing while leaving others rough (consistent quality level)
191
+
192
+ ## Final Verification
193
+
194
+ Before marking as done:
195
+
196
+ - **Use it yourself**: Actually interact with the feature
197
+ - **Test on real devices**: Not just browser DevTools
198
+ - **Ask someone else to review**: Fresh eyes catch things
199
+ - **Compare to design**: Match intended design
200
+ - **Check all states**: Don't just test happy path
201
+
202
+ Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter.
203
+