@hegemonart/get-design-done 1.30.5 → 1.31.0
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 +6 -3
- package/.claude-plugin/plugin.json +5 -2
- package/CHANGELOG.md +129 -0
- package/README.md +22 -1
- package/SKILL.md +1 -0
- package/agents/design-integration-checker.md +1 -1
- package/agents/design-planner.md +1 -1
- package/agents/gdd-graph-refresh.md +90 -0
- package/bin/gdd-graph +261 -0
- package/connections/connections.md +10 -9
- package/connections/graphify.md +65 -54
- package/package.json +8 -3
- package/reference/capability-gap-stage-gate.md +7 -4
- package/reference/model-tiers.md +2 -2
- package/reference/start-interview.md +1 -1
- package/scripts/detect-stale-refs.cjs +6 -0
- package/scripts/lib/figma-extract/digest.cjs +430 -0
- package/scripts/lib/figma-extract/parse-url.cjs +87 -0
- package/scripts/lib/figma-extract/payload-schema.json +108 -0
- package/scripts/lib/figma-extract/pull.cjs +394 -0
- package/scripts/lib/figma-extract/receiver.cjs +273 -0
- package/scripts/lib/figma-extract/render-md.cjs +143 -0
- package/scripts/lib/figma-extract/styles-resolver.cjs +147 -0
- package/scripts/lib/figma-extract/walk.cjs +100 -0
- package/scripts/lib/graph/atomic-write.mjs +68 -0
- package/scripts/lib/graph/build.mjs +124 -0
- package/scripts/lib/graph/diff.mjs +90 -0
- package/scripts/lib/graph/index.mjs +14 -0
- package/scripts/lib/graph/query.mjs +155 -0
- package/scripts/lib/graph/schema.json +69 -0
- package/scripts/lib/graph/schema.mjs +47 -0
- package/scripts/lib/graph/status.mjs +88 -0
- package/scripts/lib/graph/token-estimate.mjs +27 -0
- package/scripts/lib/graph/upsert.mjs +210 -0
- package/scripts/lib/{gsd-health-mirror → health-mirror}/index.cjs +89 -2
- package/scripts/mcp-servers/gdd-mcp/tools/gdd_health.ts +3 -3
- package/skills/connections/connections-onboarding.md +6 -6
- package/skills/figma-extract/SKILL.md +64 -0
- package/skills/graphify/SKILL.md +11 -10
- package/skills/health/SKILL.md +10 -0
- package/skills/scan/scan-procedure.md +9 -8
- package/agents/gdd-graphify-sync.md +0 -110
- /package/scripts/lib/{gsd-health-mirror → health-mirror}/index.d.cts +0 -0
package/connections/graphify.md
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
1
1
|
# Graphify — Connection Specification
|
|
2
2
|
|
|
3
|
-
This file is the connection specification for Graphify within the get-design-done pipeline. Graphify builds a queryable knowledge graph over the codebase — mapping component↔token↔decision relationships
|
|
3
|
+
This file is the connection specification for **Graphify** within the get-design-done pipeline. Graphify builds a queryable knowledge graph over the codebase and design intel — mapping component↔token↔decision relationships from `.design/intel/` slices. See `connections/connections.md` for the full connection index and capability matrix.
|
|
4
|
+
|
|
5
|
+
> **Native, no external dependency.** Phase 30.6 (v1.30.6) replaced the previous runtime dispatch to `~/.claude/get-shit-done/bin/gsd-tools.cjs graphify *` with a native CLI shipped in this repo at `bin/gdd-graph`. No Python, no separate install — just Node ≥22.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## Setup
|
|
8
10
|
|
|
9
11
|
**Prerequisites:**
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
+
- Node ≥22 (per `package.json` engines)
|
|
13
|
+
- get-design-done installed (provides `bin/gdd-graph`)
|
|
12
14
|
|
|
13
|
-
**
|
|
14
|
-
```
|
|
15
|
-
pip install graphifyy
|
|
16
|
-
graphify install # installs skill files into ~/.claude/skills/graphify/
|
|
17
|
-
```
|
|
15
|
+
**Enable in project config** (per D-09 — direct file edit, no CLI subcommand):
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
|
|
17
|
+
Edit `.design/config.json` and set:
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"graphify": {
|
|
21
|
+
"enabled": true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
graphify . # run in project root; produces graphify-out/graph.json
|
|
27
|
-
# or via GSD tools:
|
|
28
|
-
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify build
|
|
29
|
-
```
|
|
26
|
+
If `.design/config.json` does not exist, create it. Missing file = disabled.
|
|
30
27
|
|
|
31
|
-
**
|
|
28
|
+
**Build the graph (initial):**
|
|
32
29
|
```
|
|
33
|
-
|
|
30
|
+
node bin/gdd-graph build
|
|
34
31
|
```
|
|
32
|
+
Produces `.design/graph/graph.json` (Ajv-validated against `scripts/lib/graph/schema.json`).
|
|
35
33
|
|
|
36
34
|
**Verification:**
|
|
37
|
-
After building, run:
|
|
38
35
|
```
|
|
39
|
-
node
|
|
36
|
+
node bin/gdd-graph status --format json
|
|
40
37
|
```
|
|
41
|
-
Expect: `{
|
|
38
|
+
Expect: `{ configured: true, exists: true, node_count: N, edge_count: M, built_at: "<iso>", schema_version: "1.0" }`.
|
|
42
39
|
|
|
43
|
-
**Note:** Graphify is
|
|
40
|
+
**Note:** Graphify is optional. It is a pre-search oracle for planner and verifier agents, never a hard requirement. All stages MUST degrade gracefully when graphify is `unavailable` or `not_configured`.
|
|
44
41
|
|
|
45
42
|
---
|
|
46
43
|
|
|
@@ -50,7 +47,7 @@ Expect: `{ enabled: true, graph_path: "...", node_count: N, edge_count: N, stale
|
|
|
50
47
|
|
|
51
48
|
| Node type | Source | ID pattern |
|
|
52
49
|
|-----------|--------|-----------|
|
|
53
|
-
| component | `.stories.tsx` / `src/components/*.tsx` | `component:<name>` |
|
|
50
|
+
| component | `.stories.tsx` / `src/components/*.tsx` (via intel slices) | `component:<name>` |
|
|
54
51
|
| token:color | CSS custom properties / Figma variables | `token:color/<name>` |
|
|
55
52
|
| token:spacing | CSS custom properties | `token:spacing/<name>` |
|
|
56
53
|
| token:typography | CSS custom properties | `token:typography/<name>` |
|
|
@@ -65,7 +62,7 @@ Expect: `{ enabled: true, graph_path: "...", node_count: N, edge_count: N, stale
|
|
|
65
62
|
|
|
66
63
|
### Edge Types
|
|
67
64
|
|
|
68
|
-
| Edge | From | To | Meaning |
|
|
65
|
+
| Edge kind | From | To | Meaning |
|
|
69
66
|
|------|------|-----|---------|
|
|
70
67
|
| `uses` | component | token | Component references this token |
|
|
71
68
|
| `renders` | page | component | Page renders this component |
|
|
@@ -74,22 +71,32 @@ Expect: `{ enabled: true, graph_path: "...", node_count: N, edge_count: N, stale
|
|
|
74
71
|
| `maps-to` | figma-variable | token | Figma variable corresponds to CSS token |
|
|
75
72
|
| `detected-at` | anti-pattern | component | Anti-pattern found in this component |
|
|
76
73
|
|
|
77
|
-
### graph.json structure
|
|
74
|
+
### graph.json structure (schema v1.0)
|
|
78
75
|
|
|
79
76
|
```json
|
|
80
77
|
{
|
|
78
|
+
"schema_version": "1.0",
|
|
79
|
+
"built_at": "2026-05-28T12:00:00.000Z",
|
|
81
80
|
"nodes": [
|
|
82
|
-
{
|
|
83
|
-
"
|
|
81
|
+
{
|
|
82
|
+
"id": "component:Button",
|
|
83
|
+
"type": "component",
|
|
84
|
+
"label": "Button",
|
|
85
|
+
"attrs": { "source": "src/components/Button.tsx" }
|
|
86
|
+
}
|
|
84
87
|
],
|
|
85
88
|
"edges": [
|
|
86
|
-
{
|
|
87
|
-
"
|
|
89
|
+
{
|
|
90
|
+
"from": "component:Button",
|
|
91
|
+
"to": "token:color/primary/500",
|
|
92
|
+
"kind": "uses",
|
|
93
|
+
"weight": 0.95
|
|
94
|
+
}
|
|
88
95
|
]
|
|
89
96
|
}
|
|
90
97
|
```
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
Edges use the `{from, to, kind, weight?}` shape (per D-03.b — matches intel-store schema verbatim, no translation layer). The optional `weight: number` replaces the upstream three-tier confidence enum (per D-03.c).
|
|
93
100
|
|
|
94
101
|
---
|
|
95
102
|
|
|
@@ -110,18 +117,19 @@ Unlike MCP connections, Graphify has no ToolSearch check. The probe is file-exis
|
|
|
110
117
|
|
|
111
118
|
**Graphify probe sequence (execute at agent entry, before using graph):**
|
|
112
119
|
|
|
113
|
-
Step G1 — Config check:
|
|
120
|
+
Step G1 — Config check (per D-09 — direct read, no CLI subcommand):
|
|
114
121
|
```
|
|
115
|
-
node "
|
|
116
|
-
→
|
|
117
|
-
→
|
|
122
|
+
node -e "try{const c=JSON.parse(require('fs').readFileSync('.design/config.json','utf8'));process.stdout.write(String(c.graphify?.enabled===true))}catch{process.stdout.write('false')}"
|
|
123
|
+
→ false → graphify: not_configured (skip all graph steps)
|
|
124
|
+
→ true → proceed to Step G2
|
|
118
125
|
```
|
|
119
126
|
|
|
120
|
-
Step G2 — Graph
|
|
127
|
+
Step G2 — Graph status check (native CLI):
|
|
121
128
|
```
|
|
122
|
-
|
|
123
|
-
→
|
|
124
|
-
→
|
|
129
|
+
node bin/gdd-graph status --format json
|
|
130
|
+
→ { configured: true, exists: true } → graphify: available
|
|
131
|
+
→ { configured: true, exists: false } → graphify: unavailable (graph not built yet)
|
|
132
|
+
→ { configured: false, ... } → graphify: not_configured (mirrors G1; defensive)
|
|
125
133
|
```
|
|
126
134
|
|
|
127
135
|
Write graphify status to `.design/STATE.md` `<connections>`.
|
|
@@ -138,8 +146,8 @@ This is the canonical pre-search pattern for agents. Copy inline — SKILL.md an
|
|
|
138
146
|
|
|
139
147
|
Step 1: Query graph for decision node and its neighbors
|
|
140
148
|
```
|
|
141
|
-
node
|
|
142
|
-
→ Returns: connected components + tokens as JSON
|
|
149
|
+
node bin/gdd-graph query "decision:D-<nn>" --budget 1500
|
|
150
|
+
→ Returns: ranked match list — connected components + tokens as JSON
|
|
143
151
|
→ Use returned component IDs as grep seed list (reduces false-negative "not found")
|
|
144
152
|
```
|
|
145
153
|
|
|
@@ -150,15 +158,15 @@ Step 2: Grep each returned component for the decision pattern
|
|
|
150
158
|
|
|
151
159
|
Step 1: Query graph for token node and its neighbors
|
|
152
160
|
```
|
|
153
|
-
node
|
|
154
|
-
→ Returns: all components that reference this token
|
|
161
|
+
node bin/gdd-graph query "<token-name>" --budget 1500
|
|
162
|
+
→ Returns: all components that reference this token (ranked by D-04.a score)
|
|
155
163
|
→ Annotate planned task with "N components affected" before scoping
|
|
156
164
|
```
|
|
157
165
|
|
|
158
166
|
Step 2: Include component list in the task description
|
|
159
167
|
(then continue standard planning behavior)
|
|
160
168
|
|
|
161
|
-
**Budget note:** Use `--budget 1500` for pre-search queries.
|
|
169
|
+
**Budget note:** Use `--budget 1500` for pre-search queries. Higher-weight edges (`weight >= 0.8`) are more reliable; lower-weight edges are hints only.
|
|
162
170
|
|
|
163
171
|
---
|
|
164
172
|
|
|
@@ -177,21 +185,24 @@ The graph is a performance optimization and accuracy enhancer. It is never a har
|
|
|
177
185
|
## Anti-Patterns
|
|
178
186
|
|
|
179
187
|
- **Do NOT use graphify to replace grep.** The graph is a seed list, not a complete index. Always grep after querying the graph.
|
|
180
|
-
- **Do NOT embed graph.json contents in agent context.** Query specific nodes via
|
|
188
|
+
- **Do NOT embed `graph.json` contents in agent context.** Query specific nodes via `bin/gdd-graph query`; never read `graph.json` directly.
|
|
181
189
|
- **Do NOT query the graph during scan or design stages.** The graph is read-only and only useful when decisions already exist (plan, verify).
|
|
182
|
-
- **Do NOT block on graph build time.** If `
|
|
183
|
-
- **Do NOT assume graph covers
|
|
190
|
+
- **Do NOT block on graph build time.** If `gdd-graph build` takes >30 seconds mid-session, log "graphify build deferred — run /gdd:graphify build manually" and continue without graph.
|
|
191
|
+
- **Do NOT assume graph covers `.design/` artifacts.** The build walks `.design/intel/` slices and project source; arbitrary planning docs are not graph nodes unless explicitly indexed.
|
|
184
192
|
|
|
185
193
|
---
|
|
186
194
|
|
|
187
195
|
## /gdd:graphify Commands
|
|
188
196
|
|
|
189
|
-
| Subcommand |
|
|
197
|
+
| Subcommand | Native CLI call | Purpose |
|
|
190
198
|
|------------|----------------|---------|
|
|
191
|
-
| `build` | `
|
|
192
|
-
| `query <term>` | `
|
|
193
|
-
| `status` | `
|
|
194
|
-
| `diff` | `
|
|
199
|
+
| `build` | `node bin/gdd-graph build` | Build or rebuild the knowledge graph |
|
|
200
|
+
| `query <term>` | `node bin/gdd-graph query "<term>" --budget 2000` | Query the graph for a node and its neighbors |
|
|
201
|
+
| `status` | `node bin/gdd-graph status` | Check graph age, node count, enabled status |
|
|
202
|
+
| `diff` | `node bin/gdd-graph diff` | Show topology changes since last build |
|
|
203
|
+
| `upsert-node` | `node bin/gdd-graph upsert-node --id X --type T --label L` | Programmatic single-node insert (used by gdd-graph-refresh agent) |
|
|
204
|
+
| `upsert-edge` | `node bin/gdd-graph upsert-edge --from A --to B --kind R` | Programmatic single-edge insert (used by gdd-graph-refresh agent) |
|
|
205
|
+
|
|
206
|
+
If `graphify.enabled` is `false` (or `.design/config.json` is missing), the `bin/gdd-graph` subcommands graceful-degrade — `status` returns `{ configured: false, exists: false }`, other subcommands no-op with exit 0 and a one-line stderr notice.
|
|
195
207
|
|
|
196
|
-
|
|
197
|
-
"Graphify is not enabled. Enable with: gsd-tools config-set graphify.enabled true — then run /gdd:graphify build."
|
|
208
|
+
To enable: edit `.design/config.json` and set `graphify.enabled: true`, then `node bin/gdd-graph build`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hegemonart/get-design-done",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "A design-quality pipeline for AI coding agents: brief, plan, implement, and verify UI work against your design system.",
|
|
5
5
|
"author": "Hegemon",
|
|
6
6
|
"homepage": "https://github.com/hegemonart/get-design-done",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"bin": {
|
|
30
30
|
"gdd-events": "./scripts/cli/gdd-events.mjs",
|
|
31
|
+
"gdd-graph": "./bin/gdd-graph",
|
|
31
32
|
"gdd-mcp": "./scripts/mcp-servers/gdd-mcp/server.ts",
|
|
32
33
|
"gdd-sdk": "./bin/gdd-sdk",
|
|
33
34
|
"gdd-state-mcp": "./scripts/mcp-servers/gdd-state/server.ts",
|
|
@@ -79,7 +80,10 @@
|
|
|
79
80
|
"gemini",
|
|
80
81
|
"mcp",
|
|
81
82
|
"parallel-agents",
|
|
82
|
-
"agent-sdk"
|
|
83
|
+
"agent-sdk",
|
|
84
|
+
"figma",
|
|
85
|
+
"extractor",
|
|
86
|
+
"design-system-sync"
|
|
83
87
|
],
|
|
84
88
|
"skills": [
|
|
85
89
|
"SKILL.md"
|
|
@@ -88,7 +92,8 @@
|
|
|
88
92
|
"dependencies": {
|
|
89
93
|
"@anthropic-ai/claude-agent-sdk": "^0.3.143",
|
|
90
94
|
"@clack/prompts": "^1.2.0",
|
|
91
|
-
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
95
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
96
|
+
"ajv": "^8.18.0"
|
|
92
97
|
},
|
|
93
98
|
"optionalDependencies": {
|
|
94
99
|
"pngjs": "^7.0.0",
|
|
@@ -159,10 +159,13 @@ appends the following verbatim block to the cycle markdown:
|
|
|
159
159
|
> opt in with the project-local command below. You can always opt out
|
|
160
160
|
> later by deleting the timestamps from `.design/config.json` (§ 7).
|
|
161
161
|
>
|
|
162
|
-
> <!--
|
|
163
|
-
>
|
|
164
|
-
>
|
|
165
|
-
>
|
|
162
|
+
> <!-- Phase 30.6 (D-09) update: per the convention adopted across the
|
|
163
|
+
> knowledge layer in v1.30.6, project-local config flips are direct
|
|
164
|
+
> edits to .design/config.json — no CLI subcommand. The canonical
|
|
165
|
+
> opt-in is therefore: edit .design/config.json to add
|
|
166
|
+
> { "capability_gap_gate": { "opted_in_at": "<ISO date>" } }.
|
|
167
|
+
> Plan 29-05 (apply-reflections extension) surfaces this as a guided
|
|
168
|
+
> prompt rather than a CLI invocation. -->
|
|
166
169
|
>
|
|
167
170
|
> This prompt is emitted at most once per project. If you ignore it,
|
|
168
171
|
> the gate continues to evaluate every cycle but does not re-prompt
|
package/reference/model-tiers.md
CHANGED
|
@@ -13,7 +13,7 @@ Phase 10.1 (OPT-06) locked the initial per-agent tier assignment. Phase 11's `de
|
|
|
13
13
|
Pick `haiku` when the agent is:
|
|
14
14
|
- Applying a fixed scoring rubric (`design-verifier` runs five deterministic passes with numeric category scores).
|
|
15
15
|
- Producing a boolean + rationale answer (`design-plan-checker`, `design-context-checker`, `design-integration-checker` all return "gaps found" + structured list).
|
|
16
|
-
- Performing a read-only state sync (`gdd-
|
|
16
|
+
- Performing a read-only state sync (`gdd-graph-refresh` mirrors graph state — no reasoning density beyond schema matching).
|
|
17
17
|
- Running at high frequency where cost compounds (checkers run on every `/gdd:verify` pass — cost multiplies with iterations).
|
|
18
18
|
|
|
19
19
|
Haiku's ~20x price advantage over Opus per 1M tokens (see `reference/model-prices.md`) makes it correct for deterministic-rubric work where the marginal quality gain of larger models is negligible.
|
|
@@ -49,7 +49,7 @@ Opus cost (~5x Sonnet, ~25x Haiku) is justified only when a single wrong decisio
|
|
|
49
49
|
| design-plan-checker | Checker | haiku | Checks the plan against a fixed schema — boolean + gap-list output. |
|
|
50
50
|
| design-context-checker | Checker | haiku | Checks context completeness against a schema — boolean + gap-list output. |
|
|
51
51
|
| design-integration-checker | Checker | haiku | Checks cross-artifact references — deterministic link-integrity work. |
|
|
52
|
-
| gdd-
|
|
52
|
+
| gdd-graph-refresh | Refresh agent | haiku | Rebuilds graph at .design/graph/graph.json from intel slices — no reasoning density required. |
|
|
53
53
|
| a11y-mapper | Mapper | sonnet | Open-ended a11y pattern recognition across many files; Sonnet's breadth matters. |
|
|
54
54
|
| component-taxonomy-mapper | Mapper | sonnet | Classifies components by role — requires nuance Haiku lacks, not enough to warrant Opus. |
|
|
55
55
|
| design-auditor | Worker | sonnet | Emits structured findings from code inspection; Sonnet balances depth with cost. |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Purpose:** collect the minimum signal needed to steer the findings engine without slowing first-run completion past 30 seconds of interview wall-clock. Autodetectable dimensions collapse to a one-key confirmation; genuinely non-derivable dimensions are asked explicitly.
|
|
4
4
|
|
|
5
|
-
**Hard constraint:** v1.14.7 ships this fixed question set. Do not branch, re-order, or insert new questions without an explicit `/
|
|
5
|
+
**Hard constraint:** v1.14.7 ships this fixed question set. Do not branch, re-order, or insert new questions without an explicit `/gdd:discuss` override captured in a future DISCUSSION.md.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -19,6 +19,12 @@ const DEPRECATIONS_PATH = path.join(REPO_ROOT, 'reference/DEPRECATIONS.md');
|
|
|
19
19
|
// would over-fire. Cover those cases via targeted review rather than grep.
|
|
20
20
|
const PATTERNS = [
|
|
21
21
|
{ name: '/design: namespace (replaced by /gdd:)', regex: /\/design:[a-z-]+/g },
|
|
22
|
+
// Phase 30.6: runtime dispatch to upstream gsd-tools.cjs is now disallowed.
|
|
23
|
+
// Native CLI lives at bin/gdd-graph (graph ops) and is invoked as `node bin/gdd-graph <sub>`.
|
|
24
|
+
// The pattern is precise — only the explicit bash dispatch is flagged. Prose mentions
|
|
25
|
+
// of "gsd-tools" or "get-shit-done" in attribution contexts (NOTICE, CHANGELOG, README)
|
|
26
|
+
// are NOT matched because they don't include the leading `node "$HOME/.claude/...` token.
|
|
27
|
+
{ name: 'gsd-tools.cjs runtime dispatch (use bin/gdd-graph instead)', regex: /node\s+["']?\$HOME\/\.claude\/get-shit-done\/bin\/gsd-tools\.cjs/g },
|
|
22
28
|
];
|
|
23
29
|
|
|
24
30
|
const EXCLUDE_DIRS = new Set([
|