get-shit-pretty 0.5.0 → 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.
Files changed (68) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +1 -1
  3. package/bin/install.js +38 -19
  4. package/gsp/agents/gsp-accessibility-auditor.md +1 -4
  5. package/gsp/agents/gsp-ascii-artist.md +1 -1
  6. package/gsp/agents/gsp-brand-auditor.md +0 -2
  7. package/gsp/agents/gsp-brand-strategist.md +0 -2
  8. package/gsp/agents/gsp-brand-syncer.md +125 -0
  9. package/gsp/agents/gsp-builder.md +11 -14
  10. package/gsp/agents/gsp-campaign-director.md +0 -20
  11. package/gsp/agents/gsp-critic.md +15 -18
  12. package/gsp/agents/gsp-designer.md +6 -6
  13. package/gsp/agents/gsp-identity-designer.md +0 -4
  14. package/gsp/agents/{gsp-system-architect.md → gsp-pattern-architect.md} +5 -67
  15. package/gsp/agents/gsp-project-researcher.md +0 -21
  16. package/gsp/agents/gsp-researcher.md +0 -2
  17. package/gsp/agents/gsp-reviewer.md +4 -14
  18. package/gsp/agents/gsp-scoper.md +1 -22
  19. package/gsp/hooks/hooks.json +11 -0
  20. package/gsp/prompts/01-design-system-architect.md +0 -46
  21. package/gsp/prompts/02-brand-identity-creator.md +1 -14
  22. package/gsp/prompts/03-ui-ux-pattern-master.md +1 -21
  23. package/gsp/prompts/04-marketing-asset-factory.md +1 -14
  24. package/gsp/prompts/05-implementation-spec-expert.md +0 -27
  25. package/gsp/prompts/06-design-critique-partner.md +1 -17
  26. package/gsp/prompts/07-design-trend-synthesizer.md +2 -29
  27. package/gsp/prompts/08-accessibility-auditor.md +4 -19
  28. package/gsp/prompts/09-design-to-code-translator.md +21 -20
  29. package/gsp/prompts/10-project-scoper.md +2 -36
  30. package/gsp/prompts/11-deliverable-reviewer.md +1 -50
  31. package/gsp/prompts/12-project-researcher.md +0 -39
  32. package/gsp/references/anti-patterns.md +173 -0
  33. package/gsp/references/block-patterns.md +135 -0
  34. package/gsp/references/chunk-format.md +31 -0
  35. package/gsp/references/phase-transitions.md +78 -33
  36. package/gsp/references/style-preset-schema.md +63 -0
  37. package/gsp/references/visual-effects.md +475 -0
  38. package/gsp/references/visual-taste.md +120 -0
  39. package/gsp/skills/gsp-accessibility/SKILL.md +1 -1
  40. package/gsp/skills/gsp-brand-audit/SKILL.md +1 -3
  41. package/gsp/skills/gsp-brand-identity/SKILL.md +1 -4
  42. package/gsp/skills/gsp-brand-patterns/SKILL.md +30 -50
  43. package/gsp/skills/gsp-brand-research/SKILL.md +7 -4
  44. package/gsp/skills/gsp-brand-strategy/SKILL.md +1 -4
  45. package/gsp/skills/gsp-brand-sync/SKILL.md +101 -0
  46. package/gsp/skills/gsp-design-system/SKILL.md +1 -1
  47. package/gsp/skills/gsp-doctor/SKILL.md +7 -7
  48. package/gsp/skills/gsp-help/SKILL.md +2 -1
  49. package/gsp/skills/gsp-launch/SKILL.md +2 -3
  50. package/gsp/skills/gsp-project-brief/SKILL.md +7 -22
  51. package/gsp/skills/gsp-project-build/SKILL.md +108 -26
  52. package/gsp/skills/gsp-project-critique/SKILL.md +5 -33
  53. package/gsp/skills/gsp-project-design/SKILL.md +25 -26
  54. package/gsp/skills/gsp-project-research/SKILL.md +8 -17
  55. package/gsp/skills/gsp-project-review/SKILL.md +6 -37
  56. package/gsp/skills/gsp-start/SKILL.md +29 -12
  57. package/gsp/skills/gsp-style/SKILL.md +20 -223
  58. package/gsp/skills/gsp-typescale/SKILL.md +23 -319
  59. package/gsp/skills/gsp-update/SKILL.md +18 -10
  60. package/gsp/templates/branding/brief.md +13 -1
  61. package/gsp/templates/branding/roadmap.md +2 -2
  62. package/gsp/templates/branding/state.md +1 -1
  63. package/gsp/templates/phases/brief.md +1 -1
  64. package/gsp/templates/phases/{system.md → patterns.md} +3 -3
  65. package/gsp/templates/phases/review.md +1 -1
  66. package/package.json +1 -1
  67. package/scripts/gsp-context-recovery.sh +71 -0
  68. package/scripts/gsp-statusline.js +5 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brand-patterns
