get-shit-pretty 0.7.3 → 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.
@@ -17,7 +17,7 @@
17
17
  "hooks": [
18
18
  {
19
19
  "type": "prompt",
20
- "prompt": "The gsp-project-designer agent just finished. Verify: (1) at least one design/screen-*.md chunk was written, (2) design/INDEX.md was written, (3) design/preview.html was written. Report any missing deliverables to the user."
20
+ "prompt": "The gsp-project-designer agent just finished. Verify: (1) at least one design/screen-*.md chunk was written, (2) design/INDEX.md was written. Report any missing deliverables to the user."
21
21
  }
22
22
  ]
23
23
  },
@@ -132,6 +132,7 @@ Read `${CLAUDE_SKILL_DIR}/methodology/gsp-project-builder.md`. Include the full
132
132
  Read these reference files:
133
133
  - `${CLAUDE_SKILL_DIR}/visual-effects.md`
134
134
  - `${CLAUDE_SKILL_DIR}/../gsp-project-design/block-patterns.md`
135
+ - `${CLAUDE_SKILL_DIR}/../gsp-brand-guidelines/token-mapping.md`
135
136
 
136
137
  Hold their content for inlining into agent prompts in Steps 3, 4.5, 5, 7, and 8.
137
138
 
@@ -145,7 +146,7 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
145
146
 
146
147
  | File | Purpose |
147
148
  |------|---------|
148
- | `{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. |
149
150
  | `{BRAND_PATH}/patterns/STYLE.md` | Design law — philosophy, patterns, constraints, effects, bold bets, implementation hints (if exists; fall back to `{brand-name}.md`) |
150
151
  | `{PROJECT_PATH}/brief/target-adaptations.md` | Component adaptations for target |
151
152
  | `.design/system/STACK.md` | Stack state |
@@ -153,6 +154,7 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
153
154
  | `.design/system/COMPONENTS.md` | Existing components (if exists) |
154
155
  | `{PROJECT_PATH}/config.json` | Tech stack, target |
155
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. |
156
158
  | Visual effects, block patterns refs (loaded in Step 2.6) | Design patterns + CSS recipes |
157
159
  | Agent methodology (loaded in Step 2.5) | Builder role, process, quality standards |
158
160
 
@@ -162,14 +164,15 @@ Spawn `gsp-project-builder` agent with **execution_mode: foundations**.
162
164
  >
163
165
  > Build token integration, global styles, and layout primitives ONLY.
164
166
  >
165
- > 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.
166
168
  > 2. Create global CSS (resets, base styles, font imports, dark mode setup)
167
169
  > 3. Create root layout with nav shell and footer shell (structure only — no page content)
168
170
  > 4. Create shared utilities (cn helper, theme provider if needed)
169
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).
170
- > 6. Do NOT build individual screens or page content
171
- > 7. Write code directly to the codebase, not to `.design/`
172
- > 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
173
176
  >
174
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.
175
178
 
@@ -17,7 +17,7 @@ You are spawned with an `execution_mode` parameter. Follow the mode strictly:
17
17
 
18
18
  ### `foundations`
19
19
  Build token integration, global styles, and layout primitives ONLY. Stop after foundations.
20
- - Design tokens → CSS variables / Tailwind config. Write only **global tokens**: brand colors, font families, spacing scale, base radius, base shadows. Do NOT write screen-specific tokens yet.
20
+ - Design tokens → CSS variables / Tailwind config. Use the **token-mapping.md** reference to map `.yml` values to the correct format per target. For shadcn: convert hex to HSL space-separated channels (e.g., `#1E40AF` → `221 72% 40%`), write ALL variables in `:root` and `.dark` scopes (background, foreground, card, popover, primary, secondary, muted, accent, destructive, border, input, ring, sidebar-*, chart-1 through chart-5, --radius). Write only **global tokens**: brand colors, font families, spacing scale, base radius, base shadows. Do NOT write screen-specific tokens yet.
21
21
  - Global CSS (resets, base styles, dark mode)
