@hegemonart/get-design-done 1.39.2 → 1.39.5
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 +46 -0
- package/README.md +4 -0
- package/SKILL.md +1 -0
- package/package.json +2 -1
- package/reference/DEPRECATIONS.md +40 -0
- package/scripts/lib/deprecation-registry.cjs +99 -0
- package/skills/migrate/SKILL.md +70 -0
- package/skills/update/SKILL.md +18 -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.39.
|
|
8
|
+
"version": "1.39.5"
|
|
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.39.
|
|
15
|
+
"version": "1.39.5",
|
|
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.39.
|
|
4
|
+
"version": "1.39.5",
|
|
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,52 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.39.5] - 2026-06-01
|
|
8
|
+
|
|
9
|
+
### Phase 39.5 — GDD Self-Migration Tooling
|
|
10
|
+
|
|
11
|
+
GDD migrates *user* design systems (39.1) but had no systematic story for **its own** breaking
|
|
12
|
+
changes — Phase 31.5 moved `scripts/lib/**` → `sdk/**` with ad-hoc shims. 39.5 formalizes it: a
|
|
13
|
+
machine-readable deprecation registry, a version-aware reader, a `/gdd:migrate` skill, a post-update
|
|
14
|
+
advisory, and two CI gates (a completeness check + a CHANGELOG Breaking-changes linter). **No new
|
|
15
|
+
runtime dependency, no new egress** — two pure helpers + a docs/skill surface.
|
|
16
|
+
|
|
17
|
+
### Breaking changes
|
|
18
|
+
|
|
19
|
+
None. (This release *adds* the deprecation machinery; it removes nothing. The historical Phase 31.5 →
|
|
20
|
+
`sdk/` removals it documents already shipped in v1.33.0.)
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **`reference/DEPRECATIONS.md`** — a `## Path migrations (machine-readable)` table
|
|
25
|
+
(`Since · Removed in · Old · New · Migration hint`) + status semantics, backfilled with the 10
|
|
26
|
+
verified Phase 31.5 → `sdk/` removals (all confirmed gone from the tree).
|
|
27
|
+
- **`scripts/lib/deprecation-registry.cjs`** — pure, dep-free reader: `compareVersions`,
|
|
28
|
+
`parseDeprecations` (markdown-table parser), `classify` (pending/deprecated/removed by version),
|
|
29
|
+
`checkReference`.
|
|
30
|
+
- **`skills/migrate/SKILL.md`** (`/gdd:migrate [--yes] [--dry-run]`) — scans a project's references for
|
|
31
|
+
paths deprecated/removed at the installed version and **previews a diff** before rewriting. Preview-first.
|
|
32
|
+
- **`scripts/lint-changelog.cjs`** (`npm run lint:changelog`) — every `## [x.y.0]` minor at/after the
|
|
33
|
+
1.39.0 floor must declare a `### Breaking changes` section; historical minors are grandfathered.
|
|
34
|
+
- **`test/suite/deprecation-completeness.test.cjs`** — the SC#4 gate: every `removed` entry's old path
|
|
35
|
+
is gone + its replacement exists; every `deprecated` entry still has a shim. No orphan entries.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **`skills/update/SKILL.md`** — a post-update step that reports deprecations crossing into
|
|
40
|
+
`deprecated`/`removed` over the upgrade window and points the user at `/gdd:migrate`.
|
|
41
|
+
|
|
42
|
+
### Notes
|
|
43
|
+
|
|
44
|
+
- **No new runtime dependency, no new egress.** `lint-changelog.cjs` is a maintainer/CI tool (not shipped).
|
|
45
|
+
- 6-manifest lockstep at **v1.39.5** + `OFF_CADENCE_VERSIONS.add('1.39.5')` + the 32 live-pinned
|
|
46
|
+
`manifests-version.txt` baselines forward-propagated 1.39.2 → 1.39.5.
|
|
47
|
+
- Inventory relock: skill-list 79 → 80 (+`migrate`, phase-20 + current), tarball golden 707 → 709
|
|
48
|
+
(+`deprecation-registry.cjs` + `skills/migrate/SKILL.md`). No agent/event/connection deltas. Root
|
|
49
|
+
`SKILL.md` command table += `migrate`.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
7
53
|
## [1.39.2] - 2026-06-01
|
|
8
54
|
|
|
9
55
|
### Phase 39.2 — Long-Horizon Cost Governance
|
package/README.md
CHANGED
|
@@ -186,6 +186,10 @@ When a design system ships a breaking major — shadcn/ui v1→v2, Tailwind v3
|
|
|
186
186
|
|
|
187
187
|
GDD already tracks cost per task and per runtime — now it **forecasts** it, **caps** it at the project level, and shows whether the spend **shipped**. [`/gdd:budget`](skills/budget/SKILL.md) groups `costs.jsonl` by cycle and (via [`cost-forecaster`](agents/cost-forecaster.md) → the pure [`cost-forecast`](scripts/lib/budget/cost-forecast.cjs)) projects the next N cycles in **best / typical / worst** scenarios — "at the current rate you'll hit your $X project cap in Y cycles." A new `budget.json.project_cap_usd` adds a **project-level hard cap**: the [`budget-enforcer`](hooks/budget-enforcer.ts) hook warns at 50% + 80% and **gracefully halts** the next agent spawn at 100% (via the pure [`project-cap`](scripts/lib/budget/project-cap.cjs) classifier) — **disabled by default**, so existing users are unaffected. [`/gdd:roi`](skills/roi/SKILL.md) joins per-cycle cost with commits that shipped (survived ≥ 14 days) vs reverted into a cost-per-shipped-commit table ([`roi`](scripts/lib/budget/roi.cjs)). **No new runtime dependency, no new egress** — the hook only ever blocks, never spends.
|
|
188
188
|
|
|
189
|
+
### GDD self-migration (v1.39.5)
|
|
190
|
+
|
|
191
|
+
GDD migrates *your* design systems (above) — now it migrates **itself**. When GDD ships a breaking path change (like the Phase 31.5 `scripts/lib/**` → `sdk/**` reorg), a machine-readable registry in [`reference/DEPRECATIONS.md`](reference/DEPRECATIONS.md) records `Since · Removed in · Old · New · hint`. After an upgrade, [`/gdd:update`](skills/update/SKILL.md) flags anything that crossed into deprecated/removed, and [`/gdd:migrate`](skills/migrate/SKILL.md) rewrites your project's stale references — **previewing a diff first, never silent** — via the pure [`deprecation-registry`](scripts/lib/deprecation-registry.cjs). Two CI gates keep the system honest: a completeness check (every entry has a shim or a confirmed removal) and `lint-changelog` (every future minor must declare a `### Breaking changes` section). **No new runtime dependency, no new egress.**
|
|
192
|
+
|
|
189
193
|
### Previous releases
|
|
190
194
|
|
|
191
195
|
- **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
|
@@ -104,6 +104,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
104
104
|
| `rollout-status [<cycle>] [--all] [--stuck]` | `get-design-done:gdd-rollout-status` | Phase 38.5 — track a shipped cycle's production rollout (unrolled / staging-only / canary-N% / prod-100%) by reading the feature-flag service via `rollout-coordinator`; surfaces STUCK rollouts; feeds `design_arms` by deployed %. Read-only — never advances or rolls back |
|
|
105
105
|
| `budget [--cycles N] [--scenario best\|typical\|worst]` | `get-design-done:gdd-budget` | Phase 39.2 — forecast design-cycle spend (best/typical/worst from telemetry variance) via `cost-forecaster`; "at the current rate you'll hit your $X project cap in Y cycles." Read-only — never spends, edits `budget.json`, or halts (the budget-enforcer hook halts) |
|
|
106
106
|
| `roi [--since <date>] [--window-days 14]` | `get-design-done:gdd-roi` | Phase 39.2 — ROI table joining per-cycle cost with commits that shipped (survived ≥14d) vs reverted → cost-per-shipped-commit + stick rate. Read-only markdown report |
|
|
107
|
+
| `migrate [--yes] [--dry-run]` | `get-design-done:gdd-migrate` | Phase 39.5 — migrate a project off GDD's own deprecated paths after an upgrade; reads `reference/DEPRECATIONS.md` via `deprecation-registry.cjs`, previews a diff, applies on confirm. Preview-first; never edits silently |
|
|
107
108
|
|
|
108
109
|
## Handoff Routing
|
|
109
110
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.5",
|
|
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",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"lint:md": "npx --yes markdownlint-cli2 \"**/*.md\" \"#node_modules\" \"#.planning\" \"#.claude\" \"#test/fixtures/baselines\"",
|
|
57
57
|
"lint:links": "npx --yes lychee --no-progress --accept 200,206,403,429 \"**/*.md\" || true",
|
|
58
58
|
"lint:agentskills": "node scripts/lint-agentskills-spec.cjs",
|
|
59
|
+
"lint:changelog": "node scripts/lint-changelog.cjs",
|
|
59
60
|
"validate:schemas": "node --experimental-strip-types scripts/validate-schemas.ts",
|
|
60
61
|
"validate:frontmatter": "node --experimental-strip-types scripts/validate-frontmatter.ts agents/",
|
|
61
62
|
"detect:stale-refs": "node scripts/detect-stale-refs.cjs",
|
|
@@ -39,3 +39,43 @@ the scanner pattern list in lockstep.
|
|
|
39
39
|
|
|
40
40
|
The scanner excludes `.planning/`, `.claude/`, `.design/`, `node_modules/`,
|
|
41
41
|
`test-fixture/`, and this file itself.
|
|
42
|
+
|
|
43
|
+
## Path migrations (machine-readable)
|
|
44
|
+
|
|
45
|
+
Phase 39.5 adds a machine-readable registry of **path** migrations — modules/files GDD moved or
|
|
46
|
+
removed. `scripts/lib/deprecation-registry.cjs` parses the table below; `/gdd:migrate` consults it to
|
|
47
|
+
help users update local references; `test/suite/deprecation-completeness.test.cjs` asserts every row
|
|
48
|
+
is honest (a `removed` row's `Old` path must be gone from the tree; a `deprecated` row's `Old` path
|
|
49
|
+
must still carry a shim).
|
|
50
|
+
|
|
51
|
+
### Status semantics
|
|
52
|
+
|
|
53
|
+
A row's status is derived from the running plugin version `v`:
|
|
54
|
+
|
|
55
|
+
- **pending** — `v` < `Since` (deprecation announced for a future version; rare).
|
|
56
|
+
- **deprecated** — `Since` ≤ `v` < `Removed in` (the old path still works via a shim; update at leisure).
|
|
57
|
+
- **removed** — `v` ≥ `Removed in` (the old path is gone; you MUST use the new path).
|
|
58
|
+
|
|
59
|
+
**Default shim lifetime is one minor version** (the Phase 31.5 precedent): a path deprecated in `x.y.z`
|
|
60
|
+
is removed in the next minor `x.(y+1).0`. The `Removed in` column is authoritative per row.
|
|
61
|
+
|
|
62
|
+
### Table
|
|
63
|
+
|
|
64
|
+
Columns: `Since` (version the move shipped) · `Removed in` (version the old path stops working;
|
|
65
|
+
blank = still shimmed) · `Old` (pre-move path) · `New` (current path) · `Migration hint`.
|
|
66
|
+
|
|
67
|
+
| Since | Removed in | Old | New | Migration hint |
|
|
68
|
+
|---|---|---|---|---|
|
|
69
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/cli` | `sdk/cli` | Import the CLI barrel from `sdk/cli` instead of `scripts/lib/cli`. |
|
|
70
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/event-stream` | `sdk/event-stream` | Import the event-stream barrel from `sdk/event-stream`. |
|
|
71
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/gdd-state` | `sdk/state` | Import the STATE primitives from `sdk/state`. |
|
|
72
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/gdd-errors` | `sdk/errors` | Import the error types from `sdk/errors`. |
|
|
73
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/error-classifier.cjs` | `sdk/primitives/error-classifier.cjs` | Require `sdk/primitives/error-classifier.cjs`. |
|
|
74
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/iteration-budget.cjs` | `sdk/primitives/iteration-budget.cjs` | Require `sdk/primitives/iteration-budget.cjs`. |
|
|
75
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/jittered-backoff.cjs` | `sdk/primitives/jittered-backoff.cjs` | Require `sdk/primitives/jittered-backoff.cjs`. |
|
|
76
|
+
| 1.31.5 | 1.33.0 | `scripts/lib/lockfile.cjs` | `sdk/primitives/lockfile.cjs` | Require `sdk/primitives/lockfile.cjs`. |
|
|
77
|
+
| 1.31.5 | 1.33.0 | `scripts/mcp-servers/gdd-state/server.ts` | `sdk/mcp/gdd-state/server.ts` | Point the MCP server config at `sdk/mcp/gdd-state/server.ts`. |
|
|
78
|
+
| 1.31.5 | 1.33.0 | `scripts/mcp-servers/gdd-mcp/server.ts` | `sdk/mcp/gdd-mcp/server.ts` | Point the MCP server config at `sdk/mcp/gdd-mcp/server.ts`. |
|
|
79
|
+
|
|
80
|
+
All ten rows are **removed** as of the current release (the Phase 31.5 → `sdk/` reorg; shims removed
|
|
81
|
+
in v1.33.0). The completeness gate confirms none of the `Old` paths remain in the tree.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// Phase 39.5 — deprecation-registry.cjs — PURE, dep-free reader for GDD's own path-migration registry.
|
|
3
|
+
//
|
|
4
|
+
// The canonical registry is the `## Path migrations (machine-readable)` table in
|
|
5
|
+
// reference/DEPRECATIONS.md. This module parses that table and derives each entry's status against a
|
|
6
|
+
// running plugin version, so /gdd:migrate, the /gdd:update advisory, and the completeness gate all
|
|
7
|
+
// share one version-logic core. It reads NO files itself (callers pass the markdown text) — so it is
|
|
8
|
+
// trivially unit-testable.
|
|
9
|
+
//
|
|
10
|
+
// No `require` — pure. Deterministic.
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Compare two dotted-numeric versions. Tolerant of decimals/patch (1.39, 1.39.2, 1.39.5).
|
|
14
|
+
* Missing components are treated as 0. Non-numeric components compare as 0.
|
|
15
|
+
* @returns -1 if a<b, 0 if equal, 1 if a>b
|
|
16
|
+
*/
|
|
17
|
+
function compareVersions(a, b) {
|
|
18
|
+
const pa = String(a).split('.').map((x) => parseInt(x, 10) || 0);
|
|
19
|
+
const pb = String(b).split('.').map((x) => parseInt(x, 10) || 0);
|
|
20
|
+
const n = Math.max(pa.length, pb.length);
|
|
21
|
+
for (let i = 0; i < n; i++) {
|
|
22
|
+
const da = pa[i] || 0;
|
|
23
|
+
const db = pb[i] || 0;
|
|
24
|
+
if (da < db) return -1;
|
|
25
|
+
if (da > db) return 1;
|
|
26
|
+
}
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Strip surrounding whitespace + a single pair of backticks from a table cell. */
|
|
31
|
+
function cell(s) {
|
|
32
|
+
return String(s).trim().replace(/^`(.*)`$/, '$1').trim();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Parse the path-migrations table out of reference/DEPRECATIONS.md text.
|
|
37
|
+
* Finds the header row containing Since / Removed in / Old / New, skips the `|---|` separator, and
|
|
38
|
+
* reads pipe-delimited data rows until a non-table line. Returns [] when the table is absent.
|
|
39
|
+
* @returns {Array<{since, removedIn, old, new, hint}>}
|
|
40
|
+
*/
|
|
41
|
+
function parseDeprecations(mdText) {
|
|
42
|
+
const lines = String(mdText).replace(/\r\n/g, '\n').split('\n');
|
|
43
|
+
const entries = [];
|
|
44
|
+
let inTable = false;
|
|
45
|
+
for (const line of lines) {
|
|
46
|
+
const isRow = /^\s*\|.*\|\s*$/.test(line);
|
|
47
|
+
if (!inTable) {
|
|
48
|
+
if (isRow && /\bSince\b/i.test(line) && /Removed in/i.test(line) && /\bOld\b/i.test(line) && /\bNew\b/i.test(line)) {
|
|
49
|
+
inTable = true; // header found; the next line is the separator
|
|
50
|
+
}
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (!isRow) { inTable = false; continue; } // table ended
|
|
54
|
+
const cells = line.split('|').slice(1, -1).map(cell);
|
|
55
|
+
if (cells.length < 5) continue;
|
|
56
|
+
if (/^-+$/.test(cells[0].replace(/\s/g, ''))) continue; // separator row
|
|
57
|
+
if (/^since$/i.test(cells[0])) continue; // a repeated header, ignore
|
|
58
|
+
entries.push({ since: cells[0], removedIn: cells[1], old: cells[2], new: cells[3], hint: cells[4] });
|
|
59
|
+
}
|
|
60
|
+
return entries;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Status of an entry at `currentVersion`:
|
|
65
|
+
* pending — current < since
|
|
66
|
+
* deprecated — since <= current < removedIn (or removedIn blank ⇒ never 'removed')
|
|
67
|
+
* removed — current >= removedIn
|
|
68
|
+
*/
|
|
69
|
+
function classify(entry, currentVersion) {
|
|
70
|
+
if (!entry || !entry.since) throw new Error('deprecation-registry: entry needs a `since` version');
|
|
71
|
+
if (compareVersions(currentVersion, entry.since) < 0) return 'pending';
|
|
72
|
+
if (entry.removedIn && String(entry.removedIn).trim() && compareVersions(currentVersion, entry.removedIn) >= 0) {
|
|
73
|
+
return 'removed';
|
|
74
|
+
}
|
|
75
|
+
return 'deprecated';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Look up a reference (an old path/name) against the registry at currentVersion.
|
|
80
|
+
* @returns {{entry, status, message} | null} null when `ref` is not a known deprecated path.
|
|
81
|
+
*/
|
|
82
|
+
function checkReference(entries, ref, currentVersion) {
|
|
83
|
+
if (!Array.isArray(entries)) throw new Error('deprecation-registry: entries must be an array');
|
|
84
|
+
const r = cell(ref);
|
|
85
|
+
const entry = entries.find((e) => e.old === r);
|
|
86
|
+
if (!entry) return null;
|
|
87
|
+
const status = classify(entry, currentVersion);
|
|
88
|
+
let message;
|
|
89
|
+
if (status === 'removed') {
|
|
90
|
+
message = `${entry.old} was removed in v${entry.removedIn}; use ${entry.new}. ${entry.hint}`;
|
|
91
|
+
} else if (status === 'deprecated') {
|
|
92
|
+
message = `${entry.old} is deprecated since v${entry.since} (removed in v${entry.removedIn}); use ${entry.new}. ${entry.hint}`;
|
|
93
|
+
} else {
|
|
94
|
+
message = `${entry.old} will be deprecated in v${entry.since}; the replacement is ${entry.new}.`;
|
|
95
|
+
}
|
|
96
|
+
return { entry, status, message };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = { compareVersions, parseDeprecations, classify, checkReference };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-migrate
|
|
3
|
+
description: "Migrates a project off GDD's own deprecated paths after an upgrade. Reads the machine-readable registry in reference/DEPRECATIONS.md (via scripts/lib/deprecation-registry.cjs), scans the project's .design/config.json + any local skill/agent references for paths that are now deprecated or removed at the installed version, and PREVIEWS a diff before changing anything. Interactive by default (confirm per change); --yes auto-applies; --dry-run previews only. Read-first, never silent. Use after /gdd:update flags a breaking change."
|
|
4
|
+
argument-hint: "[--yes] [--dry-run]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /gdd:migrate
|
|
10
|
+
|
|
11
|
+
Closes the GDD-on-GDD gap: when GDD moves or removes its own paths (e.g. the Phase 31.5
|
|
12
|
+
`scripts/lib/**` → `sdk/**` reorg), a project that referenced the old paths needs updating. This skill
|
|
13
|
+
consults the deprecation registry, finds the stale references **in this project**, and rewrites them —
|
|
14
|
+
**after showing you the diff**. It never edits silently. Contract: `../../reference/DEPRECATIONS.md`.
|
|
15
|
+
|
|
16
|
+
## Invocation
|
|
17
|
+
|
|
18
|
+
| Command | Behavior |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `/gdd:migrate` | Scan + preview every applicable migration, then confirm each before applying. |
|
|
21
|
+
| `/gdd:migrate --dry-run` | Preview only — print the diff, change nothing. |
|
|
22
|
+
| `/gdd:migrate --yes` | Apply every applicable migration without the per-change prompt (still prints what changed). |
|
|
23
|
+
|
|
24
|
+
## Steps
|
|
25
|
+
|
|
26
|
+
1. **Resolve the installed version** from `.claude-plugin/plugin.json` (`version`).
|
|
27
|
+
2. **Load the registry.** Parse `reference/DEPRECATIONS.md` with the pure helper:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node -e '
|
|
31
|
+
const fs = require("fs");
|
|
32
|
+
const dr = require("./scripts/lib/deprecation-registry.cjs");
|
|
33
|
+
const entries = dr.parseDeprecations(fs.readFileSync("reference/DEPRECATIONS.md","utf8"));
|
|
34
|
+
const version = require("./.claude-plugin/plugin.json").version;
|
|
35
|
+
// Only entries that are deprecated/removed at the installed version are actionable.
|
|
36
|
+
const actionable = entries.filter(e => dr.classify(e, version) !== "pending");
|
|
37
|
+
console.log(JSON.stringify({ version, actionable }));
|
|
38
|
+
'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
3. **Scan the project** for each actionable entry's `Old` path:
|
|
42
|
+
- `.design/config.json` (string values referencing an old path),
|
|
43
|
+
- project-local skill/agent references (`grep` the repo, excluding `.git/`, `node_modules/`, and
|
|
44
|
+
GDD's own `reference/DEPRECATIONS.md`),
|
|
45
|
+
- any `require(...)`/import of a removed SDK path.
|
|
46
|
+
For a code rewrite, scaffold the edit with `scripts/lib/migration/codemod-gen.cjs` (Phase 39.1) —
|
|
47
|
+
you emit the change as a reviewable patch, you do not run a codemod engine.
|
|
48
|
+
4. **Preview.** Print a unified-diff-style preview per file: `Old → New`, the registry status
|
|
49
|
+
(`deprecated` vs `removed`), and the migration hint. If `--dry-run`, stop here.
|
|
50
|
+
5. **Confirm + apply.** Without `--yes`, ask per change. With `--yes`, apply all. Use `Write` to make
|
|
51
|
+
the edits; never touch a file the user didn't consent to.
|
|
52
|
+
6. **Report.** Summarize: files changed, references rewritten, and any `removed`-status reference that
|
|
53
|
+
still has no replacement wired (flag it loudly — that one breaks at the installed version).
|
|
54
|
+
|
|
55
|
+
## Boundaries
|
|
56
|
+
|
|
57
|
+
- **Preview-first.** Nothing changes before you've shown the diff (or `--yes` was passed).
|
|
58
|
+
- Migrates **this project's references** to GDD paths — it does not rewrite GDD's own source, and it
|
|
59
|
+
never performs a downgrade (reverse migrations are out of scope).
|
|
60
|
+
- Read the registry; never invent a migration that isn't in `reference/DEPRECATIONS.md`.
|
|
61
|
+
|
|
62
|
+
## Record
|
|
63
|
+
|
|
64
|
+
Print a `## Migration summary` (version, actionable entries, files changed, unresolved `removed`
|
|
65
|
+
references) and append one JSONL line to `.design/intel/insights.jsonl` recording the migration run.
|
|
66
|
+
Close with:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
## MIGRATE COMPLETE
|
|
70
|
+
```
|
package/skills/update/SKILL.md
CHANGED
|
@@ -23,6 +23,24 @@ Updates the `get-design-done` plugin to the latest release (or a specific tag),
|
|
|
23
23
|
|
|
24
24
|
> Run `/gdd:reapply-patches` if you have customized any `reference/` files to restore your modifications.
|
|
25
25
|
|
|
26
|
+
7.5. **Deprecation advisory** (Phase 39.5) — load the path-migration registry and report anything that
|
|
27
|
+
crossed into `deprecated` or `removed` over the `[prevVersion → currentVersion]` window:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node -e '
|
|
31
|
+
const fs = require("fs");
|
|
32
|
+
const dr = require("./scripts/lib/deprecation-registry.cjs");
|
|
33
|
+
const entries = dr.parseDeprecations(fs.readFileSync("reference/DEPRECATIONS.md","utf8"));
|
|
34
|
+
const crossed = entries.filter(e =>
|
|
35
|
+
dr.classify(e, currentVersion) !== "pending" &&
|
|
36
|
+
(prevVersion == null || dr.classify(e, prevVersion) !== dr.classify(e, currentVersion)));
|
|
37
|
+
console.log(JSON.stringify(crossed));
|
|
38
|
+
'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If any entry crossed, print a `## Deprecations in this update` list (old → new + status) and point
|
|
42
|
+
the user at **`/gdd:migrate`** to rewrite their local references. If none crossed, say nothing.
|
|
43
|
+
|
|
26
44
|
8. Print the new version and the changelog URL (`https://github.com/hegemonart/get-design-done/releases`).
|
|
27
45
|
|
|
28
46
|
## Output
|