3
- description: Build your design system — tokens, components, preview
3
+ description: Build your design system — tokens, components, brand guidelines
4
4
  user-invocable: true
5
5
  allowed-tools:
6
6
  - Read
@@ -11,22 +11,22 @@ allowed-tools:
11
11
  - Glob
12
12
  ---
13
13
  <context>
14
- Phase 4 of the GSP branding diamond. Builds the design system (foundations, components, tokens), generates a self-contained brand preview HTML, and transitions the user from the branding diamond to the project diamond.
14
+ Phase 4 of the GSP branding diamond. Builds the design system (foundations, components, tokens), generates a self-contained brand guidelines HTML, and transitions the user from the branding diamond to the project diamond.
15
15
 
16
16
  Adapts strategy based on codebase context — generates from scratch, extends an existing system, or redesigns with migration mapping.
17
17
  </context>
18
18
 
19
19
  <objective>
20
- Build the design system, generate brand preview, and complete the branding diamond.
20
+ Build the design system, generate brand guidelines, and complete the branding diamond.
21
21
 
22
22
  **Input:** Brand identity + strategy + BRIEF.md
23
- **Output:** `{brand}/system/` (foundations/, components/, principles.md, tokens.json, {brand-name}.yml, {brand-name}.md, INDEX.md) + `{brand}/preview.html`
24
- **Agent:** `gsp-system-architect`
23
+ **Output:** `{brand}/patterns/` (foundations/, components/, principles.md, tokens.json, {brand-name}.yml, {brand-name}.md, INDEX.md) + `{brand}/guidelines.html`
24
+ **Agent:** `gsp-pattern-architect`
25
25
  </objective>
26
26
 
27
27
  <execution_context>
28
28
  @${CLAUDE_SKILL_DIR}/../../prompts/01-design-system-architect.md
29
- @${CLAUDE_SKILL_DIR}/../../templates/phases/system.md
29
+ @${CLAUDE_SKILL_DIR}/../../templates/phases/patterns.md
30
30
  @${CLAUDE_SKILL_DIR}/../../references/design-tokens.md
31
31
  </execution_context>
32
32
 
@@ -106,24 +106,24 @@ Redesign the system from the ground up, informed by what exists.
106
106
  4. Preserve conventions unless the brand requires changes
107
107
  5. Flag breaking changes explicitly
108
108
 
109
- ## Step 3: Spawn system architect — Pass 1: Foundations
109
+ ## Step 3: Spawn pattern architect — Pass 1: Foundations
110
110
 
111
- Spawn the `gsp-system-architect` agent with:
111
+ Spawn the `gsp-pattern-architect` agent with:
112
112
  - All identity chunks (or IDENTITY.md fallback) + palettes.json
113
113
  - The BRIEF.md content
114
114
  - The Design System Architect prompt (01)
115
- - The system output template
115
+ - The patterns output template
116
116
  - The design tokens reference
