get-shit-pretty 0.7.1 → 0.7.4

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.
@@ -107,16 +107,16 @@ The agent writes 5 chunks + INDEX.md (creative decisions only — no technical e
107
107
  5. `brand-applications.md`
108
108
  6. `INDEX.md`
109
109
 
110
- ## Step 3.5: Enrich with domain skills
110
+ ## Step 3.5: Enrich with domain skills (parallel)
111
111
 
112
- After the creative-director finishes, invoke domain skills to add technical precision to the creative decisions. Each skill reads the chunk the agent wrote, enriches it, and overwrites.
112
+ After the creative-director finishes, invoke all 4 domain skills in parallel they operate on separate chunks with zero dependencies:
113
113
 
114
- 1. **Invoke `/gsp-logo --enrich`** — reads `logo-directions.md`, enriches each direction with detailed construction geometry, complete variation specs, clear space rules, and minimum size calculations.
115
- 2. **Invoke `/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
- 3. **Invoke `/gsp-typography --enrich`** — reads `typography.md`, generates mathematical type scale, adds fluid type formulas, enriches with font loading instructions.
117
- 4. **Invoke `/gsp-visuals --imagery --enrich`** — reads `imagery-style.md`, adds icon library specifics, CSS texture/treatment recipes, enriches with technical implementation details.
114
+ - **`/gsp-logo --enrich`** — reads `logo-directions.md`, enriches with construction geometry, variation specs, clear space rules, minimum size calculations.
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
+ - **`/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`, adds icon library specifics, CSS texture/treatment recipes, enriches with technical implementation details.
118
118
 
119
- Each skill loads its own domain references on-demand — no upfront context cost.
119
+ Invoke all 4 using the Skill tool simultaneously. Each skill loads its own domain references on-demand — no upfront context cost.
120
120
 
121
121
  ## Step 4: Perspective check
122
122
 
@@ -37,10 +37,11 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
37
37
 
38
38
  ─── Branding ─────────────────────────
39
39
 
40
+ /gsp-brand-brief define your brand through guided Q&A
40
41
  /gsp-brand-research research your market and audience
41
42
  /gsp-brand-strategy define positioning, personality, voice and messaging
42
43
  /gsp-brand-identity create visual identity
43
- /gsp-brand-guidelines build design system tokens and components
44
+ /gsp-brand-guidelines build design system tokens and components
44
45
  /gsp-brand-sync sync brand to match a project's shipped state
45
46
  /gsp-brand-refine tweak brand tokens mid-project without re-running identity
46
47
  /gsp-brand-audit audit existing brand before evolving (optional)
@@ -60,11 +61,15 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
60
61
  /gsp-color color systems — palettes, contrast, semantic mapping, dark mode
61
62
  /gsp-typography type systems — scale, pairing, fluid type, vertical rhythm
62
63
  /gsp-visuals visual direction — imagery, 3D, video, textures
63
- /gsp-accessibility accessibility auditcontrast, WCAG, code checks
64
+ /gsp-icons icon systemslibrary, sizing, containers, custom SVG
65
+ /gsp-logo logo directions — concepts, variations, usage rules
66
+ /gsp-accessibility contrast checks and token WCAG audits
64
67
  /gsp-style apply a design style preset
65
68
 
66
69
  ─── Utilities ────────────────────────
67
70
 
71
+ /gsp-design-system scan and document existing design system state
72
+ /gsp-scaffold deterministic stack setup — deps, configs, verify build
68
73
  /gsp-doctor check project health
69
74
  /gsp-update update GSP to latest version
70
75
 
@@ -79,7 +84,7 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
79
84
  — or —
80
85
  quick mode: pick a style → jump straight to project.
81
86
 
82
- branding research → strategy → identity → patterns
87
+ branding brief → research → strategy → identity → guidelines
83
88
  project brief → research → design → critique → build → review
84
89
  ↑ ↑
85
90
  critique loop QA loop
@@ -98,7 +103,7 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
98
103
  │ ├── discover/ research chunks
99
104
  │ ├── strategy/ strategy + voice and messaging
100
105
  │ ├── identity/ visual identity
101
- │ └── patterns/ tokens + components
106
+ │ └── system/ tokens + components
102
107
  └── projects/
103
108
  └── {project}/
104
109
  ├── config.json project config
@@ -114,7 +119,7 @@ Skill names are left-padded with 4 spaces. Descriptions start at column 27 (4 in
114
119
  └── exports/INDEX.md chunk index
115
120
 
116
121
  get-shit-pretty v{VERSION}
117
- github.com/juliuslipp/get-shit-pretty
122
+ github.com/jubscodes/get-shit-pretty
118
123
  ```
119
124
 
120
125
  Replace `{VERSION}` with the value read from the VERSION file.
@@ -13,7 +13,7 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  ---
15
15
  <context>
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.
16
+ Phase 5 of the GSP project diamond. Uses a 7-phase pipeline with verification checkpoints to implement designs directly in the codebase as production-ready frontend components.
17
17
 
18
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
 
@@ -30,11 +30,23 @@ Phase 2: FOUNDATIONS (agent: gsp-project-builder mode:foundations)
30
30
  Phase 3: FOUNDATION REVIEW (interactive)
31
31
  └─ Present summary → user confirms
32
32
 
33
- Phase 4: SCREENS (agent: gsp-project-builder mode:screen, one per screen)
34
- ├─ Context per screen: its design chunk + referenced components only
35
- ├─ Agent reads foundations from codebase (not from context)
36
- ├─ CHECKPOINT per screen: compile check
37
- └─ Sequential (patterns compound)
33
+ Phase 4: COMPONENTS (agents: gsp-project-builder mode:component, parallel)
34
+ ├─ Orchestrator: reads all design chunks builds component manifest → partitions
35
+ ├─ Each agent: installs/customizes/creates its assigned components
36
+ ├─ Model assignment: round-robin (Opus/Sonnet) for rate-limit distribution
37
+ └─ CHECKPOINT: build must compile
38
+
39
+ Phase 5: SCREENS (agents: gsp-project-builder mode:screen, parallel)
40
+ ├─ Context per screen: its design chunk + component paths (components exist in codebase)
41
+ ├─ Agent reads foundations + components from codebase (not from context)
42
+ ├─ Model assignment: round-robin (Opus/Sonnet) for rate-limit distribution
43
+ └─ CHECKPOINT: build must compile
44
+
45
+ Phase 6: EXTRACTION REVIEW (lightweight)
46
+ └─ Grep for hardcoded values, flag remaining duplication
47
+
48
+ Phase 7: FINALIZE
49
+ └─ BUILD-LOG, MANIFEST, STATE, phase transition
38
50
  ```
39
51
  </context>
40
52
 
@@ -113,15 +125,16 @@ After scaffold completes, verify `{PROJECT_PATH}/build/SCAFFOLD-LOG.md` exists.
113
125
 
114
126
  ## Step 2.5: Load agent methodology
115
127
 
116
- Read `${CLAUDE_SKILL_DIR}/methodology/gsp-project-builder.md`. Include the full content as **Agent methodology** in all agent prompts below (Steps 3, 5, 7, 8).
128
+ Read `${CLAUDE_SKILL_DIR}/methodology/gsp-project-builder.md`. Include the full content as **Agent methodology** in all agent prompts below (Steps 3, 4.5, 5, 7, 8).
117
129
 
118
130
  ## Step 2.6: Load build references
119
131
 
120
132
  Read these reference files:
121
133
  - `${CLAUDE_SKILL_DIR}/visual-effects.md`
122
134
  - `${CLAUDE_SKILL_DIR}/../gsp-project-design/block-patterns.md`
135
+ - `${CLAUDE_SKILL_DIR}/../gsp-brand-guidelines/token-mapping.md`
123
136
 
124
- Hold their content for inlining into agent prompts in Steps 3, 5, 7, and 8.
137
+ Hold their content for inlining into agent prompts in Steps 3, 4.5, 5, 7, and 8.
125
138
 
126
139
  > **Note:** Anti-patterns are distilled into the `gsp-project-builder` agent prompt. Full ref remains on disk for edge-case agent lookup.
127
140
 
@@ -133,7 +146,7 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
133
146
 
134
147
  | File | Purpose |
135
148
  |------|---------|
136
- | `{BRAND_PATH}/patterns/{brand-name}.yml` | Token values only — used with `gsp-brand-guidelines/token-mapping.md` to generate CSS variables. Do NOT re-read patterns/constraints/effects from here — those are in STYLE.md. |
149
+ | `{BRAND_PATH}/patterns/{brand-name}.yml` | Token values only — used with token-mapping.md to generate CSS variables. Do NOT re-read patterns/constraints/effects from here — those are in STYLE.md. |
137
150
  | `{BRAND_PATH}/patterns/STYLE.md` | Design law — philosophy, patterns, constraints, effects, bold bets, implementation hints (if exists; fall back to `{brand-name}.md`) |
138
151
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations for target |
139
152
  | `.design/system/STACK.md` | Stack state |
@@ -141,6 +154,7 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
141
154
  | `.design/system/COMPONENTS.md` | Existing components (if exists) |
142
155
  | `{PROJECT_PATH}/config.json` | Tech stack, target |
143
156
  | Build output template (from execution_context) | Build log structure |
157
+ | Token mapping ref (loaded in Step 2.6) | Deterministic `.yml` → CSS variable mapping per target (shadcn HSL, Tailwind, vanilla). Includes all 26+ shadcn variables, hex→HSL conversion, dark mode, shape/radius derivation. |
144
158
  | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
145
159
  | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
146
160
 
@@ -150,16 +164,17 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
150
164
  >
151
165
  > Build token integration, global styles, and layout primitives ONLY.
152
166
  >
153
- > 1. Integrate design tokens into the codebase (CSS variables, Tailwind config, or theme file)
167
+ > 1. Integrate design tokens into the codebase using the token-mapping reference: read the `.yml` token values and the token-mapping.md spec, then generate CSS variables per target (shadcn: HSL space-separated in `:root`/`.dark`, Tailwind: custom properties + config extend, vanilla: full custom property system). Map ALL variables — not just colors: background, foreground, card, popover, primary, secondary, muted, accent, destructive, border, input, ring, sidebar-*, chart-1 through chart-5, and --radius.
154
168
  > 2. Create global CSS (resets, base styles, font imports, dark mode setup)
155
169
  > 3. Create root layout with nav shell and footer shell (structure only — no page content)
156
170
  > 4. Create shared utilities (cn helper, theme provider if needed)
157
171
  > 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).
158
- > 6. Do NOT build individual screens or page content
159
- > 7. Write code directly to the codebase, not to `.design/`
160
- > 8. Leave changes unstaged
172
+ > 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.
173
+ > 7. Do NOT build individual screens or page content
174
+ > 8. Write code directly to the codebase, not to `.design/`
175
+ > 9. Leave changes unstaged
161
176
  >
162
- > After completing foundations, write `{PROJECT_PATH}/build/BUILD-LOG.md` with what was done (foundations section only).
177
+ > After completing foundations, write `{PROJECT_PATH}/build/logs/foundations.md` with what was done (foundations section). Do NOT write to BUILD-LOG.md directly — the orchestrator merges logs after each phase.
163
178
 
164
179
  ### Checkpoint: Compile check
165
180
 
@@ -207,8 +222,8 @@ Present a summary of what the foundations phase produced:
207
222
  ──────────────────────────────
208
223
  ```
209
224
 
210
- Use `AskUserQuestion`: "Foundations look good? Continue building screens, or review first?"
211
- - **Continue** → proceed to Step 5
225
+ Use `AskUserQuestion`: "Foundations look good? Continue building components, or review first?"
226
+ - **Continue** → proceed to Step 4.5
212
227
  - **Review first** → pause, let user inspect, resume when ready
213
228
  - **Adjust** → user requests changes (colors, typography, spacing, etc.)
214
229
 
@@ -223,101 +238,220 @@ If the user requests adjustments during foundation review:
223
238
  - Pass: `{BRAND_PATH}/patterns/{brand-name}.yml` and relevant identity chunks
224
239
  - Agent updates the `.yml` preset, foundation chunks, and STYLE.md if applicable
225
240
  - Agent writes to `{BRAND_PATH}/` — the brand source of truth
226
- - Run in background (`run_in_background: true`) so the build pipeline continues
227
- 4. Continue to Step 5 without waiting for brand sync
241
+ - 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
242
+ 4. Wait for brand sync to complete, then continue to Step 4.5
243
+
244
+ ## Step 4.5: Phase 4 — COMPONENTS
245
+
246
+ ### Build component manifest
247
+
248
+ Read ALL design chunks from `{PROJECT_PATH}/design/` — every `screen-{NN}-{name}.md`. Also read:
249
+ - `{PROJECT_PATH}/brief/scope.md` (feature map)
250
+ - `{PROJECT_PATH}/brief/target-adaptations.md` (component adaptations)
251
+ - `{BRAND_PATH}/patterns/components/token-mapping.md` (if exists)
252
+
253
+ Extract every component referenced across all screens. Deduplicate. Build a manifest:
254
+
255
+ ```
256
+ COMPONENT_MANIFEST = [
257
+ { name: "Button", source: "shadcn", classification: "library-default", screens: [01, 03, 05] },
258
+ { name: "Card", source: "shadcn", classification: "library-customize", screens: [01, 02, 04], overrides: "custom radius + shadow from STYLE.md" },
259
+ { name: "PricingTier", source: "custom", classification: "custom", screens: [03] },
260
+ ...
261
+ ]
262
+ ```
263
+
264
+ ### Classify each component
265
+
266
+ | Category | Criteria | Action |
267
+ |----------|----------|--------|
268
+ | `library-default` | Exists in target library, no brand overrides needed | Install as-is |
269
+ | `library-customize` | Exists in target library, STYLE.md or token-mapping requires overrides | Install then customize |
270
+ | `custom` | No library match, or design requires bespoke component | Build from scratch |
271
+ | `existing` | Already in codebase (from scaffold or prior project) | Skip — already available |
272
+
273
+ ### Partition into agent groups
274
+
275
+ Group components to minimize conflicts:
276
+ 1. No two agents install the same library component
277
+ 2. Group related variants together (Card + CardHeader + CardContent + CardFooter → same agent)
278
+ 3. Balance work across agents (aim for 3-6 components per agent)
279
+ 4. If total components ≤ 5, use a single agent (no need to parallelize)
280
+
281
+ ### Resume check
282
+
283
+ Check for existing `build/status/component-*.json` files. For each partition with a `"status": "complete"` file, skip that agent — log: "Skipping {name} — already complete."
284
+
285
+ ### Progress log
286
+
287
+ Before spawning, log the manifest:
288
+
289
+ ```
290
+ ◆ components phase
291
+
292
+ Spawning {N} agents in parallel:
293
+ {for each partition}: [{model}] {partition-name} — {component-count} components
294
+ ```
295
+
296
+ ### Spawn component agents in parallel
297
+
298
+ For each partition, spawn `gsp-project-builder` with **execution_mode: component**.
299
+
300
+ Assign models in round-robin: first agent on user's model, second on `sonnet`, third on user's model, etc. This splits rate-limit pressure across model buckets.
301
+
302
+ Context per component agent:
303
+
304
+ | File | Purpose |
305
+ |------|---------|
306
+ | Component partition (list + classifications + overrides) | What to build |
307
+ | `{BRAND_PATH}/patterns/STYLE.md` (or fallback `{brand-name}.md`) | Design constraints, effects vocabulary |
308
+ | `{BRAND_PATH}/patterns/{brand-name}.yml` | Token values |
309
+ | `{BRAND_PATH}/patterns/components/token-mapping.md` | Component-to-token mapping |
310
+ | Design chunk excerpts (only sections referencing these components) | Usage context — how screens use them |
311
+ | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations for target |
312
+ | `{PROJECT_PATH}/config.json` | Tech stack, implementation target |
313
+ | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
314
+ | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
228
315
 
229
- ## Step 5: Phase 4 — SCREENS
316
+ Agent instructions template:
230
317
 
231
- Build screens sequentially. For each screen in `SCREENS`:
318
+ > execution_mode: component
319
+ > implementation_target: {target}
320
+ > components: [{partition list with classifications}]
321
+ >
322
+ > Install, customize, or create the assigned components.
323
+ > 1. For library-default: install via CLI, verify import works
324
+ > 2. For library-customize: install via CLI, then apply brand overrides (STYLE.md constraints, token values)
325
+ > 3. For custom: create from scratch following brand patterns and STYLE.md
326
+ > 4. Read foundations from codebase (tokens, utilities already exist)
327
+ > 5. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
328
+ > 6. Do NOT build screens or page content
329
+ > 7. Write code directly to the codebase
330
+ > 8. Leave changes unstaged
331
+ >
332
+ > After completing components, write `{PROJECT_PATH}/build/logs/component-{partition-name}.md` — list components installed/customized/created, files written, and any issues. Do NOT write to BUILD-LOG.md directly.
333
+ > Also write `{PROJECT_PATH}/build/status/component-{partition-name}.json` with `{"status": "complete", "components": [{list}], "timestamp": "{ISO}"}`.
334
+
335
+ ### Checkpoint: Compile check
336
+
337
+ After ALL component agents complete, run the build command (same stack table as Step 3 checkpoint).
338
+
339
+ **Pass:** Continue to Step 5.
340
+ **Fail:** Log the error. Surface to user: "Component build failed: {error}. Fix now or skip to screens?"
341
+
342
+ ### Merge component logs
343
+
344
+ After the compile checkpoint passes, merge all `build/logs/component-*.md` files into `{PROJECT_PATH}/build/BUILD-LOG.md` (foundations section from `build/logs/foundations.md` + all component sections, in partition order).
345
+
346
+ Log: " ✓ components complete — {N} agents, build compiles"
347
+
348
+ Update `{PROJECT_PATH}/STATE.md` — set completed component partitions in build status.
349
+
350
+ ## Step 5: Phase 5 — SCREENS (parallel)
351
+
352
+ Build all screens in parallel. Components exist in the codebase from Phase 4.
232
353
 
233
354
  ### Context per screen (lean — only this screen's data):
234
355
 
235
356
  | File | Purpose |
236
357
  |------|---------|
237
358
  | `{PROJECT_PATH}/design/screen-{NN}-{name}.md` | This screen's design chunk |
238
- | Referenced component chunks from `{BRAND_PATH}/patterns/components/` | Only components referenced in this screen's chunk |
359
+ | Component file paths from BUILD-LOG.md components section | Where to import from (paths only agent reads codebase) |
239
360
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations |
240
- | `{PROJECT_PATH}/research/reference-specs.md` (if exists) | Technical specs |
241
- | `{PROJECT_PATH}/critique/prioritized-fixes.md` (if exists) | Critique fixes relevant to this screen |
361
+ | `{PROJECT_PATH}/research/reference-specs.md` (if exists) | Technical specs — include only sections relevant to this screen |
362
+ | `{PROJECT_PATH}/critique/prioritized-fixes.md` (if exists) | Critique fixes include only fixes tagged to this screen |
242
363
  | Build output template (from execution_context) | Build log structure |
243
364
  | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
244
365
  | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
245
366
 
246
- **Does NOT receive:** other screen chunks, brand `.yml` (already integrated into codebase), full brand system, research monoliths.
367
+ **Does NOT receive:** other screen chunks, brand `.yml` (already in codebase), full brand system, research monoliths, component source code (agent reads from codebase).
368
+
369
+ ### Resume check
247
370
 
248
- ### Agent instructions per screen:
371
+ Check for existing `build/status/screen-*.json` files. For each screen with a `"status": "complete"` file, skip that agent — log: "Skipping screen-{NN}-{name} — already complete."
372
+
373
+ ### Progress log
374
+
375
+ Before spawning, log:
376
+
377
+ ```
378
+ ◆ screens phase
379
+
380
+ Spawning {N} agents in parallel:
381
+ {for each screen}: [{model}] screen-{NN}-{name}
382
+ ```
383
+
384
+ ### Spawn screen agents in parallel
385
+
386
+ For each screen in `SCREENS`, spawn `gsp-project-builder` with **execution_mode: screen**.
387
+
388
+ Assign models in round-robin: first screen on user's model, second on `sonnet`, third on user's model, etc.
389
+
390
+ Agent instructions per screen:
249
391
 
250
392
  > execution_mode: screen
251
393
  > screen: {name} ({NN})
252
394
  >
253
- > Build the {name} screen. Foundations are already in the codebase — read them, don't recreate them.
395
+ > Build the {name} screen. Foundations and components are already in the codebase.
254
396
  >
255
- > 1. Read the existing layout, tokens, and utilities from the codebase
397
+ > 1. Read the existing layout, tokens, utilities, and components from the codebase
256
398
  > 2. Create the route page and screen-specific components
257
- > 3. Wire imports to existing foundation components
399
+ > 3. Wire imports to existing foundation and component files
258
400
  > 4. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
259
- > 5. Write code directly to the codebase, not to `.design/`
260
- > 6. Leave changes unstaged
261
- > 7. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes rather than re-reading the brand style document
401
+ > 5. Do NOT modify shared component files (they were built in the components phase)
402
+ > 6. Write code directly to the codebase, not to `.design/`
403
+ > 7. Leave changes unstaged
404
+ > 8. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes
262
405
  >
263
- > After completing this screen, append to `{PROJECT_PATH}/build/BUILD-LOG.md` — add this screen's files and status to the existing log.
406
+ > After completing this screen, write `{PROJECT_PATH}/build/logs/screen-{NN}-{name}.md` — list files written, components used, and any issues. Do NOT write to BUILD-LOG.md directly.
407
+ > Also write `{PROJECT_PATH}/build/status/screen-{NN}-{name}.json` with `{"status": "complete", "screen": "{name}", "files": [{list}], "timestamp": "{ISO}"}`.
264
408
 
265
- ### Checkpoint per screen: Compile check
409
+ ### Checkpoint: Compile check
266
410
 
267
- After each screen agent completes, run the build command.
411
+ After ALL screen agents complete, run the build command (same stack table as Step 3 checkpoint).
268
412
 
269
- **Pass:** Log success, continue to next screen.
270
- **Fail:** Log the error as a warning. Ask user: "Screen {name} has build errors. Fix now, skip, or stop?"
271
- - **Fix** → re-run build, surface errors for manual resolution
272
- - **Skip** → mark screen as `partial` in BUILD-LOG, continue
273
- - **Stop** → halt pipeline, save progress
413
+ **Pass:** Log success, continue to Step 5.5.
414
+ **Fail:** Log the errors. Present to user: "Build errors after screens phase: {errors}. The following screens may have issues: {list}. Fix now or continue to extraction review?"
274
415
 
275
- ## Step 5.5: Component extraction checkpoint
416
+ ### Merge screen logs
276
417
 
277
- After all screens complete, audit the codebase for duplicated patterns before review.
418
+ After the compile checkpoint passes, merge all `build/logs/screen-*.md` files into `{PROJECT_PATH}/build/BUILD-LOG.md` (append screen sections in order: 01, 02, 03, etc.).
278
419
 
279
- ### Automated scan
420
+ Log: " ✓ screens complete — {N} screens, build compiles"
280
421
 
281
- Run these checks in the built codebase:
422
+ Update `{PROJECT_PATH}/STATE.md` `## Screen Build Status` table — set completed screens to `complete`.
282
423
 
283
- 1. **Duplicated Tailwind class clusters** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ files. These are extraction candidates.
284
- 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.
285
- 3. **Repeated component patterns** — Look for similar JSX structures across screen files (e.g., similar card layouts, repeated list items, identical button groups).
424
+ ## Step 5.5: Extraction review (lightweight)
286
425
 
287
- ### Surface proposals
426
+ Components were built in Phase 4, so most reuse is already handled. This is a quick sanity check.
288
427
 
289
- Present findings to the user as a numbered list:
428
+ ### Automated scan
290
429
 
291
- ```
292
- ◆ extraction candidates
430
+ Run these checks on the built codebase:
293
431
 
294
- 1. Card pattern in 3 screens (landing, changelog-list, dashboard)
295
- className="rounded-lg border bg-card p-6 shadow-sm"
296
- → extract to <Card> component
432
+ 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.
433
+ 2. **Duplicated patterns** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ screen files. These are patterns the components phase missed.
297
434
 
298
- 2. Hardcoded colors in 2 files
299
- text-[#FF6B35] in hero.tsx, cta.tsx
300
- → use text-brand-accent token
435
+ ### Surface findings
301
436
 
302
- 3. Badge pattern in changelog-list, changelog-post
303
- → extract to <Badge> component
437
+ If issues found, present to user:
304
438
 
305
- ──────────────────────────────
306
439
  ```
440
+ ◆ post-build scan
307
441
 
308
- Use `AskUserQuestion`: "Apply these extractions, skip, or cherry-pick?"
309
- - **Apply all** → make the changes inline (no agent spawn needed, these are mechanical refactors)
310
- - **Cherry-pick** → apply selected ones
311
- - **Skip** → continue to finalize
442
+ Found {N} hardcoded values and {M} duplicated patterns.
443
+ {list if any}
312
444
 
313
- This step is **not auto-applied** — the user decides what to extract.
445
+ ──────────────────────────────
446
+ ```
314
447
 
315
- ### Brand feedback on extraction
448
+ If no issues: "Post-build scan clean — no hardcoded values or duplicated patterns found."
316
449
 
317
- If the extraction scan finds hardcoded values that should be tokens (finding type #2), and those tokens are missing from the brand system:
450
+ Use `AskUserQuestion` only if issues were found: "Fix these, or continue to finalize?"
451
+ - **Fix** → apply changes inline (mechanical refactors, no agent needed)
452
+ - **Continue** → proceed to Step 6
318
453
 
319
- 1. After applying fixes in the project, ask: "These token gaps also exist in the brand. Update brand patterns?"
320
- 2. If yes, spawn a background `gsp-brand-engineer` agent with the missing token definitions to add them to `{BRAND_PATH}/patterns/{brand-name}.yml` and relevant foundation chunks.
454
+ 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."
321
455
 
322
456
  ## Step 6: Finalize
323
457
 
@@ -369,6 +503,13 @@ For `implementation_target: figma`, skip the phased pipeline. Spawn a single `gs
369
503
 
370
504
  For `needs-revision` status, spawn a single `gsp-project-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.
371
505
 
506
+ ### Checkpoint: Compile check
507
+
508
+ After the revision agent completes, run the build command (same stack table as Step 3 checkpoint).
509
+
510
+ **Pass:** Continue to brand feedback check below.
511
+ **Fail:** Log the error. Surface to user: "Revision introduced build errors: {error}. Fix before finalizing?"
512
+
372
513
  ### Brand feedback on revisions
373
514
 
374
515
  After the revision agent completes, check if any QA fixes changed token-level values (colors, typography, spacing, shadows). If so:
@@ -0,0 +1,114 @@
1
+ # Bento Grid Layout Reference
2
+
3
+ Responsive bento grids that tile into clean rectangles across all breakpoints.
4
+
5
+ ## The Problem
6
+
7
+ Bento grids use `row-span` and `col-span` to create mixed-size card layouts. These break at smaller breakpoints — a `row-span-2` card at 2-col creates gaps, and single-column layouts can't span rows at all.
8
+
9
+ ## The Rule
10
+
11
+ **Every breakpoint must produce a complete rectangle with no gaps.** Design the grid for each breakpoint independently, not just the largest one.
12
+
13
+ ## Breakpoint Strategy
14
+
15
+ ```
16
+ All screens grid-cols-2 2-col base. col-span-2 for wide cards. NO row-span (creates gaps at 2-col).
17
+ Desktop (1024+) grid-cols-3/4 Full bento: row-span + col-span. Explicit grid-template-rows.
18
+ ```
19
+
20
+ ## Implementation Pattern
21
+
22
+ ### Grid container
23
+
24
+ ```tsx
25
+ <div className="grid grid-cols-2 lg:grid-cols-4 gap-4
26
+ [grid-auto-rows:280px]
27
+ lg:[grid-template-rows:280px_280px]"
28
+ >
29
+ ```
30
+
31
+ - `grid-cols-2` → 2-col base at all sizes, fixed row height (280px)
32
+ - `lg:grid-cols-4` → desktop: 4-col with explicit 2-row template
33
+ - `[grid-auto-rows:280px]` → consistent row height at all sizes
34
+ - `lg:[grid-template-rows:280px_280px]` → explicit rows for desktop bento
35
+
36
+ ### Card classes by type
37
+
38
+ **Tall card** (spans 2 rows on desktop, regular on mobile/tablet):
39
+ ```tsx
40
+ className="lg:row-span-2"
41
+ ```
42
+ No `sm:row-span-2` — at 2-col, tall cards break the grid.
43
+
44
+ **Wide card** (spans full width at 2-col, 2 of 4 at desktop):
45
+ ```tsx
46
+ className="col-span-2"
47
+ ```
48
+ Full width at 2-col base, fills 2 of 4 columns on desktop.
49
+
50
+ **Regular card** (1×1 at all sizes):
51
+ ```tsx
52
+ // No span classes needed
53
+ ```
54
+
55
+ ### Example: 5-card bento (2 tall + 2 regular + 1 wide)
56
+
57
+ ```
58
+ Desktop (4-col):
59
+ ┌──────┬──────┬──────┬──────┐
60
+ │ tall │ reg │ reg │ tall │
61
+ │ A │ B │ C │ E │
62
+ │ ├──────┴──────┤ │
63
+ │ │ wide D │ │
64
+ └──────┴─────────────┴──────┘
65
+
66
+ Mobile + Tablet (2-col):
67
+ ┌──────┬──────┐
68
+ │ A │ B │
69
+ ├──────┼──────┤
70
+ │ C │ E │
71
+ ├──────┴──────┤
72
+ │ wide D │
73
+ └─────────────┘
74
+ ```
75
+
76
+ ## Card internals
77
+
78
+ Each bento card follows a consistent structure:
79
+
80
+ ```tsx
81
+ {/* GSP outer frame — consistent border, radius, hover across all cards */}
82
+ <div className="relative overflow-hidden rounded-md border border-border
83
+ transition-colors hover:border-primary/40"
84
+ style={{ transitionDuration: "var(--gsp-motion-normal)" }}
85
+ >
86
+ {/* Inner content — styled by the card's own design language */}
87
+ <div className="absolute inset-0" style={{ background: "..." }}>
88
+ {/* Visual hero content */}
89
+ {/* ... */}
90
+
91
+ {/* Info bar — pinned to bottom */}
92
+ <div className="absolute bottom-0 left-0 right-0 p-6"
93
+ style={{ backgroundColor: "...", borderTop: "..." }}
94
+ >
95
+ <p className="text-caption uppercase tracking-widest mb-1">card name</p>
96
+ <p className="text-body-sm">description</p>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ ```
101
+
102
+ **Outer frame is always GSP:** `rounded-md`, `border-border`, `hover:border-primary/40`, GSP motion timing.
103
+
104
+ **Inner content is card-specific:** backgrounds, typography, visual elements, info bar colors all match the card's own design language.
105
+
106
+ **Info bar pattern:** Absolutely positioned at bottom, semi-opaque background matching the card's palette, `borderTop` for separation, preset name in `text-caption uppercase tracking-widest`, description in `text-body-sm`.
107
+
108
+ ## Common mistakes
109
+
110
+ 1. **Using `row-span` at small breakpoints** — creates gaps in the grid. Only use `lg:row-span-2`.
111
+ 2. **Forgetting `overflow-hidden` on the outer frame** — inner content bleeds past rounded corners.
112
+ 3. **Absolute positioning without `relative` parent** — inner content layers need the outer frame to be `relative`.
113
+ 4. **Fixed pixel heights on mobile** — use `min-h-[280px]` only if needed, prefer auto-rows from the grid.
114
+ 5. **Content inside tall cards using absolute bottom positioning** — breaks when the card isn't tall. Use flex layout (`flex flex-col` + `flex-1` for content area) for tall cards.