@hegemonart/get-design-done 1.37.1 → 1.37.2
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 +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +4 -0
- package/SKILL.md +1 -0
- package/agents/ds-generator.md +74 -0
- package/package.json +1 -1
- package/reference/ds-bootstrap-rubric.md +51 -0
- package/reference/registry.json +7 -0
- package/scripts/lib/ds/token-scale.cjs +88 -0
- package/skills/bootstrap-ds/SKILL.md +43 -0
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Get Design Done — 5-stage agent-orchestrated design pipeline with 9 connections, handoff-first workflow, bidirectional Figma write-back, 22+ specialized agents, queryable knowledge layer (intel store, dependency analysis, learnings extraction), and a self-improvement loop (reflector, frontmatter + budget feedback, global-skills layer). v1.20.0 ships the SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream, and resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) for rate-limit + 429 + context-overflow recovery. Full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
|
|
8
|
-
"version": "1.37.
|
|
8
|
+
"version": "1.37.2"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "get-design-done",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), Claude Design handoff, bidirectional Figma write-back, and a queryable intel store (.design/intel/) for dependency and learnings queries. Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation. Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain.",
|
|
15
|
-
"version": "1.37.
|
|
15
|
+
"version": "1.37.2",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.37.
|
|
4
|
+
"version": "1.37.2",
|
|
5
5
|
"description": "Agent-orchestrated 5-stage design pipeline: Brief → Explore → Plan → Design → Verify. 22+ specialized agents, 9 connections (Figma, Refero, Preview, Storybook, Chromatic, Figma Writer, Graphify, Pinterest, Claude Design), handoff-first workflow via Claude Design bundles, bidirectional Figma write-back (annotations, Code Connect), queryable intel store (`.design/intel/`) for O(1) design surface lookups, and self-improvement loop (reflector agent, frontmatter + budget feedback, global-skills layer at `~/.claude/gdd/global-skills/`). Standalone commands: style, darkmode, compare, figma-write, graphify, handoff, analyze-dependencies, skill-manifest, extract-learnings, reflect, apply-reflections. Embeds NNG heuristics, WCAG thresholds, typographic systems, motion framework, and anti-pattern catalog. Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows, lint + schema + frontmatter + stale-ref + shellcheck + gitleaks + injection-scan + blocking size-budget) and release automation (auto-tag + GitHub Release + release-time smoke test). Optimization layer (v1.0.4.1, retroactive): gdd-router + gdd-cache-manager skills, PreToolUse budget-enforcer hook, tier-aware agent frontmatter, lazy checker gates, streaming synthesizer, /gdd:warm-cache + /gdd:optimize commands, and cost telemetry at .design/telemetry/costs.jsonl — targeting 50-70% per-task token-cost reduction with no quality-floor regression. v1.20.0 SDK foundation: gdd-state MCP server (11 typed tools), lockfile-safe STATE.md mutations, event stream at .design/telemetry/events.jsonl, resilience primitives (jittered-backoff, rate-guard, error-classifier, iteration-budget) with rate-limit + 429 + context-overflow recovery, and TypeScript toolchain. v1.27.7 ships gdd-mcp (Phase 27.7): 12 read-only MCP tools for sub-3s priming. v1.28.0 (Phase 28): Foundational References Tier 2 — 5 new reference files (color-theory, composition, proportion-systems, i18n, contrast-advanced), 2 verifier i18n probes + 1 explore i18n-readiness probe, 12 additive cross-link insertions across 10 existing references, 2 orthogonal audit-scoring lens-tags (composition_alignment + i18n_readiness).",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "hegemonart",
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.37.2] - 2026-06-01
|
|
8
|
+
|
|
9
|
+
### Phase 37.2 — Greenfield Design-System Bootstrap (`/gdd:bootstrap-ds`) — completes Phase 37
|
|
10
|
+
|
|
11
|
+
Second and **FINAL** sub-phase of the split **Phase 37** — completing it marks the **parent Phase 37 COMPLETE** (AI-Native Tools Wave 2 + Greenfield DS Bootstrap). Closes the greenfield gap: GDD assumed a design system already existed (in code or Figma) — a brand-new project has none. `/gdd:bootstrap-ds` turns a brand input into a coherent token system + proof components. **No new runtime dependency** — the token math emits native CSS `oklch()` (no color-conversion library).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`scripts/lib/ds/token-scale.cjs`** — a pure, dependency-free (zero `require`) token generator. `oklchScale(primary)` → 9 tint/shade stops as native CSS `oklch()`, anchored at the primary, lightness interpolated toward white/black, chroma damped at the extremes (no OKLab→sRGB conversion, no color library); `typeScale` (modular), `spacingScale` (4pt/8pt), `radiusScale`. Deterministic.
|
|
16
|
+
- **`reference/ds-bootstrap-rubric.md`** — greenfield emission rules: primary → 9 tints; **never more than 2 brand colors**; neutrals + semantic colors; type ratios 1.2/1.25/1.333; 4pt/8pt spacing; radius + motion defaults; the 3 variants; role-named CSS-custom-property emission + framework mapping; proof scaffolding. Registered (`type: heuristic`, `phase: 37.2`; 150 → 151).
|
|
17
|
+
- **`agents/ds-generator.md`** — brand-input → token system via `token-scale.cjs` + the rubric + `color-theory.md`. Emits **3 variants** (conservative / balanced / bold), the user picks one, then scaffolds **button / input / card** in the detected framework (web default; native via Phase 34). Never invents a brand; never overwrites an existing DS; proposal→confirm.
|
|
18
|
+
- **`skills/bootstrap-ds/SKILL.md`** (`/gdd:bootstrap-ds`) — brand-input intake (primary + secondary + tone tags + target framework) → `ds-generator`. 43 lines (≤100 Phase-28.5 contract).
|
|
19
|
+
|
|
20
|
+
### Notes
|
|
21
|
+
|
|
22
|
+
- **No new runtime dependency** (native `oklch()`), **no new egress**.
|
|
23
|
+
- 6-manifest lockstep at **v1.37.2** + `OFF_CADENCE_VERSIONS.add('1.37.2')` + the 27 live-pinned `manifests-version.txt` baselines forward-propagated 1.37.1 → 1.37.2.
|
|
24
|
+
- Inventory relock: skill-list 75 → 76 (+`bootstrap-ds`, both `current/` + `phase-20/`), phase-20 agent-list 49 → 50 (+`ds-generator`) + both frontmatter-snapshots, registry-diff 150 → 151, tarball golden 676 → 680 (+4); root `SKILL.md` command table + `command-count-sync` gate updated.
|
|
25
|
+
- **This completes the parent Phase 37 (AI-Native Tools Wave 2 + Greenfield DS Bootstrap).**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
7
29
|
## [1.37.1] - 2026-06-01
|
|
8
30
|
|
|
9
31
|
### Phase 37.1 — AI-Native Tools Wave 2 (Framer + Penpot + Webflow + v0.dev + Plasmic + Builder.io)
|
package/README.md
CHANGED
|
@@ -166,6 +166,10 @@ GDD now opens the motion **exports** a project ships. The pure, dependency-free
|
|
|
166
166
|
|
|
167
167
|
Six more AI-native design tools join the connection layer (Phase 14's backlog, now scheduled): **Framer**, **Penpot**, and **Webflow** (canvas-category — read frames/boards/structure as design sources) plus **v0.dev**, **Plasmic**, and **Builder.io** (generator-category — prompt→component, wired into [`design-component-generator`](agents/design-component-generator.md) as `<!-- impl: -->` sections). Plasmic is dual (canvas + generator). Onboarding grows 21 → 27. Each is an opt-in MCP/API connection that degrades to code-only when absent — **no new runtime dependency**. First sub-phase of Phase 37 (Greenfield DS Bootstrap follows).
|
|
168
168
|
|
|
169
|
+
### Greenfield design-system bootstrap (v1.37.2)
|
|
170
|
+
|
|
171
|
+
`/gdd:bootstrap-ds` gives a brand-new project a coherent design system from a brand input (a primary color + optional secondary + tone tags + target framework). The pure [`token-scale`](scripts/lib/ds/token-scale.cjs) helper emits a 9-stop OKLCH color scale as native CSS `oklch()` (no color-conversion library), a modular type scale, a 4pt/8pt spacing scale, and radius/motion defaults; [`ds-generator`](agents/ds-generator.md) offers **3 variants** (conservative / balanced / bold) to pick from per [`reference/ds-bootstrap-rubric.md`](reference/ds-bootstrap-rubric.md), then scaffolds button/input/card proof components. Never invents a brand; never overwrites an existing DS. **No new runtime dependency.** This **completes Phase 37** (AI-native Wave 2 + greenfield bootstrap).
|
|
172
|
+
|
|
169
173
|
### Previous releases
|
|
170
174
|
|
|
171
175
|
- **v1.26.0** — Headless Model Resolver (per-runtime tier→model map, `resolved_models` router field, per-runtime price tables, `reasoning-class` runtime-neutral alias).
|
package/SKILL.md
CHANGED
|
@@ -100,6 +100,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
100
100
|
| `benchmark <component\|--wave N\|--list\|--refresh component>` | `get-design-done:gdd-benchmark` | Harvest + synthesize per-component design specs from 18 design systems → `reference/components/<name>.md` |
|
|
101
101
|
| `benchmark <component\|--wave N\|--list\|--refresh component>` | `get-design-done:gdd-benchmark` | Harvest + synthesize per-component design specs from 18 design systems → `reference/components/<name>.md` |
|
|
102
102
|
| `export <cycle> --format html\|pdf\|notion [--pseudonymize] [--pr]` | `get-design-done:gdd-export` | Phase 35.5 — package a finished cycle's design output into a stakeholder-shareable artifact (self-contained HTML / Paged.js-print PDF / Notion page); redacts always, `--pseudonymize` masks identity for external sharing, `--pr` posts the HTML preview via pr-commenter |
|
|
103
|
+
| `bootstrap-ds [--primary <color>] [--secondary <color>] [--tone <tags>] [--framework <t>]` | `get-design-done:gdd-bootstrap-ds` | Phase 37.2 — bootstrap a design system for a GREENFIELD project (no DS): brand input → OKLCH token system (color tints + modular type + 4pt/8pt spacing + radius/motion) in 3 variants to pick, then button/input/card proof scaffolding via `ds-generator` |
|
|
103
104
|
|
|
104
105
|
## Handoff Routing
|
|
105
106
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ds-generator
|
|
3
|
+
description: Greenfield design-system generator. Turns a brand input (primary color + optional secondary + tone tags + target framework) into a coherent token system — OKLCH color tints/shades, a modular type scale, a 4pt/8pt spacing scale, radius + motion defaults — via the pure scripts/lib/ds/token-scale.cjs and reference/ds-bootstrap-rubric.md. Emits 3 variants (conservative/balanced/bold) for the user to pick, then scaffolds proof components (button/input/card) in the detected framework. Proposal→confirm; never overwrites an existing design system.
|
|
4
|
+
tools: Read, Write, Bash, Glob, Grep
|
|
5
|
+
color: green
|
|
6
|
+
default-tier: opus
|
|
7
|
+
tier-rationale: "Greenfield token-system synthesis is a design-judgment task (OKLCH color relationships, scale selection, tone→ratio mapping grounded in color-theory) — Opus-tier, not a mechanical worker."
|
|
8
|
+
size_budget: LARGE
|
|
9
|
+
size_budget_rationale: "Honest tier sized to the ~120-line body. The agent states the brand-input → token-system → 3-variants → scaffold flow and DELEGATES the deterministic math to scripts/lib/ds/token-scale.cjs and the emission rules to reference/ds-bootstrap-rubric.md (the pdf-executor→validate-print-css precedent)."
|
|
10
|
+
parallel-safe: false
|
|
11
|
+
typical-duration-seconds: 90
|
|
12
|
+
reads-only: false
|
|
13
|
+
writes:
|
|
14
|
+
- ".design/tokens/**"
|
|
15
|
+
- "src/** (proof components, on confirm only)"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
@reference/shared-preamble.md
|
|
19
|
+
|
|
20
|
+
# ds-generator
|
|
21
|
+
|
|
22
|
+
## Role
|
|
23
|
+
|
|
24
|
+
Bootstrap a coherent design system for a **greenfield** project that has none — no Figma, no token file, no component library. Take a brand input and emit a token system + a few proof components, grounded in `reference/ds-bootstrap-rubric.md` + `reference/color-theory.md`, using the deterministic `scripts/lib/ds/token-scale.cjs`. **Never invent a brand** (no logomark, no typeface, no third brand color) and **never overwrite an existing DS** — if `design-context-builder` already mapped one, stop and defer to it.
|
|
25
|
+
|
|
26
|
+
## When invoked
|
|
27
|
+
|
|
28
|
+
By `/gdd:bootstrap-ds` (the skill collects the brand input). Also reachable when `design-context-builder` detects a greenfield project (no DS signals) and the user opts in.
|
|
29
|
+
|
|
30
|
+
## Inputs (brand input)
|
|
31
|
+
|
|
32
|
+
- **primary** (required) — a brand color (hex / rgb / `oklch()`). Convert to OKLCH `{l, c, h}`.
|
|
33
|
+
- **secondary** (optional) — a second brand color. Emitted only if supplied (rubric ≤2-colors rule).
|
|
34
|
+
- **tone tags** (optional) — e.g. `calm`, `corporate`, `editorial`, `playful`, `bold` → maps to the type ratio + chroma treatment per the rubric.
|
|
35
|
+
- **target framework** (optional) — `web` (default) / `native-ios` / `native-android` / `flutter` (Phase 34 routing). Detect from the project if absent.
|
|
36
|
+
|
|
37
|
+
## Step 1 — Resolve the primary to OKLCH
|
|
38
|
+
|
|
39
|
+
Parse the brand primary to `{ l, c, h }`. If given as hex/rgb, convert to OKLCH (state the conversion; do NOT add a color library — use a documented inline conversion or ask the user for the `oklch()` value). Validate `l ∈ 0..1`, `c ≥ 0`, `h ∈ 0..360`.
|
|
40
|
+
|
|
41
|
+
## Step 2 — Generate the 3 variants
|
|
42
|
+
|
|
43
|
+
For each of **conservative / balanced / bold** (rubric table), run the pure generator and assemble a token set:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node -e "const t=require('./scripts/lib/ds/token-scale.cjs'); \
|
|
47
|
+
console.log(JSON.stringify({ \
|
|
48
|
+
color: t.oklchScale({l:L,c:C,h:H}), \
|
|
49
|
+
type: t.typeScale(1, RATIO), \
|
|
50
|
+
space: t.spacingScale(BASE, 8), \
|
|
51
|
+
radius: t.radiusScale(R) }, null, 2))"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Vary chroma (×0.8 / ×1.0 / ×1.15-clamped), type ratio (1.2 / 1.25 / 1.333), and radius (4 / 8 / 12) per the rubric. Emit neutrals (low-chroma ramp) + semantic colors (success/warning/danger/info at fixed hues) the same way. Verify text/surface pairings clear WCAG AA (`reference/color-theory.md`).
|
|
55
|
+
|
|
56
|
+
## Step 3 — Present + pick (D-02)
|
|
57
|
+
|
|
58
|
+
Show the 3 variants compactly (the `500` primary, the type ratio, the spacing baseline, the radius, a one-line feel). The user picks ONE. Do not scaffold before the pick.
|
|
59
|
+
|
|
60
|
+
## Step 4 — Emit the chosen token set (proposal → confirm)
|
|
61
|
+
|
|
62
|
+
Emit role-named CSS custom properties (`:root { --color-primary-500: oklch(...); --space-4: 16px; --radius-md: 8px; ... }`) as the canonical artifact, plus the target-framework mapping (web → Tailwind `theme.extend` / shadcn CSS vars; native → `reference/native-platforms.md`). Propose the file(s); write only on confirm.
|
|
63
|
+
|
|
64
|
+
## Step 5 — First-component scaffolding (proof)
|
|
65
|
+
|
|
66
|
+
Emit **button + input + card** in the target framework, consuming only the emitted tokens — a coherence proof, not a component library. Proposal→confirm; never write to `src/` without it.
|
|
67
|
+
|
|
68
|
+
## Record
|
|
69
|
+
|
|
70
|
+
Emit a `## Bootstrap summary` for the cycle: the chosen variant, the token counts (9 color stops + neutrals + semantics, N type steps, N spacing steps), the framework, and the scaffolded components. Close with:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
## DS BOOTSTRAP COMPLETE
|
|
74
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.2",
|
|
4
4
|
"description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
|
|
5
5
|
"author": "Hegemon",
|
|
6
6
|
"homepage": "https://github.com/hegemonart/get-design-done",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Greenfield Design-System Bootstrap Rubric
|
|
2
|
+
|
|
3
|
+
Emission rules for `/gdd:bootstrap-ds` + `agents/ds-generator.md` — how to turn a brand input (a primary color + optional secondary + tone tags + target framework) into a coherent token system, **without inventing a brand**. The deterministic math lives in `scripts/lib/ds/token-scale.cjs`; the color-theory grounding lives in `reference/color-theory.md`. This file is the rulebook the generator obeys.
|
|
4
|
+
|
|
5
|
+
GDD does not author a brand identity (logomarks, voice) — it emits a **starter token system + a few proof components** a greenfield project can build on.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Color
|
|
10
|
+
|
|
11
|
+
- **Primary → 9 tints/shades.** Convert the brand primary to OKLCH `{l, c, h}`, then call `oklchScale(primary)` → 9 stops (`100`…`900`) emitted as native CSS `oklch()`. Stop `500` is the primary exactly; lighter stops interpolate L toward white with damped chroma; darker stops toward black. Native `oklch()` — **no hex conversion, no color library**.
|
|
12
|
+
- **Never auto-generate more than 2 brand colors.** Primary is always emitted. A **secondary** scale is emitted **only if the user supplies one**. Never invent a third brand hue.
|
|
13
|
+
- **Neutrals** — a low-chroma gray ramp (chroma ≤ 0.02) sharing the primary's hue for a subtle tint, or pure neutral (`c = 0`). 9 stops via `oklchScale({ l, c: 0.012, h: primary.h })`.
|
|
14
|
+
- **Semantic colors** — success / warning / danger / info derived at fixed hues (≈145 / 85 / 25 / 255) at the brand's mid-lightness + chroma, so they sit in the same family. These are functional, not "brand" colors (they do not count against the ≤2 rule).
|
|
15
|
+
- **Contrast** — every text-on-surface pairing must clear WCAG AA (see `reference/color-theory.md`); the generator checks the chosen `500`/`700` against white/`50`.
|
|
16
|
+
|
|
17
|
+
## Typography
|
|
18
|
+
|
|
19
|
+
- **Modular scale** via `typeScale(baseRem, ratio, steps)`. Base `1rem` (16px). **Ratio ∈ {1.2 (minor third), 1.25 (major third), 1.333 (perfect fourth)}** — pick by tone (calm → 1.2, default → 1.25, editorial/bold → 1.333).
|
|
20
|
+
- Emit named steps (`xs`…`5xl`) from the scale; line-height pairs (tight 1.2 for headings, 1.5 for body).
|
|
21
|
+
- Font family is a **slot**, not a choice — emit a system-font stack placeholder + a `--font-sans` / `--font-mono` variable the user swaps. GDD does not pick a typeface (brand territory).
|
|
22
|
+
|
|
23
|
+
## Spacing
|
|
24
|
+
|
|
25
|
+
- **4pt or 8pt baseline** via `spacingScale(basePx, count)` (8pt is the default; 4pt for dense/data UIs). Emit the standard `[1,2,3,4,6,8,12,16]` multiples as `--space-*`.
|
|
26
|
+
|
|
27
|
+
## Radius + Motion
|
|
28
|
+
|
|
29
|
+
- **Radius** via `radiusScale(basePx)` → `sm/md/lg/xl/full` (`full = 9999` pill).
|
|
30
|
+
- **Motion defaults** — durations `fast 150ms / base 250ms / slow 400ms`; easing `ease-out` for enters, a standard curve for moves; **always** respect `prefers-reduced-motion` (emit the media-query guard).
|
|
31
|
+
|
|
32
|
+
## The 3 variants (D-02 — user picks one)
|
|
33
|
+
|
|
34
|
+
The generator emits three coherent variants; the user picks ONE before first-component scaffolding:
|
|
35
|
+
|
|
36
|
+
| Variant | Chroma | Type ratio | Spacing | Radius | Feel |
|
|
37
|
+
|---|---|---|---|---|---|
|
|
38
|
+
| **conservative** | damped (×0.8) | 1.2 | 8pt | sm (4) | calm, corporate, dense-friendly |
|
|
39
|
+
| **balanced** (default) | as given | 1.25 | 8pt | md (8) | versatile default |
|
|
40
|
+
| **bold** | boosted (×1.15, clamped) | 1.333 | 8pt | lg (12) | expressive, marketing-forward |
|
|
41
|
+
|
|
42
|
+
## Emission format
|
|
43
|
+
|
|
44
|
+
- Emit **CSS custom properties** (`:root { --color-primary-500: oklch(...); --space-4: 16px; ... }`) as the canonical artifact, plus a target-framework mapping:
|
|
45
|
+
- **web (default)** — a Tailwind `theme.extend` block (or shadcn CSS variables) + the `:root` tokens.
|
|
46
|
+
- **native** — route the token set through `reference/native-platforms.md` (Phase 34) for SwiftUI / Compose / Flutter theme objects.
|
|
47
|
+
- Tokens are **named by role, not value** (`--color-primary-500`, not `--blue-500`) so a rebrand is a one-line hue change.
|
|
48
|
+
|
|
49
|
+
## First-component scaffolding (proof artifact)
|
|
50
|
+
|
|
51
|
+
After the user picks a variant, emit **button + input + card** in the detected target framework, consuming only the emitted tokens — a proof the system is coherent, not a full component library (that is out of scope).
|
package/reference/registry.json
CHANGED
|
@@ -972,6 +972,13 @@
|
|
|
972
972
|
"type": "heuristic",
|
|
973
973
|
"phase": 36.3,
|
|
974
974
|
"description": "Phase 36.3 Tier-3 conversational-UI patterns (voice + chatbot): voice-flow no-input/no-match reprompts + confirmation + human handoff, multi-turn dialogue (context carryover, slot-filling, repair), prompt-as-UX (the assistant persona/tone/boundaries as a versioned design artifact), chatbot empty-states + suggested replies, voice-first onboarding, error recovery + accessibility (transcripts/captions). Carries Detection signals + an Audit checklist; loaded by design-context-builder for the conversational project type. CLI/REPL UX out of scope."
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "ds-bootstrap-rubric",
|
|
978
|
+
"path": "reference/ds-bootstrap-rubric.md",
|
|
979
|
+
"type": "heuristic",
|
|
980
|
+
"phase": 37.2,
|
|
981
|
+
"description": "Phase 37.2 greenfield DS emission rules for /gdd:bootstrap-ds + agents/ds-generator.md: primary→9 OKLCH tints (native oklch(), no color library), never >2 brand colors, neutrals + semantic colors, modular type scale (ratio 1.2/1.25/1.333), 4pt/8pt spacing, radius + motion defaults, the 3 variants (conservative/balanced/bold), role-named CSS-custom-property emission + framework mapping, and button/input/card proof scaffolding. Deterministic math in scripts/lib/ds/token-scale.cjs."
|
|
975
982
|
}
|
|
976
983
|
]
|
|
977
984
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* scripts/lib/ds/token-scale.cjs — Phase 37.2 greenfield token-scale generator.
|
|
4
|
+
*
|
|
5
|
+
* Pure + dep-free (D-01): zero `require`, no color-conversion library. Emits native CSS
|
|
6
|
+
* `oklch(L C H)` strings — modern browsers render OKLCH directly, so no OKLab→sRGB→hex
|
|
7
|
+
* conversion is needed. Deterministic: same input → byte-identical output (hermetic tests).
|
|
8
|
+
*
|
|
9
|
+
* - oklchScale(primary, opts?) → 9 tint/shade stops {stop, oklch}, anchored at the primary,
|
|
10
|
+
* interpolating lightness toward white/black and damping chroma at the extremes.
|
|
11
|
+
* - typeScale(baseRem, ratio, steps?) → a modular type scale {step, rem}.
|
|
12
|
+
* - spacingScale(basePx, count?) → a 4pt/8pt geometric spacing scale (px).
|
|
13
|
+
* - radiusScale(basePx?) → sm/md/lg/xl/full radii (px / 9999 for full).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const round = (n, d) => {
|
|
17
|
+
const f = Math.pow(10, d);
|
|
18
|
+
return Math.round(n * f) / f;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const DEFAULT_STOPS = [100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* oklchScale({ l, c, h }, opts) — l ∈ 0..1 (lightness), c ∈ 0..~0.4 (chroma), h ∈ 0..360 (hue).
|
|
25
|
+
* Anchors the `anchorStop` (default 500) at the primary, then interpolates L toward `lLight`
|
|
26
|
+
* for lighter stops and `lDark` for darker stops, damping chroma toward the extremes.
|
|
27
|
+
*/
|
|
28
|
+
function oklchScale(primary, opts = {}) {
|
|
29
|
+
const { l, c, h } = primary || {};
|
|
30
|
+
if (typeof l !== 'number' || typeof c !== 'number' || typeof h !== 'number') {
|
|
31
|
+
throw new TypeError('oklchScale: primary must be { l:number, c:number, h:number }');
|
|
32
|
+
}
|
|
33
|
+
const stops = opts.stops || DEFAULT_STOPS;
|
|
34
|
+
const anchor = opts.anchorStop || 500;
|
|
35
|
+
const lLight = opts.lLight != null ? opts.lLight : 0.97;
|
|
36
|
+
const lDark = opts.lDark != null ? opts.lDark : 0.22;
|
|
37
|
+
const i500 = stops.indexOf(anchor) === -1 ? Math.floor(stops.length / 2) : stops.indexOf(anchor);
|
|
38
|
+
|
|
39
|
+
return stops.map((stop, i) => {
|
|
40
|
+
let L;
|
|
41
|
+
let C;
|
|
42
|
+
if (i === i500) {
|
|
43
|
+
L = l; C = c;
|
|
44
|
+
} else if (i < i500) {
|
|
45
|
+
const t = (i500 - i) / i500; // 0..1 toward the lightest stop
|
|
46
|
+
L = l + (lLight - l) * t;
|
|
47
|
+
C = c * (1 - 0.75 * t); // damp chroma toward white
|
|
48
|
+
} else {
|
|
49
|
+
const t = (i - i500) / (stops.length - 1 - i500); // 0..1 toward the darkest stop
|
|
50
|
+
L = l + (lDark - l) * t;
|
|
51
|
+
C = c * (1 - 0.45 * t); // damp chroma toward black (less than toward white)
|
|
52
|
+
}
|
|
53
|
+
return { stop, oklch: `oklch(${round(L, 3)} ${round(Math.max(C, 0), 4)} ${round(h, 2)})` };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* typeScale(baseRem, ratio, steps) — a modular scale. Returns `steps.length` entries,
|
|
59
|
+
* each `{ step, rem }` with rem = baseRem * ratio^step (step 0 = base). Default steps -1..5.
|
|
60
|
+
*/
|
|
61
|
+
function typeScale(baseRem = 1, ratio = 1.25, steps = [-1, 0, 1, 2, 3, 4, 5]) {
|
|
62
|
+
if (!(baseRem > 0) || !(ratio > 1)) throw new TypeError('typeScale: baseRem > 0 and ratio > 1 required');
|
|
63
|
+
return steps.map((step) => ({ step, rem: round(baseRem * Math.pow(ratio, step), 3) }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* spacingScale(basePx, count) — a geometric spacing scale off a 4pt/8pt baseline.
|
|
68
|
+
* Returns `count` entries `{ step, px }` following the standard [1,2,3,4,6,8,12,16,...] multiples.
|
|
69
|
+
*/
|
|
70
|
+
function spacingScale(basePx = 4, count = 8) {
|
|
71
|
+
if (![4, 8].includes(basePx)) throw new RangeError('spacingScale: basePx must be 4 or 8 (a 4pt/8pt baseline)');
|
|
72
|
+
const mult = [1, 2, 3, 4, 6, 8, 12, 16, 24, 32];
|
|
73
|
+
return mult.slice(0, count).map((m, i) => ({ step: i + 1, px: basePx * m }));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** radiusScale(basePx) — sm/md/lg/xl/full. full = 9999 (pill). */
|
|
77
|
+
function radiusScale(basePx = 8) {
|
|
78
|
+
if (!(basePx > 0)) throw new TypeError('radiusScale: basePx > 0 required');
|
|
79
|
+
return {
|
|
80
|
+
sm: round(basePx / 2, 2),
|
|
81
|
+
md: basePx,
|
|
82
|
+
lg: basePx * 2,
|
|
83
|
+
xl: basePx * 3,
|
|
84
|
+
full: 9999,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = { oklchScale, typeScale, spacingScale, radiusScale, DEFAULT_STOPS };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-bootstrap-ds
|
|
3
|
+
description: "Bootstraps a design system for a GREENFIELD project that has none — no Figma, no tokens, no component library. Takes a brand input (primary color + optional secondary + tone tags + target framework) and emits a coherent OKLCH token system (color tints, modular type scale, 4pt/8pt spacing, radius + motion defaults) in 3 variants to pick from, then scaffolds proof components (button/input/card). Use at the start of a brand-new project, or when /gdd:discover finds no existing design system. Never invents a brand; never overwrites an existing DS."
|
|
4
|
+
argument-hint: "[--primary <color>] [--secondary <color>] [--tone <tags>] [--framework web|native-ios|native-android|flutter]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, Task
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:bootstrap-ds
|
|
10
|
+
|
|
11
|
+
Greenfield design-system bootstrap. Closes the gap that GDD's `design-context-builder` assumes a design system already exists (in code or Figma) — a brand-new project has none. This skill is the **front door**: it collects a brand input and hands it to `agents/ds-generator.md`, which emits the token system + proof components per `reference/ds-bootstrap-rubric.md` (deterministic math in `scripts/lib/ds/token-scale.cjs`).
|
|
12
|
+
|
|
13
|
+
## When to use
|
|
14
|
+
|
|
15
|
+
- At the start of a brand-new project (no `tailwind.config`, no token file, no DS).
|
|
16
|
+
- When `/gdd:discover` / `design-context-builder` reports **no existing design system** and the user opts to bootstrap one.
|
|
17
|
+
|
|
18
|
+
If a design system **already exists**, do NOT run this — defer to `design-context-builder` (it maps the existing one). State that and stop.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. **Collect the brand input.** From flags, or via `AskUserQuestion` for anything missing:
|
|
23
|
+
- **primary** (required) — the brand color (hex / rgb / `oklch()`).
|
|
24
|
+
- **secondary** (optional) — a second brand color (emitted only if supplied — the rubric's ≤2-brand-colors rule).
|
|
25
|
+
- **tone tags** (optional) — `calm` / `corporate` / `editorial` / `playful` / `bold` (maps to the type ratio + chroma treatment).
|
|
26
|
+
- **target framework** (optional) — `web` (default) / `native-ios` / `native-android` / `flutter`. Detect from the project if absent (Phase 34 routing).
|
|
27
|
+
2. **Delegate to `ds-generator`** (via `Task`): it resolves the primary to OKLCH, runs `token-scale.cjs` for **3 variants** (conservative / balanced / bold), and presents them.
|
|
28
|
+
3. **Pick a variant.** Surface the 3 variants (primary `500`, type ratio, spacing baseline, radius, feel); the user picks ONE.
|
|
29
|
+
4. **Emit + scaffold (proposal → confirm).** `ds-generator` emits the chosen token set (role-named CSS custom properties + the framework mapping) and scaffolds **button / input / card** as a coherence proof. Nothing is written to `src/` without confirmation.
|
|
30
|
+
|
|
31
|
+
## Do Not
|
|
32
|
+
|
|
33
|
+
- Do not invent a brand (no logomark, no typeface choice, no third brand color) — emit a token *system*, not an identity.
|
|
34
|
+
- Do not overwrite an existing design system — defer to `design-context-builder`.
|
|
35
|
+
- Do not add a color-conversion dependency — `token-scale.cjs` emits native CSS `oklch()`.
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
End with:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
## BOOTSTRAP-DS COMPLETE
|
|
43
|
+
```
|