117
117
  - The `system_strategy` and `tech_stack` values
118
118
  - The `style_base` value + preset `.yml`/`.md` files (if loaded)
119
119
  - The `.design/system/STACK.md`, `COMPONENTS.md`, `TOKENS.md` content (when exist)
120
120
  - **Execution mode:** `"foundations"`
121
- - **Output path:** `{BRAND_PATH}/system/`
121
+ - **Output path:** `{BRAND_PATH}/patterns/`
122
122
 
123
123
  The agent writes foundations only:
124
- - `system/foundations/` (6 foundation chunks)
125
- - `system/principles.md`
126
- - `system/tokens.json` (foundations-only)
124
+ - `patterns/foundations/` (6 foundation chunks)
125
+ - `patterns/principles.md`
126
+ - `patterns/tokens.json` (foundations-only)
127
127
 
128
128
  ## Step 3.5: Foundation review (interactive)
129
129
 
@@ -159,9 +159,9 @@ Before building components, load persona profiles from `{BRAND_PATH}/BRIEF.md` a
159
159
  If user wants changes → update foundations.
160
160
  If confirmed → proceed to components pass.
161
161
 
162
- ## Step 4: Spawn system architect — Pass 2: Components
162
+ ## Step 4: Spawn pattern architect — Pass 2: Components
163
163
 
164
- Spawn the `gsp-system-architect` agent with:
164
+ Spawn the `gsp-pattern-architect` agent with:
165
165
  - The existing foundations from Pass 1
166
166
  - All identity chunks + palettes.json
167
167
  - Strategy chunks: voice-and-tone.md, archetype.md, positioning.md (needed for custom style output)
@@ -169,25 +169,25 @@ Spawn the `gsp-system-architect` agent with:
169
169
  - The `style_base` value + preset `.yml`/`.md` files (if loaded)
170
170
  - **Execution mode:** `"components"`
171
171
  - Confirmed component scope from Step 1.5
172
- - **Output path:** `{BRAND_PATH}/system/`
172
+ - **Output path:** `{BRAND_PATH}/patterns/`
173
173
 
174
174
  The agent writes components + custom style:
175
- - `system/components/` (one per component)
176
- - Updates `system/tokens.json` (adds component tokens)
177
- - `system/{brand-name}.yml` (custom style preset — portable, reusable)
178
- - `system/{brand-name}.md` (custom style prompt — AI-ready)
179
- - `system/INDEX.md`
175
+ - `patterns/components/` (one per component)
176
+ - Updates `patterns/tokens.json` (adds component tokens)
177
+ - `patterns/{brand-name}.yml` (custom style preset — portable, reusable)
178
+ - `patterns/{brand-name}.md` (custom style prompt — AI-ready)
179
+ - `patterns/INDEX.md`
180
180
 
181
181
  ## Step 4.5: Update state
182
182
 
183
183
  Update `{BRAND_PATH}/STATE.md`:
184
- - Set Phase 4 (System) status to `complete`
184
+ - Set Phase 4 (Patterns) status to `complete`
185
185
  - Record completion date
186
186
  - Set Prettiness Level to 100%
187
187
 
188
- ## Step 4.75: Generate brand preview
188
+ ## Step 4.75: Generate brand guidelines
189
189
 
190
- Create a self-contained HTML file at `{BRAND_PATH}/preview.html`.
190
+ Create a self-contained HTML file at `{BRAND_PATH}/guidelines.html`.
191
191
 
192
192
  Read all available brand outputs:
193
193
  - `{BRAND_PATH}/identity/palettes.json` — color palette data
@@ -208,30 +208,15 @@ Generate a single self-contained HTML file with:
208
208
  - **Logo direction descriptions** — each direction with rationale
209
209
  - **Archetype summary** — the selected archetype and its expression
210
210
 
