get-shit-pretty 0.7.0 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +301 -124
  2. package/bin/install.js +1 -1
  3. package/gsp/agents/gsp-accessibility-auditor.md +1 -60
  4. package/gsp/agents/gsp-brand-auditor.md +1 -61
  5. package/gsp/agents/gsp-brand-creative-director.md +10 -0
  6. package/gsp/agents/gsp-brand-engineer.md +1 -122
  7. package/gsp/agents/gsp-brand-researcher.md +11 -0
  8. package/gsp/agents/gsp-brand-strategist.md +1 -65
  9. package/gsp/agents/gsp-project-builder.md +17 -0
  10. package/gsp/agents/gsp-project-critic.md +11 -0
  11. package/gsp/agents/gsp-project-designer.md +11 -0
  12. package/gsp/agents/gsp-project-researcher.md +1 -74
  13. package/gsp/agents/gsp-project-reviewer.md +12 -0
  14. package/gsp/hooks/hooks.json +32 -14
  15. package/gsp/skills/get-shit-pretty/SKILL.md +2 -5
  16. package/gsp/skills/gsp-accessibility/SKILL.md +0 -1
  17. package/gsp/skills/gsp-accessibility-audit/SKILL.md +9 -8
  18. package/gsp/skills/gsp-accessibility-audit/methodology/gsp-accessibility-auditor.md +59 -0
  19. package/gsp/skills/gsp-add-reference/SKILL.md +0 -1
  20. package/gsp/skills/gsp-art/SKILL.md +13 -10
  21. package/gsp/skills/gsp-brand-audit/SKILL.md +4 -2
  22. package/gsp/skills/gsp-brand-audit/methodology/gsp-brand-auditor.md +61 -0
  23. package/gsp/skills/gsp-brand-brief/SKILL.md +129 -0
  24. package/gsp/skills/gsp-brand-guidelines/SKILL.md +13 -11
  25. package/gsp/skills/gsp-brand-guidelines/methodology/gsp-brand-engineer.md +122 -0
  26. package/gsp/skills/gsp-brand-identity/SKILL.md +19 -18
  27. package/gsp/{agents/gsp-creative-director.md → skills/gsp-brand-identity/methodology/gsp-brand-creative-director.md} +0 -9
  28. package/gsp/skills/gsp-brand-refine/SKILL.md +0 -1
  29. package/gsp/skills/gsp-brand-research/SKILL.md +13 -13
  30. package/gsp/{agents/gsp-researcher.md → skills/gsp-brand-research/methodology/gsp-brand-researcher.md} +0 -10
  31. package/gsp/skills/gsp-brand-strategy/SKILL.md +14 -14
  32. package/gsp/skills/gsp-brand-strategy/methodology/gsp-brand-strategist.md +65 -0
  33. package/gsp/skills/gsp-brand-sync/SKILL.md +60 -10
  34. package/gsp/skills/gsp-color/SKILL.md +0 -1
  35. package/gsp/skills/gsp-design-system/SKILL.md +0 -1
  36. package/gsp/skills/gsp-doctor/SKILL.md +0 -1
  37. package/gsp/skills/gsp-help/SKILL.md +10 -7
  38. package/gsp/skills/gsp-icons/SKILL.md +0 -1
  39. package/gsp/skills/gsp-logo/SKILL.md +0 -1
  40. package/gsp/skills/gsp-phase-transition/SKILL.md +0 -3
  41. package/gsp/skills/gsp-pretty/SKILL.md +25 -24
  42. package/gsp/skills/gsp-progress/SKILL.md +0 -1
  43. package/gsp/skills/gsp-project-brief/SKILL.md +51 -22
  44. package/gsp/skills/gsp-project-build/SKILL.md +216 -74
  45. package/gsp/skills/gsp-project-build/bento-grid.md +114 -0
  46. package/gsp/{agents/gsp-builder.md → skills/gsp-project-build/methodology/gsp-project-builder.md} +14 -16
  47. package/gsp/skills/gsp-project-critique/SKILL.md +21 -17
  48. package/gsp/{agents/gsp-critic.md → skills/gsp-project-critique/methodology/gsp-project-critic.md} +0 -11
  49. package/gsp/skills/gsp-project-design/SKILL.md +9 -6
  50. package/gsp/{agents/gsp-designer.md → skills/gsp-project-design/methodology/gsp-project-designer.md} +0 -11
  51. package/gsp/skills/gsp-project-research/SKILL.md +4 -2
  52. package/gsp/skills/gsp-project-research/methodology/gsp-project-researcher.md +73 -0
  53. package/gsp/skills/gsp-project-review/SKILL.md +8 -5
  54. package/gsp/{agents/gsp-reviewer.md → skills/gsp-project-review/methodology/gsp-project-reviewer.md} +0 -12
  55. package/gsp/skills/gsp-scaffold/SKILL.md +0 -1
  56. package/gsp/skills/gsp-start/SKILL.md +59 -210
  57. package/gsp/skills/gsp-style/SKILL.md +1 -2
  58. package/gsp/skills/gsp-style/styles/INDEX.yml +7 -1
  59. package/gsp/skills/gsp-style/styles/academia.md +751 -787
  60. package/gsp/skills/gsp-style/styles/art-deco.md +316 -352
  61. package/gsp/skills/gsp-style/styles/bauhaus.md +189 -225
  62. package/gsp/skills/gsp-style/styles/bold-typography.md +433 -469
  63. package/gsp/skills/gsp-style/styles/botanical.md +141 -177
  64. package/gsp/skills/gsp-style/styles/claymorphism.md +377 -413
  65. package/gsp/skills/gsp-style/styles/cyberpunk.md +419 -455
  66. package/gsp/skills/gsp-style/styles/enterprise.md +224 -260
  67. package/gsp/skills/gsp-style/styles/flat-design.md +119 -155
  68. package/gsp/skills/gsp-style/styles/fluent.md +0 -31
  69. package/gsp/skills/gsp-style/styles/glassmorphism.md +0 -36
  70. package/gsp/skills/gsp-style/styles/humanist-literary.md +0 -28
  71. package/gsp/skills/gsp-style/styles/industrial.md +406 -438
  72. package/gsp/skills/gsp-style/styles/kinetic.md +531 -563
  73. package/gsp/skills/gsp-style/styles/liquid-glass.md +0 -36
  74. package/gsp/skills/gsp-style/styles/luxury.md +402 -438
  75. package/gsp/skills/gsp-style/styles/material.md +555 -591
  76. package/gsp/skills/gsp-style/styles/maximalism.md +875 -911
  77. package/gsp/skills/gsp-style/styles/minimal-dark.md +442 -478
  78. package/gsp/skills/gsp-style/styles/modern-dark.md +390 -426
  79. package/gsp/skills/gsp-style/styles/monochrome.md +472 -504
  80. package/gsp/skills/gsp-style/styles/neubrutalism.md +354 -390
  81. package/gsp/skills/gsp-style/styles/neumorphism.md +195 -231
  82. package/gsp/skills/gsp-style/styles/newsprint.md +529 -565
  83. package/gsp/skills/gsp-style/styles/nothing.md +445 -0
  84. package/gsp/skills/gsp-style/styles/nothing.yml +146 -0
  85. package/gsp/skills/gsp-style/styles/organic.md +177 -213
  86. package/gsp/skills/gsp-style/styles/playful-geometric.md +211 -247
  87. package/gsp/skills/gsp-style/styles/professional.md +503 -539
  88. package/gsp/skills/gsp-style/styles/retro.md +664 -700
  89. package/gsp/skills/gsp-style/styles/saas.md +490 -526
  90. package/gsp/skills/gsp-style/styles/sketch.md +189 -225
  91. package/gsp/skills/gsp-style/styles/swiss-minimalist.md +195 -227
  92. package/gsp/skills/gsp-style/styles/terminal.md +99 -135
  93. package/gsp/skills/gsp-style/styles/vaporwave.md +356 -392
  94. package/gsp/skills/gsp-style/styles/web3.md +337 -373
  95. package/gsp/skills/gsp-typography/SKILL.md +0 -1
  96. package/gsp/skills/gsp-update/SKILL.md +0 -1
  97. package/gsp/skills/gsp-visuals/SKILL.md +0 -1
  98. package/gsp/templates/branding/config.json +3 -2
  99. package/gsp/templates/exports-index.md +0 -7
  100. package/gsp/templates/phases/build.md +13 -4
  101. package/gsp/templates/projects/config.json +3 -2
  102. package/gsp/templates/projects/roadmap.md +0 -7
  103. package/gsp/templates/projects/state.md +0 -4
  104. package/package.json +1 -1
  105. package/scripts/lint-check.sh +1 -1
  106. package/gsp/agents/gsp-ascii-artist.md +0 -66
  107. package/gsp/agents/gsp-brand-syncer.md +0 -126
  108. package/gsp/agents/gsp-campaign-director.md +0 -79
  109. package/gsp/agents/gsp-scoper.md +0 -85
  110. package/gsp/skills/gsp-launch/SKILL.md +0 -97
  111. package/gsp/skills/gsp-start/questioning.md +0 -87
  112. package/gsp/templates/phases/launch.md +0 -55
