@shavin/skills 0.0.0-stage → 0.1.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 (80) hide show
  1. package/AGENTS.md +193 -0
  2. package/CHANGELOG.md +27 -0
  3. package/LICENSE +21 -0
  4. package/README.md +48 -2
  5. package/bin/hex-policy.mjs +157 -0
  6. package/bin/install.mjs +219 -0
  7. package/bin/lint-tokens.mjs +178 -0
  8. package/build.mjs +540 -0
  9. package/commands/add-composition.md +14 -0
  10. package/commands/apply-theme.md +59 -0
  11. package/commands/audit-layout.md +15 -0
  12. package/commands/audit-ui.md +42 -0
  13. package/commands/compose-page.md +16 -0
  14. package/commands/create-block.md +79 -0
  15. package/commands/create-primitive.md +40 -0
  16. package/commands/create-screen.md +45 -0
  17. package/commands/create-theme.md +41 -0
  18. package/cursor/shavin.mdc +14 -0
  19. package/package.json +66 -4
  20. package/posix-path.mjs +7 -0
  21. package/skills/core-rules.md +294 -0
  22. package/skills/layout-choreography/SKILL.md +102 -0
  23. package/skills/layout-choreography/references/fallbacks-and-accessibility.md +76 -0
  24. package/skills/layout-choreography/references/scenes.md +113 -0
  25. package/skills/layout-choreography/references/shavin-timelines.md +100 -0
  26. package/skills/layout-choreography/references/tech-and-performance.md +147 -0
  27. package/skills/layout-compositions/SKILL.md +149 -0
  28. package/skills/layout-compositions/references/adapters/shavin-ui.md +122 -0
  29. package/skills/layout-compositions/references/adapters/tailwind-html.md +100 -0
  30. package/skills/layout-compositions/references/component-language.md +105 -0
  31. package/skills/layout-compositions/references/compositions/conversion.md +286 -0
  32. package/skills/layout-compositions/references/compositions/documentation.md +125 -0
  33. package/skills/layout-compositions/references/compositions/editorial.md +126 -0
  34. package/skills/layout-compositions/references/compositions/expressive.md +151 -0
  35. package/skills/layout-compositions/references/compositions/features.md +262 -0
  36. package/skills/layout-compositions/references/compositions/gallery.md +172 -0
  37. package/skills/layout-compositions/references/compositions/hero.md +184 -0
  38. package/skills/layout-compositions/references/compositions/proof.md +194 -0
  39. package/skills/layout-compositions/references/compositions/structural.md +173 -0
  40. package/skills/layout-compositions/references/distinctiveness.md +65 -0
  41. package/skills/layout-compositions/references/foundations.md +119 -0
  42. package/skills/layout-compositions/references/metadata-schema.md +64 -0
  43. package/skills/layout-compositions/references/page-recipes.md +143 -0
  44. package/skills/layout-compositions/references/selection-guide.md +207 -0
  45. package/skills/layout-compositions/references/treatments.md +60 -0
  46. package/skills/layout-compositions/references/unsection-source-examples.md +92 -0
  47. package/skills/layout-compositions/references/visual-review.md +40 -0
  48. package/skills/layout-compositions/scripts/render_wireframes.py +138 -0
  49. package/skills/layout-compositions/scripts/validate_library.py +165 -0
  50. package/skills/layout-motion/SKILL.md +83 -0
  51. package/skills/layout-motion/references/composition-motion-map.md +69 -0
  52. package/skills/layout-motion/references/presets.md +209 -0
  53. package/skills/layout-motion/references/tokens.md +100 -0
  54. package/skills/shavin-app/SKILL.md +242 -0
  55. package/skills/shavin-app/patterns.md +35 -0
  56. package/skills/shavin-studio/SKILL.md +97 -0
  57. package/skills/shavin-webpage/SKILL.md +210 -0
  58. package/skills/shavin-webpage/editorial-craft.md +117 -0
  59. package/skills/shavin-webpage/page-architecture.md +137 -0
  60. package/skills/shavin-webpage/style-recipes.md +107 -0
  61. package/skills/visual-compositor/SKILL.md +200 -0
  62. package/skills/visual-compositor/anti-patterns.md +109 -0
  63. package/skills/visual-compositor/audit-checklist.md +162 -0
  64. package/skills/visual-compositor/cognitive-layer.md +287 -0
  65. package/skills/visual-compositor/composition-motion-map.md +167 -0
  66. package/skills/visual-compositor/concentric-laws.md +147 -0
  67. package/skills/visual-compositor/docs-mode.md +32 -0
  68. package/skills/visual-compositor/editorial-mode.md +48 -0
  69. package/skills/visual-compositor/font-pairings.md +224 -0
  70. package/skills/visual-compositor/graphics-and-assets.md +128 -0
  71. package/skills/visual-compositor/interface-polish.md +125 -0
  72. package/skills/visual-compositor/layout-restraint.md +80 -0
  73. package/skills/visual-compositor/motion-and-physics.md +257 -0
  74. package/skills/visual-compositor/page-motion-presets.md +246 -0
  75. package/skills/visual-compositor/references/EDITORIAL_EXPRESSIVE.md +163 -0
  76. package/skills/visual-compositor/spacing-core.md +386 -0
  77. package/skills/visual-compositor/spacing-dense.md +63 -0
  78. package/skills/visual-compositor/spacing-marketing.md +192 -0
  79. package/skills/visual-compositor/typography-rules.md +114 -0
  80. package/token-budget.json +86 -0