211
- Tell the user: "Brand preview saved — open it in your browser to see the full brand at a glance."
211
+ Tell the user: "Brand kit saved to `guidelines.html` — open it in your browser to see your colors, typography, voice, and messaging in one page. You can also print or export to PDF as a shareable brand guide."
212
212
 
213
213
  ## Step 5: Phase transition output
214
214
 
215
- Render the phase transition screen (see `references/phase-transitions.md` for styling):
215
+ Render phase transition (see `references/phase-transitions.md`).
216
216
 
217
- ```
218
- ◆ system complete — design system built
219
-
220
- system/
221
- ├── foundations/
222
- │ ├── {foundation files}
223
- ├── components/
224
- │ ├── {component files}
225
- ├── principles.md
226
- ├── tokens.json
227
- ├── {brand-name}.yml
228
- ├── {brand-name}.md
229
- └── INDEX.md
230
-
231
- ──────────────────────────────
232
- ```
217
+ **Critical:** When the user chooses "Start a project", invoke `/gsp:start` via the Skill tool. Do NOT attempt to handle project setup inline — `/gsp:start` has the codebase scanning, questioning rounds, and brief-writing logic needed for a proper project setup. The branding agent's context is spent on brand work and lacks the project setup methodology.
233
218
 
234
- Then display the brand summary:
219
+ Also display a brand summary after the standard transition — this is the final branding phase:
235
220
 
236
221
  ```
237
222
  brand complete — {brand-name}
@@ -239,13 +224,8 @@ Then display the brand summary:
239
224
  discover {key finding}
240
225
  strategy {archetype}, {positioning}, {top voice attributes}
241
226
  identity {colors}, {typefaces}
242
- system {N} foundations, {N} components
227
+ patterns {N} foundations, {N} components
243
228
 
244
- preview: {BRAND_PATH}/preview.html
229
+ guidelines: {BRAND_PATH}/guidelines.html
245
230
  ```
246
-
247
- Then use `AskUserQuestion` with 3 options:
248
- - **Start a project** — "scope what you're building with this brand"
249
- - **View progress** — "see the full dashboard"
250
- - **Done for now** — "pick up later with /gsp:start"
251
231
  </process>
@@ -53,8 +53,14 @@ Present a compact research plan, then use `AskUserQuestion`:
53
53
  - **Looks good** — "Start research with this scope"
54
54
  - **Adjust** — "I want to add competitors or shift emphasis"
55
55
 
56
+ ## Step 2.5: Pre-fetch competitor sites (background)
57
+
58
+ While preparing the agent context, use `WebFetch` with `run_in_background: true` for each competitor URL or website found in BRIEF.md's competitive landscape. This warms the cache so the researcher agent has content ready instead of fetching sequentially during research.
59
+
56
60
  ## Step 3: Spawn researcher
57
61
 
62
+ Include any pre-fetched competitor content in the agent context.
63
+
58
64
  Spawn the `gsp-researcher` agent with:
59
65
  - BRIEF.md content
60
66
  - Discover output template
@@ -78,8 +84,5 @@ Update `{BRAND_PATH}/STATE.md`: set Phase 1 (Discover) to `complete`.
78
84
 
79
85
  ## Step 5: Phase transition
80
86
 
81
- Render phase transition screen, then use `AskUserQuestion`:
82
- - **Continue to strategy** — "define positioning, voice, and messaging"
83
- - **View progress** — "see the full dashboard"
84
- - **Done for now** — "pick up later with /gsp:start"
87
+ Render phase transition (see `references/phase-transitions.md`).
85
88
  </process>
@@ -142,8 +142,5 @@ If adjust → loop back. If confirmed → proceed.
142
142
 
143
143
  Update `{BRAND_PATH}/STATE.md`: set Phase 2 (Strategy) to `complete`.
144
144
 
145
- Render phase transition, then use `AskUserQuestion`:
146
- - **Continue to identity** — "create visual identity"
147
- - **View progress** — "see the full dashboard"
148
- - **Done for now** — "pick up later with /gsp:start"
145
+ Render phase transition (see `references/phase-transitions.md`).
149
146
  </process>