22
22
  - Layout components (root layout, nav shell, footer shell)
23
23
  - Shared utilities (cn helper, theme provider)
@@ -106,6 +106,36 @@ Check code against these before marking a screen complete — **but STYLE.md tak
106
106
  - **Components:** customize shadcn radii/colors/shadows, skeleton loaders not spinners, semantic HTML
107
107
  - **Code:** no inline styles mixed with utilities, relative units, clean z-index scale, alt text, verify imports exist
108
108
 
109
+ ## shadcn/ui Rules (when target is shadcn)
110
+
111
+ These rules are always enforced for shadcn targets. They reflect the official shadcn/ui composition patterns:
112
+
113
+ **Styling:**
114
+ - Use semantic color tokens (`bg-primary`, `text-muted-foreground`) — never raw values like `bg-blue-500`
115
+ - No manual `dark:` color overrides — use semantic tokens that auto-adapt
116
+ - Use `gap-*` with flex/grid — never `space-x-*` or `space-y-*`
117
+ - Use `size-*` when width and height are equal — `size-10` not `w-10 h-10`
118
+ - Use `cn()` for conditional classes — never manual template literal ternaries
119
+ - No manual `z-index` on overlay components (Dialog, Sheet, Popover handle their own stacking)
120
+ - Use built-in variants before custom styles (`variant="outline"`, `size="sm"`)
121
+
122
+ **Composition:**
123
+ - Items always inside their Group (`SelectItem` → `SelectGroup`, `DropdownMenuItem` → `DropdownMenuGroup`)
124
+ - Dialog, Sheet, and Drawer always need a Title (use `className="sr-only"` if visually hidden)
125
+ - Use full Card composition (`CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`)
126
+ - `TabsTrigger` must be inside `TabsList`
127
+ - `Avatar` always needs `AvatarFallback`
128
+ - Use `Alert` for callouts, `Badge` for status, `Skeleton` for loading, `Separator` for dividers, `sonner` for toast
129
+
130
+ **Icons:**
131
+ - Icons in `Button` use `data-icon` attribute (`data-icon="inline-start"` or `data-icon="inline-end"`)
132
+ - No sizing classes on icons inside components — components handle icon sizing via CSS
133
+
134
+ **CLI awareness:**
135
+ - Install components via `npx shadcn@latest add {name}` — never copy/paste from GitHub
136
+ - Use `npx shadcn@latest search` to find components before building custom ones
137
+ - After installing components from registries, verify imports match the project's alias config
138
+
109
139
  Full reference: `references/anti-patterns.md` (available via Read for the complete list with fixes).
110
140
 
111
141
  ## Visual Quality Checklist
@@ -146,7 +146,6 @@ Pass in the agent prompt:
146
146
  The agent writes chunks directly:
147
147
  - `design/screen-{NN}-{name}.md` (one per screen)
148
148
  - `design/shared/` (personas, IA, navigation, micro-interactions, responsive, component-plan)
149
- - `design/preview.html` (self-contained wireframe preview)
150
149
  - `design/INDEX.md`
151
150
  - Updates `{PROJECT_PATH}/exports/INDEX.md` (design section)
152
151
 
