@hegemonart/get-design-done 1.14.5 → 1.14.8
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 +7 -2
- package/.claude-plugin/plugin.json +11 -2
- package/CHANGELOG.md +109 -0
- package/README.md +28 -0
- package/SKILL.md +2 -0
- package/agents/design-executor.md +41 -0
- package/agents/design-figma-writer.md +61 -1
- package/agents/design-start-writer.md +221 -0
- package/connections/figma.md +10 -0
- package/hooks/first-run-nudge.sh +82 -0
- package/hooks/gdd-bash-guard.js +49 -0
- package/hooks/gdd-decision-injector.js +196 -0
- package/hooks/gdd-mcp-circuit-breaker.js +140 -0
- package/hooks/gdd-protected-paths.js +114 -0
- package/hooks/hooks.json +44 -0
- package/package.json +1 -1
- package/reference/cycle-handoff-preamble.md +22 -0
- package/reference/figma-sandbox.md +19 -0
- package/reference/mcp-budget.default.json +13 -0
- package/reference/meta-rules.md +66 -0
- package/reference/protected-paths.default.json +18 -0
- package/reference/registry.json +35 -0
- package/reference/registry.schema.json +52 -0
- package/reference/retrieval-contract.md +30 -0
- package/reference/schemas/mcp-budget.schema.json +21 -0
- package/reference/schemas/protected-paths.schema.json +19 -0
- package/reference/shared-preamble.md +6 -57
- package/reference/start-interview.md +84 -0
- package/scripts/build-intel.cjs +20 -0
- package/scripts/injection-patterns.cjs +42 -1
- package/scripts/lib/blast-radius.cjs +97 -0
- package/scripts/lib/dangerous-patterns.cjs +118 -0
- package/scripts/lib/detect-ui-root.cjs +187 -0
- package/scripts/lib/glob-match.cjs +57 -0
- package/scripts/lib/reference-registry.cjs +101 -0
- package/scripts/lib/start-findings-engine.cjs +405 -0
- package/skills/pause/SKILL.md +3 -0
- package/skills/progress/SKILL.md +2 -0
- package/skills/reflect/SKILL.md +2 -0
- package/skills/resume/SKILL.md +3 -0
- package/skills/start/SKILL.md +166 -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). Ships with a full CI/CD pipeline (Node 22/24 × Linux/macOS/Windows) and release automation (auto-tag + GitHub Release + release-time smoke test).",
|
|
8
|
-
"version": "1.14.
|
|
8
|
+
"version": "1.14.8"
|
|
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.",
|
|
15
|
-
"version": "1.14.
|
|
15
|
+
"version": "1.14.8",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "hegemonart"
|
|
18
18
|
},
|
|
@@ -53,6 +53,11 @@
|
|
|
53
53
|
"release-automation",
|
|
54
54
|
"gitleaks",
|
|
55
55
|
"shellcheck",
|
|
56
|
+
"safety-hardening",
|
|
57
|
+
"protected-paths",
|
|
58
|
+
"decision-injector",
|
|
59
|
+
"reference-registry",
|
|
60
|
+
"mcp-circuit-breaker",
|
|
56
61
|
"schema-validation",
|
|
57
62
|
"cost-optimization",
|
|
58
63
|
"cache-aware",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-design-done",
|
|
3
3
|
"short_name": "gdd",
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.8",
|
|
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.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "hegemonart",
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
"intel-store",
|
|
39
39
|
"self-improvement",
|
|
40
40
|
"reflection",
|
|
41
|
+
"safety-hardening",
|
|
42
|
+
"protected-paths",
|
|
43
|
+
"decision-injector",
|
|
44
|
+
"reference-registry",
|
|
45
|
+
"mcp-circuit-breaker",
|
|
41
46
|
"tested",
|
|
42
47
|
"ci",
|
|
43
48
|
"cicd",
|
|
@@ -47,7 +52,11 @@
|
|
|
47
52
|
"schema-validation",
|
|
48
53
|
"cost-optimization",
|
|
49
54
|
"cache-aware",
|
|
50
|
-
"budget"
|
|
55
|
+
"budget",
|
|
56
|
+
"onboarding",
|
|
57
|
+
"first-run",
|
|
58
|
+
"demo",
|
|
59
|
+
"proof-path"
|
|
51
60
|
],
|
|
52
61
|
"skills": ["./skills/"]
|
|
53
62
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,115 @@ All notable changes to get-design-done are documented here. Versions follow [sem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.14.8] — 2026-04-24
|
|
8
|
+
|
|
9
|
+
### Added — Phase 14.7 First-Run Proof Path
|
|
10
|
+
|
|
11
|
+
A new user can now install the plugin, run one command, and see GDD inspect their own UI code in under five minutes — with a concrete "first fix" pointer on the way out.
|
|
12
|
+
|
|
13
|
+
- **`/gdd:start` skill** (`skills/start/SKILL.md`) — leaf command with a locked 5-question interview (`reference/start-interview.md`) that collects pain hint, target-area confirmation, budget preference, framework/design-system confirmation, and visual-workflow selection. Writes only `.design/START-REPORT.md` and a temporary `.design/.start-context.json`; never mutates `STATE.md`, `config.json`, or source files.
|
|
14
|
+
- **`detect-ui-root` helper** (`scripts/lib/detect-ui-root.cjs`) — deterministic priority-ordered detector that identifies the user's UI surface across `packages/ui/src/`, `apps/*/components/`, Next.js app-router `app/components/`, Vite `src/components/`, CRA `src/components/`, root `components/`, and Svelte/Remix `src/routes/`. Backend-only repos get a clean diagnostic and exit with zero `.design/` footprint.
|
|
15
|
+
- **`start-findings-engine` helper** (`scripts/lib/start-findings-engine.cjs`) — read-only scanner with seven regex-based detectors (transition-all, will-change-all, tinted-image-outline, scale-on-press-drift, same-radius-nested, missing-reduced-motion-guard, non-root-font-smoothing), budget-bounded walk (fast / balanced / thorough), and a deterministic **safe-fix rubric** that picks exactly one `best_first_proof` per report.
|
|
16
|
+
- **`design-start-writer` agent** (`agents/design-start-writer.md`) — Haiku-tier writer with `allowed-write-paths: [.design/START-REPORT.md]`. Output contract locks seven H2 sections (`What I inspected`, `Three findings`, `Best first proof`, `Suggested next command`, `Visual Proof Readiness`, `Full pipeline path`, `Connections / writeback optional`) plus one trailing machine-readable JSON block that future `/gdd:fast` / `/gdd:do` invocations can consume.
|
|
17
|
+
- **First-run nudge** (`hooks/first-run-nudge.sh`) — SessionStart hook that surfaces one restrained line pointing at `/gdd:start` only when `.design/config.json` is absent, no dismissal flag exists, and no active pipeline stage is in progress. Per-install dismissal lives at `~/.claude/gdd-nudge-dismissed`. Silent-on-failure posture inherited from Phase 13.3.
|
|
18
|
+
- **Regression fixtures** at `test-fixture/baselines/phase-14.7/` (context-input.json, expected-report-shape.md) and `test-fixture/src/ui-detection/` covering Next.js, Vite, CRA, Remix, two monorepo shapes, backend-only, and empty-repo paths.
|
|
19
|
+
- **Plugin keywords** extended with `onboarding`, `first-run`, `demo`, `proof-path`.
|
|
20
|
+
|
|
21
|
+
### Non-breaking
|
|
22
|
+
|
|
23
|
+
Phase 15 target version unchanged (`v1.15.0`). `v1.14.6` remains reserved for Phase 14.6 (test-coverage-completion); this release does not block or reshape that phase.
|
|
24
|
+
|
|
25
|
+
### Scope notes
|
|
26
|
+
|
|
27
|
+
- The first-run report **recommends** commands; it never auto-applies fixes. `/gdd:fast` suggestions are printed as ready-to-run text.
|
|
28
|
+
- `/gdd:do` is intentionally **not** surfaced as a suggested command in v1.14.8 (revisit at Phase 15 per Phase 14.7 D-05).
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [1.14.7] — 2026-04-24
|
|
33
|
+
|
|
34
|
+
### Phase 14.6 — Test Coverage Completion (Phase 12 Wave C closeout)
|
|
35
|
+
|
|
36
|
+
Closes the Phase 12 test-coverage slate that had Waves A + B shipped but Wave C (plans `12-05` / `12-06` / `12-07`) never executed. The plans were migrated to **Phase 14.6** (`.planning/phases/14.6-test-coverage-completion/`) and the gdd-unique test files those plans targeted are now validated end-to-end alongside the pre-existing suite.
|
|
37
|
+
|
|
38
|
+
### Verified — gdd-unique test coverage (no code diff vs 1.14.6)
|
|
39
|
+
|
|
40
|
+
Inspection during Phase 14.6 execution confirmed that all 13 gdd-unique test files from the Wave-C migration are present in `tests/` and pass under `npm test`. No net-new test source ships with this release — Phase 14.6's substantive deliverable is the validation, documentation, and closeout bump.
|
|
41
|
+
|
|
42
|
+
| Area | Test files covered |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Pipeline + data | `pipeline-smoke`, `mapper-schema`, `parallelism-engine`, `touches-analysis`, `cycle-lifecycle`, `intel-consistency` |
|
|
45
|
+
| Feature correctness | `sketch-determinism`, `connection-probe`, `figma-writer-dry-run`, `reflection-proposal`, `deprecation-redirect`, `nng-coverage`, `read-injection-scanner` |
|
|
46
|
+
|
|
47
|
+
Full suite: **343 tests, 342 pass, 1 skipped, 0 fail**.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` (outer + `plugins[0]`), `package.json` — version `1.14.6` → `1.14.7`.
|
|
52
|
+
- `tests/semver-compare.test.cjs` — `1.14.7` registered in `OFF_CADENCE_VERSIONS`.
|
|
53
|
+
|
|
54
|
+
### Notes
|
|
55
|
+
|
|
56
|
+
- Phase 12 ROADMAP entry remains **Complete** (scope-reduced); Phase 14.6 is now marked **Complete** with the Wave-C + closeout scope that was split out on 2026-04-24.
|
|
57
|
+
- Phase 14.7 (First-Run Proof Path) retains its reserved release slot and will ship as a subsequent PATCH bump (the original `v1.14.7` reservation shifts forward to the next available patch when Phase 14.7 ships).
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## [1.14.6] — 2026-04-24
|
|
62
|
+
|
|
63
|
+
### Phase 14.5 — Safety + Recall Floor
|
|
64
|
+
|
|
65
|
+
Closes two unrelated risks before the Phase 15–19 reference-library expansion and the Phase 20+ autonomy ramp: (a) agents had no typed reference index and no cache-stable L0 preamble; (b) no defense-in-depth around prompt-injected bash, protected-paths violations, runaway blast radius, or the Figma plugin-sandbox hill-climb failure mode. Ships the minimum-viable version of both tracks as one cohesive release.
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
**Safety hooks**
|
|
70
|
+
- `hooks/gdd-bash-guard.js` — PreToolUse:Bash guard. 45 dangerous-pattern regexes across 10 families (filesystem destruction, permission escalation, pipe-to-shell, git destruction, system mutation, process nuking, credential exfil, shell obfuscation, path traversal, npm/docker/firewall abuse). `scripts/lib/dangerous-patterns.cjs` normalizes Unicode NFKC + strips ANSI escapes + strips zero-width / bidi overrides before matching so obfuscated attacks (`rm\u200B -rf /`, bidi overrides, hex-encoded `\x72\x6d\x20\x2d\x72\x66`) fail closed.
|
|
71
|
+
- `hooks/gdd-protected-paths.js` + `reference/protected-paths.default.json` — PreToolUse:Edit|Write|Bash guard blocking mutation of `reference/**`, `skills/**`, `commands/**`, `hooks/**`, `.design/archive/**`, `.design/config.json`, `.design/telemetry/**`, `.git/**`, both plugin manifests. User additions in `.design/config.json.protected_paths` MERGE into the default list — users cannot reduce the default-protected set. `scripts/lib/glob-match.cjs` ships a dependency-free `**` glob matcher.
|
|
72
|
+
- `scripts/lib/blast-radius.cjs` — `estimate({touchedPaths, diffStats})` + `estimateMCPCalls({toolCalls})` preflight called by `design-executor` before the first Edit/Write of each task. Defaults: `max_files_per_task: 10`, `max_lines_per_task: 400`, `max_mcp_calls_per_task: 30`. Zero-value limits disable that ceiling. `design-executor` gains a new `## Preflight — Blast-Radius Check` section.
|
|
73
|
+
|
|
74
|
+
**Injection-scanner extension**
|
|
75
|
+
- `scripts/injection-patterns.cjs` extended from 7 to 22 patterns: classic prompt-injection verbs (incl. `forget previous`), **invisible-Unicode** (zero-width, BOM, bidi overrides), **HTML-comment instruction hijacks** (`<!-- system: …`, hidden divs/spans, zero-font-size tricks), **secret-exfil triggers** (`curl $OPENAI_API_KEY`, `cat .env`, `tar ~ | nc`, `process.env._KEY fetch`, SSH private-key reads). Single source of truth consumed by `hooks/gdd-read-injection-scanner.js`.
|
|
76
|
+
|
|
77
|
+
**Decision-injector hook (first cross-cycle recall primitive)**
|
|
78
|
+
- `hooks/gdd-decision-injector.js` — PreToolUse:Read on any `.design/**.md | reference/**.md | .planning/**.md` ≥ 1500 bytes. Surfaces the top-15 matching D-XX decisions, L-NN learnings, and cycle-N summary excerpts that reference the opened file's basename or path. Grep backend (ripgrep when available, Node fs fallback); Phase 19.5 will swap in FTS5 transparently.
|
|
79
|
+
|
|
80
|
+
**Reference registry + L0/L2 cache split**
|
|
81
|
+
- `reference/registry.schema.json` + `reference/registry.json` — typed index of every `reference/*.md` and `.default.json` file (18 entry types: `preamble | meta-rules | heuristic | output-contract | defaults | schema | data | motion | surfaces | authority-feed | influences | easing | taxonomy | principles | emotional-design | experience | palette | style-vocabulary`). Round-trip enforced by `scripts/lib/reference-registry.cjs.validateRegistry()`.
|
|
82
|
+
- `scripts/build-intel.cjs` re-runs `validateRegistry()` on any `reference/**` change.
|
|
83
|
+
- `reference/meta-rules.md` (tier L0) — 5 framework-invariant subsections extracted verbatim from `reference/shared-preamble.md`. `shared-preamble.md` becomes an L0 aggregator (imports `meta-rules.md` first), shrunk from ~6.5KB to <4KB. Stabilizes the Anthropic 5-min prompt-cache prefix.
|
|
84
|
+
- `reference/cycle-handoff-preamble.md` — "reference, not current requests" framing prose imported by `/gdd:pause` and `/gdd:resume`.
|
|
85
|
+
- `reference/retrieval-contract.md` — 3-layer `search → metadata → full-doc` protocol with per-row token-cost labels. Imported by `/gdd:progress`, `/gdd:resume`, `/gdd:reflect`, `/gdd:pause`.
|
|
86
|
+
|
|
87
|
+
**Figma authoring-intent guard + MCP circuit-breaker**
|
|
88
|
+
- `reference/figma-sandbox.md` — 4 Figma plugin-sandbox pitfalls encoded as hard rules (`loadFontAsync` no-cache, `findOne` O(N), `appendChild` AutoLayout recomputation, per-call ~5–10s timeout).
|
|
89
|
+
- `reference/mcp-budget.default.json` + `reference/schemas/mcp-budget.schema.json` — defaults: `max_calls_per_task: 30`, `max_consecutive_timeouts: 3`, `reset_on_success: true`, tracked tools `mcp__*use_figma | use_paper | use_pencil`.
|
|
90
|
+
- `agents/design-figma-writer` Step 0.5 **Authoring-Intent Guard** — bilingual EN/RU pattern set classifies invocations as author-intent vs decision-intent. Author-intent STOPs with a redirect to `figma:figma-generate-design` and cites the 4 pitfalls. Decision-intent proceeds. Bumped `size_budget` LARGE → XL.
|
|
91
|
+
- `hooks/gdd-mcp-circuit-breaker.js` — PostToolUse on `mcp__*use_figma | use_paper | use_pencil`. Appends `{ts, tool, outcome, consecutive_timeouts, total_calls}` rows to `.design/telemetry/mcp-budget.jsonl`. Breaks with `{continue:false}` at threshold + appends a STATE.md blocker.
|
|
92
|
+
- README.md + `connections/figma.md` gain the authoring-redirect callout + 4-pitfalls summary.
|
|
93
|
+
|
|
94
|
+
**Tests** (8 new files, ~60 new assertions):
|
|
95
|
+
- `bash-guard`, `protected-paths`, `blast-radius`, `decision-injector`, `reference-registry`, `meta-rules-split`, `figma-authoring-guard`, `mcp-circuit-breaker` all added. `read-injection-scanner.test.cjs` extended with bidi-override + HTML-comment hijack + secret-exfil + benign-regression cases.
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- `agents/design-executor.md` — new Preflight Blast-Radius Check + MCP Budget sections.
|
|
100
|
+
- `agents/design-figma-writer.md` — Step 0.5 Authoring-Intent Guard; `size_budget: XL`.
|
|
101
|
+
- `reference/shared-preamble.md` — rewritten as L0 aggregator.
|
|
102
|
+
- `scripts/build-intel.cjs` — registry round-trip on `reference/**` changes.
|
|
103
|
+
- `skills/{progress,resume,reflect,pause}/SKILL.md` — import `reference/retrieval-contract.md` (+ `cycle-handoff-preamble.md` for pause + resume).
|
|
104
|
+
- `hooks/hooks.json` — registers bash-guard, protected-paths, decision-injector, MCP circuit-breaker.
|
|
105
|
+
- Plugin manifests — add `safety-hardening`, `protected-paths`, `decision-injector`, `reference-registry`, `mcp-circuit-breaker` keywords.
|
|
106
|
+
- `tests/semver-compare.test.cjs` — `1.14.6` added to `OFF_CADENCE_VERSIONS`.
|
|
107
|
+
|
|
108
|
+
### Security
|
|
109
|
+
|
|
110
|
+
- Bash guard normalizes Unicode (NFKC + strip zero-width + bidi) and ANSI escapes before pattern match — blocks bidi-override obfuscation, zero-width-injected verbs, and ANSI-colored reformulations.
|
|
111
|
+
- Read-injection scanner flags invisible-Unicode sequences, HTML-comment hijacks, and secret-exfil triggers (7 → 22 patterns).
|
|
112
|
+
- Protected-paths enforces a merge-only glob list — user configs cannot reduce the default-protected set.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
7
116
|
## [1.14.5] — 2026-04-23
|
|
8
117
|
|
|
9
118
|
### Fixed — Preview MCP silently skipped in verify even when available ([#19](https://github.com/hegemonart/get-design-done/issues/19))
|
package/README.md
CHANGED
|
@@ -101,6 +101,16 @@ That's it. The installer writes a `get-design-done` marketplace entry and enable
|
|
|
101
101
|
|
|
102
102
|
On first Claude Code launch after install, a `SessionStart` bootstrap hook provisions the companion reference library `~/.claude/libs/awesome-design-md` (idempotent — subsequent sessions run `git pull --ff-only`).
|
|
103
103
|
|
|
104
|
+
### First run — `/gdd:start` *(v1.14.7+)*
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
/gdd:start
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run this once in any frontend repo. The skill asks five short questions, scans your `components/` directory (with framework-aware fallback for `src/components/`, `app/components/`, `packages/ui/`, `apps/*/components/`), and writes `.design/START-REPORT.md` with three concrete findings — each with file:line evidence — plus one `best_first_proof` and a single suggested next command. Takes ≤5 minutes, never touches source code, and never enters the pipeline state machine.
|
|
111
|
+
|
|
112
|
+
A one-line SessionStart nudge surfaces `/gdd:start` in fresh repos; run `/gdd:start --dismiss-nudge` to silence it per install.
|
|
113
|
+
|
|
104
114
|
### Non-interactive install (CI, Docker, scripts)
|
|
105
115
|
|
|
106
116
|
```bash
|
|
@@ -489,6 +499,21 @@ See [`connections/magic-patterns.md`](connections/magic-patterns.md) for probe p
|
|
|
489
499
|
|
|
490
500
|
---
|
|
491
501
|
|
|
502
|
+
## Safety + Recall Floor
|
|
503
|
+
|
|
504
|
+
Starting with v1.14.6, GDD ships three defense-in-depth hooks, the first cross-cycle recall primitive, and a typed reference index:
|
|
505
|
+
|
|
506
|
+
- **Bash guard** (`hooks/gdd-bash-guard.js`) — PreToolUse:Bash blocks ~45 dangerous shell patterns after Unicode NFKC + ANSI + zero-width/bidi normalization, so `rm\u200B -rf /`, bidi-override obfuscations, and hex-encoded exec sequences fail closed.
|
|
507
|
+
- **Protected paths** (`hooks/gdd-protected-paths.js`) — PreToolUse:Edit|Write|Bash refuses to mutate `reference/**`, `skills/**`, `commands/**`, `hooks/**`, `.design/archive/**`, `.design/config.json`, `.design/telemetry/**`, `.git/**`, both plugin manifests, and anything the user appends under `.design/config.json.protected_paths` (merge-only — user configs cannot reduce the default set).
|
|
508
|
+
- **Blast-radius preflight** (`scripts/lib/blast-radius.cjs`) — `design-executor` refuses tasks above `.design/config.json.blast_radius.max_files_per_task` (default 10), `max_lines_per_task` (default 400), or `max_mcp_calls_per_task` (default 30); writes a blocker to STATE.md with a diff summary.
|
|
509
|
+
- **Decision-injector** (`hooks/gdd-decision-injector.js`) — PreToolUse:Read on any `.design/**.md | reference/**.md | .planning/**.md` ≥ 1500 bytes surfaces the top-15 matching D-XX decisions, L-NN learnings, and prior-cycle summary excerpts that reference the opened file. Grep backend; Phase 19.5 upgrades to FTS5 transparently.
|
|
510
|
+
|
|
511
|
+
**Reference index** — `reference/registry.json` (schema: `reference/registry.schema.json`) indexes every `reference/*.md` by typed category (`heuristic | preamble | motion | defaults | meta-rules | …`). Agents can query `list({type: "heuristic"})` instead of grep-hunting import strings. `scripts/build-intel.cjs` enforces round-trip on every `reference/**` change: missing entries, dangling entries, and duplicates fail the build.
|
|
512
|
+
|
|
513
|
+
**L0/L2 cache-locality split** — the 5 framework-invariant rules (Required Reading Discipline, Writes Protocol, Deviation Handling, Completion Markers, Context-Exhaustion & Budget Awareness) now live in `reference/meta-rules.md` (tier L0). `reference/shared-preamble.md` becomes an L0 aggregator importing `meta-rules.md` first, so Phase 15+ L2 churn (heuristics, anti-patterns, checklists) no longer invalidates the L0 prompt-cache prefix.
|
|
514
|
+
|
|
515
|
+
**Figma authoring-redirect** — `/gdd:figma-write` is a decision-writer (annotations, token bindings, Code Connect, implementation-status). For authoring new Figma content (create pages, populate library components, build layouts from scratch), use `figma:figma-generate-design` from the Figma plugin — it runs outside the Figma plugin sandbox. `design-figma-writer` Step 0.5 detects author-intent (EN + RU) and emits a bilingual redirect citing the four sandbox pitfalls in `reference/figma-sandbox.md`. The MCP circuit-breaker (`hooks/gdd-mcp-circuit-breaker.js`) caps `use_figma | use_paper | use_pencil` at 30 calls/task and 3 consecutive timeouts by default (see `reference/mcp-budget.default.json`), logging per-call JSONL at `.design/telemetry/mcp-budget.jsonl`.
|
|
516
|
+
|
|
492
517
|
## Commands
|
|
493
518
|
|
|
494
519
|
All commands use the `/gdd:` namespace.
|
|
@@ -510,6 +535,7 @@ All commands use the `/gdd:` namespace.
|
|
|
510
535
|
|
|
511
536
|
| Command | What it does |
|
|
512
537
|
|---------|--------------|
|
|
538
|
+
| `/gdd:start [--budget] [--skip-interview] [--dismiss-nudge]` | First-Run Proof Path — scans UI code, emits `.design/START-REPORT.md`, never enters pipeline state |
|
|
513
539
|
| `/gdd:new-project [--name]` | Initialize project — PROJECT.md + STATE.md + cycle-1 |
|
|
514
540
|
| `/gdd:new-cycle [<goal>]` | Start new design cycle |
|
|
515
541
|
| `/gdd:complete-cycle [<note>]` | Archive cycle to `.design/archive/cycle-N/` |
|
|
@@ -621,6 +647,8 @@ claude mcp add --transport http figma https://mcp.figma.com/mcp
|
|
|
621
647
|
|
|
622
648
|
Setup: [`connections/figma.md`](connections/figma.md). If you previously registered the remote MCP with the legacy URL `https://mcp.figma.com/v1/sse`, remove and re-add with the current URL `https://mcp.figma.com/mcp` (Streamable HTTP).
|
|
623
649
|
|
|
650
|
+
> ⚠︎ **Authoring new Figma content?** `/gdd:figma-write` is a *decision-writer* (annotations, token bindings, Code Connect). For **creating pages, populating with library components, building doc layouts from scratch**, use `figma:figma-generate-design` from the Figma plugin — it runs outside the plugin sandbox. See [`reference/figma-sandbox.md`](reference/figma-sandbox.md) for the four sandbox pitfalls the MCP circuit-breaker (`hooks/gdd-mcp-circuit-breaker.js`) protects you from (defaults: 30 calls/task, 3 consecutive timeouts → break).
|
|
651
|
+
|
|
624
652
|
### Refero MCP
|
|
625
653
|
|
|
626
654
|
When Refero is active, `explore` pulls visual references to ground design decisions. Requires an API token in `~/.claude.json`:
|
package/SKILL.md
CHANGED
|
@@ -45,6 +45,7 @@ Each stage produces artifacts in `.design/` inside the current project.
|
|
|
45
45
|
| `pause [context]` | `get-design-done:gdd-pause` | Write session handoff to `.design/HANDOFF.md` |
|
|
46
46
|
| `resume` | `get-design-done:gdd-resume` | Restore session context from `.design/HANDOFF.md` and route to next step |
|
|
47
47
|
| **Lifecycle** | | |
|
|
48
|
+
| `start [--budget <t>] [--skip-interview] [--dismiss-nudge]` | `get-design-done:start` | First-Run Proof Path — scans UI code, returns one concrete first fix. No STATE.md writes. |
|
|
48
49
|
| `new-project [--name <n>]` | `get-design-done:gdd-new-project` | Initialize project — PROJECT.md + STATE.md + cycle-1 |
|
|
49
50
|
| `new-cycle [<goal>]` | `get-design-done:gdd-new-cycle` | Start a new design cycle; writes `.design/CYCLES.md` entry |
|
|
50
51
|
| `complete-cycle [<note>]` | `get-design-done:gdd-complete-cycle` | Archive cycle artifacts to `.design/archive/cycle-N/`; reset STATE.md |
|
|
@@ -205,6 +206,7 @@ If `$ARGUMENTS` is a stage or command name — invoke it directly, no state chec
|
|
|
205
206
|
/gdd:pause → Skill("get-design-done:gdd-pause")
|
|
206
207
|
/gdd:resume → Skill("get-design-done:gdd-resume")
|
|
207
208
|
# --- Lifecycle ---
|
|
209
|
+
/gdd:start → Skill("get-design-done:start") # leaf command, no STATE.md
|
|
208
210
|
/gdd:new-project → Skill("get-design-done:gdd-new-project")
|
|
209
211
|
/gdd:new-cycle → Skill("get-design-done:gdd-new-cycle")
|
|
210
212
|
/gdd:complete-cycle → Skill("get-design-done:gdd-complete-cycle")
|
|
@@ -39,6 +39,47 @@ The orchestrating stage supplies a `<required_reading>` block in the prompt. Rea
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## Preflight — Blast-Radius Check
|
|
43
|
+
|
|
44
|
+
Before the FIRST Edit/Write of this task, run a blast-radius preflight:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const { estimate, formatDiffSummary, loadConfig } = require('scripts/lib/blast-radius.cjs');
|
|
48
|
+
const cfg = loadConfig();
|
|
49
|
+
const result = estimate({
|
|
50
|
+
touchedPaths: <paths this task declares>,
|
|
51
|
+
diffStats: { insertions: <estimate>, deletions: <estimate> },
|
|
52
|
+
config: cfg,
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Ceilings** (defaults; user may override in `.design/config.json.blast_radius`):
|
|
57
|
+
- `max_files_per_task: 10`
|
|
58
|
+
- `max_lines_per_task: 400`
|
|
59
|
+
- `max_mcp_calls_per_task: 30` (see MCP Budget section)
|
|
60
|
+
|
|
61
|
+
**If `result.exceeds === true`:** STOP. Do NOT Edit/Write. Append `formatDiffSummary({touchedPaths, diffStats, result})` to `.design/STATE.md` under a new blocker line, then emit a structured deviation:
|
|
62
|
+
|
|
63
|
+
> Rule 3 — Blast-Radius Exceeds: this task would touch `<files>` files / `<lines>` lines, above the per-task ceiling. Proposed split: <suggest 2–3 sub-tasks that each stay under the limit>. User must explicitly approve a single ceiling raise or accept the split.
|
|
64
|
+
|
|
65
|
+
Proceed only after the user confirms. The preflight is skipped entirely when both ceilings are set to `0` in config.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## MCP Budget — Per-Task
|
|
70
|
+
|
|
71
|
+
Before every `mcp__*use_figma`, `mcp__*use_paper`, `mcp__*use_pencil`, or equivalent mutation-side MCP call, check the rolling counter:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
const { estimateMCPCalls, loadConfig } = require('scripts/lib/blast-radius.cjs');
|
|
75
|
+
const r = estimateMCPCalls({ toolCalls: <calls-issued-so-far>, config: loadConfig() });
|
|
76
|
+
if (r.exceeds) STOP;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The MCP circuit-breaker (`hooks/gdd-mcp-circuit-breaker.js`) enforces the same ceiling at the tool boundary; the preflight here avoids wasting a MCP round-trip before the hook blocks you. Surface in `/gdd:stats` as "MCP calls this task: N/limit".
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
42
83
|
## Prompt Context Fields
|
|
43
84
|
|
|
44
85
|
The stage embeds the following fields in the prompt. Use them to locate and execute the correct task:
|
|
@@ -6,7 +6,7 @@ color: purple
|
|
|
6
6
|
model: inherit
|
|
7
7
|
default-tier: sonnet
|
|
8
8
|
tier-rationale: "Writer proposes + executes Figma write-backs — Sonnet handles structured proposal synthesis well"
|
|
9
|
-
size_budget:
|
|
9
|
+
size_budget: XL
|
|
10
10
|
parallel-safe: never
|
|
11
11
|
typical-duration-seconds: 120
|
|
12
12
|
reads-only: false
|
|
@@ -40,6 +40,66 @@ Note: the remote Figma MCP (canonical server name `figma`, URL `https://mcp.figm
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
+
## Step 0.5 — Authoring-Intent Guard
|
|
44
|
+
|
|
45
|
+
BEFORE proceeding to Step 1, analyze the invocation text (prompt + task description + any user-facing message in the agent dispatch) for **authoring-intent**. `design-figma-writer` is a *decision-writer* (annotations, token bindings, Code Connect, implementation-status). When the user wants to *author* new Figma content (create pages, populate with library components, build doc layouts from scratch), the correct tool is `figma:figma-generate-design` from the Figma plugin — it runs outside the sandbox and has no per-call timeout.
|
|
46
|
+
|
|
47
|
+
Apply the patterns below (case-insensitive, whitespace-tolerant). If ANY author-intent pattern matches AND NO decision-intent pattern dominates the text, STOP with the redirect response and do not proceed to the remote-MCP probe or any `use_figma` call.
|
|
48
|
+
|
|
49
|
+
**Author-intent patterns (EN):**
|
|
50
|
+
- `create .{0,30}(page|file|frame|layout|doc)`
|
|
51
|
+
- `(populate|fill|build) .{0,40}(with )?(components|library)`
|
|
52
|
+
- `(author|write|generate|produce|build) .{0,30}(doc|documentation|spec|design)`
|
|
53
|
+
- `make .{0,30}(layout|frame|page|template)`
|
|
54
|
+
- `spin up .{0,30}Figma`
|
|
55
|
+
- `design .{0,30}(page|doc|spec|layout) .{0,20}(from|in) (scratch|Figma)`
|
|
56
|
+
|
|
57
|
+
**Author-intent patterns (RU):**
|
|
58
|
+
- `(создай|сделай|построй|свёрстай|собери|оформи) .{0,30}(страниц|макет|документац|страницу|документ|файл|лейаут|шаблон)`
|
|
59
|
+
- `(новую?|новый) страниц[уыа]`
|
|
60
|
+
- `документац[иия] .{0,40}токен`
|
|
61
|
+
- `сгенерируй .{0,30}Figma`
|
|
62
|
+
|
|
63
|
+
**Decision-intent patterns (EN) — these WIN over ambiguous author-intent:**
|
|
64
|
+
- `annotate .{0,30}(selection|frame|component)`
|
|
65
|
+
- `bind .{0,30}token`
|
|
66
|
+
- `code connect`
|
|
67
|
+
- `code-connect`
|
|
68
|
+
- `update .{0,30}(status|implementation)`
|
|
69
|
+
- `write .{0,30}D-\d+`
|
|
70
|
+
- `sync .{0,30}(tokens?|variables?)`
|
|
71
|
+
|
|
72
|
+
**Decision-intent patterns (RU):**
|
|
73
|
+
- `привяжи .{0,30}токен`
|
|
74
|
+
- `аннотируй`
|
|
75
|
+
- `синхронизируй .{0,30}токен`
|
|
76
|
+
|
|
77
|
+
### Decision rule
|
|
78
|
+
- If decision-intent matches AND author-intent doesn't match, proceed normally.
|
|
79
|
+
- If author-intent matches AND NO decision-intent match, STOP with redirect.
|
|
80
|
+
- If BOTH match (mixed), favor decision-intent (the guard is permissive; the circuit-breaker catches runaway cases downstream).
|
|
81
|
+
- If NEITHER matches, proceed normally (default is decision-writing — the guard doesn't block the common case).
|
|
82
|
+
|
|
83
|
+
### Redirect response (emit verbatim and STOP)
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
This task reads as authoring new Figma content. `design-figma-writer` is a decision-writer — it uses `use_figma` inside the Figma plugin sandbox with ~5–10s per-call timeout, so multi-row docs-authoring hill-climbs against the timeout and burns MCP quota.
|
|
87
|
+
|
|
88
|
+
Use `figma:figma-generate-design` from the Figma plugin instead — it runs outside the sandbox and has no per-call timeout.
|
|
89
|
+
|
|
90
|
+
Four sandbox pitfalls you would hit here on raw `use_figma` calls:
|
|
91
|
+
1. `loadFontAsync` does not cache across calls — preload once, clone existing nodes.
|
|
92
|
+
2. `figma.root.findOne()` is O(tree-size) — pass node IDs and use `getNodeById`.
|
|
93
|
+
3. `appendChild` on large trees forces full AutoLayout recomputation — build subtrees off-tree.
|
|
94
|
+
4. Per-call timeout is ~5–10s — budget ≤2 row-equivalents per call.
|
|
95
|
+
|
|
96
|
+
See `reference/figma-sandbox.md`.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
After emitting the redirect, STOP with the marker `## FIGMA AUTHORING-INTENT REDIRECT` and do NOT proceed to Step 1.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
43
103
|
## Step 1 — Read State and Flags
|
|
44
104
|
|
|
45
105
|
Read `.design/STATE.md` to confirm `figma: available` in the `<connections>` block. If `figma: not_configured` or `figma: unavailable`, write to output: "Figma connection not configured. Run the scan probe or set figma: available in .design/STATE.md." and STOP.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-start-writer
|
|
3
|
+
description: "Writes .design/START-REPORT.md — 7 fixed sections plus a machine-readable JSON block. Consumes the findings-engine output, interview answers, and detection result from .design/.start-context.json. Never writes STATE.md. Parameter-free: reads the context JSON path from the prompt and emits the report."
|
|
4
|
+
tools: Read, Write, Grep, Glob
|
|
5
|
+
color: green
|
|
6
|
+
|
|
7
|
+
model: haiku
|
|
8
|
+
default-tier: haiku
|
|
9
|
+
tier-rationale: "Formatting + light synthesis over a bounded ~3KB input; Haiku is the correct tier per Phase 10.1 D-14 (Haiku = writers/formatters with fixed schemas)."
|
|
10
|
+
|
|
11
|
+
parallel-safe: always
|
|
12
|
+
typical-duration-seconds: 10
|
|
13
|
+
reads-only: false
|
|
14
|
+
writes:
|
|
15
|
+
- ".design/START-REPORT.md"
|
|
16
|
+
|
|
17
|
+
allowed-read-paths:
|
|
18
|
+
- ".design/.start-context.json"
|
|
19
|
+
- ".design/START-REPORT.md"
|
|
20
|
+
allowed-write-paths:
|
|
21
|
+
- ".design/START-REPORT.md"
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Role
|
|
25
|
+
|
|
26
|
+
Write `.design/START-REPORT.md` for `/gdd:start`. The report is the single artifact the user sees after a first-run scan. It must feel like GDD understood the project, not like it printed a generic checklist. One best_first_proof, one suggested next command, no ambiguity.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Required Reading
|
|
31
|
+
|
|
32
|
+
- `.design/.start-context.json` — produced by `skills/start/SKILL.md` before spawning this agent. Contains detection result, interview answers, and the findings-engine output.
|
|
33
|
+
|
|
34
|
+
## Inputs
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"schema_version": "1.0",
|
|
39
|
+
"detected": {
|
|
40
|
+
"kind": "next-app-router | src-components | monorepo-ui-pkg | ...",
|
|
41
|
+
"path": "relative/path/to/components",
|
|
42
|
+
"framework": "next | vite | cra | ...",
|
|
43
|
+
"design_system": "tailwind | css-modules | ...",
|
|
44
|
+
"confidence": 0.85
|
|
45
|
+
},
|
|
46
|
+
"interview": {
|
|
47
|
+
"pain": "free text or empty",
|
|
48
|
+
"target_area": "relative/path",
|
|
49
|
+
"budget": "fast | balanced | thorough",
|
|
50
|
+
"framework_confirmed": true,
|
|
51
|
+
"design_system_confirmed": true,
|
|
52
|
+
"figma_workflow": "figma | canvas | neither | skip"
|
|
53
|
+
},
|
|
54
|
+
"scan": {
|
|
55
|
+
"findings": [{"id":"F1","category":"transition-all","title":"...","file":"...","line":123,"severity":"minor","evidence":"...","visibleDelta":true,"blastRadius":"single-file"}],
|
|
56
|
+
"bestFirstProofId": "F1",
|
|
57
|
+
"partial": false,
|
|
58
|
+
"inspected": {"files": 42, "root": "..."}
|
|
59
|
+
},
|
|
60
|
+
"generated_at": "2026-04-24T01:00:00Z"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Output contract
|
|
67
|
+
|
|
68
|
+
Write `.design/START-REPORT.md` exactly matching this shape. **All seven H2 sections must be present, in this order, even if empty.** The JSON block at the very end is mandatory.
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# GDD First-Run Report
|
|
72
|
+
|
|
73
|
+
> Generated <generated_at> by `/gdd:start`. This report does not start a pipeline cycle — it is a 0→1 proof path. Run the suggested next command to continue.
|
|
74
|
+
|
|
75
|
+
## What I inspected
|
|
76
|
+
|
|
77
|
+
- **UI root:** `<detected.path>` (`<detected.kind>`, confidence `<detected.confidence>`)
|
|
78
|
+
- **Framework:** `<detected.framework>` — <one-sentence confirmation or override note>
|
|
79
|
+
- **Design system:** `<detected.design_system>` — <one-sentence note>
|
|
80
|
+
- **Files scanned:** `<scan.inspected.files>`
|
|
81
|
+
- **Pain hint:** <`interview.pain` or "none given">
|
|
82
|
+
- **Budget:** `<interview.budget>` <"(timed out — partial scan)" if `scan.partial`>
|
|
83
|
+
|
|
84
|
+
## Three findings
|
|
85
|
+
|
|
86
|
+
<For each finding F1..F3, emit:>
|
|
87
|
+
|
|
88
|
+
### <Fn> — <title>
|
|
89
|
+
|
|
90
|
+
**Severity:** `<severity>` · **Evidence:** `<file>:<line>` · **Blast radius:** `<blastRadius>`
|
|
91
|
+
|
|
92
|
+
<one-sentence plain-English rationale pointing at the evidence line>
|
|
93
|
+
|
|
94
|
+
**Fix sketch:** <one-sentence concrete fix — e.g., "Replace `transition` with `transition-transform` on the wrapper.">
|
|
95
|
+
|
|
96
|
+
<End per-finding block>
|
|
97
|
+
|
|
98
|
+
## Best first proof
|
|
99
|
+
|
|
100
|
+
**Pick:** `<bestFirstProofId>` — <re-state the finding title>
|
|
101
|
+
|
|
102
|
+
<one paragraph: why this one. Cite the rubric condition that tipped the pick — single-file, non-ambiguous, visible delta, no token migration, low blast radius. If `bestFirstProofId` is null, write: "No finding qualified for a single-command fix under the safe-fix rubric — the report recommends the pipeline entry point below instead.">
|
|
103
|
+
|
|
104
|
+
## Suggested next command
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
<exact command — one of:>
|
|
108
|
+
/gdd:fast "<concrete description of the single fix>"
|
|
109
|
+
/gdd:brief
|
|
110
|
+
/gdd:scan
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<one-line rationale: why this command and not the others.>
|
|
114
|
+
|
|
115
|
+
## Visual Proof Readiness
|
|
116
|
+
|
|
117
|
+
| Surface | Status | Unlock |
|
|
118
|
+
|---------|--------|--------|
|
|
119
|
+
| Preview MCP | <ok \| unconfigured \| unavailable> | <`/gdd:connections preview` or "already configured"> |
|
|
120
|
+
| Storybook | <…> | <…> |
|
|
121
|
+
| Figma | <…> | <`/gdd:connections figma` or "already configured"> |
|
|
122
|
+
| Canvas (.canvas) | <…> | <…> |
|
|
123
|
+
|
|
124
|
+
<one-line note if `interview.figma_workflow` picked a specific surface — nudge toward that one first.>
|
|
125
|
+
|
|
126
|
+
## Full pipeline path
|
|
127
|
+
|
|
128
|
+
If you want more than a single fix, the full pipeline would do this on this project: `/gdd:brief` to capture the design problem, `/gdd:explore` to inventory your components and interview for context, `/gdd:plan` to decompose the work, `/gdd:design` to execute, and `/gdd:verify` to score the result. The pipeline writes `.design/STATE.md` and runs across a real design cycle.
|
|
129
|
+
|
|
130
|
+
## Connections / writeback optional
|
|
131
|
+
|
|
132
|
+
If you want to push design decisions back into Figma, paper.design, pencil.dev, or a Claude Design handoff bundle, run `/gdd:connections` to wire up the surfaces. Writeback is never required — the pipeline runs code-first by default.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"schema_version": "1.0",
|
|
139
|
+
"generated_at": "<ISO-8601>",
|
|
140
|
+
"detected": {...copy verbatim from context...},
|
|
141
|
+
"findings": [...copy findings array with id, title, file, line, severity, category, blast_radius...],
|
|
142
|
+
"best_first_proof": "<bestFirstProofId or null>",
|
|
143
|
+
"suggested_command": { "kind": "fast|brief|scan", "text": "<exact command>" },
|
|
144
|
+
"visual_proof_readiness": { "preview": "...", "storybook": "...", "figma": "...", "canvas": "..." }
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Section-by-section rules
|
|
152
|
+
|
|
153
|
+
### What I inspected
|
|
154
|
+
|
|
155
|
+
- Always list the six bullets. Mark "(timed out — partial scan)" only when `scan.partial === true`.
|
|
156
|
+
- Never invent fields — only surface what is in the context JSON.
|
|
157
|
+
|
|
158
|
+
### Three findings
|
|
159
|
+
|
|
160
|
+
- Emit up to three entries. If fewer than three findings exist, emit what exists and add one italic note below: `> Only <N> finding raised — the engine did not hit its cap.`
|
|
161
|
+
- Every finding block includes the evidence file:line. No finding may omit file:line.
|
|
162
|
+
- Fix sketch is one concrete sentence — not a general principle, not a tutorial.
|
|
163
|
+
|
|
164
|
+
### Best first proof
|
|
165
|
+
|
|
166
|
+
- Reference `bestFirstProofId` exactly. If it is null, write the fallback paragraph.
|
|
167
|
+
- Cite which rubric conditions the winning finding satisfies.
|
|
168
|
+
|
|
169
|
+
### Suggested next command
|
|
170
|
+
|
|
171
|
+
- If `bestFirstProofId` is non-null → emit `/gdd:fast "<task>"` where `<task>` is a one-line description tied to the finding's fix sketch.
|
|
172
|
+
- If `bestFirstProofId` is null AND there are findings → emit `/gdd:brief` with rationale "the findings need a design decision the rubric cannot make for you."
|
|
173
|
+
- If no findings at all → emit `/gdd:scan` with rationale "this codebase looks healthy at first glance — a full audit confirms."
|
|
174
|
+
|
|
175
|
+
### Visual Proof Readiness
|
|
176
|
+
|
|
177
|
+
- Always include all four rows. Unknown surfaces default to `unconfigured`.
|
|
178
|
+
- Check `interview.figma_workflow` — if the user picked `figma`, `canvas`, or `neither`, phrase the unlock line to match.
|
|
179
|
+
|
|
180
|
+
### Full pipeline path
|
|
181
|
+
|
|
182
|
+
- Keep the paragraph short — one sentence of what the pipeline does plus the command sequence. Do not rephrase per run.
|
|
183
|
+
|
|
184
|
+
### Connections / writeback optional
|
|
185
|
+
|
|
186
|
+
- Keep the paragraph short. Never assert which surface is best; point at `/gdd:connections`.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## JSON block
|
|
191
|
+
|
|
192
|
+
The JSON block at the bottom is the contract future `/gdd:fast` / `/gdd:do` invocations will consume. Shape:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"schema_version": "1.0",
|
|
197
|
+
"generated_at": "ISO-8601",
|
|
198
|
+
"detected": { "root", "kind", "framework", "design_system", "confidence" },
|
|
199
|
+
"findings": [{ "id", "title", "file", "line", "severity", "category", "blast_radius" }],
|
|
200
|
+
"best_first_proof": "F1" | null,
|
|
201
|
+
"suggested_command": { "kind": "fast" | "brief" | "scan", "text": "/gdd:fast \"...\"" },
|
|
202
|
+
"visual_proof_readiness": { "preview", "storybook", "figma", "canvas" }
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
- Finding IDs stay stable `F1`..`F3`.
|
|
207
|
+
- `text` is always a ready-to-run command, single-line.
|
|
208
|
+
- All string values are JSON-safe — escape embedded quotes.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Do Not
|
|
213
|
+
|
|
214
|
+
- Do not write `.design/STATE.md`, `.design/config.json`, or any source file.
|
|
215
|
+
- Do not invent findings that are not in the context JSON.
|
|
216
|
+
- Do not re-score or re-rank findings — the engine already picked `bestFirstProofId` deterministically.
|
|
217
|
+
- Do not add marketing prose, emojis, or playful copy.
|
|
218
|
+
- Do not emit more than three findings.
|
|
219
|
+
- Do not omit any of the seven H2 sections — even empty, they must exist for downstream regression fixtures.
|
|
220
|
+
|
|
221
|
+
## START-WRITER COMPLETE
|
package/connections/figma.md
CHANGED
|
@@ -63,6 +63,16 @@ No data is lost — the remote MCP reads the same Figma files.
|
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
66
|
+
> ⚠︎ **Authoring-redirect** — `/gdd:figma-write` (and the `design-figma-writer` agent behind it) is a *decision-writer*: annotations, token bindings, Code Connect mappings, implementation-status write-back. For **authoring new Figma content** — create pages, populate with library components, build doc layouts from scratch — use `figma:figma-generate-design` from the Figma plugin. It runs outside the plugin sandbox and has no per-call timeout.
|
|
67
|
+
>
|
|
68
|
+
> **Four sandbox pitfalls `use_figma` hits in authoring loops (see `reference/figma-sandbox.md`):**
|
|
69
|
+
> 1. `loadFontAsync` does not cache across calls — preload once, clone existing nodes.
|
|
70
|
+
> 2. `figma.root.findOne()` is O(tree-size) — pass node IDs and use `getNodeById`.
|
|
71
|
+
> 3. `appendChild` on large trees forces full AutoLayout recomputation — build subtrees off-tree.
|
|
72
|
+
> 4. Per-call timeout is ~5–10s — budget ≤2 row-equivalents per call for docs-authoring.
|
|
73
|
+
>
|
|
74
|
+
> The MCP circuit-breaker (`hooks/gdd-mcp-circuit-breaker.js`) enforces a per-task ceiling of 30 calls and 3 consecutive timeouts by default; see `reference/mcp-budget.default.json`.
|
|
75
|
+
|
|
66
76
|
## Tools
|
|
67
77
|
|
|
68
78
|
Tool names take the form `mcp__<prefix>__<tool>` where `<prefix>` is the resolved server name from the probe (commonly `figma` for remote or `figma-desktop` for local). The pipeline discovers the prefix at runtime — see **Availability Probe** below. The `mcp__figma__` examples shown here assume a server registered as `figma`.
|