@tekyzinc/gsd-t 2.59.10 → 2.60.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 +9 -0
- package/bin/gsd-t.js +36 -0
- package/package.json +1 -1
- package/templates/element-contract.md +28 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [2.60.10] - 2026-04-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Shared Templates installer** — `installSharedTemplates()` in `bin/gsd-t.js` copies design-chart-taxonomy.md, element-contract.md, widget-contract.md, page-contract.md, design-contract.md, and shared-services-contract.md into `~/.claude/templates/` on install/update. Fresh-context workers (including Terminal 2 subprocesses) can now reference these at a predictable path instead of hunting through npx caches. Closes framework gap #1 surfaced by v2.59.10 convergence run 1.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Element template `Test Fixture`** now documents a **Fixture Resolution Order** for Figma designs that use template tokens like `{num}%`: (1) concrete Figma text, (2) existing flat contract, (3) requirements sample data, (4) engineered stub matching visible proportions. Adds mandatory `__fixture_source__` and `__figma_template__` fields so verifiers distinguish extracted-from-design vs engineered-to-match-visual. Closes gap #4.
|
|
12
|
+
- **Element template** adds a **Verification Harness** subsection clarifying what card chrome / controls to include vs strip when rendering the element on `/design-system/{name}`. Closes gap #5 ("element-only, no widget chrome" ambiguity).
|
|
13
|
+
|
|
5
14
|
## [2.59.10] - 2026-04-05
|
|
6
15
|
|
|
7
16
|
### Added
|
package/bin/gsd-t.js
CHANGED
|
@@ -26,6 +26,7 @@ const debugLedger = require(path.join(__dirname, "debug-ledger.js"));
|
|
|
26
26
|
const CLAUDE_DIR = path.join(os.homedir(), ".claude");
|
|
27
27
|
const COMMANDS_DIR = path.join(CLAUDE_DIR, "commands");
|
|
28
28
|
const SCRIPTS_DIR = path.join(CLAUDE_DIR, "scripts");
|
|
29
|
+
const CLAUDE_TEMPLATES_DIR = path.join(CLAUDE_DIR, "templates");
|
|
29
30
|
const GLOBAL_CLAUDE_MD = path.join(CLAUDE_DIR, "CLAUDE.md");
|
|
30
31
|
const SETTINGS_JSON = path.join(CLAUDE_DIR, "settings.json");
|
|
31
32
|
const VERSION_FILE = path.join(CLAUDE_DIR, ".gsd-t-version");
|
|
@@ -748,6 +749,38 @@ function installCgc() {
|
|
|
748
749
|
|
|
749
750
|
// ─── Commands ────────────────────────────────────────────────────────────────
|
|
750
751
|
|
|
752
|
+
// Shared templates that slash-command prompts reference by predictable path.
|
|
753
|
+
// Terminal-2 workers should find these at ~/.claude/templates/ without hunting
|
|
754
|
+
// through npx caches. Keep this list tight — only templates that commands cite
|
|
755
|
+
// via absolute path belong here.
|
|
756
|
+
const SHARED_TEMPLATES = [
|
|
757
|
+
"design-chart-taxonomy.md",
|
|
758
|
+
"element-contract.md",
|
|
759
|
+
"widget-contract.md",
|
|
760
|
+
"page-contract.md",
|
|
761
|
+
"design-contract.md",
|
|
762
|
+
"shared-services-contract.md",
|
|
763
|
+
];
|
|
764
|
+
|
|
765
|
+
function installSharedTemplates() {
|
|
766
|
+
ensureDir(CLAUDE_TEMPLATES_DIR);
|
|
767
|
+
let installed = 0, skipped = 0;
|
|
768
|
+
for (const file of SHARED_TEMPLATES) {
|
|
769
|
+
const src = path.join(PKG_TEMPLATES, file);
|
|
770
|
+
const dest = path.join(CLAUDE_TEMPLATES_DIR, file);
|
|
771
|
+
if (!fs.existsSync(src)) continue;
|
|
772
|
+
if (fs.existsSync(dest) &&
|
|
773
|
+
normalizeEol(fs.readFileSync(src, "utf8")) === normalizeEol(fs.readFileSync(dest, "utf8"))) {
|
|
774
|
+
skipped++;
|
|
775
|
+
continue;
|
|
776
|
+
}
|
|
777
|
+
fs.copyFileSync(src, dest);
|
|
778
|
+
installed++;
|
|
779
|
+
}
|
|
780
|
+
if (skipped > 0) info(`${skipped} templates unchanged`);
|
|
781
|
+
success(`${installed + skipped} shared templates → ~/.claude/templates/`);
|
|
782
|
+
}
|
|
783
|
+
|
|
751
784
|
function installCommands(isUpdate) {
|
|
752
785
|
heading("Slash Commands");
|
|
753
786
|
const commandFiles = getCommandFiles();
|
|
@@ -873,6 +906,9 @@ function doInstall(opts = {}) {
|
|
|
873
906
|
heading("Figma MCP (Design-to-Code)");
|
|
874
907
|
configureFigmaMcp();
|
|
875
908
|
|
|
909
|
+
heading("Shared Templates");
|
|
910
|
+
installSharedTemplates();
|
|
911
|
+
|
|
876
912
|
heading("Utility Scripts");
|
|
877
913
|
installUtilityScripts();
|
|
878
914
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.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",
|
|
@@ -89,6 +89,20 @@ Atomic visual unit. One contract per visual variant (e.g., `chart-bar-stacked-ho
|
|
|
89
89
|
|
|
90
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
91
|
|
|
92
|
+
### Fixture Resolution Order (when the design has no concrete data)
|
|
93
|
+
|
|
94
|
+
Figma designs frequently contain template tokens like `{num}%`, `{value}`, `$X,XXX` where concrete numbers are never encoded. When you hit this, follow this order — DO NOT invent unrelated placeholder labels:
|
|
95
|
+
|
|
96
|
+
1. **Concrete values in Figma text nodes** → use them verbatim (highest priority).
|
|
97
|
+
2. **Existing flat `design-contract.md` in the project** → if the card/chart was previously documented with numbers, inherit those numbers.
|
|
98
|
+
3. **`docs/requirements.md` sample data** → if requirements specify example values, use them.
|
|
99
|
+
4. **Engineered stub that visually matches the Figma render** → measure segment pixel widths (stacked) or relative heights (bar/column) and synthesise values summing to 100% (percentage variants) or matching the visible proportions (absolute variants).
|
|
100
|
+
5. Record the resolution choice in a `__fixture_source__` field so verifiers can distinguish "extracted from design" vs "engineered to match visual".
|
|
101
|
+
|
|
102
|
+
If the design uses template tokens, ALSO record them verbatim in a `__figma_template__` field. This lets the verifier compare both representations — e.g., "design shows `{num}%` placeholder, fixture supplies `27%`, built UI shows `27%`" is a MATCH, not a deviation.
|
|
103
|
+
|
|
104
|
+
**Labels (category names, series names, legend items) must ALWAYS be extracted verbatim from Figma** — never substituted. Only numeric values fall back through the resolution order above.
|
|
105
|
+
|
|
92
106
|
```json
|
|
93
107
|
{
|
|
94
108
|
"__source__": "{Figma node URL or image file + node id}",
|
|
@@ -105,12 +119,25 @@ This is the EXACT data from the design source. Verification compares the built c
|
|
|
105
119
|
|
|
106
120
|
"center_value": "{exact value shown in donut center, if applicable}",
|
|
107
121
|
"center_sublabel": "{exact sublabel, if applicable}",
|
|
108
|
-
"percentages_shown": [{30}, {21}, {20}, {15}, {14}]
|
|
122
|
+
"percentages_shown": [{30}, {21}, {20}, {15}, {14}],
|
|
123
|
+
|
|
124
|
+
"__fixture_source__": "{extracted-from-figma | inherited-from-flat-contract | requirements-sample | engineered-to-match-visual}",
|
|
125
|
+
"__figma_template__": "{if design uses tokens: record them verbatim, e.g. '{num}%'. Omit if design has concrete values.}"
|
|
109
126
|
}
|
|
110
127
|
```
|
|
111
128
|
|
|
112
129
|
**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
130
|
|
|
131
|
+
### Verification Harness (how to render the element in isolation)
|
|
132
|
+
|
|
133
|
+
When building an element for verification, render it on a dedicated `/design-system/{element-name}` route with **only** the visual context needed to compare it side-by-side against Figma:
|
|
134
|
+
|
|
135
|
+
- **Always include**: the element itself, its data labels, its legend (if owned by the element).
|
|
136
|
+
- **Include if the Figma reference shows them adjacent to the element**: card chrome (title, subtitle, KPI header) — but mark these in the page wrapper as `<!-- harness-only: belongs to widget contract -->` so future readers don't mistake them for part of this element contract.
|
|
137
|
+
- **Never include**: widget-level controls (dropdowns, date-pickers, header action buttons), surrounding page layout, navigation, filters.
|
|
138
|
+
|
|
139
|
+
Rule of thumb: if removing an element from the harness would make the Figma↔built comparison impossible (e.g., can't tell which chart the KPI "2.4" refers to), keep it. If it would just make the page look like the real app, strip it.
|
|
140
|
+
|
|
114
141
|
## Responsive Behavior
|
|
115
142
|
|
|
116
143
|
| Breakpoint | Adaptation |
|