@@ -13,21 +13,40 @@ When an **Existing Components** inventory is provided (for `shadcn`, `rn-reusabl
13
13
  <methodology>
14
14
  ## Design Process
15
15
 
16
+ ### Step 0: Internalize brand DNA (BEFORE designing anything)
17
+
18
+ When `STYLE.md` is provided, read it first and extract a working checklist before designing any screen. STYLE.md is your design law — not a reference to consult later, but the lens through which every decision is made.
19
+
20
+ Extract and hold in working memory:
21
+ - **Constraints** → hard boundaries (never/always lists). Violating these is a Critical error.
22
+ - **Patterns** → component composition rules (how to build cards, buttons, inputs, etc.)
23
+ - **Effects vocabulary** → the ONLY interaction techniques you may use. Anything not listed is off-limits.
24
+ - **Bold bets** → brand-specific techniques you MUST actively implement. These are what prevent generic output. If the brand has "purple atmospheric glow" as a bold bet, every relevant screen must show it.
25
+ - **Intensity dials** → calibrate your creativity (variance drives layout, motion drives animation, density drives spacing)
26
+
27
+ Every screen you design must reference specific techniques by name (e.g., "lift-shadow on feature cards", "press-down on CTA", "purple glow behind glass hero") — never generic terms like "use brand styling."
28
+
29
+ ### Steps 1-8: Design with brand DNA active
30
+
16
31
  1. **Define personas** — From BRIEF.md audience, create primary persona with goals and pain points
17
32
  2. **Map information architecture** — Hierarchy, grouping, navigation structure
18
33
  3. **Choose navigation pattern** — Tab bar, sidebar, or custom — justified by use case
19
- 4. **Design 8 core screens** — Each with wireframe description, component usage, interactions, and all states
34
+ 4. **Design core screens** — Each with wireframe description, component usage, interactions, and all states. Apply brand patterns and effects in every screen — not as a separate pass, but as the default visual language.
20
35
  5. **Specify accessibility** — WCAG compliance, VoiceOver order, Dynamic Type behavior
21
- 6. **Define micro-interactions** — Meaningful animations that communicate state changes
36
+ 6. **Define micro-interactions** — Only use techniques from the effects vocabulary. Reference them by name.
22
37
  7. **Specify image resources** — For each screen section that needs imagery, define: type (photo/illustration/icon composition/CSS-only), description and search terms for sourcing, treatment (dark overlay, blur, crop, rounded). Match the brand's imagery style from `imagery-style.md` — if the brand uses photography, specify photo subjects and mood; if illustration, specify style and subject; if CSS-only, specify the pattern or gradient approach.
23
38
  8. **Build component plan** — When existing components inventory is provided, annotate which components to reuse, refactor, or create new
24
- 9. **Apply brand visual DNA** — When `STYLE.md` is provided, use its philosophy, patterns, constraints, effects vocabulary, and bold bets to specify visual treatments per screen. STYLE.md is your design law:
25
- - **Patterns** component composition rules (how to build cards, buttons, inputs, etc.)
26
- - **Constraints** → hard boundaries (never/always lists — do not violate these)
27
- - **Effects** interaction vocabulary (only use techniques from the allowed list)
28
- - **Bold Bets** brand-specific techniques to actively implement (prevents generic output)
29
- - **Intensity dials** calibrate your creativity (variance drives layout, motion drives animation, density drives spacing)
30
- In screen chunks, reference specific techniques by name (e.g., "lift-shadow on feature cards", "press-down on CTA") not generic terms like "use brand styling"
39
+
40
+ ### Step 9: Brand fidelity self-check
41
+
42
+ Before writing INDEX.md, verify your output against STYLE.md:
43
+ - [ ] Every constraint respected (check the never/always lists)
44
+ - [ ] Every bold bet appears in at least one screen (list which screen for each)
45
+ - [ ] Effects vocabulary is the only source of interaction techniques used
46
+ - [ ] Intensity dials match — variance, motion, density are calibrated correctly
47
+ - [ ] No generic visual treatments — every surface, shadow, glow, gradient references a named brand technique
48
+
49
+ If any bold bet is missing from all screens, go back and add it. Bold bets are the brand's differentiation — skipping them produces generic output.
31
50
 
32
51
  ## Style Feedback Detection
33
52
 
@@ -111,18 +130,6 @@ Write to `design/shared/` (~50-100 lines each):
111
130
 
112
131
  Shared chunks link to related shared chunks and relevant screen chunks.
113
132
 
114
- ### `design/preview.html`
115
-
116
- After writing all screen chunks, generate a self-contained HTML preview file:
117
- - Single HTML file with embedded CSS (no external dependencies)
118
- - One section per screen showing a wireframe-level layout visualization
119
- - Use simple boxes, text labels, and semantic structure to represent each screen's layout
120
- - Include navigation between screens
121
- - Use the brand's color tokens (from the brand `.yml`) for accents if available, otherwise use neutral grays
122
- - Responsive — preview itself adapts to viewport width
123
- - Add a table of contents sidebar listing all screens
124
- - Keep it minimal — this is a wireframe preview, not a polished mockup
125
-
126
133
  ### `INDEX.md`
127
134
 
128
135
  After writing all chunks, write `INDEX.md` in the design directory:
@@ -184,6 +184,21 @@ Clear any build cache first (`rm -rf .next` for Next.js), then run the build com
184
184
  - After fix attempt, clear cache and re-run build once
185
185
  - **Second failure:** Log the error and stop. Do not loop.
186
186
 
187
+ ## Step 5.5: Capture project context (shadcn targets)
188
+
189
+ If `implementation_target` is `shadcn`, run `npx shadcn@latest info --json` and capture the output. This provides:
190
+ - `aliases` — the actual alias prefix for imports (`@/`, `~/`)
191
+ - `tailwindVersion` — `"v4"` (uses `@theme inline`) vs `"v3"` (uses `tailwind.config.js`)
192
+ - `tailwindCssFile` — the global CSS file where custom properties go
193
+ - `style` — component visual treatment (nova, vega, etc.)
194
+ - `base` — primitive library (radix or base)
195
+ - `iconLibrary` — determines icon imports (lucide-react, @tabler/icons-react, etc.)
196
+ - `resolvedPaths` — exact file-system destinations for components, utils, hooks
197
+ - `framework` — routing and file conventions (Next.js App Router, Vite SPA, etc.)
198
+ - `isRSC` — whether "use client" directives are needed
199
+
200
+ Include this JSON in the scaffold log under a `## Project Context` section so the foundations agent can reference it.
201
+
187
202
  ## Step 6: Write scaffold log
188
203
 
189
204
  Write `{PROJECT_PATH}/build/SCAFFOLD-LOG.md`:
@@ -225,6 +240,10 @@ Write `{PROJECT_PATH}/build/SCAFFOLD-LOG.md`:
225
240
  - **Result:** {pass / fail}
226
241
  - **Output:** {first/last lines if relevant}
227
242
 
243
+ ## Project Context
244
+
245
+ {If shadcn target: JSON output from `npx shadcn@latest info --json`. Otherwise: "N/A — non-shadcn target"}
246
+
228
247
  ## Issues
229
248
 
230
249
  {Any problems encountered and how they were resolved, or "None"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.3",
2
+ "version": "0.7.4",
3
3
  "project_type": "brand",
4
4
  "brand": {
5
5
  "name": "",
@@ -28,14 +28,6 @@ Naming: `screen-{NN}-{kebab-case-name}.md` (e.g., `screen-01-home.md`, `screen-0
28
28
  | `shared/responsive.md` | Mobile, tablet, desktop breakpoint adaptations |
29
29
  | `shared/component-plan.md` | Reuse / Refactor / New (shared) / New (local) — omit when target is `figma` |
30
30
 
31
- ### Wireframe Preview (`design/preview.html`)
32
-
33
- Self-contained HTML wireframe preview:
34
- - One section per screen with box-model layout visualization
35
- - Navigation between screens via sidebar table of contents
36
- - Brand color accents from the brand `.yml` preset (or neutral grays)
37
- - Responsive, no external dependencies
38
-
39
31
  ## Content Reference
40
32
 
41
33
  Each chunk follows the standard chunk format. Below is the structural reference for what each chunk should contain:
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.3",
2
+ "version": "0.7.4",
3
3
  "project_type": "design",
4
4
  "project": {
5
5
  "name": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-shit-pretty",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Design engineering system for AI coding agents. Brand identity + design projects, from strategy to code.",
5
5
  "bin": {
6
6
  "get-shit-pretty": "bin/install.js"