Style Extraction
Language Configuration
Before generating any content, check aico.json in project root for language field to determine the output language. If not set, default to English.
Process
- Get reference material:
- URL: Use Playwright MCP to take screenshot, then analyze
- Screenshot: Analyze directly
- Description: Generate tokens based on style keywords
- Extract systematically using the checklist below
- Save output: ALWAYS write to
docs/reference/frontend/design-system.md
Extraction Checklist
Colors
Typography
Spacing & Layout
Effects
Output Template
# Design System
## Colors
### Brand
- Primary: #xxx
- Secondary: #xxx
### Text
- Primary: #xxx
- Secondary: #xxx
- Muted: #xxx
### Background
- Page: #xxx
- Card: #xxx
## Typography
### Font Family
- Headings: "Font Name", sans-serif
- Body: "Font Name", sans-serif
### Font Size
- sm: 0.875rem
- base: 1rem
- lg: 1.125rem
- xl: 1.25rem
## Spacing
### Border Radius
- sm: 0.125rem
- md: 0.375rem
- lg: 0.5rem
## Effects
### Shadow
- sm: 0 1px 2px rgba(0,0,0,0.05)
- md: 0 4px 6px rgba(0,0,0,0.1)
Playwright MCP Usage
If user provides URL:
browser_navigate to URL
browser_take_screenshot (fullPage: true)
- Analyze screenshot for design tokens
Key Rules
- ALWAYS extract actual hex values from reference - don't guess
- MUST note shadows, borders, transitions
- ALWAYS save to
docs/reference/frontend/design-system.md
Common Mistakes
- ❌ Guess colors without checking → ✅ Extract actual hex values
- ❌ Skip subtle details → ✅ Note shadows, borders, transitions
- ❌ Ignore responsive differences → ✅ Document mobile vs desktop
1---2name: aico-frontend-style-extraction3description: Aico Frontend Style Extraction4---5
6# Style Extraction
7
8## Language Configuration
9
10Before generating any content, check `aico.json` in project root for `language` field to determine the output language. If not set, default to English.
11
12## Process
13
141. **Get reference material**:
15 - URL: Use Playwright MCP to take screenshot, then analyze
16 - Screenshot: Analyze directly
17 - Description: Generate tokens based on style keywords
182. **Extract systematically** using the checklist below
193. **Save output**: ALWAYS write to `docs/reference/frontend/design-system.md`
20
21## Extraction Checklist
22
23### Colors
24
25- [ ] Background colors (page, card, section)
26- [ ] Text colors (primary, secondary, muted)
27- [ ] Accent/brand colors
28- [ ] Border colors
29- [ ] State colors (success, warning, error)
30
31### Typography
32
33- [ ] Font families (headings, body, mono)
34- [ ] Font sizes (scale from xs to 4xl)
35- [ ] Font weights (normal, medium, semibold, bold)
36- [ ] Line heights
37
38### Spacing & Layout
39
40- [ ] Border radius values
41- [ ] Container max-width
42- [ ] Section padding
43- [ ] Component spacing scale
44
45### Effects
46
47- [ ] Shadows (sm, md, lg)
48- [ ] Borders & dividers
49- [ ] Transitions
50
51## Output Template
52
53```markdown
54# Design System
55
56## Colors
57
58### Brand
59
60- Primary: #xxx
61- Secondary: #xxx
62
63### Text
64
65- Primary: #xxx
66- Secondary: #xxx
67- Muted: #xxx
68
69### Background
70
71- Page: #xxx
72- Card: #xxx
73
74## Typography
75
76### Font Family
77
78- Headings: "Font Name", sans-serif
79- Body: "Font Name", sans-serif
80
81### Font Size
82
83- sm: 0.875rem
84- base: 1rem
85- lg: 1.125rem
86- xl: 1.25rem
87
88## Spacing
89
90### Border Radius
91
92- sm: 0.125rem
93- md: 0.375rem
94- lg: 0.5rem
95
96## Effects
97
98### Shadow
99
100- sm: 0 1px 2px rgba(0,0,0,0.05)
101- md: 0 4px 6px rgba(0,0,0,0.1)
102```
103
104## Playwright MCP Usage
105
106If user provides URL:
107
1081. `browser_navigate` to URL
1092. `browser_take_screenshot` (fullPage: true)
1103. Analyze screenshot for design tokens
111
112## Key Rules
113
114- ALWAYS extract actual hex values from reference - don't guess
115- MUST note shadows, borders, transitions
116- ALWAYS save to `docs/reference/frontend/design-system.md`
117
118## Common Mistakes
119
120- ❌ Guess colors without checking → ✅ Extract actual hex values
121- ❌ Skip subtle details → ✅ Note shadows, borders, transitions
122- ❌ Ignore responsive differences → ✅ Document mobile vs desktop