vibe-ship-it 1.3.1 → 1.4.1

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/README.md CHANGED
@@ -18,7 +18,7 @@ Works with **VS Code Copilot**, **Claude Code**, and **OpenAI Codex**.
18
18
  | **shipper** | Deploys to GitHub Pages or Vercel | "Ship it" / "Put it online" |
19
19
  | **investigator** | Deep debugs when quick fixes don't work | "It was working before" / "Find the bug" |
20
20
 
21
- ### 13 Skills
21
+ ### 14 Skills
22
22
 
23
23
  | Skill | What it does | Say this |
24
24
  |---|---|---|
@@ -28,6 +28,7 @@ Works with **VS Code Copilot**, **Claude Code**, and **OpenAI Codex**.
28
28
  | **build-page** | Builds UI from descriptions or screenshots | "Build a landing page with..." |
29
29
  | **make-it-wow** | Instant visual polish — animations, typography, hover effects | "Make it look better" |
30
30
  | **design-system** | Builds tokens, primitive components, and rules from your existing UI | "Set up a design system" |
31
+ | **generate-design-md** | Generates a DESIGN.md from any website URL — captures colors, type, spacing, components | "Make it look like linear.app" |
31
32
  | **save-data** | Saves form submissions to a database | "Save the form" |
32
33
  | **add-login** | Adds user authentication | "Add login" / "Only I can see this" |
33
34
  | **send-email** | Sends confirmation or notification emails | "Send me an email when..." |
@@ -88,6 +89,7 @@ Just talk naturally. You don't need to remember any agent or skill names.
88
89
  "Make a contact page with a form" → builds the UI
89
90
  "Save what people submit" → connects to database
90
91
  "Make it look more premium" → adds animations and polish
92
+ "Make it look like stripe.com" → generates a DESIGN.md from that site
91
93
  "Only I should see the submissions" → adds login
92
94
  "Email me when someone submits" → adds notifications
93
95
  "Check it" → runs quality check
@@ -135,6 +137,7 @@ skills/
135
137
  build-page/ ← UI construction
136
138
  make-it-wow/ ← Visual polish
137
139
  design-system/ ← Tokens + primitives + consistency rules
140
+ generate-design-md/ ← DESIGN.md from any website URL
138
141
  save-data/ ← Database persistence
139
142
  add-login/ ← Authentication
140
143
  send-email/ ← Email notifications
@@ -148,6 +151,45 @@ skills/
148
151
  figma-plugin/ ← Figma Plugin API conventions
