@tekyzinc/gsd-t 2.71.10 → 2.71.12
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 +22 -0
- package/commands/gsd-t-design-build.md +89 -16
- package/commands/gsd.md +44 -5
- package/package.json +1 -1
- package/scripts/gsd-t-design-review-server.js +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [2.71.12] - 2026-04-08
|
|
6
|
+
|
|
7
|
+
### Changed (smart router — design-to-code pipeline)
|
|
8
|
+
- **Pipeline Routing** — Smart router now treats design-to-code requests as a multi-step pipeline (clean → decompose → build) instead of picking a single command. When a user says "rebuild from this Figma" or "start from scratch with this design," the router evaluates pipeline entry point based on current state and auto-advances through subsequent steps.
|
|
9
|
+
- **Entry Point Detection** — "start over" / "from scratch" / "clean slate" enters at clean step (removes UI assets, then decompose, then build). Missing design contracts enters at decompose. Existing contracts enters at build.
|
|
10
|
+
- **Inline Cleanup** — Clean step removes UI component files while preserving non-UI files (API, stores, router config, project scaffold). No separate `quick` command needed.
|
|
11
|
+
- **Design Command Slugs** — Added `design-decompose`, `design-build`, `design-audit`, `design-review` to valid router command slugs.
|
|
12
|
+
|
|
13
|
+
### Why
|
|
14
|
+
User gave the router a single prompt asking to delete old assets and rebuild from a Figma design. The router could only pick one command, so it had to choose between `quick` (cleanup) and `design-decompose` (contracts). The natural workflow is a pipeline that the router should execute end-to-end.
|
|
15
|
+
|
|
16
|
+
## [2.71.11] - 2026-04-08
|
|
17
|
+
|
|
18
|
+
### Fixed (design-build — review gates and measurement)
|
|
19
|
+
- **Explicit Blocking Review Gates** — Steps 5 (widgets) and 6 (pages) now include their own inline bash polling loops instead of cross-referencing Step 3. The subagent was treating "Wait for human review (Step 3)" as an informational note and skipping the gate entirely, building all three tiers without ever showing the review UI.
|
|
20
|
+
- **Concrete Widget Measurement** — Step 5 now has full Playwright `page.evaluate()` code for measuring grid columns, gap, children-per-row, padding, and child positioning. Previously was a single vague line ("Playwright measure the assembled widget").
|
|
21
|
+
- **Concrete Page Measurement** — Step 6 now has explicit Playwright code for grid column count verification, section ordering, widget width ratios, spacing, and responsive breakpoints. Grid column mismatch (e.g., 4-across instead of 2-across) is flagged as `severity: "critical"`.
|
|
22
|
+
- **Auto-Rejection for Grid Failures** — Review server now auto-rejects items with `grid-template-columns`, `gridTemplateColumns`, `columns-per-row`, or `children-per-row` measurement failures as critical (same as chart type mismatches).
|
|
23
|
+
|
|
24
|
+
### Why
|
|
25
|
+
User ran `design-build` and the builder completed all three tiers (elements → widgets → pages) without ever displaying the review panel. The review gate in Steps 5/6 used parenthetical cross-references that the subagent ignored. Additionally, the page rendered 4-across when the contract specified 2-across — the measurement step had no concrete code to catch this.
|
|
26
|
+
|
|
5
27
|
## [2.70.15] - 2026-04-06
|
|
6
28
|
|
|
7
29
|
### Changed (design pipeline — decompose verification)
|
|
@@ -175,23 +175,27 @@ If rejected:
|
|
|
175
175
|
|
|
176
176
|
Continue building remaining elements. Don't wait for human review — queue them all.
|
|
177
177
|
|
|
178
|
-
## Step 3: Wait for Human Review
|
|
178
|
+
## Step 3: Wait for Human Review (BLOCKING)
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
**This is a BLOCKING step. Do NOT proceed to Step 4 until the human submits their review. Do NOT skip this step. Do NOT treat this as optional.**
|
|
181
|
+
|
|
182
|
+
After all elements are built and queued, **STOP** and enter the poll loop:
|
|
181
183
|
|
|
182
184
|
```
|
|
183
|
-
Waiting for human review...
|
|
185
|
+
Waiting for human review of elements...
|
|
184
186
|
Review UI: http://localhost:3456/review
|
|
185
187
|
{N} elements queued, awaiting submission
|
|
186
188
|
```
|
|
187
189
|
|
|
188
|
-
Poll for the review-complete signal
|
|
190
|
+
Poll for the review-complete signal — **actually run this bash loop**:
|
|
189
191
|
```bash
|
|
190
192
|
while [ ! -f .gsd-t/design-review/review-complete.json ]; do
|
|
191
193
|
sleep 5
|
|
192
194
|
done
|
|
193
195
|
```
|
|
194
196
|
|
|
197
|
+
**Only after `review-complete.json` appears**, proceed to Step 4.
|
|
198
|
+
|
|
195
199
|
## Step 4: Process Feedback
|
|
196
200
|
|
|
197
201
|
Read `.gsd-t/design-review/review-complete.json` and each feedback file in `.gsd-t/design-review/feedback/`.
|
|
@@ -233,29 +237,96 @@ If any elements were re-queued → return to Step 3 (max 3 review cycles total).
|
|
|
233
237
|
|
|
234
238
|
## Step 5: Widget Assembly Phase
|
|
235
239
|
|
|
236
|
-
|
|
240
|
+
**GATE: Do NOT start this step until ALL elements from Step 2 have been reviewed and approved by the human in the review UI.**
|
|
237
241
|
|
|
238
242
|
1. Read widget contracts from `.gsd-t/contracts/design/widgets/`
|
|
239
243
|
2. For each widget:
|
|
240
244
|
a. Build the widget — MUST import approved element components, not rebuild them inline
|
|
241
245
|
b. Verify imports: grep the widget file for element imports
|
|
242
|
-
c. Playwright measure the assembled widget
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
c. **Render-Measure-Compare** — use Playwright to measure the assembled widget against its contract specs:
|
|
247
|
+
```javascript
|
|
248
|
+
// In Playwright page.evaluate():
|
|
249
|
+
const widget = document.querySelector(widgetSelector);
|
|
250
|
+
const s = getComputedStyle(widget);
|
|
251
|
+
const rect = widget.getBoundingClientRect();
|
|
252
|
+
// Measure layout properties from widget contract:
|
|
253
|
+
// - grid-template-columns / grid-template-rows (column count, track sizes)
|
|
254
|
+
// - gap / row-gap / column-gap
|
|
255
|
+
// - padding, margin, border-radius
|
|
256
|
+
// - width, height, aspect-ratio
|
|
257
|
+
// Count direct children and verify against contract's expected child count
|
|
258
|
+
const children = widget.children;
|
|
259
|
+
const childRects = [...children].map(c => c.getBoundingClientRect());
|
|
260
|
+
// Verify children-per-row: count children whose top is within 2px of first child's top
|
|
261
|
+
const firstRowTop = childRects[0]?.top;
|
|
262
|
+
const childrenPerRow = childRects.filter(r => Math.abs(r.top - firstRowTop) < 2).length;
|
|
263
|
+
// Compare ALL measured values against contract specs
|
|
264
|
+
// Build measurements array: [{ property, expected, actual, pass }]
|
|
265
|
+
```
|
|
266
|
+
**Every measurement failure MUST appear in the queue JSON measurements array with `pass: false`.**
|
|
267
|
+
d. Write queue JSON to `.gsd-t/design-review/queue/{widget-id}.json` (same format as elements, with `"type": "widget"`)
|
|
268
|
+
e. Check for auto-rejections (sleep 3, check `rejected/` dir) — fix and re-queue if rejected (max 2 cycles)
|
|
269
|
+
3. After ALL widgets are built and queued, **STOP and poll for human review** — this is a BLOCKING wait, do NOT proceed until the human submits:
|
|
270
|
+
```
|
|
271
|
+
Waiting for human review of widgets...
|
|
272
|
+
Review UI: http://localhost:3456/review
|
|
273
|
+
{N} widgets queued, awaiting submission
|
|
274
|
+
```
|
|
275
|
+
```bash
|
|
276
|
+
while [ ! -f .gsd-t/design-review/review-complete.json ]; do
|
|
277
|
+
sleep 5
|
|
278
|
+
done
|
|
279
|
+
```
|
|
280
|
+
4. Process feedback — read `review-complete.json` and each feedback file, apply changes/fixes per the same rules as Step 4. Clear queue, delete signal, clear feedback after processing. If any widgets re-queued → return to sub-step 3 (max 3 review cycles).
|
|
246
281
|
|
|
247
282
|
## Step 6: Page Composition Phase
|
|
248
283
|
|
|
249
|
-
|
|
284
|
+
**GATE: Do NOT start this step until ALL widgets from Step 5 have been reviewed and approved by the human in the review UI.**
|
|
250
285
|
|
|
251
286
|
1. Read page contracts from `.gsd-t/contracts/design/pages/`
|
|
252
287
|
2. For each page:
|
|
253
288
|
a. Build the page — MUST import approved widget components
|
|
254
|
-
b.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
289
|
+
b. **Render-Measure-Compare** — use Playwright to verify the full page layout against its contract specs:
|
|
290
|
+
```javascript
|
|
291
|
+
// In Playwright page.evaluate():
|
|
292
|
+
// 1. GRID LAYOUT — verify column count matches contract
|
|
293
|
+
const grid = document.querySelector(pageGridSelector);
|
|
294
|
+
const gridStyle = getComputedStyle(grid);
|
|
295
|
+
const columns = gridStyle.gridTemplateColumns.split(' ').length;
|
|
296
|
+
// Compare against contract's expected column count (e.g., 2, not 4)
|
|
297
|
+
|
|
298
|
+
// 2. SECTION ORDERING — verify widgets appear in contract-specified order
|
|
299
|
+
const sections = [...grid.querySelectorAll('[data-section]')];
|
|
300
|
+
const sectionOrder = sections.map(s => s.dataset.section);
|
|
301
|
+
// Compare against contract's section order array
|
|
302
|
+
|
|
303
|
+
// 3. WIDGET DIMENSIONS — verify each widget's width relative to grid
|
|
304
|
+
const gridRect = grid.getBoundingClientRect();
|
|
305
|
+
const widgetRects = sections.map(s => s.getBoundingClientRect());
|
|
306
|
+
// For a 2-column grid: each widget should be ~50% of grid width (minus gap)
|
|
307
|
+
// For a 1-column widget spanning full width: should be ~100% of grid width
|
|
308
|
+
|
|
309
|
+
// 4. SPACING — verify gap, padding, margins match contract
|
|
310
|
+
// gap, rowGap, columnGap, padding
|
|
311
|
+
|
|
312
|
+
// 5. RESPONSIVE — if contract specifies breakpoints, measure at each viewport width
|
|
313
|
+
// Build measurements array: [{ property, expected, actual, pass }]
|
|
314
|
+
```
|
|
315
|
+
**Grid column count is a CRITICAL measurement. If the contract says 2 columns and the page renders 4, this is `severity: "critical"` and MUST be flagged.**
|
|
316
|
+
c. Write queue JSON to `.gsd-t/design-review/queue/{page-id}.json` (same format, with `"type": "page"`)
|
|
317
|
+
e. Check for auto-rejections (sleep 3, check `rejected/` dir) — fix and re-queue if rejected (max 2 cycles)
|
|
318
|
+
3. After ALL pages are built and queued, **STOP and poll for human review** — this is a BLOCKING wait, do NOT proceed until the human submits:
|
|
319
|
+
```
|
|
320
|
+
Waiting for human review of pages...
|
|
321
|
+
Review UI: http://localhost:3456/review
|
|
322
|
+
{N} pages queued, awaiting submission
|
|
323
|
+
```
|
|
324
|
+
```bash
|
|
325
|
+
while [ ! -f .gsd-t/design-review/review-complete.json ]; do
|
|
326
|
+
sleep 5
|
|
327
|
+
done
|
|
328
|
+
```
|
|
329
|
+
4. Process feedback — same rules as Step 4. Clear queue, delete signal, clear feedback. If any pages re-queued → return to sub-step 3 (max 3 review cycles).
|
|
259
330
|
|
|
260
331
|
## Step 7: Cleanup and Report
|
|
261
332
|
|
|
@@ -307,8 +378,10 @@ Update `.gsd-t/progress.md` with completion status.
|
|
|
307
378
|
|
|
308
379
|
- NEVER share builder context with Term 2 — coordination is files only
|
|
309
380
|
- NEVER skip the review cycle — every component goes through Term 2 + human
|
|
310
|
-
- NEVER proceed to widgets before all elements are approved
|
|
381
|
+
- NEVER proceed to widgets before all elements are reviewed and approved by the human — the bash polling loop MUST block until `review-complete.json` appears
|
|
382
|
+
- NEVER proceed to pages before all widgets are reviewed and approved by the human — same blocking poll
|
|
311
383
|
- NEVER rebuild element functionality inline in widgets — always import
|
|
384
|
+
- NEVER skip or shortcut the bash polling loop — it MUST actually execute and block
|
|
312
385
|
- Max 3 review cycles per phase — if still failing, stop and present to user
|
|
313
386
|
- Auto-open the browser review UI so the user doesn't have to find it
|
|
314
387
|
- Kill all background processes on completion or error
|
package/commands/gsd.md
CHANGED
|
@@ -59,14 +59,46 @@ When the same request could fit multiple commands at different scales:
|
|
|
59
59
|
|
|
60
60
|
### Design-to-code routing:
|
|
61
61
|
|
|
62
|
-
When the request involves UI implementation from a design (Figma, screenshots, mockups, "pixel-perfect", "match the design", "rebuild the frontend"):
|
|
63
|
-
|
|
62
|
+
When the request involves UI implementation from a design (Figma URL, screenshots, mockups, "pixel-perfect", "match the design", "rebuild the frontend", "build from this Figma"):
|
|
63
|
+
|
|
64
|
+
**This is a PIPELINE, not a single command.** The router must evaluate where the user is in the pipeline and execute from that point forward, auto-advancing through subsequent steps.
|
|
65
|
+
|
|
66
|
+
**Pipeline order:**
|
|
67
|
+
1. **Clean** (if requested) — remove existing UI assets via inline cleanup (not a separate `quick` command)
|
|
68
|
+
2. **Decompose** — `design-decompose` to extract element → widget → page contracts from the Figma design
|
|
69
|
+
3. **Build** — `design-build` to implement from contracts with review gates
|
|
70
|
+
|
|
71
|
+
**Pipeline entry logic — evaluate these in order, enter at the first that applies:**
|
|
72
|
+
|
|
73
|
+
| Condition | Entry point | Steps executed |
|
|
74
|
+
|-----------|-------------|----------------|
|
|
75
|
+
| User says "start over", "from scratch", "rebuild", "remove existing", "clean slate" | **Clean → Decompose → Build** | Remove existing UI assets in `src/components/`, `src/views/`, and related style files. Then run `design-decompose` with the Figma URL. Then run `design-build`. |
|
|
76
|
+
| No design contracts exist (`.gsd-t/contracts/design/` missing or empty) | **Decompose → Build** | Run `design-decompose` with the Figma URL. Then run `design-build`. |
|
|
77
|
+
| Design contracts exist but UI not yet built (contracts present, source files missing) | **Build** | Run `design-build` directly. |
|
|
78
|
+
| Design contracts AND source files exist | **Build** | Run `design-build` (will measure existing components against contracts). |
|
|
79
|
+
|
|
80
|
+
**How to execute the pipeline:**
|
|
81
|
+
|
|
82
|
+
Route to the entry point command. At the end of that command, **auto-advance to the next pipeline step** — do not stop and ask the user. Display:
|
|
83
|
+
```
|
|
84
|
+
→ Design pipeline: {step 1} ✓ → {step 2} (starting) → {step 3} (pending)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Clean step** (inline, not a separate command):
|
|
88
|
+
When cleanup is needed, do it at the start of `design-decompose` before reading the Figma:
|
|
89
|
+
- Remove UI component files (`src/components/`, `src/views/`, or equivalent)
|
|
90
|
+
- Remove associated style files and test files for those components
|
|
91
|
+
- Keep non-UI files (API services, stores, types, utilities, router config)
|
|
92
|
+
- Keep the project scaffold (App.vue/tsx, main.ts, index.html)
|
|
93
|
+
- `git add -A && git commit -m "chore: clean UI assets for design rebuild"`
|
|
94
|
+
|
|
95
|
+
**NEVER route design-to-code requests to `quick`** — design-to-code requires the full pipeline with contracts, measurement, and review gates.
|
|
96
|
+
|
|
97
|
+
**Fallback for non-pipeline design routing** (when the request is about an existing milestone/wave, not a fresh design build):
|
|
64
98
|
- **If no active milestone exists** → route to `wave` (creates milestone → partition with design contract → plan → execute with visual verification)
|
|
65
99
|
- **If a milestone exists but no domains** → route to `partition` (creates design contract in Step 3.6)
|
|
66
100
|
- **If domains exist but no tasks** → route to `plan`
|
|
67
101
|
- **If tasks exist** → route to `execute` (design-to-code stack rule will inject)
|
|
68
|
-
- The design-to-code stack rule activates automatically when `.gsd-t/contracts/design-contract.md` OR `.gsd-t/contracts/design/` exists, or Figma MCP is configured — but the **partition step must run first** to create the design contract
|
|
69
|
-
- **For projects with multiple pages or reusable components** (charts, widgets, design system): route to `design-decompose` BEFORE partition to create the hierarchical contract tree (elements → widgets → pages). Single-page/one-off designs can use flat `design-contract.md` created during partition instead.
|
|
70
102
|
|
|
71
103
|
## Step 3: Confirm and Execute
|
|
72
104
|
|
|
@@ -77,6 +109,13 @@ When the request involves UI implementation from a design (Figma, screenshots, m
|
|
|
77
109
|
→ Routing to /user:gsd-t-{command}: {brief reason}
|
|
78
110
|
```
|
|
79
111
|
|
|
112
|
+
### Design pipeline (from design-to-code routing):
|
|
113
|
+
```
|
|
114
|
+
→ Design pipeline: clean → decompose → build
|
|
115
|
+
Starting: /user:gsd-t-design-decompose
|
|
116
|
+
```
|
|
117
|
+
Use this format when the router detects a design-to-code pipeline. Show the full pipeline with the current step highlighted. Auto-advance between steps without returning to the router.
|
|
118
|
+
|
|
80
119
|
### Continuation (from Step 2a):
|
|
81
120
|
```
|
|
82
121
|
→ /gsd ──▶ continue /user:gsd-t-{last-command}
|
|
@@ -102,7 +141,7 @@ Where `{last-command}` is:
|
|
|
102
141
|
|
|
103
142
|
**CRITICAL: `{command}` and `{last-command}` MUST be a real GSD-T command slug — never a free-form description.**
|
|
104
143
|
|
|
105
|
-
Valid command slugs: `quick`, `debug`, `feature`, `execute`, `milestone`, `project`, `scan`, `gap-analysis`, `plan`, `partition`, `discuss`, `impact`, `integrate`, `verify`, `test-sync`, `complete-milestone`, `wave`, `status`, `populate`, `setup`, `init`, `health`, `log`, `pause`, `resume`, `prd`, `brainstorm`, `prompt`, `backlog-add`, `backlog-list`, `backlog-promote`, `promote-debt`, `triage-and-merge`, `version-update`, `version-update-all`
|
|
144
|
+
Valid command slugs: `quick`, `debug`, `feature`, `execute`, `milestone`, `project`, `scan`, `gap-analysis`, `plan`, `partition`, `discuss`, `impact`, `integrate`, `verify`, `test-sync`, `complete-milestone`, `wave`, `status`, `populate`, `setup`, `init`, `health`, `log`, `pause`, `resume`, `prd`, `brainstorm`, `prompt`, `backlog-add`, `backlog-list`, `backlog-promote`, `promote-debt`, `triage-and-merge`, `version-update`, `version-update-all`, `design-decompose`, `design-build`, `design-audit`, `design-review`
|
|
106
145
|
|
|
107
146
|
**WRONG ❌** — do not do this:
|
|
108
147
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "2.71.
|
|
3
|
+
"version": "2.71.12",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 56 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",
|
|
@@ -79,7 +79,11 @@ function autoRejectFailures() {
|
|
|
79
79
|
m.severity === "critical" ||
|
|
80
80
|
m.property === "chart type" ||
|
|
81
81
|
m.property === "display" ||
|
|
82
|
-
m.property === "flexDirection"
|
|
82
|
+
m.property === "flexDirection" ||
|
|
83
|
+
m.property === "grid-template-columns" ||
|
|
84
|
+
m.property === "gridTemplateColumns" ||
|
|
85
|
+
m.property === "columns-per-row" ||
|
|
86
|
+
m.property === "children-per-row"
|
|
83
87
|
);
|
|
84
88
|
if (criticalFailures.length > 0) {
|
|
85
89
|
// Auto-reject: write feedback and remove from queue
|