@@ -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>
@@ -99,7 +99,7 @@ mkdir -p .design/system
99
99
  2. **CSS custom properties** in `globals.css` / `global.css`
100
100
  3. **Theme files** — `theme.ts`, `tokens.json`, `tokens.ts`
101
101
  4. **Dark mode setup** — next-themes, class strategy, media query
102
- 5. **Prior GSP tokens** — scan `.design/branding/*/system/` for existing brand tokens
102
+ 5. **Prior GSP tokens** — scan `.design/branding/*/patterns/` for existing brand tokens
103
103
 
104
104
  6. **Write `.design/system/TOKENS.md`** from the TOKENS template
105
105
 
@@ -55,23 +55,23 @@ For each instance, read:
55
55
 
56
56
  **Check B1: Brand Structure**
57
57
  Required: config.json, STATE.md, BRIEF.md
58
- Required dirs: discover/, strategy/, identity/, system/
58
+ Required dirs: discover/, strategy/, identity/, patterns/
59
59
  Missing → FAIL
60
60
 
61
61
  **Check B2: Brand Phase Ordering**
62
- No phase complete if earlier phase is pending (discover < strategy < identity < system).
62
+ No phase complete if earlier phase is pending (discover < strategy < identity < patterns).
63
63
  Exception: strategy can proceed without discover.
64
64
 
65
65
  **Check B3: Brand Completeness**
66
66
  If all 4 phases complete, check:
67
67
  - `identity/INDEX.md` exists (chunk format)
68
68
  - `identity/palettes.json` exists (WARN if missing)
69
- - `system/INDEX.md` exists (chunk format)
70
- - `system/tokens.json` exists (WARN if missing)
69
+ - `patterns/INDEX.md` exists (chunk format)
70
+ - `patterns/tokens.json` exists (WARN if missing)
71
71
  - If monolith exists without INDEX.md → WARN: "Legacy monolith format"
72
72
 
73
73
  **Check B4: Legacy Monolith Detection**
74
- For each brand phase directory (discover, strategy, identity, system):
74
+ For each brand phase directory (discover, strategy, identity, patterns):
75
75
  - If monolith exists but no INDEX.md → WARN: "Legacy format in {phase}/ — re-run /gsp:brand-{phase} for chunk output"
76
76
 
77
77
  ### Per-Project Checks (6-phase)
@@ -128,7 +128,7 @@ All phases in order (or validly skipped) → PASS
128
128
  Only check phases that are `complete`. All paths relative to the project instance directory.
129
129
 
130
130
  **When `system_strategy` is `extend`:**
131
- - Check if brand's `system/` output contains "Component Audit" or "KEEP" or "RESTYLE" or "REFACTOR" or "REPLACE"
131
+ - Check if brand's `patterns/` output contains "Component Audit" or "KEEP" or "RESTYLE" or "REFACTOR" or "REPLACE"
132
132
  - If none found → WARN: "Strategy is `extend` but system output lacks component audit table. Re-run `/gsp:brand-patterns`."
133
133
 
134
134
  **When `implementation_target` is `shadcn`:**
@@ -235,7 +235,7 @@ No upgrade concerns → PASS
235
235
  ### Installation Health Checks
236
236
 
237
237
  **Check I1: Skills have `user-invocable: true`**
238
- Glob for all SKILL.md files in the skills directory (`.claude/skills/*/SKILL.md` or equivalent runtime path). For each skill (except the plugin entry point `get-shit-pretty`), check frontmatter for `user-invocable: true`.
238
+ Glob for all SKILL.md files in the skills directory (`{runtime-dir}/skills/*/SKILL.md` e.g. `.claude/skills/` for Claude Code, `.opencode/skills/` for OpenCode, `.gemini/skills/` for Gemini). For each skill (except the plugin entry point `get-shit-pretty`), check frontmatter for `user-invocable: true`.
239
239
  - All present → PASS
