@hegemonart/get-design-done 1.27.7 → 1.28.5
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +142 -0
- package/SKILL.md +1 -1
- package/agents/design-verifier.md +17 -0
- package/hooks/gdd-decision-injector.js +149 -3
- package/package.json +1 -1
- package/reference/accessibility.md +4 -0
- package/reference/adr-format.md +96 -0
- package/reference/apply-reflections-procedure.md +68 -0
- package/reference/architecture-vocabulary.md +102 -0
- package/reference/audit-scoring.md +14 -0
- package/reference/cache-policy.md +126 -0
- package/reference/color-theory.md +279 -0
- package/reference/compare-rubric.md +171 -0
- package/reference/composition.md +349 -0
- package/reference/connections-onboarding.md +417 -0
- package/reference/context-md-format.md +106 -0
- package/reference/contrast-advanced.md +205 -0
- package/reference/darkmode-audit-procedure.md +258 -0
- package/reference/debug-feedback-loops.md +119 -0
- package/reference/design-procedure.md +304 -0
- package/reference/design-system-guidance.md +2 -0
- package/reference/discover-procedure.md +204 -0
- package/reference/explore-procedure.md +267 -0
- package/reference/form-patterns.md +2 -0
- package/reference/health-mcp-detection.md +44 -0
- package/reference/health-skill-length-report.md +69 -0
- package/reference/heuristics.md +84 -0
- package/reference/i18n.md +554 -0
- package/reference/iconography.md +2 -0
- package/reference/milestone-completeness-rubric.md +87 -0
- package/reference/motion-interpolate.md +1 -0
- package/reference/palette-catalog.md +2 -0
- package/reference/peer-cli-protocol.md +161 -0
- package/reference/plan-procedure.md +278 -0
- package/reference/proportion-systems.md +267 -0
- package/reference/registry.json +204 -1
- package/reference/registry.schema.json +1 -1
- package/reference/router-rules.md +84 -0
- package/reference/rtl-cjk-cultural.md +2 -0
- package/reference/scan-procedure.md +731 -0
- package/reference/shared-preamble.md +78 -6
- package/reference/skill-authoring-contract.md +128 -0
- package/reference/start-procedure.md +115 -0
- package/reference/style-doc-procedure.md +150 -0
- package/reference/style-vocabulary.md +2 -0
- package/reference/threat-modeling.md +101 -0
- package/reference/typography.md +4 -0
- package/reference/verify-procedure.md +512 -0
- package/reference/visual-hierarchy-layout.md +4 -0
- package/scripts/validate-skill-length.cjs +283 -0
- package/skills/add-backlog/SKILL.md +1 -0
- package/skills/analyze-dependencies/SKILL.md +33 -122
- package/skills/apply-reflections/SKILL.md +1 -40
- package/skills/audit/SKILL.md +3 -1
- package/skills/bandit-status/SKILL.md +31 -66
- package/skills/benchmark/SKILL.md +15 -55
- package/skills/brief/SKILL.md +12 -1
- package/skills/cache-manager/SKILL.md +3 -57
- package/skills/check-update/SKILL.md +38 -75
- package/skills/compare/SKILL.md +29 -269
- package/skills/complete-cycle/SKILL.md +1 -1
- package/skills/connections/SKILL.md +21 -427
- package/skills/continue/SKILL.md +1 -0
- package/skills/darkmode/SKILL.md +32 -287
- package/skills/debug/SKILL.md +11 -8
- package/skills/design/SKILL.md +27 -245
- package/skills/discover/SKILL.md +26 -133
- package/skills/discuss/SKILL.md +18 -2
- package/skills/explore/SKILL.md +42 -176
- package/skills/fast/SKILL.md +1 -0
- package/skills/figma-write/SKILL.md +2 -2
- package/skills/health/SKILL.md +11 -33
- package/skills/help/SKILL.md +1 -0
- package/skills/list-assumptions/SKILL.md +1 -0
- package/skills/map/SKILL.md +8 -31
- package/skills/new-cycle/SKILL.md +3 -1
- package/skills/next/SKILL.md +1 -0
- package/skills/note/SKILL.md +1 -0
- package/skills/optimize/SKILL.md +21 -44
- package/skills/pause/SKILL.md +1 -0
- package/skills/peer-cli-add/SKILL.md +26 -108
- package/skills/peer-cli-customize/SKILL.md +22 -42
- package/skills/peers/SKILL.md +33 -57
- package/skills/plan/SKILL.md +33 -220
- package/skills/plant-seed/SKILL.md +1 -0
- package/skills/pr-branch/SKILL.md +1 -0
- package/skills/progress/SKILL.md +1 -7
- package/skills/quality-gate/SKILL.md +34 -166
- package/skills/quick/SKILL.md +1 -0
- package/skills/reapply-patches/SKILL.md +1 -0
- package/skills/recall/SKILL.md +1 -0
- package/skills/resume/SKILL.md +1 -0
- package/skills/review-backlog/SKILL.md +1 -0
- package/skills/router/SKILL.md +3 -59
- package/skills/scan/SKILL.md +36 -675
- package/skills/settings/SKILL.md +1 -0
- package/skills/ship/SKILL.md +1 -0
- package/skills/sketch/SKILL.md +1 -1
- package/skills/sketch-wrap-up/SKILL.md +13 -54
- package/skills/spike/SKILL.md +1 -1
- package/skills/spike-wrap-up/SKILL.md +12 -46
- package/skills/start/SKILL.md +13 -112
- package/skills/stats/SKILL.md +1 -0
- package/skills/style/SKILL.md +18 -140
- package/skills/synthesize/SKILL.md +1 -0
- package/skills/timeline/SKILL.md +1 -0
- package/skills/todo/SKILL.md +1 -0
- package/skills/turn-closeout/SKILL.md +36 -56
- package/skills/undo/SKILL.md +1 -0
- package/skills/update/SKILL.md +1 -0
- package/skills/verify/SKILL.md +42 -457
- package/skills/warm-cache/SKILL.md +3 -35
- package/skills/zoom-out/SKILL.md +26 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: proportion-systems
|
|
3
|
+
type: layout
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28
|
|
6
|
+
tags: [proportion, spacing, baseline-grid, vertical-rhythm, modular-scale]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Proportion Systems — Whole-UI Modular Relationships
|
|
11
|
+
|
|
12
|
+
The existing [typography reference](./typography.md) covers the modular type scale — base 16px, a ratio (1.250 Major Third, 1.333 Perfect Fourth, 1.414 √2, 1.618 φ), and the geometric ladder of font sizes that scale produces. That ladder is one slice of a larger system. A proportion system is the rule that *every* dimension in the UI — type, spacing between elements, sizing of icons and avatars, and corner radius on components — derives from a single underlying unit and a small set of multipliers, so that values across the four systems land on the same grid and visibly belong to the same composition.
|
|
13
|
+
|
|
14
|
+
This file exists because that whole-UI view is undocumented today: [design-system-guidance.md](./design-system-guidance.md) mentions 8pt spacing in passing, [style-vocabulary.md](./style-vocabulary.md) cites "8pt spacing grid" as a Flat Design 2.0 marker, and `typography.md` owns the type-scale slice — but nothing ties them together. An agent that picks `padding: 12px` next to body text at `16/24` on an 8pt grid is breaking proportion silently, because the cross-system relationship was never stated. This is the file an agent should consult any time it is *constructing* the underlying grid of a UI — choosing a baseline unit, deriving a spacing ladder, deciding whether icon-md should be 20px or 24px, or auditing why a layout "feels off" despite each token being internally consistent.
|
|
15
|
+
|
|
16
|
+
The jump this file closes is from *"we use a modular type scale"* to *"we use a coherent proportion system across type + spacing + sizing + radius — the whole UI snaps to one grid."*
|
|
17
|
+
|
|
18
|
+
## Baseline Grid Systems
|
|
19
|
+
|
|
20
|
+
A baseline grid is the invisible underlying structure every dimension snaps to. It is one number — `4`, `8`, or `1.414` — and the rule that no value in the UI may be authored that is not a multiple of that number. The grid is not a layout grid (columns and gutters); it is the smallest atomic unit out of which both the column grid and every spacing / sizing / radius token are composed. Three baselines dominate: 4pt, 8pt, and √2. Pick one for the whole product; do not mix.
|
|
21
|
+
|
|
22
|
+
### 4pt Grid
|
|
23
|
+
|
|
24
|
+
When it fits: dense data UIs where rows must be visually compact (trading terminals, observability dashboards, IDE-style tooling, spreadsheet-derived layouts). The 4pt unit lets you author 12px / 20px / 28px row heights that an 8pt grid forbids, which matters when 10–20 horizontal rows need to fit above the fold. The cost is that fine increments invite drift — without strict review, a team will quickly have `13px`, `15px`, and `17px` in production.
|
|
25
|
+
|
|
26
|
+
```css
|
|
27
|
+
/* 4pt grid — dense data UI */
|
|
28
|
+
:root {
|
|
29
|
+
--grid-unit: 4px;
|
|
30
|
+
|
|
31
|
+
--space-1: calc(var(--grid-unit) * 1); /* 4px */
|
|
32
|
+
--space-2: calc(var(--grid-unit) * 2); /* 8px */
|
|
33
|
+
--space-3: calc(var(--grid-unit) * 3); /* 12px */
|
|
34
|
+
--space-4: calc(var(--grid-unit) * 4); /* 16px */
|
|
35
|
+
--space-5: calc(var(--grid-unit) * 5); /* 20px */
|
|
36
|
+
--space-6: calc(var(--grid-unit) * 6); /* 24px */
|
|
37
|
+
--space-7: calc(var(--grid-unit) * 7); /* 28px */
|
|
38
|
+
--space-8: calc(var(--grid-unit) * 8); /* 32px */
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.data-row {
|
|
42
|
+
height: var(--space-7); /* 28px — on-grid */
|
|
43
|
+
padding-inline: var(--space-3); /* 12px — on-grid */
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 8pt Grid
|
|
48
|
+
|
|
49
|
+
When it fits: product UI, marketing surfaces, default for most consumer apps. Material Design, iOS Human Interface Guidelines, and the majority of modern design systems converge on 8pt because the unit is large enough to prevent drift (no one accidentally authors 9px) yet small enough to express every meaningful step. Half-units (4px) are permitted only at the smallest scale (icon padding, single-character chip insets) and are explicitly named — never freehand.
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
/* 8pt grid — product UI default */
|
|
53
|
+
:root {
|
|
54
|
+
--grid-unit: 8px;
|
|
55
|
+
|
|
56
|
+
--space-0\.5: 4px; /* explicit half-unit — only for chip insets */
|
|
57
|
+
--space-1: calc(var(--grid-unit) * 1); /* 8px */
|
|
58
|
+
--space-2: calc(var(--grid-unit) * 2); /* 16px */
|
|
59
|
+
--space-3: calc(var(--grid-unit) * 3); /* 24px */
|
|
60
|
+
--space-4: calc(var(--grid-unit) * 4); /* 32px */
|
|
61
|
+
--space-5: calc(var(--grid-unit) * 5); /* 40px */
|
|
62
|
+
--space-6: calc(var(--grid-unit) * 6); /* 48px */
|
|
63
|
+
--space-8: calc(var(--grid-unit) * 8); /* 64px */
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.card {
|
|
67
|
+
padding: var(--space-3); /* 24px — on-grid */
|
|
68
|
+
gap: var(--space-2); /* 16px — on-grid */
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### √2 Grid (root-2)
|
|
73
|
+
|
|
74
|
+
When it fits: editorial layouts, print-adjacent surfaces, long-form article pages, document viewers. The √2 ratio (≈1.414) is the proportion that survives bisection — fold an A4 page in half and you get an A5 page with the same proportion. UIs that mirror physical paper (PDF readers, marketing landing pages with magazine layouts, layouts that breathe like print) feel right on √2 because subdivisions cascade self-similarly. The underlying spacing unit is still an integer (typically 8px or 16px) but the column and section *ratios* are √2, and key dimensions are generated by repeated multiplication or division by 1.414. See `./composition.md` §Root Rectangles — √2, √3, √5 for the geometry behind the ratio.
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
/* √2 grid — editorial / print-adjacent */
|
|
78
|
+
:root {
|
|
79
|
+
--base: 16px;
|
|
80
|
+
|
|
81
|
+
--space-2: calc(var(--base) * 1); /* 16px */
|
|
82
|
+
--space-3: calc(var(--base) * 1.414); /* ≈22.6px → 24px on the 8pt grid */
|
|
83
|
+
--space-4: calc(var(--base) * 2); /* 32px */
|
|
84
|
+
--space-5: calc(var(--base) * 2.828); /* ≈45.2px → 48px */
|
|
85
|
+
--space-6: calc(var(--base) * 4); /* 64px */
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.article-section {
|
|
89
|
+
aspect-ratio: 1 / 1.414; /* A-paper ratio */
|
|
90
|
+
padding-inline: var(--space-4);
|
|
91
|
+
padding-block: var(--space-5);
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Decision rule:** if the product is a dense data UI where row density is the dominant constraint, pick 4pt. If the product is editorial or print-adjacent and pages should feel like documents, pick √2 (over an integer pixel unit). For everything else — and that is most product work — pick 8pt. Document the decision once at the design-system level; do not let individual surfaces pick their own grid.
|
|
96
|
+
|
|
97
|
+
## Baseline-Grid Lock
|
|
98
|
+
|
|
99
|
+
Baseline-grid lock is the discipline that every text baseline in the UI lands on a grid line — typically the same 4pt or 8pt unit used for spacing. The mechanism is the `line-height` of every text style: set line-height so the resulting line box is a whole multiple of the grid unit. Body text at 16px font with line-height `24px` consumes exactly three 8pt units per line. Heading text at 32px with line-height `40px` consumes five. Caption at 14px with line-height `24px` consumes three. Every block of text — regardless of size — stacks on the same invisible horizontal rulings.
|
|
100
|
+
|
|
101
|
+
Lock matters because mixed-size text without it produces drift. A page that interleaves body, headings, and captions whose line-heights are *not* grid multiples will accumulate fractional-pixel errors block-by-block; by mid-page, the right column has slid out of alignment with the left. Visually the page looks "slightly wrong" without an obvious cause. Lock eliminates the symptom by construction.
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
/* Baseline-grid lock on an 8pt grid */
|
|
105
|
+
:root {
|
|
106
|
+
--grid-unit: 8px;
|
|
107
|
+
|
|
108
|
+
/* Every line-height is a multiple of --grid-unit */
|
|
109
|
+
--line-body: calc(var(--grid-unit) * 3); /* 24px — 3 units */
|
|
110
|
+
--line-heading: calc(var(--grid-unit) * 5); /* 40px — 5 units */
|
|
111
|
+
--line-caption: calc(var(--grid-unit) * 3); /* 24px — 3 units */
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
p { font-size: 16px; line-height: var(--line-body); }
|
|
115
|
+
h2 { font-size: 32px; line-height: var(--line-heading); }
|
|
116
|
+
.caption { font-size: 14px; line-height: var(--line-caption); }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Vertical Rhythm
|
|
120
|
+
|
|
121
|
+
Vertical rhythm is the lived consequence of baseline-grid lock: because every text block consumes a whole number of grid units, block-level elements stack on the grid without ever needing manual margin tweaks. The page reads with a quiet, mechanical regularity that the eye registers as polish even when no one can articulate why. Vertical rhythm is what readers mean when they say a layout feels "professional" or "calm".
|
|
122
|
+
|
|
123
|
+
The rule that produces it is: pick the baseline unit once, set every line-height in the type ramp as a multiple of that unit, and set every block-level margin (margin-top, margin-bottom, padding-block on cards and sections) as a multiple of the same unit. Once both type and spacing are on-grid, rhythm emerges automatically — no per-element adjustment.
|
|
124
|
+
|
|
125
|
+
```css
|
|
126
|
+
/* Vertical rhythm — body, heading, caption, all on the 8pt grid */
|
|
127
|
+
:root {
|
|
128
|
+
--grid-unit: 8px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
body {
|
|
132
|
+
font-size: 16px;
|
|
133
|
+
line-height: calc(var(--grid-unit) * 3); /* 24px — 3 units */
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
h2 {
|
|
137
|
+
font-size: 32px;
|
|
138
|
+
line-height: calc(var(--grid-unit) * 5); /* 40px — 5 units */
|
|
139
|
+
margin-block-start: calc(var(--grid-unit) * 6); /* 48px */
|
|
140
|
+
margin-block-end: calc(var(--grid-unit) * 3); /* 24px */
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.caption {
|
|
144
|
+
font-size: 14px;
|
|
145
|
+
line-height: calc(var(--grid-unit) * 3); /* 24px — 3 units, same as body */
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
article > * + * {
|
|
149
|
+
margin-block-start: calc(var(--grid-unit) * 2); /* 16px between siblings */
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Exceptions are explicit, not freehand.** Display-scale type (font-size ≥ 56px) is often set with optical line-height — a unitless ratio of 1.05–1.15 — because mechanical 8pt multiples look too sparse at hero scale. Single-line callouts (status badges, single-character chips) may use `line-height: 1` with vertical padding rounded to the grid. Treat both as named utilities (`.display-line-height`, `.chip-vertical`) rather than ad-hoc overrides — once the exception is a token, it remains visible to audit.
|
|
154
|
+
|
|
155
|
+
## Modular Relationships
|
|
156
|
+
|
|
157
|
+
The point of the proportion system is that the four sub-systems — type, spacing, sizing, radius — are not authored independently. Each derives from the same baseline unit, and certain pairs of values across systems are intentionally identical. Body line-height equals the spacing token that separates two body paragraphs equals the height of a medium icon. The numerical equality is the visible signature of an authored composition.
|
|
158
|
+
|
|
159
|
+
| System | Token | Value | Grid relationship | Cross-system pairing |
|
|
160
|
+
| ------- | ----------- | ----- | ------------------------------ | ------------------------------------- |
|
|
161
|
+
| type | text-xs | 12px | 1.5 × baseline | matches `space-1.5` (4pt half-step) |
|
|
162
|
+
| type | text-sm | 14px | non-grid (optical exception) | line-height 20px (2.5 units) is grid |
|
|
163
|
+
| type | text-base | 16px | 2 × baseline (8pt) | matches `space-2` |
|
|
164
|
+
| type | text-lg | 20px | 2.5 × baseline | line-height 28px (3.5 units) |
|
|
165
|
+
| type | text-xl | 24px | 3 × baseline | matches `space-3`, matches `icon-md` |
|
|
166
|
+
| type | text-2xl | 32px | 4 × baseline | matches `space-4`, matches `icon-lg` |
|
|
167
|
+
| space | space-1 | 8px | 1 × baseline | matches `radius-md` |
|
|
168
|
+
| space | space-2 | 16px | 2 × baseline | matches `text-base` |
|
|
169
|
+
| space | space-3 | 24px | 3 × baseline | matches body line-height, `icon-md` |
|
|
170
|
+
| space | space-4 | 32px | 4 × baseline | matches `text-2xl`, `icon-lg` |
|
|
171
|
+
| space | space-6 | 48px | 6 × baseline | matches `avatar-md` height |
|
|
172
|
+
| radius | radius-sm | 4px | 0.5 × baseline | half-step, only on chips and tags |
|
|
173
|
+
| radius | radius-md | 8px | 1 × baseline | matches `space-1` |
|
|
174
|
+
| radius | radius-lg | 16px | 2 × baseline | matches `space-2`, `text-base` |
|
|
175
|
+
| size | icon-sm | 16px | 2 × baseline | matches `text-base` cap-height |
|
|
176
|
+
| size | icon-md | 24px | 3 × baseline | matches body line-height, `space-3` |
|
|
177
|
+
| size | icon-lg | 32px | 4 × baseline | matches `text-2xl`, `space-4` |
|
|
178
|
+
| size | avatar-sm | 32px | 4 × baseline | matches `icon-lg`, `space-4` |
|
|
179
|
+
| size | avatar-md | 48px | 6 × baseline | matches `space-6` |
|
|
180
|
+
| size | avatar-lg | 64px | 8 × baseline | 8 grid units, matches hero spacing |
|
|
181
|
+
|
|
182
|
+
The pairing column is the asset. An agent picking a value reads across the table: "I need padding around 16px text on an 8pt grid" → `space-2` (16px) or `space-3` (24px), never `padding: 12px` (1.5 units — half-step, reserved for chips). "I need an icon next to body text" → `icon-md` (24px), because body line-height is 24px and the icon should occupy the same vertical band. The relationships make these decisions one-step.
|
|
183
|
+
|
|
184
|
+
**A concrete pairing example.** Body text is 16px on 24px line-height (8pt grid). A button next to body text should have vertical padding such that the total button height is a clean multiple of the grid. Padding 8px + line-height 24px + padding 8px = 40px (5 units — on-grid). Padding 12px + line-height 24px + padding 12px = 48px (6 units — on-grid). Padding 10px gives 44px (5.5 units — off-grid, breaks rhythm); the only way to know that is to consult the matrix. Once a team internalizes the pairings, the choice between 8px and 12px stops being aesthetic — both are correct, both produce on-grid heights, and the team picks based on density.
|
|
185
|
+
|
|
186
|
+
## Radius Scale as Proportion
|
|
187
|
+
|
|
188
|
+
Corner radius is the easiest token to author ad-hoc — `border-radius: 6px` looks fine in isolation — and the easiest to break the system with. The radius scale belongs to proportion because it must derive from component height, not be chosen freehand. The common rule is `radius-md ≈ 0.25 × component height`: a 40px-tall button gets 8px radius, a 32px-tall chip gets 8px radius, a 24px-tall tag gets 4px or 8px. The 0.25× ratio is visually balanced — large enough to register as "rounded", small enough to keep the geometry of the rectangle dominant.
|
|
189
|
+
|
|
190
|
+
Two exceptions matter and are named, not freehand. **Pill** sets `border-radius: 9999px` (or `border-radius: 50%` on a square) — explicit "fully rounded", used for tags, status badges, and avatar wrappers. **Square** sets `border-radius: 0` — explicit "no rounding", used inside data tables where rectangular cells must butt against each other, and on heavily geometric brand systems.
|
|
191
|
+
|
|
192
|
+
```css
|
|
193
|
+
/* Radius scale as proportion to component height */
|
|
194
|
+
:root {
|
|
195
|
+
--radius-none: 0;
|
|
196
|
+
--radius-sm: 4px; /* 0.25 × 16px (tag height) */
|
|
197
|
+
--radius-md: 8px; /* 0.25 × 32px (chip / small button) */
|
|
198
|
+
--radius-lg: 10px; /* 0.25 × 40px (default button) */
|
|
199
|
+
--radius-xl: 16px; /* 0.25 × 64px (large input / card) */
|
|
200
|
+
--radius-full: 9999px; /* pill */
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.button-default {
|
|
204
|
+
block-size: 40px;
|
|
205
|
+
border-radius: var(--radius-lg); /* 10px — 0.25 × 40px */
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.chip {
|
|
209
|
+
block-size: 32px;
|
|
210
|
+
border-radius: var(--radius-md); /* 8px — 0.25 × 32px */
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.avatar {
|
|
214
|
+
inline-size: 48px;
|
|
215
|
+
block-size: 48px;
|
|
216
|
+
border-radius: var(--radius-full); /* pill (circle) — explicit named exception */
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Sizing Scale Derivation
|
|
221
|
+
|
|
222
|
+
Sizing tokens — icon dimensions, avatar dimensions, button heights, input heights — are not a separate ladder. They are derived from the spacing scale by consistent multipliers, so that every size token equals some `space-N` token. This is the rule that prevents sizing drift: a new size token must reuse an existing spacing value; it may not introduce a new pixel value.
|
|
223
|
+
|
|
224
|
+
The derivation table for an 8pt grid:
|
|
225
|
+
|
|
226
|
+
```css
|
|
227
|
+
/* Sizing tokens derived from spacing tokens */
|
|
228
|
+
:root {
|
|
229
|
+
--grid-unit: 8px;
|
|
230
|
+
|
|
231
|
+
/* Spacing ladder (canonical) */
|
|
232
|
+
--space-1: calc(var(--grid-unit) * 1); /* 8px */
|
|
233
|
+
--space-2: calc(var(--grid-unit) * 2); /* 16px */
|
|
234
|
+
--space-3: calc(var(--grid-unit) * 3); /* 24px */
|
|
235
|
+
--space-4: calc(var(--grid-unit) * 4); /* 32px */
|
|
236
|
+
--space-5: calc(var(--grid-unit) * 5); /* 40px */
|
|
237
|
+
--space-6: calc(var(--grid-unit) * 6); /* 48px */
|
|
238
|
+
--space-8: calc(var(--grid-unit) * 8); /* 64px */
|
|
239
|
+
|
|
240
|
+
/* Sizing tokens — every value is a spacing token, not a new pixel literal */
|
|
241
|
+
--icon-sm: var(--space-2); /* 16px */
|
|
242
|
+
--icon-md: var(--space-3); /* 24px */
|
|
243
|
+
--icon-lg: var(--space-4); /* 32px */
|
|
244
|
+
|
|
245
|
+
--avatar-sm: var(--space-4); /* 32px */
|
|
246
|
+
--avatar-md: var(--space-6); /* 48px */
|
|
247
|
+
--avatar-lg: var(--space-8); /* 64px */
|
|
248
|
+
|
|
249
|
+
--button-sm: var(--space-4); /* 32px height */
|
|
250
|
+
--button-md: var(--space-5); /* 40px height — default button */
|
|
251
|
+
--button-lg: var(--space-6); /* 48px height */
|
|
252
|
+
|
|
253
|
+
--input-md: var(--space-5); /* 40px height — matches button-md */
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
The rule that makes this work: **a new sizing token must derive from spacing — never freehand.** If a designer needs a 36px button, the answer is not `--button-custom: 36px`; the answer is either 32px (`--space-4`) or 40px (`--space-5`), and the designer picks one. The token system declines to express off-grid sizes, which is the point.
|
|
258
|
+
|
|
259
|
+
## Cross-References
|
|
260
|
+
|
|
261
|
+
- [design-system-guidance.md](./design-system-guidance.md) — general design-system authoring context that this file deepens for proportion. That file mentions 8pt grids in passing; this file is the formal treatment.
|
|
262
|
+
- [typography.md](./typography.md) §Type Scale Systems — the canonical modular-scale slice this file extends to the whole UI. Read that section first for the upstream type ladder.
|
|
263
|
+
- [style-vocabulary.md](./style-vocabulary.md) — style rows that cite "8pt spacing grid" (Flat Design 2.0) and other proportional vocabulary surfaces. This file is the underlying mechanism behind those style-row markers.
|
|
264
|
+
|
|
265
|
+
Forward reading: [composition.md](./composition.md) §Root Rectangles — √2, √3, √5 for the geometry behind the √2 grid baseline option above.
|
|
266
|
+
|
|
267
|
+
Note: reciprocal inbound cross-links from these files into `proportion-systems.md` land in Phase 28-06 (additive-only, decision D-06). This file declares its three outbound links now; the inverse direction is a separate, batched edit.
|
package/reference/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./schemas/registry.schema.json",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"generated_at": "2026-
|
|
4
|
+
"generated_at": "2026-05-18T12:47:59.666Z",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
7
|
"name": "codex-tools",
|
|
@@ -115,6 +115,13 @@
|
|
|
115
115
|
"tier": "L2",
|
|
116
116
|
"description": "Per-category gate checklists"
|
|
117
117
|
},
|
|
118
|
+
{
|
|
119
|
+
"name": "color-theory",
|
|
120
|
+
"path": "reference/color-theory.md",
|
|
121
|
+
"type": "palette",
|
|
122
|
+
"phase": 28,
|
|
123
|
+
"description": "Color-theory foundation — color spaces (sRGB / HSL / OKLCH / LCH), six harmonies in OKLCH, simultaneous contrast, color-blindness palettes (deutan/protan/tritan), color interpolation in animation (OKLCH path vs sRGB muddy-mid)"
|
|
124
|
+
},
|
|
118
125
|
{
|
|
119
126
|
"name": "component-accordion",
|
|
120
127
|
"path": "reference/components/accordion.md",
|
|
@@ -337,12 +344,26 @@
|
|
|
337
344
|
"type": "schema",
|
|
338
345
|
"description": "Locked 12-section spec shape for component benchmarks (Purpose → Failing example)"
|
|
339
346
|
},
|
|
347
|
+
{
|
|
348
|
+
"name": "composition",
|
|
349
|
+
"path": "reference/composition.md",
|
|
350
|
+
"type": "layout",
|
|
351
|
+
"phase": 28,
|
|
352
|
+
"description": "Compositional fundamentals — rule of thirds, φ/√2/√3/√5 root rectangles, Fibonacci, focal-point construction, visual-weight calculus (size × contrast × isolation × complexity), optical-vs-mathematical centering, Z/F/Gutenberg eye-flow"
|
|
353
|
+
},
|
|
340
354
|
{
|
|
341
355
|
"name": "config-schema",
|
|
342
356
|
"path": "reference/config-schema.md",
|
|
343
357
|
"type": "schema",
|
|
344
358
|
"description": "Schema documentation for .design/config.json"
|
|
345
359
|
},
|
|
360
|
+
{
|
|
361
|
+
"name": "contrast-advanced",
|
|
362
|
+
"path": "reference/contrast-advanced.md",
|
|
363
|
+
"type": "heuristic",
|
|
364
|
+
"phase": 28,
|
|
365
|
+
"description": "APCA (WCAG 3 draft) contrast — Lc 75/60/45/30 thresholds, why WCAG 2.1 4.5:1 misranks thin/large/colored text, dual-target pattern with WCAG 2.1 AA, Lc↔WCAG-2.1 conversion table"
|
|
366
|
+
},
|
|
346
367
|
{
|
|
347
368
|
"name": "css-grid-layout",
|
|
348
369
|
"path": "reference/css-grid-layout.md",
|
|
@@ -417,6 +438,13 @@
|
|
|
417
438
|
"tier": "L2",
|
|
418
439
|
"description": "NNG heuristics + GDD-specific rubrics used by auditor / verifier"
|
|
419
440
|
},
|
|
441
|
+
{
|
|
442
|
+
"name": "i18n",
|
|
443
|
+
"path": "reference/i18n.md",
|
|
444
|
+
"type": "heuristic",
|
|
445
|
+
"phase": 28,
|
|
446
|
+
"description": "i18n engineering primitives — text expansion per locale, CSS logical properties, RTL mirroring + directional-icon flip, bidi isolation, Intl.* family (DateTimeFormat / NumberFormat / PluralRules / RelativeTimeFormat / ListFormat / Collator / Segmenter), ICU MessageFormat, Unicode hygiene, multi-script font stacks, WCAG i18n; spec source for design-verifier i18n probes + explore i18n-readiness probe"
|
|
447
|
+
},
|
|
420
448
|
{
|
|
421
449
|
"name": "iconography",
|
|
422
450
|
"path": "reference/iconography.md",
|
|
@@ -697,6 +725,13 @@
|
|
|
697
725
|
"type": "heuristic",
|
|
698
726
|
"description": "Guide for authoring project-skill artifacts (sketch/spike wrap-ups)"
|
|
699
727
|
},
|
|
728
|
+
{
|
|
729
|
+
"name": "proportion-systems",
|
|
730
|
+
"path": "reference/proportion-systems.md",
|
|
731
|
+
"type": "layout",
|
|
732
|
+
"phase": 28,
|
|
733
|
+
"description": "Whole-UI proportion systems — 4pt / 8pt / √2 baseline grids, baseline-grid lock, vertical rhythm, modular relationships across type + spacing + sizing + radius scales"
|
|
734
|
+
},
|
|
700
735
|
{
|
|
701
736
|
"name": "protected-paths.default",
|
|
702
737
|
"path": "reference/protected-paths.default.json",
|
|
@@ -776,6 +811,174 @@
|
|
|
776
811
|
"path": "reference/visual-hierarchy-layout.md",
|
|
777
812
|
"type": "heuristic",
|
|
778
813
|
"description": "Z-order, whitespace, grids, F/Z patterns, 24 landing archetypes"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"name": "adr-format",
|
|
817
|
+
"path": "reference/adr-format.md",
|
|
818
|
+
"type": "meta-rules",
|
|
819
|
+
"phase": 28.5,
|
|
820
|
+
"description": "ADR (Architecture Decision Record) format — adapted from mattpocock/skills (MIT). 3-criteria offer gate (hard-to-reverse AND surprising-without-context AND real-tradeoff), 4-state status lifecycle. GDD addition: optional cycle-id + phase-id cross-refs to STATE.md."
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"name": "apply-reflections-procedure",
|
|
824
|
+
"path": "reference/apply-reflections-procedure.md",
|
|
825
|
+
"type": "heuristic",
|
|
826
|
+
"phase": 28.5,
|
|
827
|
+
"description": "Phase 28.5 — apply-reflections procedure extracted from skills/apply-reflections per progressive-disclosure rule. Read by skills/apply-reflections/SKILL.md."
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "architecture-vocabulary",
|
|
831
|
+
"path": "reference/architecture-vocabulary.md",
|
|
832
|
+
"type": "principles",
|
|
833
|
+
"phase": 28.5,
|
|
834
|
+
"description": "Ousterhout glossary (A Philosophy of Software Design) ported via mattpocock/skills LANGUAGE.md (MIT). 8 core terms (Module / Interface / Implementation / Depth / Seam / Adapter / Leverage / Locality) + 3 principles (deletion test, interface-is-test-surface, two-adapters-rule)."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "cache-policy",
|
|
838
|
+
"path": "reference/cache-policy.md",
|
|
839
|
+
"type": "heuristic",
|
|
840
|
+
"phase": 28.5,
|
|
841
|
+
"description": "Phase 28.5 — cache-policy reference extracted from skills/cache-manager + skills/warm-cache per progressive-disclosure rule (Bucket 3 orchestrator + utility rework)."
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "compare-rubric",
|
|
845
|
+
"path": "reference/compare-rubric.md",
|
|
846
|
+
"type": "heuristic",
|
|
847
|
+
"phase": 28.5,
|
|
848
|
+
"description": "Phase 28.5 — compare-rubric extracted from skills/compare per progressive-disclosure rule. Read by skills/compare/SKILL.md (Bucket 2 design-family rework)."
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"name": "connections-onboarding",
|
|
852
|
+
"path": "reference/connections-onboarding.md",
|
|
853
|
+
"type": "meta-rules",
|
|
854
|
+
"phase": 28.5,
|
|
855
|
+
"description": "Phase 28.5 — connections-onboarding procedure extracted from skills/connections per progressive-disclosure rule (Bucket 2 design-family rework). Four-option setup prompt + onboarding flow."
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"name": "context-md-format",
|
|
859
|
+
"path": "reference/context-md-format.md",
|
|
860
|
+
"type": "meta-rules",
|
|
861
|
+
"phase": 28.5,
|
|
862
|
+
"description": "CONTEXT.md format — adapted from mattpocock/skills (MIT) CONTEXT-FORMAT.md. DDD-style ubiquitous-language glossary schema, inline-write trigger, multi-context CONTEXT-MAP.md pattern. GDD additions: optional first-seen + aliases on term entries."
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "darkmode-audit-procedure",
|
|
866
|
+
"path": "reference/darkmode-audit-procedure.md",
|
|
867
|
+
"type": "meta-rules",
|
|
868
|
+
"phase": 28.5,
|
|
869
|
+
"description": "Phase 28.5 — darkmode audit procedure extracted from skills/darkmode per progressive-disclosure rule (Bucket 2 design-family rework)."
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"name": "debug-feedback-loops",
|
|
873
|
+
"path": "reference/debug-feedback-loops.md",
|
|
874
|
+
"type": "heuristic",
|
|
875
|
+
"phase": 28.5,
|
|
876
|
+
"description": "Debug feedback-loop discipline — adapted from mattpocock/skills (MIT) engineering/diagnose Phase 1. 10 construction paths in priority order (failing test -> curl -> CLI fixture -> headless browser -> trace replay -> throwaway harness -> fuzz -> bisect harness -> differential loop -> HITL bash), iterate-on-loop sub-discipline, non-determinism reproduction-rate branch."
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"name": "design-procedure",
|
|
880
|
+
"path": "reference/design-procedure.md",
|
|
881
|
+
"type": "meta-rules",
|
|
882
|
+
"phase": 28.5,
|
|
883
|
+
"description": "Phase 28.5 — design-stage procedure extracted from skills/design per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "discover-procedure",
|
|
887
|
+
"path": "reference/discover-procedure.md",
|
|
888
|
+
"type": "meta-rules",
|
|
889
|
+
"phase": 28.5,
|
|
890
|
+
"description": "Phase 28.5 — discover-stage procedure extracted from skills/discover per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"name": "explore-procedure",
|
|
894
|
+
"path": "reference/explore-procedure.md",
|
|
895
|
+
"type": "meta-rules",
|
|
896
|
+
"phase": 28.5,
|
|
897
|
+
"description": "Phase 28.5 — explore-stage procedure extracted from skills/explore per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "health-mcp-detection",
|
|
901
|
+
"path": "reference/health-mcp-detection.md",
|
|
902
|
+
"type": "heuristic",
|
|
903
|
+
"phase": 28.5,
|
|
904
|
+
"description": "Phase 28.5 — health-MCP detection procedure extracted from skills/health per progressive-disclosure rule (D-10). Documents dismissal check, detection via scripts/lib/install/mcp-register.cjs, row rendering for claude/codex/both/neither, fallback for missing mcp-register.cjs."
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"name": "health-skill-length-report",
|
|
908
|
+
"path": "reference/health-skill-length-report.md",
|
|
909
|
+
"type": "heuristic",
|
|
910
|
+
"phase": 28.5,
|
|
911
|
+
"description": "Phase 28.5 — health-skill-length-report contract documenting validate-skill-length.cjs JSON shape + threshold rationale. Read by skills/health/SKILL.md to render the skill-length report subsection."
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "milestone-completeness-rubric",
|
|
915
|
+
"path": "reference/milestone-completeness-rubric.md",
|
|
916
|
+
"type": "heuristic",
|
|
917
|
+
"phase": 28.5,
|
|
918
|
+
"description": "Phase 28.5 — milestone-completeness rubric extracted from skills/turn-closeout per progressive-disclosure rule (Bucket 4 analysis + audit rework). Turn-closeout / new-cycle completeness criteria."
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"name": "peer-cli-protocol",
|
|
922
|
+
"path": "reference/peer-cli-protocol.md",
|
|
923
|
+
"type": "heuristic",
|
|
924
|
+
"phase": 28.5,
|
|
925
|
+
"description": "Phase 28.5 — peer-CLI protocol scaffold extracted from skills/peer-cli-add + skills/peer-cli-customize per progressive-disclosure rule (Bucket 4 analysis + audit rework). ACP + ASP adapter scaffolding patterns, verification ladder, Windows quirk handling."
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "plan-procedure",
|
|
929
|
+
"path": "reference/plan-procedure.md",
|
|
930
|
+
"type": "meta-rules",
|
|
931
|
+
"phase": 28.5,
|
|
932
|
+
"description": "Phase 28.5 — plan-stage procedure extracted from skills/plan per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "router-rules",
|
|
936
|
+
"path": "reference/router-rules.md",
|
|
937
|
+
"type": "heuristic",
|
|
938
|
+
"phase": 28.5,
|
|
939
|
+
"description": "Phase 28.5 — router-rules reference extracted from skills/router per progressive-disclosure rule (Bucket 3 orchestrator + utility rework). S/M/L/XL bucket assignments + path-selection heuristic."
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "scan-procedure",
|
|
943
|
+
"path": "reference/scan-procedure.md",
|
|
944
|
+
"type": "meta-rules",
|
|
945
|
+
"phase": 28.5,
|
|
946
|
+
"description": "Phase 28.5 — scan-stage procedure extracted from skills/scan per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"name": "skill-authoring-contract",
|
|
950
|
+
"path": "reference/skill-authoring-contract.md",
|
|
951
|
+
"type": "meta-rules",
|
|
952
|
+
"phase": 28.5,
|
|
953
|
+
"description": "Phase 28.5 skill-authoring contract — adapted from mattpocock/skills (MIT). SKILL.md <=100-line cap (warn >=100, block >=250 in CI), 1024-char description cap, <what>. Use when <triggers>. form (lax-mode default per Phase 33 A/B pending), frontmatter required fields, progressive-disclosure one-level-deep rule. Validator at scripts/validate-skill-length.cjs."
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "start-procedure",
|
|
957
|
+
"path": "reference/start-procedure.md",
|
|
958
|
+
"type": "heuristic",
|
|
959
|
+
"phase": 28.5,
|
|
960
|
+
"description": "Phase 28.5 — start-procedure reference extracted from skills/start per progressive-disclosure rule (Bucket 4 analysis + audit rework)."
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"name": "style-doc-procedure",
|
|
964
|
+
"path": "reference/style-doc-procedure.md",
|
|
965
|
+
"type": "meta-rules",
|
|
966
|
+
"phase": 28.5,
|
|
967
|
+
"description": "Phase 28.5 — style-doc procedure extracted from skills/style per progressive-disclosure rule (Bucket 2 design-family rework)."
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "threat-modeling",
|
|
971
|
+
"path": "reference/threat-modeling.md",
|
|
972
|
+
"type": "heuristic",
|
|
973
|
+
"phase": 28.5,
|
|
974
|
+
"description": "Phase 28.5 — STRIDE threat-modeling patterns extracted from skills/quality-gate + audit-side scanning per progressive-disclosure rule (Bucket 4 analysis + audit rework). Audit-side threat-model invariants."
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "verify-procedure",
|
|
978
|
+
"path": "reference/verify-procedure.md",
|
|
979
|
+
"type": "meta-rules",
|
|
980
|
+
"phase": 28.5,
|
|
981
|
+
"description": "Phase 28.5 — verify-stage procedure extracted from skills/verify per progressive-disclosure rule (Bucket 1 pipeline-stage rework)."
|
|
779
982
|
}
|
|
780
983
|
]
|
|
781
984
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"tier": { "enum": ["L0", "L1", "L2"] },
|
|
48
|
-
"phase": { "type": "
|
|
48
|
+
"phase": { "type": "number", "description": "Phase that introduced this entry. Numbers are allowed (e.g., 19.6, 27.5, 27.6, 27.7, 28.5) — decimal phases are valid per the long-standing precedent established by Phases 19.6 / 27.5 / 27.6 / 27.7 / 28.5." },
|
|
49
49
|
"description": { "type": "string" },
|
|
50
50
|
"registered_at": { "type": "string", "format": "date-time" }
|
|
51
51
|
},
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: router-rules
|
|
3
|
+
type: heuristic
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
phase: 28.5
|
|
6
|
+
tags: [router, path-selection, complexity-class, model-tier, runtime-resolution, cost-estimation]
|
|
7
|
+
last_updated: 2026-05-18
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Router Path-Selection + Runtime Resolution Rules
|
|
11
|
+
|
|
12
|
+
Extracted from `skills/router/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete
|
|
13
|
+
content). The router SKILL keeps its invocation contract, output schema versioning table,
|
|
14
|
+
integration point, and failure modes. The path-selection heuristic tables, the cost
|
|
15
|
+
estimation algorithm, and the runtime-aware model resolution computation contract live
|
|
16
|
+
here so the SKILL stays under the 100-line cap.
|
|
17
|
+
|
|
18
|
+
## Path Selection Heuristic
|
|
19
|
+
|
|
20
|
+
The router emits both `path` (legacy 3-tier enum) and `complexity_class` (Phase 25 4-tier enum). The canonical mapping is:
|
|
21
|
+
|
|
22
|
+
| complexity_class | path | Behavior |
|
|
23
|
+
|------------------|------|----------|
|
|
24
|
+
| `S` | `fast` (short-circuited) | Skip router itself, skip cache-manager, skip telemetry write. Deterministic no-op decision. |
|
|
25
|
+
| `M` | `fast` | Single Haiku + no checkers. |
|
|
26
|
+
| `L` | `quick` | Sonnet mappers + Haiku verify. |
|
|
27
|
+
| `XL` | `full` | Opus planners + full quality gates. Recommends worktree-isolation default + mandatory inter-stage checkpoint + reflector auto-spawn. |
|
|
28
|
+
|
|
29
|
+
Bucket assignment:
|
|
30
|
+
|
|
31
|
+
| Signal | complexity_class | path |
|
|
32
|
+
|--------|------------------|------|
|
|
33
|
+
| Command is `/gdd:help`, `/gdd:stats`, `/gdd:note`, `/gdd:health`, single-Haiku skill | `S` | `fast` (short-circuited — see below) |
|
|
34
|
+
| Command is `/gdd:scan`, `/gdd:brief`, `/gdd:sketch`, `/gdd:spike`, `/gdd:fast` | `M` | `fast` |
|
|
35
|
+
| Command spawns exactly one agent (no orchestration), not in S list | `M` | `fast` |
|
|
36
|
+
| Command is `/gdd:explore`, `/gdd:discover`, standalone `/gdd:verify`, standalone `/gdd:plan` | `L` | `quick` |
|
|
37
|
+
| Command spawns parallel mappers but no planners/auditors (`/gdd:discover` in `--auto` mode) | `L` | `quick` |
|
|
38
|
+
| Command is `/gdd:next`, `/gdd:do`, `/gdd:autonomous`, end-to-end Brief→Verify, anything spawning planners + auditors + verifiers in series | `XL` | `full` |
|
|
39
|
+
| Command spawns planners, auditors, verifiers, or integration-checkers (`/gdd:plan`, `/gdd:verify`, `/gdd:audit`) and is not standalone | `XL` | `full` |
|
|
40
|
+
| `--dry-run` flag present on any command | downgrade one tier (XL→L→M→S; `path` follows the mapping table) |
|
|
41
|
+
|
|
42
|
+
### S-class short-circuit
|
|
43
|
+
|
|
44
|
+
When `complexity_class` would be `S`, the router itself **does not run** for that invocation — the deterministic skip list is encoded in the `/gdd:*` SKILL.md entry of the matching command. The budget-enforcer hook treats "no router decision payload + matching command name" as the S-class signal and skips enforcement entirely (no telemetry row, no cache lookup, no event emission). When the router *is* invoked explicitly (e.g., debugging) it still emits `complexity_class: "S"` in the JSON for observability, but the runtime path is the no-op.
|
|
45
|
+
|
|
46
|
+
## Cost Estimation Algorithm
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
total = 0
|
|
50
|
+
for each agent in planned spawn graph:
|
|
51
|
+
tier = resolve_tier(agent) # budget.json tier_overrides > agent frontmatter default-tier
|
|
52
|
+
(in_tok, out_tok) = token_range_from_size_budget(agent.size_budget) # from reference/model-prices.md
|
|
53
|
+
(in_rate, out_rate) = price_from_tier(tier)
|
|
54
|
+
total += (in_tok / 1e6) * in_rate + (out_tok / 1e6) * out_rate
|
|
55
|
+
return total
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Runtime-aware model resolution
|
|
59
|
+
|
|
60
|
+
The router emits `resolved_models` alongside `model_tier_overrides` so downstream consumers (budget-enforcer cost computation, Phase 22 cost telemetry, Phase 23.5 bandit posterior store) can read the **concrete model ID** for the active runtime without re-deriving it from the tier name. The resolution is per-agent and additive — `model_tier_overrides` keeps its `opus|sonnet|haiku` enum for back-compat across all 14 runtimes, and `resolved_models` runs the runtime-specific translation on top of it.
|
|
61
|
+
|
|
62
|
+
Computation contract (per D-07):
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
runtime = runtimeDetect.detect() ?? 'claude'
|
|
66
|
+
for each agent in planned spawn graph:
|
|
67
|
+
tier = resolve_tier(agent) # same merge as model_tier_overrides
|
|
68
|
+
resolved_models[agent] = tierResolver.resolve(runtime, tier)
|
|
69
|
+
# → concrete model string OR null
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Implementation surfaces (Phase 26 / Wave A):
|
|
73
|
+
|
|
74
|
+
- `scripts/lib/runtime-detect.cjs` — `detect() → runtime-id | null`. Reads the same `*_CONFIG_DIR` / `*_HOME` env-vars Phase 24's installer uses (single source of truth in `scripts/lib/install/runtimes.cjs`). Returns `null` when no recognized runtime env-var is set; the router falls back to `'claude'` so the resolver always has a runtime ID to work with.
|
|
75
|
+
- `scripts/lib/tier-resolver.cjs` — `resolve(runtime, tier, opts?) → model | null`. Translates `opus|sonnet|haiku` to the concrete model the runtime understands using the `./runtime-models.md` mapping (Phase 26 / Wave A). Fallback chain (D-04): runtime-specific entry → `claude` row default with `tier_resolution_fallback` event → `null` with `tier_resolution_failed` event. Never throws; `null` is a valid output the consumer must handle.
|
|
76
|
+
|
|
77
|
+
Per-agent emission rules:
|
|
78
|
+
|
|
79
|
+
- One key per agent in the planned spawn graph (same key set the cost-estimation loop iterates over). Keys MUST match agent names exactly so consumers can join `resolved_models` against `model_tier_overrides` and the spawn graph by name.
|
|
80
|
+
- Value is the concrete model string returned by `tier-resolver.resolve(runtime, tier)`.
|
|
81
|
+
- When the resolver returns `null` (missing tier-map row, missing tier, garbage input), the value is JSON `null` — NOT omitted, NOT the empty string. Consumers (budget-enforcer, telemetry) MUST handle `null`: typically by skipping the cost row for that spawn and emitting their own diagnostic event, never by crashing.
|
|
82
|
+
- When `complexity_class` is `S` and the router itself short-circuits (see **S-class short-circuit** above), no payload is emitted at all and `resolved_models` does not exist for that invocation — the budget-enforcer's "no router decision payload" branch already handles this case.
|
|
83
|
+
|
|
84
|
+
Back-compat assertion: a router invocation in a Claude runtime (or any environment where `runtime-detect.detect()` returns `null` and the router falls back to `'claude'`) produces `resolved_models` values that are the canonical Anthropic model IDs (`claude-opus-4-7`, `claude-sonnet-4-6`, `claude-haiku-4-5`) for the corresponding tiers. Pre-Phase-26 consumers that ignore `resolved_models` see the same `model_tier_overrides` they always saw (Plan 26-09 owns the runtime fixture diff that asserts this).
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# RTL, CJK, and Cultural Localization — Reference Guide
|
|
2
2
|
|
|
3
|
+
> For engineering primitives (CSS logical properties, Intl.\* family, bidi isolation, ICU MessageFormat, text-expansion budgets, multi-script font stacks, Unicode hygiene), see [`./i18n.md`](./i18n.md). This file owns cultural context (greeting forms, color symbolism, CJK family-name conventions, imagery norms).
|
|
4
|
+
|
|
3
5
|
Designing for a global audience is not a matter of translating strings and calling the work done. Layout direction, typographic rendering, number formatting, color semantics, and imagery all carry culturally specific expectations that, when violated, signal to users that the product was not made for them. This reference consolidates the key technical and cultural considerations that the get-design-done framework requires designers and engineers to understand before shipping to any non-English or non-Western market.
|
|
4
6
|
|
|
5
7
|
---
|