get-shit-pretty 0.6.3 → 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 (95) hide show
  1. package/bin/install.js +36 -20
  2. package/gsp/agents/gsp-accessibility-auditor.md +1 -1
  3. package/gsp/agents/gsp-ascii-artist.md +1 -1
  4. package/gsp/agents/gsp-brand-auditor.md +1 -1
  5. package/gsp/agents/gsp-brand-strategist.md +1 -1
  6. package/gsp/agents/gsp-builder.md +1 -1
  7. package/gsp/agents/gsp-campaign-director.md +1 -1
  8. package/gsp/agents/gsp-creative-director.md +4 -4
  9. package/gsp/agents/gsp-critic.md +3 -3
  10. package/gsp/agents/gsp-designer.md +2 -2
  11. package/gsp/agents/gsp-project-researcher.md +1 -1
  12. package/gsp/agents/gsp-researcher.md +1 -1
  13. package/gsp/agents/gsp-reviewer.md +1 -1
  14. package/gsp/agents/gsp-scoper.md +1 -1
  15. package/gsp/skills/get-shit-pretty/SKILL.md +10 -9
  16. package/gsp/skills/gsp-accessibility/SKILL.md +1 -1
  17. package/gsp/skills/gsp-accessibility-audit/SKILL.md +2 -2
  18. package/gsp/skills/gsp-add-reference/SKILL.md +5 -0
  19. package/gsp/skills/gsp-art/SKILL.md +5 -0
  20. package/gsp/skills/gsp-brand-audit/SKILL.md +2 -2
  21. package/gsp/skills/gsp-brand-guidelines/SKILL.md +2 -2
  22. package/gsp/skills/gsp-brand-identity/SKILL.md +3 -3
  23. package/gsp/skills/gsp-brand-refine/SKILL.md +1 -1
  24. package/gsp/skills/gsp-brand-research/SKILL.md +2 -2
  25. package/gsp/skills/gsp-brand-strategy/SKILL.md +4 -4
  26. package/gsp/skills/gsp-brand-sync/SKILL.md +3 -3
  27. package/gsp/skills/gsp-brand-sync/chunk-format.md +79 -0
  28. package/gsp/skills/gsp-color/SKILL.md +24 -56
  29. package/gsp/skills/gsp-color/chunk-format.md +79 -0
  30. package/gsp/skills/{gsp-palette/SKILL.md → gsp-color/domains/palette.md} +31 -101
  31. package/gsp/skills/gsp-color/domains/system.md +123 -0
  32. package/gsp/skills/gsp-design-system/SKILL.md +5 -0
  33. package/gsp/skills/gsp-help/SKILL.md +4 -3
  34. package/gsp/skills/gsp-icons/SKILL.md +1 -1
  35. package/gsp/skills/gsp-icons/chunk-format.md +79 -0
  36. package/gsp/skills/gsp-launch/SKILL.md +1 -1
  37. package/gsp/skills/gsp-logo/SKILL.md +2 -2
  38. package/gsp/skills/gsp-logo/chunk-format.md +79 -0
  39. package/gsp/skills/gsp-phase-transition/SKILL.md +124 -0
  40. package/gsp/skills/gsp-project-brief/SKILL.md +1 -1
  41. package/gsp/skills/gsp-project-build/SKILL.md +10 -5
  42. package/gsp/skills/gsp-project-critique/SKILL.md +5 -5
  43. package/gsp/{references → skills/gsp-project-critique}/visual-taste.md +1 -1
  44. package/gsp/skills/gsp-project-design/SKILL.md +1 -1
  45. package/gsp/skills/gsp-project-research/SKILL.md +1 -1
  46. package/gsp/skills/gsp-project-review/SKILL.md +1 -1
  47. package/gsp/skills/gsp-start/SKILL.md +1 -1
  48. package/gsp/skills/gsp-style/SKILL.md +4 -4
  49. package/gsp/skills/gsp-style/chunk-format.md +79 -0
  50. package/gsp/skills/gsp-style/style-preset-schema.md +124 -0
  51. package/gsp/skills/gsp-typography/SKILL.md +28 -66
  52. package/gsp/skills/gsp-typography/chunk-format.md +79 -0
  53. package/gsp/skills/gsp-typography/domains/pairing.md +109 -0
  54. package/gsp/skills/gsp-typography/domains/scale.md +227 -0
  55. package/gsp/skills/gsp-typography/domains/system.md +108 -0
  56. package/gsp/skills/gsp-visuals/SKILL.md +82 -0
  57. package/gsp/skills/gsp-visuals/chunk-format.md +79 -0
  58. package/gsp/skills/{gsp-3d/SKILL.md → gsp-visuals/domains/3d.md} +62 -47
  59. package/gsp/skills/{gsp-images/SKILL.md → gsp-visuals/domains/imagery.md} +17 -69
  60. package/gsp/skills/{gsp-textures/SKILL.md → gsp-visuals/domains/textures.md} +54 -48
  61. package/gsp/skills/{gsp-video/SKILL.md → gsp-visuals/domains/video.md} +53 -47
  62. package/gsp/templates/branding/config.json +1 -1
  63. package/gsp/templates/phases/brief.md +1 -1
  64. package/gsp/templates/phases/critique.md +1 -1
  65. package/gsp/templates/phases/design.md +1 -1
  66. package/gsp/templates/phases/discover.md +1 -1
  67. package/gsp/templates/phases/identity.md +1 -1
  68. package/gsp/templates/phases/launch.md +1 -1
  69. package/gsp/templates/phases/patterns.md +1 -1
  70. package/gsp/templates/phases/research.md +1 -1
  71. package/gsp/templates/phases/review.md +1 -1
  72. package/gsp/templates/phases/strategy.md +1 -1
  73. package/gsp/templates/projects/config.json +1 -1
  74. package/package.json +1 -1
  75. package/gsp/references/phase-transitions.md +0 -132
  76. package/gsp/references/style-preset-schema.md +0 -63
  77. package/gsp/skills/gsp-typescale/SKILL.md +0 -234
  78. /package/gsp/{references → skills/gsp-accessibility-audit}/wcag-checklist.md +0 -0
  79. /package/gsp/{references → skills/gsp-art}/terminal-art.md +0 -0
  80. /package/gsp/{references → skills/gsp-brand-audit}/chunk-format.md +0 -0
  81. /package/gsp/{references → skills/gsp-brand-guidelines}/design-tokens.md +0 -0
  82. /package/gsp/{references → skills/gsp-brand-guidelines}/token-mapping.md +0 -0
  83. /package/gsp/{references → skills/gsp-brand-research}/design-trends.md +0 -0
  84. /package/gsp/{references → skills/gsp-brand-strategy}/brand-archetypes.md +0 -0
  85. /package/gsp/{references → skills/gsp-brand-strategy}/brand-prism.md +0 -0
  86. /package/gsp/{references → skills/gsp-brand-strategy}/positioning-frameworks.md +0 -0
  87. /package/gsp/{references → skills/gsp-brand-strategy}/voice-tone.md +0 -0
  88. /package/gsp/{references → skills/gsp-color/references}/color-composition.md +0 -0
  89. /package/gsp/{references → skills/gsp-project-build}/visual-effects.md +0 -0
  90. /package/gsp/{references → skills/gsp-project-critique}/anti-patterns.md +0 -0
  91. /package/gsp/{references → skills/gsp-project-critique}/nielsen-heuristics.md +0 -0
  92. /package/gsp/{references → skills/gsp-project-design}/apple-hig-patterns.md +0 -0
  93. /package/gsp/{references → skills/gsp-project-design}/block-patterns.md +0 -0
  94. /package/gsp/{references → skills/gsp-start}/questioning.md +0 -0
  95. /package/gsp/{references → skills/gsp-typography/references}/typography-scales.md +0 -0
