1---
2name: polish
3description: 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.
4version: 2.1.1
5---
6
7## MANDATORY PREPARATION
8
9Invoke /impeccable — 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 /impeccable teach first. Additionally gather: quality bar (MVP vs flagship).
10
11---
12
13Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished.
14
15## Design System Discovery
16
17Before polishing, understand the system you are polishing toward:
18
191. **Find the design system**: Search for design system documentation, component libraries, style guides, or token definitions. Study the core patterns: color tokens, spacing scale, typography styles, component API.
202. **Note the conventions**: How are shared components imported? What spacing scale is used? Which colors come from tokens vs hard-coded values? What motion and interaction patterns are established?
213. **Identify drift**: Where does the target feature deviate from the system? Hard-coded values that should be tokens, custom components that duplicate shared ones, spacing that doesn't match the scale.
22
23If a design system exists, polish should align the feature with it. If none exists, polish against the conventions visible in the codebase.
24
25## Pre-Polish Assessment
26
27Understand the current state and goals:
28
291. **Review completeness**:
30 - Is it functionally complete?
31 - Are there known issues to preserve (mark with TODOs)?
32 - What's the quality bar? (MVP vs flagship feature?)
33 - When does it ship? (How much time for polish?)
34
352. **Identify polish areas**:
36 - Visual inconsistencies
37 - Spacing and alignment issues
38 - Interaction state gaps
39 - Copy inconsistencies
40 - Edge cases and error states
41 - Loading and transition smoothness
42
43**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete.
44
45## Polish Systematically
46
47Work through these dimensions methodically:
48
49### Visual Alignment & Spacing
50
51- **Pixel-perfect alignment**: Everything lines up to grid
52- **Consistent spacing**: All gaps use spacing scale (no random 13px gaps)
53- **Optical alignment**: Adjust for visual weight (icons may need offset for optical centering)
54- **Responsive consistency**: Spacing and alignment work at all breakpoints
55- **Grid adherence**: Elements snap to baseline grid
56
57**Check**:
58- Enable grid overlay and verify alignment
59- Check spacing with browser inspector
60- Test at multiple viewport sizes
61- Look for elements that "feel" off
62
63### Typography Refinement
64
65- **Hierarchy consistency**: Same elements use same sizes/weights throughout
66- **Line length**: 45-75 characters for body text
67- **Line height**: Appropriate for font size and context
68- **Widows & orphans**: No single words on last line
69- **Hyphenation**: Appropriate for language and column width
70- **Kerning**: Adjust letter spacing where needed (especially headlines)
71- **Font loading**: No FOUT/FOIT flashes
72
73### Color & Contrast
74
75- **Contrast ratios**: All text meets WCAG standards
76- **Consistent token usage**: No hard-coded colors, all use design tokens
77- **Theme consistency**: Works in all theme variants
78- **Color meaning**: Same colors mean same things throughout
79- **Accessible focus**: Focus indicators visible with sufficient contrast
80- **Tinted neutrals**: No pure gray or pure black—add subtle color tint (0.01 chroma)
81- **Gray on color**: Never put gray text on colored backgrounds—use a shade of that color or transparency
82
83### Interaction States
84
85Every interactive element needs all states:
86
87- **Default**: Resting state
88- **Hover**: Subtle feedback (color, scale, shadow)
89- **Focus**: Keyboard focus indicator (never remove without replacement)
90- **Active**: Click/tap feedback
91- **Disabled**: Clearly non-interactive
92- **Loading**: Async action feedback
93- **Error**: Validation or error state
94- **Success**: Successful completion
95
96**Missing states create confusion and broken experiences**.
97
98### Micro-interactions & Transitions
99
100- **Smooth transitions**: All state changes animated appropriately (150-300ms)
101- **Consistent easing**: Use ease-out-quart/quint/expo for natural deceleration. Never bounce or elastic—they feel dated.
102- **No jank**: 60fps animations, only animate transform and opacity
103- **Appropriate motion**: Motion serves purpose, not decoration
104- **Reduced motion**: Respects `prefers-reduced-motion`
105
106### Content & Copy
107
108- **Consistent terminology**: Same things called same names throughout
109- **Consistent capitalization**: Title Case vs Sentence case applied consistently
110- **Grammar & spelling**: No typos
111- **Appropriate length**: Not too wordy, not too terse
112- **Punctuation consistency**: Periods on sentences, not on labels (unless all labels have them)
113
114### Icons & Images
115
116- **Consistent style**: All icons from same family or matching style
117- **Appropriate sizing**: Icons sized consistently for context
118- **Proper alignment**: Icons align with adjacent text optically
119- **Alt text**: All images have descriptive alt text
120- **Loading states**: Images don't cause layout shift, proper aspect ratios
121- **Retina support**: 2x assets for high-DPI screens
122
123### Forms & Inputs
124
125- **Label consistency**: All inputs properly labeled
126- **Required indicators**: Clear and consistent
127- **Error messages**: Helpful and consistent
128- **Tab order**: Logical keyboard navigation
129- **Auto-focus**: Appropriate (don't overuse)
130- **Validation timing**: Consistent (on blur vs on submit)
131
132### Edge Cases & Error States
133
134- **Loading states**: All async actions have loading feedback
135- **Empty states**: Helpful empty states, not just blank space
136- **Error states**: Clear error messages with recovery paths
137- **Success states**: Confirmation of successful actions
138- **Long content**: Handles very long names, descriptions, etc.
139- **No content**: Handles missing data gracefully
140- **Offline**: Appropriate offline handling (if applicable)
141
142### Responsiveness
143
144- **All breakpoints**: Test mobile, tablet, desktop
145- **Touch targets**: 44x44px minimum on touch devices
146- **Readable text**: No text smaller than 14px on mobile
147- **No horizontal scroll**: Content fits viewport
148- **Appropriate reflow**: Content adapts logically
149
150### Performance
151
152- **Fast initial load**: Optimize critical path
153- **No layout shift**: Elements don't jump after load (CLS)
154- **Smooth interactions**: No lag or jank
155- **Optimized images**: Appropriate formats and sizes
156- **Lazy loading**: Off-screen content loads lazily
157
158### Code Quality
159
160- **Remove console logs**: No debug logging in production
161- **Remove commented code**: Clean up dead code
162- **Remove unused imports**: Clean up unused dependencies
163- **Consistent naming**: Variables and functions follow conventions
164- **Type safety**: No TypeScript `any` or ignored errors
165- **Accessibility**: Proper ARIA labels and semantic HTML
166
167## Polish Checklist
168
169Go through systematically:
170
171- [ ] Visual alignment perfect at all breakpoints
172- [ ] Spacing uses design tokens consistently
173- [ ] Typography hierarchy consistent
174- [ ] All interactive states implemented
175- [ ] All transitions smooth (60fps)
176- [ ] Copy is consistent and polished
177- [ ] Icons are consistent and properly sized
178- [ ] All forms properly labeled and validated
179- [ ] Error states are helpful
180- [ ] Loading states are clear
181- [ ] Empty states are welcoming
182- [ ] Touch targets are 44x44px minimum
183- [ ] Contrast ratios meet WCAG AA
184- [ ] Keyboard navigation works
185- [ ] Focus indicators visible
186- [ ] No console errors or warnings
187- [ ] No layout shift on load
188- [ ] Works in all supported browsers
189- [ ] Respects reduced motion preference
190- [ ] Code is clean (no TODOs, console.logs, commented code)
191
192**IMPORTANT**: Polish is about details. Zoom in. Squint at it. Use it yourself. The little things add up.
193
194**NEVER**:
195- Polish before it's functionally complete
196- Spend hours on polish if it ships in 30 minutes (triage)
197- Introduce bugs while polishing (test thoroughly)
198- Ignore systematic issues (if spacing is off everywhere, fix the system)
199- Perfect one thing while leaving others rough (consistent quality level)
200- Create new one-off components when design system equivalents exist
201- Hard-code values that should use design tokens
202
203## Final Verification
204
205Before marking as done:
206
207- **Use it yourself**: Actually interact with the feature
208- **Test on real devices**: Not just browser DevTools
209- **Ask someone else to review**: Fresh eyes catch things
210- **Compare to design**: Match intended design
211- **Check all states**: Don't just test happy path
212
213## Clean Up
214
215After polishing, ensure code quality:
216
217- **Replace custom implementations**: If the design system provides a component you reimplemented, switch to the shared version.
218- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish.
219- **Consolidate tokens**: If you introduced new values, check whether they should be tokens.
220- **Verify DRYness**: Look for duplication introduced during polishing and consolidate.
221
222Remember: You have impeccable attention to detail and exquisite taste. Polish until it feels effortless, looks intentional, and works flawlessly. Sweat the details - they matter.