@hegemonart/get-design-done 1.59.3 → 1.59.4
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 +31 -0
- package/SKILL.md +2 -0
- package/figma-plugin/README.md +61 -0
- package/figma-plugin/code.ts +36 -0
- package/figma-plugin/manifest.json +12 -0
- package/figma-plugin/package-lock.json +35 -0
- package/figma-plugin/package.json +12 -0
- package/figma-plugin/src/export-variables.ts +144 -0
- package/figma-plugin/src/payload-schema.ts +250 -0
- package/figma-plugin/tsconfig.json +16 -0
- package/figma-plugin/ui.html +44 -0
- package/hooks/gdd-intel-trigger.js +3 -3
- package/package.json +6 -1
- package/reference/DEPRECATIONS.md +3 -3
- package/reference/live-mode-integration.md +1 -1
- package/reference/registry.json +1 -1
- package/reference/skill-metadata.md +4 -4
- package/reference/skill-placeholders.md +2 -2
- package/scripts/build-skills.cjs +146 -0
- package/scripts/generate-skill-frontmatter.cjs +243 -0
- package/scripts/lib/manifest/scaffolder.cjs +1 -1
- package/scripts/lib/manifest/schemas/skills.schema.json +1 -1
- package/scripts/lib/manifest/skills.json +1 -1
- package/scripts/lib/new-addendum.cjs +1 -1
- package/scripts/skill-templates/README.md +90 -0
- package/scripts/skill-templates/add-backlog/SKILL.md +48 -0
- package/scripts/skill-templates/analyze-dependencies/SKILL.md +95 -0
- package/scripts/skill-templates/apply-reflections/SKILL.md +109 -0
- package/scripts/skill-templates/apply-reflections/apply-reflections-procedure.md +170 -0
- package/scripts/skill-templates/audit/SKILL.md +79 -0
- package/scripts/skill-templates/bandit-reset/SKILL.md +91 -0
- package/scripts/skill-templates/bandit-status/SKILL.md +94 -0
- package/scripts/skill-templates/benchmark/SKILL.md +65 -0
- package/scripts/skill-templates/bootstrap-ds/SKILL.md +43 -0
- package/scripts/skill-templates/brief/SKILL.md +145 -0
- package/scripts/skill-templates/budget/SKILL.md +45 -0
- package/scripts/skill-templates/cache-manager/SKILL.md +66 -0
- package/scripts/skill-templates/cache-manager/cache-policy.md +126 -0
- package/scripts/skill-templates/check-update/SKILL.md +98 -0
- package/scripts/skill-templates/compare/SKILL.md +82 -0
- package/scripts/skill-templates/compare/compare-rubric.md +171 -0
- package/scripts/skill-templates/complete-cycle/SKILL.md +81 -0
- package/scripts/skill-templates/connections/SKILL.md +71 -0
- package/scripts/skill-templates/connections/connections-onboarding.md +608 -0
- package/scripts/skill-templates/context/SKILL.md +137 -0
- package/scripts/skill-templates/continue/SKILL.md +24 -0
- package/scripts/skill-templates/darkmode/SKILL.md +76 -0
- package/scripts/skill-templates/darkmode/darkmode-audit-procedure.md +258 -0
- package/scripts/skill-templates/debug/SKILL.md +41 -0
- package/scripts/skill-templates/debug/debug-feedback-loops.md +119 -0
- package/scripts/skill-templates/design/SKILL.md +118 -0
- package/scripts/skill-templates/design/design-procedure.md +304 -0
- package/scripts/skill-templates/discuss/SKILL.md +96 -0
- package/scripts/skill-templates/do/SKILL.md +45 -0
- package/scripts/skill-templates/explore/SKILL.md +118 -0
- package/scripts/skill-templates/explore/explore-procedure.md +267 -0
- package/scripts/skill-templates/export/SKILL.md +30 -0
- package/scripts/skill-templates/extract-learnings/SKILL.md +114 -0
- package/scripts/skill-templates/fast/SKILL.md +91 -0
- package/scripts/skill-templates/figma-extract/SKILL.md +64 -0
- package/scripts/skill-templates/figma-write/SKILL.md +50 -0
- package/scripts/skill-templates/graphify/SKILL.md +49 -0
- package/scripts/skill-templates/health/SKILL.md +99 -0
- package/scripts/skill-templates/health/health-mcp-detection.md +44 -0
- package/scripts/skill-templates/health/health-skill-length-report.md +69 -0
- package/scripts/skill-templates/help/SKILL.md +60 -0
- package/scripts/skill-templates/instinct/SKILL.md +111 -0
- package/scripts/skill-templates/list-assumptions/SKILL.md +61 -0
- package/scripts/skill-templates/list-pins/SKILL.md +27 -0
- package/scripts/skill-templates/live/SKILL.md +98 -0
- package/scripts/skill-templates/locale/SKILL.md +51 -0
- package/scripts/skill-templates/map/SKILL.md +89 -0
- package/scripts/skill-templates/migrate/SKILL.md +70 -0
- package/scripts/skill-templates/migrate-context/SKILL.md +123 -0
- package/scripts/skill-templates/new-addendum/SKILL.md +81 -0
- package/scripts/skill-templates/new-cycle/SKILL.md +37 -0
- package/scripts/skill-templates/new-project/SKILL.md +53 -0
- package/scripts/skill-templates/new-skill/SKILL.md +90 -0
- package/scripts/skill-templates/next/SKILL.md +68 -0
- package/scripts/skill-templates/note/SKILL.md +48 -0
- package/scripts/skill-templates/openrouter-status/SKILL.md +86 -0
- package/scripts/skill-templates/optimize/SKILL.md +97 -0
- package/scripts/skill-templates/override/SKILL.md +86 -0
- package/scripts/skill-templates/paper-write/SKILL.md +54 -0
- package/scripts/skill-templates/pause/SKILL.md +77 -0
- package/scripts/skill-templates/peer-cli-add/SKILL.md +88 -0
- package/scripts/skill-templates/peer-cli-add/peer-cli-protocol.md +161 -0
- package/scripts/skill-templates/peer-cli-customize/SKILL.md +89 -0
- package/scripts/skill-templates/peers/SKILL.md +96 -0
- package/scripts/skill-templates/pencil-write/SKILL.md +54 -0
- package/scripts/skill-templates/pin/SKILL.md +37 -0
- package/scripts/skill-templates/plan/SKILL.md +105 -0
- package/scripts/skill-templates/plan/plan-procedure.md +278 -0
- package/scripts/skill-templates/plant-seed/SKILL.md +48 -0
- package/scripts/skill-templates/pr-branch/SKILL.md +32 -0
- package/scripts/skill-templates/progress/SKILL.md +107 -0
- package/scripts/skill-templates/quality-gate/SKILL.md +90 -0
- package/scripts/skill-templates/quality-gate/threat-modeling.md +101 -0
- package/scripts/skill-templates/quick/SKILL.md +44 -0
- package/scripts/skill-templates/reapply-patches/SKILL.md +32 -0
- package/scripts/skill-templates/recall/SKILL.md +75 -0
- package/scripts/skill-templates/reflect/SKILL.md +85 -0
- package/scripts/skill-templates/reflect/procedures/capability-gap-scan.md +119 -0
- package/scripts/skill-templates/report-issue/SKILL.md +53 -0
- package/scripts/skill-templates/report-issue/report-issue-procedure.md +119 -0
- package/scripts/skill-templates/resume/SKILL.md +93 -0
- package/scripts/skill-templates/review-backlog/SKILL.md +46 -0
- package/scripts/skill-templates/review-decisions/SKILL.md +42 -0
- package/scripts/skill-templates/roi/SKILL.md +54 -0
- package/scripts/skill-templates/rollout-status/SKILL.md +35 -0
- package/scripts/skill-templates/router/SKILL.md +89 -0
- package/scripts/skill-templates/router/capability-gap-emitter.md +65 -0
- package/scripts/skill-templates/router/router-pick-emitter.md +78 -0
- package/scripts/skill-templates/router/router-rules.md +84 -0
- package/scripts/skill-templates/settings/SKILL.md +87 -0
- package/scripts/skill-templates/ship/SKILL.md +48 -0
- package/scripts/skill-templates/sketch/SKILL.md +78 -0
- package/scripts/skill-templates/sketch-wrap-up/SKILL.md +92 -0
- package/scripts/skill-templates/skill-manifest/SKILL.md +79 -0
- package/scripts/skill-templates/spike/SKILL.md +67 -0
- package/scripts/skill-templates/spike-wrap-up/SKILL.md +86 -0
- package/scripts/skill-templates/start/SKILL.md +67 -0
- package/scripts/skill-templates/start/start-procedure.md +115 -0
- package/scripts/skill-templates/state/SKILL.md +106 -0
- package/scripts/skill-templates/stats/SKILL.md +51 -0
- package/scripts/skill-templates/style/SKILL.md +71 -0
- package/scripts/skill-templates/style/style-doc-procedure.md +150 -0
- package/scripts/skill-templates/synthesize/SKILL.md +94 -0
- package/scripts/skill-templates/timeline/SKILL.md +66 -0
- package/scripts/skill-templates/todo/SKILL.md +64 -0
- package/scripts/skill-templates/turn-closeout/SKILL.md +95 -0
- package/scripts/skill-templates/undo/SKILL.md +31 -0
- package/scripts/skill-templates/unlock-decision/SKILL.md +54 -0
- package/scripts/skill-templates/unpin/SKILL.md +31 -0
- package/scripts/skill-templates/update/SKILL.md +56 -0
- package/scripts/skill-templates/using-gdd/SKILL.md +78 -0
- package/scripts/skill-templates/verify/SKILL.md +113 -0
- package/scripts/skill-templates/verify/verify-procedure.md +511 -0
- package/scripts/skill-templates/warm-cache/SKILL.md +81 -0
- package/scripts/skill-templates/watch-authorities/SKILL.md +82 -0
- package/scripts/skill-templates/zoom-out/SKILL.md +26 -0
- package/sdk/cli/commands/build.ts +2 -2
- package/sdk/cli/index.js +2 -2
- package/sdk/cli/index.ts +1 -1
- package/skills/README.md +22 -14
- package/skills/help/SKILL.md +28 -55
- package/skills/new-skill/SKILL.md +5 -5
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-live
|
|
3
|
+
description: "Live in-browser design mode. The user picks a DOM element on a running dev server (via the Claude Preview MCP), the agent generates N design variants in one batch, they hot-swap in place through HMR or preview_eval using a data-gdd-variant marker, the user accepts or discards, and the whole pick-generate-accept loop persists to .design/live-sessions so it survives a crash or resume. Use when the user wants to iterate on the look of a live component against a real running server, asks to try variants on a page, or runs the live command with a url; falls back to a screenshot-only degraded mode on harnesses without MCP support. Activates for requests involving in-browser design iteration, picking an element on a dev server, or generating variants with hot-swap."
|
|
4
|
+
argument-hint: "[--variants N] [--resume <session-id>] [url]"
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep, Task
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# gdd-live - Live In-Browser Design Mode
|
|
10
|
+
|
|
11
|
+
Pick a DOM element on a running dev server, generate competing design variants, hot-swap them in place, and accept the winner as a real source edit. Every step persists to `.design/live-sessions/<id>.json` so the session survives a crash or a later resume.
|
|
12
|
+
|
|
13
|
+
The browser-side runtime, the harness-mode gate, the session store, the events feed, the post-check, the scope guard, and the bandit feed are all separate modules under `scripts/lib/live/`. This skill describes the loop and names the module that owns each step; it does not import them.
|
|
14
|
+
|
|
15
|
+
For the full surface (the Preview MCP tools, the six `live_*` events, the session file, the bandit feed, degraded mode, the scope guard), see `../../reference/live-mode-integration.md`. For the SKILL.md structural contract, see `../../reference/skill-authoring-contract.md`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Arguments
|
|
20
|
+
|
|
21
|
+
- `[url]` - the page to drive. Optional. When omitted, detect the dev server and use its root.
|
|
22
|
+
- `--variants N` - how many variants to generate per pick. Default 3.
|
|
23
|
+
- `--resume <session-id>` - reattach to an in-progress session in `.design/live-sessions/`.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## BOOT
|
|
28
|
+
|
|
29
|
+
1. Probe the Preview MCP per `../../connections/preview.md`: `ToolSearch({ query: "Claude_Preview" })`, then `mcp__Claude_Preview__preview_list`. Empty ToolSearch means the MCP is not loaded.
|
|
30
|
+
2. Resolve the harness live mode. The capability signal is `capability_matrix.mcp_support` in `scripts/lib/manifest/harnesses.json`, projected by `scripts/lib/live/harness-mode.cjs` (`liveModeFor(harnessId)`). A `puppeteer` result means full live mode; a `degraded` result means screenshot-only.
|
|
31
|
+
3. If `mcp_support` is false for this harness, or Preview is unavailable, enter DEGRADED mode and say so plainly: variants are generated and captured as static screenshots, with no in-page hot-swap. Skip the INJECT and PICK steps; generate against the file the user names instead.
|
|
32
|
+
4. Detect the dev server. Look for Vite, Next, Bun, or a static server (check `package.json` scripts plus a `preview_list` entry). Record the server descriptor on the session.
|
|
33
|
+
5. Open or create the session via `scripts/lib/live/session-store.cjs` (`.design/live-sessions/<id>.json`). On `--resume`, load the named session (see RESUME).
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## INJECT
|
|
38
|
+
|
|
39
|
+
Inject the browser runtime once. Read `RUNTIME_JS` from `scripts/lib/live/runtime.cjs` and evaluate it in the page with `mcp__Claude_Preview__preview_eval`. The runtime is an idempotent IIFE bound to `window.__gddLive`, so a re-inject after navigation rebinds the same singleton rather than stacking listeners. It installs the pick handler and the variant-swap helpers, and stamps the live variant on the element via the `data-gdd-variant` attribute.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## PICK
|
|
44
|
+
|
|
45
|
+
1. Arm the picker (`window.__gddLive.pick()`), then guide the user to click the target element. Use `preview_click` and `preview_inspect` to confirm the element and read its computed styles and bounding box.
|
|
46
|
+
2. Read the pick report back. Its fields are documented in `pickReportShape` (selector, tagName, classList, boundingRect, computedStyle subset, current variant). The selector strategy prefers id, then a data-testid, then a tag plus class plus nth-of-type path.
|
|
47
|
+
3. Emit a `live_pick` event through `scripts/lib/live/events.cjs` and append a `pick` entry to the session.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## GENERATE (one batch)
|
|
52
|
+
|
|
53
|
+
1. Load the relevant Phase 45 canonical reference index FIRST, so variants are grounded in real guidance: the domain index that matches the picked element (for example `../../reference/spatial.md` for layout, `../../reference/interaction.md` for components and a11y, `../../reference/color.md` for color, `../../reference/typography.md` for type, `../../reference/motion.md` for animation).
|
|
54
|
+
2. Generate all N variants in ONE batch (default 3), each a distinct, hypothesis-tagged design direction for the picked element. Do not generate them one at a time.
|
|
55
|
+
3. For each variant: write the change atomically to the implicated source file, then make it live. With HMR running, the file write is enough; otherwise apply the variant in place with `window.__gddLive.swapVariant({ n, style, html })`, which sets `data-gdd-variant="n"` and applies the variant's style or markup.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## POST-CHECK
|
|
60
|
+
|
|
61
|
+
Run the post-check on each variant via `scripts/lib/live/postcheck.cjs`, which invokes `gdd-detect`. Show the findings inline next to each variant. A variant that trips a finding is flagged, NOT auto-rejected: the user still decides. Append a `live_postcheck` event per variant.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## ACCEPT / DISCARD
|
|
66
|
+
|
|
67
|
+
- ACCEPT one variant: apply the chosen variant as the canonical source edit, and revert the others in the page (`window.__gddLive.revert()` on each non-chosen element). Emit a `live_accept` event and feed the outcome to the design-variants bandit via `scripts/lib/live/bandit-feed.cjs` (a dev-time signal). Append an `accept` entry.
|
|
68
|
+
- DISCARD: revert every variant in the page back to its captured original and leave the source untouched. Emit a `live_discard` event and append a `discard` entry.
|
|
69
|
+
|
|
70
|
+
Either way, persist the result through `scripts/lib/live/session-store.cjs` before continuing.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## PERSIST
|
|
75
|
+
|
|
76
|
+
Every step (boot, pick, generate, post-check, accept, discard) is written to the session file through `scripts/lib/live/session-store.cjs` as it happens. The on-disk event log uses the `pick`, `generate`, `accept`, `discard` kinds; the telemetry stream uses the six `live_*` event types. Writes are atomic, so an interrupted step never leaves a half-written session.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## RESUME
|
|
81
|
+
|
|
82
|
+
With `--resume <session-id>`, load the named session from `.design/live-sessions/`. Only an `in_progress` session is resumable. Offer the user two choices: continue from the last recorded event (report what that was, for example "last pick was the primary button"), or start fresh (open a new session and leave the old one intact). Never silently replay completed events.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## SCOPE GUARD
|
|
87
|
+
|
|
88
|
+
Never write outside the source files implicated by the picked element. Run every proposed write through `scripts/lib/live/scope-guard.cjs`, which maps the picked selector to its owning source files and rejects edits that fall outside them. If a variant would need a change beyond that scope (a shared token, a parent layout, a new dependency), stop and surface it to the user rather than widening the blast radius.
|
|
89
|
+
|
|
90
|
+
## Constraints
|
|
91
|
+
|
|
92
|
+
- Do NOT edit files outside the picked element's implicated sources (enforced by the scope guard).
|
|
93
|
+
- Do NOT generate variants one at a time; generate the full batch, then swap.
|
|
94
|
+
- Do NOT auto-reject a variant on a post-check finding; flag it and let the user decide.
|
|
95
|
+
- In DEGRADED mode, state up front that hot-swap is unavailable and fall back to screenshots.
|
|
96
|
+
- Persist before every user-facing prompt so a crash never loses accepted work.
|
|
97
|
+
|
|
98
|
+
## LIVE COMPLETE
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-locale
|
|
3
|
+
description: "Inspects or sets the GDD CLI locale for this project. With no argument, reports the resolved locale (config.locale > env LANG > en), the fallback chain, and per-locale coverage (which message tables are complete vs placeholder). With a <code> (en/ru/uk/de/fr/zh/ja), sets .design/config.json#locale after previewing the change. Localizes --help, common error messages, and skill prompt headers via scripts/lib/i18n/; missing keys fall back to English, so a partial locale never breaks the CLI. Use to switch GDD's own output language."
|
|
4
|
+
argument-hint: "[<code>]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{command_prefix}}locale
|
|
10
|
+
|
|
11
|
+
Closes the English-only CLI gap: GDD's README is multilingual, but `--help`, errors, and skill prompt
|
|
12
|
+
headers spoke English until now. This skill inspects or sets the project's locale. Contract:
|
|
13
|
+
`../../reference/cli-localization.md`.
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
| Command | Behavior |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `{{command_prefix}}locale` | Report the resolved locale, the fallback chain, and per-locale coverage. |
|
|
20
|
+
| `{{command_prefix}}locale <code>` | Set `.design/config.json#locale` to `<code>` (en/ru/uk/de/fr/zh/ja), after preview. |
|
|
21
|
+
|
|
22
|
+
## Steps
|
|
23
|
+
|
|
24
|
+
1. **Resolve current.** Read `.design/config.json#locale` (if any) and the environment, then call the
|
|
25
|
+
resolver to report the active locale + chain:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node -e '
|
|
29
|
+
const i = require("./scripts/lib/i18n/index.cjs");
|
|
30
|
+
let cfg = {}; try { cfg = JSON.parse(require("fs").readFileSync(".design/config.json","utf8")); } catch {}
|
|
31
|
+
const loc = i.resolveLocale({ env: process.env, configLocale: cfg.locale });
|
|
32
|
+
const cov = i.KNOWN_LOCALES.map((l) => `${l}:${(i.loadTable(l)._meta||{}).coverage||"?"}`).join(" ");
|
|
33
|
+
console.log(JSON.stringify({ resolved: loc, chain: i.fallbackChain(loc), coverage: cov }));
|
|
34
|
+
'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. **No argument** → print the resolved locale, the fallback chain, and the coverage line (which
|
|
38
|
+
tables are `complete` vs `placeholder`). Stop.
|
|
39
|
+
3. **`<code>` argument** → validate it is in `KNOWN_LOCALES` (en/ru/uk/de/fr/zh/ja). Unknown → print the
|
|
40
|
+
`error.invalid_locale` message + the known list, change nothing.
|
|
41
|
+
4. **Preview + set.** Show `locale: <old> -> <code>`, then write `locale` into `.design/config.json`
|
|
42
|
+
(create the file if absent, preserving any existing keys). Confirm, and note that missing keys in a
|
|
43
|
+
placeholder locale fall back to English.
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
End with:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
## LOCALE COMPLETE
|
|
51
|
+
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-map
|
|
3
|
+
description: "Dispatches 5 specialist codebase mappers in parallel. Produces .design/map/*.md files consumed by the explore stage."
|
|
4
|
+
argument-hint: "[--only tokens|components|visual-hierarchy|a11y|motion]"
|
|
5
|
+
tools: Read, Write, Bash, Task
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Get Design Done - Map
|
|
10
|
+
|
|
11
|
+
Parallel orchestrator. Spawns 5 specialist mappers, each writing one file under `.design/map/`. The explore stage consumes these when present. See `./reference/heuristics.md` §"Optimization rules" for parallel-spawn cost considerations.
|
|
12
|
+
|
|
13
|
+
## Mapper → Output
|
|
14
|
+
|
|
15
|
+
| Mapper | Output |
|
|
16
|
+
|--------|--------|
|
|
17
|
+
| `token-mapper` | `.design/map/tokens.md` |
|
|
18
|
+
| `component-taxonomy-mapper` | `.design/map/components.md` |
|
|
19
|
+
| `visual-hierarchy-mapper` | `.design/map/visual-hierarchy.md` |
|
|
20
|
+
| `a11y-mapper` | `.design/map/a11y.md` |
|
|
21
|
+
| `motion-mapper` | `.design/map/motion.md` |
|
|
22
|
+
|
|
23
|
+
## Step 1 - Setup
|
|
24
|
+
|
|
25
|
+
- Ensure `.design/map/` exists (create if missing).
|
|
26
|
+
- Read `.design/config.json` → `parallelism` object. Use `reference/config-schema.md` defaults if absent.
|
|
27
|
+
- Read `.design/STATE.md` - note `<connections>` (Figma availability for token-mapper).
|
|
28
|
+
- Parse `$ARGUMENTS`. If `--only <name>`, restrict the dispatch set to one mapper.
|
|
29
|
+
|
|
30
|
+
## Step 2 - Parallelism Decision
|
|
31
|
+
|
|
32
|
+
Per `reference/parallelism-rules.md`: all 5 mappers have `parallel-safe: auto` with disjoint `writes:` (each writes a different `.design/map/*.md` file) - no hard-rule conflict. `typical-duration-seconds` sum (~210s) minus slowest (~45s) ≈ 165s savings → clears `min_estimated_savings_seconds`. Verdict: **parallel**.
|
|
33
|
+
|
|
34
|
+
Write the verdict to STATE.md:
|
|
35
|
+
|
|
36
|
+
```xml
|
|
37
|
+
<parallelism_decision>
|
|
38
|
+
stage: map
|
|
39
|
+
verdict: parallel
|
|
40
|
+
reason: "5 mappers, parallel-safe: auto, writes disjoint, est savings ~165s"
|
|
41
|
+
agents: ["token-mapper", "component-taxonomy-mapper", "visual-hierarchy-mapper", "a11y-mapper", "motion-mapper"]
|
|
42
|
+
ruled_out: []
|
|
43
|
+
timestamp: [ISO 8601 now]
|
|
44
|
+
</parallelism_decision>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`--only` → adjust `agents` and set `verdict: serial` with `reason: "single mapper requested"`.
|
|
48
|
+
|
|
49
|
+
## Step 3 - Dispatch (concurrent)
|
|
50
|
+
|
|
51
|
+
Spawn all selected mappers in a single response with multiple `Task()` calls:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Task("<mapper-name>", """
|
|
55
|
+
<required_reading>
|
|
56
|
+
@.design/STATE.md
|
|
57
|
+
@reference/audit-scoring.md
|
|
58
|
+
[@reference/accessibility.md — a11y-mapper only]
|
|
59
|
+
[@reference/motion.md — motion-mapper only]
|
|
60
|
+
</required_reading>
|
|
61
|
+
|
|
62
|
+
You are <mapper-name>. Scan the codebase per your agent spec and write your
|
|
63
|
+
output file under .design/map/. Emit your completion marker when done.
|
|
64
|
+
""")
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Wait for each completion marker: `## TOKEN MAP COMPLETE`, `## COMPONENT MAP COMPLETE`, `## VISUAL HIERARCHY MAP COMPLETE`, `## A11Y MAP COMPLETE`, `## MOTION MAP COMPLETE`.
|
|
68
|
+
|
|
69
|
+
## Step 3.5 - Synthesize parallel mapper outputs (Plan 10.1-04, D-13/D-14/D-15)
|
|
70
|
+
|
|
71
|
+
Each mapper has written its own `.design/map/*.md` (disjoint writes). Main-context doesn't need all 5 verbatim - invoke `synthesize` inline with `outputs:[<each file's text labelled "=== from <mapper> ==="]`, `directive: "Merge into cross-cutting DESIGN-PATTERNS.md preserving section headers; consolidate cross-mapper duplicates with source-agent names; target ~120 lines."`, `output_shape:"markdown"`.
|
|
72
|
+
|
|
73
|
+
Wait for `## SYNTHESIS COMPLETE`. Write merged markdown to `.design/DESIGN-PATTERNS.md` (overwrite if present) - the primary explore-stage input; per-mapper files remain as drill-down evidence. `--only` (single mapper) → skip this step.
|
|
74
|
+
|
|
75
|
+
## Step 4 - Collate
|
|
76
|
+
|
|
77
|
+
Write `.design/DESIGN-MAP.md` - thin index linking to each `.design/map/*.md` with a one-paragraph summary from each file's header. If Step 3.5 ran, also cross-link to `.design/DESIGN-PATTERNS.md` and note at the top: "See DESIGN-PATTERNS.md for the merged cross-cutting summary - this index preserves per-mapper drill-down."
|
|
78
|
+
|
|
79
|
+
## Step 5 - Report
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
━━━ Map complete ━━━
|
|
83
|
+
Files: .design/map/tokens.md, components.md, visual-hierarchy.md, a11y.md, motion.md
|
|
84
|
+
Index: .design/DESIGN-MAP.md
|
|
85
|
+
Next: {{command_prefix}}explore (consumes .design/DESIGN-PATTERNS.md on happy path; .design/map/*.md available for drill-down)
|
|
86
|
+
━━━━━━━━━━━━━━━━━━━━━
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## MAP COMPLETE
|
|
@@ -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 {{command_prefix}}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
|
+
# {{command_prefix}}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
|
+
| `{{command_prefix}}migrate` | Scan + preview every applicable migration, then confirm each before applying. |
|
|
21
|
+
| `{{command_prefix}}migrate --dry-run` | Preview only - print the diff, change nothing. |
|
|
22
|
+
| `{{command_prefix}}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
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-migrate-context
|
|
3
|
+
description: "Migrates a pre-Phase-52 project from the flat .design/map/*.md mapper notes to the typed DesignContext graph at .design/context-graph.json. Reads the old map notes, runs the deterministic extract-*.mjs passes to build mapper fragments, merges them with merge-fragments.mjs, validates the result with validate-design-context.cjs, and flags every low-confidence transform for human review before anything is trusted. Read-first and reversible; --dry-run previews the plan without writing. Use when upgrading a project to the DesignContext graph and .design/map/*.md still holds the only structured design notes. Activates for requests involving migrating design maps, building the context graph from old notes, or DesignContext graph migration."
|
|
4
|
+
argument-hint: "[--dry-run]"
|
|
5
|
+
tools: Read, Write, Bash
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{command_prefix}}migrate-context
|
|
10
|
+
|
|
11
|
+
Closes the pre-graph gap: before Phase 52 a project recorded its structured design knowledge as flat
|
|
12
|
+
`.design/map/*.md` mapper notes (token map, component taxonomy, motion map, a11y map, visual-hierarchy
|
|
13
|
+
map). Phase 52 introduced the typed DesignContext graph at `.design/context-graph.json`. This skill
|
|
14
|
+
carries a project across that boundary: it reads the old map notes, rebuilds the graph deterministically
|
|
15
|
+
from source, validates it, and surfaces anything it could not transform with confidence so a human can
|
|
16
|
+
confirm it. It never trusts a low-confidence guess silently.
|
|
17
|
+
|
|
18
|
+
Contracts: `../../reference/design-context-schema.md` (the Node / Edge / Fragment / Graph shapes) and
|
|
19
|
+
`../../reference/design-context-tag-vocab.md` (the controlled `tags[]` vocabulary).
|
|
20
|
+
|
|
21
|
+
## Invocation
|
|
22
|
+
|
|
23
|
+
| Command | Behavior |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `{{command_prefix}}migrate-context` | Run the full migration: read old maps, extract fragments, merge, validate, then report the low-confidence items for review. |
|
|
26
|
+
| `{{command_prefix}}migrate-context --dry-run` | Preview only. Print the migration plan and what each step would write, change nothing on disk. |
|
|
27
|
+
|
|
28
|
+
## Step 1 - Detect the pre-52 state
|
|
29
|
+
|
|
30
|
+
Read the project layout before touching anything.
|
|
31
|
+
|
|
32
|
+
1. List `.design/map/*.md`. These are the pre-52 mapper notes (for example `token-map.md`,
|
|
33
|
+
`component-taxonomy.md`, `motion-map.md`, `a11y-map.md`, `visual-hierarchy.md`). If the directory is
|
|
34
|
+
absent or empty, there is nothing to migrate: print `No .design/map/*.md notes found; nothing to
|
|
35
|
+
migrate.` and stop.
|
|
36
|
+
2. Check whether `.design/context-graph.json` already exists. If it does, this is a re-run: keep the
|
|
37
|
+
existing graph as a backup reference and report that the migration will rebuild it. Do not delete it.
|
|
38
|
+
3. In `--dry-run`, print the file list and the planned outputs (`.design/fragments/<mapper>.json` per
|
|
39
|
+
mapper, then `.design/context-graph.json`) and stop before Step 2.
|
|
40
|
+
|
|
41
|
+
## Step 2 - Rebuild fragments deterministically
|
|
42
|
+
|
|
43
|
+
The graph topology comes from the source tree, not from prose. Run each deterministic extractor over the
|
|
44
|
+
configured source roots (default `src/`; read `source_roots` from `.design/STATE.md` if present). Each
|
|
45
|
+
extractor is pure, dependency-free, and prints a schema-valid Fragment to stdout.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
mkdir -p .design/fragments
|
|
49
|
+
for mapper in tokens components motion a11y visual-hierarchy; do
|
|
50
|
+
node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/lib/design-context/extract-${mapper}.mjs" src/ \
|
|
51
|
+
> ".design/fragments/extract-${mapper}.json"
|
|
52
|
+
done
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The extractors fill `id / type / name / subtype / tags / complexity` and every edge they can prove; they
|
|
56
|
+
leave each node `summary` empty for the summary pass. Use the old `.design/map/*.md` notes as the source
|
|
57
|
+
of the human-authored `summary` text and any tags the extractor could not infer: for each node whose name
|
|
58
|
+
matches a map entry, copy that note's one-line description into the node `summary` and add any vocabulary
|
|
59
|
+
tags it implies. This is the only place prose feeds the graph.
|
|
60
|
+
|
|
61
|
+
## Step 3 - Merge into the canonical graph
|
|
62
|
+
|
|
63
|
+
Merge the fragments into the single graph. The merger dedupes nodes by `id`, unions tags, prefers a
|
|
64
|
+
non-stub summary over the empty stub, and keeps an edge only when both endpoints resolve to a node in some
|
|
65
|
+
fragment. Dropped dangling edges are reported on stderr as `could-not-fix:` lines.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/lib/design-context/merge-fragments.mjs" \
|
|
69
|
+
.design/fragments --out .design/context-graph.json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Capture the stderr `could-not-fix:` lines. Each one is a transform the merge could not complete (a map
|
|
73
|
+
note referenced an entity the extractor never found in source). These are low-confidence items for Step 5,
|
|
74
|
+
not silent drops.
|
|
75
|
+
|
|
76
|
+
## Step 4 - Validate
|
|
77
|
+
|
|
78
|
+
Validate the merged graph. The validator checks structure, referential integrity (no dangling edges),
|
|
79
|
+
unique ids, non-stub summaries (soft warning), and the controlled tag vocabulary (soft warning).
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
node "${CLAUDE_PLUGIN_ROOT:-.}/scripts/validate-design-context.cjs" .design/context-graph.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Exit `0` is clean, `1` is warnings only (stub summaries or unknown tags to tidy later), `2` is a hard
|
|
86
|
+
error (a dangling edge or duplicate id) that must be fixed before the graph is trusted. On exit `2`, do
|
|
87
|
+
not present the graph as migrated: report the errors and stop so a human can resolve them.
|
|
88
|
+
|
|
89
|
+
## Step 5 - Flag low-confidence transforms
|
|
90
|
+
|
|
91
|
+
Collect everything that needs human eyes and present it as one review list rather than applying it:
|
|
92
|
+
|
|
93
|
+
- every `could-not-fix:` line from the merge (an unresolved or dropped edge);
|
|
94
|
+
- every node still carrying an empty `summary` after Step 2 (a map note had no matching entity, or no
|
|
95
|
+
note existed);
|
|
96
|
+
- every validator `WARN` (stub summary, tag outside the controlled vocabulary).
|
|
97
|
+
|
|
98
|
+
Print the list with a clear heading and ask the user to confirm or correct each item. Do not auto-resolve
|
|
99
|
+
a low-confidence transform: a wrong edge or a mislabeled node poisons every later graph query.
|
|
100
|
+
|
|
101
|
+
## Step 6 - Deprecate the old map notes
|
|
102
|
+
|
|
103
|
+
The flat `.design/map/*.md` notes stay readable for one minor version so nothing breaks mid-upgrade. Add a
|
|
104
|
+
one-line deprecation banner to the top of each migrated map note (do not delete the file):
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
> Deprecated: superseded by the DesignContext graph (.design/context-graph.json) as of Phase 52.
|
|
108
|
+
> Read-only for one minor version; regenerate the graph with {{command_prefix}}migrate-context.
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
In `--dry-run`, describe this banner instead of writing it. Announce that the next minor version may remove
|
|
112
|
+
the `.design/map/*.md` notes, and that the graph is now the source of truth.
|
|
113
|
+
|
|
114
|
+
## Do Not
|
|
115
|
+
|
|
116
|
+
- Do not trust a low-confidence transform silently. Every `could-not-fix:` line and every stub goes on the
|
|
117
|
+
Step 5 review list.
|
|
118
|
+
- Do not delete `.design/map/*.md`. Add the deprecation banner and keep the notes for one minor version.
|
|
119
|
+
- Do not hand-edit `.design/context-graph.json` to force validation green. Fix the fragment or the source,
|
|
120
|
+
then re-merge.
|
|
121
|
+
- Do not edit the extractors, the merger, or the validator. This skill only calls them.
|
|
122
|
+
|
|
123
|
+
## MIGRATE-CONTEXT COMPLETE
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-new-addendum
|
|
3
|
+
description: "Scaffolds a new Phase-54 composable reference addendum for a design-system, framework, or motion library: validates the kind and the slug, defaults composes_into by kind, and writes a 4-section skeleton at reference/{systems|frameworks|motion}/<name>.md from the pure generator. Use when adding stack-specific guidance that an explore mapper should compose at spawn time and you want the frontmatter, the composes_into wiring, and the mandatory sections correct from the first commit. Activates for requests involving authoring a reference addendum, adding stack-specific mapper guidance, scaffolding a systems or frameworks or motion doc, or registering a new design-system."
|
|
4
|
+
argument-hint: "<kind> <name>"
|
|
5
|
+
tools: Read, Write, Bash, AskUserQuestion
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{command_prefix}}new-addendum
|
|
10
|
+
|
|
11
|
+
**Role:** Scaffold a contract-compliant stack addendum. Validate the kind and the name, then write `reference/{systems|frameworks|motion}/<name>.md` from the pure generator at `scripts/lib/new-addendum.cjs`. This skill writes ONE reference file. It does NOT touch `reference/registry.json` and does NOT run any build; it prints the exact follow-up steps instead.
|
|
12
|
+
|
|
13
|
+
An addendum is a registry entry, not a skill. Read `reference/registry.json` for the `type:"stack-addendum"` entry shape and `scripts/lib/mapper-spawn.cjs` for how `composes_into` selects an addendum at spawn time. Read one shipped example first, for instance `reference/systems/tailwind.md`, to match the house style.
|
|
14
|
+
|
|
15
|
+
## Step 1 - Gather the fields
|
|
16
|
+
|
|
17
|
+
1. **kind**: the first token of `$ARGUMENTS` if present, else ask. Must be one of `system`, `framework`, or `motion`. This picks the target subdir and the default `composes_into`.
|
|
18
|
+
2. **name**: the second token of `$ARGUMENTS` if present, else ask. Must match `^[a-z0-9][a-z0-9-._]*$`. The basename is also the matcher key in `mapper-spawn.cjs`, so it must equal the value `detectStack` reports for this stack (for example `tailwind`, `nextjs`, `framer-motion`). Reject a `reference/{dir}/<name>.md` collision.
|
|
19
|
+
3. **composes_into** (optional): accept the kind default, or override with a comma list of mapper names. Defaults: `system` to `token-mapper, component-taxonomy-mapper`; `framework` to `component-taxonomy-mapper, visual-hierarchy-mapper`; `motion` to `motion-mapper`.
|
|
20
|
+
|
|
21
|
+
Resolve the target path and check for a collision:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node -e "
|
|
25
|
+
const a = require('./scripts/lib/new-addendum.cjs');
|
|
26
|
+
console.log(a.targetPathFor(process.argv[1], process.argv[2]));
|
|
27
|
+
" "<kind>" "<name>"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If that path already exists, stop and tell the user to edit the existing file instead.
|
|
31
|
+
|
|
32
|
+
## Step 2 - Write the file
|
|
33
|
+
|
|
34
|
+
Build the record and render the skeleton with the pure generator, then write it with the Write tool (not shell redirection):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
node -e "
|
|
38
|
+
const a = require('./scripts/lib/new-addendum.cjs');
|
|
39
|
+
const rec = a.buildAddendumRecord({
|
|
40
|
+
kind: process.env.AD_KIND,
|
|
41
|
+
name: process.env.AD_NAME,
|
|
42
|
+
composesInto: process.env.AD_COMPOSES || undefined,
|
|
43
|
+
});
|
|
44
|
+
process.stdout.write(a.renderAddendumMd(rec));
|
|
45
|
+
"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`buildAddendumRecord` throws on an invalid kind, an invalid name, or a malformed composes_into list. Surface the thrown message to the user and re-prompt the offending field. Capture stdout and write it verbatim to the path from Step 1 via the Write tool.
|
|
49
|
+
|
|
50
|
+
## Step 3 - Fill the four sections
|
|
51
|
+
|
|
52
|
+
The skeleton ships four mandatory sections with TODO placeholders: Conventions, File patterns, Gotchas, Example output. Replace every TODO with terse vendor-checked bullets (keep the file at or under about 50 lines). Rules:
|
|
53
|
+
|
|
54
|
+
- Lead with the real vendor docs URL in the attribution comment.
|
|
55
|
+
- The Example output block uses ONLY the Phase 52 DesignContext schema (node types token / component / variant / state / motion-fragment / screen / layer; edge types uses-token / composes / extends / transitions-to / mirrors).
|
|
56
|
+
- Tags must come from `reference/design-context-tag-vocab.md`; drop any tag not in that vocabulary.
|
|
57
|
+
- For a motion addendum, reuse the `reference/motion-transition-taxonomy.md` duration classes (instant / quick / standard / slow / narrative) and call out the seconds-vs-ms-vs-no-duration unit trap.
|
|
58
|
+
- No em dashes anywhere (the `lint:prose` gate scans `reference/`).
|
|
59
|
+
|
|
60
|
+
## Step 4 - Tell the user the follow-up
|
|
61
|
+
|
|
62
|
+
The skill stops here by contract. Print the next steps for the maintainer to run:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
1. Add a registry entry for "<name>" to reference/registry.json
|
|
66
|
+
(name addendum-<kind>-<name>, path, type "stack-addendum", phase 54, kind, composes_into, description).
|
|
67
|
+
2. node -e "require('./scripts/lib/reference-registry.cjs').validateRegistry({cwd:process.cwd()})"
|
|
68
|
+
must report ok:true (the round-trip scan picks up the new subdir file).
|
|
69
|
+
3. npm test (the reference-registry + phase-54 suites must stay green).
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The registry round-trip test stays red until the registry entry exists; that is expected and is the maintainer's step.
|
|
73
|
+
|
|
74
|
+
## Do Not
|
|
75
|
+
|
|
76
|
+
- Do not edit `reference/registry.json`, `package.json`, or `scripts/lib/manifest/skills.json`.
|
|
77
|
+
- Do not run a build or the registry generator for the user; print the steps.
|
|
78
|
+
- Do not write the file with shell redirection; use the Write tool so the content is exact.
|
|
79
|
+
- Do not invent vendor facts; the addendum content must be vendor-checked.
|
|
80
|
+
|
|
81
|
+
## NEW-ADDENDUM COMPLETE
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-new-cycle
|
|
3
|
+
description: "Start a new design cycle. Creates cycle scope in STATE.md, initializes .design/CYCLES.md entry. Each cycle has its own goal and tracks its own decisions/tasks/pipeline runs."
|
|
4
|
+
argument-hint: "[<goal>]"
|
|
5
|
+
tools: Read, Write, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {{command_prefix}}new-cycle
|
|
9
|
+
|
|
10
|
+
The cycle is the hierarchical unit above individual pipeline runs: **Cycle > Pipeline run > Wave > Task**. Each cycle has a goal, tracks its own decisions, and can span many pipeline runs. `{{command_prefix}}complete-cycle` closes the cycle once goals are met and a retrospective is captured.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. Read `.design/STATE.md`. If `cycle:` field is populated and no `complete` flag, ask: "Cycle <N> is active. End it first with `{{command_prefix}}complete-cycle`?" Abort if user declines.
|
|
15
|
+
2. If no goal was passed as an argument, ask (AskUserQuestion): "What is the goal for this design cycle? (e.g., 'Redesign the checkout flow', 'Improve dashboard accessibility')"
|
|
16
|
+
3. Generate cycle ID: read `.design/CYCLES.md` if present, find the max `cycle-N`, increment. If CYCLES.md is missing, start at `cycle-1`.
|
|
17
|
+
4. Update `.design/STATE.md` frontmatter: set `cycle: cycle-N`.
|
|
18
|
+
5. Create or append to `.design/CYCLES.md`:
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
## cycle-N: <goal>
|
|
22
|
+
**Started**: <date>
|
|
23
|
+
**Status**: active
|
|
24
|
+
**Goal**: <goal>
|
|
25
|
+
**Pipeline runs**: 0
|
|
26
|
+
**Decisions made**: 0
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
6. Reset the `<decisions>` section in STATE.md for the new cycle. Preserve prior decisions by prepending a comment marker `<!-- prior cycle decisions archived in CYCLES.md -->`.
|
|
30
|
+
7. Print: "Cycle cycle-N started. Run `@get-design-done brief` or `@get-design-done explore` to begin."
|
|
31
|
+
|
|
32
|
+
## Do Not
|
|
33
|
+
|
|
34
|
+
- Do not archive prior artifacts here - that's `{{command_prefix}}complete-cycle`.
|
|
35
|
+
- Do not overwrite the existing CYCLES.md - append only.
|
|
36
|
+
|
|
37
|
+
## NEW-CYCLE COMPLETE
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gdd-new-project
|
|
3
|
+
description: "Initialize a new get-design-done project. Gathers project context, creates PROJECT.md and STATE.md, initializes first cycle. Run once per project before any pipeline stage."
|
|
4
|
+
argument-hint: "[--name <project-name>]"
|
|
5
|
+
tools: Read, Write, AskUserQuestion, Bash, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {{command_prefix}}new-project
|
|
9
|
+
|
|
10
|
+
One-time project initialization. Replaces "run scan cold" by gathering context up front and producing PROJECT.md + STATE.md + cycle-1.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
1. **Existing check**: If `.design/STATE.md` exists, ask (AskUserQuestion): "Project already initialized. Re-initialize? (This does not delete existing work.)" Abort if declined.
|
|
15
|
+
2. **Create directory**: `mkdir -p .design` via Bash.
|
|
16
|
+
3. **Auto-detect from codebase** (do this before asking):
|
|
17
|
+
- Read `package.json` for framework (React/Next.js/Vue/SvelteKit/etc.).
|
|
18
|
+
- Glob for `tailwind.config.*`, `components/`, `src/`, `shadcn.json` to guess the design system.
|
|
19
|
+
- Use directory name as default project name.
|
|
20
|
+
4. **Gather context** (AskUserQuestion, one at a time, pre-filled with detected values):
|
|
21
|
+
- Project name
|
|
22
|
+
- Project type (framework)
|
|
23
|
+
- Main design goal
|
|
24
|
+
- Primary user
|
|
25
|
+
- Design system / component library
|
|
26
|
+
5. **Write `.design/PROJECT.md`**:
|
|
27
|
+
```markdown
|
|
28
|
+
# Project: <name>
|
|
29
|
+
**Type**: <framework>
|
|
30
|
+
**Design system**: <system>
|
|
31
|
+
**Main goal**: <goal>
|
|
32
|
+
**Primary user**: <user>
|
|
33
|
+
**Initialized**: <date>
|
|
34
|
+
```
|
|
35
|
+
6. **Initialize STATE.md**: Copy from `reference/STATE-TEMPLATE.md`, fill in project name, set stage to `brief`, cycle to `cycle-1`.
|
|
36
|
+
7. **Create `.design/config.json`** with defaults from `reference/config-schema.md`.
|
|
37
|
+
8. **Initialize first cycle**: Write `.design/CYCLES.md` with a `cycle-1` entry (goal copied from PROJECT.md main goal, status `active`).
|
|
38
|
+
9. **Seed project-local skills directory**: Create `./.claude/skills/` and write `./.claude/skills/README.md`:
|
|
39
|
+
```markdown
|
|
40
|
+
# Project-Local Skills
|
|
41
|
+
|
|
42
|
+
Auto-loaded by gdd pipeline stages. See `reference/project-skills-guide.md` in the plugin.
|
|
43
|
+
Files named `design-*-conventions.md` are read by explore/plan/design.
|
|
44
|
+
Populated by `{{command_prefix}}sketch-wrap-up` and manual edits.
|
|
45
|
+
```
|
|
46
|
+
10. Print: "Project initialized. Run `{{command_prefix}}brief` to capture your design problem, or `{{command_prefix}}explore` to scan directly. Run `{{command_prefix}}connections` to wire up optional integrations (Figma, Storybook, Chromatic, etc.)."
|
|
47
|
+
|
|
48
|
+
## Do Not
|
|
49
|
+
|
|
50
|
+
- Do not delete or overwrite existing `.design/` artifacts if re-initializing.
|
|
51
|
+
- Do not run any pipeline stage automatically - this is init only.
|
|
52
|
+
|
|
53
|
+
## NEW-PROJECT COMPLETE
|