get-shit-pretty 0.6.2 → 0.7.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.
Files changed (161) hide show
  1. package/README.md +7 -12
  2. package/bin/install.js +125 -84
  3. package/gsp/agents/gsp-accessibility-auditor.md +4 -4
  4. package/gsp/agents/gsp-ascii-artist.md +2 -2
  5. package/gsp/agents/gsp-brand-auditor.md +3 -3
  6. package/gsp/agents/gsp-brand-engineer.md +131 -0
  7. package/gsp/agents/gsp-brand-strategist.md +3 -3
  8. package/gsp/agents/gsp-brand-syncer.md +8 -7
  9. package/gsp/agents/gsp-builder.md +49 -6
  10. package/gsp/agents/gsp-campaign-director.md +3 -4
  11. package/gsp/agents/gsp-creative-director.md +80 -0
  12. package/gsp/agents/gsp-critic.md +100 -18
  13. package/gsp/agents/gsp-designer.md +52 -5
  14. package/gsp/agents/gsp-project-researcher.md +4 -4
  15. package/gsp/agents/gsp-researcher.md +5 -5
  16. package/gsp/agents/gsp-reviewer.md +3 -3
  17. package/gsp/agents/gsp-scoper.md +3 -3
  18. package/gsp/hooks/hooks.json +5 -5
  19. package/gsp/skills/get-shit-pretty/SKILL.md +10 -9
  20. package/gsp/skills/gsp-accessibility/SKILL.md +12 -12
  21. package/gsp/skills/gsp-accessibility-audit/SKILL.md +8 -9
  22. package/gsp/skills/gsp-add-reference/SKILL.md +6 -1
  23. package/gsp/skills/gsp-art/SKILL.md +6 -1
  24. package/gsp/skills/gsp-brand-audit/SKILL.md +5 -5
  25. package/gsp/skills/gsp-brand-guidelines/SKILL.md +233 -0
  26. package/gsp/skills/gsp-brand-guidelines/token-mapping.md +329 -0
  27. package/gsp/skills/gsp-brand-identity/SKILL.md +29 -20
  28. package/gsp/skills/gsp-brand-refine/SKILL.md +30 -23
  29. package/gsp/skills/gsp-brand-research/SKILL.md +4 -4
  30. package/gsp/{references → skills/gsp-brand-research}/design-trends.md +4 -4
  31. package/gsp/skills/gsp-brand-strategy/SKILL.md +7 -7
  32. package/gsp/skills/gsp-brand-sync/SKILL.md +10 -10
  33. package/gsp/skills/gsp-brand-sync/chunk-format.md +79 -0
  34. package/gsp/skills/gsp-color/SKILL.md +73 -0
  35. package/gsp/skills/gsp-color/chunk-format.md +79 -0
  36. package/gsp/skills/{gsp-palette/SKILL.md → gsp-color/domains/palette.md} +31 -101
  37. package/gsp/skills/gsp-color/domains/system.md +123 -0
  38. package/gsp/skills/gsp-design-system/SKILL.md +9 -4
  39. package/gsp/skills/gsp-doctor/SKILL.md +25 -18
  40. package/gsp/skills/gsp-help/SKILL.md +30 -29
  41. package/gsp/skills/gsp-icons/SKILL.md +108 -0
  42. package/gsp/skills/gsp-icons/chunk-format.md +79 -0
  43. package/gsp/skills/gsp-launch/SKILL.md +3 -4
  44. package/gsp/skills/gsp-logo/SKILL.md +173 -0
  45. package/gsp/skills/gsp-logo/chunk-format.md +79 -0
  46. package/gsp/skills/gsp-phase-transition/SKILL.md +124 -0
  47. package/gsp/skills/gsp-pretty/SKILL.md +2 -2
  48. package/gsp/skills/gsp-progress/SKILL.md +20 -20
  49. package/gsp/skills/gsp-project-brief/SKILL.md +8 -9
  50. package/gsp/skills/gsp-project-build/SKILL.md +30 -25
  51. package/gsp/skills/gsp-project-critique/SKILL.md +17 -18
  52. package/gsp/{references → skills/gsp-project-critique}/visual-taste.md +1 -1
  53. package/gsp/skills/gsp-project-design/SKILL.md +18 -18
  54. package/gsp/skills/gsp-project-research/SKILL.md +6 -7
  55. package/gsp/skills/gsp-project-review/SKILL.md +8 -10
  56. package/gsp/skills/gsp-scaffold/SKILL.md +3 -3
  57. package/gsp/skills/gsp-start/SKILL.md +15 -15
  58. package/gsp/{references → skills/gsp-start}/questioning.md +1 -1
  59. package/gsp/skills/gsp-style/SKILL.md +43 -45
  60. package/gsp/skills/gsp-style/chunk-format.md +79 -0
  61. package/gsp/skills/gsp-style/style-preset-schema.md +124 -0
  62. package/gsp/skills/gsp-style/styles/INDEX.yml +1 -1
  63. package/gsp/skills/gsp-style/styles/academia.yml +80 -0
  64. package/gsp/skills/gsp-style/styles/art-deco.yml +81 -0
  65. package/gsp/skills/gsp-style/styles/bauhaus.yml +78 -0
  66. package/gsp/skills/gsp-style/styles/bold-typography.yml +73 -0
  67. package/gsp/skills/gsp-style/styles/botanical.yml +78 -0
  68. package/gsp/skills/gsp-style/styles/claymorphism.yml +84 -0
  69. package/gsp/skills/gsp-style/styles/cyberpunk.yml +87 -0
  70. package/gsp/skills/gsp-style/styles/enterprise.yml +81 -0
  71. package/gsp/skills/gsp-style/styles/flat-design.yml +67 -0
  72. package/gsp/skills/gsp-style/styles/fluent.yml +82 -0
  73. package/gsp/skills/gsp-style/styles/glassmorphism.yml +83 -0
  74. package/gsp/skills/gsp-style/styles/humanist-literary.yml +74 -0
  75. package/gsp/skills/gsp-style/styles/industrial.yml +82 -0
  76. package/gsp/skills/gsp-style/styles/kinetic.yml +94 -0
  77. package/gsp/skills/gsp-style/styles/liquid-glass.yml +91 -0
  78. package/gsp/skills/gsp-style/styles/luxury.yml +83 -0
  79. package/gsp/skills/gsp-style/styles/material.yml +83 -0
  80. package/gsp/skills/gsp-style/styles/maximalism.yml +92 -0
  81. package/gsp/skills/gsp-style/styles/minimal-dark.yml +75 -0
  82. package/gsp/skills/gsp-style/styles/modern-dark.yml +88 -0
  83. package/gsp/skills/gsp-style/styles/monochrome.yml +68 -0
  84. package/gsp/skills/gsp-style/styles/neubrutalism.yml +83 -0
  85. package/gsp/skills/gsp-style/styles/neumorphism.yml +77 -0
  86. package/gsp/skills/gsp-style/styles/newsprint.yml +81 -0
  87. package/gsp/skills/gsp-style/styles/organic.yml +77 -0
  88. package/gsp/skills/gsp-style/styles/playful-geometric.yml +90 -0
  89. package/gsp/skills/gsp-style/styles/professional.yml +67 -0
  90. package/gsp/skills/gsp-style/styles/retro.yml +85 -0
  91. package/gsp/skills/gsp-style/styles/saas.yml +83 -0
  92. package/gsp/skills/gsp-style/styles/sketch.yml +86 -0
  93. package/gsp/skills/gsp-style/styles/swiss-minimalist.yml +69 -0
  94. package/gsp/skills/gsp-style/styles/terminal.yml +83 -0
  95. package/gsp/skills/gsp-style/styles/vaporwave.yml +84 -0
  96. package/gsp/skills/gsp-style/styles/web3.yml +82 -0
  97. package/gsp/skills/gsp-typography/SKILL.md +70 -0
  98. package/gsp/skills/gsp-typography/chunk-format.md +79 -0
  99. package/gsp/skills/gsp-typography/domains/pairing.md +109 -0
  100. package/gsp/skills/gsp-typography/domains/scale.md +227 -0
  101. package/gsp/skills/gsp-typography/domains/system.md +108 -0
  102. package/gsp/skills/gsp-update/SKILL.md +1 -2
  103. package/gsp/skills/gsp-visuals/SKILL.md +82 -0
  104. package/gsp/skills/gsp-visuals/chunk-format.md +79 -0
  105. package/gsp/skills/gsp-visuals/domains/3d.md +127 -0
  106. package/gsp/skills/gsp-visuals/domains/imagery.md +145 -0
  107. package/gsp/skills/gsp-visuals/domains/textures.md +138 -0
  108. package/gsp/skills/gsp-visuals/domains/video.md +107 -0
  109. package/gsp/templates/branding/config.json +1 -1
  110. package/gsp/templates/branding/roadmap.md +9 -9
  111. package/gsp/templates/exports-index.md +8 -8
  112. package/gsp/templates/phases/brief.md +1 -1
  113. package/gsp/templates/phases/build.md +1 -1
  114. package/gsp/templates/phases/critique.md +1 -1
  115. package/gsp/templates/phases/design.md +2 -2
  116. package/gsp/templates/phases/discover.md +1 -1
  117. package/gsp/templates/phases/identity.md +1 -1
  118. package/gsp/templates/phases/launch.md +1 -1
  119. package/gsp/templates/phases/patterns.md +60 -71
  120. package/gsp/templates/phases/research.md +1 -1
  121. package/gsp/templates/phases/review.md +1 -1
  122. package/gsp/templates/phases/strategy.md +1 -1
  123. package/gsp/templates/phases/style.md +158 -0
  124. package/gsp/templates/projects/config.json +1 -1
  125. package/gsp/templates/projects/roadmap.md +7 -7
  126. package/gsp/templates/projects/state.md +1 -1
  127. package/package.json +1 -2
  128. package/.claude-plugin/plugin.json +0 -24
  129. package/gsp/agents/gsp-identity-designer.md +0 -74
  130. package/gsp/agents/gsp-pattern-architect.md +0 -189
  131. package/gsp/prompts/01-design-system-architect.md +0 -19
  132. package/gsp/prompts/02-brand-identity-creator.md +0 -16
  133. package/gsp/prompts/03-ui-ux-pattern-master.md +0 -21
  134. package/gsp/prompts/04-marketing-asset-factory.md +0 -14
  135. package/gsp/prompts/05-implementation-spec-expert.md +0 -15
  136. package/gsp/prompts/06-design-critique-partner.md +0 -14
  137. package/gsp/prompts/07-design-trend-synthesizer.md +0 -3
  138. package/gsp/prompts/08-accessibility-auditor.md +0 -23
  139. package/gsp/prompts/09-design-to-code-translator.md +0 -49
  140. package/gsp/prompts/10-project-scoper.md +0 -17
  141. package/gsp/prompts/11-deliverable-reviewer.md +0 -18
  142. package/gsp/prompts/12-project-researcher.md +0 -18
  143. package/gsp/references/phase-transitions.md +0 -132
  144. package/gsp/references/style-preset-schema.md +0 -63
  145. package/gsp/skills/gsp-brand-patterns/SKILL.md +0 -240
  146. package/gsp/skills/gsp-typescale/SKILL.md +0 -234
  147. /package/gsp/{references → skills/gsp-accessibility-audit}/wcag-checklist.md +0 -0
  148. /package/gsp/{references → skills/gsp-art}/terminal-art.md +0 -0
  149. /package/gsp/{references → skills/gsp-brand-audit}/chunk-format.md +0 -0
  150. /package/gsp/{references → skills/gsp-brand-guidelines}/design-tokens.md +0 -0
  151. /package/gsp/{references → skills/gsp-brand-strategy}/brand-archetypes.md +0 -0
  152. /package/gsp/{references → skills/gsp-brand-strategy}/brand-prism.md +0 -0
  153. /package/gsp/{references → skills/gsp-brand-strategy}/positioning-frameworks.md +0 -0
  154. /package/gsp/{references → skills/gsp-brand-strategy}/voice-tone.md +0 -0
  155. /package/gsp/{references → skills/gsp-color/references}/color-composition.md +0 -0
  156. /package/gsp/{references → skills/gsp-project-build}/visual-effects.md +0 -0
  157. /package/gsp/{references → skills/gsp-project-critique}/anti-patterns.md +0 -0
  158. /package/gsp/{references → skills/gsp-project-critique}/nielsen-heuristics.md +0 -0
  159. /package/gsp/{references → skills/gsp-project-design}/apple-hig-patterns.md +0 -0
  160. /package/gsp/{references → skills/gsp-project-design}/block-patterns.md +0 -0
  161. /package/gsp/{references → skills/gsp-typography/references}/typography-scales.md +0 -0
