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