@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.
- package/AGENTS.md +193 -0
- package/CHANGELOG.md +27 -0
- package/LICENSE +21 -0
- package/README.md +48 -2
- package/bin/hex-policy.mjs +157 -0
- package/bin/install.mjs +219 -0
- package/bin/lint-tokens.mjs +178 -0
- package/build.mjs +540 -0
- package/commands/add-composition.md +14 -0
- package/commands/apply-theme.md +59 -0
- package/commands/audit-layout.md +15 -0
- package/commands/audit-ui.md +42 -0
- package/commands/compose-page.md +16 -0
- package/commands/create-block.md +79 -0
- package/commands/create-primitive.md +40 -0
- package/commands/create-screen.md +45 -0
- package/commands/create-theme.md +41 -0
- package/cursor/shavin.mdc +14 -0
- package/package.json +66 -4
- package/posix-path.mjs +7 -0
- package/skills/core-rules.md +294 -0
- package/skills/layout-choreography/SKILL.md +102 -0
- package/skills/layout-choreography/references/fallbacks-and-accessibility.md +76 -0
- package/skills/layout-choreography/references/scenes.md +113 -0
- package/skills/layout-choreography/references/shavin-timelines.md +100 -0
- package/skills/layout-choreography/references/tech-and-performance.md +147 -0
- package/skills/layout-compositions/SKILL.md +149 -0
- package/skills/layout-compositions/references/adapters/shavin-ui.md +122 -0
- package/skills/layout-compositions/references/adapters/tailwind-html.md +100 -0
- package/skills/layout-compositions/references/component-language.md +105 -0
- package/skills/layout-compositions/references/compositions/conversion.md +286 -0
- package/skills/layout-compositions/references/compositions/documentation.md +125 -0
- package/skills/layout-compositions/references/compositions/editorial.md +126 -0
- package/skills/layout-compositions/references/compositions/expressive.md +151 -0
- package/skills/layout-compositions/references/compositions/features.md +262 -0
- package/skills/layout-compositions/references/compositions/gallery.md +172 -0
- package/skills/layout-compositions/references/compositions/hero.md +184 -0
- package/skills/layout-compositions/references/compositions/proof.md +194 -0
- package/skills/layout-compositions/references/compositions/structural.md +173 -0
- package/skills/layout-compositions/references/distinctiveness.md +65 -0
- package/skills/layout-compositions/references/foundations.md +119 -0
- package/skills/layout-compositions/references/metadata-schema.md +64 -0
- package/skills/layout-compositions/references/page-recipes.md +143 -0
- package/skills/layout-compositions/references/selection-guide.md +207 -0
- package/skills/layout-compositions/references/treatments.md +60 -0
- package/skills/layout-compositions/references/unsection-source-examples.md +92 -0
- package/skills/layout-compositions/references/visual-review.md +40 -0
- package/skills/layout-compositions/scripts/render_wireframes.py +138 -0
- package/skills/layout-compositions/scripts/validate_library.py +165 -0
- package/skills/layout-motion/SKILL.md +83 -0
- package/skills/layout-motion/references/composition-motion-map.md +69 -0
- package/skills/layout-motion/references/presets.md +209 -0
- package/skills/layout-motion/references/tokens.md +100 -0
- package/skills/shavin-app/SKILL.md +242 -0
- package/skills/shavin-app/patterns.md +35 -0
- package/skills/shavin-studio/SKILL.md +97 -0
- package/skills/shavin-webpage/SKILL.md +210 -0
- package/skills/shavin-webpage/editorial-craft.md +117 -0
- package/skills/shavin-webpage/page-architecture.md +137 -0
- package/skills/shavin-webpage/style-recipes.md +107 -0
- package/skills/visual-compositor/SKILL.md +200 -0
- package/skills/visual-compositor/anti-patterns.md +109 -0
- package/skills/visual-compositor/audit-checklist.md +162 -0
- package/skills/visual-compositor/cognitive-layer.md +287 -0
- package/skills/visual-compositor/composition-motion-map.md +167 -0
- package/skills/visual-compositor/concentric-laws.md +147 -0
- package/skills/visual-compositor/docs-mode.md +32 -0
- package/skills/visual-compositor/editorial-mode.md +48 -0
- package/skills/visual-compositor/font-pairings.md +224 -0
- package/skills/visual-compositor/graphics-and-assets.md +128 -0
- package/skills/visual-compositor/interface-polish.md +125 -0
- package/skills/visual-compositor/layout-restraint.md +80 -0
- package/skills/visual-compositor/motion-and-physics.md +257 -0
- package/skills/visual-compositor/page-motion-presets.md +246 -0
- package/skills/visual-compositor/references/EDITORIAL_EXPRESSIVE.md +163 -0
- package/skills/visual-compositor/spacing-core.md +386 -0
- package/skills/visual-compositor/spacing-dense.md +63 -0
- package/skills/visual-compositor/spacing-marketing.md +192 -0
- package/skills/visual-compositor/typography-rules.md +114 -0
- package/token-budget.json +86 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Conversion compositions: CTA, contact, pricing, FAQ (C1–C5, P1–P3, Q1–Q2)
|
|
2
|
+
|
|
3
|
+
These sections ask for a decision. Each should carry one clear job and one primary action. When two of these sit next to each other, check they aren't competing (a CTA banner directly under a pricing table is fine; two banners are not).
|
|
4
|
+
|
|
5
|
+
Contents: C1 Centered CTA · C2 Split CTA (code) · C3 Full-Width Gradient CTA · C4 Contact Split · C5 Newsletter Capture · P1 3-Tier Pricing · P2 Comparison Matrix · P3 Single Plan · Q1 Two-Column FAQ · Q2 Accordion FAQ
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### C1 · Centered CTA Banner
|
|
10
|
+
```yaml
|
|
11
|
+
id: C1
|
|
12
|
+
name: Centered CTA Banner
|
|
13
|
+
family: conversion
|
|
14
|
+
job: action
|
|
15
|
+
density: low
|
|
16
|
+
styles: [marketing, hybrid]
|
|
17
|
+
treatments: [carded, flat, open]
|
|
18
|
+
media: [none]
|
|
19
|
+
items: 1 action
|
|
20
|
+
slots: [headline, sub, cta-primary, cta-secondary]
|
|
21
|
+
motion: tier1
|
|
22
|
+
```
|
|
23
|
+
**Best for:** The closing conversion at the end of a page.
|
|
24
|
+
**Avoid when:** A CTA already sits immediately above, or several competing actions are offered.
|
|
25
|
+
**Grid:** Narrow container, one centred panel or open block, text measure ≤ 50ch.
|
|
26
|
+
```
|
|
27
|
+
┌───────────────────────────────────────────────┐
|
|
28
|
+
│ Ready to build? │
|
|
29
|
+
│ One sentence about what happens next. │
|
|
30
|
+
│ [Primary CTA] [Secondary] │
|
|
31
|
+
└───────────────────────────────────────────────┘
|
|
32
|
+
```
|
|
33
|
+
**Contract:** Headline states the outcome (≤ 8 words). Primary CTA is verb + object ("Start free trial"). Optional secondary. Keep the same label as the hero CTA.
|
|
34
|
+
**Watch:** Reduce panel padding on mobile (`p-12` → `p-8`). A third link dilutes the ask.
|
|
35
|
+
|
|
36
|
+
### C2 · Split CTA (Text + Code)
|
|
37
|
+
```yaml
|
|
38
|
+
id: C2
|
|
39
|
+
name: Split CTA (Text + Code)
|
|
40
|
+
family: conversion
|
|
41
|
+
job: action
|
|
42
|
+
density: medium
|
|
43
|
+
styles: [marketing, hybrid, documentation]
|
|
44
|
+
treatments: [carded, flat]
|
|
45
|
+
media: [code]
|
|
46
|
+
items: 1 action
|
|
47
|
+
slots: [headline, sub, cta, code-block]
|
|
48
|
+
motion: tier0
|
|
49
|
+
```
|
|
50
|
+
**Best for:** Developer conversion: "copy and run in 30 seconds".
|
|
51
|
+
**Avoid when:** The audience isn't technical, or the install step has prerequisites you can't show.
|
|
52
|
+
**Grid:** `base`: stack. `lg`: 2 columns (1:1) inside one panel; text left, terminal/install block right.
|
|
53
|
+
```
|
|
54
|
+
┌───────────────────────┬───────────────────────┐
|
|
55
|
+
│ Start building │ npm i @scope/pkg │
|
|
56
|
+
│ in 30 seconds. │ import { x } from ... │
|
|
57
|
+
│ [Get started] │ (copy button) │
|
|
58
|
+
└───────────────────────┴───────────────────────┘
|
|
59
|
+
```
|
|
60
|
+
**Contract:** The command is copyable with a labelled copy button and an announced confirmation. ≤ 6 lines of code. No unresolved placeholders in the command.
|
|
61
|
+
**Watch:** Long commands must wrap or scroll inside the block, never widen the page. Tabs for package managers are optional. Keep code contrast ≥ 4.5:1.
|
|
62
|
+
|
|
63
|
+
### C3 · Full-Width Gradient CTA
|
|
64
|
+
```yaml
|
|
65
|
+
id: C3
|
|
66
|
+
name: Full-Width Gradient CTA
|
|
67
|
+
family: conversion
|
|
68
|
+
job: action
|
|
69
|
+
density: low
|
|
70
|
+
styles: [marketing, expressive]
|
|
71
|
+
treatments: [full-bleed]
|
|
72
|
+
media: [none, illustration]
|
|
73
|
+
items: 1 action
|
|
74
|
+
slots: [background, headline, cta]
|
|
75
|
+
motion: tier1
|
|
76
|
+
```
|
|
77
|
+
**Best for:** An emotional, high-contrast page ending.
|
|
78
|
+
**Avoid when:** The glow is the only thing distinguishing the section. Or the hero already uses the exact same gradient (echo it, don't copy it).
|
|
79
|
+
**Grid:** Full-bleed section, content centred, ≤ 50ch wide.
|
|
80
|
+
```
|
|
81
|
+
┌───────────────────────────────────────────────┐
|
|
82
|
+
│░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
|
83
|
+
│░░░░░░░░░░░░░ Closing headline ░░░░░░░░░░░░░░░░│
|
|
84
|
+
│░░░░░░░░░░░░░░░ [ CTA ] ░░░░░░░░░░░░░░░░░░░░░░░│
|
|
85
|
+
└───────────────────────────────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
**Contract:** Text over the glow passes 4.5:1 at its brightest point. One action.
|
|
88
|
+
**Watch:** Build glows with CSS gradients, not large blur filters (mobile paint cost). Under reduced motion, keep it static.
|
|
89
|
+
|
|
90
|
+
### C4 · Contact Split (Form + Details)
|
|
91
|
+
```yaml
|
|
92
|
+
id: C4
|
|
93
|
+
name: Contact Split
|
|
94
|
+
family: conversion
|
|
95
|
+
job: action
|
|
96
|
+
density: medium
|
|
97
|
+
styles: [marketing, editorial, expressive, hybrid]
|
|
98
|
+
treatments: [carded, ruled, flat, open]
|
|
99
|
+
media: [none]
|
|
100
|
+
items: 4-6 fields
|
|
101
|
+
slots: [details, form, submit, alt-contact]
|
|
102
|
+
motion: tier0
|
|
103
|
+
```
|
|
104
|
+
**Best for:** Sales enquiries, studio contact, support intake.
|
|
105
|
+
**Avoid when:** A single email link would do (a form adds friction).
|
|
106
|
+
**Grid:** `base`: form first, details after. `lg`: 12-col, details `col-span-5` (address, email, hours), form `col-span-7`.
|
|
107
|
+
```
|
|
108
|
+
┌───────────────────┬───────────────────────────┐
|
|
109
|
+
│ Let's talk │ Name │
|
|
110
|
+
│ hello@company.com │ Email │
|
|
111
|
+
│ Address · Hours │ Message │
|
|
112
|
+
│ │ [Send message] │
|
|
113
|
+
└───────────────────┴───────────────────────────┘
|
|
114
|
+
```
|
|
115
|
+
**Contract:** Visible labels on every field (not placeholder-only). ≤ 6 fields. Explicit submit label. Errors tied to fields with `aria-describedby`. Success, error, loading and offline states designed. A non-form alternative (email) is shown.
|
|
116
|
+
**Watch:** Set `autocomplete` attributes. Never clear entered data on error. CAPTCHA and honeypots need accessible alternatives.
|
|
117
|
+
|
|
118
|
+
### C5 · Newsletter Capture Banner
|
|
119
|
+
```yaml
|
|
120
|
+
id: C5
|
|
121
|
+
name: Newsletter Capture Banner
|
|
122
|
+
family: conversion
|
|
123
|
+
job: action
|
|
124
|
+
density: low
|
|
125
|
+
styles: [marketing, editorial, hybrid]
|
|
126
|
+
treatments: [flat, full-bleed, carded]
|
|
127
|
+
media: [none]
|
|
128
|
+
items: 1 field
|
|
129
|
+
slots: [headline, sub, email-input, cta-primary]
|
|
130
|
+
motion: tier1
|
|
131
|
+
```
|
|
132
|
+
**Best for:** A lightweight, single-field email capture: footer-adjacent newsletter signup, "stay close to our work" bands.
|
|
133
|
+
**Avoid when:** You need more than an email address (use C4). The same page already has a C1/C3 CTA banner right next to it (two asks compete — pick one).
|
|
134
|
+
**Grid:** Full-width colored band. `base`: headline, sub, then input and button stacked full-width. `md`+: headline/sub left or centered, input + button inline in a single row (input flexes, button fixed width).
|
|
135
|
+
```
|
|
136
|
+
┌─────────────────────────────────────────────────┐
|
|
137
|
+
│ Headline │
|
|
138
|
+
│ Sub │
|
|
139
|
+
│ Email input │ Submit │
|
|
140
|
+
└──────────────────────────────────┴──────────────┘
|
|
141
|
+
```
|
|
142
|
+
**Contract:** One field (email). Headline ≤ 8 words. Button label is a verb ("Subscribe", "Get updates"), never just "Submit". Inline success/error message, not a full page reload.
|
|
143
|
+
**Watch:** Label the input for screen readers even if visually hidden (a placeholder alone is not a label). Announce success/error via `aria-live`. Don't pair this with C1/C4 in the same viewport — pick one primary ask per section. Respect `prefers-reduced-motion` for any entry animation.
|
|
144
|
+
|
|
145
|
+
### P1 · 3-Tier Pricing Table
|
|
146
|
+
```yaml
|
|
147
|
+
id: P1
|
|
148
|
+
name: 3-Tier Pricing Table
|
|
149
|
+
family: conversion
|
|
150
|
+
job: action
|
|
151
|
+
density: high
|
|
152
|
+
styles: [marketing, hybrid]
|
|
153
|
+
treatments: [carded, flat]
|
|
154
|
+
media: [none]
|
|
155
|
+
items: 3 (max 4)
|
|
156
|
+
slots: [plan-name, price, features, cta, badge]
|
|
157
|
+
motion: tier0
|
|
158
|
+
```
|
|
159
|
+
**Best for:** SaaS plan comparison (for example Free / Pro / Enterprise).
|
|
160
|
+
**Avoid when:** Plans differ in too many dimensions to summarise (add P2). Only one plan exists (use P3).
|
|
161
|
+
**Grid:** `base`: 1 column, recommended plan first (via `order`). `lg`: 3 equal columns. The highlighted tier is set apart by a ring/tint and a badge.
|
|
162
|
+
```
|
|
163
|
+
┌───────────────┬───────────────┬───────────────┐
|
|
164
|
+
│ Free │ Pro ★ Popular │ Enterprise │
|
|
165
|
+
│ $0 │ $29 / mo │ Custom │
|
|
166
|
+
│ 4 bullets │ 6 bullets │ 6 bullets │
|
|
167
|
+
│ [CTA] │ [CTA] │[Contact sales]│
|
|
168
|
+
└───────────────┴───────────────┴───────────────┘
|
|
169
|
+
```
|
|
170
|
+
**Contract:** Plan name, price + period + billing note, ≤ 6 bullets of differentiators (not every feature), one CTA per card. "Most popular" must be true.
|
|
171
|
+
**Watch:** A thicker border on the featured card shifts layout: use an inset ring or `box-shadow`. Announce monthly/annual toggle changes with `aria-live`. The badge must not rely on colour alone. State tax and currency handling.
|
|
172
|
+
|
|
173
|
+
### P2 · Feature Comparison Matrix
|
|
174
|
+
```yaml
|
|
175
|
+
id: P2
|
|
176
|
+
name: Feature Comparison Matrix
|
|
177
|
+
family: conversion
|
|
178
|
+
job: understanding
|
|
179
|
+
density: high
|
|
180
|
+
styles: [marketing, hybrid, documentation]
|
|
181
|
+
treatments: [ruled, flat, carded]
|
|
182
|
+
media: [data]
|
|
183
|
+
items: 10-40 rows
|
|
184
|
+
slots: [plan-header, feature-row, group-header]
|
|
185
|
+
motion: tier0
|
|
186
|
+
```
|
|
187
|
+
**Best for:** Technical buyers who need granular plan comparison.
|
|
188
|
+
**Avoid when:** Fewer than 3 differentiating rows, or a phone-first audience with no simplified view.
|
|
189
|
+
**Grid:** A real `<table>`: sticky header row and sticky first column. `base`: horizontal scroll inside its own wrapper with a visible edge cue, or a per-plan accordion.
|
|
190
|
+
```
|
|
191
|
+
┌─────────────────┬────────┬────────┬───────────┐
|
|
192
|
+
│ Feature │ Free │ Pro │ Team │
|
|
193
|
+
├─────────────────┼────────┼────────┼───────────┤
|
|
194
|
+
│ Seats │ 1 │ 5 │ ∞ │
|
|
195
|
+
│ SSO │ – │ – │ ✓ │
|
|
196
|
+
│ Audit log │ – │ ✓ │ ✓ │
|
|
197
|
+
└─────────────────┴────────┴────────┴───────────┘
|
|
198
|
+
```
|
|
199
|
+
**Contract:** `<th scope>` on row and column headers. Check/cross icons have text alternatives ("Included" / "Not included"). ≤ 8 groups with subheads.
|
|
200
|
+
**Watch:** Icon-only cells are inaccessible. `position: sticky` needs a scroll wrapper that doesn't clip it. Collapse long groups behind a "Compare all features" control.
|
|
201
|
+
|
|
202
|
+
### P3 · Single Card Plan
|
|
203
|
+
```yaml
|
|
204
|
+
id: P3
|
|
205
|
+
name: Single Card Plan
|
|
206
|
+
family: conversion
|
|
207
|
+
job: action
|
|
208
|
+
density: low
|
|
209
|
+
styles: [marketing, hybrid]
|
|
210
|
+
treatments: [carded, flat, open]
|
|
211
|
+
media: [none]
|
|
212
|
+
items: 1 plan
|
|
213
|
+
slots: [price, checklist, cta, fine-print]
|
|
214
|
+
motion: tier0
|
|
215
|
+
```
|
|
216
|
+
**Best for:** Open-source sponsorship, flat-fee products and single-tier SaaS.
|
|
217
|
+
**Avoid when:** Several plans exist (use P1). The card would stand alone with no proof nearby.
|
|
218
|
+
**Grid:** Narrow container (≈ 480–560px), one centred card.
|
|
219
|
+
```
|
|
220
|
+
┌───────────────────────────────────────────────┐
|
|
221
|
+
│ Solo plan │
|
|
222
|
+
│ $19 / month │
|
|
223
|
+
│ ✓ Feature ✓ Feature ✓ Feature │
|
|
224
|
+
│ [ Get started ] │
|
|
225
|
+
│ Cancel anytime · 30-day refund │
|
|
226
|
+
└───────────────────────────────────────────────┘
|
|
227
|
+
```
|
|
228
|
+
**Contract:** Price, ≤ 6 checklist items, one CTA, small print (billing, refund).
|
|
229
|
+
**Watch:** A lone card feels thin: pair it with T1 or T2 nearby. Decorative check icons are `aria-hidden`; the list is a real `<ul>`.
|
|
230
|
+
|
|
231
|
+
### Q1 · Two-Column FAQ (List + Answer Panel)
|
|
232
|
+
```yaml
|
|
233
|
+
id: Q1
|
|
234
|
+
name: Two-Column FAQ
|
|
235
|
+
family: conversion
|
|
236
|
+
job: understanding
|
|
237
|
+
density: high
|
|
238
|
+
styles: [documentation, hybrid, marketing]
|
|
239
|
+
treatments: [carded, ruled, flat]
|
|
240
|
+
media: [code, none]
|
|
241
|
+
items: 6-12
|
|
242
|
+
slots: [question-list, answer-panel]
|
|
243
|
+
motion: tier1
|
|
244
|
+
```
|
|
245
|
+
**Best for:** Documentation-adjacent FAQs, or answers that include code or long explanation.
|
|
246
|
+
**Avoid when:** Answers are short (use Q2). The audience is mostly on phones.
|
|
247
|
+
**Grid:** `base`: falls back to the Q2 accordion. `lg`: 12-col, question list `col-span-5` (sticky), answer panel `col-span-7`.
|
|
248
|
+
```
|
|
249
|
+
┌───────────────────┬───────────────────────────┐
|
|
250
|
+
│ ▸ Question one │ Answer to the selected │
|
|
251
|
+
│ ▾ Two (selected) │ question, with code │
|
|
252
|
+
│ ▸ Question three │ or longer explanation │
|
|
253
|
+
└───────────────────┴───────────────────────────┘
|
|
254
|
+
```
|
|
255
|
+
**Contract:** Answers ≤ 120 words or contain code. First question selected by default. Each question deep-links (hash).
|
|
256
|
+
**Watch:** Hiding answers behind selection hides them from find-in-page. The mobile fallback is an accordion, never a squeezed two-pane. Use a vertical tablist or a list of links, but pick one pattern and implement it fully.
|
|
257
|
+
|
|
258
|
+
### Q2 · Centered Accordion Stack
|
|
259
|
+
```yaml
|
|
260
|
+
id: Q2
|
|
261
|
+
name: Centered Accordion Stack
|
|
262
|
+
family: conversion
|
|
263
|
+
job: understanding
|
|
264
|
+
density: medium
|
|
265
|
+
styles: [marketing, hybrid, documentation]
|
|
266
|
+
treatments: [carded, ruled, flat, open]
|
|
267
|
+
media: [none]
|
|
268
|
+
items: 5-8
|
|
269
|
+
slots: [question, answer]
|
|
270
|
+
motion: tier1
|
|
271
|
+
```
|
|
272
|
+
**Best for:** Standard FAQs with short answers.
|
|
273
|
+
**Avoid when:** Answers are long or code-heavy (use Q1), or the content is legally required to be visible.
|
|
274
|
+
**Grid:** Single column, max width ≈ 68ch, centred; one open at a time or many open.
|
|
275
|
+
```
|
|
276
|
+
┌───────────────────────────────────────────────┐
|
|
277
|
+
│ Frequently asked questions │
|
|
278
|
+
├───────────────────────────────────────────────┤
|
|
279
|
+
│ ▸ How does tokenization work? │
|
|
280
|
+
│ ▾ Is it WCAG accessible? │
|
|
281
|
+
│ Yes, every primitive is tested... │
|
|
282
|
+
│ ▸ Can I customize themes? │
|
|
283
|
+
└───────────────────────────────────────────────┘
|
|
284
|
+
```
|
|
285
|
+
**Contract:** Questions phrased the way users ask them. Answers ≤ 80 words. Each trigger is a `<button aria-expanded>` inside a heading.
|
|
286
|
+
**Watch:** Height animation respects reduced motion. FAQ rich results are now largely restricted, so don't add structured data expecting that payoff. Anything users need to compare should not live in an accordion.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Documentation compositions (D1–D4)
|
|
2
|
+
|
|
3
|
+
Docs layouts are for people who are working: finding, reading, copying. They optimise for scanning, stable navigation, and code. Decoration and motion stay minimal. Use `ruled` or `flat` treatments and keep the reading column disciplined even when code is wider.
|
|
4
|
+
|
|
5
|
+
Contents: D1 Docs Shell · D2 API Reference · D3 Changelog · D4 Docs Landing
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### D1 · Docs Shell (Three-Pane)
|
|
10
|
+
```yaml
|
|
11
|
+
id: D1
|
|
12
|
+
name: Docs Shell
|
|
13
|
+
family: documentation
|
|
14
|
+
job: reference
|
|
15
|
+
density: high
|
|
16
|
+
styles: [documentation, hybrid]
|
|
17
|
+
treatments: [ruled, flat, carded]
|
|
18
|
+
media: [code, none]
|
|
19
|
+
items: sidebar ≤ 3 levels
|
|
20
|
+
slots: [header, sidebar, content, toc, pager, feedback]
|
|
21
|
+
motion: tier1
|
|
22
|
+
```
|
|
23
|
+
**Best for:** Product docs, guides, handbooks and API guides of any size.
|
|
24
|
+
**Avoid when:** The content is a single long article (use E1) or marketing copy.
|
|
25
|
+
**Grid:** `base`: header + a collapsible nav drawer; content full width; an "On this page" disclosure replaces the TOC. `lg`: sidebar ≈ 260px + content (prose ≤ 72ch; code may run wider). `xl`: add a sticky right TOC ≈ 220px.
|
|
26
|
+
```
|
|
27
|
+
┌───────────┬──────────────────────┬────────────┐
|
|
28
|
+
│ Sidebar │ Breadcrumb / Title │ TOC │
|
|
29
|
+
│ ▸ Start │ Prose (72ch) + code │ · Intro │
|
|
30
|
+
│ ▾ Guides │ callouts, tables │ · Setup │
|
|
31
|
+
│ Current │ ← Prev Next → │ · Usage │
|
|
32
|
+
└───────────┴──────────────────────┴────────────┘
|
|
33
|
+
```
|
|
34
|
+
**Contract:** Sidebar tree ≤ 3 levels with the current page marked `aria-current`. Breadcrumb, previous/next pager, and an "Edit" or feedback link on every page. TOC built from `h2`/`h3` with scroll-spy (Tier 1).
|
|
35
|
+
**Watch:** Nested scroll containers break anchors and find-in-page: offset anchors with `scroll-margin-top`. A search shortcut (`/` or ⌘K) should exist. Code blocks: copy button, language label, horizontal scroll (not wrap), contrast ≥ 4.5:1. Callouts (note, warning) use icon + text label, never colour alone. Sticky sidebar height = `100svh` − header. Version switcher when docs are versioned.
|
|
36
|
+
|
|
37
|
+
### D2 · API Reference (Prose + Code Rail)
|
|
38
|
+
```yaml
|
|
39
|
+
id: D2
|
|
40
|
+
name: API Reference
|
|
41
|
+
family: documentation
|
|
42
|
+
job: reference
|
|
43
|
+
density: high
|
|
44
|
+
styles: [documentation]
|
|
45
|
+
treatments: [ruled, flat]
|
|
46
|
+
media: [code]
|
|
47
|
+
items: n endpoints
|
|
48
|
+
slots: [endpoint-header, params, examples, responses, errors]
|
|
49
|
+
motion: tier0
|
|
50
|
+
```
|
|
51
|
+
**Best for:** REST/GraphQL/SDK reference where description and example are read side by side.
|
|
52
|
+
**Avoid when:** The docs are conceptual guides (use D1 with prose).
|
|
53
|
+
**Grid:** `base`: stacked (description, parameters, then examples). `lg`: 2 columns (5:4): left = description + parameters table; right = sticky code panel with language tabs and a response sample.
|
|
54
|
+
```
|
|
55
|
+
┌─────────────────────────┬─────────────────────┐
|
|
56
|
+
│ POST /v1/items │ curl · js · py │
|
|
57
|
+
│ Auth: bearer token │ curl -X POST ... │
|
|
58
|
+
│ Parameters (table) │ │
|
|
59
|
+
│ name type required │ Response 200 │
|
|
60
|
+
│ Errors │ { "id": "..." } │
|
|
61
|
+
└─────────────────────────┴─────────────────────┘
|
|
62
|
+
```
|
|
63
|
+
**Contract:** Per endpoint: method + path, auth, parameters (name, type, required, description), example request and response, error codes.
|
|
64
|
+
**Watch:** A sticky code rail taller than the viewport must scroll internally. Nested-object parameters need collapsible rows. Left-to-right tab order must match reading order. Copy buttons on every code block. Never show real secrets in samples.
|
|
65
|
+
|
|
66
|
+
### D3 · Changelog (Dated Timeline)
|
|
67
|
+
```yaml
|
|
68
|
+
id: D3
|
|
69
|
+
name: Changelog
|
|
70
|
+
family: documentation
|
|
71
|
+
job: reference
|
|
72
|
+
density: medium
|
|
73
|
+
styles: [documentation, marketing, hybrid]
|
|
74
|
+
treatments: [ruled, open, flat]
|
|
75
|
+
media: [none, product-ui]
|
|
76
|
+
items: n releases
|
|
77
|
+
slots: [version, date, change-group, link]
|
|
78
|
+
motion: tier0
|
|
79
|
+
```
|
|
80
|
+
**Best for:** Release notes and product updates people scan for "what changed".
|
|
81
|
+
**Avoid when:** You publish rarely and want a story (use E1).
|
|
82
|
+
**Grid:** `base`: stacked entries. `md`: 12-col; version + date `col-span-3` (sticky), notes `col-span-9`, grouped under Added / Changed / Fixed / Removed / Security.
|
|
83
|
+
```
|
|
84
|
+
┌───────────────┬───────────────────────────────┐
|
|
85
|
+
│ v2.4.0 │ Added │
|
|
86
|
+
│ 12 Mar 2026 │ · New export option │
|
|
87
|
+
│ │ Fixed │
|
|
88
|
+
│ │ · Layout shift in tables │
|
|
89
|
+
├───────────────┼───────────────────────────────┤
|
|
90
|
+
│ v2.3.2 │ Fixed │
|
|
91
|
+
└───────────────┴───────────────────────────────┘
|
|
92
|
+
```
|
|
93
|
+
**Contract:** Each release is an `<article>` with the version and a `<time>` date. Breaking changes are flagged at the top with a link to the migration guide. One anchor per version.
|
|
94
|
+
**Watch:** Tag badges need a text label (not colour only). Offer a feed (RSS/Atom). Long histories paginate.
|
|
95
|
+
|
|
96
|
+
### D4 · Docs Landing (Search + Quickstart)
|
|
97
|
+
```yaml
|
|
98
|
+
id: D4
|
|
99
|
+
name: Docs Landing
|
|
100
|
+
family: documentation
|
|
101
|
+
job: orientation
|
|
102
|
+
density: medium
|
|
103
|
+
styles: [documentation, hybrid]
|
|
104
|
+
treatments: [ruled, flat, carded, open]
|
|
105
|
+
media: [none, illustration]
|
|
106
|
+
items: 3 paths + ≤ 12 topics
|
|
107
|
+
slots: [search, start-paths, topic-grid, popular]
|
|
108
|
+
motion: tier0
|
|
109
|
+
```
|
|
110
|
+
**Best for:** The front door of a documentation site.
|
|
111
|
+
**Avoid when:** It's turning into a marketing page: docs landings exist to get people to the right page fast.
|
|
112
|
+
**Grid:** Centred search field (≤ 640px) in the header block; a row of ≤ 3 "start here" paths (`base` 1 col, `md` 3); a browse-by-topic grid (`base` 1 · `sm` 2 · `lg` 3–4); a short "popular" list.
|
|
113
|
+
```
|
|
114
|
+
┌───────────────────────────────────────────────┐
|
|
115
|
+
│ Documentation │
|
|
116
|
+
│ [ Search the docs… ⌘K ] │
|
|
117
|
+
├───────────────┬───────────────┬───────────────┤
|
|
118
|
+
│ Quickstart │ Guides │ API reference │
|
|
119
|
+
├───────────┬───┴───────┬───────┴───┬───────────┤
|
|
120
|
+
│ Topic │ Topic │ Topic │ Topic │
|
|
121
|
+
│ Topic │ Topic │ Topic │ Topic │
|
|
122
|
+
└───────────┴───────────┴───────────┴───────────┘
|
|
123
|
+
```
|
|
124
|
+
**Contract:** Search works and shows its shortcut. Exactly three primary paths. Topics ≤ 12, named in users' words rather than the system's.
|
|
125
|
+
**Watch:** Define the empty-results state and recent searches. If search needs JS, link to a full index for no-JS use.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Editorial compositions (E1–E4)
|
|
2
|
+
|
|
3
|
+
Editorial layouts serve reading. Their structure comes from typography, rules and whitespace rather than cards, so prefer the `open` or `ruled` treatments. Measure and rhythm matter more here than anywhere else: get the reading column right first.
|
|
4
|
+
|
|
5
|
+
Contents: E1 Article Page · E2 Longform with Margin Notes · E3 Magazine Front · E4 Archive List
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### E1 · Article Page (Reading Column with Breakouts)
|
|
10
|
+
```yaml
|
|
11
|
+
id: E1
|
|
12
|
+
name: Article Page
|
|
13
|
+
family: editorial
|
|
14
|
+
job: reference
|
|
15
|
+
density: medium
|
|
16
|
+
styles: [editorial, hybrid]
|
|
17
|
+
treatments: [open, ruled]
|
|
18
|
+
media: [photo, illustration, data]
|
|
19
|
+
items: n/a
|
|
20
|
+
slots: [kicker, title, dek, byline, body, figure, pull-quote, related]
|
|
21
|
+
motion: tier0
|
|
22
|
+
```
|
|
23
|
+
**Best for:** Articles, essays, interviews and the body of a case study.
|
|
24
|
+
**Avoid when:** The page is a reference or how-to with a persistent sidebar (use D1).
|
|
25
|
+
**Grid:** A 12-col grid with a named reading column: body text ≈ 68ch, centred. Figures may break out to the wide width (≈ content + 10%) or full bleed. At `xl`, pull quotes can sit in the margin. `base`: everything single column with page padding.
|
|
26
|
+
```
|
|
27
|
+
┌───────────────────────────────────────────────┐
|
|
28
|
+
│ Kicker · Section │
|
|
29
|
+
│ Title (≤ 12 words) │
|
|
30
|
+
│ Dek (≤ 30 words) │
|
|
31
|
+
│ By Author · 12 Mar 2026 · 8 min read │
|
|
32
|
+
├───────────────────────────────────────────────┤
|
|
33
|
+
│ Wide figure (breakout) + caption │
|
|
34
|
+
├───────┬──────────────────────────────┬────────┤
|
|
35
|
+
│ │ Body text, 68ch measure │ │
|
|
36
|
+
│ │ ── pull quote (aside) ── │ │
|
|
37
|
+
│ │ Body text continues │ │
|
|
38
|
+
└───────┴──────────────────────────────┴────────┘
|
|
39
|
+
```
|
|
40
|
+
**Contract:** Title is the page `<h1>`. Byline, `<time>` date and read time. Body ≥ 18px. Sub-headings (`h2`/`h3`) have anchors. Every figure has a caption and meaningful `alt` (or `alt=""` if decorative).
|
|
41
|
+
**Watch:** Measure 60–72ch, strictly. Use a drop cap or pull quote only when it has a purpose. Pull quotes are `<aside>` placed after the paragraph they quote. Wide tables and code scroll inside their own wrapper. Footnotes need back-links.
|
|
42
|
+
|
|
43
|
+
### E2 · Longform with Margin Notes
|
|
44
|
+
```yaml
|
|
45
|
+
id: E2
|
|
46
|
+
name: Longform with Margin Notes
|
|
47
|
+
family: editorial
|
|
48
|
+
job: reference
|
|
49
|
+
density: high
|
|
50
|
+
styles: [editorial]
|
|
51
|
+
treatments: [open, ruled]
|
|
52
|
+
media: [photo, data, none]
|
|
53
|
+
items: 5-30 notes
|
|
54
|
+
slots: [body, sidenote, figure]
|
|
55
|
+
motion: tier1
|
|
56
|
+
```
|
|
57
|
+
**Best for:** Essays, research write-ups and annotated pieces where asides should sit beside the text.
|
|
58
|
+
**Avoid when:** Notes are essential to the argument (they'd be hidden on small screens) or the piece has few notes.
|
|
59
|
+
**Grid:** `xl` (≥ 1280px): 12-col; body `col-span-7`/`8`, notes column `col-span-3`/`4`, each note aligned to its reference paragraph. Below `xl`: notes become inline expandable notes or footnotes.
|
|
60
|
+
```
|
|
61
|
+
┌────────────────────────────────┬──────────────┐
|
|
62
|
+
│ Body paragraph with a note¹ │ ¹ Sidenote │
|
|
63
|
+
│ continues at the same 68ch │ beside text │
|
|
64
|
+
│ measure. │ │
|
|
65
|
+
└────────────────────────────────┴──────────────┘
|
|
66
|
+
```
|
|
67
|
+
**Contract:** Notes ≤ 40 words, numbered and linked both ways. The essay still reads correctly if every note is ignored.
|
|
68
|
+
**Watch:** Adjacent notes collide: push later notes down, or fall back to footnotes. Small screens need a keyboard-operable toggle (`aria-expanded`). Never bury essential information in a note.
|
|
69
|
+
|
|
70
|
+
### E3 · Magazine Front (Lead + Secondary + List)
|
|
71
|
+
```yaml
|
|
72
|
+
id: E3
|
|
73
|
+
name: Magazine Front
|
|
74
|
+
family: editorial
|
|
75
|
+
job: orientation
|
|
76
|
+
density: high
|
|
77
|
+
styles: [editorial, hybrid]
|
|
78
|
+
treatments: [ruled, open, flat]
|
|
79
|
+
media: [photo, illustration]
|
|
80
|
+
items: 1 lead + 4-8
|
|
81
|
+
slots: [lead, secondary, list-item, kicker]
|
|
82
|
+
motion: tier1
|
|
83
|
+
```
|
|
84
|
+
**Best for:** Publication home pages and section fronts where editors rank stories.
|
|
85
|
+
**Avoid when:** Stories are equal in weight (a plain E4 list is clearer) or there's no imagery.
|
|
86
|
+
**Grid:** `base`: lead, then a list. `lg`: 12-col: lead `col-span-7`/`8` (image, headline, dek); two stacked secondaries `col-span-4`/`5`; below, a row of 3–4 smaller items (`col-span-3`) separated by rules.
|
|
87
|
+
```
|
|
88
|
+
┌──────────────────────────┬────────────────────┐
|
|
89
|
+
│ Lead: image │ Secondary 1 │
|
|
90
|
+
│ headline + dek │ ─────────── │
|
|
91
|
+
│ │ Secondary 2 │
|
|
92
|
+
├───────────┬───────────┬──┴────────┬───────────┤
|
|
93
|
+
│ Item │ Item │ Item │ Item │
|
|
94
|
+
└───────────┴───────────┴───────────┴───────────┘
|
|
95
|
+
```
|
|
96
|
+
**Contract:** DOM order equals editorial importance. Each item: kicker, headline, byline or time. Images have a defined focal point.
|
|
97
|
+
**Watch:** A wall of equal cards erases the hierarchy. Too many size variants reads as chaos: use three at most. Clamp headlines only if the meaning survives.
|
|
98
|
+
|
|
99
|
+
### E4 · Archive List (Ruled Index)
|
|
100
|
+
```yaml
|
|
101
|
+
id: E4
|
|
102
|
+
name: Archive List
|
|
103
|
+
family: editorial
|
|
104
|
+
job: reference
|
|
105
|
+
density: high
|
|
106
|
+
styles: [editorial, hybrid, expressive]
|
|
107
|
+
treatments: [ruled, open]
|
|
108
|
+
media: [none]
|
|
109
|
+
items: 10-100
|
|
110
|
+
slots: [date, title, dek, tag]
|
|
111
|
+
motion: tier0
|
|
112
|
+
```
|
|
113
|
+
**Best for:** Blog archives, journals, writing indexes, press and publications lists.
|
|
114
|
+
**Avoid when:** Imagery is the main draw (use G1/G4).
|
|
115
|
+
**Grid:** Rows separated by hairlines. `base`: date above title. `md`: 12-col, date `2`, title + dek `7`, tag `3`.
|
|
116
|
+
```
|
|
117
|
+
┌─────────────┬────────────────────┬────────────┐
|
|
118
|
+
│ 12 Mar 2026 │ An essay title │ Design │
|
|
119
|
+
├─────────────┼────────────────────┼────────────┤
|
|
120
|
+
│ 02 Feb 2026 │ Another essay │ Systems │
|
|
121
|
+
├─────────────┼────────────────────┼────────────┤
|
|
122
|
+
│ 18 Jan 2026 │ A third one │ Notes │
|
|
123
|
+
└─────────────┴────────────────────┴────────────┘
|
|
124
|
+
```
|
|
125
|
+
**Contract:** Newest first by default. Group by year with a sticky year label on long lists. One link per row (the title). Tags are real links.
|
|
126
|
+
**Watch:** 100+ rows need pagination or "load more" implemented as a link. Format dates for the reader's locale. Keep row height ≥ 44px on touch.
|