@@ -1,240 +0,0 @@
1
- ---
2
- name: brand-patterns
3
- description: Build your design system — tokens, components, brand guidelines
4
- user-invocable: true
5
- model: opus
6
- effort: high
7
- allowed-tools:
8
- - Read
9
- - Write
10
- - Bash
11
- - Agent
12
- - Grep
13
- - Glob
14
- ---
15
- <context>
16
- Phase 4 of the GSP branding diamond. Builds the design system (foundations, components, tokens), generates a self-contained brand guidelines HTML, and transitions the user from the branding diamond to the project diamond.
17
-
18
- Adapts strategy based on codebase context — generates from scratch, extends an existing system, or redesigns with migration mapping.
19
- </context>
20
-
21
- <objective>
22
- Build the design system, generate brand guidelines, and complete the branding diamond.
23
-
24
- **Input:** Brand identity + strategy + BRIEF.md
25
- **Output:** `{brand}/patterns/` (foundations/, components/, principles.md, tokens.json, {brand-name}.yml, {brand-name}.md, INDEX.md) + `{brand}/guidelines.html`
26
- **Agent:** `gsp-pattern-architect`
27
- </objective>
28
-
29
- <execution_context>
30
- @${CLAUDE_SKILL_DIR}/../../prompts/01-design-system-architect.md
31
- @${CLAUDE_SKILL_DIR}/../../templates/phases/patterns.md
32
- @${CLAUDE_SKILL_DIR}/../../references/design-tokens.md
33
- </execution_context>
34
-
35
- <rules>
36
- - Always use `AskUserQuestion` for user-facing questions — never raw text prompts
37
- - One decision per question — never batch multiple questions in a single message
38
- </rules>
39
-
40
- <process>
41
- ## Step 0: Resolve brand
42
-
43
- Resolve brand from `.design/branding/` (one → use it, multiple → ask). Set `BRAND_PATH`.
44
- If BRAND_PATH doesn't exist, tell the user to run `/gsp:start` first.
45
-
46
- ## Step 1: Load context
47
-
48
- ### Identity (chunk-first)
49
-
50
- Read `{BRAND_PATH}/identity/INDEX.md`. If it exists, load all identity chunks + `palettes.json`.
51
-
52
- If INDEX.md doesn't exist, check if identity phase is complete in brand STATE.md. If not, tell the user to complete brand identity first (run `/gsp:brand-identity`).
53
-
54
- ### Strategy (selective, chunk-first)
55
-
56
- Read `{BRAND_PATH}/strategy/INDEX.md`. If it exists, load selective chunks (voice-and-tone.md, brand-platform.md).
57
-
58
- ### Brand context
59
-
60
- Read:
61
- - `{BRAND_PATH}/BRIEF.md` — business, personas, goals
62
- - `{BRAND_PATH}/config.json` — get `system_config.system_strategy`, `system_config.tech_stack`, `system_config.style_base`
63
-
64
- ### Style base presets (format reference)
65
-
66
- If `style_base` is a non-empty array, load each preset's files from `${CLAUDE_SKILL_DIR}/../gsp-style/styles/`:
67
- - `{preset-name}.yml` — format reference for custom style output
68
- - `{preset-name}.md` — format reference for custom style prompt
69
-
70
- If `style_base` is empty or missing, load `${CLAUDE_SKILL_DIR}/../gsp-style/styles/professional.yml` and `${CLAUDE_SKILL_DIR}/../gsp-style/styles/professional.md` as the default format reference. The agent always needs at least one example to produce the custom style output.
71
-
72
- ## Step 1.5: Codebase awareness
73
-
74
- **Always scan:** If `.design/system/` docs don't exist, invoke `/gsp:design-system` via Skill tool to scan the codebase. If they already exist, read them. Either way, load STACK.md, COMPONENTS.md, and TOKENS.md before continuing.
75
-
76
- Then ask the user (each as its own `AskUserQuestion`):
77
-
78
- 1. Tech stack — if the scan detected a stack, use `AskUserQuestion`:
79
- - **Yes, build on {framework} + {styling}** — "Use what's already here"
80
- - **Different stack** — "I want to target a different tech stack"
81
- If no stack detected, use open-ended `AskUserQuestion`: "What tech stack will this brand target?"
82
- Store answer in `{BRAND_PATH}/config.json` → `system_config.tech_stack`
83
-
84
- 2. System strategy — only ask if scan found existing tokens/components. Use `AskUserQuestion`:
85
- - **Evolve** — "Extend the existing design system"
86
- - **Rethink** — "Redesign from scratch, informed by what exists"
87
- - **Ignore** — "Start fresh, don't reference the existing system"
88
- Store strategy in `{BRAND_PATH}/config.json` → `system_config.system_strategy`
89
- If scan found no tokens/components (greenfield/boilerplate): default to `generate`, skip this question
90
-
91
- ## Step 2: Determine system strategy
92
-
93
- Read `system_config.system_strategy` from config.json (defaults to `generate` if missing).
94
-
95
- Three strategies:
96
-
97
- **GENERATE** (when `system_strategy` is `generate` or missing):
98
- Full system from scratch. For `boilerplate` codebases, respect existing config structure (extend tailwind.config, not replace) and output tokens in the format the existing config uses (Tailwind extend, CSS custom properties, etc).
99
-
100
- **EXTEND** (when `system_strategy` is `extend`):
101
- Evolve the existing system rather than replacing it.
102
- 1. Audit existing tokens against the brand identity — keep what works, adjust what doesn't, fill gaps
103
- 2. Classify each existing component: KEEP / RESTYLE / REFACTOR / REPLACE
104
- 3. Design only net-new components not covered by existing ones
105
- 4. Output delta tokens — only new and changed values
106
- 5. Preserve existing naming conventions from `.design/system/CONVENTIONS.md`
107
-
108
- **REFACTOR** (when `system_strategy` is `refactor`):
109
- Redesign the system from the ground up, informed by what exists.
110
- 1. Read and understand existing tokens, components, patterns from `.design/system/` docs
111
- 2. Design a complete new system — same scope as GENERATE
112
- 3. Produce a migration mapping for every change
113
- 4. Preserve conventions unless the brand requires changes
114
- 5. Flag breaking changes explicitly
115
-
116
- ## Step 3: Spawn pattern architect — Pass 1: Foundations
117
-
118
- Spawn the `gsp-pattern-architect` agent with:
119
- - All identity chunks + palettes.json
120
- - The BRIEF.md content
121
- - The Design System Architect prompt (01)
122
- - The patterns output template
123
- - The design tokens reference
124
- - The `system_strategy` and `tech_stack` values
125
- - The `style_base` value + preset `.yml`/`.md` files (if loaded)
126
- - The `.design/system/STACK.md`, `COMPONENTS.md`, `TOKENS.md` content (when exist)
127
- - **Execution mode:** `"foundations"`
128
- - **Output path:** `{BRAND_PATH}/patterns/`
129
-
130
- The agent writes foundations only:
131
- - `patterns/foundations/` (6 foundation chunks)
132
- - `patterns/principles.md`
133
- - `patterns/tokens.json` (foundations-only)
134
-
135
- ## Step 3.5: Foundation review (interactive)
136
-
137
- Read the foundation outputs and present a compact summary:
138
-
139
- "Design system foundations:
140
- Color: {semantic mapping summary from foundations/color-system.md}
141
- Typography: {type scale summary from foundations/typography.md}
142
- Spacing: 8px base → {scale from foundations/spacing.md}
143
- Design principles: {list from principles.md}"
144
-
145
- Use `AskUserQuestion`:
146
- - **Looks good** — "Build components on these foundations"
147
- - **Adjust colors** — "I want to tweak the color system"
148
- - **Adjust typography** — "I want to tweak the type scale"
149
- - **Adjust other** — "I want to change spacing, principles, or other foundations"
150
-
151
- If adjustments needed, update the relevant foundation chunks, then re-present.
152
-
153
- ## Step 3.75: Perspective check
154
-
155
- Before building components, load persona profiles from `{BRAND_PATH}/BRIEF.md` and present stakeholder reactions:
156
-
157
- "Before we build the component library:
158
-
159
- {primary persona name}: {would they recognize this as {brand}? Does it feel right?}
160
- Skeptic: {are the tokens flexible enough? Are the principles actionable?}
161
- {top competitor}: {how does this compare to industry standards?}"
162
-
163
- Use `AskUserQuestion`:
164
- - **Build components** — "These foundations are solid, let's go"
165
- - **Adjust** — "One of these concerns resonates — I want to change something"
166
-
167
- If adjust → update foundations and re-present. If confirmed → proceed to components pass.
168
-
169
- ## Step 4: Spawn pattern architect — Pass 2: Components
170
-
171
- Spawn the `gsp-pattern-architect` agent with:
172
- - The existing foundations from Pass 1
173
- - All identity chunks + palettes.json
174
- - Strategy chunks: voice-and-tone.md, archetype.md, positioning.md (needed for custom style output)
175
- - `.design/system/STACK.md`, `COMPONENTS.md`, `TOKENS.md` (if exist — component library detection for token mapping)
176
- - The `style_base` value + preset `.yml`/`.md` files (if loaded)
177
- - **Execution mode:** `"components"`
178
- - Confirmed component scope from Step 1.5
179
- - **Output path:** `{BRAND_PATH}/patterns/`
180
-
181
- The agent writes components + custom style:
182
- - `patterns/components/` (one per component)
183
- - Updates `patterns/tokens.json` (adds component tokens)
184
- - `patterns/{brand-name}.yml` (custom style preset — portable, reusable)
185
- - `patterns/{brand-name}.md` (custom style prompt — AI-ready)
186
- - `patterns/INDEX.md`
187
-
188
- ## Step 4.5: Update state
189
-
190
- Update `{BRAND_PATH}/STATE.md`:
191
- - Set Phase 4 (Patterns) status to `complete`
192
- - Record completion date
193
- - Set Prettiness Level to 100%
194
-
195
- ## Step 4.75: Generate brand guidelines
196
-
197
- Create a self-contained HTML file at `{BRAND_PATH}/guidelines.html`.
198
-
199
- Read all available brand outputs:
200
- - `{BRAND_PATH}/identity/palettes.json` — color palette data
201
- - `{BRAND_PATH}/identity/color-system.md` — color roles and usage
202
- - `{BRAND_PATH}/identity/typography.md` — type scale and families
203
- - `{BRAND_PATH}/strategy/voice-and-tone.md` — voice attributes (means / doesn't mean)
204
- - `{BRAND_PATH}/strategy/messaging.md` — tagline directions
205
- - `{BRAND_PATH}/identity/logo-directions.md` — logo direction descriptions
206
- - `{BRAND_PATH}/strategy/archetype.md` — brand archetype
207
-
208
- Generate a single self-contained HTML file with:
209
- - **Embedded Google Fonts** `<link>` for the chosen typefaces
210
- - **Page styled with brand colors** — background, text, and accent colors from palettes.json
211
- - **Color palette swatches** — full ramp from 50→900 stops for each palette
212
- - **Typography samples** — headings and body text at the defined type scale, using the chosen font families
213
- - **Voice attributes** — each attribute with "means / doesn't mean" columns
214
- - **Tagline directions** — listed with descriptions
215
- - **Logo direction descriptions** — each direction with rationale
216
- - **Archetype summary** — the selected archetype and its expression
217
-
218
- Tell the user: "Brand kit saved to `guidelines.html` — open it in your browser to see your colors, typography, voice, and messaging in one page. You can also print or export to PDF as a shareable brand guide."
219
-
220
- ## Step 5: Phase transition output
221
-
222
- Render phase transition (see `references/phase-transitions.md`).
223
-
224
- **E2E mode:** Read `{BRAND_PATH}/config.json`. If `e2e` is `true`, auto-invoke `/gsp:start` via Skill tool — it will detect the completed brand and route directly to project setup (Step 4). No need to ask the user.
225
-
226
- **Non-E2E:** When the user chooses "Start a project", invoke `/gsp:start` via the Skill tool. Do NOT attempt to handle project setup inline — `/gsp:start` has the codebase scanning, questioning rounds, and brief-writing logic needed for a proper project setup. The branding agent's context is spent on brand work and lacks the project setup methodology.
227
-
228
- Also display a brand summary after the standard transition — this is the final branding phase:
229
-
230
- ```
231
- brand complete — {brand-name}
232
-
233
- discover {key finding}
234
- strategy {archetype}, {positioning}, {top voice attributes}
235
- identity {colors}, {typefaces}
236
- patterns {N} foundations, {N} components
237
-
238
- guidelines: {BRAND_PATH}/guidelines.html
239
- ```
240
- </process>
@@ -1,234 +0,0 @@
1
- ---
2
- name: typescale
3
- description: Generate a mathematical type scale — standalone or as a building block for identity
4
- user-invocable: true
5
- model: sonnet
6
- allowed-tools:
7
- - Read
8
- - Write
9
- - Bash
10
- - AskUserQuestion
11
- - WebSearch
12
- ---
13
- <context>
14
- You are a GSP type scale generator. You produce a complete typography system from a base size, ratio, and font family — including fluid responsive sizing, vertical rhythm, Tailwind/shadcn integration, and accessibility-compliant defaults. Downstream agents (identity-designer, system-architect, builder) consume the output files.
15
-
16
- This is a standalone composable skill. It works two ways:
17
- 1. **Standalone** — user runs `/gsp:typescale "Inter" --ratio 1.25` directly, gets a production-ready type system
18
- 2. **As a building block** — identity phase detects existing typography files and reuses them
19
-
20
- Visual companion: https://typescale.com/ — users can preview ratios interactively there, then feed the values here.
21
- </context>
22
-
23
- <objective>
24
- Generate a production-ready typography system with fluid responsive sizing, vertical rhythm, and framework-native output.
25
-
26
- **Input:** Font family, ratio, and options (args or interactive)
27
- **Output:** `typography.md` foundation chunk + `tailwind.typography.css` (Tailwind/shadcn) or `typescale.css` (vanilla) in the target directory
28
- **Agent:** None — mathematical scale generation, handled inline
29
- </objective>
30
-
31
- <execution_context>
32
- @${CLAUDE_SKILL_DIR}/../../references/chunk-format.md
33
- @${CLAUDE_SKILL_DIR}/../../references/typography-scales.md
34
- </execution_context>
35
-
36
- <rules>
37
- - Always use `AskUserQuestion` for user interaction — never prompt via plain text
38
- - One decision per question — never batch multiple questions in a single message
39
- - Foundation chunks follow `references/chunk-format.md` format exactly
40
- - All sizes include px, rem, AND fluid clamp() values for headings
41
- - Line heights snap to a 4px grid for vertical rhythm (body 24px = 6 × 4px)
42
- - Letter spacing follows the size-dependent curve: negative for large type, positive for small type, wide for all-caps (see reference)
43
- - CSS output defaults to Tailwind v4 / shadcn format unless `--vanilla` is passed
44
- - WCAG 2.2 AA compliance: body line-height ≥ 1.5, layout must survive SC 1.4.12 text spacing overrides
45
- </rules>
46
-
47
- <process>
48
- ## Step 0: Parse invocation
49
-
50
- Read the user's input to determine the mode:
51
-
52
- | Input | Mode |
53
- |-------|------|
54
- | `/gsp:typescale "Inter" --ratio 1.25` | Direct — font and ratio from args |
55
- | `/gsp:typescale --from-style cyberpunk` | From style — extract typography from a preset |
56
- | `/gsp:typescale` | Interactive — ask for inputs |
57
- | `/gsp:typescale --list-ratios` | List — show available ratios |
58
- | `/gsp:typescale --preview "Inter" --ratio 1.25` | Preview — show scale without writing files |
59
-
60
- Additional flags (combinable with any mode):
61
- - **--vanilla** — output plain CSS custom properties instead of Tailwind format
62
- - **--fluid** — use clamp()-based fluid sizing instead of breakpoint steps (default: fluid)
63
- - **--no-fluid** — use breakpoint steps only, no clamp()
64
- - **--grid 4** — vertical rhythm grid unit in px (default: 4)
65
-
66
- ## Step 1: List ratios mode (`--list-ratios`)
67
-
68
- If `--list-ratios`, display the built-in ratios with practical context:
69
-
70
- ```
71
- /gsp:typescale — ratios
72
- ═══════════════════════════════════════
73
-
74
- Name Ratio Character Best for
75
- ──────────────────────────────────────────────────────────────────
76
- minor-second 1.067 Nearly invisible steps Dense data UIs, admin panels
77
- major-second 1.125 Gentle, functional Documentation, dashboards
78
- minor-third 1.200 Balanced, versatile Most product UIs (Polaris uses this)
79
- major-third 1.250 Clear hierarchy Marketing + product hybrid
80
- perfect-fourth 1.333 Strong contrast Content-heavy sites, blogs
81
- augmented-fourth 1.414 Dramatic Editorial, magazine layouts
82
- perfect-fifth 1.500 Very dramatic Landing pages, hero sections
83
- golden-ratio 1.618 Maximum drama Art, luxury, display-heavy
84
-
85
- ──────────────────────────────────────────────────────────────────
86
- Usage: /gsp:typescale "Inter" --ratio 1.25
87
- Preview interactively: https://typescale.com/
88
- ```
89
-
90
- Stop here. Do not write any files.
91
-
92
- ## Step 2: Collect inputs
93
-
94
- ### Direct mode (args provided)
95
-
96
- Parse from the invocation:
97
- - **Font family** — quoted string (e.g., `"Inter"`)
98
- - **--ratio** — scale ratio (e.g., `1.25`)
99
- - **--secondary** — optional secondary font (e.g., `--secondary "Merriweather"`)
100
- - **--mono** — optional monospace font (e.g., `--mono "Geist Mono"`)
101
- - **--base** — optional base size in px (default: `16`)
102
- - **--weights** — optional weight list (e.g., `--weights 400,500,700`)
103
- - **--line-height** — optional base line-height override (default: `1.5`)
104
- - **--letter-spacing** — optional base letter-spacing override (default: `0`)
105
-
106
- ### From-style mode (`--from-style`)
107
-
108
- Read the style preset YAML from `../gsp-style/styles/{name}.yml`. Extract:
109
- - `typography.font-family-primary` → primary font
110
- - `typography.font-family-mono` → mono font
111
- - `typography.font-size-base` → base size
112
- - `typography.font-weight-heading` → heading weight
113
- - `typography.font-weight-body` → body weight
114
- - `typography.line-height-base` → base line height
115
-
116
- Calculate the implied ratio from the preset's type scale if present, or default to major-third (1.25).
117
-
118
- ### Interactive mode (no args)
119
-
120
- Use `AskUserQuestion` for each input:
121
-
122
- 1. **Primary font** — offer: Inter, Geist Sans, Plus Jakarta Sans, DM Sans, Space Grotesk, Instrument Serif, Custom
123
- 2. **Scale ratio** — offer: minor-third (1.2), major-third (1.25), perfect-fourth (1.333), augmented-fourth (1.414), Custom. Link https://typescale.com/ for preview.
124
- 3. **Base size** — default 16px unless specified
125
-
126
- ## Step 3: Calculate type scale
127
-
128
- Generate a 9-level scale: `size = base × ratio^n`. Round px to nearest 0.5px, rem = `px / 16`.
129
-
130
- | Level | Exponent | Tailwind | Purpose |
131
- |-------|----------|----------|---------|
132
- | Display | 5 | `text-6xl`–`text-7xl` | Hero headlines |
133
- | H1 | 4 | `text-4xl` | Page titles |
134
- | H2 | 3 | `text-3xl` | Section headings |
135
- | H3 | 2 | `text-2xl` | Subsection headings |
136
- | H4 | 1 | `text-xl` | Minor headings |
137
- | body-large | 0.5* | `text-lg` | Lead paragraphs |
138
- | body | 0 | `text-base` | Default body (= base) |
139
- | body-small | -1 | `text-sm` | Secondary text |
140
- | caption | -2 | `text-xs` | Labels, helper text |
141
- | overline | -2 | `text-xs` | All-caps labels (= caption size) |
142
-
143
- *body-large uses half-step exponent to bridge body → H4 gap.
144
-
145
- ### Line height per level (snapped to 4px grid)
146
-
147
- Formula: `ceil(fontSize * targetRatio / 4) * 4` — every line-height is a multiple of 4px.
148
-
149
- | Level | Target ratio |
150
- |-------|-------------|
151
- | Display | 1.1 |
152
- | H1 | 1.15 |
153
- | H2 | 1.2 |
154
- | H3 | 1.25 |
155
- | H4 | 1.3 |
156
- | body-large | 1.5 |
157
- | body | 1.5 (anchor: e.g. 24px = 6 × 4px) |
158
- | body-small | 1.5 |
159
- | caption | 1.4 |
160
- | overline | 1.5 |
161
-
162
- If user provided `--line-height`, use it as the body target ratio and adjust proportionally.
163
-
164
- ### Letter spacing per level (size-dependent curve)
165
-
166
- Based on the principle: small text needs more space, large text needs less. Reference: Apple SF Pro tracking, Tailwind defaults.
167
-
168
- | Level | Letter spacing | Tailwind token | Rationale |
169
- |-------|---------------|----------------|-----------|
170
- | Display | -0.025em | `tracking-tighter` | Tighten large type |
171
- | H1 | -0.025em | `tracking-tight` | |
172
- | H2 | -0.025em | `tracking-tight` | |
173
- | H3 | -0.015em | `tracking-tight` | |
174
- | H4 | -0.01em | `tracking-tight` | |
175
- | body-large | 0 | `tracking-normal` | Neutral |
176
- | body | 0 | `tracking-normal` | |
177
- | body-small | 0.01em | `tracking-normal` | Slightly open small text |
178
- | caption | 0.015em | `tracking-wide` | |
179
- | overline | 0.1em | `tracking-wider` | Wide-tracked for all-caps |
180
-
181
- ## Step 3.5: Calculate fluid type values
182
-
183
- For headings (Display → H4), generate `clamp()` values scaling between 375px (mobile) and 1280px (desktop). Mobile uses a ratio two steps down from the chosen ratio. Body and below stay fixed.
184
-
185
- **Ratio step-down map:**
186
-
187
- ```
188
- golden-ratio → perfect-fifth → augmented-fourth
189
- perfect-fifth → augmented-fourth → perfect-fourth
190
- augmented-fourth → perfect-fourth → major-third
191
- perfect-fourth → major-third → minor-third
192
- major-third → minor-third → major-second
193
- minor-third → major-second → minor-second
194
- major-second → minor-second → minor-second
195
- minor-second → minor-second → minor-second (floor)
196
- ```
197
-
198
- If `--no-fluid` is passed, skip clamp() and use breakpoint-only `@media` rules instead.
199
-
200
- ## Step 4: Preview mode (`--preview`)
201
-
202
- If `--preview`, display all 10 levels in a table with columns: Level, Mobile px, Desktop px, Fluid clamp(), Weight, LH, LS. Show base/ratio/fluid range header. Footer: grid unit, body line-height anchor, usage hint to write files. Stop here — do not write any files.
203
-
204
- ## Step 5: Resolve output path
205
-
206
- Determine where to write the typography output:
207
-
208
- ### Within a brand identity
209
- If a brand context exists (`.design/branding/{brand}/`):
210
- - Write to `{BRAND_PATH}/identity/`
211
- - Typography files sit alongside other identity artifacts
212
-
213
- ### Standalone (no brand context)
214
- - Write to `.design/branding/_typescale/`
215
- - Create minimal directory structure
216
-
217
- ## Step 6: Write typography.md
218
-
219
- Write `{OUTPUT_PATH}/typography.md` as a foundation chunk per `references/chunk-format.md`. Required sections: Font Families (with Google Fonts URL), Type Scale (all 10 levels — px, rem, clamp, weight, LH, LS, Tailwind class), shadcn/ui Typography Classes, Vertical Rhythm (grid unit + spacing tokens), Weights, Accessibility (WCAG 2.2 AA), Variable Font Notes (conditional), Modern CSS (`text-wrap: balance/pretty`), Related.
220
-
221
- ## Step 7: Write CSS output
222
-
223
- ### Tailwind / shadcn mode (default)
224
-
225
- Write `{OUTPUT_PATH}/tailwind.typography.css` — Tailwind v4 `@theme` extension. Include: header comment, Google Fonts `@import`, `--font-sans`/`--font-mono` + custom `--text-{level}` tokens (with `--line-height`, `--letter-spacing`, `--font-weight` sub-tokens), `:root` fluid clamp() properties (rem-based min/max only — never pure vw per WCAG 1.4.4), utility classes (`.text-display` through `.text-overline`), optical sizing + dark mode antialiasing, `text-wrap: balance` headings / `pretty` paragraphs.
226
-
227
- ### Vanilla mode (`--vanilla`)
228
-
229
- Write `{OUTPUT_PATH}/typescale.css` instead — plain CSS custom properties (no Tailwind syntax). Include: Google Fonts import, `:root` with font families, weights, fluid font sizes (clamp, rem-based), 4px grid-snapped line heights, letter spacing, vertical rhythm tokens.
230
-
231
- ## Step 8: Completion output
232
-
233
- Show: header (`/gsp:typescale — {font} @ {ratio}`), file tree (typography.md + CSS file), scale summary (ratio, range, levels, fluid, grid). Then `AskUserQuestion`: Generate palette → `/gsp:palette`, Apply a full style → `/gsp:style`, Continue to identity → `/gsp:brand-identity`, Done.
234
- </process>