viepilot 2.41.0 → 2.45.3
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/CHANGELOG.md +104 -0
- package/bin/viepilot.cjs +32 -0
- package/bin/vp-tools.cjs +95 -0
- package/docs/brainstorm/session-2026-04-24.md +131 -0
- package/docs/brainstorm/session-2026-04-25.md +109 -0
- package/lib/domain-packs/ai-product.json +33 -0
- package/lib/domain-packs/data-science.json +33 -0
- package/lib/domain-packs/devops.json +33 -0
- package/lib/domain-packs/mobile.json +33 -0
- package/lib/domain-packs/web-saas.json +33 -0
- package/lib/viepilot-calibrate.cjs +279 -0
- package/lib/viepilot-install.cjs +5 -3
- package/lib/viepilot-persona.cjs +446 -0
- package/package.json +1 -1
- package/skills/vp-audit/SKILL.md +10 -0
- package/skills/vp-auto/SKILL.md +10 -0
- package/skills/vp-brainstorm/SKILL.md +16 -1
- package/skills/vp-crystallize/SKILL.md +10 -0
- package/skills/vp-debug/SKILL.md +10 -0
- package/skills/vp-design/SKILL.md +219 -0
- package/skills/vp-docs/SKILL.md +10 -0
- package/skills/vp-evolve/SKILL.md +10 -0
- package/skills/vp-info/SKILL.md +10 -0
- package/skills/vp-pause/SKILL.md +10 -0
- package/skills/vp-persona/SKILL.md +207 -0
- package/skills/vp-proposal/SKILL.md +10 -0
- package/skills/vp-request/SKILL.md +10 -0
- package/skills/vp-resume/SKILL.md +10 -0
- package/skills/vp-rollback/SKILL.md +34 -1
- package/skills/vp-skills/SKILL.md +10 -0
- package/skills/vp-status/SKILL.md +10 -0
- package/skills/vp-task/SKILL.md +10 -0
- package/skills/vp-ui-components/SKILL.md +10 -0
- package/skills/vp-update/SKILL.md +10 -0
- package/workflows/autonomous.md +59 -0
- package/workflows/brainstorm.md +148 -1
- package/workflows/crystallize.md +111 -0
- package/workflows/design.md +601 -0
- package/workflows/evolve.md +9 -0
- package/workflows/rollback.md +79 -10
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Manage Design.MD design system files for a project. Supports creating design.md (Q&A or
|
|
3
|
+
community import), syncing tokens to stylesheets (Tailwind/CSS/SCSS), auditing compliance,
|
|
4
|
+
and importing brand templates from the awesome-design-md catalog.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<process>
|
|
8
|
+
|
|
9
|
+
<step name="command_router">
|
|
10
|
+
Parse the first recognized flag from args: --init | --sync | --audit | --import [brand].
|
|
11
|
+
If no flag: print help and exit.
|
|
12
|
+
</step>
|
|
13
|
+
|
|
14
|
+
<step name="init_qa">
|
|
15
|
+
Q&A from scratch: gather brand name, personality, primary color, font family, heading scale,
|
|
16
|
+
spacing base, corner radius → auto-derive semantic colors → write design.md at project root.
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="init_import">
|
|
20
|
+
awesome-design-md import: AUQ catalog picker by category → fetch template from GitHub raw →
|
|
21
|
+
preview token table → AUQ apply mode (Apply as-is / Customize / Reference only).
|
|
22
|
+
</step>
|
|
23
|
+
|
|
24
|
+
<step name="sync_tokens">
|
|
25
|
+
Parse design.md YAML front matter → TOKEN_MAP. Detect stack (Tailwind / CSS vars / SCSS).
|
|
26
|
+
Generate/update target with tokens. Conflict resolution per token via AUQ. Report synced count.
|
|
27
|
+
</step>
|
|
28
|
+
|
|
29
|
+
<step name="audit_compliance">
|
|
30
|
+
Discover .html/.css/.scss files (exclude node_modules). Extract color/font refs. Compare vs
|
|
31
|
+
TOKEN_MAP. Categorize: ❌ Critical / ⚠️ Minor / ✅ Compliant. Generate report table. Suggest --sync.
|
|
32
|
+
</step>
|
|
33
|
+
|
|
34
|
+
<step name="import_brand">
|
|
35
|
+
Resolve brand from arg or AUQ catalog. Fetch template. Preview tokens. AUQ apply mode.
|
|
36
|
+
Same apply logic as init_import. Falls back to Q&A if fetch fails.
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
</process>
|
|
40
|
+
|
|
41
|
+
<success_criteria>
|
|
42
|
+
- [ ] `design.md` created/updated at project root with valid Design.MD v1 YAML front matter
|
|
43
|
+
- [ ] `--init` Q&A covers brand / color / typography / spacing / rounded
|
|
44
|
+
- [ ] `--init --import` fetches community template and applies per user choice
|
|
45
|
+
- [ ] `--sync` detects Tailwind / CSS vars / SCSS and updates correct target file
|
|
46
|
+
- [ ] `--sync` conflict resolution uses AUQ per conflicting token
|
|
47
|
+
- [ ] `--audit` generates severity-categorized compliance report (❌/⚠️/✅)
|
|
48
|
+
- [ ] `--import` fetches community template from awesome-design-md catalog
|
|
49
|
+
- [ ] AUQ used for catalog picker, apply mode, multi-target selection, conflict resolution
|
|
50
|
+
- [ ] Offline fallback: --import network failure routes to --init Q&A
|
|
51
|
+
</success_criteria>
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Command Router
|
|
56
|
+
|
|
57
|
+
Parse the first recognized flag from args:
|
|
58
|
+
|
|
59
|
+
| Flag | Mode |
|
|
60
|
+
|------|------|
|
|
61
|
+
| `--init` | Initialize/create design.md |
|
|
62
|
+
| `--sync` | Sync tokens → project stylesheets |
|
|
63
|
+
| `--audit` | Compliance report scan |
|
|
64
|
+
| `--import [brand]` | Import community template |
|
|
65
|
+
|
|
66
|
+
If no flag or unrecognized: print help listing the 4 commands and exit.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## --init Flow
|
|
71
|
+
|
|
72
|
+
### Mode Detection
|
|
73
|
+
|
|
74
|
+
Check if `--import` is also present (or user says "import"/"from community"):
|
|
75
|
+
- If yes → **Mode B: awesome-design-md import**
|
|
76
|
+
- If no → **Mode A: Q&A from scratch**
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### Mode A: Q&A from Scratch
|
|
81
|
+
|
|
82
|
+
**Step 1 — Brand Identity**
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
AUQ prompt: "What's your brand name?"
|
|
86
|
+
→ free text (required)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
AUQ prompt: "Choose your brand personality (3 words describe the vibe):"
|
|
91
|
+
options:
|
|
92
|
+
- "Minimal / Clean / Modern"
|
|
93
|
+
- "Bold / Energetic / Vibrant"
|
|
94
|
+
- "Playful / Friendly / Warm"
|
|
95
|
+
- "Enterprise / Professional / Reliable"
|
|
96
|
+
- "Technical / Developer / Precise"
|
|
97
|
+
- "Custom — I'll describe it"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
AUQ prompt: "Primary brand color:"
|
|
102
|
+
options:
|
|
103
|
+
- "Indigo — #6366f1 (modern SaaS)"
|
|
104
|
+
- "Blue — #3b82f6 (trust / enterprise)"
|
|
105
|
+
- "Emerald — #10b981 (growth / fintech)"
|
|
106
|
+
- "Violet — #8b5cf6 (creative / AI)"
|
|
107
|
+
- "Enter hex manually"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If "Enter hex manually" → prompt: "Enter hex color (e.g. #ff5500):"
|
|
111
|
+
|
|
112
|
+
**Step 2 — Typography**
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
AUQ prompt: "Font family:"
|
|
116
|
+
options:
|
|
117
|
+
- "Inter — versatile, modern UI standard"
|
|
118
|
+
- "Geist — clean, developer-focused (Vercel)"
|
|
119
|
+
- "Plus Jakarta Sans — friendly, contemporary"
|
|
120
|
+
- "DM Sans — geometric, approachable"
|
|
121
|
+
- "Custom — specify font name"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
AUQ prompt: "Heading scale / line-height feel:"
|
|
126
|
+
options:
|
|
127
|
+
- "Tight compact — 1.1–1.2 (bold, impactful)"
|
|
128
|
+
- "Balanced standard — 1.3–1.4 (Recommended)"
|
|
129
|
+
- "Spacious editorial — 1.5–1.6 (readable, airy)"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Step 3 — Spacing & Shape**
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
AUQ prompt: "Spacing base unit:"
|
|
136
|
+
options:
|
|
137
|
+
- "4px atomic — fine-grained control"
|
|
138
|
+
- "8px standard — Recommended (most UI frameworks)"
|
|
139
|
+
- "Custom — specify px value"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
AUQ prompt: "Corner radius style:"
|
|
144
|
+
options:
|
|
145
|
+
- "Sharp — 0px (geometric, no rounding)"
|
|
146
|
+
- "Subtle — 4px (slight polish)"
|
|
147
|
+
- "Rounded — 8px — Recommended"
|
|
148
|
+
- "Smooth — 12px (friendly, modern)"
|
|
149
|
+
- "Pill — 16px+ (soft, playful)"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Step 4 — Auto-Generate Semantic Colors**
|
|
153
|
+
|
|
154
|
+
From primary hex, derive:
|
|
155
|
+
- `surface`: lighten primary by 95% (near-white tint)
|
|
156
|
+
- `surface_secondary`: lighten primary by 90%
|
|
157
|
+
- `error`: #ef4444 (standard red — override if brand conflicts)
|
|
158
|
+
- `success`: #22c55e (standard green)
|
|
159
|
+
- `warning`: #f59e0b (standard amber)
|
|
160
|
+
- `text_primary`: #0f172a (dark neutral)
|
|
161
|
+
- `text_secondary`: #64748b (muted neutral)
|
|
162
|
+
|
|
163
|
+
Show preview table:
|
|
164
|
+
```
|
|
165
|
+
┌──────────────────────────────────────────────────────────┐
|
|
166
|
+
│ Color Preview │
|
|
167
|
+
├──────────────────┬───────────┬──────────────────────────┤
|
|
168
|
+
│ Token │ Hex │ Role │
|
|
169
|
+
├──────────────────┼───────────┼──────────────────────────┤
|
|
170
|
+
│ primary │ {hex} │ Brand / interactive │
|
|
171
|
+
│ surface │ {hex} │ Page background │
|
|
172
|
+
│ surface_second │ {hex} │ Card / panel bg │
|
|
173
|
+
│ error │ #ef4444 │ Errors / destructive │
|
|
174
|
+
│ success │ #22c55e │ Confirmations │
|
|
175
|
+
│ warning │ #f59e0b │ Cautions │
|
|
176
|
+
│ text_primary │ #0f172a │ Body text │
|
|
177
|
+
│ text_secondary │ #64748b │ Muted / labels │
|
|
178
|
+
└──────────────────┴───────────┴──────────────────────────┘
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Step 5 — Write design.md at Project Root**
|
|
182
|
+
|
|
183
|
+
Write `design.md` with the following structure:
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
---
|
|
187
|
+
colors:
|
|
188
|
+
primary: "{hex}"
|
|
189
|
+
surface: "{hex}"
|
|
190
|
+
surface_secondary: "{hex}"
|
|
191
|
+
error: "#ef4444"
|
|
192
|
+
success: "#22c55e"
|
|
193
|
+
warning: "#f59e0b"
|
|
194
|
+
text_primary: "#0f172a"
|
|
195
|
+
text_secondary: "#64748b"
|
|
196
|
+
typography:
|
|
197
|
+
font_sans: "{font_name}"
|
|
198
|
+
font_mono: "JetBrains Mono"
|
|
199
|
+
scale_ratio: 1.25
|
|
200
|
+
heading_line_height: {value}
|
|
201
|
+
body_line_height: 1.5
|
|
202
|
+
spacing:
|
|
203
|
+
base: {n}
|
|
204
|
+
scale: [4, 8, 12, 16, 24, 32, 48, 64, 96, 128]
|
|
205
|
+
rounded:
|
|
206
|
+
sm: "4px"
|
|
207
|
+
md: "{radius}px"
|
|
208
|
+
lg: "{radius * 2}px"
|
|
209
|
+
full: "9999px"
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
# Design System — {brand_name}
|
|
213
|
+
|
|
214
|
+
## Brand Identity
|
|
215
|
+
**Personality:** {personality}
|
|
216
|
+
**Primary color:** {hex} — {color_name}
|
|
217
|
+
|
|
218
|
+
## Typography
|
|
219
|
+
- **Sans:** {font_name} — imported from Google Fonts / npm
|
|
220
|
+
- **Mono:** JetBrains Mono — code blocks, terminals
|
|
221
|
+
- **Scale ratio:** 1.25 (major third)
|
|
222
|
+
|
|
223
|
+
## Color Palette
|
|
224
|
+
| Token | Hex | Usage |
|
|
225
|
+
|-------|-----|-------|
|
|
226
|
+
| primary | {hex} | CTAs, links, interactive |
|
|
227
|
+
| surface | {hex} | Page background |
|
|
228
|
+
| surface_secondary | {hex} | Cards, panels |
|
|
229
|
+
| error | #ef4444 | Errors, destructive actions |
|
|
230
|
+
| success | #22c55e | Confirmations, success states |
|
|
231
|
+
| warning | #f59e0b | Cautions, pending |
|
|
232
|
+
| text_primary | #0f172a | Body text, headings |
|
|
233
|
+
| text_secondary | #64748b | Labels, placeholders, muted |
|
|
234
|
+
|
|
235
|
+
## Spacing
|
|
236
|
+
Base unit: {n}px. Scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128
|
|
237
|
+
|
|
238
|
+
## Border Radius
|
|
239
|
+
sm={rounded.sm} · md={rounded.md} · lg={rounded.lg} · full={rounded.full}
|
|
240
|
+
|
|
241
|
+
## Components
|
|
242
|
+
> Extend this section per component as your design system grows.
|
|
243
|
+
|
|
244
|
+
## Accessibility
|
|
245
|
+
- Contrast ratio target: WCAG AA (4.5:1 for text)
|
|
246
|
+
- Focus ring: 2px solid primary + 2px offset
|
|
247
|
+
- Minimum tap target: 44×44px
|
|
248
|
+
|
|
249
|
+
## Motion
|
|
250
|
+
- Duration short: 150ms
|
|
251
|
+
- Duration medium: 250ms
|
|
252
|
+
- Easing: cubic-bezier(0.4, 0, 0.2, 1)
|
|
253
|
+
|
|
254
|
+
## Dark Mode
|
|
255
|
+
> Document dark-mode token overrides here when applicable.
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Print confirmation: `✅ design.md created at {path}`
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### Mode B: awesome-design-md Import
|
|
263
|
+
|
|
264
|
+
**Step 1 — Catalog Picker**
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
AUQ prompt: "Choose a brand from the awesome-design-md community library:"
|
|
268
|
+
options (by category):
|
|
269
|
+
── Productivity ──
|
|
270
|
+
- "Notion — clean minimal, off-white surface"
|
|
271
|
+
- "Linear — dark-first, indigo accent"
|
|
272
|
+
- "Asana — coral/pink, energetic"
|
|
273
|
+
- "Todoist — red, structured"
|
|
274
|
+
── Developer ──
|
|
275
|
+
- "GitHub — neutral, professional"
|
|
276
|
+
- "Vercel — black/white, high contrast"
|
|
277
|
+
- "Figma — purple, creative"
|
|
278
|
+
- "Supabase — emerald green, developer"
|
|
279
|
+
── Commerce ──
|
|
280
|
+
- "Stripe — indigo blue, financial trust"
|
|
281
|
+
- "Shopify — green, commerce"
|
|
282
|
+
- "Paddle — dark blue, SaaS billing"
|
|
283
|
+
── Enterprise ──
|
|
284
|
+
- "IBM Carbon — blue, enterprise"
|
|
285
|
+
- "Atlassian — blue, collaborative"
|
|
286
|
+
- "Salesforce — cloud blue, CRM"
|
|
287
|
+
── Creative ──
|
|
288
|
+
- "Dribbble — pink, portfolio"
|
|
289
|
+
- "Behance — blue, Adobe"
|
|
290
|
+
- "Adobe — red, creative suite"
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Step 2 — Fetch Template**
|
|
294
|
+
|
|
295
|
+
Fetch from awesome-design-md GitHub raw content:
|
|
296
|
+
```
|
|
297
|
+
https://raw.githubusercontent.com/philschmid/awesome-design-md/main/templates/{brand-slug}/design.md
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
If fetch fails: show error + offer to continue with Q&A mode (Mode A).
|
|
301
|
+
|
|
302
|
+
**Step 3 — Preview**
|
|
303
|
+
|
|
304
|
+
Show token table from fetched design.md YAML:
|
|
305
|
+
```
|
|
306
|
+
Brand: {brand_name}
|
|
307
|
+
|
|
308
|
+
Colors:
|
|
309
|
+
primary: {hex}
|
|
310
|
+
surface: {hex}
|
|
311
|
+
...
|
|
312
|
+
|
|
313
|
+
Typography:
|
|
314
|
+
font_sans: {font}
|
|
315
|
+
heading_lh: {value}
|
|
316
|
+
|
|
317
|
+
Spacing:
|
|
318
|
+
base: {n}px
|
|
319
|
+
|
|
320
|
+
Rounded:
|
|
321
|
+
md: {value}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
**Step 4 — Apply Mode**
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
AUQ prompt: "How would you like to apply this template?"
|
|
328
|
+
options:
|
|
329
|
+
- "Apply as-is — write design.md to project root now"
|
|
330
|
+
- "Customize before applying — walk through each token group"
|
|
331
|
+
- "Use as reference only — save to .viepilot/ui-direction/reference-design.md"
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
**Apply as-is:** Write fetched design.md to project root. Done.
|
|
335
|
+
|
|
336
|
+
**Customize before applying:** For each token group (colors / typography / spacing / rounded):
|
|
337
|
+
- Show current values
|
|
338
|
+
- AUQ: "Keep as-is / Override this group"
|
|
339
|
+
- If override: run the relevant Q&A sub-step from Mode A
|
|
340
|
+
- Then write merged design.md
|
|
341
|
+
|
|
342
|
+
**Reference only:** Copy to `.viepilot/ui-direction/reference-design.md`. Print notice: "Saved as reference — not applied to project root."
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## --sync Flow
|
|
347
|
+
|
|
348
|
+
**Step 1 — Read design.md**
|
|
349
|
+
|
|
350
|
+
Look for `design.md` in:
|
|
351
|
+
1. Current directory
|
|
352
|
+
2. Project root (walk up from CWD)
|
|
353
|
+
|
|
354
|
+
If not found: print error "No design.md found. Run /vp-design --init first." and exit.
|
|
355
|
+
|
|
356
|
+
Parse YAML front matter → build `TOKEN_MAP`:
|
|
357
|
+
```
|
|
358
|
+
TOKEN_MAP = {
|
|
359
|
+
colors: { primary, surface, surface_secondary, error, success, warning, text_primary, text_secondary },
|
|
360
|
+
typography: { font_sans, font_mono, scale_ratio, heading_line_height, body_line_height },
|
|
361
|
+
spacing: { base, scale[] },
|
|
362
|
+
rounded: { sm, md, lg, full }
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Step 2 — Detect Stack**
|
|
367
|
+
|
|
368
|
+
Check files in project root:
|
|
369
|
+
```
|
|
370
|
+
tailwind.config.js → Tailwind mode
|
|
371
|
+
tailwind.config.ts → Tailwind mode
|
|
372
|
+
style.css → CSS custom properties mode (if no tailwind)
|
|
373
|
+
styles.css → CSS custom properties mode (if no tailwind)
|
|
374
|
+
src/styles/*.css → CSS custom properties mode (if no tailwind)
|
|
375
|
+
*.scss / src/**/*.scss → SCSS mode
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
If multiple targets detected:
|
|
379
|
+
```
|
|
380
|
+
AUQ prompt: "Multiple stylesheet targets found. Which should be updated?"
|
|
381
|
+
options:
|
|
382
|
+
- "tailwind.config.js"
|
|
383
|
+
- "style.css"
|
|
384
|
+
- "{first scss file found}"
|
|
385
|
+
- "All targets"
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Step 3 — Generate / Update Target**
|
|
389
|
+
|
|
390
|
+
**Tailwind mode** — update `theme.extend` in `tailwind.config.js`:
|
|
391
|
+
```js
|
|
392
|
+
theme: {
|
|
393
|
+
extend: {
|
|
394
|
+
colors: {
|
|
395
|
+
primary: '{colors.primary}',
|
|
396
|
+
surface: '{colors.surface}',
|
|
397
|
+
'surface-secondary': '{colors.surface_secondary}',
|
|
398
|
+
error: '{colors.error}',
|
|
399
|
+
success: '{colors.success}',
|
|
400
|
+
warning: '{colors.warning}',
|
|
401
|
+
},
|
|
402
|
+
fontFamily: {
|
|
403
|
+
sans: ['{typography.font_sans}', 'system-ui', 'sans-serif'],
|
|
404
|
+
mono: ['{typography.font_mono}', 'monospace'],
|
|
405
|
+
},
|
|
406
|
+
spacing: {
|
|
407
|
+
base: '{spacing.base}px',
|
|
408
|
+
},
|
|
409
|
+
borderRadius: {
|
|
410
|
+
sm: '{rounded.sm}',
|
|
411
|
+
DEFAULT: '{rounded.md}',
|
|
412
|
+
lg: '{rounded.lg}',
|
|
413
|
+
full: '{rounded.full}',
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**CSS custom properties mode** — inject into `:root` block in target CSS file:
|
|
420
|
+
```css
|
|
421
|
+
:root {
|
|
422
|
+
--color-primary: {colors.primary};
|
|
423
|
+
--color-surface: {colors.surface};
|
|
424
|
+
--color-surface-secondary: {colors.surface_secondary};
|
|
425
|
+
--color-error: {colors.error};
|
|
426
|
+
--color-success: {colors.success};
|
|
427
|
+
--color-warning: {colors.warning};
|
|
428
|
+
--color-text-primary: {colors.text_primary};
|
|
429
|
+
--color-text-secondary: {colors.text_secondary};
|
|
430
|
+
--font-sans: '{typography.font_sans}', system-ui, sans-serif;
|
|
431
|
+
--font-mono: '{typography.font_mono}', monospace;
|
|
432
|
+
--spacing-base: {spacing.base}px;
|
|
433
|
+
--rounded-sm: {rounded.sm};
|
|
434
|
+
--rounded-md: {rounded.md};
|
|
435
|
+
--rounded-lg: {rounded.lg};
|
|
436
|
+
--rounded-full: {rounded.full};
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**SCSS mode** — write/update `_variables.scss` (or prepend to first .scss found):
|
|
441
|
+
```scss
|
|
442
|
+
$color-primary: {colors.primary};
|
|
443
|
+
$color-surface: {colors.surface};
|
|
444
|
+
$color-surface-secondary: {colors.surface_secondary};
|
|
445
|
+
$color-error: {colors.error};
|
|
446
|
+
$color-success: {colors.success};
|
|
447
|
+
$color-warning: {colors.warning};
|
|
448
|
+
$color-text-primary: {colors.text_primary};
|
|
449
|
+
$color-text-secondary: {colors.text_secondary};
|
|
450
|
+
$font-sans: '{typography.font_sans}', system-ui, sans-serif;
|
|
451
|
+
$font-mono: '{typography.font_mono}', monospace;
|
|
452
|
+
$spacing-base: {spacing.base}px;
|
|
453
|
+
$rounded-sm: {rounded.sm};
|
|
454
|
+
$rounded-md: {rounded.md};
|
|
455
|
+
$rounded-lg: {rounded.lg};
|
|
456
|
+
$rounded-full: {rounded.full};
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Step 4 — Conflict Resolution**
|
|
460
|
+
|
|
461
|
+
For each token that would overwrite an existing non-matching value:
|
|
462
|
+
```
|
|
463
|
+
AUQ prompt: "Conflict: {token} — current: {current_value} | design.md: {new_value}"
|
|
464
|
+
options:
|
|
465
|
+
- "Override — use design.md value"
|
|
466
|
+
- "Keep — keep current value"
|
|
467
|
+
- "Skip all conflicts"
|
|
468
|
+
- "Override all conflicts"
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
`--force` flag: skip all prompts, override all.
|
|
472
|
+
|
|
473
|
+
**Step 5 — Report**
|
|
474
|
+
|
|
475
|
+
```
|
|
476
|
+
✅ Synced N tokens to {target_file}
|
|
477
|
+
Colors: N tokens
|
|
478
|
+
Typography: N tokens
|
|
479
|
+
Spacing: N tokens
|
|
480
|
+
Rounded: N tokens
|
|
481
|
+
Conflicts: N overridden / N kept / N skipped
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## --audit Flow
|
|
487
|
+
|
|
488
|
+
**Step 1 — Discover Files**
|
|
489
|
+
|
|
490
|
+
Find all `.html`, `.css`, `.scss` in project (excluding `node_modules/`, `.git/`, `dist/`, `.next/`, `build/`).
|
|
491
|
+
|
|
492
|
+
**Step 2 — Read design.md → TOKEN_MAP**
|
|
493
|
+
|
|
494
|
+
Same as --sync Step 1. If no design.md found: print error and exit.
|
|
495
|
+
|
|
496
|
+
**Step 3 — Per-File Analysis**
|
|
497
|
+
|
|
498
|
+
For each file:
|
|
499
|
+
- Extract all hex color literals (`#[0-9a-fA-F]{3,8}`)
|
|
500
|
+
- Extract all `font-family:` declarations
|
|
501
|
+
- Extract all `border-radius:` values
|
|
502
|
+
- Extract CSS var references (`var(--*)`)
|
|
503
|
+
|
|
504
|
+
Compare against TOKEN_MAP:
|
|
505
|
+
|
|
506
|
+
| Condition | Severity |
|
|
507
|
+
|-----------|----------|
|
|
508
|
+
| Uses wrong font-family (not matching `typography.font_sans`) | ❌ Critical |
|
|
509
|
+
| Uses hardcoded primary/surface hex (not as CSS var) | ⚠️ Minor |
|
|
510
|
+
| Uses unknown color hex not in TOKEN_MAP | ⚠️ Minor |
|
|
511
|
+
| Uses correct CSS var (e.g. `var(--color-primary)`) | ✅ Compliant |
|
|
512
|
+
| Uses correct design.md hex directly | ✅ Compliant |
|
|
513
|
+
|
|
514
|
+
**Step 4 — Generate Report Table**
|
|
515
|
+
|
|
516
|
+
```
|
|
517
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
518
|
+
VP-DESIGN ► AUDIT REPORT
|
|
519
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
520
|
+
|
|
521
|
+
design.md: {path}
|
|
522
|
+
Files scanned: {N}
|
|
523
|
+
|
|
524
|
+
┌────────────────────┬──────────┬─────────────┬─────────┬──────────┐
|
|
525
|
+
│ File │ Colors │ Typography │ Spacing │ Status │
|
|
526
|
+
├────────────────────┼──────────┼─────────────┼─────────┼──────────┤
|
|
527
|
+
│ index.html │ ✅ │ ⚠️ 1 │ ✅ │ Partial │
|
|
528
|
+
│ style.css │ ⚠️ 2 │ ✅ │ ✅ │ Partial │
|
|
529
|
+
│ components/btn.css │ ❌ 1 │ ✅ │ ⚠️ 1 │ Critical │
|
|
530
|
+
└────────────────────┴──────────┴─────────────┴─────────┴──────────┘
|
|
531
|
+
|
|
532
|
+
Summary:
|
|
533
|
+
❌ Critical: {N} issues in {N} files
|
|
534
|
+
⚠️ Minor: {N} issues in {N} files
|
|
535
|
+
✅ Compliant: {N} files fully compliant
|
|
536
|
+
|
|
537
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Step 5 — Suggestion**
|
|
541
|
+
|
|
542
|
+
If any non-compliant files:
|
|
543
|
+
> Run `/vp-design --sync` to auto-inject design tokens into your stylesheets.
|
|
544
|
+
|
|
545
|
+
If all compliant:
|
|
546
|
+
> All files are compliant with design.md. No action needed.
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## --import [brand] Flow
|
|
551
|
+
|
|
552
|
+
**Step 1 — Resolve Brand**
|
|
553
|
+
|
|
554
|
+
If `[brand]` arg provided:
|
|
555
|
+
- Normalize: lowercase, replace spaces with `-` (e.g. "IBM Carbon" → "ibm-carbon")
|
|
556
|
+
- Search awesome-design-md catalog for match (fuzzy: check if arg is substring of known slugs)
|
|
557
|
+
- If match found → proceed to Step 2
|
|
558
|
+
- If no match → show "Brand not found" + display catalog picker (same as no-arg case)
|
|
559
|
+
|
|
560
|
+
If no `[brand]` arg:
|
|
561
|
+
- Show AUQ catalog picker (same categories as --init Mode B Step 1)
|
|
562
|
+
|
|
563
|
+
**Step 2 — Fetch Template**
|
|
564
|
+
|
|
565
|
+
```
|
|
566
|
+
URL: https://raw.githubusercontent.com/philschmid/awesome-design-md/main/templates/{brand-slug}/design.md
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
On success: parse YAML front matter + full content.
|
|
570
|
+
On failure (404 / network error):
|
|
571
|
+
- Print: "Could not fetch {brand} template. Using Q&A fallback."
|
|
572
|
+
- Route to --init Mode A
|
|
573
|
+
|
|
574
|
+
**Step 3 — Preview Token Table**
|
|
575
|
+
|
|
576
|
+
Same as --init Mode B Step 3.
|
|
577
|
+
|
|
578
|
+
**Step 4 — Apply Mode**
|
|
579
|
+
|
|
580
|
+
Same as --init Mode B Step 4 (AUQ: Apply as-is / Customize / Reference only).
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
## Adapter Compatibility
|
|
585
|
+
|
|
586
|
+
| Adapter | AUQ | Fallback |
|
|
587
|
+
|---------|-----|---------|
|
|
588
|
+
| Claude Code (terminal) | ✅ AskUserQuestion (preload via ToolSearch) | — |
|
|
589
|
+
| Cursor / Codex / Copilot | ❌ | Plain numbered list |
|
|
590
|
+
|
|
591
|
+
**AUQ preload (ENH-059):** Call `ToolSearch` with `query: "select:AskUserQuestion"` before first prompt.
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## Notes
|
|
596
|
+
|
|
597
|
+
- `design.md` is written/read relative to CWD or project root (walk-up detection).
|
|
598
|
+
- `--sync` is idempotent: running twice with same design.md produces same output.
|
|
599
|
+
- `--audit` is read-only: never modifies files.
|
|
600
|
+
- Tokens derived from `design.md` YAML front matter only (not Markdown body).
|
|
601
|
+
- awesome-design-md fetch is runtime; requires internet access. Offline: use `--init` Q&A.
|
package/workflows/evolve.md
CHANGED
|
@@ -121,6 +121,15 @@ Questions:
|
|
|
121
121
|
|
|
122
122
|
If incompatible → suggest refactor first or discuss alternative.
|
|
123
123
|
|
|
124
|
+
### Phase Template Suggestion (ENH-073)
|
|
125
|
+
Read persona's phase template:
|
|
126
|
+
```bash
|
|
127
|
+
node "$HOME/.claude/viepilot/bin/vp-tools.cjs" persona context
|
|
128
|
+
```
|
|
129
|
+
If `persona.phase_template` is set and matches a domain pack (web-saas/data-science/mobile/devops/ai-product),
|
|
130
|
+
suggest the domain pack's `phase_template.phases` as default phase ordering when generating tasks.
|
|
131
|
+
User can override freely. Silent if persona unavailable.
|
|
132
|
+
|
|
124
133
|
### Smart Route to Brainstorm (when applicable)
|
|
125
134
|
If the feature leans toward product discovery, UX, or landing page:
|
|
126
135
|
- Route through advanced brainstorm instead of locking the phase immediately:
|