@@ -0,0 +1,151 @@
1
+ # Expressive compositions (X1–X5)
2
+
3
+ Expressive layouts break from the card-and-grid default: scale contrast, overlap, offset, oversized type, sticky and horizontal structures. They are still layouts: at rest, with no motion, each must read clearly and work on a phone. Motion sits on top (see `layout-motion` for Tier 1, `layout-choreography` for scroll-linked scenes).
4
+
5
+ Two rules keep expressive layouts from becoming messy:
6
+ 1. A hidden strict grid still exists. Elements break it on purpose, but they align to something.
7
+ 2. DOM order is the intended reading order. Visual placement (overlap, offset, reordering) never changes it.
8
+
9
+ Contents: X1 Broken-Grid Collage · X2 Oversized Type Wall · X3 Sticky Split · X4 Horizontal Track · X5 Index with Hover Preview
10
+
11
+ ---
12
+
13
+ ### X1 · Broken-Grid Collage
14
+ ```yaml
15
+ id: X1
16
+ name: Broken-Grid Collage
17
+ family: expressive
18
+ job: desire
19
+ density: medium
20
+ styles: [expressive, editorial]
21
+ treatments: [open, full-bleed]
22
+ media: [photo, illustration, video]
23
+ items: 3-7 elements
24
+ slots: [primary, secondary, tertiary, caption, type]
25
+ motion: choreography-ok
26
+ ```
27
+ **Best for:** Portfolios, fashion, culture and campaign pages where composition is the message.
28
+ **Avoid when:** Content must be compared or scanned (docs, pricing), or there aren't enough strong assets: sparse collages look accidental.
29
+ **Grid:** `base`: single column with modest offsets and no overlaps that hide content. `lg`: a 12-col grid with intentional offsets: elements placed with `grid-area`/`grid-column` and overlapping rows, varied scale (one large, two medium, one small).
30
+ ```
31
+ ┌──────────────────┬───────────┬────────────────┐
32
+ │Large image (1–5) │ │ Caption │
33
+ │ │Small (7–8)│ Medium (9–12) │
34
+ │ Type overlaps │ │ │
35
+ │ the image edge │ │ │
36
+ └──────────────────┴───────────┴────────────────┘
37
+ ```
38
+ **Contract:** Each element has a role (primary, secondary, caption). Decorative images have `alt=""`; meaningful ones have real alt. Text overlapping an image has a scrim or sits on a flat area.
39
+ **Watch:** Overlap needs explicit `z-index` and never blocks tap targets. Test at 360px and at ≥ 1920px. Offsets that rely on absolute pixel values break at other widths: use grid lines and `clamp()`. Many large images: lazy-load and size correctly.
40
+
41
+ ### X2 · Oversized Type Wall
42
+ ```yaml
43
+ id: X2
44
+ name: Oversized Type Wall
45
+ family: expressive
46
+ job: attention
47
+ density: low
48
+ styles: [expressive, editorial, marketing]
49
+ treatments: [open, flat, full-bleed]
50
+ media: [none]
51
+ items: 2-5 lines
52
+ slots: [line, inline-media]
53
+ motion: choreography-ok
54
+ ```
55
+ **Best for:** Manifestos, section breaks, statements, and studio intros where the words are the visual.
56
+ **Avoid when:** The message is long. Beyond ~25 words a type wall stops being read.
57
+ **Grid:** Full-width lines of fluid type (`clamp()` or container-query units), alternating alignment per line (left, right, centred); optional small images or shapes inline between words.
58
+ ```
59
+ ┌───────────────────────┬───────────────────────┐
60
+ │ WE MAKE │ │
61
+ │ │ THINGS THAT │
62
+ │ FEEL [img] RIGHT │ │
63
+ │ │ AND WORK │
64
+ └───────────────────────┴───────────────────────┘
65
+ ```
66
+ **Contract:** Real text in one semantic element (`<h2>` or `<p>`); line splits are spans inside it. 2–5 lines.
67
+ **Watch:** Control wrapping (`text-wrap`, `hyphens`, `overflow-wrap`) and check 320px. Keep contrast on coloured grounds. Static layout must read fully before any reveal animation is added.
68
+
69
+ ### X3 · Sticky Split (Pinned Column + Scrolling Column)
70
+ ```yaml
71
+ id: X3
72
+ name: Sticky Split
73
+ family: expressive
74
+ job: understanding
75
+ density: medium
76
+ styles: [expressive, editorial, marketing]
77
+ treatments: [flat, open, full-bleed, carded]
78
+ media: [photo, product-ui, illustration]
79
+ items: n/a
80
+ slots: [pinned, scroller]
81
+ motion: choreography-ok
82
+ ```
83
+ **Best for:** An "about" or story section: a title and summary stay put while images or details scroll past.
84
+ **Avoid when:** The scrolling side is short. It must run at least ~1.5 viewports or pinning is pointless.
85
+ **Grid:** `base`: stacked, nothing pinned. `lg`: 2 columns (5:7 or 1:1); the left column is `position: sticky` (top = header + gap), its height ≤ the viewport; the right column scrolls.
86
+ ```
87
+ ┌───────────────────┬───────────────────────────┐
88
+ │ Pinned title │ Image / detail 1 │
89
+ │ + summary (sticky)│ Image / detail 2 │
90
+ │ + link │ Image / detail 3 │
91
+ └───────────────────┴───────────────────────────┘
92
+ ```
93
+ **Contract:** Pinned block fits within one viewport. Scrolling column has ≥ 3 items.
94
+ **Watch:** `position: sticky` fails when an ancestor sets `overflow`. At 200% zoom or on short screens the pinned block can exceed the viewport: only enable sticky when `min-height: 600px` matches. No pinning on phones.
95
+
96
+ ### X4 · Horizontal Track Gallery
97
+ ```yaml
98
+ id: X4
99
+ name: Horizontal Track Gallery
100
+ family: expressive
101
+ job: desire
102
+ density: medium
103
+ styles: [expressive, editorial, marketing]
104
+ treatments: [open, flat, full-bleed]
105
+ media: [photo, video, product-ui]
106
+ items: 5-10
107
+ slots: [track, card, caption, progress, controls]
108
+ motion: choreography-ok
109
+ ```
110
+ **Best for:** Sequences of large images or works that benefit from lateral browsing.
111
+ **Avoid when:** Items must be compared or read in full (use G1/G2). The track hides critical information.
112
+ **Grid:** A native horizontal scroller: `overflow-x: auto`, optional `scroll-snap`, full-height cards (60–80vw on phones, 30–45vw on desktop), a progress bar and prev/next buttons.
113
+ ```
114
+ ┌───────────────────────────────────────────────┐
115
+ │ ← → 03 / 08│
116
+ ├────────┬────────────────┬────────┬────────────┤
117
+ │ Card 1 │ Card 2 (large) │ Card 3 │ Card 4 → │
118
+ │ Caption│ Caption │ Caption│ Caption │
119
+ └────────┴────────────────┴────────┴────────────┘
120
+ ```
121
+ **Contract:** Native scrolling first (trackpad, touch and keyboard all work). Each card has a caption. Buttons are real `<button>`s.
122
+ **Watch:** Mapping vertical scroll to horizontal movement is scroll-jacking and belongs in `layout-choreography` with fallbacks. Use `overscroll-behavior-x: contain` and let vertical scroll pass through at the ends. Over-aggressive snapping frustrates people.
123
+
124
+ ### X5 · Index with Hover Preview
125
+ ```yaml
126
+ id: X5
127
+ name: Index with Hover Preview
128
+ family: expressive
129
+ job: desire
130
+ density: medium
131
+ styles: [expressive, editorial]
132
+ treatments: [open, ruled]
133
+ media: [photo]
134
+ items: 5-15
135
+ slots: [row, title, meta, preview]
136
+ motion: choreography-ok
137
+ ```
138
+ **Best for:** Project indexes and work lists: large type rows that reveal an image on hover or focus.
139
+ **Avoid when:** The list is the only way to see the work on touch devices and there is no fallback.
140
+ **Grid:** Full-width rows with hairlines: title large on the left, meta right. On hover or focus, a preview image appears at a fixed spot or follows the pointer. On touch/no-hover, show a small inline thumbnail (or none).
141
+ ```
142
+ ┌───────────────────────────┬─────────┬─────────┐
143
+ │ Project One │ Brand │ 2026 │
144
+ ├───────────────────────────┼─────────┼─────────┤
145
+ │ Project Two │ Web │ 2025 │
146
+ ├───────────────────────────┼─────────┼─────────┤
147
+ │ Project Three │ Film │ 2025 │
148
+ └───────────────────────────┴─────────┴─────────┘
149
+ ```
150
+ **Contract:** Each row is one link. Preview images are decorative (`alt=""`): the row text carries the meaning. Rows ≥ 44px tall.
151
+ **Watch:** Everything shown on hover must also show on focus. Provide the touch fallback. A pointer-following preview should use `transform` (rAF), stay small, and never cover the row text; under reduced motion use a fixed position.
@@ -0,0 +1,262 @@
1
+ # Feature / information compositions (F1–F9)
2
+
3
+ These carry the "what it does and why it matters" part of the story. The most common mistake is defaulting to F1 for everything: equal cards tell readers everything is equally important. Match the composition to the content's real shape (parallel, ranked, sequential, browsable).
4
+
5
+ Contents: F1 3-Column Grid · F2 Bento · F3 Z-Pattern · F4 Card Rail · F5 Tabbed Explorer · F6 Sticky Scroll Steps · F7 Process / Timeline · F8 Comparison Split · F9 Ecosystem Diagram
6
+
7
+ ---
8
+
9
+ ### F1 · 3-Column Feature Grid
10
+ ```yaml
11
+ id: F1
12
+ name: 3-Column Feature Grid
13
+ family: features
14
+ job: understanding
15
+ density: medium
16
+ styles: [marketing, hybrid, documentation]
17
+ treatments: [carded, ruled, flat, open]
18
+ media: [illustration, product-ui, none]
19
+ items: 3, 4 (2x2) or 6
20
+ slots: [item-media, item-title, item-desc]
21
+ motion: tier1
22
+ ```
23
+ **Best for:** Parallel, equal-weight capabilities; a "how it works" where steps are not strictly ordered.
24
+ **Avoid when:** Items differ in importance (use F2). More than 6 items (use F5 or F2). It is your reflex answer to "features" (sameness risk).
25
+ **Grid:** `base` 1 col · `sm` 2 · `lg` 3, `gap-6`. Item-count rule: 3 → 3 cols; 4 → 2×2 at `lg` (never 3+1); 6 → 3×2; 5 or 7 → change the content or use F2.
26
+ ```
27
+ ┌───────────────┬───────────────┬───────────────┐
28
+ │ Media │ Media │ Media │
29
+ │ Title │ Title │ Title │
30
+ │ Description │ Description │ Description │
31
+ └───────────────┴───────────────┴───────────────┘
32
+ ```
33
+ **Contract:** Title ≤ 5 words. Description ≤ 25 words. Media is all-or-none with one consistent aspect ratio (e.g. `aspect-video`).
34
+ **Watch:** Orphan rows at 5 or 7 items. Icon-only tiles carry no information: skip them. If the whole card is a link it must contain exactly one primary link (no nested interactive elements).
35
+
36
+ ### F2 · Bento Grid
37
+ ```yaml
38
+ id: F2
39
+ name: Bento Grid
40
+ family: features
41
+ job: desire
42
+ density: high
43
+ styles: [marketing, hybrid]
44
+ treatments: [carded, flat]
45
+ media: [product-ui, illustration, data]
46
+ items: 5-9
47
+ slots: [cell-media, cell-title, cell-desc]
48
+ motion: tier1
49
+ ```
50
+ **Best for:** Rich products with mixed-priority capabilities and "everything in one place" messaging.
51
+ **Avoid when:** Fewer than 5 items, text-only content, or all items are equally important (use F1).
52
+ **Grid:** `base` 1 col. `md` 6-col grid. `lg` 12-col grid. Span encodes priority: key capability 8 or 6, secondary 4. At most two "hero" cells. Example rows below: 8+4 / 4+4+4 / 6+6.
53
+ ```
54
+ ┌──────────────────────────────┬────────────────┐
55
+ │ Large cell (8) │Medium cell (4) │
56
+ │ │ │
57
+ ├───────────────┬──────────────┴┬───────────────┤
58
+ │ Cell (4) │ Cell (4) │ Cell (4) │
59
+ ├───────────────┴───────┬───────┴───────────────┤
60
+ │ Wide cell (6) │ Wide cell (6) │
61
+ └───────────────────────┴───────────────────────┘
62
+ ```
63
+ **Contract:** Each cell: title + ≤ 20 words + a visual that survives cropping (`object-cover`, safe focal point). DOM order equals importance order equals reading order.
64
+ **Watch:** Visual placement must never reorder the DOM: keyboard and screen-reader order would disagree with what people see. A 4-span cell gets under ~220px wide at `md`, so collapse to 6-col there. Pause offscreen animated demos. Don't put critical information only inside images.
65
+
66
+ ### F3 · Alternating Z-Pattern
67
+ ```yaml
68
+ id: F3
69
+ name: Alternating Z-Pattern
70
+ family: features
71
+ job: understanding
72
+ density: medium
73
+ styles: [marketing, hybrid]
74
+ treatments: [carded, flat, open]
75
+ media: [product-ui, photo, illustration]
76
+ items: 2-4 rows
77
+ slots: [row-media, row-title, row-desc, row-link]
78
+ motion: tier1
79
+ ```
80
+ **Best for:** Deep-dives and walkthroughs where every visual is substantial and deserves its own row.
81
+ **Avoid when:** Visuals are small icons or placeholders. More than 4 rows (fatigue): use F6. Fewer than 3 rows (the zigzag adds nothing).
82
+ **Grid:** `base`: 1 col, text then media in every row. `lg`: 2 cols (1:1 or 5:6), `gap-12`; rows `gap-20`. Alternate with CSS `order` at `lg` only; the DOM stays text → media.
83
+ ```
84
+ ┌───────────────────────┬───────────────────────┐
85
+ │ Image │ Title + text │
86
+ ├───────────────────────┼───────────────────────┤
87
+ │ Title + text │ Image │
88
+ ├───────────────────────┼───────────────────────┤
89
+ │ Image │ Title + text │
90
+ └───────────────────────┴───────────────────────┘
91
+ ```
92
+ **Contract:** Per row: title, ≤ 50 words, optional link. Visuals share one aspect ratio across rows.
93
+ **Watch:** Never alternate the DOM order itself (mobile order and reading order become inconsistent). Keep mobile order the same in every row.
94
+
95
+ ### F4 · Card Rail (Scroll-Snap Carousel)
96
+ ```yaml
97
+ id: F4
98
+ name: Card Rail
99
+ family: features
100
+ job: understanding
101
+ density: medium
102
+ styles: [marketing, hybrid]
103
+ treatments: [carded, flat, open]
104
+ media: [product-ui, photo, illustration]
105
+ items: 4-8
106
+ slots: [card-media, card-title, card-desc, controls]
107
+ motion: tier1
108
+ ```
109
+ **Best for:** Browsing peer items (case studies, templates, integrations) where scanning matters more than reading every one.
110
+ **Avoid when:** The content must be read (hidden by default = low discovery). Three or four items that fit in a grid.
111
+ **Grid:** Rail: `flex overflow-x-auto snap-x snap-mandatory`, card width 280–360px, `gap-6`, show a peek of the next card (~15%). Prev/next buttons and progress at the right of the heading row.
112
+ ```
113
+ ┌───────────────────────────────────────────────┐
114
+ │ Heading [<] [>] │
115
+ ├───────────────┬───────────────┬───────────────┤
116
+ │ Card 1 │ Card 2 │ Card 3 (peek) │
117
+ │ Media │ Media │ Media │
118
+ │ Title │ Title │ Title │
119
+ └───────────────┴───────────────┴───────────────┘
120
+ ```
121
+ **Contract:** Each card has its own destination (one link). The rail is a labelled, focusable region and the buttons are real `<button>`s. No autoplay.
122
+ **Watch:** Autoplay carousels fail WCAG 2.2.2 and users resent them. Dots alone are not navigation. Hide the scrollbar only when buttons exist. Set `scroll-padding` so snapped cards align with the container edge. The vertical space you "save" is content people don't see: test with keyboard.
123
+
124
+ ### F5 · Tabbed Feature Explorer
125
+ ```yaml
126
+ id: F5
127
+ name: Tabbed Feature Explorer
128
+ family: features
129
+ job: understanding
130
+ density: high
131
+ styles: [marketing, hybrid, documentation]
132
+ treatments: [carded, flat, ruled]
133
+ media: [product-ui, code, illustration]
134
+ items: 3-5 tabs
135
+ slots: [tablist, panel-media, panel-title, panel-desc, panel-link]
136
+ motion: tier1
137
+ ```
138
+ **Best for:** Personas, modes, languages or capability sets where the reader picks one path.
139
+ **Avoid when:** Tab labels are vague. Content must be compared side by side (use P2 or F1). More than 5 tabs (use a vertical list or F6).
140
+ **Grid:** `base`: horizontally scrollable tablist above a stacked panel (or accordion if labels don't fit). `lg`: centred tablist, then a 2-col panel (visual 7 : text 5). Reserve the tallest panel's height (stack panels in one grid cell) to avoid layout shift.
141
+ ```
142
+ ┌───────────┬───────────┬───────────┬───────────┐
143
+ │ Tab 1 │ Tab 2 │ Tab 3 │ Tab 4 │
144
+ ├───────────┴───────────┴──┬────────┴───────────┤
145
+ │ Visual preview │ Title │
146
+ │ │ Description │
147
+ │ │ [Link] │
148
+ └──────────────────────────┴────────────────────┘
149
+ ```
150
+ **Contract:** Labels ≤ 2 words. Each panel: visual + title + ≤ 40 words + optional link. Default tab is the highest-value one. Follow the ARIA tabs pattern (arrow-key roving focus).
151
+ **Watch:** Hidden panels are skimmed less and shown less prominently in search. Panel height changes cause CLS. Never auto-rotate tabs. Support deep links (`#tab-id`) if people share them.
152
+
153
+ ### F6 · Sticky Scroll Steps
154
+ ```yaml
155
+ id: F6
156
+ name: Sticky Scroll Steps
157
+ family: features
158
+ job: understanding
159
+ density: medium
160
+ styles: [marketing, hybrid, editorial]
161
+ treatments: [carded, flat, open]
162
+ media: [product-ui, illustration, data]
163
+ items: 3-6 steps
164
+ slots: [step-title, step-desc, pinned-visual]
165
+ motion: choreography-ok
166
+ ```
167
+ **Best for:** A narrative walkthrough where one visual updates as the reader moves through steps.
168
+ **Avoid when:** Steps are short and visuals independent (use F3). Small-screen-first audiences: on phones this collapses to a plain stack.
169
+ **Grid:** `base`: each step is text then its own visual, nothing pinned. `lg`: 2 cols; steps scroll in the left column (each ≈ 60–80svh tall), the visual is `position: sticky` (top = header + 24px) in the right column and swaps with the active step.
170
+ ```
171
+ ┌───────────────────────┬───────────────────────┐
172
+ │ Step 1 (scrolls) │ Pinned visual │
173
+ │ Step 2 │ (sticky, swaps state) │
174
+ │ Step 3 │ │
175
+ └───────────────────────┴───────────────────────┘
176
+ ```
177
+ **Contract:** Each step: title ≤ 6 words, ≤ 40 words, one visual state. All states share one frame and aspect ratio. Provide a no-JS fallback that shows every state stacked.
178
+ **Watch:** `position: sticky` fails inside ancestors that set `overflow`. Detect the active step with `IntersectionObserver` (a Tier 1 job). If the visual crossfade is scrubbed by scroll position, escalate to `layout-choreography`. Don't pin on short viewports (< 600px tall).
179
+
180
+ ### F7 · Process / Timeline
181
+ ```yaml
182
+ id: F7
183
+ name: Process / Timeline
184
+ family: features
185
+ job: understanding
186
+ density: medium
187
+ styles: [marketing, editorial, hybrid]
188
+ treatments: [carded, ruled, flat, open]
189
+ media: [none, illustration]
190
+ items: 3-6 steps
191
+ slots: [step-marker, step-title, step-desc]
192
+ motion: tier1
193
+ ```
194
+ **Best for:** Genuine sequences: onboarding steps, project phases, company history.
195
+ **Avoid when:** Items have no order (use F1). Numbers or dates are only decoration; number things only when order is real content.
196
+ **Grid:** `base`: vertical list with a rail on the left. `md`: up to 4 steps horizontally with a connector line; 5+ steps stay vertical with alternating sides at `lg`.
197
+ ```
198
+ ┌───────────┬───────────┬───────────┬───────────┐
199
+ │ 01 │ 02 │ 03 │ 04 │
200
+ │ Title │ Title │ Title │ Title │
201
+ │ Short text│ Short text│ Short text│ Short text│
202
+ └───────────┴───────────┴───────────┴───────────┘
203
+ ```
204
+ **Contract:** Use `<ol>`. Marker (number or date) is content: dates use `<time>`. Title ≤ 5 words, text ≤ 25 words.
205
+ **Watch:** Horizontal timelines overflow past 4 steps. The connector line is decoration; the order must be obvious without it.
206
+
207
+ ### F8 · Comparison Split
208
+ ```yaml
209
+ id: F8
210
+ name: Comparison Split
211
+ family: features
212
+ job: understanding
213
+ density: medium
214
+ styles: [marketing, hybrid]
215
+ treatments: [carded, flat, open]
216
+ media: [data, illustration]
217
+ items: 2 panels
218
+ slots: [panel-a-label, panel-a-visual, panel-a-value, panel-b-label, panel-b-visual, panel-b-value]
219
+ motion: tier1
220
+ ```
221
+ **Best for:** "Old way vs. new way" or status-quo-vs-product framing, where each side gets its own small data visual (a radial %, a mini bar, a count) rather than a prose paragraph.
222
+ **Avoid when:** The comparison has more than 2 sides, or needs row-by-row feature detail (use P2). Either side has no real figure to show (this isn't a place for a vague illustration).
223
+ **Grid:** `base`: stacked, panel A above panel B. `md`/`lg`: 2 equal columns, `gap-6`, same internal layout in both panels (label → visual → value) so the eye can diff them at a glance. The "better" panel usually gets the brand-color/tint treatment; the other stays neutral/muted.
224
+ ```
225
+ ┌────────────────────────┬────────────────────────┐
226
+ │ Label │ Label │
227
+ ├────────────────────────┼────────────────────────┤
228
+ │ Visual │ Visual │
229
+ ├────────────────────────┼────────────────────────┤
230
+ │ Value │ Value │
231
+ └────────────────────────┴────────────────────────┘
232
+ ```
233
+ **Contract:** Each panel: one label (≤ 4 words), one data visual, one value/stat. Both panels share identical internal structure — same slot order, same visual type — so only the content differs, never the layout.
234
+ **Watch:** Don't let one panel run taller than the other (equal-height cards). The muted panel still needs to be legible, not so dimmed it reads as disabled. If the two visuals are different chart types (a ring vs. a bar), the comparison won't land — use the same visual type on both sides.
235
+
236
+ ### F9 · Ecosystem / Integration Diagram
237
+ ```yaml
238
+ id: F9
239
+ name: Ecosystem / Integration Diagram
240
+ family: features
241
+ job: understanding
242
+ density: low
243
+ styles: [marketing, hybrid]
244
+ treatments: [flat, open]
245
+ media: [illustration, logos]
246
+ items: 6-14 icons
247
+ slots: [center-icon, connected-icons, headline]
248
+ motion: tier1
249
+ ```
250
+ **Best for:** "Connects to your stack" / integrations sections where a central brand mark sits among a loose scatter of partner or tool icons.
251
+ **Avoid when:** The audience needs to know exactly *which* integrations exist and click through to each (use T3 or G2 instead — this pattern is atmospheric, not a directory). Fewer than 6 icons (too sparse to read as an ecosystem).
252
+ **Grid:** `base`: a simplified static ring or 2-3 row wrap of icons around/below a center mark (skip the scatter — it doesn't survive a narrow viewport). `lg`: center icon fixed in the middle of the section; surrounding icons absolutely positioned at varying radii and slight rotation/offset from center, connected optionally by thin low-contrast lines.
253
+ ```
254
+ ┌─────────────────────────────────────────────────┐
255
+ │ Headline │
256
+ │ │
257
+ │ . │ Center icon │
258
+ │ │ │
259
+ └────────────────────────┴────────────────────────┘
260
+ ```
261
+ **Contract:** One center icon (the product/brand). 6-14 surrounding icons, each with real alt text (partner/tool name), sized consistently regardless of position. Headline or short label states what the diagram claims (e.g. "Works with your stack").
262
+ **Watch:** This is decorative/illustrative, not an interactive diagram — don't wire up hover states that imply each icon is clickable unless it actually links somewhere. Positioning with raw pixel offsets breaks at other viewports: use percentage or `clamp()`-based offsets, and provide the simplified mobile fallback rather than shrinking the scatter in place. Icons need enough contrast against the background to read at a glance.
@@ -0,0 +1,172 @@
1
+ # Gallery / showcase compositions (G1–G6)
2
+
3
+ Galleries show volume or range: many things, browsed rather than read. Decide first whether order matters (ranked, chronological) or not, because it decides between CSS columns, a grid, or a list.
4
+
5
+ Contents: G1 Masonry · G2 Filterable Grid · G3 Marquee Rows · G4 Case Study Index · G5 People Grid · G6 Product Grid
6
+
7
+ ---
8
+
9
+ ### G1 · Masonry Grid
10
+ ```yaml
11
+ id: G1
12
+ name: Masonry Grid
13
+ family: gallery
14
+ job: desire
15
+ density: medium
16
+ styles: [marketing, hybrid, expressive]
17
+ treatments: [carded, flat, open]
18
+ media: [product-ui, photo, illustration]
19
+ items: 9+
20
+ slots: [item-media, item-title]
21
+ motion: tier1
22
+ ```
23
+ **Best for:** Block catalogues, UI showcases and screenshot or photo galleries where items have different heights and order doesn't matter.
24
+ **Avoid when:** Order matters (ranked lists, chronology). CSS columns fill top-to-bottom per column, so reading and tab order will look shuffled.
25
+ **Grid:** `base` 1 col · `sm` 2 · `lg` 3 using CSS `columns`, `gap-6`, `break-inside: avoid` on items. If you need row-wise order, use a grid with measured row spans (or native masonry where support allows: verify current browser support first).
26
+ ```
27
+ ┌───────────────┬───────────────┬───────────────┐
28
+ │ Item A (tall) │ Item B │ Item C │
29
+ │ │ Item D (tall) │ Item E (tall) │
30
+ │ Item F │ │ Item G │
31
+ └───────────────┴───────────────┴───────────────┘
32
+ ```
33
+ **Contract:** Every image has `width` and `height` (or `aspect-ratio`) so the layout doesn't jump on load. Each item has a title or caption.
34
+ **Watch:** Keyboard focus order follows the DOM, not the visual rows, so keep items as independent links. Lazy-load below the fold. Avoid mixing very tall and very short items in a way that leaves ragged column ends.
35
+
36
+ ### G2 · Filterable Grid with Category Tabs
37
+ ```yaml
38
+ id: G2
39
+ name: Filterable Grid
40
+ family: gallery
41
+ job: reference
42
+ density: high
43
+ styles: [marketing, hybrid, documentation]
44
+ treatments: [carded, ruled, flat]
45
+ media: [product-ui, illustration, photo]
46
+ items: 12+
47
+ slots: [filter-bar, item-media, item-title, result-count]
48
+ motion: tier1
49
+ ```
50
+ **Best for:** Component libraries, template directories and catalogues where people look for one category.
51
+ **Avoid when:** Fewer than ~12 items (filtering adds nothing) or categories overlap so much that results feel random.
52
+ **Grid:** Filter bar above (≤ 7 categories, "All" first; a horizontally scrollable row on mobile), then a grid: `base` 1 · `sm` 2 · `lg` 3.
53
+ ```
54
+ ┌───────────────────────────────────────────────┐
55
+ │ [All] [Marketing] [Docs] 12 results │
56
+ ├───────────────┬───────────────┬───────────────┤
57
+ │ Card │ Card │ Card │
58
+ │ Card │ Card │ Card │
59
+ └───────────────┴───────────────┴───────────────┘
60
+ ```
61
+ **Contract:** A live result count or announcement. A defined empty state. The active filter is reflected in the URL.
62
+ **Watch:** Filters are either toggle buttons (`aria-pressed`) or tabs, not both. Keep focus stable after filtering and announce "12 results" in a live region. Layout animation on filter is optional polish, not a requirement.
63
+
64
+ ### G3 · Marquee Rows
65
+ ```yaml
66
+ id: G3
67
+ name: Marquee Rows
68
+ family: gallery
69
+ job: desire
70
+ density: medium
71
+ styles: [marketing, expressive]
72
+ treatments: [flat, open]
73
+ media: [product-ui, illustration, logos]
74
+ items: 12+
75
+ slots: [row-1, row-2, row-3, pause-control]
76
+ motion: tier1
77
+ ```
78
+ **Best for:** An ambient teaser of the ecosystem or catalogue across the full viewport width.
79
+ **Avoid when:** It's the only way to see the items (always link on to G1/G2). Cards must be interactive (moving targets are hard to hit).
80
+ **Grid:** 2–3 full-bleed rows moving in alternating directions, each with its content duplicated once for a seamless loop, edges faded with a mask.
81
+ ```
82
+ ┌───────────────────────────────────────────────┐
83
+ │ ░ Card Card Card Card Card → │
84
+ │ ░ ← Card Card Card Card Card │
85
+ │ ░ Card Card Card Card Card → │
86
+ └───────────────────────────────────────────────┘
87
+ ```
88
+ **Contract:** Mini-cards are non-interactive or pause on focus. A visible pause control exists. A link leads to the full catalogue.
89
+ **Watch:** Same accessibility rules as T4. `prefers-reduced-motion` renders static rows. Duplicated content is `aria-hidden`. Limit simultaneous rows on phones (performance).
90
+
91
+ ### G4 · Case Study Index
92
+ ```yaml
93
+ id: G4
94
+ name: Case Study Index
95
+ family: gallery
96
+ job: credibility
97
+ density: medium
98
+ styles: [marketing, editorial, expressive, hybrid]
99
+ treatments: [carded, ruled, flat, open]
100
+ media: [photo, product-ui]
101
+ items: 3-8
102
+ slots: [thumbnail, client, outcome, link]
103
+ motion: tier1
104
+ ```
105
+ **Best for:** Agencies, studios and B2B products showing selected work with outcomes.
106
+ **Avoid when:** There is no real outcome to state (thumbnails alone say little).
107
+ **Grid:** `base`: 1 col stack. `md`: 2 cols. `lg`: one large lead (`col-span-7`) beside a list, or full-width rows (image left, meta right) for a text-forward index.
108
+ ```
109
+ ┌──────────────────────────┬────────────────────┐
110
+ │ Lead case study (image) │ Client A — outcome │
111
+ │ Client + outcome headline│ Client B — outcome │
112
+ │ [Read case study] │ Client C — outcome │
113
+ └──────────────────────────┴────────────────────┘
114
+ ```
115
+ **Contract:** Each item: client, one-line outcome with a number if true, thumbnail, single link. Sorted by relevance to the audience, not date.
116
+ **Watch:** Crop thumbnails around a focal point. Hover previews don't exist on touch: the item must stand on its own. Make one link per item, not several.
117
+
118
+ ### G5 · People / Team Grid
119
+ ```yaml
120
+ id: G5
121
+ name: People Grid
122
+ family: gallery
123
+ job: credibility
124
+ density: medium
125
+ styles: [marketing, editorial, hybrid]
126
+ treatments: [carded, ruled, flat, open]
127
+ media: [photo]
128
+ items: 4-12
129
+ slots: [portrait, name, role, link]
130
+ motion: tier0
131
+ ```
132
+ **Best for:** About pages, leadership and studio teams.
133
+ **Avoid when:** Photography is inconsistent or you don't have consent to publish names and photos.
134
+ **Grid:** `base` 2 cols · `md` 3 · `lg` 4, with a consistent 4:5 portrait crop.
135
+ ```
136
+ ┌───────────┬───────────┬───────────┬───────────┐
137
+ │ Photo │ Photo │ Photo │ Photo │
138
+ │ Name │ Name │ Name │ Name │
139
+ │ Role │ Role │ Role │ Role │
140
+ └───────────┴───────────┴───────────┴───────────┘
141
+ ```
142
+ **Contract:** One photographic style. `alt` is the person's name (or empty if the name follows in text). Name and role always visible.
143
+ **Watch:** Don't crop faces. Long titles wrap: reserve height. Decide "leadership only" vs "everyone" and stick to it.
144
+
145
+ ### G6 · Product Grid
146
+ ```yaml
147
+ id: G6
148
+ name: Product Grid
149
+ family: gallery
150
+ job: desire
151
+ density: medium
152
+ styles: [marketing, hybrid]
153
+ treatments: [carded, flat, open]
154
+ media: [photo]
155
+ items: 4, 6, 8 or 12
156
+ slots: [item-media, item-title, item-price, item-action, badge]
157
+ motion: tier1
158
+ ```
159
+ **Best for:** A shop or catalogue where each item is bought or opened: prints, ceramics, merch, courses, retreat dates.
160
+ **Avoid when:** More than ~12 items that people filter (use G2), items without a photo (use F1), or a single product (use H3 or F3).
161
+ **Grid:** `base` 2 · `md` 3 · `lg` 4. Each item is one `Card` with no inner padding on the image: `AspectRatio` 4:5 holding an `Image` with fixed `width`/`height`, then `Flex direction="column" gap="2"` with the name (`Text`, `text-fg`), the price (`Text`, `text-fg`, tabular figures) and one `Button`.
162
+ ```
163
+ ┌───────────────────────────────────────────────┐
164
+ │ All products │
165
+ │ [ photo ] [ photo ] [ photo ] [ photo ] │
166
+ │ Name Name Name Name │
167
+ │ $48 $52 $36 $60 │
168
+ │ [ Add ] [ Add ] [ Add ] [ Add ] │
169
+ └───────────────────────────────────────────────┘
170
+ ```
171
+ **Contract:** Every `Image` has real alt text. The name is the link, with the whole card as its hit area, and the one `Button` stays separately focusable. At most one `Badge` per card, and only when true ("New", "Sold out"). The price carries its currency. A sold-out item uses `Button disabledReason="Sold out"`. A loading state of `Skeleton` cards with the same aspect ratio. An `EmptyState kind="empty"` when the list is empty.
172
+ **Watch:** Keep the image ratio identical across cards or the rows go ragged. Never crop a product so its edge is lost. Do not fill the grid with placeholder photos of other brands' products. Price text must pass contrast on the card surface.