@@ -1,9 +1,7 @@
1
1
  ---
2
2
  name: gsp-project-build
3
- description: Translate designs to code
3
+ description: Translate designs to code (technical phase — benefits from capable models)
4
4
  user-invocable: true
5
- model: opus
6
- effort: high
7
5
  allowed-tools:
8
6
  - Read
9
7
  - Write
@@ -15,7 +13,7 @@ allowed-tools:
15
13
  - AskUserQuestion
16
14
  ---
17
15
  <context>
18
- 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.
19
17
 
20
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}/`.
21
19
 
@@ -24,7 +22,7 @@ Works with the dual-diamond architecture: reads brand system from `.design/brand
24
22
  Phase 1: SCAFFOLD (skill-level, no agent)
25
23
  └─ /gsp-scaffold → verify build passes
26
24
 
27
- Phase 2: FOUNDATIONS (agent: gsp-builder mode:foundations)
25
+ Phase 2: FOUNDATIONS (agent: gsp-project-builder mode:foundations)
28
26
  ├─ Context: {brand-name}.yml + token-mapping.md, target-adaptations.md, STACK.md, CONVENTIONS.md
29
27
  ├─ Writes: token config, global CSS, layout, shared utils
30
28
  └─ CHECKPOINT: build must compile
@@ -32,11 +30,23 @@ Phase 2: FOUNDATIONS (agent: gsp-builder mode:foundations)
32
30
  Phase 3: FOUNDATION REVIEW (interactive)
