@tekyzinc/gsd-t 2.70.13 → 2.70.14
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-audit.md +91 -0
- package/commands/gsd-t-execute.md +37 -10
- package/commands/gsd-t-plan.md +78 -0
- package/commands/gsd-t-quick.md +8 -3
- package/package.json +1 -1
- package/templates/stacks/design-to-code.md +24 -0
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.70.14] - 2026-04-06
|
|
6
|
+
|
|
7
|
+
### Changed (design pipeline — hierarchical execution)
|
|
8
|
+
- **Hierarchical Build Order** — `gsd-t-plan` now detects `.gsd-t/contracts/design/INDEX.md` and auto-generates tasks in strict element → widget → page order (Wave 1/2/3). Each element gets its own focused task with only its element contract. Each widget task imports already-built elements. Each page task imports already-built widgets. ONE CONTRACT = ONE TASK.
|
|
9
|
+
- **No Inline Rebuild Rule** — added to `gsd-t-execute`, `gsd-t-quick`, and `design-to-code.md` stack rules. Widget tasks that rebuild element functionality inline (instead of importing the built element component) are a TASK FAILURE. Same for page tasks rebuilding widgets. The hierarchy exists to prevent this.
|
|
10
|
+
- **Contract Is Authoritative** — when the element contract and Figma screenshot disagree, the contract wins. The contract was written from careful design analysis; screenshots are ambiguous at small sizes.
|
|
11
|
+
- **Per-Wave Design Verification Checkpoints** — `gsd-t-execute` now runs design-specific checks at each wave boundary: element contracts after Wave 1, widget assembly after Wave 2, full Figma comparison after Wave 3.
|
|
12
|
+
- **Design Hierarchy Build Rule in subagent prompt** — task subagents now receive explicit instructions for element/widget/page tasks: what to import, what NOT to rebuild, and that contracts are authoritative over screenshots.
|
|
13
|
+
- **Hierarchical Audit Mode** — `gsd-t-design-audit` now detects hierarchical design contracts and audits bottom-up: Level 1 (element chart types), Level 2 (widget assembly — imports vs inline rebuilds), Level 3 (page composition). Pinpoints exactly where a deviation originates instead of flat page-level comparison.
|
|
14
|
+
|
|
15
|
+
### Why
|
|
16
|
+
The decomposition (gsd-t-design-decompose) creates a perfect hierarchy — 27 elements → 10 widgets → 1 page. But the plan and execute phases didn't follow it. The planner created monolithic "build the page" tasks, and the builder wrote 700-line inline pages ignoring contracts and existing components. All recent enhancements (v2.70.10-12) targeted post-build verification — catching errors after they were made. This change moves enforcement to the build phase: build each element individually (the subagent can't confuse chart types when it only sees one element contract), verify it, then compose. Inside-out execution matches the decomposition structure.
|
|
17
|
+
|
|
5
18
|
## [2.70.13] - 2026-04-06
|
|
6
19
|
|
|
7
20
|
### Changed (gsd-t-init, gsd-t-init-scan-setup)
|
|
@@ -23,6 +23,97 @@ If built app target is missing → check if a dev server is running. If not →
|
|
|
23
23
|
- Factor into Step 3 comparisons: deviations that match library defaults (not Figma) may indicate "used library default instead of design value" — flag as a distinct deviation category
|
|
24
24
|
- If no → proceed as normal
|
|
25
25
|
|
|
26
|
+
## Step 0.5: Hierarchical Audit Mode (when design hierarchy exists)
|
|
27
|
+
|
|
28
|
+
Check if `.gsd-t/contracts/design/INDEX.md` exists. If it does NOT, skip to Step 1 (flat audit mode).
|
|
29
|
+
|
|
30
|
+
**If it EXISTS**: The design was decomposed hierarchically (elements → widgets → pages). Audit bottom-up — this pinpoints exactly WHERE a deviation originates.
|
|
31
|
+
|
|
32
|
+
### Level 1 — Element Audit
|
|
33
|
+
|
|
34
|
+
For each element contract in `.gsd-t/contracts/design/elements/`:
|
|
35
|
+
|
|
36
|
+
1. Read the element contract — extract visual spec (sizes, colors, spacing, chart type, props)
|
|
37
|
+
2. Find the corresponding built component in the project (`src/components/elements/` or equivalent)
|
|
38
|
+
3. If the component DOES NOT EXIST → ❌ CRITICAL: "Element `{name}` has no built component"
|
|
39
|
+
4. If it EXISTS:
|
|
40
|
+
a. Render the component in isolation (if a dev route or Storybook exists) or locate it within the full page
|
|
41
|
+
b. Compare chart type: does the contract say `bar-vertical-grouped`? Is the built component actually vertical bars?
|
|
42
|
+
c. Compare visual spec: dimensions, colors, spacing, typography per the element contract
|
|
43
|
+
d. Produce a comparison row: `| {element-name} | {contract chart type} | {built chart type} | {verdict} |`
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
### Element Audit
|
|
47
|
+
|
|
48
|
+
| # | Element | Contract Type | Built Type | Key Properties | Verdict |
|
|
49
|
+
|---|---------|--------------|------------|----------------|---------|
|
|
50
|
+
| 1 | chart-donut | donut 192px, 32px stroke | donut 192px, 32px stroke | ✅ | ✅ MATCH |
|
|
51
|
+
| 2 | bar-vertical-grouped | vertical bars, 4 groups | horizontal bars | ❌ wrong axis | ❌ CRITICAL |
|
|
52
|
+
| 3 | bar-vertical-single | vertical bars, single color | donut chart | ❌ wrong chart type | ❌ CRITICAL |
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**If ANY element has a chart type mismatch → flag CRITICAL immediately.** This is the exact failure mode that caused the BDS rebuild to fail: the element contract says vertical bars, but a donut was built. No amount of widget or page-level auditing can fix a wrong element.
|
|
56
|
+
|
|
57
|
+
### Level 2 — Widget Assembly Audit
|
|
58
|
+
|
|
59
|
+
For each widget contract in `.gsd-t/contracts/design/widgets/`:
|
|
60
|
+
|
|
61
|
+
1. Read the widget contract — extract "Elements Used" list and layout spec
|
|
62
|
+
2. Find the built widget component (`src/components/widgets/` or equivalent)
|
|
63
|
+
3. If the widget DOES NOT EXIST → ❌ CRITICAL: "Widget `{name}` has no built component"
|
|
64
|
+
4. If it EXISTS:
|
|
65
|
+
a. Check: does the widget IMPORT its element components, or does it rebuild element functionality inline?
|
|
66
|
+
- Grep the widget file for imports from `elements/` or `components/elements/`
|
|
67
|
+
- If the widget contains inline chart/card implementations that duplicate element components → ❌ HIGH: "Widget rebuilds `{element}` inline instead of importing"
|
|
68
|
+
b. Check: does the widget compose the CORRECT elements per the contract?
|
|
69
|
+
- Contract says "uses chart-donut, legend-vertical-right" — does the widget import both?
|
|
70
|
+
c. Check layout: spacing between elements, responsive behavior per widget contract
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
### Widget Assembly Audit
|
|
74
|
+
|
|
75
|
+
| # | Widget | Elements (contract) | Elements (built) | Imports elements? | Layout match? | Verdict |
|
|
76
|
+
|---|--------|--------------------|--------------------|-------------------|---------------|---------|
|
|
77
|
+
| 1 | donut-chart-card | chart-donut, legend-vertical-right, card-header | chart-donut, legend-vertical-right, card-header | ✅ imports | ✅ | ✅ MATCH |
|
|
78
|
+
| 2 | bar-chart-card | bar-vertical-grouped, card-header, legend-horizontal | HorizontalBarGroup (inline) | ❌ inline rebuild | ❌ | ❌ HIGH |
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Level 3 — Page Composition Audit
|
|
82
|
+
|
|
83
|
+
For each page contract in `.gsd-t/contracts/design/pages/`:
|
|
84
|
+
|
|
85
|
+
1. Read the page contract — extract widget list and grid positions
|
|
86
|
+
2. Find the built page component
|
|
87
|
+
3. Check: does the page IMPORT its widget components, or inline everything?
|
|
88
|
+
4. Check: section ordering, grid layout, responsive breakpoints
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
### Page Composition Audit
|
|
92
|
+
|
|
93
|
+
| # | Widget (contract) | Widget (built) | Imports widget? | Position match? | Verdict |
|
|
94
|
+
|---|-------------------|----------------|-----------------|-----------------|---------|
|
|
95
|
+
| 1 | filter-bar-widget | FilterBarWidget | ✅ | ✅ | ✅ MATCH |
|
|
96
|
+
| 2 | kpi-strip-widget | (inline stat cards) | ❌ inline rebuild | ✅ | ❌ HIGH |
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Hierarchy Summary
|
|
100
|
+
|
|
101
|
+
After all three levels:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
### Hierarchy Audit Summary
|
|
105
|
+
|
|
106
|
+
| Level | Total | Match | Deviations | Critical |
|
|
107
|
+
|-------|-------|-------|------------|----------|
|
|
108
|
+
| Elements | 27 | 24 | 3 | 2 (wrong chart type) |
|
|
109
|
+
| Widgets | 10 | 7 | 3 | 0 (3 inline rebuilds) |
|
|
110
|
+
| Pages | 1 | 0 | 1 | 0 (inline widgets) |
|
|
111
|
+
|
|
112
|
+
**Root cause**: 2 element-level chart type mismatches. Fix elements first — widget and page deviations may resolve automatically once correct elements are imported.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**After the hierarchy audit, continue to Step 1 for the full Figma comparison.** The hierarchy audit identifies structural issues (wrong types, inline rebuilds). The Figma comparison (Steps 1-4) catches visual property deviations (colors, spacing, sizes).
|
|
116
|
+
|
|
26
117
|
## Step 1: Map the Figma Design — Node-Level Decomposition
|
|
27
118
|
|
|
28
119
|
### 1a. Get the page tree
|
|
@@ -64,6 +64,18 @@ Before choosing solo or team mode, read the `## Wave Execution Groups` section i
|
|
|
64
64
|
- Execute wave-by-wave: complete all tasks in Wave 1 before starting Wave 2
|
|
65
65
|
- Within each wave, tasks marked as parallel-safe can run concurrently (team mode) or be interleaved (solo mode)
|
|
66
66
|
- At each wave boundary: run the CHECKPOINT — verify contract compliance — before proceeding
|
|
67
|
+
- **Design Hierarchy Checkpoint** (when `.gsd-t/contracts/design/INDEX.md` exists):
|
|
68
|
+
At each wave boundary for design hierarchy waves (elements → widgets → pages):
|
|
69
|
+
- **After element wave**: For each built element component, verify it renders and matches
|
|
70
|
+
its element contract (chart type, dimensions, colors, props). Spot-check in a browser
|
|
71
|
+
or headless render. Any element that doesn't match its contract → fix before widget wave.
|
|
72
|
+
- **After widget wave**: For each built widget, verify it imports (not rebuilds) its element
|
|
73
|
+
components and assembles them per the widget contract layout. Check: does the widget
|
|
74
|
+
import from src/components/elements/? If it contains inline chart/card implementations
|
|
75
|
+
that duplicate element components → FAIL the checkpoint, fix before page wave.
|
|
76
|
+
- **After page wave**: Proceed to full Design Verification Agent (Step 5.25) for Figma comparison.
|
|
77
|
+
These checkpoints are MANDATORY gates — not advisory. The entire point of hierarchical
|
|
78
|
+
execution is that each layer is correct before the next layer builds on it.
|
|
67
79
|
- File conflict detection: if two tasks in the same wave list the same file in their `scope.md` ownership, move one to the next wave
|
|
68
80
|
|
|
69
81
|
**If no wave groups are defined** (older plans): fall back to the `Execution Order` list.
|
|
@@ -252,9 +264,24 @@ Execute the task above:
|
|
|
252
264
|
3. Destructive Action Guard: if the task involves DROP TABLE, schema changes that lose
|
|
253
265
|
data, removing working modules, or replacing architecture patterns → write a
|
|
254
266
|
NEEDS-APPROVAL entry to .gsd-t/deferred-items.md, skip the task, stop here
|
|
255
|
-
4.
|
|
256
|
-
|
|
257
|
-
|
|
267
|
+
4. **Design Hierarchy Build Rule** (if this task references a design contract):
|
|
268
|
+
- If building an ELEMENT: implement ONLY this element's contract. Use exact values —
|
|
269
|
+
every dimension, color, font size, spacing must trace to the contract or design tokens.
|
|
270
|
+
No guessed values. Render in isolation to confirm before finishing.
|
|
271
|
+
- If building a WIDGET: check src/components/elements/ for already-built element
|
|
272
|
+
components. IMPORT them — do NOT rebuild element functionality inline. If the widget
|
|
273
|
+
contract says 'uses chart-donut', import the chart-donut element. Building a second
|
|
274
|
+
donut implementation inline is a TASK FAILURE.
|
|
275
|
+
- If building a PAGE: check src/components/widgets/ for already-built widget components.
|
|
276
|
+
IMPORT them — do NOT rebuild widget functionality inline. The page's job is composition
|
|
277
|
+
and data wiring, not reimplementing widgets.
|
|
278
|
+
- **Contract is authoritative**: If the element contract says 'bar-vertical-grouped'
|
|
279
|
+
(vertical bars), build vertical bars — even if the Figma screenshot looks like it
|
|
280
|
+
could be horizontal. The contract was written from careful design analysis; the
|
|
281
|
+
screenshot is ambiguous at small sizes. When in doubt, follow the contract.
|
|
282
|
+
5. Implement the task
|
|
283
|
+
6. Verify acceptance criteria are met
|
|
284
|
+
7. Write comprehensive tests (MANDATORY — no feature code without test code):
|
|
258
285
|
- Unit/integration: happy path + edge cases + error cases for every new/changed function
|
|
259
286
|
- Playwright E2E (if UI/routes/flows changed): new specs for new features, cover
|
|
260
287
|
all modes, form validation, empty/loading/error states, common edge cases
|
|
@@ -282,26 +309,26 @@ Execute the task above:
|
|
|
282
309
|
recovers (retry button works, form can be resubmitted, etc.).
|
|
283
310
|
A test that would pass on an empty HTML page with the right element IDs is useless.
|
|
284
311
|
Every assertion must prove the FEATURE WORKS, not that the ELEMENT EXISTS.
|
|
285
|
-
|
|
312
|
+
8. **Visual Design Note** (when design-to-code stack rule is active):
|
|
286
313
|
Do NOT perform visual verification yourself — a dedicated Design Verification Agent
|
|
287
314
|
(Step 5.25) runs after all domain tasks complete and handles the full visual comparison.
|
|
288
315
|
Your job: write precise code from the design contract tokens. Use exact hex colors,
|
|
289
316
|
exact spacing values, exact typography. Every CSS value must trace to the design contract.
|
|
290
317
|
The verification agent will open a browser and prove whether your code matches.
|
|
291
|
-
|
|
318
|
+
9. Run ALL test suites — this is NOT optional, not conditional, not "if applicable":
|
|
292
319
|
a. Detect configured test runners: check for vitest/jest config, playwright.config.*, cypress.config.*
|
|
293
320
|
b. Run EVERY detected suite. Unit tests alone are NEVER sufficient when E2E exists.
|
|
294
321
|
c. If `playwright.config.*` exists → run `npx playwright test` (full suite, not just affected specs)
|
|
295
322
|
d. If E2E tests fail → fix (up to 2 attempts) before proceeding
|
|
296
323
|
e. Report ALL suite results: "Unit: X/Y pass | E2E: X/Y pass" — never report just one
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
324
|
+
10. Run Pre-Commit Gate checklist from CLAUDE.md — update all affected docs BEFORE committing
|
|
325
|
+
11. Commit immediately: feat({domain-name}/task-{task-id}): {description}
|
|
326
|
+
12. Update .gsd-t/progress.md — mark this task complete; prefix the Decision Log entry:
|
|
300
327
|
- Completed successfully on first attempt → prefix `[success]`
|
|
301
328
|
- Completed after a fix → prefix `[learning]`
|
|
302
329
|
- Deferred to .gsd-t/deferred-items.md → prefix `[deferred]`
|
|
303
330
|
- Failed after 3 attempts → prefix `[failure]`
|
|
304
|
-
|
|
331
|
+
13. Spawn QA subagent (model: sonnet) after completing the task:
|
|
305
332
|
'Run ALL configured test suites — detect and run every one:
|
|
306
333
|
a. Unit tests (vitest/jest/mocha): run the full suite, report pass/fail counts
|
|
307
334
|
b. E2E tests: check for playwright.config.* or cypress.config.* — if found, run the FULL E2E suite
|
|
@@ -328,7 +355,7 @@ Execute the task above:
|
|
|
328
355
|
4. If Playwright MCP is not available: skip this section silently
|
|
329
356
|
Note: Exploratory findings do NOT count against the scripted test pass/fail ratio.'
|
|
330
357
|
If QA fails OR shallow tests are found, fix before proceeding. Append issues to .gsd-t/qa-issues.md.
|
|
331
|
-
|
|
358
|
+
14. Write task summary to .gsd-t/domains/{domain-name}/task-{task-id}-summary.md:
|
|
332
359
|
## Task {task-id} Summary — {domain-name}
|
|
333
360
|
- **Status**: PASS | FAIL
|
|
334
361
|
- **Files modified**: {list}
|
package/commands/gsd-t-plan.md
CHANGED
|
@@ -78,6 +78,84 @@ For each domain, write `.gsd-t/domains/{domain-name}/tasks.md`:
|
|
|
78
78
|
- {specific testable outcome}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
### Design Hierarchy Task Generation (when hierarchical design contracts exist)
|
|
82
|
+
|
|
83
|
+
If `.gsd-t/contracts/design/INDEX.md` exists, the design was decomposed into a hierarchy: **elements → widgets → pages**. This hierarchy IS the execution plan. Each level must be built and verified before the next level composes it.
|
|
84
|
+
|
|
85
|
+
**Detection**: Check for `.gsd-t/contracts/design/INDEX.md`. If it does NOT exist, skip this section entirely — use standard task generation above.
|
|
86
|
+
|
|
87
|
+
**If it EXISTS**: Read INDEX.md to extract the element, widget, and page contract lists. Then generate tasks in strict build order:
|
|
88
|
+
|
|
89
|
+
**Wave 1 — Elements (one task per element contract, all parallel-safe):**
|
|
90
|
+
|
|
91
|
+
Read each contract file in `.gsd-t/contracts/design/elements/`. For each element:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
### Task {N}: Build {element-name} element
|
|
95
|
+
- **Files**: src/components/elements/{element-name}.{ext}
|
|
96
|
+
- **Contract refs**: design/elements/{element-name}.contract.md
|
|
97
|
+
- **Dependencies**: NONE
|
|
98
|
+
- **Acceptance criteria**:
|
|
99
|
+
- Component renders matching ALL visual specs in the element contract (sizes, colors, spacing, typography)
|
|
100
|
+
- Props/API matches the contract's interface section exactly
|
|
101
|
+
- Every CSS value traces to a design token or explicit contract value — no guessed/approximated values
|
|
102
|
+
- Component is importable and reusable (no page-specific logic baked in)
|
|
103
|
+
- Render the component in isolation (Storybook, test page, or dev route) and visually confirm it matches the contract spec
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Elements have no inter-dependencies — all can run in parallel within Wave 1.
|
|
107
|
+
|
|
108
|
+
**CHECKPOINT after Wave 1**: Verify each built element renders correctly against its contract. Spot-check a sample (or all, if <15 elements) in a browser. Any element that doesn't match its contract gets fixed before Wave 2 starts.
|
|
109
|
+
|
|
110
|
+
**Wave 2 — Widgets (one task per widget contract):**
|
|
111
|
+
|
|
112
|
+
Read each contract file in `.gsd-t/contracts/design/widgets/`. For each widget:
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
### Task {N}: Assemble {widget-name} widget
|
|
116
|
+
- **Files**: src/components/widgets/{widget-name}.{ext}
|
|
117
|
+
- **Contract refs**: design/widgets/{widget-name}.contract.md
|
|
118
|
+
- **Dependencies**: BLOCKED by Wave 1 (all element tasks)
|
|
119
|
+
- **Acceptance criteria**:
|
|
120
|
+
- Widget IMPORTS already-built element components from Wave 1 — do NOT rebuild element functionality inline. If element X exists in src/components/elements/, you MUST import it.
|
|
121
|
+
- Layout, spacing, and responsive behavior match the widget contract exactly
|
|
122
|
+
- Internal element composition matches the contract's element list (correct elements, correct arrangement)
|
|
123
|
+
- All element props are wired correctly per the widget contract
|
|
124
|
+
- Render the widget in isolation and visually confirm the assembly matches the contract
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Widgets that share no elements can run in parallel. Widgets that compose the same elements should be sequenced to avoid merge conflicts.
|
|
128
|
+
|
|
129
|
+
**CHECKPOINT after Wave 2**: Verify each built widget assembles its elements correctly. Open each widget in a browser — the composition should match the widget contract's layout spec. Any widget that doesn't match gets fixed before Wave 3 starts.
|
|
130
|
+
|
|
131
|
+
**Wave 3 — Pages (one task per page contract):**
|
|
132
|
+
|
|
133
|
+
Read each contract file in `.gsd-t/contracts/design/pages/`. For each page:
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
### Task {N}: Compose {page-name} page
|
|
137
|
+
- **Files**: src/pages/{page-name}.{ext}
|
|
138
|
+
- **Contract refs**: design/pages/{page-name}.contract.md
|
|
139
|
+
- **Dependencies**: BLOCKED by Wave 2 (all widget tasks)
|
|
140
|
+
- **Acceptance criteria**:
|
|
141
|
+
- Page IMPORTS already-built widget components from Wave 2 — do NOT rebuild widget functionality inline
|
|
142
|
+
- Section ordering, page layout, and responsive breakpoints match the page contract exactly
|
|
143
|
+
- All widget instances are wired with correct data/props per the page contract
|
|
144
|
+
- Full page renders correctly at all breakpoints specified in the design contracts
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**CHECKPOINT after Wave 3**: Full Design Verification Agent comparison against Figma (Step 5.25 in execute). This is where the pixel-perfect validation happens — but by this point, each element and widget has already been verified individually, so page-level deviations should be limited to composition/layout issues.
|
|
148
|
+
|
|
149
|
+
**Critical rules for design hierarchy tasks:**
|
|
150
|
+
- **ONE CONTRACT = ONE TASK**: Never merge multiple element or widget contracts into one task. Each gets its own focused subagent with only its own contract in context.
|
|
151
|
+
- **NO INLINE REBUILDS**: This is the single most important rule. A widget task that rebuilds an element's functionality inline (instead of importing the element component) is a **TASK FAILURE** — not a style preference, a failure. Same for page tasks rebuilding widgets inline. The entire hierarchy exists to prevent this.
|
|
152
|
+
- **VERIFY BEFORE COMPOSING**: No Wave 2 task starts until Wave 1 is verified. No Wave 3 task starts until Wave 2 is verified. The checkpoint gates are mandatory, not advisory.
|
|
153
|
+
- **ELEMENT CONTRACT IS AUTHORITATIVE**: If the element contract says `bar-vertical-grouped` (vertical bars), the widget that composes it gets vertical bars — period. The Figma screenshot is reference material; the contract is the spec. When they disagree, the contract wins (and flag the discrepancy for review).
|
|
154
|
+
|
|
155
|
+
**Combining with non-design tasks**: If the milestone has both design tasks and non-design tasks (API, data layer, auth), the non-design tasks can run in parallel with Wave 1 elements. Map dependencies normally — a widget that needs API data is BLOCKED by both its elements AND the API task.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
81
159
|
### Task Design Rules:
|
|
82
160
|
0. **UI tasks — reference the design brief**: If `.gsd-t/contracts/design-brief.md` exists, UI task descriptions must reference it. Include a note like: "Follow the color palette, typography, spacing, and component patterns defined in `.gsd-t/contracts/design-brief.md`." This ensures visual consistency without repeating spec details in every task.
|
|
83
161
|
1. **Atomic**: Each task produces a working, testable increment
|
package/commands/gsd-t-quick.md
CHANGED
|
@@ -153,9 +153,14 @@ When you encounter unexpected situations:
|
|
|
153
153
|
1. Identify exactly which files need to change
|
|
154
154
|
2. **Destructive Action Guard**: Check if this task involves destructive or structural changes (DROP TABLE, removing columns, deleting data, replacing architecture patterns, removing working modules, changing schema in ways that conflict with existing data). If YES → STOP and present the change to the user with what exists today, what will change, what will break, and a safe migration path. Wait for explicit approval.
|
|
155
155
|
3. If a contract exists for the relevant interface, implement to match it
|
|
156
|
-
4.
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
4. **Design Hierarchy Build Rule** (if touching design components):
|
|
157
|
+
- If building/modifying an ELEMENT: implement ONLY from the element contract. Every value must trace to the contract or design tokens.
|
|
158
|
+
- If building/modifying a WIDGET: IMPORT existing element components — do NOT rebuild element functionality inline. If `chart-donut` exists in `src/components/elements/`, import it.
|
|
159
|
+
- If building/modifying a PAGE: IMPORT existing widget components — do NOT rebuild widget functionality inline.
|
|
160
|
+
- **Contract is authoritative**: Follow the contract spec, not the Figma screenshot, when they appear to disagree.
|
|
161
|
+
5. Make the change — **adapt new code to existing structures**, not the other way around
|
|
162
|
+
6. Verify it works
|
|
163
|
+
7. Commit: `[quick] {description}`
|
|
159
164
|
|
|
160
165
|
## Step 3.5: Emit Task Metrics
|
|
161
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "2.70.
|
|
3
|
+
"version": "2.70.14",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 54 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",
|
|
@@ -28,6 +28,30 @@ element contract > widget contract > page contract
|
|
|
28
28
|
```
|
|
29
29
|
A widget that uses `chart-donut` cannot change `chart-donut`'s bar-gap, colors, or label positioning. If customization is needed, create a new element variant (`chart-donut-compact.contract.md`) instead.
|
|
30
30
|
|
|
31
|
+
**Hierarchical Execution Order (MANDATORY when hierarchical contracts exist)**:
|
|
32
|
+
```
|
|
33
|
+
BUILD ORDER:
|
|
34
|
+
Wave 1: Elements — build each element in isolation from its element contract
|
|
35
|
+
ONE task per element. Verify each against its contract.
|
|
36
|
+
Wave 2: Widgets — IMPORT built elements, compose per widget contract
|
|
37
|
+
ONE task per widget. Verify assembly matches contract.
|
|
38
|
+
Wave 3: Pages — IMPORT built widgets, compose per page contract
|
|
39
|
+
ONE task per page. Full Design Verification Agent runs here.
|
|
40
|
+
|
|
41
|
+
NO INLINE REBUILDS:
|
|
42
|
+
Widget tasks MUST import element components. If chart-donut exists in
|
|
43
|
+
src/components/elements/, you MUST import it — not build a second donut.
|
|
44
|
+
Page tasks MUST import widget components. The page's job is composition
|
|
45
|
+
and data wiring, not reimplementing widgets.
|
|
46
|
+
Rebuilding a lower-level component inline is a TASK FAILURE.
|
|
47
|
+
|
|
48
|
+
CONTRACT IS AUTHORITATIVE:
|
|
49
|
+
If the element contract says 'bar-vertical-grouped' (vertical bars),
|
|
50
|
+
build vertical bars — even if the Figma screenshot looks ambiguous.
|
|
51
|
+
The contract was written from careful design analysis. When in doubt,
|
|
52
|
+
follow the contract, not the screenshot.
|
|
53
|
+
```
|
|
54
|
+
|
|
31
55
|
**Detection at execute-time**:
|
|
32
56
|
- If `.gsd-t/contracts/design/` exists → hierarchical mode, verify elements first, then widgets, then pages
|
|
33
57
|
- Else if `.gsd-t/contracts/design-contract.md` exists → flat mode
|