@tekyzinc/gsd-t 2.58.10 → 2.59.10
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/CHANGELOG.md +13 -0
- package/commands/gsd-t-design-decompose.md +29 -6
- package/commands/gsd-t-execute.md +27 -0
- package/commands/gsd-t-quick.md +7 -1
- package/package.json +1 -1
- package/templates/design-chart-taxonomy.md +265 -0
- package/templates/element-contract.md +26 -0
- package/templates/widget-contract.md +21 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [2.59.10] - 2026-04-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Chart & Atom Taxonomy** — `templates/design-chart-taxonomy.md` — closed enumeration of ~70 valid element names across charts, axes, legends, cards, tables, controls, atoms (icons/badges/chips/dividers), typography, and layout primitives. Fixes catastrophic failure mode where agents invented element names and picked wrong chart variants (e.g., `chart-bar-grouped-vertical` when design was `chart-bar-stacked-horizontal-percentage`). `gsd-t-design-decompose` now REQUIRES element names to come from this closed set.
|
|
9
|
+
- **Visual distinguisher decision rules** per chart category (stacked vs grouped vs percentage, pie vs donut vs gauge, line vs area, categorical vs histogram) to prevent near-match pattern-matching.
|
|
10
|
+
- **Atoms taxonomy** — icons, badges, chips, dividers, avatars, status-dots, spinners, tooltips, breadcrumbs, pagination, tags — the most-forgotten element tier.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Element template**: `Test Fixture` section is now MANDATORY with the EXACT labels/values/percentages extracted from the design source. Placeholder data (Calculator/Planner/Tracker instead of real labels) is FORBIDDEN. Verifier compares labels verbatim.
|
|
14
|
+
- **Widget template**: adds mandatory **Card Chrome Slots** section (title, subtitle, header_right_control, kpi_header, body, body_sidebar, footer, footer_legend) — each must be filled or explicitly marked N/A. Fixes the "missing subtitle, missing per-card filter dropdown, missing KPI-above-chart" defect.
|
|
15
|
+
- **Design Verification Agent** (gsd-t-execute Step 5.25 + gsd-t-quick Step 5.25): adds mandatory **Step 0 — Data-Labels Cross-Check** that runs BEFORE visual comparison. Verifies every label/value/percentage from the Test Fixture appears verbatim in the rendered UI. Wrong data = CRITICAL deviation, no visual polish can redeem it.
|
|
16
|
+
- **gsd-t-design-decompose**: MUST ingest existing flat `design-contract.md` when present (especially the `## Verification Status` section from prior verified builds) as ground truth for Test Fixture data — no re-inventing labels.
|
|
17
|
+
|
|
5
18
|
## [2.58.10] - 2026-04-05
|
|
6
19
|
|
|
7
20
|
### Added
|
|
@@ -15,19 +15,27 @@ If the project is small (single page, ≤10 elements, nothing reusable), use the
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## Step 0: Detect Inputs
|
|
18
|
+
## Step 0: Detect Inputs + Load Taxonomy
|
|
19
19
|
|
|
20
20
|
Run these checks, log results to user inline:
|
|
21
21
|
|
|
22
22
|
1. **Figma MCP available?**
|
|
23
23
|
- If yes → log "Figma MCP detected — will extract exact tokens per element"
|
|
24
24
|
- If no → log "Figma MCP unavailable — using visual analysis (reduced precision)"
|
|
25
|
-
2. **Existing flat contract
|
|
26
|
-
- If `.gsd-t/contracts/design-contract.md` exists
|
|
27
|
-
|
|
25
|
+
2. **Existing flat contract? — MANDATORY INGESTION if present**
|
|
26
|
+
- If `.gsd-t/contracts/design-contract.md` exists:
|
|
27
|
+
- **READ IT COMPLETELY** — it is the authoritative ground truth for data labels, values, and verification assertions from prior runs
|
|
28
|
+
- Extract: exact category labels, exact data values, exact center values, exact percentages
|
|
29
|
+
- Use these as **Test Fixture** data in every element contract you write (not placeholder data)
|
|
30
|
+
- If the flat contract has a `## Verification Status` section with 30+ rows, that is the GROUND TRUTH for what each element must match — port every row into the relevant element contract's Verification Checklist
|
|
31
|
+
- If not → fresh decomposition from the design source directly
|
|
28
32
|
3. **Design source provided?**
|
|
29
33
|
- Required: Figma URL, image path, or prototype URL in `$ARGUMENTS`
|
|
30
34
|
- If missing → ask user: "Provide the design source (Figma URL, image path, or prototype URL)"
|
|
35
|
+
4. **Load the chart taxonomy (MANDATORY)**
|
|
36
|
+
- READ `templates/design-chart-taxonomy.md` from the GSD-T package (or `~/.claude/` if installed)
|
|
37
|
+
- This is the **CLOSED SET** of valid element names. You MUST pick from this list. Inventing new element names is FORBIDDEN without user approval to extend the taxonomy.
|
|
38
|
+
- Keep the taxonomy in working memory while classifying — every element you identify MUST be matched against it
|
|
31
39
|
|
|
32
40
|
## Step 1: Survey the Design
|
|
33
41
|
|
|
@@ -45,14 +53,25 @@ Produce an initial flat inventory table:
|
|
|
45
53
|
|
|
46
54
|
**Rule**: distinct visual variants = distinct rows. A horizontal stacked bar and a vertical stacked bar are TWO rows, not one.
|
|
47
55
|
|
|
48
|
-
## Step 2: Classify Each Element
|
|
56
|
+
## Step 2: Classify Each Element (taxonomy-enforced)
|
|
49
57
|
|
|
50
58
|
For each row in the inventory, assign:
|
|
51
59
|
|
|
52
|
-
- **Category** — chart / legend / axis / card / table / control /
|
|
60
|
+
- **Category** — chart / legend / axis / card / table / control / atom / typography / layout
|
|
61
|
+
- **Element name** — **MUST come from `templates/design-chart-taxonomy.md`** (closed set). If no match found, STOP and ask user to extend the taxonomy with rationale.
|
|
53
62
|
- **Reuse count** — how many times does it appear across the entire design?
|
|
54
63
|
- **Owner layer** — element / widget-internal / page-internal
|
|
55
64
|
|
|
65
|
+
### Visual distinguisher decision rules (consult taxonomy)
|
|
66
|
+
|
|
67
|
+
Before naming an element, apply the visual distinguisher rules from the taxonomy:
|
|
68
|
+
|
|
69
|
+
- **Bar chart?** → is it stacked/grouped, horizontal/vertical, percentage/absolute? These are ALL distinct element contracts.
|
|
70
|
+
- **Circular?** → pie vs donut (hole in center?) vs gauge (partial arc?)
|
|
71
|
+
- **Line?** → single vs multi, stepped vs smooth, with area or without
|
|
72
|
+
|
|
73
|
+
**Anti-pattern to avoid**: "it has bars so it's a bar chart" → WRONG. The failure mode is picking `chart-bar-grouped-vertical` when the design is `chart-bar-stacked-horizontal-percentage`. These render completely differently with completely different data bindings.
|
|
74
|
+
|
|
56
75
|
**Promotion rule**: an item becomes an **element contract** if:
|
|
57
76
|
- It appears ≥2 times across the design, OR
|
|
58
77
|
- It has non-trivial visual spec (≥5 distinct spec properties), OR
|
|
@@ -60,6 +79,10 @@ For each row in the inventory, assign:
|
|
|
60
79
|
|
|
61
80
|
Otherwise, it stays internal to its widget or page (no contract needed).
|
|
62
81
|
|
|
82
|
+
### Atoms are NOT optional
|
|
83
|
+
|
|
84
|
+
Icons, badges, chips, dividers, avatars, status dots, spinners — every small artifact that appears in the design gets an element contract if it meets the promotion rule. These are the #1 most-missed tier and produce the "feels off" verification result.
|
|
85
|
+
|
|
63
86
|
## Step 3: Identify Widgets
|
|
64
87
|
|
|
65
88
|
A **widget** is a reusable composition of elements + data binding that appears as a visual group in the design. Examples: "Revenue Breakdown" (donut + legend + title + filter), "Stat Strip" (4× stat-card-with-delta).
|
|
@@ -632,6 +632,33 @@ each one matches — not assume it does. 'Looks close' is not a verdict.
|
|
|
632
632
|
'Appears to match' is not a verdict. The only valid verdicts are MATCH
|
|
633
633
|
(with proof) or DEVIATION (with specifics).
|
|
634
634
|
|
|
635
|
+
## Step 0: Data-Labels Cross-Check (MANDATORY — run FIRST)
|
|
636
|
+
|
|
637
|
+
Before any visual comparison, verify the built UI is rendering the CORRECT
|
|
638
|
+
DATA from the design. This is the most common failure mode: agents use
|
|
639
|
+
placeholder data (Calculator/Planner/Tracker) while the design shows real
|
|
640
|
+
labels (Steps to Stay Covered/Broker Contact). The verifier then compares
|
|
641
|
+
bar-shapes only and declares MATCH — while the content is catastrophically
|
|
642
|
+
wrong.
|
|
643
|
+
|
|
644
|
+
1. For EACH element contract under .gsd-t/contracts/design/elements/
|
|
645
|
+
(or each section of flat .gsd-t/contracts/design-contract.md):
|
|
646
|
+
a. Read the 'Test Fixture' section — extract every label, value, percentage
|
|
647
|
+
b. Open the built UI in the browser
|
|
648
|
+
c. Inspect the rendered element (via DOM or screenshot OCR)
|
|
649
|
+
d. For EACH label/value/percentage in the Test Fixture:
|
|
650
|
+
- Does it appear verbatim in the rendered UI?
|
|
651
|
+
- If NO → immediate ❌ DEVIATION (severity CRITICAL)
|
|
652
|
+
Log: 'Test Fixture label {X} not found in rendered UI. Found instead: {Y}.'
|
|
653
|
+
- If YES → ✅ MATCH for that specific label/value
|
|
654
|
+
|
|
655
|
+
2. Count: '{N}/{total} labels+values from Test Fixture appear correctly in UI'
|
|
656
|
+
|
|
657
|
+
3. If ANY Test Fixture label or value is missing from the rendered UI:
|
|
658
|
+
The component is rendering WRONG DATA. This is a CRITICAL deviation.
|
|
659
|
+
No amount of visual polish can redeem wrong data. Mark the element
|
|
660
|
+
DEVIATION and continue (do not skip the rest — but flag the severity).
|
|
661
|
+
|
|
635
662
|
## Step 1: Get the Design Reference
|
|
636
663
|
|
|
637
664
|
Read .gsd-t/contracts/design-contract.md for the source reference.
|
package/commands/gsd-t-quick.md
CHANGED
|
@@ -259,7 +259,13 @@ comparison table. You write ZERO feature code.
|
|
|
259
259
|
|
|
260
260
|
FAIL-BY-DEFAULT: Every visual element starts as UNVERIFIED. Prove each matches.
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
STEP 0 (MANDATORY FIRST): Data-labels cross-check.
|
|
263
|
+
For each element contract (or design-contract.md section), read the Test Fixture.
|
|
264
|
+
Verify EVERY label, value, percentage from the fixture appears verbatim in the
|
|
265
|
+
rendered UI. If any is missing → CRITICAL DEVIATION (wrong data). Wrong data
|
|
266
|
+
cannot be redeemed by visual polish.
|
|
267
|
+
|
|
268
|
+
1. Read .gsd-t/contracts/design-contract.md (flat) OR .gsd-t/contracts/design/ (hierarchical) for design source reference + Test Fixtures
|
|
263
269
|
2. Get design reference (Figma MCP screenshot, or design images from contract)
|
|
264
270
|
3. Start dev server, open the built frontend in browser (Claude Preview/Chrome MCP/Playwright)
|
|
265
271
|
4. Open the original design reference in a second browser view
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.59.10",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 51 slash commands with headless CI/CD mode, graph-powered code analysis, real-time agent dashboard, execution intelligence, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
|
|
5
5
|
"author": "Tekyz, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# Design Chart & Atom Taxonomy (Closed Set)
|
|
2
|
+
|
|
3
|
+
When decomposing a design into element contracts, you MUST pick from this enumerated list. DO NOT invent element names. If a design element doesn't fit any of these, STOP and ask the user to extend the taxonomy before proceeding.
|
|
4
|
+
|
|
5
|
+
## Why this is a closed set
|
|
6
|
+
|
|
7
|
+
The catastrophic failure mode is: agent sees "bars" in Figma, picks `chart-bar-grouped-vertical`, but the design is actually `chart-bar-stacked-horizontal-percentage`. Different element, different contract, different data binding. Closed enumeration with visual distinguishers prevents this.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Charts
|
|
12
|
+
|
|
13
|
+
### Bar charts
|
|
14
|
+
|
|
15
|
+
| Element name | Visual distinguisher |
|
|
16
|
+
|------------------------------------------------|--------------------------------------------------------------------------------------|
|
|
17
|
+
| `chart-bar-horizontal-single` | One bar per category, horizontal orientation, single series |
|
|
18
|
+
| `chart-bar-vertical-single` | One bar per category, vertical orientation, single series |
|
|
19
|
+
| `chart-bar-grouped-horizontal` | Multiple bars per category SIDE-BY-SIDE, horizontal, ≥2 series (legend required) |
|
|
20
|
+
| `chart-bar-grouped-vertical` | Multiple bars per category SIDE-BY-SIDE, vertical, ≥2 series (legend required) |
|
|
21
|
+
| `chart-bar-stacked-horizontal` | Segments STACKED in one bar per category, horizontal, ≥2 series with absolute values |
|
|
22
|
+
| `chart-bar-stacked-vertical` | Segments STACKED in one bar per category, vertical, ≥2 series with absolute values |
|
|
23
|
+
| `chart-bar-stacked-horizontal-percentage` | SINGLE horizontal bar, 100% width, segments sum to 100% (distribution viz) |
|
|
24
|
+
| `chart-bar-stacked-vertical-percentage` | SINGLE vertical bar, 100% height, segments sum to 100% |
|
|
25
|
+
| `chart-bar-diverging-horizontal` | Bars extend left AND right from a center axis (sentiment, pos/neg) |
|
|
26
|
+
| `chart-bar-range-horizontal` | Floating bars showing min-max range (no origin axis) |
|
|
27
|
+
| `chart-bar-waterfall-vertical` | Sequential bars showing cumulative change, pos/neg |
|
|
28
|
+
|
|
29
|
+
**Decision rule for bar charts:**
|
|
30
|
+
1. Does the chart show ONE bar with segments that sum to 100%? → `*-stacked-*-percentage`
|
|
31
|
+
2. Does the chart show multiple bars stacked together? → `*-stacked-*` (non-percentage if absolute values shown)
|
|
32
|
+
3. Does the chart show multiple bars side-by-side per category? → `*-grouped-*`
|
|
33
|
+
4. Single-series, one bar per category? → `*-single`
|
|
34
|
+
|
|
35
|
+
### Line / area charts
|
|
36
|
+
|
|
37
|
+
| Element name | Visual distinguisher |
|
|
38
|
+
|----------------------------------|----------------------------------------------------------------------|
|
|
39
|
+
| `chart-line-single` | One line, continuous x-axis |
|
|
40
|
+
| `chart-line-multi` | ≥2 lines, shared x-axis, legend required |
|
|
41
|
+
| `chart-area-single` | Line with filled area below |
|
|
42
|
+
| `chart-area-stacked` | Multiple filled areas stacked (summed) |
|
|
43
|
+
| `chart-area-stacked-percentage` | Multiple filled areas stacked to 100% |
|
|
44
|
+
| `chart-line-step` | Stepped line (no diagonal connectors) |
|
|
45
|
+
| `chart-line-smooth` | Smoothed/curved line (bezier) |
|
|
46
|
+
|
|
47
|
+
### Circular charts
|
|
48
|
+
|
|
49
|
+
| Element name | Visual distinguisher |
|
|
50
|
+
|---------------------------|-----------------------------------------------------------|
|
|
51
|
+
| `chart-pie` | Full circle, no hole |
|
|
52
|
+
| `chart-donut` | Circle with center hole, may show center label/value |
|
|
53
|
+
| `chart-donut-gauge` | Partial donut (half or quarter circle) as gauge/progress |
|
|
54
|
+
| `chart-radial-bar` | Concentric arcs, one per category |
|
|
55
|
+
| `chart-polar` | Radial grid with data plotted by angle |
|
|
56
|
+
|
|
57
|
+
### Distribution / comparison
|
|
58
|
+
|
|
59
|
+
| Element name | Visual distinguisher |
|
|
60
|
+
|---------------------------|-----------------------------------------------------------|
|
|
61
|
+
| `chart-scatter` | Points on x/y plane, no connecting lines |
|
|
62
|
+
| `chart-bubble` | Scatter with variable point size (z-axis) |
|
|
63
|
+
| `chart-heatmap` | Grid of cells with color intensity |
|
|
64
|
+
| `chart-treemap` | Nested rectangles sized by value |
|
|
65
|
+
| `chart-histogram` | Bars showing distribution over continuous range |
|
|
66
|
+
| `chart-boxplot` | Box + whiskers showing quartiles |
|
|
67
|
+
|
|
68
|
+
### Inline / mini
|
|
69
|
+
|
|
70
|
+
| Element name | Visual distinguisher |
|
|
71
|
+
|---------------------------|-----------------------------------------------------------|
|
|
72
|
+
| `chart-sparkline-line` | Tiny inline line chart, no axes |
|
|
73
|
+
| `chart-sparkline-bar` | Tiny inline bar chart, no axes |
|
|
74
|
+
| `chart-sparkline-area` | Tiny inline filled area, no axes |
|
|
75
|
+
| `chart-progress-bar` | Horizontal bar showing % complete |
|
|
76
|
+
| `chart-progress-ring` | Circular ring showing % complete |
|
|
77
|
+
|
|
78
|
+
### Flow / hierarchy
|
|
79
|
+
|
|
80
|
+
| Element name | Visual distinguisher |
|
|
81
|
+
|---------------------------|-----------------------------------------------------------|
|
|
82
|
+
| `chart-sankey` | Flow diagram with weighted links |
|
|
83
|
+
| `chart-funnel` | Decreasing bars/trapezoids showing attrition |
|
|
84
|
+
| `chart-chord` | Circular chord diagram |
|
|
85
|
+
|
|
86
|
+
### Geo
|
|
87
|
+
|
|
88
|
+
| Element name | Visual distinguisher |
|
|
89
|
+
|---------------------------|-----------------------------------------------------------|
|
|
90
|
+
| `chart-choropleth` | Map with regions colored by value |
|
|
91
|
+
| `chart-symbol-map` | Map with points/symbols at locations |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Axes (referenced by charts via `extends`)
|
|
96
|
+
|
|
97
|
+
| Element name | Visual distinguisher |
|
|
98
|
+
|---------------------------|-----------------------------------------------------------|
|
|
99
|
+
| `axis-x-categorical` | Category labels on x-axis |
|
|
100
|
+
| `axis-x-time` | Time/date labels on x-axis |
|
|
101
|
+
| `axis-x-numeric` | Numeric scale on x-axis |
|
|
102
|
+
| `axis-y-categorical` | Category labels on y-axis |
|
|
103
|
+
| `axis-y-numeric` | Numeric scale on y-axis |
|
|
104
|
+
| `axis-y-log` | Logarithmic y-axis |
|
|
105
|
+
| `axis-y-dual` | Two y-axes (left + right) with different scales |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Legends
|
|
110
|
+
|
|
111
|
+
| Element name | Visual distinguisher |
|
|
112
|
+
|----------------------------|-----------------------------------------------------------|
|
|
113
|
+
| `legend-horizontal-top` | Horizontal row above chart |
|
|
114
|
+
| `legend-horizontal-bottom` | Horizontal row below chart |
|
|
115
|
+
| `legend-vertical-left` | Vertical column left of chart |
|
|
116
|
+
| `legend-vertical-right` | Vertical column right of chart |
|
|
117
|
+
| `legend-inline` | Labels placed directly on chart (no separate legend area) |
|
|
118
|
+
| `legend-interactive` | Legend items toggle series visibility on click |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Cards / Containers (widget chrome, but each is itself an element)
|
|
123
|
+
|
|
124
|
+
| Element name | Visual distinguisher |
|
|
125
|
+
|---------------------------------|-------------------------------------------------------------------------|
|
|
126
|
+
| `stat-card` | Label + large value |
|
|
127
|
+
| `stat-card-with-delta` | Label + value + delta indicator (↑↓ + % change) |
|
|
128
|
+
| `stat-card-with-sparkline` | Label + value + inline sparkline |
|
|
129
|
+
| `stat-card-with-icon` | Label + value + icon tile (colored square/circle with icon) |
|
|
130
|
+
| `stat-card-kpi-large` | Large value centered, small label below (used above charts) |
|
|
131
|
+
| `card-bordered` | Generic card with border + padding |
|
|
132
|
+
| `card-elevated` | Generic card with shadow |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Tables
|
|
137
|
+
|
|
138
|
+
| Element name | Visual distinguisher |
|
|
139
|
+
|---------------------------|-----------------------------------------------------------|
|
|
140
|
+
| `table-dense` | Tight row height, small padding |
|
|
141
|
+
| `table-comfortable` | Standard row height |
|
|
142
|
+
| `table-zebra` | Alternating row backgrounds |
|
|
143
|
+
| `table-striped-header` | Only header row has distinct background |
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Controls
|
|
148
|
+
|
|
149
|
+
| Element name | Visual distinguisher |
|
|
150
|
+
|---------------------------|-----------------------------------------------------------|
|
|
151
|
+
| `button-primary` | Filled, brand color |
|
|
152
|
+
| `button-secondary` | Outlined or muted fill |
|
|
153
|
+
| `button-ghost` | No border/fill, text + hover state only |
|
|
154
|
+
| `button-icon` | Icon-only button |
|
|
155
|
+
| `button-fab` | Floating action button (circular, elevated) |
|
|
156
|
+
| `input-text` | Single-line text input |
|
|
157
|
+
| `input-search` | Text input with leading search icon |
|
|
158
|
+
| `input-textarea` | Multi-line text input |
|
|
159
|
+
| `select-dropdown` | Native-or-custom select with chevron |
|
|
160
|
+
| `select-multi` | Multi-select (tags/chips) |
|
|
161
|
+
| `checkbox` | Square binary toggle |
|
|
162
|
+
| `radio` | Circular exclusive choice |
|
|
163
|
+
| `toggle` | Binary switch |
|
|
164
|
+
| `slider-range` | Continuous range input |
|
|
165
|
+
| `tabs-underline` | Tabs with underline indicator |
|
|
166
|
+
| `tabs-pill` | Tabs rendered as pills |
|
|
167
|
+
| `tabs-segmented` | Connected segmented-control style |
|
|
168
|
+
| `filter-pill` | Removable filter chip |
|
|
169
|
+
| `date-picker` | Date input with calendar popup |
|
|
170
|
+
| `date-range-picker` | Date range input |
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Atoms (small visual artifacts — the often-forgotten tier)
|
|
175
|
+
|
|
176
|
+
| Element name | Visual distinguisher |
|
|
177
|
+
|---------------------------|-----------------------------------------------------------|
|
|
178
|
+
| `icon` | SVG/icon-font glyph — one contract if all icons share spec, multiple variants if styles differ |
|
|
179
|
+
| `icon-outline` | Stroke-only icons (if coexisting with filled variants) |
|
|
180
|
+
| `icon-filled` | Filled icons (if coexisting with outline variants) |
|
|
181
|
+
| `logo` | Brand logo |
|
|
182
|
+
| `avatar` | User profile image/placeholder (circle or rounded-square) |
|
|
183
|
+
| `badge` | Small count indicator (typically on avatar or icon) |
|
|
184
|
+
| `chip` | Rounded container with text (filter, tag, status) |
|
|
185
|
+
| `status-dot` | Colored circle indicator |
|
|
186
|
+
| `divider-horizontal` | Horizontal line separator |
|
|
187
|
+
| `divider-vertical` | Vertical line separator |
|
|
188
|
+
| `spinner` | Loading indicator |
|
|
189
|
+
| `skeleton` | Loading placeholder |
|
|
190
|
+
| `tooltip` | Hover-triggered info bubble |
|
|
191
|
+
| `breadcrumb` | Hierarchical nav trail |
|
|
192
|
+
| `pagination` | Page number navigation |
|
|
193
|
+
| `tag` | Non-removable text label (unlike chip) |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Typography
|
|
198
|
+
|
|
199
|
+
| Element name | Visual distinguisher |
|
|
200
|
+
|---------------------------|-----------------------------------------------------------|
|
|
201
|
+
| `heading-h1` | Page title |
|
|
202
|
+
| `heading-h2` | Section title |
|
|
203
|
+
| `heading-h3` | Sub-section title / widget title |
|
|
204
|
+
| `heading-h4` | Small heading |
|
|
205
|
+
| `text-body` | Body text |
|
|
206
|
+
| `text-caption` | Small caption/metadata |
|
|
207
|
+
| `text-label` | Form/field label |
|
|
208
|
+
| `text-mono` | Monospaced (code, data) |
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Layout primitives
|
|
213
|
+
|
|
214
|
+
| Element name | Visual distinguisher |
|
|
215
|
+
|---------------------------|-----------------------------------------------------------|
|
|
216
|
+
| `container-page` | Top-level page container with max-width |
|
|
217
|
+
| `container-card` | Card with padding + radius + optional border/shadow |
|
|
218
|
+
| `stack-horizontal` | Flex row |
|
|
219
|
+
| `stack-vertical` | Flex column |
|
|
220
|
+
| `grid` | CSS grid layout primitive |
|
|
221
|
+
| `divider-section` | Horizontal divider between page sections |
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Using this taxonomy during decomposition
|
|
226
|
+
|
|
227
|
+
When `gsd-t-design-decompose` runs, for EACH visual element encountered in the design:
|
|
228
|
+
|
|
229
|
+
1. **Identify the category** (chart / legend / axis / card / table / control / atom / typography / layout)
|
|
230
|
+
2. **Pick the EXACT element name from this file** — do not rename, do not abbreviate
|
|
231
|
+
3. **If no match found** → STOP. Report to user: "Element at Figma node {nodeId} does not match any taxonomy entry. Proposed new variant: {name}, because: {rationale}. Should I extend the taxonomy?"
|
|
232
|
+
4. **Never pick a near-match** — "close enough" is exactly how horizontal stacked bar % became grouped vertical bars.
|
|
233
|
+
|
|
234
|
+
### Visual distinguishers for ambiguous cases
|
|
235
|
+
|
|
236
|
+
**"Is this a stacked bar or a grouped bar?"**
|
|
237
|
+
- Do the bars for a single category TOUCH/STACK or sit SIDE-BY-SIDE?
|
|
238
|
+
- Touch/stack → `chart-bar-stacked-*`
|
|
239
|
+
- Side-by-side → `chart-bar-grouped-*`
|
|
240
|
+
|
|
241
|
+
**"Is this stacked-absolute or stacked-percentage?"**
|
|
242
|
+
- Do segments fill a FIXED WIDTH/HEIGHT regardless of data?
|
|
243
|
+
- Yes (all bars are same length) → `*-stacked-*-percentage`
|
|
244
|
+
- No (bars vary in length by total value) → `*-stacked-*` (non-percentage)
|
|
245
|
+
|
|
246
|
+
**"Is this a pie or a donut?"**
|
|
247
|
+
- Is there a hole in the center?
|
|
248
|
+
- Yes → `chart-donut`
|
|
249
|
+
- No → `chart-pie`
|
|
250
|
+
|
|
251
|
+
**"Is this a bar chart or a histogram?"**
|
|
252
|
+
- Are x-axis values CATEGORIES (distinct labels) or BINS (numeric ranges)?
|
|
253
|
+
- Categories → `chart-bar-*`
|
|
254
|
+
- Numeric bins → `chart-histogram`
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Extending the taxonomy
|
|
259
|
+
|
|
260
|
+
If a new element variant is needed:
|
|
261
|
+
|
|
262
|
+
1. Add it to the relevant section above with a visual distinguisher
|
|
263
|
+
2. If it's a new chart variant, add a decision rule under the chart type
|
|
264
|
+
3. Bump GSD-T version (minor) and document the addition in CHANGELOG.md
|
|
265
|
+
4. Never delete entries — only add (breaking the closed set is destructive)
|
|
@@ -85,6 +85,32 @@ Atomic visual unit. One contract per visual variant (e.g., `chart-bar-stacked-ho
|
|
|
85
85
|
- {e.g., All series arrays MUST have length === categories.length}
|
|
86
86
|
- {e.g., Values MUST be non-negative for stacked variants}
|
|
87
87
|
|
|
88
|
+
## Test Fixture (MANDATORY — extracted from design, NOT placeholder)
|
|
89
|
+
|
|
90
|
+
This is the EXACT data from the design source. Verification compares the built component rendered with this fixture against the Figma design. Placeholder data (Lorem, foo/bar, Calculator/Planner) is FORBIDDEN here — the verifier must be able to compare actual labels and values side-by-side.
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"__source__": "{Figma node URL or image file + node id}",
|
|
95
|
+
"__extracted_via__": "{Figma MCP get_design_context | visual analysis}",
|
|
96
|
+
"__extracted_date__": "{YYYY-MM-DD}",
|
|
97
|
+
|
|
98
|
+
"categories": ["{exact label 1 from design}", "{exact label 2}", "..."],
|
|
99
|
+
"series": [
|
|
100
|
+
{
|
|
101
|
+
"name": "{exact series name from design}",
|
|
102
|
+
"values": [{exact value 1}, {exact value 2}, ...]
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
|
|
106
|
+
"center_value": "{exact value shown in donut center, if applicable}",
|
|
107
|
+
"center_sublabel": "{exact sublabel, if applicable}",
|
|
108
|
+
"percentages_shown": [{30}, {21}, {20}, {15}, {14}]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Verification rule**: when the component is rendered with THIS fixture, every label, every value, every percentage shown in the built UI MUST match the design. Any substitution is a DEVIATION.
|
|
113
|
+
|
|
88
114
|
## Responsive Behavior
|
|
89
115
|
|
|
90
116
|
| Breakpoint | Adaptation |
|
|
@@ -15,16 +15,31 @@ Composition of elements + data binding + layout. Widgets SELECT and POSITION ele
|
|
|
15
15
|
|
|
16
16
|
{One sentence — what this widget shows and why. E.g., "Displays revenue breakdown by product category with donut chart and accompanying legend-table, used on the dashboard Overview page and the Analytics detail page."}
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Card Chrome Slots (MANDATORY — fill every row or explicitly mark N/A)
|
|
19
|
+
|
|
20
|
+
Every widget is a card with consistent chrome. Missing chrome is the #1 cause of "looks off" verification results. Document EVERY slot, even if empty.
|
|
21
|
+
|
|
22
|
+
| Slot | Element Contract (or N/A) | Content / Behavior |
|
|
23
|
+
|-------------------------|------------------------------------------|--------------------------------------------------|
|
|
24
|
+
| `title` | heading-h3 | {exact title text from design} |
|
|
25
|
+
| `subtitle` | text-caption or N/A | {exact subtitle text — "Which tools members interact with most."} |
|
|
26
|
+
| `header_right_control` | select-dropdown, button-ghost, or N/A | {e.g., "Members ▼" filter dropdown in card header} |
|
|
27
|
+
| `kpi_header` | stat-card-kpi-large or N/A | {e.g., "2.4" + "Avg tools per member" shown above chart} |
|
|
28
|
+
| `body` | {primary element, e.g., chart-donut} | {main visual} |
|
|
29
|
+
| `body_sidebar` | {e.g., legend-vertical-right or N/A} | {element positioned alongside body} |
|
|
30
|
+
| `footer` | {e.g., text-caption or N/A} | {e.g., "Last updated: ..."} |
|
|
31
|
+
| `footer_legend` | {e.g., legend-horizontal-bottom or N/A} | {legend below body} |
|
|
32
|
+
|
|
33
|
+
**Rule**: If the design shows it, document it. If the design doesn't show it, write "N/A". Do NOT leave blank.
|
|
34
|
+
|
|
35
|
+
## Elements Used (body composition)
|
|
19
36
|
|
|
20
37
|
| Slot | Element Contract | Rationale |
|
|
21
38
|
|------------------|-----------------------------------------|------------------------------------|
|
|
22
|
-
| {
|
|
23
|
-
| {
|
|
24
|
-
| {title} | heading-h3 | {widget header} |
|
|
25
|
-
| {filter} | select-dropdown | {time-range selector} |
|
|
39
|
+
| {body element} | {e.g., chart-donut} | {why this element} |
|
|
40
|
+
| {sidebar} | {e.g., legend-vertical-right} | {why this variant} |
|
|
26
41
|
|
|
27
|
-
**Rule**: Each slot references an element contract by name. Widget CANNOT override element visual spec. To customize, create a new element variant.
|
|
42
|
+
**Rule**: Each slot references an element contract by name from `design-chart-taxonomy.md`. Widget CANNOT override element visual spec. To customize, create a new element variant.
|
|
28
43
|
|
|
29
44
|
## Layout
|
|
30
45
|
|