33
31
  └─ Present summary → user confirms
34
32
 
35
- Phase 4: SCREENS (agent: gsp-builder mode:screen, one per screen)
36
- ├─ Context per screen: its design chunk + referenced components only
37
- ├─ Agent reads foundations from codebase (not from context)
38
- ├─ CHECKPOINT per screen: compile check
39
- └─ 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
40
50
  ```
41
51
  </context>
42
52
 
@@ -45,7 +55,7 @@ Implement designs as production-ready code in the codebase via phased pipeline w
45
55
 
46
56
  **Input:** Design chunks + research chunks + brief chunks + brand system chunks
47
57
  **Output:** Code in the codebase + `{project}/build/BUILD-LOG.md` + `{project}/build/SCAFFOLD-LOG.md`
48
- **Agent:** `gsp-builder` (spawned per phase with execution mode)
58
+ **Agent:** `gsp-project-builder` (spawned per phase with execution mode)
49
59
  </objective>
50
60
 
51
61
  <execution_context>
@@ -113,19 +123,23 @@ After scaffold completes, verify `{PROJECT_PATH}/build/SCAFFOLD-LOG.md` exists.
113
123
 
114
124
  **Gate:** If scaffold reports build failure, stop and surface the error. Do not proceed to foundations with a broken build.
115
125
 
116
- ## Step 2.5: Load build references
126
+ ## Step 2.5: Load agent methodology
127
+
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).
129
+
130
+ ## Step 2.6: Load build references
117
131
 
118
132
  Read these reference files:
119
133
  - `${CLAUDE_SKILL_DIR}/visual-effects.md`
120
134
  - `${CLAUDE_SKILL_DIR}/../gsp-project-design/block-patterns.md`
121
135
 
122
- Hold their content for inlining into agent prompts in Steps 3 and 5.
136
+ Hold their content for inlining into agent prompts in Steps 3, 4.5, 5, 7, and 8.
123
137
 
124
- > **Note:** Anti-patterns are distilled into the `gsp-builder` agent prompt. Full ref remains on disk for edge-case agent lookup.
138
+ > **Note:** Anti-patterns are distilled into the `gsp-project-builder` agent prompt. Full ref remains on disk for edge-case agent lookup.
125
139
 
126
140
  ## Step 3: Phase 2 — FOUNDATIONS
127
141
 
128
- Spawn `gsp-builder` agent with **execution_mode: foundations**.
142
+ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
129
143
 
130
144
  ### Context for foundations agent (lean — no screen chunks):
131
145
 
@@ -139,7 +153,8 @@ Spawn `gsp-builder` agent with **execution_mode: foundations**.
139
153
  | `.design/system/COMPONENTS.md` | Existing components (if exists) |
140
154
  | `{PROJECT_PATH}/config.json` | Tech stack, target |
141
155
  | Build output template (from execution_context) | Build log structure |
142
- | Visual effects, block patterns refs (loaded in Step 2.5) | Design patterns + CSS recipes |
156
+ | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
157
+ | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
143
158
 
144
159
  ### Agent instructions:
145
160
 
@@ -156,7 +171,7 @@ Spawn `gsp-builder` agent with **execution_mode: foundations**.
156
171
  > 7. Write code directly to the codebase, not to `.design/`
157
172
  > 8. Leave changes unstaged
158
173
  >
159
- > After completing foundations, write `{PROJECT_PATH}/build/BUILD-LOG.md` with what was done (foundations section only).
174
+ > 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.
160
175
 
161
176
  ### Checkpoint: Compile check
162
177
 
@@ -204,8 +219,8 @@ Present a summary of what the foundations phase produced:
204
219
  ──────────────────────────────
205
220
  ```