240
240
  - Missing → WARN: "Skills missing `user-invocable: true`: {list}. They won't appear in the slash-command menu. Re-run the installer or add the field manually."
241
241
 
@@ -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 ──────────────────────────
@@ -96,7 +97,7 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
96
97
  │ ├── discover/ research chunks
97
98
  │ ├── strategy/ strategy + voice and messaging
98
99
  │ ├── identity/ visual identity
99
- │ └── system/ tokens + components
100
+ │ └── patterns/ tokens + components
100
101
  └── projects/
101
102
  └── {project}/
102
103
  ├── config.json project config
@@ -88,8 +88,7 @@ Update `{PROJECT_PATH}/STATE.md`:
88
88
  - Add Launch status to `complete` under the Launch section
89
89
  - Record completion date
90
90
 
91
- ## Step 4: Done
91
+ ## Step 4: Phase transition output
92
92
 
93
- Display campaign summary and:
94
- "Launch assets complete! Run `/gsp:progress` to see the full journey."
93
+ Render phase transition (see `references/phase-transitions.md`). This is the final phase.
95
94
  </process>
@@ -15,7 +15,7 @@ Phase 1 of the GSP project diamond. Scopes the project by determining what scree
15
15
 
16
16
  Encourages treating the project as a bounded issue (or set of issues) and a PR — ship small, ship complete.
17
17
 
18
- Works with the dual-diamond architecture: reads brand system from `.design/branding/{brand}/system/` via `brand.ref`, reads/writes project assets in `.design/projects/{project}/`.
18
+ Works with the dual-diamond architecture: reads brand system from `.design/branding/{brand}/patterns/` via `brand.ref`, reads/writes project assets in `.design/projects/{project}/`.
19
19
  </context>
20
20
 
21
21
  <objective>
@@ -46,15 +46,15 @@ If brand.ref doesn't exist, tell the user to run `/gsp:start` to set up the proj
46
46
 
47
47
  ## Step 1: Load context
48
48
 
49
- ### Brand system (chunk-first)
49
+ ### Brand patterns (chunk-first)
50
50
 
51
- Read `{BRAND_PATH}/system/INDEX.md`. If it exists, load all foundation chunks + selective component chunks.
51
+ Read `{BRAND_PATH}/patterns/INDEX.md`. If it exists, load all foundation chunks + selective component chunks.
52
52
 
53
- Fallback: read `{BRAND_PATH}/system/SYSTEM.md` (legacy monolith). Log: "⚠️ Legacy system format detected."
53
+ Fallback: read `{BRAND_PATH}/patterns/SYSTEM.md` (legacy monolith). Log: "⚠️ Legacy format detected."
54
54
 
55
- If neither exists, tell the user to run `/gsp:brand-patterns` first to create the brand's design system.
55
+ If neither exists, tell the user to run `/gsp:brand-patterns` first to create the brand's design patterns.
56
56
 
57
- Also read `{BRAND_PATH}/system/tokens.json`.
57
+ Also read `{BRAND_PATH}/patterns/tokens.json`.
58
58
 
59
59
  ### Project context
60
60
 
@@ -138,21 +138,6 @@ Update `{PROJECT_PATH}/STATE.md`:
138
138
 
139
139
  ## Step 5: Phase transition output
140
140
 
141
- Render the phase transition screen (see `references/phase-transitions.md` for styling):
142
-
143
- ```
144
- ◆ brief complete — project scoped
145
-
146
- brief/
147
- ├── {actual files written}
148
- └── INDEX.md
149
-
150
- ──────────────────────────────
151
- ```
152
-
153
- Then use `AskUserQuestion` with 3 options:
154
- - **Continue to research** — "research UX patterns and approaches"
155
- - **View progress** — "see the full dashboard"
156
- - **Done for now** — "pick up later with /gsp:start"
141
+ Render phase transition (see `references/phase-transitions.md`).
157
142
  </process>
