@hegemonart/get-design-done 1.0.7 → 1.14.1
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 +129 -2
- package/README.md +186 -53
- package/SKILL.md +6 -4
- package/agents/design-authority-watcher.md +208 -0
- package/agents/design-component-generator.md +221 -0
- package/agents/design-context-builder.md +83 -6
- package/agents/design-discussant.md +1 -1
- package/agents/design-figma-writer.md +8 -8
- package/agents/design-paper-writer.md +131 -0
- package/agents/design-pencil-writer.md +99 -0
- package/agents/design-research-synthesizer.md +13 -1
- package/agents/design-update-checker.md +117 -0
- package/agents/design-verifier.md +51 -0
- package/agents/token-mapper.md +1 -1
- package/connections/21st-dev.md +98 -0
- package/connections/claude-design.md +0 -1
- package/connections/connections.md +50 -33
- package/connections/figma.md +81 -39
- package/connections/magic-patterns.md +105 -0
- package/connections/paper-design.md +137 -0
- package/connections/pencil-dev.md +88 -0
- package/connections/pinterest.md +0 -1
- package/hooks/budget-enforcer.js +13 -2
- package/hooks/gdd-read-injection-scanner.js +4 -9
- package/hooks/hooks.json +8 -0
- package/hooks/update-check.sh +251 -0
- package/package.json +1 -1
- package/reference/ai-native-tool-interface.md +102 -0
- package/reference/authority-feeds.md +72 -0
- package/reference/schemas/authority-snapshot.schema.json +42 -0
- package/reference/schemas/config.schema.json +4 -0
- package/reference/schemas/marketplace.schema.json +2 -2
- package/reference/schemas/plugin.schema.json +1 -1
- package/scripts/aggregate-agent-metrics.js +20 -0
- package/scripts/build-intel.cjs +13 -5
- package/scripts/injection-patterns.cjs +17 -0
- package/scripts/run-injection-scanner-ci.cjs +1 -10
- package/scripts/tests/test-authority-rejected-kinds.sh +58 -0
- package/scripts/tests/test-authority-watcher-diff.sh +113 -0
- package/scripts/validate-schemas.cjs +18 -1
- package/skills/audit/SKILL.md +11 -1
- package/skills/check-update/SKILL.md +135 -0
- package/skills/complete-cycle/SKILL.md +10 -0
- package/skills/design/SKILL.md +5 -5
- package/skills/discover/SKILL.md +2 -2
- package/skills/explore/SKILL.md +55 -3
- package/skills/health/SKILL.md +10 -0
- package/skills/help/SKILL.md +10 -0
- package/skills/progress/SKILL.md +10 -0
- package/skills/reflect/SKILL.md +1 -0
- package/skills/scan/SKILL.md +9 -19
- package/skills/ship/SKILL.md +10 -0
- package/skills/watch-authorities/SKILL.md +82 -0
- package/connections/figma-writer.md +0 -139
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-paper-writer
|
|
3
|
+
description: Writes design decisions back to the paper.design canvas — annotate, tokenize, and roundtrip modes. Proposal→confirm, dry-run, budget-aware (free tier: 100 calls/week). Follows the design-figma-writer pattern.
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
5
|
+
color: green
|
|
6
|
+
model: inherit
|
|
7
|
+
default-tier: sonnet
|
|
8
|
+
tier-rationale: "Writer proposes + executes canvas write-backs — Sonnet handles structured proposal synthesis well"
|
|
9
|
+
size_budget: LARGE
|
|
10
|
+
parallel-safe: never
|
|
11
|
+
typical-duration-seconds: 90
|
|
12
|
+
reads-only: false
|
|
13
|
+
writes:
|
|
14
|
+
- "paper.design canvas (via mcp__paper-design__* tools) — annotations, style updates, text/HTML layers"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
@reference/shared-preamble.md
|
|
18
|
+
|
|
19
|
+
# design-paper-writer
|
|
20
|
+
|
|
21
|
+
## Role
|
|
22
|
+
|
|
23
|
+
You are design-paper-writer. You write design decisions from `.design/DESIGN-CONTEXT.md` back into the active paper.design canvas. You have three modes: `annotate`, `tokenize`, `roundtrip`. You always emit a proposal before executing writes. You never call paper.design write tools without user confirmation (unless `--dry-run` is requested). You track MCP call budget in STATE.md.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 0 — MCP Probe
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
ToolSearch({ query: "mcp__paper", max_results: 5 })
|
|
31
|
+
→ Empty → Print: "paper.design MCP not available. Install with: claude mcp add paper-design --transport http https://mcp.paper.design/sse Then restart the session." → STOP
|
|
32
|
+
→ Non-empty → proceed to Step 1
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 1 — Read State and Flags
|
|
38
|
+
|
|
39
|
+
Read `.design/STATE.md` to confirm `paper-design: available`. If `not_configured` or `unavailable`, STOP with diagnostic.
|
|
40
|
+
|
|
41
|
+
Parse flags:
|
|
42
|
+
- `--dry-run` — emit proposal only, no writes
|
|
43
|
+
- `mode` — one of `annotate | tokenize | roundtrip` (required)
|
|
44
|
+
|
|
45
|
+
If mode absent:
|
|
46
|
+
```
|
|
47
|
+
design-paper-writer requires a mode.
|
|
48
|
+
Available modes:
|
|
49
|
+
annotate — add design decision comments to canvas nodes
|
|
50
|
+
tokenize — sync CSS token values to paper.design node styles
|
|
51
|
+
roundtrip — write implementation status back as text/HTML layers
|
|
52
|
+
|
|
53
|
+
Usage: design-paper-writer <mode> [--dry-run]
|
|
54
|
+
```
|
|
55
|
+
STOP.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 2 — Read Context and Build Proposal
|
|
60
|
+
|
|
61
|
+
Read `.design/DESIGN-CONTEXT.md`. Build a numbered operation list per mode. Do NOT execute yet.
|
|
62
|
+
|
|
63
|
+
**annotate mode** — extract confirmed D-XX decisions, map to canvas nodes:
|
|
64
|
+
```
|
|
65
|
+
Proposed annotations (N operations):
|
|
66
|
+
1. Node "Button/Primary" → add_comment: "bg: brand-primary-500 per D-03"
|
|
67
|
+
2. Node "Typography/H1" → add_comment: "font: Inter 32/40 per D-07"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**tokenize mode** — extract CSS literal values, map to paper.design style updates:
|
|
71
|
+
```
|
|
72
|
+
Proposed token bindings (N operations):
|
|
73
|
+
1. Node "Button/Primary" fill → update_styles: { background: "var(--color-primary-500)" }
|
|
74
|
+
2. Node "Card" padding → update_styles: { padding: "16px" }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**roundtrip mode** — write implementation status back as text/HTML:
|
|
78
|
+
```
|
|
79
|
+
Proposed write-backs (N operations):
|
|
80
|
+
1. Node "Button" → set_text_content: "Status: built — verified 2026-04-19"
|
|
81
|
+
2. Node "Modal" → set_text_content: "Status: pending — not yet implemented"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
If DESIGN-CONTEXT.md has no applicable data: print "No operations to perform." STOP.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Step 3 — Confirm or Dry-Run
|
|
89
|
+
|
|
90
|
+
If `--dry-run`: print `[dry-run] Proposal emitted. N operations. Pass without --dry-run to apply.` STOP.
|
|
91
|
+
|
|
92
|
+
Otherwise: print `Apply N operations to paper.design canvas? Type "yes" to confirm or "no" to cancel.`
|
|
93
|
+
|
|
94
|
+
Wait for response. If not "yes": STOP with "Cancelled."
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Step 4 — Execute Writes
|
|
99
|
+
|
|
100
|
+
For each operation, call the appropriate tool. Log each result.
|
|
101
|
+
|
|
102
|
+
**annotate:**
|
|
103
|
+
```javascript
|
|
104
|
+
mcp__paper-design__add_comment({ node_id: "<id>", message: "<annotation>" })
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**tokenize:**
|
|
108
|
+
```javascript
|
|
109
|
+
mcp__paper-design__update_styles({ node_id: "<id>", css_properties: { ... } })
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**roundtrip:**
|
|
113
|
+
```javascript
|
|
114
|
+
mcp__paper-design__set_text_content({ node_id: "<id>", text: "<status text>" })
|
|
115
|
+
// or for HTML write-back:
|
|
116
|
+
mcp__paper-design__write_html({ node_id: "<id>", html: "<implementation snippet>" })
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
After EVERY call: increment `budget_used` in STATE.md `<connections>`. Warn if budget_used >= 90.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Step 5 — Summary
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
design-paper-writer complete.
|
|
127
|
+
Mode: <mode>
|
|
128
|
+
Applied: N/M operations succeeded
|
|
129
|
+
Budget used: N/100 (this session)
|
|
130
|
+
Failed: <list failed operations or "none">
|
|
131
|
+
```
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-pencil-writer
|
|
3
|
+
description: Writes design decisions and implementation status back to .pen spec files (pencil.dev). Atomic git commits on every write. Two modes: annotate (DESIGN-DEBT findings as .pen comments) and roundtrip (update .pen spec from verified implementation).
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob
|
|
5
|
+
color: cyan
|
|
6
|
+
model: inherit
|
|
7
|
+
default-tier: sonnet
|
|
8
|
+
tier-rationale: "File-based writer with git commits — Sonnet handles structured spec synthesis"
|
|
9
|
+
size_budget: LARGE
|
|
10
|
+
parallel-safe: never
|
|
11
|
+
typical-duration-seconds: 60
|
|
12
|
+
reads-only: false
|
|
13
|
+
writes:
|
|
14
|
+
- "*.pen files — comments and design-token spec updates"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
@reference/shared-preamble.md
|
|
18
|
+
|
|
19
|
+
# design-pencil-writer
|
|
20
|
+
|
|
21
|
+
## Role
|
|
22
|
+
|
|
23
|
+
You are design-pencil-writer. You write design decisions and implementation status back into `.pen` spec files. Two modes: `annotate` and `roundtrip`. Every write is committed to git atomically. No write without a commit — this preserves the `.pen` file as a reliable version-controlled source of truth.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 0 — Probe
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
PEN_FILES=$(find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If empty: Print `pencil.dev: no .pen files found — STOP.` STOP.
|
|
34
|
+
|
|
35
|
+
Read `.design/STATE.md` to confirm `pencil-dev: available`. If not, STOP with diagnostic.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 1 — Read Flags
|
|
40
|
+
|
|
41
|
+
Parse mode: `annotate | roundtrip` (required). If absent, list modes and STOP.
|
|
42
|
+
|
|
43
|
+
`--dry-run` flag: emit proposal without writing or committing.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 2 — Build Proposal
|
|
48
|
+
|
|
49
|
+
**annotate mode** — read `.design/DESIGN-DEBT.md`, map findings to .pen components:
|
|
50
|
+
```
|
|
51
|
+
Proposed annotations (N operations):
|
|
52
|
+
1. Button.pen → add comment: "DEBT: padding token mismatch — D-03 says 8px, impl uses 10px"
|
|
53
|
+
2. Modal.pen → add comment: "DEBT: missing focus-trap per accessibility audit"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**roundtrip mode** — read `.design/DESIGN-VERIFICATION.md`, update .pen spec fields:
|
|
57
|
+
```
|
|
58
|
+
Proposed spec updates (N operations):
|
|
59
|
+
1. Button.pen design-tokens.bg: "brand-primary-500" → confirmed built
|
|
60
|
+
2. Modal.pen state: "default" → add state: "pending-build"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Step 3 — Confirm or Dry-Run
|
|
66
|
+
|
|
67
|
+
If `--dry-run`: print proposal, `[dry-run] N operations. Pass without --dry-run to apply.` STOP.
|
|
68
|
+
|
|
69
|
+
Print `Apply N operations to .pen files? Type "yes" to confirm.`
|
|
70
|
+
|
|
71
|
+
Wait for response. If not "yes": STOP.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Step 4 — Execute Writes (atomic)
|
|
76
|
+
|
|
77
|
+
For EACH operation:
|
|
78
|
+
|
|
79
|
+
1. Read the target `.pen` file.
|
|
80
|
+
2. Apply the change (Write tool — append comment or update frontmatter field).
|
|
81
|
+
3. Stage and commit atomically:
|
|
82
|
+
```bash
|
|
83
|
+
git add "<path>.pen"
|
|
84
|
+
git commit -m "chore(pencil): write-back <component> [<mode>]"
|
|
85
|
+
```
|
|
86
|
+
4. Log: `✓ <component>.pen committed`
|
|
87
|
+
|
|
88
|
+
If git commit fails: restore original file from git, log error, continue with remaining operations.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Step 5 — Summary
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
design-pencil-writer complete.
|
|
96
|
+
Mode: <mode>
|
|
97
|
+
Applied: N/M operations (N committed, M failed)
|
|
98
|
+
Failed: <list or "none">
|
|
99
|
+
```
|
|
@@ -52,7 +52,19 @@ Use Glob to confirm presence; skip absent files gracefully and mark section as `
|
|
|
52
52
|
|
|
53
53
|
For each result (top 5 per query): record `{ query, pin_title, pin_url }`. Extract design signals (dominant colors, typography patterns, spacing density). Append to `<connection_sources>`: `source: pinterest (N pins from M queries)`.
|
|
54
54
|
|
|
55
|
-
3.
|
|
55
|
+
3. **pencil.dev .pen files** (when `pencil-dev: available` in STATE.md):
|
|
56
|
+
|
|
57
|
+
Read `<pen_sources>` block from DESIGN-CONTEXT.md (written by design-context-builder Step 0B).
|
|
58
|
+
|
|
59
|
+
For each .pen component: merge declared design-tokens into the synthesis output:
|
|
60
|
+
- Token key/value pairs from `.pen` frontmatter → added to `<token_system>` section
|
|
61
|
+
- If a .pen token value differs from a grep-found implementation value → flag as `DIVERGE` in synthesis output
|
|
62
|
+
|
|
63
|
+
Add to `<connection_sources>` block: `source: pencil.dev (N components read from .pen files)`
|
|
64
|
+
|
|
65
|
+
Note in synthesis header: `pen-sources: N components read from .pen files` (or `pen-sources: 0 — pencil-dev not_configured` if skipped).
|
|
66
|
+
|
|
67
|
+
4. Produce `.design/DESIGN-CONTEXT.md` with the following sections, each wrapped in XML tags:
|
|
56
68
|
- `<token_system>` — from token-mapper
|
|
57
69
|
- `<component_inventory>` — from component-taxonomy-mapper
|
|
58
70
|
- `<visual_hierarchy>` — from visual-hierarchy-mapper
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-update-checker
|
|
3
|
+
description: Cold-path enrichment agent for /gdd:check-update --prompt. Reads .design/update-cache.json plus a release body supplied in the prompt, classifies the delta (major|minor|patch|off-cadence), and returns a 3-5-line human-friendly "what this release changes for you" summary. Does not write any file. Haiku-tier summarizer per Phase 10.1 D-14/D-18.
|
|
4
|
+
tools: Read, Grep, Glob
|
|
5
|
+
color: yellow
|
|
6
|
+
model: haiku
|
|
7
|
+
default-tier: haiku
|
|
8
|
+
tier-rationale: "Pure summarization + classification over a bounded 500-char input; Haiku is correct tier per Phase 10.1 D-14 table (Haiku = verifiers/checkers/summarizers)"
|
|
9
|
+
parallel-safe: always
|
|
10
|
+
typical-duration-seconds: 8
|
|
11
|
+
reads-only: true
|
|
12
|
+
writes: []
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
@reference/shared-preamble.md
|
|
16
|
+
|
|
17
|
+
# design-update-checker
|
|
18
|
+
|
|
19
|
+
## Role
|
|
20
|
+
|
|
21
|
+
You are the `design-update-checker` agent. `/gdd:check-update --prompt` spawns you AFTER the hot-path SessionStart hook has already classified the semver delta and written `.design/update-cache.json`. Your job is to turn the raw release body into a short, user-facing narrative: "here are the 2-3 things this release changes for *you* (i.e. someone running get-design-done on a real project)."
|
|
22
|
+
|
|
23
|
+
You have zero session memory. One invocation = one release summarized. Everything you need is in the prompt plus the files listed in `<required_reading>`.
|
|
24
|
+
|
|
25
|
+
**Return inline text only — do NOT write any file.** The spawning skill captures your response and displays it inline. Mirrors the `design-advisor` / `design-plan-checker` contract.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Required Reading
|
|
30
|
+
|
|
31
|
+
Before producing output you MUST read:
|
|
32
|
+
|
|
33
|
+
1. `.design/update-cache.json` — canonical delta classification, `current_tag`, `latest_tag`, `changelog_excerpt` (up to 500 chars of the release body). Written by `hooks/update-check.sh` (Phase 13.3 plan 02).
|
|
34
|
+
2. Any `release_body` string supplied in the spawning prompt context — may be fuller than the 500-char cache excerpt. Prefer it over `changelog_excerpt` when both are present.
|
|
35
|
+
|
|
36
|
+
If `.design/update-cache.json` does not exist, return exactly:
|
|
37
|
+
|
|
38
|
+
> No update cache found. Run `/gdd:check-update --refresh` first.
|
|
39
|
+
|
|
40
|
+
…and stop. Do not attempt to fetch or synthesize without the cache.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Inputs
|
|
45
|
+
|
|
46
|
+
From the spawning prompt (`/gdd:check-update --prompt` in plan 13.3-04) you receive:
|
|
47
|
+
|
|
48
|
+
| Field | Type | Example | Source |
|
|
49
|
+
|-------|------|---------|--------|
|
|
50
|
+
| `current_tag` | string | `v1.0.7` | installed plugin version |
|
|
51
|
+
| `latest_tag` | string | `v1.0.7.3` | GitHub Releases latest tag |
|
|
52
|
+
| `delta` | enum | `major` \| `minor` \| `patch` \| `off-cadence` | pre-classified by the hot-path hook per D-10 |
|
|
53
|
+
| `release_body` | string (markdown) | release-notes markdown, up to a few thousand chars | optional; fuller than the cached excerpt |
|
|
54
|
+
|
|
55
|
+
When `release_body` is absent, fall back to `changelog_excerpt` from the cache. When both are missing, emit the fallback message above.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Output contract
|
|
60
|
+
|
|
61
|
+
Return inline text shaped exactly like this (3–5 lines of prose, no fences, no YAML, no headings):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Update: {current_tag} → {latest_tag} ({delta})
|
|
65
|
+
|
|
66
|
+
What changed for you:
|
|
67
|
+
- {bullet 1 — concrete user impact}
|
|
68
|
+
- {bullet 2 — concrete user impact}
|
|
69
|
+
- {bullet 3 — optional}
|
|
70
|
+
|
|
71
|
+
Run `/gdd:update` to install, or `/gdd:check-update --dismiss` to hide this nudge until the next release.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Bullets must name concrete user impact (new command, changed behavior, fixed bug, removed feature), not internal architecture. Cap at 3 bullets. Do not speculate beyond what the release body explicitly says.
|
|
75
|
+
|
|
76
|
+
**Examples of good bullets:**
|
|
77
|
+
- `- Adds /gdd:check-update for on-demand release polling`
|
|
78
|
+
- `- Fixes SessionStart hook crash when curl is missing`
|
|
79
|
+
- `- Removes deprecated /gdd:old-command — use /gdd:new-command instead`
|
|
80
|
+
|
|
81
|
+
**Examples of bad bullets (do not produce these):**
|
|
82
|
+
- `- Refactors internal cache module` (internal; not a user-facing impact)
|
|
83
|
+
- `- Probably improves performance` (speculation — release body did not say so)
|
|
84
|
+
- `- Updates dependencies` (user-irrelevant unless it changes behavior)
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Classification boundary
|
|
89
|
+
|
|
90
|
+
Do NOT reclassify the delta. The hot-path script (`hooks/update-check.sh`) already wrote `delta` into `.design/update-cache.json` per D-10 (4-segment semver compare). Echo the incoming delta verbatim.
|
|
91
|
+
|
|
92
|
+
If the incoming delta looks wrong given the release body (e.g. body headlines a breaking change but `delta` is `patch`), note the discrepancy in a single inline line after the bullets — but do **not** override the field. Example:
|
|
93
|
+
|
|
94
|
+
> Note: release notes describe a breaking change; cached delta is `patch`. Consider `/gdd:check-update --refresh` to re-verify.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Do Not
|
|
99
|
+
|
|
100
|
+
- Do not read `.design/config.json` — dismissal state is for the skill/hook, not you.
|
|
101
|
+
- Do not fetch from GitHub or any URL — the cache is the source of truth. (You have no `WebFetch` / `Bash` / `Write` tool.)
|
|
102
|
+
- Do not write `.design/update-available.md` — that is the hot-path hook's responsibility.
|
|
103
|
+
- Do not reformat the release body as-is. Your job is to compress + reframe, not echo.
|
|
104
|
+
- Do not invent bullets not grounded in the release body text.
|
|
105
|
+
- Do not exceed 3 bullets or 5 total content lines.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Completion marker
|
|
110
|
+
|
|
111
|
+
Last line of your response MUST be:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
## UPDATE-CHECKER COMPLETE
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The spawning skill greps for this marker to confirm you finished successfully. Emit it even on the "no cache" fallback path.
|
|
@@ -328,6 +328,57 @@ In DESIGN-VERIFICATION.md, add a `## Phase 4B — Screenshot Evidence` section l
|
|
|
328
328
|
|
|
329
329
|
---
|
|
330
330
|
|
|
331
|
+
## Phase 4C — paper.design Canvas Screenshots (when paper-design: available)
|
|
332
|
+
|
|
333
|
+
**Gate:** Skip this entire Phase 4C block if `paper-design` is `not_configured` or `unavailable` in STATE.md `<connections>`. Print: `paper.design canvas screenshots: skipped.`
|
|
334
|
+
|
|
335
|
+
**Step 1 — ToolSearch first:**
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
ToolSearch({ query: "mcp__paper", max_results: 5 })
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
If empty: skip Phase 4C.
|
|
342
|
+
|
|
343
|
+
**Step 2 — Per-component screenshot loop:**
|
|
344
|
+
|
|
345
|
+
For each component flagged `? VISUAL` in Phase 2 or Phase 3:
|
|
346
|
+
|
|
347
|
+
1. Look up the canvas node_id from DESIGN-CONTEXT.md `<canvas_sources>` block (written by design-context-builder Step 0A).
|
|
348
|
+
2. If node_id found:
|
|
349
|
+
```
|
|
350
|
+
mcp__paper-design__get_screenshot(node_id: "<id>")
|
|
351
|
+
```
|
|
352
|
+
Save screenshot to `.design/screenshots/paper-<component>-<date>.png`.
|
|
353
|
+
Reference path in DESIGN-VERIFICATION.md `## Phase 4C` section.
|
|
354
|
+
3. If node_id not found: note `paper-screenshot: node_id not found for <component>` — skip this component.
|
|
355
|
+
|
|
356
|
+
**Note:** paper.design screenshots are canvas-element-scoped (individual components). Phase 4B Preview screenshots are route-scoped (full rendered pages). Both are complementary — run both when available.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
### pencil.dev Spec-vs-Implementation Diff (optional)
|
|
361
|
+
|
|
362
|
+
If `pencil-dev: available` in STATE.md `<connections>`:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
PEN_FILES=$(find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null)
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
For each `.pen` file:
|
|
369
|
+
1. Parse `design-tokens` from YAML frontmatter.
|
|
370
|
+
2. For each declared token (e.g., `bg: brand-primary-500`):
|
|
371
|
+
- Grep implementation files for the component name to find corresponding CSS/token usage.
|
|
372
|
+
- Compare: declared value vs. found value.
|
|
373
|
+
- **MATCH** → token is correctly implemented.
|
|
374
|
+
- **DIVERGE** → flag: `PENCIL-DIVERGE: <component> <token-key>: spec=<declared> impl=<found>`
|
|
375
|
+
- **NOT FOUND** → flag: `PENCIL-MISSING: <component> <token-key> not found in implementation`
|
|
376
|
+
3. Append results to DESIGN-VERIFICATION.md under `## pencil.dev Spec Compliance`.
|
|
377
|
+
|
|
378
|
+
If no `.pen` files: skip silently. Print: `pencil.dev spec diff: no .pen files — skipped.`
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
331
382
|
## Phase 5 — Gap Analysis
|
|
332
383
|
|
|
333
384
|
Collect all failures from Phases 1–4:
|
package/agents/token-mapper.md
CHANGED
|
@@ -63,7 +63,7 @@ grep -rEn "box-shadow\s*:|shadow-(sm|md|lg|xl|2xl)" src/ --include="*.css" --inc
|
|
|
63
63
|
|
|
64
64
|
### Figma augmentation
|
|
65
65
|
|
|
66
|
-
If STATE.md `<connections>` has `figma: available`, call `
|
|
66
|
+
If STATE.md `<connections>` has `figma: available`, call `mcp__figma__get_variable_defs` to augment with named Figma variables.
|
|
67
67
|
|
|
68
68
|
## Output Format — `.design/map/tokens.md`
|
|
69
69
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# 21st.dev Magic MCP — Connection Specification
|
|
2
|
+
|
|
3
|
+
This file is the connection specification for the 21st.dev Magic MCP within the get-design-done pipeline. 21st.dev is a component-generator tool — it searches a marketplace of pre-built components and generates new ones via AI. See `connections/connections.md` for the full connection index and capability matrix.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
### Prerequisites
|
|
10
|
+
- Node.js ≥ 18
|
|
11
|
+
- A 21st.dev account and API key at [21st.dev](https://21st.dev)
|
|
12
|
+
- `TWENTY_FIRST_API_KEY` environment variable set
|
|
13
|
+
|
|
14
|
+
### Install command (Claude Code)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx @21st-dev/magic@latest init
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This sets up the local MCP server. Add to Claude Code settings:
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"21st-magic": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["@21st-dev/magic@latest"],
|
|
27
|
+
"env": { "TWENTY_FIRST_API_KEY": "${TWENTY_FIRST_API_KEY}" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Verification
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
ToolSearch({ query: "mcp__21st", max_results: 5 })
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Expect non-empty results including `21st_magic_component_builder` or `21st_magic_component_search`. If empty, re-run `npx @21st-dev/magic@latest init` and restart Claude Code session.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Probe Pattern
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
ToolSearch({ query: "mcp__21st", max_results: 5 })
|
|
47
|
+
→ Empty → 21st-dev: not_configured (skip all 21st.dev steps)
|
|
48
|
+
→ Non-empty → 21st-dev: available
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Write result to STATE.md `<connections>`: `21st-dev: <status>`
|
|
52
|
+
|
|
53
|
+
Fallback: when `not_configured`, the explore stage skips the prior-art gate and proceeds with custom component generation.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 21st.dev Magic MCP Tools
|
|
58
|
+
|
|
59
|
+
| Tool | Stage | Purpose |
|
|
60
|
+
|------|-------|---------|
|
|
61
|
+
| `21st_magic_component_search` | explore | Semantic search of marketplace; returns top N matching components with fit scores |
|
|
62
|
+
| `21st_magic_component_builder` | design | Generate component with multiple variations from a description |
|
|
63
|
+
| `21st_magic_component_get` | design | Fetch full source code for a specific marketplace component |
|
|
64
|
+
| `svgl_get_brand_logo` | explore + design | Fetch brand logo/icon SVG by brand name (SVGL integration) |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Pipeline Integration
|
|
69
|
+
|
|
70
|
+
| Stage | What 21st.dev provides |
|
|
71
|
+
|-------|------------------------|
|
|
72
|
+
| explore | **Prior-art gate**: `21st_magic_component_search` before any greenfield build; top-3 in `<prior-art>` block in DESIGN.md |
|
|
73
|
+
| explore | **Brand assets**: `svgl_get_brand_logo` for logo/icon lookups by brand name |
|
|
74
|
+
| design | `21st_magic_component_builder` for component scaffolding via `design-component-generator` agent |
|
|
75
|
+
|
|
76
|
+
### Prior-Art Gate Logic
|
|
77
|
+
|
|
78
|
+
Before building any custom component:
|
|
79
|
+
1. `21st_magic_component_search(component_description, limit: 3)`
|
|
80
|
+
2. Evaluate top result fit score (0–100):
|
|
81
|
+
- **≥ 80%**: surface as `<prior-art>` block in DESIGN.md; recommend adoption
|
|
82
|
+
- **< 80%**: note top candidate for reference; proceed with custom build
|
|
83
|
+
3. Design-executor confirms adoption with user before calling `21st_magic_component_get`
|
|
84
|
+
|
|
85
|
+
This is a **decision gate** — the agent surfaces candidates, the user/executor decides. No automatic code insertion.
|
|
86
|
+
|
|
87
|
+
### SVGL Brand Logo Integration
|
|
88
|
+
|
|
89
|
+
`svgl_get_brand_logo(brand_name, format: "svg")` returns SVG markup for major brands (GitHub, Vercel, Stripe, etc.). Wire into explore stage for brand asset lookups — eliminates manual SVG hunting.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Fallback Behavior
|
|
94
|
+
|
|
95
|
+
When `21st-dev: not_configured`:
|
|
96
|
+
- Prior-art gate is skipped. Print: `21st.dev not configured — prior-art gate skipped.`
|
|
97
|
+
- Custom component generation proceeds normally.
|
|
98
|
+
- Brand logo lookups fall back to icon library references in `reference/iconography.md` (Phase 15).
|