206
221
 
207
- Use `AskUserQuestion`: "Foundations look good? Continue building screens, or review first?"
208
- - **Continue** → proceed to Step 5
222
+ Use `AskUserQuestion`: "Foundations look good? Continue building components, or review first?"
223
+ - **Continue** → proceed to Step 4.5
209
224
  - **Review first** → pause, let user inspect, resume when ready
210
225
  - **Adjust** → user requests changes (colors, typography, spacing, etc.)
211
226
 
@@ -220,100 +235,220 @@ If the user requests adjustments during foundation review:
220
235
  - Pass: `{BRAND_PATH}/patterns/{brand-name}.yml` and relevant identity chunks
221
236
  - Agent updates the `.yml` preset, foundation chunks, and STYLE.md if applicable
222
237
  - Agent writes to `{BRAND_PATH}/` — the brand source of truth
223
- - Run in background (`run_in_background: true`) so the build pipeline continues
224
- 4. Continue to Step 5 without waiting for brand sync
238
+ - 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
239
+ 4. Wait for brand sync to complete, then continue to Step 4.5
240
+
241
+ ## Step 4.5: Phase 4 — COMPONENTS
242
+
243
+ ### Build component manifest
244
+
245
+ Read ALL design chunks from `{PROJECT_PATH}/design/` — every `screen-{NN}-{name}.md`. Also read:
246
+ - `{PROJECT_PATH}/brief/scope.md` (feature map)
247
+ - `{PROJECT_PATH}/brief/target-adaptations.md` (component adaptations)
248
+ - `{BRAND_PATH}/patterns/components/token-mapping.md` (if exists)
249
+
250
+ Extract every component referenced across all screens. Deduplicate. Build a manifest:
251
+
252
+ ```
253
+ COMPONENT_MANIFEST = [
254
+ { name: "Button", source: "shadcn", classification: "library-default", screens: [01, 03, 05] },
255
+ { name: "Card", source: "shadcn", classification: "library-customize", screens: [01, 02, 04], overrides: "custom radius + shadow from STYLE.md" },
256
+ { name: "PricingTier", source: "custom", classification: "custom", screens: [03] },
257
+ ...
258
+ ]
259
+ ```
260
+
261
+ ### Classify each component
262
+
263
+ | Category | Criteria | Action |
264
+ |----------|----------|--------|
265
+ | `library-default` | Exists in target library, no brand overrides needed | Install as-is |
266
+ | `library-customize` | Exists in target library, STYLE.md or token-mapping requires overrides | Install then customize |
267
+ | `custom` | No library match, or design requires bespoke component | Build from scratch |
268
+ | `existing` | Already in codebase (from scaffold or prior project) | Skip — already available |
269
+
270
+ ### Partition into agent groups
271
+
272
+ Group components to minimize conflicts:
273
+ 1. No two agents install the same library component
274
+ 2. Group related variants together (Card + CardHeader + CardContent + CardFooter → same agent)
275
+ 3. Balance work across agents (aim for 3-6 components per agent)
276
+ 4. If total components ≤ 5, use a single agent (no need to parallelize)
225
277
 