158
143
  </output>
@@ -15,7 +15,7 @@ allowed-tools:
15
15
  <context>
16
16
  Phase 5 of the GSP project diamond. Uses a 4-phase pipeline with verification checkpoints to implement designs directly in the codebase as production-ready frontend components.
17
17
 
18
- Works with the dual-diamond architecture: reads brand system from `.design/branding/{brand}/system/` via `brand.ref`, reads/writes project assets in `.design/projects/{project}/`.
18
+ Works with the dual-diamond architecture: reads brand system from `.design/branding/{brand}/patterns/` via `brand.ref`, reads/writes project assets in `.design/projects/{project}/`.
19
19
 
20
20
  **Pipeline architecture:**
21
21
  ```
@@ -49,6 +49,9 @@ Implement designs as production-ready code in the codebase via phased pipeline w
49
49
  <execution_context>
50
50
  @${CLAUDE_SKILL_DIR}/../../prompts/09-design-to-code-translator.md
51
51
  @${CLAUDE_SKILL_DIR}/../../templates/phases/build.md
52
+ @${CLAUDE_SKILL_DIR}/../../references/visual-effects.md
53
+ @${CLAUDE_SKILL_DIR}/../../references/block-patterns.md
54
+ @${CLAUDE_SKILL_DIR}/../../references/anti-patterns.md
52
55
  </execution_context>
53
56
 
54
57
  <process>
@@ -61,6 +64,13 @@ Set `PROJECT_PATH` = `.design/projects/{project}`
61
64
  Read `{PROJECT_PATH}/brand.ref` to resolve brand path:
62
65
  - Set `BRAND_PATH` = `.design/branding/{brand}`
63
66
 
67
+ ## Step 0.5: Validate prerequisites
68
+
69
+ Read `{PROJECT_PATH}/STATE.md`. Check that Design (Phase 3) is `complete` or `needs-revision` (revision means critique ran and is feeding back).
70
+ If design is `pending` or missing: "No designs found. Run `/gsp:project-design` first — building without designs leads to poor results." Then stop.
71
+
72
+ Exception: if `design_scope` is `tokens` in config.json, skip this check (tokens-only projects don't need design).
73
+
64
74
  ## Step 1: Load config and check state
65
75
 
66
76
  Read `{PROJECT_PATH}/config.json` to get `implementation_target`, `design_scope`, `codebase_type`.
@@ -111,7 +121,8 @@ Spawn `gsp-builder` agent with **execution_mode: foundations**.
111
121
 
112
122
  | File | Purpose |
113
123
  |------|---------|
114
- | `{BRAND_PATH}/system/tokens.json` | Design tokens |
124
+ | `{BRAND_PATH}/patterns/tokens.json` | Design tokens |
125
+ | `{BRAND_PATH}/patterns/{brand-name}.md` | Brand visual DNA — effects, component stylings, bold bets (if exists) |
115
126
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations for target |
116
127
  | `.design/system/STACK.md` | Stack state |
117
128
  | `.design/system/CONVENTIONS.md` | Codebase conventions (if exists) |
@@ -129,9 +140,10 @@ Spawn `gsp-builder` agent with **execution_mode: foundations**.
129
140
  > 2. Create global CSS (resets, base styles, font imports, dark mode setup)
130
141
  > 3. Create root layout with nav shell and footer shell (structure only — no page content)
131
142
  > 4. Create shared utilities (cn helper, theme provider if needed)
132
- > 5. Do NOT build individual screens or page content
133
- > 6. Write code directly to the codebase, not to `.design/`
134
- > 7. Leave changes unstaged
143
+ > 5. Apply the brand style prompt's visual effects and signature patterns — create CSS utilities or Tailwind extensions for the brand's signature effects (glass, glow, gradients, shadows, motion patterns)
144
+ > 6. Do NOT build individual screens or page content
145
+ > 7. Write code directly to the codebase, not to `.design/`
146
+ > 8. Leave changes unstaged
135
147
  >
136
148
  > After completing foundations, write `{PROJECT_PATH}/build/BUILD-LOG.md` with what was done (foundations section only).
137
149
 
@@ -146,9 +158,24 @@ After the foundations agent completes, run the build command:
146
158
  | TypeScript only | `npx tsc --noEmit` |
147
159
  | Generic | `npm run build` |
148
160
 
149
- **Pass:** Continue to Step 4.
161
+ **Pass:** Continue to preview verification, then Step 4.
150
162
  **Fail:** Log the error. Do NOT re-spawn the agent. Surface the error to the user and ask how to proceed.
151
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
+
152
179
  ## Step 4: Phase 3 — FOUNDATION REVIEW
153
180
 
154
181
  Present a summary of what the foundations phase produced:
@@ -169,6 +196,21 @@ Present a summary of what the foundations phase produced:
169
196
  Use `AskUserQuestion`: "Foundations look good? Continue building screens, or review first?"
170
197
  - **Continue** → proceed to Step 5
171
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
172
214
 
173
215
  ## Step 5: Phase 4 — SCREENS
174
216
 
@@ -179,7 +221,7 @@ Build screens sequentially. For each screen in `SCREENS`:
179
221
  | File | Purpose |
180
222
  |------|---------|
181
223
  | `{PROJECT_PATH}/design/screen-{NN}-{name}.md` | This screen's design chunk |
182
- | Referenced component chunks from `{BRAND_PATH}/system/components/` | Only components referenced in this screen's chunk |
224
+ | Referenced component chunks from `{BRAND_PATH}/patterns/components/` | Only components referenced in this screen's chunk |
183
225
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations |
184
226
  | `{PROJECT_PATH}/research/reference-specs.md` (if exists) | Technical specs |
185
227
  | `{PROJECT_PATH}/critique/prioritized-fixes.md` (if exists) | Critique fixes relevant to this screen |
@@ -200,6 +242,7 @@ Build screens sequentially. For each screen in `SCREENS`:
200
242
  > 4. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
201
243
  > 5. Write code directly to the codebase, not to `.design/`
202
244
  > 6. Leave changes unstaged
245
+ > 7. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes rather than re-reading the brand style document
203
246
  >
204
247
  > After completing this screen, append to `{PROJECT_PATH}/build/BUILD-LOG.md` — add this screen's files and status to the existing log.
205
248
 
@@ -213,6 +256,53 @@ After each screen agent completes, run the build command.
213
256
  - **Skip** → mark screen as `partial` in BUILD-LOG, continue
214
257
  - **Stop** → halt pipeline, save progress
215
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
+
216
306
  ## Step 6: Finalize
217
307
 
218
308
  After all screens complete (or pipeline stops):
@@ -251,24 +341,7 @@ Update `{PROJECT_PATH}/STATE.md`:
251
341
 
252
342
  ### Phase transition output
253
343
 
254
- ```
255
- ◆ build complete — code implemented
256
-
257
- build/
258
- ├── SCAFFOLD-LOG.md
259
- ├── BUILD-LOG.md
260
- └── INDEX.md
261
-
262
- Screens: {done}/{total}
263
- Build: compiles ✓
264
-
265
- ──────────────────────────────
266
- ```
267
-
268
- Then use `AskUserQuestion` with 3 options:
269
- - **Continue to review** — "QA validate implementation against designs"
270
- - **View progress** — "see the full dashboard"
271
- - **Done for now** — "pick up later with /gsp:start"
344
+ Render phase transition (see `references/phase-transitions.md`). Include screen count and build status in the output.
272
345
 
273
346
  ---
274
347
 
@@ -278,5 +351,14 @@ For `implementation_target: figma`, skip the phased pipeline. Spawn a single `gs
278
351
 
279
352
  ## Step 8: Revision mode
280
353
 
281
- 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. Then continue from Step 6 (finalize).
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).
282
364
  </process>