149
152
  ```
150
153
 
154
+ ## How DESIGN.md works
155
+
156
+ ```
157
+ ┌─────────────────────────────────────────────────────────────────┐
158
+ │ DESIGNER INPUT │
159
+ │ │
160
+ │ "Make it look like stripe.com" "Set up a design system" │
161
+ │ │ │ │
162
+ │ ▼ ▼ │
163
+ │ generate-design-md design-system │
164
+ │ (fetches site HTML+CSS, (extracts from your │
165
+ │ extracts tokens) existing pages) │
166
+ │ │ │ │
167
+ │ └──────────┐ ┌───────────────┘ │
168
+ │ ▼ ▼ │
169
+ │ ┌──────────────────┐ │
170
+ │ │ DESIGN.md │ │
171
+ │ │ (source of │ │
172
+ │ │ truth for all │ │
173
+ │ │ visual tokens) │ │
174
+ │ └────────┬─────────┘ │
175
+ │ │ │
176
+ │ ┌─────────┼─────────┐ │
177
+ │ ▼ ▼ ▼ │
178
+ │ build-page make-it-wow design-system │
179
+ │ uses tokens polishes builds primitives │
180
+ │ for all UI within the FROM the file │
181
+ │ system │
182
+ │ │ │ │ │
183
+ │ └─────────┼─────────┘ │
184
+ │ ▼ │
185
+ │ Consistent UI │
186
+ │ (every page matches the │
187
+ │ design reference) │
188
+ └─────────────────────────────────────────────────────────────────┘
189
+ ```
190
+
191
+ Rule 0 enforces this: every agent silently checks for `DESIGN.md` before any work. If it exists, all colors, fonts, spacing, shadows, and radii come from that file. No inventing new values.
192
+
151
193
  ## Design principles
152
194
 
153
195
  - **Show results first, explain code second**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vibe-ship-it",
3
- "version": "1.3.1",
4
- "description": "AI skill pack for designers who vibe-code. 4 agents, 12 skills just say what you want in plain English.",
3
+ "version": "1.4.1",
4
+ "description": "AI skill pack for designers who vibe-code. 4 agents, 14 skills, DESIGN.md generator. Just say what you want in plain English.",
5
5
  "bin": {
6
6
  "vibe-ship-it": "./bin/init.js"
7
7
  },
@@ -4,7 +4,7 @@ You help an excited designer build their idea. They are not a programmer. They t
4
4
 
5
5
  ## Core Rules
6
6
 
7
- 0. **Stay consistent with past decisions.** Before starting any work, silently check if `PROJECT.md` exists in the project root. If it does, read it. Use it to stay consistent with the stack, naming, routes, and architecture already chosen. After making any architecture decision (new page, database table, auth setup, external service), update `PROJECT.md`.
7
+ 0. **Stay consistent with past decisions.** Before starting any work, silently check if `PROJECT.md` exists in the project root. If it does, read it. Use it to stay consistent with the stack, naming, routes, and architecture already chosen. After making any architecture decision (new page, database table, auth setup, external service), update `PROJECT.md`. Also check if `DESIGN.md` exists. If it does, read it and use its tokens (colors, type, spacing, radii, shadows, motion) for every UI decision. Never invent new values when DESIGN.md defines them.
8
8
 
9
9
  1. **Show the result first, explain the code second.** Always preview in the browser. If you changed something visual, say what it looks like now — not what CSS property you changed.
10
10
 
@@ -69,6 +69,7 @@ Run before-you-ship checklist first — this is non-negotiable even if the desig
69
69
  | "Show me all the..." / "dashboard" | Data display | Fetch + styled list/cards |
70
70
  | "Make it look better" / "it looks boring" | Visual polish | Add animations, typography, spacing |
71
71
  | "Set up a design system" / "make styles consistent" / "set up tokens" | Design system | Extract tokens + create primitives + define usage rules |
72
+ | "Make it look like [url]" / "grab the design from" / "design md" | Design reference | Fetch site, extract tokens, generate DESIGN.md |
72
73
  | "Ship it" / "put it online" | Deploy | Run pre-flight check, then deploy to Vercel |
73
74
  | "Check it" / "is this ready?" | QA | Run quick-check or full checklist |
74
75
  | "This doesn't work" / "ugh" / "stuck" | Frustrated — needs help | Fix silently, explain after |
@@ -4,7 +4,7 @@ You help an excited designer build their idea. They are not a programmer. They t
4
4
 
5
5
  ## Core Rules
6
6
 
7
- 0. **Stay consistent with past decisions.** Before starting any work, silently check if `PROJECT.md` exists in the project root. If it does, read it. Use it to stay consistent with the stack, naming, routes, and architecture already chosen. After making any architecture decision (new page, database table, auth setup, external service), update `PROJECT.md`.
7
+ 0. **Stay consistent with past decisions.** Before starting any work, silently check if `PROJECT.md` exists in the project root. If it does, read it. Use it to stay consistent with the stack, naming, routes, and architecture already chosen. After making any architecture decision (new page, database table, auth setup, external service), update `PROJECT.md`. Also check if `DESIGN.md` exists. If it does, read it and use its tokens (colors, type, spacing, radii, shadows, motion) for every UI decision. Never invent new values when DESIGN.md defines them.
8
8
 
9
9
  1. **Show the result first, explain the code second.** Always preview in the browser. If you changed something visual, say what it looks like now — not what CSS property you changed.
10
10
 
@@ -58,6 +58,7 @@ Don't mention these names unless the designer asks. Just use them.
58
58
  | "Show me all the..." / "dashboard" | Data display | Fetch + styled list/cards |
59
59
  | "Make it look better" / "it looks boring" | Visual polish | Add animations, typography, spacing |
60
60
  | "Set up a design system" / "make styles consistent" / "set up tokens" | Design system | Extract tokens + create primitives + define usage rules |
61
+ | "Make it look like [url]" / "grab the design from" / "design md" | Design reference | Fetch site, extract tokens, generate DESIGN.md |
61
62
  | "Ship it" / "put it online" | Deploy | Run pre-flight check, then deploy to Vercel |
62
63
  | "Check it" / "is this ready?" | QA | Run quick-check or full checklist |
63
64
  | "This doesn't work" / "ugh" / "stuck" | Frustrated — needs help | Fix silently, explain after |
@@ -117,7 +117,9 @@ Keep it simple — designers rarely care about the footer first.
117
117
 
118
118
  ## Visual Defaults
119
119
 
120
- Always apply these unless told otherwise:
120
+ **If `DESIGN.md` exists in the project root, use it.** Pull every color, font, size, spacing value, radius, shadow, and motion token from the file. Do not invent values that DESIGN.md already defines. Skip the defaults below -- DESIGN.md overrides all of them.
121
+
122
+ **If no `DESIGN.md` exists,** apply these defaults:
121
123
  - Font: system font stack or Inter
122
124
  - Heading sizes: responsive using `text-3xl md:text-5xl lg:text-7xl`
123
125
  - Body text: `text-base` or `text-lg`, line-height relaxed
@@ -30,16 +30,21 @@ If no pages exist yet, start from smart defaults that look like a real product.
30
30
 
31
31
  ## Starting Point
32
32
 
33
- Use Material Design 3 as the internal reference for token categories, component patterns, and accessibility defaults. Never mention "Material" to the user. They just get a clean, modern system.
33
+ ### If `DESIGN.md` exists
34
+ Use it as the source of truth. Extract tokens directly from the DESIGN.md file -- colors, type scale, spacing, radii, shadows, motion. Map them to the token names below and generate primitives wired to those values. Do not re-extract from the existing UI. DESIGN.md wins.
35
+
36
+ **Token mapping from DESIGN.md:** DESIGN.md uses richer names than the token table below. Map them: `text-primary` → `text`, `text-secondary`/`text-tertiary` → `muted`, `surface` → use as card/panel background, `accent-hover` → generate hover variant of `accent`, `border-subtle` → lighter shade of `border`. Drop `accent-gradient` into button/CTA styles directly. Ignore any DESIGN.md tokens not listed below -- they are implementation hints, not system tokens.
34
37
 
35
- ### If pages already exist
38
+ ### If pages already exist (no DESIGN.md)
36
39
  Extract tokens from the current UI. Preserve the existing look. The system should formalize what's already there, not redesign it.
37
40
 
38
- ### If no pages exist yet
41
+ ### If no pages exist yet (no DESIGN.md)
39
42
  Generate a neutral, modern token set with good defaults:
40
43
  - Clean type scale, comfortable spacing, subtle shadows, accessible contrast
41
44
  - Feels like a real product out of the box
42
45
 
46
+ Use Material Design 3 as the internal reference for token categories, component patterns, and accessibility defaults. Never mention "Material" to the user. They just get a clean, modern system.
47
+
43
48
  ## Token Names
44
49
 
45
50
  Use simple names designers already know. Not spec jargon.
@@ -0,0 +1,358 @@
1
+ ---
2
+ name: generate-design-md
3
+ description: "Generates a DESIGN.md file from any website URL. Captures colors, typography, spacing, components, and visual atmosphere into a reusable design system document that AI agents can read. Triggers: 'generate design md', 'capture the design', 'grab the design from', 'make it look like this site', 'extract design from', 'design md from', 'copy the style of', 'steal the look', 'I like how this site looks', 'use this site as reference', 'design reference from URL'."
4
+ ---
5
+
6
+ # Generate DESIGN.md
7
+
8
+ Takes a website URL and produces a complete DESIGN.md file -- a plain-text design system document that any AI coding agent can read to build UI that matches that site's look and feel.
9
+
10
+ ## How It Works
11
+
12
+ 1. Designer gives a URL
13
+ 2. Fetch the page HTML and all linked CSS
14
+ 3. Extract every visual token: colors, fonts, spacing, shadows, radii, component patterns
15
+ 4. Analyze the visual atmosphere and design philosophy
16
+ 5. Write a DESIGN.md in our 8-section format (optimized for AI agents, not human essays)
17
+ 6. Drop it in the project root
18
+
19
+ One command. No questions. The output is a markdown file, not code.
20
+
21
+ ## When To Use
22
+
23
+ - "I like how linear.app looks -- capture that"
24
+ - "Generate a design md from stripe.com"
25
+ - "Make my app look like this site"
26
+ - "Use vercel.com as a design reference"
27
+ - "Grab the design from notion.so"
28
+ - "Copy the style of airbnb.com"
29
+
30
+ ## Extraction Process
31
+
32
+ ### Step 1: Fetch (multi-pass)
33
+
34
+ Do multiple fetches to maximize what you capture:
35
+
36
+ **Pass 1: HTML**
37
+ Fetch the target URL. From the HTML, extract:
38
+ - All `<link rel="stylesheet" href="...">` URLs
39
+ - All `<style>` blocks (including `<style data-*>` for CSS-in-JS SSR output)
40
+ - All `style="..."` inline attributes on elements
41
+ - `<meta name="theme-color" content="...">` for brand color
42
+ - Google Fonts / Typekit `<link>` URLs (reveals exact font families and weights)
43
+ - `<link rel="icon">` and `<link rel="apple-touch-icon">` (brand color clues)
44
+
45
+ **Pass 2: CSS files**
46
+ Fetch each discovered stylesheet URL. If a URL returns 403/404:
47
+ - Try removing query strings
48
+ - Try the base domain + `/styles.css`, `/main.css`, `/globals.css`
49
+ - Try common CDN patterns: `cdn.example.com/css/...`
50
+ - Move on if blocked -- note which sources were inaccessible
51
+
52
+ **Pass 3: Critical CSS extraction**
53
+ Many modern sites inline critical CSS in `<style>` tags in the `<head>`. This often contains:
54
+ - CSS custom properties (`:root { --color-primary: ... }`)
55
+ - Font-face declarations
56
+ - Key component styles
57
+ - Media queries with breakpoints
58
+
59
+ This is often the richest source -- don't skip it.
60
+
61
+ ### Step 2: Extract Raw Tokens
62
+
63
+ Pull these from ALL collected sources (external CSS + inline styles + style blocks):
64
+
65
+ | What | Where to look |
66
+ |---|---|
67
+ | Colors | CSS custom properties, `color`, `background-color`, `border-color`, `fill`, `box-shadow` color values, `style="color:..."` inline, `meta[theme-color]` |
68
+ | Fonts | `font-family`, `@font-face`, Google Fonts URL params (`?family=Inter:wght@300;400;700`), Typekit kit IDs |
69
+ | Type scale | `font-size`, `font-weight`, `line-height`, `letter-spacing` -- collect ALL unique values and sort |
70
+ | Spacing | `padding`, `margin`, `gap` -- collect unique values, find the base unit (most common divisor) |
71
+ | Radii | `border-radius` -- collect all unique values across components |
72
+ | Shadows | `box-shadow` -- capture full declarations including multi-layer stacks |
73
+ | Borders | `border` shorthand and individual properties |
74
+ | Transitions | `transition`, `animation`, `@keyframes` declarations |
75
+ | Breakpoints | `@media` queries -- extract all width breakpoints |
76
+
77
+ ### Step 3: Verify, don't guess
78
+
79
+ **Extracted** = you found the exact value in HTML, CSS, or inline styles. Mark these with confidence.
80
+
81
+ **Inferred** = you deduced the value from patterns (e.g., "body text is probably 16px based on the type scale"). Note these in the output with `(inferred)` so the designer knows.
82
+
83
+ **Known** = you recognize the site and fill from general knowledge. This is valid but must be flagged: add a note at the top of the DESIGN.md if significant portions came from recognition rather than extraction. Known values come from training data that may be months or years old. If a site has redesigned since then, known values will be confidently wrong. If more than 30% of tokens are "known" with zero extracted confirmation, add a warning that values may reflect an older version of the site.
84
+
85
+ **Source priority when values conflict:** External stylesheet > inline `<style>` blocks > `style=""` attributes > known. This inverts normal CSS specificity on purpose: inline `style` attributes are often one-off overrides, not canonical design tokens. The stylesheet is where the real system lives. When two sources disagree on the same property, use the higher-priority source and drop the other silently.
86
+
87
+ If the output is mostly inferred/known (CSS was blocked, JS-rendered, etc.), add this note at the top:
88
+ ```
89
+ > Note: CSS files were not fully accessible. Some values are based on
90
+ > visual analysis of the site's publicly visible HTML and known design patterns.
91
+ > Verify accent colors and exact spacing values against the live site.
92
+ ```
93
+
94
+ ### Step 4: Analyze Patterns
95
+
96
+ From the raw tokens, identify:
97
+ - **Color roles**: Which color is background? Primary text? Accent? Secondary text? Border?
98
+ - **Type hierarchy**: What's the display size? Heading? Body? Caption? What weights are used?
99
+ - **Spacing rhythm**: Is it 4px-based? 8px-based? What's the scale?
100
+ - **Component signatures**: How do buttons look? Cards? Inputs? Navigation?
101
+ - **Shadow philosophy**: Flat? Subtle elevation? Heavy depth? Shadow-as-border?
102
+ - **Shape language**: Sharp corners? Rounded? Pills? Mixed?
103
+
104
+ ### Step 5: Interpret the Atmosphere
105
+
106
+ Read the design decisions as a whole. What does this site feel like?
107
+ - Dense or spacious?
108
+ - Technical or friendly?
109
+ - Dark or light?
110
+ - Minimal or rich?
111
+ - Corporate or playful?
112
+
113
+ Write this as a short, opinionated paragraph -- not a list of CSS values.
114
+
115
+ ## Output Format
116
+
117
+ The DESIGN.md follows an 8-section structure optimized for AI agents. Every section earns its place -- no redundancy, no prose padding.
118
+
119
+ ```markdown
120
+ # DESIGN.md -- [Site Name]
121
+
122
+ <!-- extraction-meta
123
+ source: [URL]
124
+ date: [YYYY-MM-DD]
125
+ confidence: { extracted: [%], inferred: [%], known: [%] }
126
+ staleness-risk: [low/medium/high]
127
+ sources-attempted: [list of what you tried to fetch]
128
+ sources-succeeded: [list of what returned usable data]
129
+ priority-rule: external-css > style-blocks > inline-style > known
130
+ -->
131
+
132
+ [If staleness-risk is medium or high, add a blockquote warning here.]
133
+
134
+ ## 1. Identity
135
+
136
+ **In one line:** [Single sentence capturing the visual personality -- what a designer would say after 5 seconds on the site.]
137
+
138
+ **Signature Techniques:**
139
+ - [3-5 bullets. Only the things that make THIS site look different from others. Not generic traits like "uses whitespace." Specific moves: "shadow-as-border via `box-shadow: 0 0 0 1px`", "negative letter-spacing at display sizes (-2.4px)", "gradient mesh hero backgrounds".]
140
+
141
+ ## 2. Color
142
+
143
+ ### Palette
144
+ | Token | Value | Role | Confidence |
145
+ |-------|-------|------|------------|
146
+ | `background` | `#hex` | Page canvas | [extracted/inferred/known] |
147
+ | `surface` | `#hex` | Cards, panels, elevated containers | |
148
+ | `text-primary` | `#hex` | Headings, body text | |
149
+ | `text-secondary` | `#hex` | Descriptions, muted copy | |
150
+ | `text-tertiary` | `#hex` | Placeholder, disabled, metadata | |
151
+ | `accent` | `#hex` | Primary brand action, links | |
152
+ | `accent-hover` | `#hex` | Accent hover state | |
153
+ | `border` | `#hex` or `rgba()` | Dividers, card edges, input borders | |
154
+ | `border-subtle` | `#hex` or `rgba()` | Lighter separator lines | |
155
+ | `success` | `#hex` | Confirmation, positive states | |
156
+ | `warning` | `#hex` | Caution states | |
157
+ | `danger` | `#hex` | Error, destructive actions | |
158
+ [Add any brand-specific named colors: "Ship Red", "Console Blue", etc.]
159
+
160
+ ### Dark Mode (if present)
161
+ | Token | Light | Dark |
162
+ |-------|-------|------|
163
+ [Same token names, mapped values for both themes. If no dark mode detected, omit this subsection.]
164
+
165
+ ## 3. Typography
166
+
167
+ ### Fonts
168
+ - **Primary:** [font name] -- [fallback stack]
169
+ - **Mono:** [font name] -- [fallback stack] (omit if site doesn't use mono)
170
+
171
+ ### Scale
172
+ | Role | Size | Weight | Line Height | Letter Spacing | Confidence |
173
+ |------|------|--------|-------------|----------------|------------|
174
+ | Display | [px/rem] | [number] | [value] | [value] | |
175
+ | H1 | [px/rem] | [number] | [value] | [value] | |
176
+ | H2 | [px/rem] | [number] | [value] | [value] | |
177
+ | H3 | [px/rem] | [number] | [value] | [value] | |
178
+ | Body | [px/rem] | [number] | [value] | [value] | |
179
+ | Body Small | [px/rem] | [number] | [value] | [value] | |
180
+ | Caption | [px/rem] | [number] | [value] | [value] | |
181
+ | Code | [px/rem] | [number] | [value] | [value] | |
182
+ [Add rows as needed -- these are minimums, not limits.]
183
+
184
+ ### Weight Strategy
185
+ [1-2 lines. How many weights are used and what each one means. e.g. "Three weights only: 400 (read), 500 (interact), 600 (announce). No bold."]
186
+
187
+ ## 4. Spacing & Layout
188
+
189
+ ### Base Unit
190
+ [e.g. "8px grid. Scale: 4, 8, 12, 16, 24, 32, 48, 64, 96."]
191
+
192
+ ### Container
193
+ - Max width: [value]
194
+ - Page padding: [value]
195
+ - Section gap: [value]
196
+
197
+ ### Border Radius
198
+ | Token | Value | Used on |
199
+ |-------|-------|---------|
200
+ | `radius-sm` | [px] | [inputs, inline code] |
201
+ | `radius-md` | [px] | [buttons, cards] |
202
+ | `radius-lg` | [px] | [modals, hero cards] |
203
+ | `radius-full` | [px/9999px] | [badges, pills, avatars] |
204
+
205
+ ## 5. Depth & Motion
206
+
207
+ ### Elevation
208
+ | Level | Shadow Value | Use |
209
+ |-------|-------------|-----|
210
+ | Flat | none | Page background |
211
+ | Low | `[full CSS]` | Cards, containers |
212
+ | Mid | `[full CSS]` | Dropdowns, popovers |
213
+ | High | `[full CSS]` | Modals, dialogs |
214
+ [Add rows for distinctive techniques: backdrop-blur, glassmorphism, glow, inner shadow, shadow-as-border. Keep them in the table, not as prose.]
215
+
216
+ ### Motion
217
+ | Property | Value | Use |
218
+ |----------|-------|-----|
219
+ | `duration-fast` | [ms] | Hover, toggle, micro-interactions |
220
+ | `duration-base` | [ms] | Page transitions, panel open/close |
221
+ | `duration-slow` | [ms] | Entrance animations, loading transitions |
222
+ | `easing` | [curve] | Default easing function |
223
+ [Note any distinctive motion patterns: staggered entrance, parallax, spring physics, scroll-triggered]
224
+
225
+ ## 6. Components
226
+
227
+ ### Buttons
228
+ | Property | Primary | Secondary | Ghost |
229
+ |----------|---------|-----------|-------|
230
+ | background | `[val]` | `[val]` | `[val]` |
231
+ | color | `[val]` | `[val]` | `[val]` |
232
+ | padding | `[val]` | `[val]` | `[val]` |
233
+ | radius | `[val]` | `[val]` | `[val]` |
234
+ | border | `[val]` | `[val]` | `[val]` |
235
+ | shadow | `[val]` | `[val]` | `[val]` |
236
+
237
+ | State | Primary | Secondary |
238
+ |-------|---------|----------|
239
+ | Hover | [specific CSS changes] | [specific CSS changes] |
240
+ | Focus | [focus ring value] | [focus ring value] |
241
+
242
+ ### Cards
243
+ | Property | Value |
244
+ |----------|-------|
245
+ | background | `[val]` |
246
+ | border | `[val]` |
247
+ | radius | `[val]` |
248
+ | shadow | `[val]` |
249
+ | padding | `[val]` |
250
+ | hover | [behavior] |
251
+
252
+ ### Inputs
253
+ | Property | Value |
254
+ |----------|-------|
255
+ | border | `[val]` |
256
+ | radius | `[val]` |
257
+ | padding | `[val]` |
258
+ | focus | `[val]` |
259
+ | error | [styling] |
260
+ | label | [placement and style] |
261
+
262
+ ### Navigation
263
+ [Structure, font treatment, active indicator, sticky behavior]
264
+
265
+ ### Icons (if identifiable)
266
+ [Style: line/filled/duo-tone, stroke weight, size grid, corner style]
267
+
268
+ ### Signature Patterns
269
+ [1-3 components unique to this site. The things someone would point at and say "that looks like [site name]." e.g. Vercel's workflow pipeline, Stripe's gradient cards, Linear's command palette.]
270
+
271
+ ## 7. States
272
+
273
+ | State | Treatment |
274
+ |-------|-----------|
275
+ | Hover | [What changes: background shift, shadow, scale, underline, etc.] |
276
+ | Focus | [Focus ring style: color, offset, width] |
277
+ | Active/Pressed | [Scale, color shift] |
278
+ | Disabled | [Opacity, color, cursor] |
279
+ | Loading | [Skeleton, spinner, shimmer -- what does the site use?] |
280
+ | Empty | [How empty states are styled -- illustration, muted text, CTA] |
281
+ | Error | [Color, border, icon, message placement] |
282
+
283
+ ## 8. Rules
284
+
285
+ ### Do
286
+ - [6-8 specific, actionable rules WITH values]
287
+ - [e.g. "Use `#171717` not `#000000` for primary text"]
288
+ - [e.g. "Letter-spacing scales with font size: -2.4px at 48px, -0.96px at 24px, normal at 14px"]
289
+
290
+ ### Don't
291
+ - [6-8 anti-patterns WITH specifics]
292
+ - [e.g. "Don't use weight 700 on body text -- 600 max, headings only"]
293
+ - [e.g. "Don't use CSS border on cards -- use shadow-as-border technique"]
294
+
295
+ ### Responsive
296
+ - Mobile breakpoint: [value]
297
+ - Tablet breakpoint: [value]
298
+ - What changes: [2-3 bullets on how the design adapts. Not just "becomes single column" -- does spacing compress? Does type scale shrink? Do components simplify?]
299
+ ```
300
+
301
+ ## Quality Standards
302
+
303
+ ### Be Specific, Not Generic
304
+ Bad: "Uses a clean color palette"
305
+ Good: "Near-black (`#171717`) instead of pure black creates micro-contrast softness against the `#ffffff` canvas"
306
+
307
+ ### Include Actual Values
308
+ Every color must have a hex code. Every font size must have a pixel/rem value. Every shadow must have the full CSS declaration. Vague descriptions are useless to an AI agent.
309
+
310
+ ### Name Colors Semantically
311
+ Don't just list hex codes. Name them by role: "Ship Red", "Console Blue", "Gray 600". The names should communicate function.
312
+
313
+ ### Capture Signature Techniques
314
+ Every site has 1-3 things that make it visually distinctive. Shadow-as-border (Vercel). Aggressive negative letter-spacing (Vercel). Gradient mesh backgrounds (Stripe). Find and emphasize these.
315
+
316
+ ### The Do's and Don'ts Must Be Specific
317
+ Bad: "Don't use ugly colors"
318
+ Good: "Don't use weight 700 (bold) on body text -- 600 is the maximum, used only for headings"
319
+
320
+ ## Handling Edge Cases
321
+
322
+ ### CSS blocked (403/404)
323
+ Many CDNs (Stripe, Vercel) block direct stylesheet access. When this happens:
324
+ 1. Lean heavily on `<style>` blocks in the HTML -- SSR'd sites often inline critical CSS
325
+ 2. Parse every `style="..."` attribute from the HTML elements
326
+ 3. Check Google Fonts / Typekit links for exact font info
327
+ 4. Use `meta[theme-color]` for the brand color
328
+ 5. Flag in the output that CSS was partially inaccessible
329
+
330
+ ### JS-rendered sites (SPA)
331
+ If the initial HTML fetch is sparse (SPA), note this and work with whatever CSS is available. The stylesheets usually contain the full token set even if the HTML is dynamic.
332
+
333
+ ### Sites with multiple themes
334
+ If the site has light/dark modes, fill both columns of the Dark Mode table in Section 2. If only one theme is detected, omit the Dark Mode subsection.
335
+
336
+ ### Sites with very complex design systems
337
+ Focus on the marketing/landing page, not the product UI. The landing page is what the designer saw and wants to replicate.
338
+
339
+ ### Minimal information available
340
+ If CSS extraction is limited, use the HTML structure and inline styles to infer as much as possible. Add the accuracy note at the top of the file. Never silently fill gaps with guesses -- be transparent.
341
+
342
+ ## After Generation
343
+
344
+ Place the file at the project root as `DESIGN.md`. Say something like:
345
+ - "Your design reference is ready. Any page you build now will follow [site name]'s visual style."
346
+ - "Captured [site name]'s design. Colors, type, spacing, components -- it's all in DESIGN.md."
347
+
348
+ Do not explain every section. The designer doesn't need a walkthrough of what a DESIGN.md is.
349
+
350
+ ## What Not To Do
351
+
352
+ - Do not ask which sections to include -- generate all 8
353
+ - Do not generate a partial file and ask if they want more
354
+ - Do not copy copyrighted content (logos, illustrations, copy text) -- only extract visual tokens
355
+ - Do not require any tools beyond web fetching -- no browser automation, no Figma, no screenshots
356
+ - Do not use emoji or em dash in generated copy
357
+ - Do not lecture about design systems or the DESIGN.md format
358
+ - Do not generate preview HTML files unless explicitly asked
@@ -123,11 +123,12 @@ NEVER violate these:
123
123
 
124
124
  ## Application Process
125
125
 
126
- 1. Scan current page
127
- 2. Identify which upgrades apply (don't add scroll reveal to a single-section page)
128
- 3. Apply all applicable upgrades
129
- 4. Show the result: "Check your browser — added smooth animations, hover effects, and better typography."
130
- 5. Don't list every CSS change. Just show the before/after feeling.
126
+ 1. **Check for `DESIGN.md` first.** If it exists, use its motion tokens (durations, easing), shadow scale, color palette, and radius values instead of inventing new ones. Polish within the design system, not outside it.
127
+ 2. Scan current page
128
+ 3. Identify which upgrades apply (don't add scroll reveal to a single-section page)
129
+ 4. Apply all applicable upgrades
130
+ 5. Show the result: "Check your browser -- added smooth animations, hover effects, and better typography."
131
+ 6. Don't list every CSS change. Just show the before/after feeling.
131
132
 
132
133
  ## What NOT To Do
133
134