226
- ## Step 5: Phase 4 — SCREENS
278
+ ### Resume check
227
279
 
228
- Build screens sequentially. For each screen in `SCREENS`:
280
+ Check for existing `build/status/component-*.json` files. For each partition with a `"status": "complete"` file, skip that agent — log: "Skipping {name} — already complete."
281
+
282
+ ### Progress log
283
+
284
+ Before spawning, log the manifest:
285
+
286
+ ```
287
+ ◆ components phase
288
+
289
+ Spawning {N} agents in parallel:
290
+ {for each partition}: [{model}] {partition-name} — {component-count} components
291
+ ```
292
+
293
+ ### Spawn component agents in parallel
294
+
295
+ For each partition, spawn `gsp-project-builder` with **execution_mode: component**.
296
+
297
+ 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.
298
+
299
+ Context per component agent:
300
+
301
+ | File | Purpose |
302
+ |------|---------|
303
+ | Component partition (list + classifications + overrides) | What to build |
304
+ | `{BRAND_PATH}/patterns/STYLE.md` (or fallback `{brand-name}.md`) | Design constraints, effects vocabulary |
305
+ | `{BRAND_PATH}/patterns/{brand-name}.yml` | Token values |
306
+ | `{BRAND_PATH}/patterns/components/token-mapping.md` | Component-to-token mapping |
307
+ | Design chunk excerpts (only sections referencing these components) | Usage context — how screens use them |
308
+ | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations for target |
309
+ | `{PROJECT_PATH}/config.json` | Tech stack, implementation target |
310
+ | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
311
+ | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
312
+
313
+ Agent instructions template:
314
+
315
+ > execution_mode: component
316
+ > implementation_target: {target}
317
+ > components: [{partition list with classifications}]
318
+ >
319
+ > Install, customize, or create the assigned components.
320
+ > 1. For library-default: install via CLI, verify import works
321
+ > 2. For library-customize: install via CLI, then apply brand overrides (STYLE.md constraints, token values)
322
+ > 3. For custom: create from scratch following brand patterns and STYLE.md
323
+ > 4. Read foundations from codebase (tokens, utilities already exist)
324
+ > 5. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
325
+ > 6. Do NOT build screens or page content
326
+ > 7. Write code directly to the codebase
327
+ > 8. Leave changes unstaged
328
+ >
329
+ > 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.
330
+ > Also write `{PROJECT_PATH}/build/status/component-{partition-name}.json` with `{"status": "complete", "components": [{list}], "timestamp": "{ISO}"}`.
331
+
332
+ ### Checkpoint: Compile check
333
+
334
+ After ALL component agents complete, run the build command (same stack table as Step 3 checkpoint).
335
+
336
+ **Pass:** Continue to Step 5.
337
+ **Fail:** Log the error. Surface to user: "Component build failed: {error}. Fix now or skip to screens?"
338
+
339
+ ### Merge component logs
340
+
341
+ 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).
342
+
343
+ Log: " ✓ components complete — {N} agents, build compiles"
344
+
345
+ Update `{PROJECT_PATH}/STATE.md` — set completed component partitions in build status.
346
+
347
+ ## Step 5: Phase 5 — SCREENS (parallel)
348
+
349
+ Build all screens in parallel. Components exist in the codebase from Phase 4.
229
350
 
