get-shit-pretty 0.5.1 → 0.5.2
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/.claude-plugin/plugin.json +1 -1
- package/bin/install.js +38 -19
- package/gsp/agents/gsp-accessibility-auditor.md +1 -4
- package/gsp/agents/gsp-ascii-artist.md +1 -1
- package/gsp/agents/gsp-brand-auditor.md +0 -2
- package/gsp/agents/gsp-brand-strategist.md +0 -2
- package/gsp/agents/gsp-brand-syncer.md +125 -0
- package/gsp/agents/gsp-builder.md +2 -7
- package/gsp/agents/gsp-campaign-director.md +0 -20
- package/gsp/agents/gsp-critic.md +15 -18
- package/gsp/agents/gsp-designer.md +0 -4
- package/gsp/agents/gsp-identity-designer.md +0 -4
- package/gsp/agents/gsp-pattern-architect.md +1 -63
- package/gsp/agents/gsp-project-researcher.md +0 -21
- package/gsp/agents/gsp-researcher.md +0 -2
- package/gsp/agents/gsp-reviewer.md +1 -12
- package/gsp/agents/gsp-scoper.md +0 -21
- package/gsp/hooks/hooks.json +11 -0
- package/gsp/prompts/01-design-system-architect.md +0 -46
- package/gsp/prompts/02-brand-identity-creator.md +1 -14
- package/gsp/prompts/03-ui-ux-pattern-master.md +1 -23
- package/gsp/prompts/04-marketing-asset-factory.md +1 -14
- package/gsp/prompts/05-implementation-spec-expert.md +0 -27
- package/gsp/prompts/06-design-critique-partner.md +1 -17
- package/gsp/prompts/07-design-trend-synthesizer.md +2 -29
- package/gsp/prompts/08-accessibility-auditor.md +4 -19
- package/gsp/prompts/09-design-to-code-translator.md +17 -31
- package/gsp/prompts/10-project-scoper.md +2 -36
- package/gsp/prompts/11-deliverable-reviewer.md +1 -50
- package/gsp/prompts/12-project-researcher.md +0 -39
- package/gsp/references/anti-patterns.md +173 -0
- package/gsp/references/block-patterns.md +44 -0
- package/gsp/references/chunk-format.md +31 -0
- package/gsp/references/style-preset-schema.md +63 -0
- package/gsp/references/visual-effects.md +247 -0
- package/gsp/references/visual-taste.md +120 -0
- package/gsp/skills/gsp-brand-sync/SKILL.md +101 -0
- package/gsp/skills/gsp-help/SKILL.md +1 -0
- package/gsp/skills/gsp-project-build/SKILL.md +89 -2
- package/gsp/skills/gsp-project-critique/SKILL.md +2 -0
- package/gsp/skills/gsp-project-design/SKILL.md +1 -0
- package/gsp/skills/gsp-style/SKILL.md +14 -217
- package/gsp/skills/gsp-typescale/SKILL.md +23 -319
- package/package.json +1 -1
- package/scripts/gsp-context-recovery.sh +71 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Visual Taste Evaluation Framework
|
|
2
|
+
|
|
3
|
+
Companion to `nielsen-heuristics.md`. Nielsen measures usability (/50); this measures visual quality (/75). Both are evaluated independently during critique — a design can score high on one and low on the other.
|
|
4
|
+
|
|
5
|
+
## What Taste Means
|
|
6
|
+
|
|
7
|
+
Taste is intentionality in every decision. It's the difference between assembling parts and composing an experience.
|
|
8
|
+
|
|
9
|
+
- **Signal vs noise** — knowing what deserves emphasis and what should fade
|
|
10
|
+
- **Visual coherence** — all elements speaking the same design language
|
|
11
|
+
- **Confidence in constraints** — doing less with more intention
|
|
12
|
+
- **The gap between "it works" and "it feels right"**
|
|
13
|
+
- **Not decoration** — it's the absence of things that shouldn't be there
|
|
14
|
+
|
|
15
|
+
Taste cannot be added at the end. It's a quality that emerges when every decision — type, color, spacing, motion, content — serves the same story.
|
|
16
|
+
|
|
17
|
+
## Sophistication Scale
|
|
18
|
+
|
|
19
|
+
| Level | Name | Description | Examples |
|
|
20
|
+
|-------|------|-------------|----------|
|
|
21
|
+
| 1 | Default | Browser defaults, no styling intention. Looks like a homework assignment. | Unstyled HTML, Craigslist |
|
|
22
|
+
| 2 | Functional | Styled but generic. Could be any product. Uses a component library without customization. | Default Bootstrap site, early-stage SaaS with Tailwind defaults |
|
|
23
|
+
| 3 | Polished | Consistent, professional, follows best practices. Looks like a well-made product. | Notion, Slack, most well-funded SaaS products |
|
|
24
|
+
| 4 | Refined | Intentional details, personality showing through. You notice the craft. | Raycast, Arc Browser, Lottie |
|
|
25
|
+
| 5 | Distinctive | Unmistakably this brand. Memorable. You'd recognize it without the logo. | Linear, Stripe, Vercel |
|
|
26
|
+
|
|
27
|
+
## Taste Evaluation Checklist
|
|
28
|
+
|
|
29
|
+
Score each item 1-5. Total: X/75.
|
|
30
|
+
|
|
31
|
+
### 1. Typography personality
|
|
32
|
+
Does the type choice have character beyond the default? Score 1 if Inter/system font with no hierarchy. Score 5 if a distinctive pairing embodies brand personality with clear weight and size hierarchy.
|
|
33
|
+
|
|
34
|
+
### 2. Color intentionality
|
|
35
|
+
Is the palette considered or default? Score 1 if random, oversaturated, or too many hues. Score 5 if a cohesive system with clear semantic hierarchy and tinted neutrals.
|
|
36
|
+
|
|
37
|
+
### 3. Spacing rhythm
|
|
38
|
+
Does whitespace feel intentional or arbitrary? Score 1 if inconsistent padding with no scale. Score 5 if a clear vertical rhythm creates breathing room and content grouping.
|
|
39
|
+
|
|
40
|
+
### 4. Shadow & depth
|
|
41
|
+
Are surfaces creating meaningful hierarchy? Score 1 if flat or generic `box-shadow: 0 2px 4px rgba(0,0,0,.1)`. Score 5 if tinted shadows with consistent light direction communicate z-layers.
|
|
42
|
+
|
|
43
|
+
### 5. Motion personality
|
|
44
|
+
Does animation match the brand's energy? Score 1 if no motion or linear easing. Score 5 if spring physics, choreographed entrances, and exit animations match brand character.
|
|
45
|
+
|
|
46
|
+
### 6. Content authenticity
|
|
47
|
+
Does copy feel real or templated? Score 1 if Lorem Ipsum, "Welcome to our platform," or AI cliches. Score 5 if specific, voice-consistent, believable content throughout.
|
|
48
|
+
|
|
49
|
+
### 7. Component individuality
|
|
50
|
+
Are components styled to brand or default? Score 1 if stock library defaults (default Radix, unstyled shadcn). Score 5 if radius, color, shadow, and motion are customized to match brand DNA.
|
|
51
|
+
|
|
52
|
+
### 8. Layout confidence
|
|
53
|
+
Does the layout make bold choices or play it safe? Score 1 if generic centered single-column symmetry. Score 5 if intentional asymmetry, creative grid usage, or distinctive composition that serves the content.
|
|
54
|
+
|
|
55
|
+
### 9. Visual coherence
|
|
56
|
+
Do all elements speak the same design language? Score 1 if mixing incompatible styles (glassmorphism + neubrutalism + flat). Score 5 if every element reinforces one visual story.
|
|
57
|
+
|
|
58
|
+
### 10. Surface texture
|
|
59
|
+
Is there tactile quality or is it flat? Score 1 if pure flat vectors with no material quality. Score 5 if subtle grain, glass refraction, or tinted shadows create physical presence appropriate to brand.
|
|
60
|
+
|
|
61
|
+
### 11. State completeness
|
|
62
|
+
Are all interaction states designed? Score 1 if hover, active, loading, empty, and error states are missing or unstyled. Score 5 if every state feels intentional with smooth transitions between them.
|
|
63
|
+
|
|
64
|
+
### 12. Responsive craft
|
|
65
|
+
Is mobile a first-class experience? Score 1 if "it fits on mobile" is the only consideration. Score 5 if mobile has its own considered layout with touch-appropriate sizing and gestures.
|
|
66
|
+
|
|
67
|
+
### 13. Icon consistency
|
|
68
|
+
Unified family, weight, style? Score 1 if mixed icon sets, inconsistent weights, or mismatched sizing. Score 5 if one curated set with consistent stroke width and optical alignment throughout.
|
|
69
|
+
|
|
70
|
+
### 14. Image direction
|
|
71
|
+
Do images match brand personality? Score 1 if stock photos, broken URLs, or placeholder boxes. Score 5 if imagery style (photography, illustration, generative, CSS-only) is a deliberate brand choice.
|
|
72
|
+
|
|
73
|
+
### 15. Overall impression
|
|
74
|
+
Does it feel like a $150k agency build? Score 1 if it looks AI-generated or template-derived. Score 5 if someone would ask "who designed this?"
|
|
75
|
+
|
|
76
|
+
## Scoring
|
|
77
|
+
|
|
78
|
+
**X/75 total**, mapped to sophistication levels:
|
|
79
|
+
|
|
80
|
+
- **15-25**: Level 1-2 (Default/Functional) — needs significant visual work
|
|
81
|
+
- **26-40**: Level 3 (Polished) — professional but not distinctive
|
|
82
|
+
- **41-55**: Level 4 (Refined) — shows craft and personality
|
|
83
|
+
- **56-75**: Level 5 (Distinctive) — agency-quality, memorable
|
|
84
|
+
|
|
85
|
+
## How to Improve Each Level
|
|
86
|
+
|
|
87
|
+
### Level 2 → 3 (Functional → Polished)
|
|
88
|
+
|
|
89
|
+
- Swap default fonts for a considered pairing
|
|
90
|
+
- Establish a consistent spacing scale (4/8px or similar)
|
|
91
|
+
- Add hover states and transitions to all interactive elements
|
|
92
|
+
- Use one accent color consistently with tinted neutrals
|
|
93
|
+
- Add loading and empty states
|
|
94
|
+
|
|
95
|
+
### Level 3 → 4 (Polished → Refined)
|
|
96
|
+
|
|
97
|
+
- Customize component library beyond defaults (radius, shadows, colors)
|
|
98
|
+
- Add subtle texture (noise grain, tinted shadows, soft gradients)
|
|
99
|
+
- Introduce spring physics for interactive motion
|
|
100
|
+
- Use staggered entrances instead of instant mounting
|
|
101
|
+
- Make responsive layouts feel native to each breakpoint
|
|
102
|
+
|
|
103
|
+
### Level 4 → 5 (Refined → Distinctive)
|
|
104
|
+
|
|
105
|
+
- Create signature visual patterns unique to this brand
|
|
106
|
+
- Use advanced interactions (spotlight borders, magnetic elements, scroll choreography)
|
|
107
|
+
- Ensure every surface, shadow, and animation reinforces brand personality
|
|
108
|
+
- Content feels authored — specific voice, real data, believable context
|
|
109
|
+
- Someone could identify the brand from a screenshot without the logo
|
|
110
|
+
|
|
111
|
+
## How to Use
|
|
112
|
+
|
|
113
|
+
This reference is loaded by the critique agent alongside `references/nielsen-heuristics.md`. During critique:
|
|
114
|
+
|
|
115
|
+
1. Score each of the 15 taste items 1-5 with specific examples from the design
|
|
116
|
+
2. Calculate total and map to sophistication level
|
|
117
|
+
3. Write taste evaluation as a section in `critique.md`
|
|
118
|
+
4. Include taste-specific fixes in `prioritized-fixes.md`
|
|
119
|
+
|
|
120
|
+
Usability (Nielsen's, /50) and Taste (/75) are evaluated separately. A design can be highly usable but lack taste, or be visually stunning but have usability problems. Both dimensions must be addressed.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brand-sync
|
|
3
|
+
description: Sync brand to match a project's shipped state — tokens, voice, visual patterns, personality
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Agent
|
|
11
|
+
- Glob
|
|
12
|
+
- Grep
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<context>
|
|
16
|
+
Standalone brand feedback skill. After a project ships (or mid-development), the codebase and content may have diverged from the brand system — adjusted colors, shifted tone of voice, evolved visual patterns. This skill detects those divergences across all brand dimensions and updates the brand to match.
|
|
17
|
+
|
|
18
|
+
This is the standalone version of the feedback loop built into `/gsp:project-build` (build-time). Use this when:
|
|
19
|
+
- A project evolved beyond its original brand during development
|
|
20
|
+
- Manual tweaks were made post-build
|
|
21
|
+
- The voice/tone landed differently than the strategy specified
|
|
22
|
+
- You want to capture a project's shipped look and feel as the new brand baseline
|
|
23
|
+
</context>
|
|
24
|
+
|
|
25
|
+
<objective>
|
|
26
|
+
Compare a project's shipped state against its source brand across all dimensions — tokens, voice, visual patterns, and personality — surface divergences, and update the brand if confirmed.
|
|
27
|
+
|
|
28
|
+
**Input:** A project with a linked brand (via project config or `.design/branding/`)
|
|
29
|
+
**Output:** Updated brand tokens, strategy chunks, identity chunks, and style preset (as applicable)
|
|
30
|
+
**Agent:** `gsp-brand-syncer`
|
|
31
|
+
</objective>
|
|
32
|
+
|
|
33
|
+
<execution_context>
|
|
34
|
+
@${CLAUDE_SKILL_DIR}/../../references/design-tokens.md
|
|
35
|
+
@${CLAUDE_SKILL_DIR}/../../references/chunk-format.md
|
|
36
|
+
</execution_context>
|
|
37
|
+
|
|
38
|
+
<rules>
|
|
39
|
+
- Always use `AskUserQuestion` for user interaction — never prompt via plain text
|
|
40
|
+
- Never update the brand without explicit user confirmation
|
|
41
|
+
- Show before/after for every change — no silent updates
|
|
42
|
+
- Only update dimensions that actually diverged — don't regenerate the entire brand
|
|
43
|
+
</rules>
|
|
44
|
+
|
|
45
|
+
<process>
|
|
46
|
+
## Step 0: Resolve brand and project
|
|
47
|
+
|
|
48
|
+
Scan `.design/branding/` for brand directories. One brand → use it. Multiple → use `AskUserQuestion`.
|
|
49
|
+
|
|
50
|
+
Set `BRAND_PATH` = `.design/branding/{brand}`
|
|
51
|
+
|
|
52
|
+
Check that the brand has at least one of: `patterns/tokens.json`, `strategy/`, `identity/`. If none exist, tell the user: "No brand system found. Run `/gsp:brand-patterns` first."
|
|
53
|
+
|
|
54
|
+
Verify the project codebase has shipped output — source files with components, copy, or styles.
|
|
55
|
+
|
|
56
|
+
## Step 1: Spawn syncer agent
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mkdir -p {BRAND_PATH}/sync
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Spawn the `gsp-brand-syncer` agent with:
|
|
63
|
+
- `BRAND_PATH` and all available brand files (tokens.json, strategy chunks, identity chunks, foundation chunks)
|
|
64
|
+
- Project codebase location (working directory)
|
|
65
|
+
- **Output path:** `{BRAND_PATH}/sync/`
|
|
66
|
+
|
|
67
|
+
The agent writes `SYNC-REPORT.md` with divergences across four dimensions: tokens, voice & tone, visual patterns, personality. Each divergence includes evidence (file paths, line numbers, before/after values).
|
|
68
|
+
|
|
69
|
+
## Step 2: Present findings
|
|
70
|
+
|
|
71
|
+
Read `{BRAND_PATH}/sync/SYNC-REPORT.md`. Present a compact summary per dimension, then use `AskUserQuestion`:
|
|
72
|
+
|
|
73
|
+
- **Sync all** — update brand across all dimensions
|
|
74
|
+
- **Tokens only** — just sync the quantitative token changes
|
|
75
|
+
- **Pick by dimension** — choose which dimensions to sync
|
|
76
|
+
- **Review each** — walk through every divergence individually
|
|
77
|
+
- **Skip** — don't update the brand
|
|
78
|
+
|
|
79
|
+
If "Pick by dimension", ask per dimension. If "Review each", walk through the Update Map from the report.
|
|
80
|
+
|
|
81
|
+
For "Removed" tokens: ask whether to remove from brand or keep (may be used by other projects).
|
|
82
|
+
|
|
83
|
+
## Step 3: Apply confirmed updates
|
|
84
|
+
|
|
85
|
+
Use the Update Map from the sync report. For each confirmed change:
|
|
86
|
+
|
|
87
|
+
**Tokens** — edit `tokens.json` in place (preserve W3C structure). Update corresponding foundation chunks in `{BRAND_PATH}/patterns/foundations/` and style preset `.yml` if it exists.
|
|
88
|
+
|
|
89
|
+
**Voice & tone** — update `{BRAND_PATH}/strategy/voice-and-tone.md` (adjust attributes, tone positions, style rules). Update `messaging.md` if messaging shifted.
|
|
90
|
+
|
|
91
|
+
**Visual patterns** — update foundation chunks in `{BRAND_PATH}/patterns/foundations/`. Update component specs and identity chunks if visual identity evolved.
|
|
92
|
+
|
|
93
|
+
**Personality** — update `{BRAND_PATH}/strategy/archetype.md` and `positioning.md`. Update `brand-platform.md` if values/promise shifted.
|
|
94
|
+
|
|
95
|
+
Preserve chunk format per `references/chunk-format.md`. Update INDEX.md files if chunks were added.
|
|
96
|
+
|
|
97
|
+
## Step 4: Summary
|
|
98
|
+
|
|
99
|
+
Show which files were updated per dimension, then use `AskUserQuestion`: "Brand synced to project. Other projects using this brand will inherit these changes on their next build."
|
|
100
|
+
|
|
101
|
+
</process>
|
|
@@ -41,6 +41,7 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
|
|
|
41
41
|
/gsp:brand-strategy define positioning, personality, voice and messaging
|
|
42
42
|
/gsp:brand-identity create visual identity
|
|
43
43
|
/gsp:brand-patterns build design system tokens and components
|
|
44
|
+
/gsp:brand-sync sync brand to match a project's shipped state
|
|
44
45
|
/gsp:brand-audit audit existing brand before evolving (optional)
|
|
45
46
|
|
|
46
47
|
─── Project ──────────────────────────
|
|
@@ -51,6 +51,7 @@ Implement designs as production-ready code in the codebase via phased pipeline w
|
|
|
51
51
|
@${CLAUDE_SKILL_DIR}/../../templates/phases/build.md
|
|
52
52
|
@${CLAUDE_SKILL_DIR}/../../references/visual-effects.md
|
|
53
53
|
@${CLAUDE_SKILL_DIR}/../../references/block-patterns.md
|
|
54
|
+
@${CLAUDE_SKILL_DIR}/../../references/anti-patterns.md
|
|
54
55
|
</execution_context>
|
|
55
56
|
|
|
56
57
|
<process>
|
|
@@ -157,9 +158,24 @@ After the foundations agent completes, run the build command:
|
|
|
157
158
|
| TypeScript only | `npx tsc --noEmit` |
|
|
158
159
|
| Generic | `npm run build` |
|
|
159
160
|
|
|
160
|
-
**Pass:** Continue to Step 4.
|
|
161
|
+
**Pass:** Continue to preview verification, then Step 4.
|
|
161
162
|
**Fail:** Log the error. Do NOT re-spawn the agent. Surface the error to the user and ask how to proceed.
|
|
162
163
|
|
|
164
|
+
### Preview verification (opt-in)
|
|
165
|
+
|
|
166
|
+
After compile passes, verify the foundations actually render:
|
|
167
|
+
|
|
168
|
+
1. Check if dev server is already running (`lsof -i :3000` or `:5173`)
|
|
169
|
+
2. If running, use `curl -s http://localhost:{port}` to fetch the page
|
|
170
|
+
3. Check the HTML response for:
|
|
171
|
+
- **Not blank** — response body has more than just the shell/boilerplate (>500 chars of content)
|
|
172
|
+
- **Tokens resolved** — grep the response for CSS variables or Tailwind classes from the token config. If `var(--` appears but no matching custom property is defined, tokens may be broken.
|
|
173
|
+
- **Font loaded** — check for the expected Google Fonts import or `@font-face` rule
|
|
174
|
+
|
|
175
|
+
If dev server is not running, skip verification silently — do not start one. This keeps it zero-config.
|
|
176
|
+
|
|
177
|
+
Report any issues found: "⚠️ Preview check: {issue}. This may be cosmetic — continue or investigate?"
|
|
178
|
+
|
|
163
179
|
## Step 4: Phase 3 — FOUNDATION REVIEW
|
|
164
180
|
|
|
165
181
|
Present a summary of what the foundations phase produced:
|
|
@@ -180,6 +196,21 @@ Present a summary of what the foundations phase produced:
|
|
|
180
196
|
Use `AskUserQuestion`: "Foundations look good? Continue building screens, or review first?"
|
|
181
197
|
- **Continue** → proceed to Step 5
|
|
182
198
|
- **Review first** → pause, let user inspect, resume when ready
|
|
199
|
+
- **Adjust** → user requests changes (colors, typography, spacing, etc.)
|
|
200
|
+
|
|
201
|
+
### Brand feedback loop
|
|
202
|
+
|
|
203
|
+
If the user requests adjustments during foundation review:
|
|
204
|
+
|
|
205
|
+
1. Apply the changes to the project codebase first (directly or via a quick builder re-run)
|
|
206
|
+
2. Ask: "Should this change also update the brand system? (Other projects using this brand would inherit it)"
|
|
207
|
+
3. If yes, spawn a background `gsp-pattern-architect` agent to update brand patterns:
|
|
208
|
+
- Pass: the specific changes made (what tokens/values changed, old → new)
|
|
209
|
+
- Pass: `{BRAND_PATH}/patterns/tokens.json` and relevant identity chunks
|
|
210
|
+
- Agent updates tokens.json, foundation chunks, and style preset YAML if applicable
|
|
211
|
+
- Agent writes to `{BRAND_PATH}/` — the brand source of truth
|
|
212
|
+
- Run in background (`run_in_background: true`) so the build pipeline continues
|
|
213
|
+
4. Continue to Step 5 without waiting for brand sync
|
|
183
214
|
|
|
184
215
|
## Step 5: Phase 4 — SCREENS
|
|
185
216
|
|
|
@@ -225,6 +256,53 @@ After each screen agent completes, run the build command.
|
|
|
225
256
|
- **Skip** → mark screen as `partial` in BUILD-LOG, continue
|
|
226
257
|
- **Stop** → halt pipeline, save progress
|
|
227
258
|
|
|
259
|
+
## Step 5.5: Component extraction checkpoint
|
|
260
|
+
|
|
261
|
+
After all screens complete, audit the codebase for duplicated patterns before review.
|
|
262
|
+
|
|
263
|
+
### Automated scan
|
|
264
|
+
|
|
265
|
+
Run these checks in the built codebase:
|
|
266
|
+
|
|
267
|
+
1. **Duplicated Tailwind class clusters** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ files. These are extraction candidates.
|
|
268
|
+
2. **Inline color/spacing values** — Grep for hardcoded hex colors, rgb(), pixel values that should be tokens. Flag any that don't reference CSS variables or Tailwind tokens.
|
|
269
|
+
3. **Repeated component patterns** — Look for similar JSX structures across screen files (e.g., similar card layouts, repeated list items, identical button groups).
|
|
270
|
+
|
|
271
|
+
### Surface proposals
|
|
272
|
+
|
|
273
|
+
Present findings to the user as a numbered list:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
◆ extraction candidates
|
|
277
|
+
|
|
278
|
+
1. Card pattern in 3 screens (landing, changelog-list, dashboard)
|
|
279
|
+
className="rounded-lg border bg-card p-6 shadow-sm"
|
|
280
|
+
→ extract to <Card> component
|
|
281
|
+
|
|
282
|
+
2. Hardcoded colors in 2 files
|
|
283
|
+
text-[#FF6B35] in hero.tsx, cta.tsx
|
|
284
|
+
→ use text-brand-accent token
|
|
285
|
+
|
|
286
|
+
3. Badge pattern in changelog-list, changelog-post
|
|
287
|
+
→ extract to <Badge> component
|
|
288
|
+
|
|
289
|
+
──────────────────────────────
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Use `AskUserQuestion`: "Apply these extractions, skip, or cherry-pick?"
|
|
293
|
+
- **Apply all** → make the changes inline (no agent spawn needed, these are mechanical refactors)
|
|
294
|
+
- **Cherry-pick** → apply selected ones
|
|
295
|
+
- **Skip** → continue to finalize
|
|
296
|
+
|
|
297
|
+
This step is **not auto-applied** — the user decides what to extract.
|
|
298
|
+
|
|
299
|
+
### Brand feedback on extraction
|
|
300
|
+
|
|
301
|
+
If the extraction scan finds hardcoded values that should be tokens (finding type #2), and those tokens are missing from the brand system:
|
|
302
|
+
|
|
303
|
+
1. After applying fixes in the project, ask: "These token gaps also exist in the brand. Update brand patterns?"
|
|
304
|
+
2. If yes, spawn a background `gsp-pattern-architect` agent with the missing token definitions to add them to `{BRAND_PATH}/patterns/tokens.json` and relevant foundation chunks.
|
|
305
|
+
|
|
228
306
|
## Step 6: Finalize
|
|
229
307
|
|
|
230
308
|
After all screens complete (or pipeline stops):
|
|
@@ -273,5 +351,14 @@ For `implementation_target: figma`, skip the phased pipeline. Spawn a single `gs
|
|
|
273
351
|
|
|
274
352
|
## Step 8: Revision mode
|
|
275
353
|
|
|
276
|
-
For `needs-revision` status, spawn a single `gsp-builder` agent with execution_mode: `full` and `review/issues.md` contents. The agent fixes QA issues in the codebase and appends revision sections to BUILD-LOG.md.
|
|
354
|
+
For `needs-revision` status, spawn a single `gsp-builder` agent with execution_mode: `full` and `review/issues.md` contents. The agent fixes QA issues in the codebase and appends revision sections to BUILD-LOG.md.
|
|
355
|
+
|
|
356
|
+
### Brand feedback on revisions
|
|
357
|
+
|
|
358
|
+
After the revision agent completes, check if any QA fixes changed token-level values (colors, typography, spacing, shadows). If so:
|
|
359
|
+
|
|
360
|
+
1. Ask: "These revisions changed brand-level values. Update brand patterns so future projects inherit the fix?"
|
|
361
|
+
2. If yes, spawn a background `gsp-pattern-architect` agent with the changed values to update `{BRAND_PATH}/patterns/`.
|
|
362
|
+
|
|
363
|
+
Then continue from Step 6 (finalize).
|
|
277
364
|
</process>
|
|
@@ -27,6 +27,8 @@ Critique design quality and audit accessibility compliance.
|
|
|
27
27
|
@${CLAUDE_SKILL_DIR}/../../prompts/08-accessibility-auditor.md
|
|
28
28
|
@${CLAUDE_SKILL_DIR}/../../templates/phases/critique.md
|
|
29
29
|
@${CLAUDE_SKILL_DIR}/../../references/nielsen-heuristics.md
|
|
30
|
+
@${CLAUDE_SKILL_DIR}/../../references/visual-taste.md
|
|
31
|
+
@${CLAUDE_SKILL_DIR}/../../references/anti-patterns.md
|
|
30
32
|
@${CLAUDE_SKILL_DIR}/../../references/wcag-checklist.md
|
|
31
33
|
@${CLAUDE_SKILL_DIR}/../../references/color-composition.md
|
|
32
34
|
</execution_context>
|
|
@@ -30,6 +30,7 @@ Design core UI/UX screens and interaction flows.
|
|
|
30
30
|
@${CLAUDE_SKILL_DIR}/../../references/apple-hig-patterns.md
|
|
31
31
|
@${CLAUDE_SKILL_DIR}/../../references/visual-effects.md
|
|
32
32
|
@${CLAUDE_SKILL_DIR}/../../references/block-patterns.md
|
|
33
|
+
@${CLAUDE_SKILL_DIR}/../../references/anti-patterns.md
|
|
33
34
|
</execution_context>
|
|
34
35
|
|
|
35
36
|
<process>
|
|
@@ -35,8 +35,6 @@ Apply a named style preset to produce production-ready design tokens and foundat
|
|
|
35
35
|
|
|
36
36
|
<rules>
|
|
37
37
|
- Always use `AskUserQuestion` for user interaction — never prompt via plain text
|
|
38
|
-
- Presets are the source of truth — expand tokens deterministically, don't improvise values
|
|
39
|
-
- Foundation chunks follow `references/chunk-format.md` format exactly
|
|
40
38
|
- `tokens.json` follows W3C Design Tokens format from `references/design-tokens.md`
|
|
41
39
|
- When mixing styles, later style values override earlier ones (last-wins precedence)
|
|
42
40
|
- Never mix clashing styles — check the compatibility matrix first
|
|
@@ -221,226 +219,25 @@ Stop here. Do not write any files.
|
|
|
221
219
|
|
|
222
220
|
Transform the YAML preset tokens into the full W3C Design Tokens JSON structure.
|
|
223
221
|
|
|
224
|
-
###
|
|
225
|
-
Map preset colors to the W3C structure with `$value` and `$type` fields:
|
|
226
|
-
|
|
227
|
-
```json
|
|
228
|
-
{
|
|
229
|
-
"color": {
|
|
230
|
-
"brand": {
|
|
231
|
-
"primary": { "$value": "{preset.color.primary}", "$type": "color" },
|
|
232
|
-
"secondary": { "$value": "{preset.color.secondary}", "$type": "color" },
|
|
233
|
-
"accent": { "$value": "{preset.color.accent}", "$type": "color" }
|
|
234
|
-
},
|
|
235
|
-
"semantic": {
|
|
236
|
-
"background": { "$value": "{preset.color.background}", "$type": "color" },
|
|
237
|
-
"surface": { "$value": "{preset.color.surface}", "$type": "color" },
|
|
238
|
-
"on-primary": { "$value": "{preset.color.on-primary}", "$type": "color" },
|
|
239
|
-
"on-background": { "$value": "{preset.color.on-background}", "$type": "color" },
|
|
240
|
-
"error": { "$value": "{preset.color.error}", "$type": "color" },
|
|
241
|
-
"success": { "$value": "{preset.color.success}", "$type": "color" },
|
|
242
|
-
"warning": { "$value": "{preset.color.warning}", "$type": "color" },
|
|
243
|
-
"info": { "$value": "{preset.color.info}", "$type": "color" }
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Typography tokens
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"font": {
|
|
253
|
-
"family": {
|
|
254
|
-
"primary": { "$value": "{preset.typography.font-family-primary}", "$type": "fontFamily" },
|
|
255
|
-
"mono": { "$value": "{preset.typography.font-family-mono}", "$type": "fontFamily" }
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
"typography": {
|
|
259
|
-
"display": {
|
|
260
|
-
"$value": {
|
|
261
|
-
"fontFamily": "{font.family.primary}",
|
|
262
|
-
"fontSize": "48px",
|
|
263
|
-
"fontWeight": "{preset.typography.font-weight-heading}",
|
|
264
|
-
"lineHeight": 1.1,
|
|
265
|
-
"letterSpacing": "-0.02em"
|
|
266
|
-
},
|
|
267
|
-
"$type": "typography"
|
|
268
|
-
},
|
|
269
|
-
"heading-1": {
|
|
270
|
-
"$value": {
|
|
271
|
-
"fontFamily": "{font.family.primary}",
|
|
272
|
-
"fontSize": "36px",
|
|
273
|
-
"fontWeight": "{preset.typography.font-weight-heading}",
|
|
274
|
-
"lineHeight": 1.2,
|
|
275
|
-
"letterSpacing": "-0.01em"
|
|
276
|
-
},
|
|
277
|
-
"$type": "typography"
|
|
278
|
-
},
|
|
279
|
-
"heading-2": {
|
|
280
|
-
"$value": {
|
|
281
|
-
"fontFamily": "{font.family.primary}",
|
|
282
|
-
"fontSize": "28px",
|
|
283
|
-
"fontWeight": "{preset.typography.font-weight-heading}",
|
|
284
|
-
"lineHeight": 1.3,
|
|
285
|
-
"letterSpacing": "0"
|
|
286
|
-
},
|
|
287
|
-
"$type": "typography"
|
|
288
|
-
},
|
|
289
|
-
"heading-3": {
|
|
290
|
-
"$value": {
|
|
291
|
-
"fontFamily": "{font.family.primary}",
|
|
292
|
-
"fontSize": "22px",
|
|
293
|
-
"fontWeight": "{preset.typography.font-weight-heading}",
|
|
294
|
-
"lineHeight": 1.4,
|
|
295
|
-
"letterSpacing": "0"
|
|
296
|
-
},
|
|
297
|
-
"$type": "typography"
|
|
298
|
-
},
|
|
299
|
-
"body-large": {
|
|
300
|
-
"$value": {
|
|
301
|
-
"fontFamily": "{font.family.primary}",
|
|
302
|
-
"fontSize": "18px",
|
|
303
|
-
"fontWeight": "{preset.typography.font-weight-body}",
|
|
304
|
-
"lineHeight": "{preset.typography.line-height-base}",
|
|
305
|
-
"letterSpacing": "0"
|
|
306
|
-
},
|
|
307
|
-
"$type": "typography"
|
|
308
|
-
},
|
|
309
|
-
"body": {
|
|
310
|
-
"$value": {
|
|
311
|
-
"fontFamily": "{font.family.primary}",
|
|
312
|
-
"fontSize": "{preset.typography.font-size-base}",
|
|
313
|
-
"fontWeight": "{preset.typography.font-weight-body}",
|
|
314
|
-
"lineHeight": "{preset.typography.line-height-base}",
|
|
315
|
-
"letterSpacing": "0"
|
|
316
|
-
},
|
|
317
|
-
"$type": "typography"
|
|
318
|
-
},
|
|
319
|
-
"body-small": {
|
|
320
|
-
"$value": {
|
|
321
|
-
"fontFamily": "{font.family.primary}",
|
|
322
|
-
"fontSize": "14px",
|
|
323
|
-
"fontWeight": "{preset.typography.font-weight-body}",
|
|
324
|
-
"lineHeight": "{preset.typography.line-height-base}",
|
|
325
|
-
"letterSpacing": "0"
|
|
326
|
-
},
|
|
327
|
-
"$type": "typography"
|
|
328
|
-
},
|
|
329
|
-
"caption": {
|
|
330
|
-
"$value": {
|
|
331
|
-
"fontFamily": "{font.family.primary}",
|
|
332
|
-
"fontSize": "12px",
|
|
333
|
-
"fontWeight": "{preset.typography.font-weight-body}",
|
|
334
|
-
"lineHeight": 1.4,
|
|
335
|
-
"letterSpacing": "0.01em"
|
|
336
|
-
},
|
|
337
|
-
"$type": "typography"
|
|
338
|
-
},
|
|
339
|
-
"overline": {
|
|
340
|
-
"$value": {
|
|
341
|
-
"fontFamily": "{font.family.primary}",
|
|
342
|
-
"fontSize": "11px",
|
|
343
|
-
"fontWeight": 600,
|
|
344
|
-
"lineHeight": 1.5,
|
|
345
|
-
"letterSpacing": "0.08em"
|
|
346
|
-
},
|
|
347
|
-
"$type": "typography"
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
### Spacing tokens
|
|
354
|
-
Generate from the preset's spacing scale:
|
|
355
|
-
|
|
356
|
-
```json
|
|
357
|
-
{
|
|
358
|
-
"spacing": {
|
|
359
|
-
"xs": { "$value": "4px", "$type": "dimension" },
|
|
360
|
-
"sm": { "$value": "8px", "$type": "dimension" },
|
|
361
|
-
"md": { "$value": "16px", "$type": "dimension" },
|
|
362
|
-
"lg": { "$value": "24px", "$type": "dimension" },
|
|
363
|
-
"xl": { "$value": "32px", "$type": "dimension" },
|
|
364
|
-
"2xl": { "$value": "48px", "$type": "dimension" },
|
|
365
|
-
"3xl": { "$value": "64px", "$type": "dimension" },
|
|
366
|
-
"4xl": { "$value": "96px", "$type": "dimension" }
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
```
|
|
222
|
+
### Token expansion mapping
|
|
370
223
|
|
|
371
|
-
|
|
372
|
-
Map preset elevation values to W3C shadow format. Parse the CSS shadow shorthand from the preset into the structured format:
|
|
373
|
-
|
|
374
|
-
```json
|
|
375
|
-
{
|
|
376
|
-
"shadow": {
|
|
377
|
-
"sm": { "$value": "{parsed from preset.elevation.shadow-sm}", "$type": "shadow" },
|
|
378
|
-
"md": { "$value": "{parsed from preset.elevation.shadow-md}", "$type": "shadow" },
|
|
379
|
-
"lg": { "$value": "{parsed from preset.elevation.shadow-lg}", "$type": "shadow" },
|
|
380
|
-
"xl": { "$value": "{parsed from preset.elevation.shadow-xl}", "$type": "shadow" }
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
```
|
|
224
|
+
Transform each YAML preset section into W3C Design Tokens JSON with `$value` and `$type` fields:
|
|
384
225
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
{
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
```
|
|
226
|
+
| Preset section | Token path | $type | Notes |
|
|
227
|
+
|---------------|------------|-------|-------|
|
|
228
|
+
| `color.*` | `color.brand.{key}`, `color.semantic.{key}` | `color` | Split into brand (primary, secondary, accent) and semantic (background, surface, on-primary, on-background, error, success, warning, info) |
|
|
229
|
+
| `typography.*` | `font.family.{primary,mono}` | `fontFamily` | — |
|
|
230
|
+
| `typography.*` | `typography.{level}` | `typography` | Composite: fontFamily, fontSize, fontWeight, lineHeight, letterSpacing. 9 levels: display, heading-1 through heading-3, body-large, body, body-small, caption, overline |
|
|
231
|
+
| `spacing.*` | `spacing.{xs,sm,md,lg,xl,2xl,3xl,4xl}` | `dimension` | — |
|
|
232
|
+
| `elevation.*` | `shadow.{sm,md,lg,xl}` | `shadow` | Parse CSS shadow shorthand into structured format |
|
|
233
|
+
| `shape.*` | `radius.{none,sm,md,lg,full}` | `dimension` | `full` = 9999px |
|
|
234
|
+
| `motion.*` | `motion.duration.{fast,normal}`, `motion.easing.default` | `duration`, `cubicBezier` | — |
|
|
397
235
|
|
|
398
|
-
|
|
399
|
-
If the preset has extra token groups (e.g., `glass` for glassmorphism, `glow` for cyberpunk, `gradient` for vaporwave, `syntax` for terminal), include them under an `$extensions` key:
|
|
400
|
-
|
|
401
|
-
```json
|
|
402
|
-
{
|
|
403
|
-
"$extensions": {
|
|
404
|
-
"gsp-style": "{preset-name}",
|
|
405
|
-
"gsp-style-specific": {
|
|
406
|
-
// style-specific tokens preserved as-is from the preset
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
```
|
|
236
|
+
**Style-specific tokens:** If preset has extra groups (e.g., `glass`, `glow`, `gradient`, `syntax`), include under `$extensions.gsp-style-specific`.
|
|
411
237
|
|
|
412
|
-
|
|
413
|
-
If the preset has a `dark_mode` section, include it under `$extensions.dark`:
|
|
414
|
-
|
|
415
|
-
```json
|
|
416
|
-
{
|
|
417
|
-
"$extensions": {
|
|
418
|
-
"dark": {
|
|
419
|
-
"color": {
|
|
420
|
-
"semantic": {
|
|
421
|
-
"background": { "$value": "{preset.dark_mode.color.background}" },
|
|
422
|
-
"surface": { "$value": "{preset.dark_mode.color.surface}" }
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
```
|
|
238
|
+
**Dark mode:** If preset has `dark_mode` section, include under `$extensions.dark` with semantic color overrides.
|
|
429
239
|
|
|
430
|
-
|
|
431
|
-
```json
|
|
432
|
-
{
|
|
433
|
-
"motion": {
|
|
434
|
-
"duration": {
|
|
435
|
-
"fast": { "$value": "{preset.motion.duration-fast}", "$type": "duration" },
|
|
436
|
-
"normal": { "$value": "{preset.motion.duration-normal}", "$type": "duration" }
|
|
437
|
-
},
|
|
438
|
-
"easing": {
|
|
439
|
-
"default": { "$value": "{preset.motion.easing}", "$type": "cubicBezier" }
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
```
|
|
240
|
+
**Extensions metadata:** Always include `$extensions.gsp-style` with the preset name.
|
|
444
241
|
|
|
445
242
|
## Step 7: Write tokens.json
|
|
446
243
|
|