@@ -1,108 +1,70 @@
1
1
  ---
2
2
  name: gsp-typography
3
- description: Design type systems — scale, pairing, fluid type, vertical rhythm
3
+ description: "Design type systems — scale, pairing, fluid type, vertical rhythm"
4
4
  user-invocable: true
5
5
  model: sonnet
6
6
  allowed-tools:
7
7
  - Read
8
8
  - Write
9
+ - Bash
9
10
  - AskUserQuestion
10
11
  - Glob
11
12
  - Grep
12
13
  - WebSearch
13
14
  ---
14
15
  <context>
15
- You are a GSP typography director. You build complete type systems — scale generation, font pairing, fluid responsive type, vertical rhythm, and font loading strategy.
16
+ Typography skill thin router. Domain expertise lives in `domains/` files, reference material in `references/`.
16
17
 
17
18
  This is a standalone composable skill. It works two ways:
18
- 1. **Standalone** — user runs `/gsp-typography` directly for type scale exploration and font pairing
19
+ 1. **Standalone** — user runs `/gsp-typography` directly for type scale generation, font pairing, or full system design
19
20
  2. **As a building block** — the creative-director invokes `/gsp-typography --enrich` to add technical precision to creative typeface choices
20
21
 
21
- Absorbs the capabilities of the current `gsp-typescale` (mathematical scale generation).
22
+ Visual companion: https://typescale.com/ users can preview ratios interactively there, then feed the values here.
22
23
  </context>
23
24
 
24
25
  <objective>
25
- Build a production-ready typography system from typeface choices or user input.
26
+ Build a production-ready typography system scale, pairing, fluid type, vertical rhythm, and font loading strategy.
26
27
 
27
- **Input:** Font families + brand context, OR `--enrich` mode with existing `typography.md`
28
- **Output:** `typography.md` chunk with full 9-level scale, fluid type formulas, and loading strategy
28
+ **Input:** Font families + ratio, `--enrich`, `--list-ratios`, `--preview`, `--from-style`, or interactive
29
+ **Output:** `typography.md` foundation chunk + CSS file (Tailwind or vanilla)
29
30
  **Agent:** None — inline skill, mathematical scale generation