230
351
  ### Context per screen (lean — only this screen's data):
231
352
 
232
353
  | File | Purpose |
233
354
  |------|---------|
234
355
  | `{PROJECT_PATH}/design/screen-{NN}-{name}.md` | This screen's design chunk |
235
- | Referenced component chunks from `{BRAND_PATH}/patterns/components/` | Only components referenced in this screen's chunk |
356
+ | Component file paths from BUILD-LOG.md components section | Where to import from (paths only agent reads codebase) |
236
357
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations |
237
- | `{PROJECT_PATH}/research/reference-specs.md` (if exists) | Technical specs |
238
- | `{PROJECT_PATH}/critique/prioritized-fixes.md` (if exists) | Critique fixes relevant to this screen |
358
+ | `{PROJECT_PATH}/research/reference-specs.md` (if exists) | Technical specs — include only sections relevant to this screen |
359
+ | `{PROJECT_PATH}/critique/prioritized-fixes.md` (if exists) | Critique fixes include only fixes tagged to this screen |
239
360
  | Build output template (from execution_context) | Build log structure |
240
- | Visual effects, block patterns refs (loaded in Step 2.5) | Design patterns + CSS recipes |
361
+ | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
362
+ | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
363
+
364
+ **Does NOT receive:** other screen chunks, brand `.yml` (already in codebase), full brand system, research monoliths, component source code (agent reads from codebase).
365
+
366
+ ### Resume check
367
+
368
+ 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."
369
+
370
+ ### Progress log
371
+
372
+ Before spawning, log:
241
373
 
242
- **Does NOT receive:** other screen chunks, brand `.yml` (already integrated into codebase), full brand system, research monoliths.
374
+ ```
375
+ ◆ screens phase
376
+
377
+ Spawning {N} agents in parallel:
378
+ {for each screen}: [{model}] screen-{NN}-{name}
379
+ ```
380
+
381
+ ### Spawn screen agents in parallel
382
+
383
+ For each screen in `SCREENS`, spawn `gsp-project-builder` with **execution_mode: screen**.
243
384
 
244
- ### Agent instructions per screen:
385
+ Assign models in round-robin: first screen on user's model, second on `sonnet`, third on user's model, etc.
386
+
387
+ Agent instructions per screen:
245
388
 
246
389
  > execution_mode: screen
247
390
  > screen: {name} ({NN})
248
391
  >
249
- > Build the {name} screen. Foundations are already in the codebase — read them, don't recreate them.
392
+ > Build the {name} screen. Foundations and components are already in the codebase.
250
393
  >
251
- > 1. Read the existing layout, tokens, and utilities from the codebase
394
+ > 1. Read the existing layout, tokens, utilities, and components from the codebase
252
395
  > 2. Create the route page and screen-specific components
253
- > 3. Wire imports to existing foundation components
396
+ > 3. Wire imports to existing foundation and component files
254
397
  > 4. Do NOT modify foundation files (global CSS, layout, tokens, theme provider)
