get-shit-pretty 0.9.1 → 0.10.0
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/gsp/skills/gsp-accessibility/SKILL.md +50 -0
- package/gsp/skills/gsp-accessibility/motion-effects.md +43 -0
- package/gsp/skills/gsp-brand-guidelines/SKILL.md +11 -2
- package/gsp/skills/gsp-brand-identity/SKILL.md +5 -4
- package/gsp/skills/gsp-brand-refine/SKILL.md +0 -1
- package/gsp/skills/gsp-brand-research/SKILL.md +1 -1
- package/gsp/skills/gsp-brand-research/methodology/gsp-brand-researcher.md +9 -0
- package/gsp/skills/gsp-brand-strategy/methodology/gsp-brand-strategist.md +3 -3
- package/gsp/skills/gsp-brand-sync/SKILL.md +0 -1
- package/gsp/skills/gsp-project-brief/SKILL.md +6 -1
- package/gsp/skills/gsp-project-build/SKILL.md +21 -109
- package/gsp/skills/gsp-project-build/agent-rules.md +36 -0
- package/gsp/skills/gsp-project-build/brand-feedback.md +12 -0
- package/gsp/skills/gsp-project-build/component-classification.md +36 -0
- package/gsp/skills/gsp-project-build/extraction-review.md +31 -0
- package/gsp/skills/gsp-project-build/methodology/gsp-project-builder.md +15 -8
- package/gsp/skills/gsp-project-build/visual-effects.md +1 -16
- package/gsp/skills/gsp-project-critique/SKILL.md +5 -1
- package/gsp/skills/gsp-project-critique/methodology/gsp-project-critic.md +46 -89
- package/gsp/skills/gsp-project-design/SKILL.md +1 -1
- package/gsp/skills/gsp-project-design/methodology/gsp-project-designer.md +56 -118
- package/gsp/skills/gsp-project-research/SKILL.md +13 -0
- package/gsp/skills/gsp-project-review/SKILL.md +1 -1
- package/gsp/skills/gsp-project-review/methodology/gsp-project-reviewer.md +5 -4
- package/gsp/skills/gsp-scaffold/SKILL.md +13 -0
- package/gsp/skills/gsp-style/SKILL.md +2 -2
- package/gsp/skills/gsp-visuals/domains/imagery.md +10 -16
- package/gsp/templates/branding/config.json +2 -2
- package/gsp/templates/projects/config.json +4 -3
- package/package.json +1 -1
- package/gsp/skills/gsp-brand-guidelines/design-tokens.md +0 -184
|
@@ -46,6 +46,7 @@ Read `$ARGUMENTS` to determine the mode:
|
|
|
46
46
|
|-------|------|--------|
|
|
47
47
|
| `--check #FG #BG` | Quick contrast check | Display only |
|
|
48
48
|
| `--tokens` | Token-only: contrast pairs, sizing, spacing | `critique/accessibility-token-audit.md` |
|
|
49
|
+
| `--validate <yml-path>` | Pre-emit gate: validate a brand `.yml` for WCAG compliance | Exit 0 (pass) / exit 1 (fail) — failures to stdout, no file writes |
|
|
49
50
|
| (no args) | Mode picker | Prompt user |
|
|
50
51
|
|
|
51
52
|
Additional flag: `--level AAA` overrides conformance level (default: AA).
|
|
@@ -71,6 +72,10 @@ If args contain `--check`, extract the two hex color values and skip to Step 3.
|
|
|
71
72
|
|
|
72
73
|
Skip to Step 4.
|
|
73
74
|
|
|
75
|
+
### Validate mode (`--validate <yml-path>`)
|
|
76
|
+
|
|
77
|
+
Skip to Step 4.5.
|
|
78
|
+
|
|
74
79
|
## Step 3: Quick check mode (`--check #FG #BG`)
|
|
75
80
|
|
|
76
81
|
Calculate WCAG 2.x contrast ratio between the two hex colors.
|
|
@@ -205,6 +210,51 @@ Display result and use `AskUserQuestion`:
|
|
|
205
210
|
- **Run code audit** — "run `/gsp-accessibility-audit --code` to check the codebase"
|
|
206
211
|
- **Done** — "that's all for now"
|
|
207
212
|
|
|
213
|
+
## Step 4.5: Validate mode (`--validate <yml-path>`)
|
|
214
|
+
|
|
215
|
+
Pre-emit gate for `gsp-brand-guidelines` (and any caller that needs a yes/no contrast verdict on a brand `.yml` without project context).
|
|
216
|
+
|
|
217
|
+
**Differs from `--tokens`:** no project resolution, no file writes, returns exit code instead of writing a chunk. Use when you need a hard PASS/FAIL gate before downstream emission.
|
|
218
|
+
|
|
219
|
+
### Inputs
|
|
220
|
+
|
|
221
|
+
- `<yml-path>` — absolute or relative path to a brand `.yml` preset (e.g. `.design/branding/{brand}/patterns/{brand-name}.yml`)
|
|
222
|
+
- `--level AA|AAA` — optional conformance override (default: AA)
|
|
223
|
+
|
|
224
|
+
### Checks (subset of `--tokens`, contrast-only)
|
|
225
|
+
|
|
226
|
+
Reuse the contrast logic from Step 4 (sections 4.1, 4.2, 4.3):
|
|
227
|
+
|
|
228
|
+
1. **Contrast pairs** — every semantic foreground/background pair from the `.yml`. Flag failures: normal text < 4.5:1 (AA) or < 7:1 (AAA), large text < 3:1 (AA) or < 4.5:1 (AAA), non-text < 3:1
|
|
229
|
+
2. **Interactive states** — hover/active/focus/disabled pairs. Disabled states still need 3:1 non-text contrast
|
|
230
|
+
3. **Focus ring** — `--ring` token vs adjacent backgrounds, ≥ 3:1
|
|
231
|
+
4. **Dark mode** — if `dark_mode.color` exists, re-verify all pairs
|
|
232
|
+
|
|
233
|
+
Skip the `--tokens` extras (touch targets, typography minimums) — those are not contrast gates.
|
|
234
|
+
|
|
235
|
+
### Output
|
|
236
|
+
|
|
237
|
+
**On pass** — print one line to stdout, exit 0:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
✓ /gsp-accessibility --validate {yml-name} — N pairs checked, all WCAG 2.2 {level} compliant
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**On fail** — print failing pairs + exit 1:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
✗ /gsp-accessibility --validate {yml-name} — {M} contrast failure(s) (WCAG 2.2 {level})
|
|
247
|
+
|
|
248
|
+
Failures:
|
|
249
|
+
{token-pair} ratio {N.N}:1 required {required}:1 ({use-case})
|
|
250
|
+
{token-pair} ratio {N.N}:1 required {required}:1 ({use-case})
|
|
251
|
+
...
|
|
252
|
+
|
|
253
|
+
Fix via: /gsp-brand-refine "{token-name} contrast"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**No file writes.** This mode is a callable gate — output goes to stdout, exit code carries the verdict. Stop here; no AskUserQuestion routing.
|
|
257
|
+
|
|
208
258
|
## Step 5: Update STATE.md
|
|
209
259
|
|
|
210
260
|
If within a project and files were written:
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Motion + Effects Accessibility
|
|
2
|
+
|
|
3
|
+
Canonical accessibility guidance for visual effects. Read by `gsp-project-build`'s builder methodology and `gsp-project-build/visual-effects.md`. Owned by `gsp-accessibility` per the two-layer architecture (CLAUDE.md): expertise skills own domain knowledge.
|
|
4
|
+
|
|
5
|
+
## prefers-reduced-motion
|
|
6
|
+
|
|
7
|
+
All visual effects must degrade gracefully:
|
|
8
|
+
|
|
9
|
+
```css
|
|
10
|
+
@media (prefers-reduced-motion: reduce) {
|
|
11
|
+
*, *::before, *::after {
|
|
12
|
+
animation-duration: 0.01ms !important;
|
|
13
|
+
animation-iteration-count: 1 !important;
|
|
14
|
+
transition-duration: 0.01ms !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This rule applies everywhere — entrance animations, hover transforms, scroll-driven reveals, parallax. No effect should fight the user's stated preference.
|
|
20
|
+
|
|
21
|
+
## Contrast on effects
|
|
22
|
+
|
|
23
|
+
Effects must not compromise text/UI contrast:
|
|
24
|
+
|
|
25
|
+
- **Glow / shadow on text** — ensure text contrast meets WCAG AA *without* the effect (effects can fail in high-contrast mode or for users with backdrop-filter disabled)
|
|
26
|
+
- **Backdrop-blur** — pair with `@supports not (backdrop-filter: blur(1px))` solid-background fallback. The fallback must independently meet AA contrast against the foreground content
|
|
27
|
+
- **Gradient text** — test contrast ratio of *both endpoints*, not just the midpoint. A gradient from light-blue to dark-blue passes at one end and fails at the other
|
|
28
|
+
- **Translucent surfaces** — verify the layer behind (worst case: pure white or pure black if backdrop-filter is dropped) meets AA against the foreground
|
|
29
|
+
|
|
30
|
+
## Hover / interaction magnitudes
|
|
31
|
+
|
|
32
|
+
Keep transforms small to avoid disorientation:
|
|
33
|
+
|
|
34
|
+
- Translate: 2-4px maximum
|
|
35
|
+
- Scale: 1.02-1.05 maximum (5% growth ceiling)
|
|
36
|
+
- Rotation: avoid except for explicit affordances (loading spinners, expand chevrons)
|
|
37
|
+
- Layout-property animation (width/height/padding) — don't; use transform instead
|
|
38
|
+
|
|
39
|
+
## Cross-references
|
|
40
|
+
|
|
41
|
+
- `gsp-project-build/visual-effects.md` — CSS recipes for the effects this guidance constrains
|
|
42
|
+
- `gsp-accessibility-audit/wcag-checklist.md` — broader WCAG 2.2 AA criteria
|
|
43
|
+
- `gsp-accessibility/SKILL.md` — `--check`, `--tokens` modes for contrast validation
|
|
@@ -112,7 +112,7 @@ Redesign the system from the ground up, informed by what exists.
|
|
|
112
112
|
### Load references and agent methodology
|
|
113
113
|
Read these files and hold their content for inlining into the agent prompt:
|
|
114
114
|
- `${CLAUDE_SKILL_DIR}/../../templates/phases/patterns.md` — patterns output template
|
|
115
|
-
- `${CLAUDE_SKILL_DIR}/
|
|
115
|
+
- `${CLAUDE_SKILL_DIR}/../gsp-style/style-preset-schema.md` — canonical `.yml` schema (shadcn-flat, 1:1 CSS var mapping)
|
|
116
116
|
- `${CLAUDE_SKILL_DIR}/guidelines-structure.md` — guidelines.html structure spec (shadcn tokens, sections, primitive classes)
|
|
117
117
|
- `${CLAUDE_SKILL_DIR}/methodology/gsp-brand-engineer.md` — agent methodology
|
|
118
118
|
|
|
@@ -125,7 +125,7 @@ Pass in the agent prompt:
|
|
|
125
125
|
- **Content of** style base preset `.yml` + `.md` (loaded in Step 1) — `.yml` as structural scaffold, `.md` as philosophy + implementation content for STYLE.md
|
|
126
126
|
- **Agent methodology** (loaded above)
|
|
127
127
|
- **Content of** patterns output template (loaded above)
|
|
128
|
-
- **Content of**
|
|
128
|
+
- **Content of** style preset schema (loaded above) — the engineer assembles `{brand-name}.yml` matching this exact shape
|
|
129
129
|
- **Content of** guidelines structure spec (loaded above) — follow this exactly for `guidelines.html`
|
|
130
130
|
- The `system_strategy` and `tech_stack` values
|
|
131
131
|
- **Output path:** `{BRAND_PATH}/patterns/`
|
|
@@ -216,6 +216,15 @@ Spawn the `gsp-brand-engineer` agent with (reuse **Agent methodology** loaded in
|
|
|
216
216
|
>
|
|
217
217
|
> The `.yml` and `STYLE.md` are confirmed — do not modify them. Focus on mapping tokens to the detected component library and specifying overrides.
|
|
218
218
|
|
|
219
|
+
## Step 4.7: WCAG validation gate
|
|
220
|
+
|
|
221
|
+
Before emitting `theme.json` (the artifact that installs into real codebases), validate the assembled `.yml` against WCAG 2.2 AA contrast requirements. Inaccessible token pairs must not ship to production.
|
|
222
|
+
|
|
223
|
+
Invoke `/gsp-accessibility --validate {BRAND_PATH}/patterns/{brand-name}.yml` (use `--level AAA` if `accessibility_level` in the project config is set to AAA).
|
|
224
|
+
|
|
225
|
+
- **Pass (exit 0):** continue to Step 4.75
|
|
226
|
+
- **Fail (exit 1):** STOP. The skill prints failing token pairs + the recommended fix path. Surface the failures to the user with: `Theme emission blocked — {N} contrast failure(s). Run /gsp-brand-refine to fix the failing pairs, then re-run /gsp-brand-guidelines.` Do NOT emit theme.json. The pipeline is incomplete until validation passes
|
|
227
|
+
|
|
219
228
|
## Step 4.75: Emit shadcn theme registry artifact
|
|
220
229
|
|
|
221
230
|
Generate `{brand-name}.theme.json` (registry:theme) alongside the existing patterns. This is the artifact `/gsp-brand-apply` installs into shadcn codebases.
|
|
@@ -89,7 +89,7 @@ Spawn the `gsp-brand-creative-director` agent. **Inline all content** — the ag
|
|
|
89
89
|
|
|
90
90
|
Pass in the agent prompt:
|
|
91
91
|
- **Content of** BRIEF.md (loaded in Step 1)
|
|
92
|
-
- **Content of** strategy chunks: archetype.md, positioning.md, brand-platform.md, voice-and-tone.md (loaded in Step 1)
|
|
92
|
+
- **Content of** strategy chunks: archetype.md, positioning.md, brand-platform.md, voice-and-tone.md, messaging.md (all 5 loaded in Step 1; older brands without messaging.md proceed without it). Tagline directions and core message in `messaging.md` materially shape logo concept rationale and typography voice — do not skip it.
|
|
93
93
|
- **Content of** discover/mood-board-direction.md (loaded in Step 1)
|
|
94
94
|
- **Content of** style base preset `.yml` + `.md` (when loaded in Step 1) — `.yml` as structural scaffold, `.md` as design philosophy and signature techniques
|
|
95
95
|
- **Content of** audit/brand-inventory.md (when loaded in Step 2)
|
|
@@ -109,14 +109,15 @@ The agent writes 5 chunks + INDEX.md (creative decisions only — no technical e
|
|
|
109
109
|
|
|
110
110
|
## Step 3.5: Enrich with domain skills (parallel)
|
|
111
111
|
|
|
112
|
-
After the creative-director finishes, invoke all
|
|
112
|
+
After the creative-director finishes, invoke all 5 domain skills in parallel — they operate on separate chunks with zero dependencies:
|
|
113
113
|
|
|
114
114
|
- **`/gsp-logo --enrich`** — reads `logo-directions.md`, enriches with construction geometry, variation specs, clear space rules, minimum size calculations.
|
|
115
115
|
- **`/gsp-color --enrich`** — reads `color-system.md`, generates OKLCH palettes via tints.dev, calculates WCAG contrast, writes `palettes.json`, enriches with contrast ratios and semantic mapping.
|
|
116
116
|
- **`/gsp-typography --enrich`** — reads `typography.md`, generates mathematical type scale, adds fluid type formulas, enriches with font loading instructions.
|
|
117
|
-
- **`/gsp-visuals --imagery --enrich`** — reads `imagery-style.md`,
|
|
117
|
+
- **`/gsp-visuals --imagery --enrich`** — reads `imagery-style.md`, enriches with photography/illustration direction, CSS texture/treatment recipes, image processing implementation. Icons are NOT covered here — `gsp-icons` owns them.
|
|
118
|
+
- **`/gsp-icons --enrich`** — defines the icon system: library selection, stroke standardization, size system, container treatments, custom SVG direction.
|
|
118
119
|
|
|
119
|
-
Invoke all
|
|
120
|
+
Invoke all 5 using the Skill tool simultaneously. Each skill loads its own domain references on-demand — no upfront context cost.
|
|
120
121
|
|
|
121
122
|
## Step 4: Perspective check
|
|
122
123
|
|
|
@@ -85,5 +85,5 @@ Update `{BRAND_PATH}/STATE.md`: set Phase 1 (Discover) to `complete`.
|
|
|
85
85
|
|
|
86
86
|
## Step 5: Phase transition
|
|
87
87
|
|
|
88
|
-
Invoke `/gsp-phase-transition` with phase `discover` and output directory `{BRAND_PATH}/
|
|
88
|
+
Invoke `/gsp-phase-transition` with phase `discover` and output directory `{BRAND_PATH}/discover/`.
|
|
89
89
|
</process>
|
|
@@ -31,6 +31,15 @@ Act as a senior design researcher. Analyze the market landscape and competitive
|
|
|
31
31
|
- Competitor map must use real competitors from BRIEF.md
|
|
32
32
|
- Mood board specs must be actionable (hex values, typeface names)
|
|
33
33
|
- Recommendations must be specific to this brand's personas, not generic
|
|
34
|
+
|
|
35
|
+
## Downstream expertise context (for mood-board direction)
|
|
36
|
+
|
|
37
|
+
Stay opinionated but don't over-commit on technical specifics — downstream phases will refine via expertise skills:
|
|
38
|
+
- Hex color picks → `gsp-color` will re-express as OKLCH and validate WCAG contrast in identity phase
|
|
39
|
+
- Typeface picks → `gsp-typography` will pair, scale, and verify rhythm
|
|
40
|
+
- Imagery style direction → `gsp-visuals/domains/imagery.md` owns the canonical imagery vocabulary; align mood-board language with it where possible
|
|
41
|
+
|
|
42
|
+
This is forward awareness only — research output stays in research's lane.
|
|
34
43
|
</methodology>
|
|
35
44
|
|
|
36
45
|
<output>
|
|
@@ -32,9 +32,9 @@ Act as Head of Strategy at a top branding agency. Define the strategic foundatio
|
|
|
32
32
|
</methodology>
|
|
33
33
|
|
|
34
34
|
<references>
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- `${CLAUDE_SKILL_DIR}/brand-archetypes.md` — 12 archetypes with traits, shadows, visual tendencies
|
|
36
|
+
- `${CLAUDE_SKILL_DIR}/positioning-frameworks.md` — positioning maps, brand pyramid
|
|
37
|
+
- `${CLAUDE_SKILL_DIR}/voice-tone.md` — voice attribute framework, tone spectrum, messaging matrix
|
|
38
38
|
</references>
|
|
39
39
|
|
|
40
40
|
<output>
|
|
@@ -51,10 +51,15 @@ Also read the brand `.yml` preset from `{BRAND_PATH}/patterns/`.
|
|
|
51
51
|
|
|
52
52
|
Read:
|
|
53
53
|
- `{PROJECT_PATH}/BRIEF.md` — what we're building, platforms, tech stack
|
|
54
|
-
- `{PROJECT_PATH}/config.json` — get `implementation_target`, `design_scope`, `codebase_type`, `app_path`, `repo_type`
|
|
54
|
+
- `{PROJECT_PATH}/config.json` — get `implementation_target`, `design_scope`, `codebase_type`, `app_path`, `repo_type`, `accessibility_level`, `style_preset`
|
|
55
55
|
|
|
56
56
|
After reading config, check if `app_path` is empty. If empty AND (`repo_type` is `monorepo` OR multiple `package.json` files are found at `apps/*/package.json` or `packages/*/package.json`), set flag `NEEDS_APP_SELECTION = true`.
|
|
57
57
|
|
|
58
|
+
**Expertise pointers:**
|
|
59
|
+
- `accessibility_level` (AA vs AAA) carries scope implications for contrast-sensitive components — see `${CLAUDE_SKILL_DIR}/../gsp-accessibility/SKILL.md` for level interpretation when reasoning about adaptations
|
|
60
|
+
- `style_preset` (when set) drives style-preset-specific component conventions — see `${CLAUDE_SKILL_DIR}/../gsp-style/styles/{preset}.md` for the preset's patterns + constraints + effects vocabulary that adaptation reasoning should respect
|
|
61
|
+
- When writing token overrides in `target-adaptations.md`, consult `${CLAUDE_SKILL_DIR}/../gsp-color/domains/palette.md` for OKLCH/contrast considerations and `${CLAUDE_SKILL_DIR}/../gsp-typography/domains/scale.md` for type-scale ratios
|
|
62
|
+
|
|
58
63
|
### Codebase context
|
|
59
64
|
|
|
60
65
|
Read `.design/system/STACK.md` and `.design/system/COMPONENTS.md` (if exist) — existing tech stack, components, architecture.
|
|
@@ -137,11 +137,10 @@ Read these reference files:
|
|
|
137
137
|
- `${CLAUDE_SKILL_DIR}/visual-effects.md`
|
|
138
138
|
- `${CLAUDE_SKILL_DIR}/../gsp-project-design/block-patterns.md`
|
|
139
139
|
- `${CLAUDE_SKILL_DIR}/shadcn-composition.md`
|
|
140
|
+
- `${CLAUDE_SKILL_DIR}/agent-rules.md` — common spawn guardrails (universal + per-mode)
|
|
140
141
|
|
|
141
142
|
Hold their content for inlining into agent prompts in Steps 3, 4.5, 5, 7, and 8.
|
|
142
143
|
|
|
143
|
-
> **Note:** Anti-patterns are distilled into the `gsp-project-builder` agent prompt. Full ref remains on disk for edge-case agent lookup.
|
|
144
|
-
|
|
145
144
|
## Step 2.7: Theme apply gate
|
|
146
145
|
|
|
147
146
|
Verify brand tokens are installed in the codebase before spawning foundations. Foundations no longer pastes tokens — `/gsp-brand-apply` is the install primitive.
|
|
@@ -190,20 +189,16 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
|
|
|
190
189
|
### Agent instructions:
|
|
191
190
|
|
|
192
191
|
> execution_mode: foundations
|
|
192
|
+
> Build token integration, global styles, layout primitives, theme provider/utilities ONLY.
|
|
193
193
|
>
|
|
194
|
-
>
|
|
195
|
-
>
|
|
196
|
-
>
|
|
197
|
-
>
|
|
198
|
-
>
|
|
199
|
-
>
|
|
200
|
-
> 5. Apply the STYLE.md bold bets and effects vocabulary — create CSS utilities or Tailwind extensions for the brand's signature effects. Validate against constraints (never/always rules are non-negotiable).
|
|
201
|
-
> 6. For shadcn targets: use semantic color tokens (`bg-primary`, `text-muted-foreground`) — never raw color values like `bg-blue-500`. Use `gap-*` not `space-y-*`. Use `size-*` when width and height are equal.
|
|
202
|
-
> 7. Do NOT build individual screens or page content
|
|
203
|
-
> 8. Write code directly to the codebase, not to `.design/`
|
|
204
|
-
> 9. Leave changes unstaged
|
|
194
|
+
> Foundation-specific actions:
|
|
195
|
+
> 1. Add base styles + dark mode setup + font imports that `apply` did not handle (`cssVars.theme.font-sans` may set the CSS var without the `next/font/google` import — add it if missing)
|
|
196
|
+
> 2. Create root layout with nav + footer shells (structure only)
|
|
197
|
+
> 3. Create shared utilities (cn helper, theme provider)
|
|
198
|
+
> 4. Apply STYLE.md bold bets + effects as CSS utilities / Tailwind extensions; validate against never/always constraints
|
|
199
|
+
> 5. For shadcn targets: semantic tokens (`bg-primary`), never raw values (`bg-blue-500`); `gap-*` not `space-y-*`; `size-*` when w/h equal
|
|
205
200
|
>
|
|
206
|
-
>
|
|
201
|
+
> See `agent-rules.md` (loaded in Step 2.6) for universal + per-mode guardrails (write to codebase, leave unstaged, log to `build/logs/foundations.md`, no BUILD-LOG.md direct write).
|
|
207
202
|
|
|
208
203
|
### Checkpoint: Compile check
|
|
209
204
|
|
|
@@ -258,54 +253,13 @@ Use `AskUserQuestion`: "Foundations look good? Continue building components, or
|
|
|
258
253
|
|
|
259
254
|
### Brand feedback loop
|
|
260
255
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
1. Apply the changes to the project codebase first (directly or via a quick builder re-run)
|
|
264
|
-
2. Ask: "Should this change also update the brand system? (Other projects using this brand would inherit it)"
|
|
265
|
-
3. If yes, spawn a background `gsp-brand-engineer` agent to update brand patterns:
|
|
266
|
-
- Pass: the specific changes made (what tokens/values changed, old → new)
|
|
267
|
-
- Pass: `{BRAND_PATH}/patterns/{brand-name}.yml` and relevant identity chunks
|
|
268
|
-
- Agent updates the `.yml` preset, foundation chunks, and STYLE.md if applicable
|
|
269
|
-
- Agent writes to `{BRAND_PATH}/` — the brand source of truth
|
|
270
|
-
- Run synchronously (do NOT use `run_in_background`) — Step 4.5 reads the brand `.yml` from disk, so the updated values must be committed before components begin
|
|
271
|
-
4. Wait for brand sync to complete, then continue to Step 4.5
|
|
256
|
+
Read `${CLAUDE_SKILL_DIR}/brand-feedback.md` for the full procedure. Key constraint: the `gsp-brand-engineer` re-sync runs synchronously before Step 4.5 begins.
|
|
272
257
|
|
|
273
258
|
## Step 4.5: Phase 4 — COMPONENTS
|
|
274
259
|
|
|
275
|
-
### Build component manifest
|
|
276
|
-
|
|
277
|
-
Read ALL design chunks from `{PROJECT_PATH}/design/` — every `screen-{NN}-{name}.md`. Also read:
|
|
278
|
-
- `{PROJECT_PATH}/brief/scope.md` (feature map)
|
|
279
|
-
- `{PROJECT_PATH}/brief/target-adaptations.md` (component adaptations)
|
|
280
|
-
- `{BRAND_PATH}/patterns/components/token-mapping.md` (if exists)
|
|
260
|
+
### Build component manifest + classify + partition
|
|
281
261
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
COMPONENT_MANIFEST = [
|
|
286
|
-
{ name: "Button", source: "shadcn", classification: "library-default", screens: [01, 03, 05] },
|
|
287
|
-
{ name: "Card", source: "shadcn", classification: "library-customize", screens: [01, 02, 04], overrides: "custom radius + shadow from STYLE.md" },
|
|
288
|
-
{ name: "PricingTier", source: "custom", classification: "custom", screens: [03] },
|
|
289
|
-
...
|
|
290
|
-
]
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
### Classify each component
|
|
294
|
-
|
|
295
|
-
| Category | Criteria | Action |
|
|
296
|
-
|----------|----------|--------|
|
|
297
|
-
| `library-default` | Exists in target library, no brand overrides needed | Install as-is |
|
|
298
|
-
| `library-customize` | Exists in target library, STYLE.md or token-mapping requires overrides | Install then customize |
|
|
299
|
-
| `custom` | No library match, or design requires bespoke component | Build from scratch |
|
|
300
|
-
| `existing` | Already in codebase (from scaffold or prior project) | Skip — already available |
|
|
301
|
-
|
|
302
|
-
### Partition into agent groups
|
|
303
|
-
|
|
304
|
-
Group components to minimize conflicts:
|
|
305
|
-
1. No two agents install the same library component
|
|
306
|
-
2. Group related variants together (Card + CardHeader + CardContent + CardFooter → same agent)
|
|
307
|
-
3. Balance work across agents (aim for 3-6 components per agent)
|
|
308
|
-
4. If total components ≤ 5, use a single agent (no need to parallelize)
|
|
262
|
+
Read `${CLAUDE_SKILL_DIR}/component-classification.md` for the manifest schema, classification table (`library-default` / `library-customize` / `custom` / `existing`), and partitioning rules (≤5 → single agent; group related variants; 3-6 components per agent).
|
|
309
263
|
|
|
310
264
|
### Resume check
|
|
311
265
|
|
|
@@ -348,18 +302,9 @@ Agent instructions template:
|
|
|
348
302
|
> implementation_target: {target}
|
|
349
303
|
> components: [{partition list with classifications}]
|
|
350
304
|
>
|
|
351
|
-
> Install, customize, or create the assigned components.
|
|
352
|
-
> 1. For library-default: install via CLI, verify import works
|
|
353
|
-
> 2. For library-customize: install via CLI, then apply brand overrides (STYLE.md constraints, token values)
|
|
354
|
-
> 3. For custom: create from scratch following brand patterns and STYLE.md
|
|
355
|
-
> 4. Read foundations from codebase (tokens, utilities already exist)
|
|
356
|
-
> 5. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
|
|
357
|
-
> 6. Do NOT build screens or page content
|
|
358
|
-
> 7. Write code directly to the codebase
|
|
359
|
-
> 8. Leave changes unstaged
|
|
305
|
+
> Install, customize, or create the assigned components per their classification (library-default → install as-is; library-customize → install + STYLE.md overrides; custom → create from scratch).
|
|
360
306
|
>
|
|
361
|
-
>
|
|
362
|
-
> Also write `{PROJECT_PATH}/build/status/component-{partition-name}.json` with `{"status": "complete", "components": [{list}], "timestamp": "{ISO}"}`.
|
|
307
|
+
> See `agent-rules.md` (loaded in Step 2.6) for guardrails (read foundations from codebase, do not modify foundation files, log to `build/logs/component-{partition-name}.md`, write `build/status/component-{partition-name}.json` for resume support).
|
|
363
308
|
|
|
364
309
|
### Checkpoint: Compile check
|
|
365
310
|
|
|
@@ -421,19 +366,14 @@ Agent instructions per screen:
|
|
|
421
366
|
> execution_mode: screen
|
|
422
367
|
> screen: {name} ({NN})
|
|
423
368
|
>
|
|
424
|
-
> Build the {name} screen. Foundations
|
|
369
|
+
> Build the {name} screen. Foundations + components are already in the codebase.
|
|
425
370
|
>
|
|
426
|
-
> 1. Read
|
|
427
|
-
> 2. Create the route page
|
|
428
|
-
> 3. Wire imports to existing foundation
|
|
429
|
-
> 4.
|
|
430
|
-
> 5. Do NOT modify shared component files (they were built in the components phase)
|
|
431
|
-
> 6. Write code directly to the codebase, not to `.design/`
|
|
432
|
-
> 7. Leave changes unstaged
|
|
433
|
-
> 8. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes
|
|
371
|
+
> 1. Read existing layout, tokens, utilities, components from the codebase
|
|
372
|
+
> 2. Create the route page + screen-specific components
|
|
373
|
+
> 3. Wire imports to existing foundation + component files
|
|
374
|
+
> 4. The brand's visual effects exist as utilities/classes from foundations — use them, don't redefine
|
|
434
375
|
>
|
|
435
|
-
>
|
|
436
|
-
> Also write `{PROJECT_PATH}/build/status/screen-{NN}-{name}.json` with `{"status": "complete", "screen": "{name}", "files": [{list}], "timestamp": "{ISO}"}`.
|
|
376
|
+
> See `agent-rules.md` (loaded in Step 2.6) for guardrails (no modifying foundations or shared components, log to `build/logs/screen-{NN}-{name}.md`, write `build/status/screen-{NN}-{name}.json` for resume support).
|
|
437
377
|
|
|
438
378
|
### Checkpoint: Compile check
|
|
439
379
|
|
|
@@ -452,35 +392,7 @@ Update `{PROJECT_PATH}/STATE.md` `## Screen Build Status` table — set complete
|
|
|
452
392
|
|
|
453
393
|
## Step 5.5: Extraction review (lightweight)
|
|
454
394
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
### Automated scan
|
|
458
|
-
|
|
459
|
-
Run these checks on the built codebase:
|
|
460
|
-
|
|
461
|
-
1. **Hardcoded values** — Grep for hardcoded hex colors, rgb(), pixel values that should be tokens. Flag any that don't reference CSS variables or Tailwind tokens.
|
|
462
|
-
2. **Duplicated patterns** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ screen files. These are patterns the components phase missed.
|
|
463
|
-
|
|
464
|
-
### Surface findings
|
|
465
|
-
|
|
466
|
-
If issues found, present to user:
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
◆ post-build scan
|
|
470
|
-
|
|
471
|
-
Found {N} hardcoded values and {M} duplicated patterns.
|
|
472
|
-
{list if any}
|
|
473
|
-
|
|
474
|
-
──────────────────────────────
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
If no issues: "Post-build scan clean — no hardcoded values or duplicated patterns found."
|
|
478
|
-
|
|
479
|
-
Use `AskUserQuestion` only if issues were found: "Fix these, or continue to finalize?"
|
|
480
|
-
- **Fix** → apply changes inline (mechanical refactors, no agent needed)
|
|
481
|
-
- **Continue** → proceed to Step 6
|
|
482
|
-
|
|
483
|
-
If hardcoded values map to missing brand tokens, suggest: "These token gaps may also exist in the brand. Consider running `/gsp-brand-refine` after build completes."
|
|
395
|
+
Read `${CLAUDE_SKILL_DIR}/extraction-review.md` for the full procedure. Quick post-build sanity check: hardcoded values + duplicated patterns. If issues found, AskUserQuestion (Fix inline / Continue to Step 6).
|
|
484
396
|
|
|
485
397
|
## Step 6: Finalize
|
|
486
398
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Agent Rules (foundations + components + screens)
|
|
2
|
+
|
|
3
|
+
Common guardrails for `gsp-project-builder` agent spawns. Each spawn references this file once instead of repeating the rules inline. Mode-specific instructions are in the spawn block (foundations / component / screen).
|
|
4
|
+
|
|
5
|
+
## Universal rules (all modes)
|
|
6
|
+
|
|
7
|
+
- **Write code directly to the codebase** — not to `.design/`
|
|
8
|
+
- **Leave changes unstaged** — orchestrator handles commits
|
|
9
|
+
- **Do NOT write to BUILD-LOG.md directly** — orchestrator merges per-agent logs after each phase. Each agent writes to `{PROJECT_PATH}/build/logs/{phase}-{name}.md`
|
|
10
|
+
- For component/screen modes, also write `{PROJECT_PATH}/build/status/{phase}-{name}.json` with `{"status": "complete", "timestamp": "{ISO}"}` for resume support
|
|
11
|
+
|
|
12
|
+
## Mode-specific guardrails
|
|
13
|
+
|
|
14
|
+
### foundations
|
|
15
|
+
- Verify brand tokens are already installed in `globals.css` (orchestrator gates this; tokens MUST be present before agent runs)
|
|
16
|
+
- If tokens missing, abort with error pointing at `/gsp-brand-apply {brand-name}`. Do NOT manually paste tokens
|
|
17
|
+
- Build root layout shells, shared utilities, theme providers ONLY
|
|
18
|
+
- Do NOT build individual screens or page content
|
|
19
|
+
|
|
20
|
+
### component
|
|
21
|
+
- Read foundations from codebase (tokens, utilities already exist)
|
|
22
|
+
- Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
|
|
23
|
+
- Do NOT build screens or page content
|
|
24
|
+
- Library-default → install via CLI as-is
|
|
25
|
+
- Library-customize → install + apply STYLE.md overrides (radius, shadow, color tokens)
|
|
26
|
+
- Custom → create from scratch following brand patterns
|
|
27
|
+
|
|
28
|
+
### screen
|
|
29
|
+
- Read foundations + components from codebase
|
|
30
|
+
- Do NOT modify foundation files
|
|
31
|
+
- Do NOT modify shared component files (built in Phase 4)
|
|
32
|
+
- Build the screen's route page + screen-specific components only
|
|
33
|
+
|
|
34
|
+
## When in doubt
|
|
35
|
+
|
|
36
|
+
STYLE.md takes precedence over all defaults. If the preset explicitly defines a technique, implement it. The methodology file (`methodology/gsp-project-builder.md`) has the full domain-rule pointers (color, typography, accessibility, imagery, anti-patterns).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Brand Feedback Loop (Step 4)
|
|
2
|
+
|
|
3
|
+
If the user requests adjustments during foundation review:
|
|
4
|
+
|
|
5
|
+
1. **Apply to project codebase first** — directly or via a quick builder re-run
|
|
6
|
+
2. **Ask:** "Should this change also update the brand system? (Other projects using this brand would inherit it.)"
|
|
7
|
+
3. **If yes**, spawn a `gsp-brand-engineer` agent **synchronously** (NOT `run_in_background` — Step 4.5 reads the brand `.yml` from disk; updated values must be committed before components begin):
|
|
8
|
+
- Pass: the specific changes made (what tokens/values changed, old → new)
|
|
9
|
+
- Pass: `{BRAND_PATH}/patterns/{brand-name}.yml` and relevant identity chunks
|
|
10
|
+
- Agent updates the `.yml` preset, foundation chunks, and STYLE.md if applicable
|
|
11
|
+
- Agent writes to `{BRAND_PATH}/` — the brand source of truth
|
|
12
|
+
4. **Wait for brand sync to complete**, then continue to Step 4.5
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Component Classification (Step 4.5)
|
|
2
|
+
|
|
3
|
+
## Build component manifest
|
|
4
|
+
|
|
5
|
+
Read ALL design chunks from `{PROJECT_PATH}/design/` — every `screen-{NN}-{name}.md`. Also read:
|
|
6
|
+
- `{PROJECT_PATH}/brief/scope.md` (feature map)
|
|
7
|
+
- `{PROJECT_PATH}/brief/target-adaptations.md` (component adaptations)
|
|
8
|
+
- `{BRAND_PATH}/patterns/components/token-mapping.md` (if exists)
|
|
9
|
+
|
|
10
|
+
Extract every component referenced across all screens. Deduplicate. Build a manifest:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
COMPONENT_MANIFEST = [
|
|
14
|
+
{ name: "Button", source: "shadcn", classification: "library-default", screens: [01, 03, 05] },
|
|
15
|
+
{ name: "Card", source: "shadcn", classification: "library-customize", screens: [01, 02, 04], overrides: "custom radius + shadow from STYLE.md" },
|
|
16
|
+
{ name: "PricingTier", source: "custom", classification: "custom", screens: [03] },
|
|
17
|
+
...
|
|
18
|
+
]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Classify each component
|
|
22
|
+
|
|
23
|
+
| Category | Criteria | Action |
|
|
24
|
+
|----------|----------|--------|
|
|
25
|
+
| `library-default` | Exists in target library, no brand overrides needed | Install as-is |
|
|
26
|
+
| `library-customize` | Exists in target library, STYLE.md or token-mapping requires overrides | Install then customize |
|
|
27
|
+
| `custom` | No library match, or design requires bespoke component | Build from scratch |
|
|
28
|
+
| `existing` | Already in codebase (from scaffold or prior project) | Skip — already available |
|
|
29
|
+
|
|
30
|
+
## Partition into agent groups
|
|
31
|
+
|
|
32
|
+
Group components to minimize conflicts:
|
|
33
|
+
1. No two agents install the same library component
|
|
34
|
+
2. Group related variants together (Card + CardHeader + CardContent + CardFooter → same agent)
|
|
35
|
+
3. Balance work across agents (aim for 3-6 components per agent)
|
|
36
|
+
4. If total components ≤ 5, use a single agent (no need to parallelize)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Extraction Review (Step 5.5)
|
|
2
|
+
|
|
3
|
+
Components were built in Phase 4, so most reuse is already handled. This is a quick sanity check.
|
|
4
|
+
|
|
5
|
+
## Automated scan
|
|
6
|
+
|
|
7
|
+
Run these on the built codebase:
|
|
8
|
+
|
|
9
|
+
1. **Hardcoded values** — Grep for hardcoded hex colors, `rgb()`, pixel values that should be tokens. Flag any that don't reference CSS variables or Tailwind tokens.
|
|
10
|
+
2. **Duplicated patterns** — Grep for identical `className` strings (>3 classes) appearing in 2+ screen files. These are patterns the components phase missed.
|
|
11
|
+
|
|
12
|
+
## Surface findings
|
|
13
|
+
|
|
14
|
+
If issues found:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
◆ post-build scan
|
|
18
|
+
|
|
19
|
+
Found {N} hardcoded values and {M} duplicated patterns.
|
|
20
|
+
{list if any}
|
|
21
|
+
|
|
22
|
+
──────────────────────────────
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If no issues: "Post-build scan clean — no hardcoded values or duplicated patterns found."
|
|
26
|
+
|
|
27
|
+
Use `AskUserQuestion` only if issues were found: "Fix these, or continue to finalize?"
|
|
28
|
+
- **Fix** → apply changes inline (mechanical refactors, no agent needed)
|
|
29
|
+
- **Continue** → proceed to Step 6
|
|
30
|
+
|
|
31
|
+
If hardcoded values map to missing brand tokens, suggest: "These token gaps may also exist in the brand. Consider running `/gsp-brand-refine` after build completes."
|
|
@@ -93,16 +93,23 @@ When the user gives feedback during a build, classify it:
|
|
|
93
93
|
|
|
94
94
|
Never silently apply style-level changes to code without surfacing the choice. A button radius change in one screen that doesn't flow back to the `.yml` creates drift — the next screen gets built with the old radius.
|
|
95
95
|
|
|
96
|
-
## Anti-Pattern Awareness (
|
|
96
|
+
## Anti-Pattern Awareness (delegated to expertise)
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
**STYLE.md takes precedence over all defaults.** When the preset is silent, defer to the canonical owners:
|
|
99
99
|
|
|
100
|
-
- **
|
|
101
|
-
- **
|
|
100
|
+
- **Color** — `${CLAUDE_SKILL_DIR}/../gsp-color/domains/system.md` (off-black, accent count, shadow tinting, light source) + `${CLAUDE_SKILL_DIR}/../gsp-color/references/color-composition.md` (60-30-10 rule)
|
|
101
|
+
- **Typography** — `${CLAUDE_SKILL_DIR}/../gsp-typography/domains/system.md` + `pairing.md` (no Inter/Roboto defaults, `tabular-nums`, `text-wrap: balance`, scale ratios)
|
|
102
|
+
- **Motion + effects** — `${CLAUDE_SKILL_DIR}/../gsp-accessibility/motion-effects.md` (`prefers-reduced-motion`, contrast on effects, hover magnitudes, spring physics)
|
|
103
|
+
- **Imagery** — `${CLAUDE_SKILL_DIR}/../gsp-visuals/domains/imagery.md` (photography, illustration, treatments)
|
|
104
|
+
- **Full anti-pattern catalog** — `${CLAUDE_SKILL_DIR}/../gsp-project-critique/anti-patterns.md` (consolidated checklist; cite this for code-quality patterns beyond the domains above)
|
|
105
|
+
- **STYLE.md vocabulary** — `${CLAUDE_SKILL_DIR}/../gsp-style/style-preset-schema.md` (constraint/pattern/effects/bold-bet structure)
|
|
106
|
+
|
|
107
|
+
Do not re-derive these rules inline — read the canonical owner before applying.
|
|
108
|
+
|
|
109
|
+
**Builder-specific defaults** (not domain knowledge — keep here):
|
|
102
110
|
- **Layout:** `min-h-[100dvh]` not `h-screen`, always max-width, CSS Grid over flexbox %, bottom-align CTAs in card groups
|
|
103
|
-
- **Surfaces:**
|
|
111
|
+
- **Surfaces:** z-layer system (flat/subtle/elevated/floating/overlay)
|
|
104
112
|
- **Content:** real copy always, diverse names, organic numbers, sentence case, no AI clichés
|
|
105
|
-
- **Motion:** spring physics (`cubic-bezier(0.16,1,0.3,1)`), `transform`+`opacity` only, 200-300ms minimum, `prefers-reduced-motion`, stagger entrances
|
|
106
113
|
- **Components:** customize shadcn radii/colors/shadows, skeleton loaders not spinners, semantic HTML
|
|
107
114
|
- **Code:** no inline styles mixed with utilities, relative units, clean z-index scale, alt text, verify imports exist
|
|
108
115
|
|
|
@@ -187,7 +194,7 @@ These rules are always enforced for shadcn targets. They reflect the official sh
|
|
|
187
194
|
```
|
|
188
195
|
- Do not override `--sidebar-width` in `globals.css` — it belongs on the provider instance
|
|
189
196
|
|
|
190
|
-
Full reference:
|
|
197
|
+
Full reference: `${CLAUDE_SKILL_DIR}/../gsp-project-critique/anti-patterns.md` (available via Read for the complete list with fixes).
|
|
191
198
|
|
|
192
199
|
**Theming reference:** when building or fixing themes, read `${CLAUDE_SKILL_DIR}/../../gsp-scaffold/shadcn-theming.md` — full token table, dark mode setup, common theming bugs and fixes.
|
|
193
200
|
|
|
@@ -197,7 +204,7 @@ Every screen must pass these before marking complete. When `STYLE.md` is provide
|
|
|
197
204
|
|
|
198
205
|
1. **Background treatment** — never plain white/dark. Subtle gradient, texture, or decorative element.
|
|
199
206
|
2. **State polish** — hover/focus/active/pressed feel deliberate (shadow shifts, subtle scale, translateY) not just color swaps
|
|
200
|
-
3. **Icon consistency** — one icon family, one stroke weight throughout
|
|
207
|
+
3. **Icon consistency** — import from `preferences.icon_library` only (project config — defaults to `lucide`); one icon family, one stroke weight throughout. No mixing libraries within a screen
|
|
201
208
|
4. **Image direction** — imagery style (photo/illustration/CSS-only) matches brand character
|
|
202
209
|
5. **Responsive craft** — mobile is a designed experience, not just "it fits"
|
|
203
210
|
|
|
@@ -457,19 +457,4 @@ Beyond basic glassmorphism — simulating realistic glass edge refraction and de
|
|
|
457
457
|
|
|
458
458
|
## Accessibility
|
|
459
459
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
```css
|
|
463
|
-
@media (prefers-reduced-motion: reduce) {
|
|
464
|
-
*, *::before, *::after {
|
|
465
|
-
animation-duration: 0.01ms !important;
|
|
466
|
-
animation-iteration-count: 1 !important;
|
|
467
|
-
transition-duration: 0.01ms !important;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
- Glow/shadow: ensure text contrast meets WCAG AA without effects
|
|
473
|
-
- Backdrop-blur: `@supports not (backdrop-filter: blur(1px))` solid bg fallback
|
|
474
|
-
- Gradient text: test contrast ratio of gradient endpoints, not just midpoint
|
|
475
|
-
- Hover transforms: keep magnitude small (2-4px translate, 1.02-1.05 scale) to avoid disorientation
|
|
460
|
+
Canonical motion + effects accessibility guidance lives in `${CLAUDE_SKILL_DIR}/../gsp-accessibility/motion-effects.md` — owned by `gsp-accessibility`. Builder must read it before applying any effect from this reference. Covers `prefers-reduced-motion`, contrast on glow/shadow/gradient text, backdrop-filter fallbacks, and hover-transform magnitudes.
|