30
31
  </objective>
31
32
 
32
33
  <execution_context>
33
- @${CLAUDE_SKILL_DIR}/../../references/chunk-format.md
34
+ @${CLAUDE_SKILL_DIR}/chunk-format.md
34
35
  </execution_context>
35
36
 
36
37
  <rules>
37
38
  - Always use `AskUserQuestion` for user interaction — never prompt via plain text
38
39
  - One decision per question — never batch multiple questions in a single message
39
- - Type scales must be mathematically consistent (ratio-based: 1.125, 1.2, 1.25, 1.333, 1.414, 1.5, 1.618)
40
- - Always specify Google Fonts import URL or font loading strategy
41
- - Fluid type uses clamp() with min/preferred/max values
42
- - 9 scale levels: Display, H1, H2, H3, Body Large, Body, Body Small, Caption, Overline
40
+ - All sizes include px, rem, AND fluid clamp() values for headings
41
+ - CSS output defaults to Tailwind v4 / shadcn format unless `--vanilla` is passed
42
+ - Foundation chunks follow `chunk-format.md` format exactly
43
43
  </rules>
44
44
 
45
45
  <process>
46
- ## Step 0: Determine mode
46
+ ## Step 0: Parse mode
47
47
 
48
- | Input | Mode |
49
- |-------|------|
50
- | `/gsp-typography --enrich` | Enrich existing typography.md |
51
- | `/gsp-typography "Inter" --ratio 1.25` | Generate from font + ratio |
52
- | `/gsp-typography` | Interactive explore and build |
48
+ | Input | Mode | Domain |
49
+ |-------|------|--------|
50
+ | `"Inter" --ratio 1.25` | Direct scale | `domains/scale.md` |
51
+ | `--from-style cyberpunk` | From style preset | `domains/scale.md` |
52
+ | `--list-ratios` | List ratios | `domains/scale.md` |
53
+ | `--preview "Inter" --ratio 1.25` | Preview scale | `domains/scale.md` |
54
+ | `--enrich` | Enrich existing typography | `domains/pairing.md` |
55
+ | *(no args)* | Interactive full system | `domains/system.md` |
53
56
 
54
- ## Step 1: Enrich mode (`--enrich`)
57
+ ## Step 1: Load domain
55
58
 
56
- Read existing `{BRAND_PATH}/identity/typography.md`. Extract chosen typefaces and scale direction.
59
+ Read the domain file from `${CLAUDE_SKILL_DIR}/domains/{domain}.md`.
57
60
 
58
- Read `references/typography-scales.md` for domain expertise.
61
+ For scale modes, also read `${CLAUDE_SKILL_DIR}/references/typography-scales.md`.
59
62
 
60
- Enrich the file with:
61
- - Mathematical 9-level type scale from the chosen ratio
62
- - Fluid type clamp() formulas per level
63
- - Font weight mapping (heading weight, body weight, accent weight)
64
- - Line height per level (tighter for display, looser for body)
65
- - Letter spacing per level (negative for display, positive for overlines)
66
- - Google Fonts import URL or font loading strategy
67
- - Vertical rhythm based on base line-height
63
+ ## Step 2: Follow domain framework
68
64
 
69
- Overwrite `typography.md` with enriched version. Preserve the creative rationale.
65
+ Execute the loaded domain's workflow. The domain file contains all rules, formulas, tables, and output specifications.
70
66
 
71
- ## Step 2: Interactive mode (no args)
67
+ ## Step 3: Write output
72
68
 
73
- One `AskUserQuestion` at a time:
74
-
75
- 1. Starting point — use `AskUserQuestion`:
76
- - **I have fonts chosen** — "I know my typefaces"
77
- - **From a style preset** — "Start from a GSP preset type system"
78
- - **Explore pairings** — "Help me find the right fonts"
79
- 2. If exploring: ask about voice (authoritative/friendly/technical/editorial), format (long-form/dashboard/marketing)
80
- 3. Propose primary + secondary (or mono) pairing with rationale
81
- 4. Scale ratio — use `AskUserQuestion`:
82
- - **1.2 Minor Third** — "subtle, compact, dashboards"
83
- - **1.25 Major Third** — "balanced, versatile, most projects"
84
- - **1.333 Perfect Fourth** — "pronounced hierarchy, editorial"
85
- - **1.5 Perfect Fifth** — "dramatic, poster-like"
86
- - **Custom** — "specify your own ratio"
87
-
88
- ## Step 3: Generate type system
89
-
90
- Calculate 9-level scale from base size (default 16px) and ratio:
91
- - Display, H1, H2, H3, Body Large, Body (base), Body Small, Caption, Overline
92
-
93
- For each level define:
94
- - Size (px and rem)
95
- - Fluid clamp() formula: `clamp({min}rem, {preferred}vw, {max}rem)`
96
- - Weight
97
- - Line height
98
- - Letter spacing
99
- - Use case
100
-
101
- ## Step 4: Write output
102
-
103
- Write `typography.md` to the resolved output path. Target: 80-120 lines.
104
-
105
- ## Step 5: Completion
106
-
107
- Display scale preview table. Offer next steps.
69
+ Write `typography.md` + optional CSS file to the resolved output path. Display scale summary and offer next steps.
108
70
  </process>