255
- > 5. Write code directly to the codebase, not to `.design/`
256
- > 6. Leave changes unstaged
257
- > 7. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes rather than re-reading the brand style document
398
+ > 5. Do NOT modify shared component files (they were built in the components phase)
399
+ > 6. Write code directly to the codebase, not to `.design/`
400
+ > 7. Leave changes unstaged
401
+ > 8. The brand's visual effects were implemented as utilities during foundations — use those utilities/classes
258
402
  >
259
- > After completing this screen, append to `{PROJECT_PATH}/build/BUILD-LOG.md` — add this screen's files and status to the existing log.
403
+ > 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.
404
+ > Also write `{PROJECT_PATH}/build/status/screen-{NN}-{name}.json` with `{"status": "complete", "screen": "{name}", "files": [{list}], "timestamp": "{ISO}"}`.
260
405
 
261
- ### Checkpoint per screen: Compile check
406
+ ### Checkpoint: Compile check
262
407
 
263
- After each screen agent completes, run the build command.
408
+ After ALL screen agents complete, run the build command (same stack table as Step 3 checkpoint).
264
409
 
265
- **Pass:** Log success, continue to next screen.
266
- **Fail:** Log the error as a warning. Ask user: "Screen {name} has build errors. Fix now, skip, or stop?"
267
- - **Fix** → re-run build, surface errors for manual resolution
268
- - **Skip** → mark screen as `partial` in BUILD-LOG, continue
269
- - **Stop** → halt pipeline, save progress
410
+ **Pass:** Log success, continue to Step 5.5.
411
+ **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?"
270
412
 
271
- ## Step 5.5: Component extraction checkpoint
413
+ ### Merge screen logs
272
414
 
273
- After all screens complete, audit the codebase for duplicated patterns before review.
415
+ 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.).
274
416
 
275
- ### Automated scan
417
+ Log: " ✓ screens complete — {N} screens, build compiles"
276
418
 
277
- Run these checks in the built codebase:
419
+ Update `{PROJECT_PATH}/STATE.md` `## Screen Build Status` table — set completed screens to `complete`.
278
420
 
279
- 1. **Duplicated Tailwind class clusters** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ files. These are extraction candidates.
280
- 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.
281
- 3. **Repeated component patterns** — Look for similar JSX structures across screen files (e.g., similar card layouts, repeated list items, identical button groups).
421
+ ## Step 5.5: Extraction review (lightweight)
282
422
 
283
- ### Surface proposals
423
+ Components were built in Phase 4, so most reuse is already handled. This is a quick sanity check.
284
424
 
285
- Present findings to the user as a numbered list:
425
+ ### Automated scan
286
426
 
287
- ```
288
- ◆ extraction candidates
427
+ Run these checks on the built codebase:
289
428
 
290
- 1. Card pattern in 3 screens (landing, changelog-list, dashboard)
291
- className="rounded-lg border bg-card p-6 shadow-sm"
292
- → extract to <Card> component
429
+ 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.
430
+ 2. **Duplicated patterns** — Use Grep to find identical `className` strings (>3 classes) appearing in 2+ screen files. These are patterns the components phase missed.
293
431
 
294
- 2. Hardcoded colors in 2 files
295
- text-[#FF6B35] in hero.tsx, cta.tsx
296
- → use text-brand-accent token
432
+ ### Surface findings
297
433
 
298
- 3. Badge pattern in changelog-list, changelog-post
299
- → extract to <Badge> component
434
+ If issues found, present to user:
300
435
 
301
- ──────────────────────────────
302
436
  ```
437
+ ◆ post-build scan
303
438
 
304
- Use `AskUserQuestion`: "Apply these extractions, skip, or cherry-pick?"
305
- - **Apply all** → make the changes inline (no agent spawn needed, these are mechanical refactors)
306
- - **Cherry-pick** → apply selected ones
307
- - **Skip** → continue to finalize
439
+ Found {N} hardcoded values and {M} duplicated patterns.
440
+ {list if any}
308
441
 