@@ -0,0 +1,79 @@
1
+ # Chunk Format Reference
2
+
3
+ Standard format for all GSP phase output files. Chunks are the primary output — agents write chunks directly, not monoliths.
4
+
5
+ ## File Format
6
+
7
+ Every chunk follows this structure:
8
+
9
+ # {Section/Component/Screen Name}
10
+
11
+ > Phase: {phase} | Brand/Project: {name} | Generated: {DATE}
12
+
13
+ ---
14
+
15
+ {Content for this chunk}
16
+
17
+ ---
18
+
19
+ ## Related
20
+
21
+ - [{Related chunk name}]({relative-path-to-related-chunk})
22
+
23
+ ## Naming Conventions
24
+
25
+ - **Singular, kebab-case, lowercase:** "Buttons" → `button.md`, "Date Picker" → `date-picker.md`
26
+ - **Screen files:** `screen-{NN}-{kebab-case-name}.md` (e.g., `screen-01-home.md`)
27
+
28
+ ## INDEX.md Format
29
+
30
+ Each phase directory gets an INDEX.md manifest:
31
+
32
+ # {Phase Name}
33
+ > Phase: {phase} | Brand/Project: {name} | Generated: {DATE}
34
+
35
+ | Chunk | File | ~Lines |
36
+ |-------|------|--------|
37
+ | {Section} | [{filename}](./{filename}) | ~{N} |
38
+
39
+ Lightweight — just a lookup table. No prose.
40
+
41
+ ## Rules
42
+
43
+ - **Chunks are primary output** — agents write chunks directly to the phase directory
44
+ - **No monoliths** — do not write a single large file then re-chunk it
45
+ - **Size target:** 50-200 lines per chunk
46
+ - **Self-contained:** each chunk must be understandable without loading other chunks
47
+ - **Cross-references:** `## Related` section uses relative paths to related chunks
48
+ - **Idempotent:** re-running a phase regenerates all chunks in that phase directory
49
+
50
+ ## Output Budgets
51
+
52
+ Context is finite. Every line in a chunk is consumed by downstream agents. Budget accordingly.
53
+
54
+ ### Per-chunk budgets
55
+
56
+ | Chunk type | Target | Hard max | Notes |
57
+ |-----------|--------|----------|-------|
58
+ | Phase chunk (design, research, etc.) | 50-150 lines | 200 lines | Self-contained, one concept per chunk |
59
+ | INDEX.md | 10-30 lines | 50 lines | Lookup table only, no prose |
60
+ | BUILD-LOG.md | 50-100 lines | 150 lines | Summary + tables, not narrative |
61
+ | Component spec | 30-80 lines | 120 lines | Props, states, behavior — not full implementation |
62
+ | Screen spec | 80-150 lines | 200 lines | Layout, components, interactions, states |
63
+
64
+ ### Per-phase budgets (total across all chunks)
65
+
66
+ | Phase | Target total | Hard max | Typical chunks |
67
+ |-------|-------------|----------|----------------|
68
+ | Brief | 100-200 lines | 300 lines | 2-4 |
69
+ | Research | 200-400 lines | 600 lines | 5-8 |
70
+ | Design | 300-600 lines | 800 lines | 6-12 |
71
+ | Critique | 100-200 lines | 300 lines | 2-4 |
72
+ | Build log | 50-100 lines | 150 lines | 1 |
73
+ | Review | 100-200 lines | 300 lines | 2-4 |
74
+
75
+ ### Terminal output (inline skills)
76
+
77
+ - **Diagnostic** (doctor, progress): uncapped — user needs to see it, does not persist in agent context
78
+ - **Greeting/status** (start): 20-40 lines
79
+ - **Phase transitions**: 10-20 lines
@@ -0,0 +1,109 @@
1
+ # Domain: Font Pairing & Enrichment
2
+
3
+ Font pairing exploration and enrichment of existing typography files with technical precision.
4
+
5
+ ---
6
+
7
+ ## Enrich Mode (`--enrich`)
8
+
9
+ Read existing `{BRAND_PATH}/identity/typography.md`. Extract chosen typefaces and scale direction.
10
+
11
+ Load `${CLAUDE_SKILL_DIR}/references/typography-scales.md` for domain expertise (section 7: Font Pairing Principles).
12
+
13
+ ### What to add
14
+
15
+ Enrich the file with:
16
+ - Mathematical 9-level type scale from the chosen ratio (delegate calculation to `domains/scale.md` rules)
17
+ - Fluid type clamp() formulas per level
18
+ - Font weight mapping (heading weight, body weight, accent weight)
19
+ - Line height per level (tighter for display, looser for body)
20
+ - Letter spacing per level (negative for display, positive for overlines)
21
+ - Google Fonts import URL or font loading strategy
22
+ - Vertical rhythm based on base line-height
23
+
24
+ Overwrite `typography.md` with the enriched version. **Preserve the creative rationale** from the original file.
25
+
26
+ ---
27
+
28
+ ## Font Pairing Exploration
29
+
30
+ When the user wants to explore pairings (interactive mode, "Explore pairings" path):
31
+
32
+ ### Design judgment criteria
33
+
34
+ Match fonts based on:
35
+ - **Voice** — authoritative, friendly, technical, editorial, playful
36
+ - **Format** — long-form reading, dashboard/data, marketing/landing, documentation
37
+ - **Personality** — the brand's character and how type reinforces it
38
+
39
+ ### Pairing strategies
40
+
41
+ **1. Contrast** — Pair fonts that differ in classification
42
+ - Serif heading + sans-serif body (most reliable)
43
+ - Geometric sans + humanist sans
44
+ - Slab serif + thin sans
45
+
46
+ **2. Harmony** — Pair fonts sharing structural characteristics
47
+ - Match x-height, stroke width, overall proportions
48
+ - Different styles from same era or tradition
49
+
50
+ **3. Superfamily** — Use a designed family spanning classifications
51
+ - IBM Plex: Sans, Serif, Mono
52
+ - Roboto + Roboto Slab + Roboto Mono
53
+ - Source Sans + Source Serif + Source Code
54
+
55
+ ### What to match
56
+ - **x-height** — most important metric; mismatched x-heights look unbalanced
57
+ - **Stroke contrast** — both high-contrast or both low-contrast
58
+ - **Overall proportions** — similar width tendencies
59
+ - **Cap height** — for text set alongside each other
60
+
61
+ ### What to contrast
62
+ - **Weight** — light heading + bold body or vice versa
63
+ - **Classification** — serif vs sans, geometric vs humanist
64
+ - **Mood** — formal vs casual, mechanical vs organic
65
+
66
+ ### Reliable pairings for product UI
67
+
68
+ | Heading | Body | Mono | Vibe |
69
+ |---------|------|------|------|
70
+ | Inter | Inter | JetBrains Mono | Neutral, flexible |
71
+ | Geist Sans | Geist Sans | Geist Mono | Modern, precise |
72
+ | IBM Plex Sans | IBM Plex Sans | IBM Plex Mono | Enterprise, reliable |
73
+ | Work Sans | Source Serif 4 | Source Code Pro | Editorial + functional |
74
+ | Space Grotesk | Inter | JetBrains Mono | Technical, contemporary |
75
+ | Fraunces | Inter | Fira Code | Retro-modern editorial |
76
+ | DM Sans | DM Serif Display | DM Mono | Cohesive family |
77
+
78
+ ### Pairing rules
79
+ 1. Never pair more than 3 typefaces in a project
80
+ 2. One font should clearly lead — the other supports
81
+ 3. Test pairings at actual sizes, not just in specimen
82
+ 4. Ensure both fonts have the weights you need
83
+ 5. Superfamilies are the safest choice for design systems
84
+
85
+ ---
86
+
87
+ ## Font Sourcing
88
+
89
+ ### Google Fonts
90
+ - Free, widely available, automatic subsetting
91
+ - Provide full `@import` URL with selected weights
92
+ - Good for prototyping and production
93
+
94
+ ### Fontsource (npm packages)
95
+ - `@fontsource/inter`, `@fontsource-variable/inter`
96
+ - Self-hosted via npm — no external requests
97
+ - Tree-shakeable weight/subset imports
98
+ - Recommended for Next.js, Vite, and other bundled apps
99
+
100
+ ### Local / Premium
101
+ - Self-hosted WOFF2 files for licensed fonts
102
+ - `@font-face` declarations with `font-display: swap`
103
+ - Subsetting via `unicode-range` for performance
104
+
105
+ ### Loading strategy
106
+
107
+ **Next.js:** Use `next/font/google` or `next/font/local` — automatic optimization, no layout shift
108
+ **Fontsource:** Import in global CSS or layout component
109
+ **Self-hosted:** Preload critical fonts, use `font-display: swap` for body and `fallback` for headings
@@ -0,0 +1,227 @@
1
+ # Domain: Type Scale Generation
2
+
3
+ Mathematical type scale generation — the core engine for all typography modes that produce a numeric scale.
4
+
5
+ ---
6
+
7
+ ## Scale Levels
8
+
9
+ Generate a 9-level scale: `size = base * ratio^n`. Round px to nearest 0.5px, rem = `px / 16`.
10
+
11
+ | Level | Exponent | Tailwind | Purpose |
12
+ |-------|----------|----------|---------|
13
+ | Display | 5 | `text-6xl`-`text-7xl` | Hero headlines |
14
+ | H1 | 4 | `text-4xl` | Page titles |
15
+ | H2 | 3 | `text-3xl` | Section headings |
16
+ | H3 | 2 | `text-2xl` | Subsection headings |
17
+ | H4 | 1 | `text-xl` | Minor headings |
18
+ | body-large | 0.5* | `text-lg` | Lead paragraphs |
19
+ | body | 0 | `text-base` | Default body (= base) |
20
+ | body-small | -1 | `text-sm` | Secondary text |
21
+ | caption | -2 | `text-xs` | Labels, helper text |
22
+ | overline | -2 | `text-xs` | All-caps labels (= caption size) |
23
+
24
+ *body-large uses half-step exponent to bridge body-H4 gap.
25
+
26
+ Default base size: 16px unless overridden by `--base`.
27
+
28
+ ---
29
+
30
+ ## Fluid clamp() Formulas
31
+
32
+ For headings (Display through H4), generate `clamp()` values scaling between 375px (mobile) and 1280px (desktop). Body and below stay fixed.
33
+
34
+ **Formula:**
35
+ ```
36
+ slope = (desktopSize - mobileSize) / (1280 - 375)
37
+ intercept = mobileSize - slope * 375
38
+ clamp(mobileSize_rem, intercept_rem + slope * 100vw, desktopSize_rem)
39
+ ```
40
+
41
+ Mobile uses a ratio stepped down from the chosen ratio. The step-down map:
42
+
43
+ ```
44
+ golden-ratio (1.618) -> perfect-fifth (1.500)
45
+ perfect-fifth (1.500) -> augmented-fourth (1.414)
46
+ augmented-fourth (1.414) -> perfect-fourth (1.333)
47
+ perfect-fourth (1.333) -> major-third (1.250)
48
+ major-third (1.250) -> minor-third (1.200)
49
+ minor-third (1.200) -> major-second (1.125)
50
+ major-second (1.125) -> minor-second (1.067)
51
+ minor-second (1.067) -> minor-second (1.067) [floor]
52
+ ```
53
+
54
+ WCAG 1.4.4 constraint: clamp() min and max must be rem-based — never pure vw. The vw component does not respond to browser zoom.
55
+
56
+ If `--no-fluid` is passed, skip clamp() and use breakpoint-only `@media` rules instead.
57
+
58
+ ---
59
+
60
+ ## Line Height (4px Grid Snapped)
61
+
62
+ Formula: `ceil(fontSize * targetRatio / 4) * 4` — every line-height is a multiple of 4px.
63
+
64
+ | Level | Target ratio |
65
+ |-------|-------------|
66
+ | Display | 1.1 |
67
+ | H1 | 1.15 |
68
+ | H2 | 1.2 |
69
+ | H3 | 1.25 |
70
+ | H4 | 1.3 |
71
+ | body-large | 1.5 |
72
+ | body | 1.5 (anchor: e.g. 24px = 6 * 4px) |
73
+ | body-small | 1.5 |
74
+ | caption | 1.4 |
75
+ | overline | 1.5 |
76
+
77
+ If user provided `--line-height`, use it as the body target ratio and adjust proportionally.
78
+
79
+ Grid unit defaults to 4px. Override with `--grid N`.
80
+
81
+ ---
82
+
83
+ ## Letter Spacing (Size-Dependent Curve)
84
+
85
+ Principle: small text needs more space, large text needs less. Reference: Apple SF Pro tracking, Tailwind defaults.
86
+
87
+ | Level | Letter spacing | Tailwind token | Rationale |
88
+ |-------|---------------|----------------|-----------|
89
+ | Display | -0.025em | `tracking-tighter` | Tighten large type |
90
+ | H1 | -0.025em | `tracking-tight` | |
91
+ | H2 | -0.025em | `tracking-tight` | |
92
+ | H3 | -0.015em | `tracking-tight` | |
93
+ | H4 | -0.01em | `tracking-tight` | |
94
+ | body-large | 0 | `tracking-normal` | Neutral |
95
+ | body | 0 | `tracking-normal` | |
96
+ | body-small | 0.01em | `tracking-normal` | Slightly open small text |
97
+ | caption | 0.015em | `tracking-wide` | |
98
+ | overline | 0.1em | `tracking-wider` | Wide-tracked for all-caps |
99
+
100
+ ---
101
+
102
+ ## Weight Mapping
103
+
104
+ Default weight mapping (adjustable via `--weights`):
105
+
106
+ | Level | Weight | Rationale |
107
+ |-------|--------|-----------|
108
+ | Display | 700 | Bold headlines |
109
+ | H1 | 700 | Bold page titles |
110
+ | H2 | 600 | Semi-bold sections |
111
+ | H3 | 600 | Semi-bold subsections |
112
+ | H4 | 500 | Medium minor headings |
113
+ | body-large | 400 | Regular lead text |
114
+ | body | 400 | Regular body |
115
+ | body-small | 400 | Regular secondary |
116
+ | caption | 400 | Regular labels |
117
+ | overline | 500 | Medium all-caps |
118
+
119
+ ---
120
+
121
+ ## CSS Output
122
+
123
+ ### Tailwind / shadcn mode (default)
124
+
125
+ Write `tailwind.typography.css` — Tailwind v4 `@theme` extension:
126
+ - Header comment with font, ratio, base size, generated date
127
+ - Google Fonts `@import` (or font loading note)
128
+ - `--font-sans`/`--font-mono` + custom `--text-{level}` tokens with `--line-height`, `--letter-spacing`, `--font-weight` sub-tokens
129
+ - `:root` fluid clamp() properties (rem-based min/max only — never pure vw per WCAG 1.4.4)
130
+ - Utility classes (`.text-display` through `.text-overline`)
131
+ - Optical sizing + dark mode antialiasing
132
+ - `text-wrap: balance` for headings, `pretty` for paragraphs
133
+
134
+ ### Vanilla mode (`--vanilla`)
135
+
136
+ Write `typescale.css` instead — plain CSS custom properties (no Tailwind syntax):
137
+ - Google Fonts import
138
+ - `:root` with font families, weights, fluid font sizes (clamp, rem-based), 4px grid-snapped line heights, letter spacing, vertical rhythm tokens
139
+
140
+ ---
141
+
142
+ ## Accessibility (WCAG 2.2 AA)
143
+
144
+ - Body line-height >= 1.5 (SC 1.4.12)
145
+ - Layout must survive SC 1.4.12 text spacing overrides (line-height 1.5x, paragraph spacing 2x, letter-spacing 0.12x, word-spacing 0.16x)
146
+ - Fluid type min/max must be rem-based for zoom compliance (SC 1.4.4)
147
+ - Minimum practical font size: 12px
148
+
149
+ ---
150
+
151
+ ## Invocation Modes
152
+
153
+ ### Direct: `/gsp-typography "Inter" --ratio 1.25`
154
+
155
+ Parse from args:
156
+ - **Font family** — quoted string
157
+ - **--ratio** — scale ratio
158
+ - **--secondary** — optional secondary font
159
+ - **--mono** — optional monospace font
160
+ - **--base** — base size in px (default: 16)
161
+ - **--weights** — weight list (e.g., `400,500,700`)
162
+ - **--line-height** — base line-height override (default: 1.5)
163
+ - **--vanilla** — plain CSS output instead of Tailwind
164
+ - **--no-fluid** — breakpoint steps instead of clamp()
165
+ - **--grid N** — vertical rhythm grid unit in px (default: 4)
166
+
167
+ Generate scale, write `typography.md` + CSS file.
168
+
169
+ ### From style: `/gsp-typography --from-style cyberpunk`
170
+
171
+ Read the style preset YAML from `${CLAUDE_SKILL_DIR}/../gsp-style/styles/{name}.yml`. Extract:
172
+ - `typography.font-family-primary` -> primary font
173
+ - `typography.font-family-mono` -> mono font
174
+ - `typography.font-size-base` -> base size
175
+ - `typography.font-weight-heading` -> heading weight
176
+ - `typography.font-weight-body` -> body weight
177
+ - `typography.line-height-base` -> base line height
178
+
179
+ Calculate the implied ratio from the preset's type scale if present, or default to major-third (1.25).
180
+
181
+ ### List ratios: `/gsp-typography --list-ratios`
182
+
183
+ Display all named ratios with values and practical context:
184
+
185
+ ```
186
+ /gsp-typography — ratios
187
+ ===================================
188
+
189
+ Name Ratio Character Best for
190
+ ------------------------------------------------------------------
191
+ minor-second 1.067 Nearly invisible steps Dense data UIs, admin panels
192
+ major-second 1.125 Gentle, functional Documentation, dashboards
193
+ minor-third 1.200 Balanced, versatile Most product UIs (Polaris uses this)
194
+ major-third 1.250 Clear hierarchy Marketing + product hybrid
195
+ perfect-fourth 1.333 Strong contrast Content-heavy sites, blogs
196
+ augmented-fourth 1.414 Dramatic Editorial, magazine layouts
197
+ perfect-fifth 1.500 Very dramatic Landing pages, hero sections
198
+ golden-ratio 1.618 Maximum drama Art, luxury, display-heavy
199
+
200
+ ------------------------------------------------------------------
201
+ Usage: /gsp-typography "Inter" --ratio 1.25
202
+ Preview interactively: https://typescale.com/
203
+ ```
204
+
205
+ Stop here. Do not write any files.
206
+
207
+ ### Preview: `/gsp-typography --preview "Inter" --ratio 1.25`
208
+
209
+ 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.
210
+
211
+ Stop here — do not write any files.
212
+
213
+ ---
214
+
215
+ ## Output Path
216
+
217
+ ### Within a brand identity
218
+ If a brand context exists (`.design/branding/{brand}/`): write to `{BRAND_PATH}/identity/`.
219
+
220
+ ### Standalone (no brand context)
221
+ Write to `.design/branding/_typescale/`. Create minimal directory structure.
222
+
223
+ ---
224
+
225
+ ## Completion
226
+
227
+ Show: header (`/gsp-typography — {font} @ {ratio}`), file tree (typography.md + CSS file), scale summary (ratio, range, levels, fluid, grid). Then offer next steps via `AskUserQuestion`: Generate palette -> `/gsp-color`, Apply a full style -> `/gsp-style`, Continue to identity -> `/gsp-brand-identity`, Done.
@@ -0,0 +1,108 @@
1
+ # Domain: Full Type System (Interactive Mode)
2
+
3
+ Complete typography system direction — combines scale generation, font pairing, and loading strategy into a single interactive workflow.
4
+
5
+ ---
6
+
7
+ ## Interactive Questions
8
+
9
+ Use `AskUserQuestion` for each step. One decision per question.
10
+
11
+ ### 1. Starting point
12
+
13
+ - **I have fonts chosen** — "I know my typefaces"
14
+ - **From a style preset** — "Start from a GSP preset type system"
15
+ - **Explore pairings** — "Help me find the right fonts"
16
+
17
+ If "Explore pairings": load `domains/pairing.md` and follow font pairing exploration workflow. Ask about voice (authoritative/friendly/technical/editorial), format (long-form/dashboard/marketing).
18
+
19
+ If "From a style preset": route to `domains/scale.md` --from-style workflow.
20
+
21
+ ### 2. Fonts (if "I have fonts chosen")
22
+
23
+ Ask for primary font family. Offer popular options:
24
+ - Inter, Geist Sans, Plus Jakarta Sans, DM Sans, Space Grotesk, Instrument Serif, Custom
25
+
26
+ ### 3. Scale ratio
27
+
28
+ - **1.2 Minor Third** — "subtle, compact, dashboards"
29
+ - **1.25 Major Third** — "balanced, versatile, most projects"
30
+ - **1.333 Perfect Fourth** — "pronounced hierarchy, editorial"
31
+ - **1.5 Perfect Fifth** — "dramatic, poster-like"
32
+ - **Custom** — "specify your own ratio"
33
+
34
+ Link https://typescale.com/ for interactive preview.
35
+
36
+ ### 4. Base size
37
+
38
+ Default 16px unless user specifies otherwise.
39
+
40
+ ---
41
+
42
+ ## Output Structure
43
+
44
+ Write `typography.md` as a foundation chunk per `chunk-format.md`. Target: 80-120 lines.
45
+
46
+ ### Required sections
47
+
48
+ 1. **Font Families** (~10 lines)
49
+ - Primary, secondary (if any), monospace
50
+ - Google Fonts URL or loading strategy
51
+ - Fallback stacks
52
+
53
+ 2. **Type Scale** (~30 lines)
54
+ - All 10 levels in a table: Level, px, rem, clamp(), Weight, Line Height, Letter Spacing, Tailwind class
55
+ - Base size and ratio noted
56
+
57
+ 3. **Fluid Type** (~10 lines)
58
+ - Mobile viewport (375px) and desktop viewport (1280px)
59
+ - Mobile ratio step-down
60
+ - clamp() formula explanation
61
+
62
+ 4. **Weights** (~5 lines)
63
+ - Available weights and their roles
64
+ - Heading weight, body weight, accent weight
65
+
66
+ 5. **Vertical Rhythm** (~5 lines)
67
+ - Grid unit (4px)
68
+ - Body line-height anchor
69
+ - Spacing tokens derived from line-height
70
+
71
+ 6. **Letter Spacing** (~5 lines)
72
+ - Curve summary (negative for display, zero for body, positive for captions)
73
+ - Overline/all-caps tracking
74
+
75
+ 7. **Loading Strategy** (~10 lines)
76
+ - Recommended approach (next/font, Fontsource, self-hosted)
77
+ - `font-display` values
78
+ - Performance budget
79
+
80
+ 8. **Accessibility** (~5 lines)
81
+ - WCAG 2.2 AA compliance notes
82
+ - Body line-height >= 1.5
83
+ - SC 1.4.12 text spacing override safety
84
+
85
+ 9. **Modern CSS** (~5 lines)
86
+ - `text-wrap: balance` for headings
87
+ - `text-wrap: pretty` for paragraphs
88
+ - `font-optical-sizing: auto` if variable font
89
+ - Dark mode antialiasing (`-webkit-font-smoothing: antialiased`)
90
+
91
+ 10. **Related** (~5 lines)
92
+ - Links to palette, style, identity skills
93
+
94
+ ---
95
+
96
+ ## CSS File
97
+
98
+ Also write a CSS file alongside `typography.md` — delegate format to `domains/scale.md` CSS output rules. Default: `tailwind.typography.css` (Tailwind v4 @theme). With `--vanilla`: `typescale.css` (plain custom properties).
99
+
100
+ ---
101
+
102
+ ## Completion
103
+
104
+ Display scale preview table. Offer next steps via `AskUserQuestion`:
105
+ - Generate palette -> `/gsp-color`
106
+ - Apply a full style -> `/gsp-style`
107
+ - Continue to identity -> `/gsp-brand-identity`
108
+ - Done