309
- This step is **not auto-applied** — the user decides what to extract.
442
+ ──────────────────────────────
443
+ ```
310
444
 
311
- ### Brand feedback on extraction
445
+ If no issues: "Post-build scan clean — no hardcoded values or duplicated patterns found."
312
446
 
313
- If the extraction scan finds hardcoded values that should be tokens (finding type #2), and those tokens are missing from the brand system:
447
+ Use `AskUserQuestion` only if issues were found: "Fix these, or continue to finalize?"
448
+ - **Fix** → apply changes inline (mechanical refactors, no agent needed)
449
+ - **Continue** → proceed to Step 6
314
450
 
315
- 1. After applying fixes in the project, ask: "These token gaps also exist in the brand. Update brand patterns?"
316
- 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.
451
+ 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."
317
452
 
318
453
  ## Step 6: Finalize
319
454
 
@@ -359,11 +494,18 @@ Invoke `/gsp-phase-transition` with phase `build` and output directory `{PROJECT
359
494
 
360
495
  ## Step 7: Figma fallback
361
496
 
362
- For `implementation_target: figma`, skip the phased pipeline. Spawn a single `gsp-builder` agent with execution_mode: `full` and spec-only flag. Builder writes `build/CODE.md` + `build/components/` instead of editing codebase. Then continue from Step 6 (finalize).
497
+ For `implementation_target: figma`, skip the phased pipeline. Spawn a single `gsp-project-builder` agent with execution_mode: `full` and spec-only flag. Builder writes `build/CODE.md` + `build/components/` instead of editing codebase. Then continue from Step 6 (finalize).
363
498
 
364
499
  ## Step 8: Revision mode
365
500
 
366
- 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.
501
+ 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.
502
+
503
+ ### Checkpoint: Compile check
504
+
505
+ After the revision agent completes, run the build command (same stack table as Step 3 checkpoint).
506
+
507
+ **Pass:** Continue to brand feedback check below.
508
+ **Fail:** Log the error. Surface to user: "Revision introduced build errors: {error}. Fix before finalizing?"
367
509
 
368
510
  ### Brand feedback on revisions
369
511
 
@@ -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.
@@ -1,19 +1,3 @@
1
- ---
2
- name: gsp-builder
3
- description: Implements designs in the codebase as production-ready frontend code. Spawned by /gsp-project-build.
4
- tools: Read, Write, Edit, Bash, Grep, Glob
5
- maxTurns: 100
6
- permissionMode: acceptEdits
7
- memory: project
8
- hooks:
9
- PostToolUse:
10
- - matcher: "Edit|Write"
11
- hooks:
12
- - type: command
13
- command: "${CLAUDE_PROJECT_ROOT}/scripts/lint-check.sh"
14
- color: cyan
15
- ---
16
-
17
1
  <role>
18
2
  You are a GSP builder spawned by `/gsp-project-build`.
19
3
 
@@ -47,6 +31,20 @@ Build a single screen. You receive only that screen's design chunk and its refer
47
31
  - Build the screen's route page and its screen-specific components
48
32
  - Wire imports to existing foundation components
49
33
 
34
+ ### `component`
35
+ Install, customize, or create assigned components ONLY. Stop after components.
36
+ - You receive a component partition: a list of components with their classification
37
+ - For **library default**: install via CLI (e.g. `npx shadcn@latest add {name}`) and verify it works
38
+ - For **library + customize**: install via CLI, then apply brand overrides from STYLE.md (radius, shadow, color tokens)
39
+ - For **custom**: create component from scratch following brand patterns, STYLE.md constraints, and token-mapping.md
40
+ - Read foundations from the codebase (tokens, layout, utilities already exist from foundations phase)
41
+ - Follow `implementation_target` rules (shadcn vs rn-reusables vs existing vs code)
42
+ - **Do NOT modify foundation files** (global CSS, layout, tokens, theme provider)
43
+ - **Do NOT build screens or page content**
44
+ - **Do NOT create route pages**
45
+ - Write components to the project's component directory following codebase conventions
46
+ - Leave changes unstaged
47
+
50
48
  ### `full`
51
49
  Legacy mode — build everything in one pass. Used as backward-compatible default.
52
50