@hegemonart/get-design-done 1.49.0 → 1.50.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.
Files changed (56) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +5 -2
  3. package/CHANGELOG.md +49 -0
  4. package/README.md +2 -0
  5. package/SKILL.md +2 -1
  6. package/agents/design-auditor.md +20 -0
  7. package/agents/design-debt-crawler.md +8 -0
  8. package/dist/claude-code/.claude/skills/audit/SKILL.md +1 -1
  9. package/dist/claude-code/.claude/skills/brief/SKILL.md +1 -1
  10. package/dist/claude-code/.claude/skills/compare/SKILL.md +1 -1
  11. package/dist/claude-code/.claude/skills/connections/SKILL.md +1 -1
  12. package/dist/claude-code/.claude/skills/darkmode/SKILL.md +1 -1
  13. package/dist/claude-code/.claude/skills/design/SKILL.md +1 -1
  14. package/dist/claude-code/.claude/skills/discover/SKILL.md +1 -1
  15. package/dist/claude-code/.claude/skills/do/SKILL.md +1 -1
  16. package/dist/claude-code/.claude/skills/explore/SKILL.md +1 -1
  17. package/dist/claude-code/.claude/skills/fast/SKILL.md +1 -1
  18. package/dist/claude-code/.claude/skills/health/SKILL.md +2 -2
  19. package/dist/claude-code/.claude/skills/live/SKILL.md +1 -1
  20. package/dist/claude-code/.claude/skills/new-skill/SKILL.md +90 -0
  21. package/dist/claude-code/.claude/skills/plan/SKILL.md +1 -1
  22. package/dist/claude-code/.claude/skills/progress/SKILL.md +9 -1
  23. package/dist/claude-code/.claude/skills/quick/SKILL.md +1 -1
  24. package/dist/claude-code/.claude/skills/scan/SKILL.md +1 -1
  25. package/dist/claude-code/.claude/skills/ship/SKILL.md +1 -1
  26. package/dist/claude-code/.claude/skills/verify/SKILL.md +1 -1
  27. package/package.json +9 -2
  28. package/reference/anti-slop-rubric.md +173 -0
  29. package/reference/audit-scoring.md +4 -0
  30. package/reference/debt-categories.md +20 -1
  31. package/reference/registry.json +14 -0
  32. package/reference/skill-authoring-contract.md +97 -15
  33. package/reference/skill-graph.md +118 -0
  34. package/reference/visual-tells.md +152 -6
  35. package/scripts/lib/manifest/scaffolder.cjs +261 -0
  36. package/scripts/lib/manifest/schemas/skills.schema.json +14 -0
  37. package/scripts/lib/manifest/skills.json +26 -18
  38. package/skills/audit/SKILL.md +1 -1
  39. package/skills/brief/SKILL.md +1 -1
  40. package/skills/compare/SKILL.md +1 -1
  41. package/skills/connections/SKILL.md +1 -1
  42. package/skills/darkmode/SKILL.md +1 -1
  43. package/skills/design/SKILL.md +1 -1
  44. package/skills/discover/SKILL.md +1 -1
  45. package/skills/do/SKILL.md +1 -1
  46. package/skills/explore/SKILL.md +1 -1
  47. package/skills/fast/SKILL.md +1 -1
  48. package/skills/health/SKILL.md +2 -2
  49. package/skills/live/SKILL.md +1 -1
  50. package/skills/new-skill/SKILL.md +90 -0
  51. package/skills/plan/SKILL.md +1 -1
  52. package/skills/progress/SKILL.md +9 -1
  53. package/skills/quick/SKILL.md +1 -1
  54. package/skills/scan/SKILL.md +1 -1
  55. package/skills/ship/SKILL.md +1 -1
  56. package/skills/verify/SKILL.md +1 -1
@@ -1,4 +1,4 @@
1
- # Visual Tells Catalog (v1)
1
+ # Visual Tells Catalog (v2)
2
2
 
3
3
  The default-AI aesthetic has a fingerprint. When a model generates a front-end
4
4
  without a brand brief, it falls back to the same handful of moves it saw most in
@@ -6,6 +6,12 @@ its training set. This catalog names those moves so the cheap regex floor in
6
6
  `hooks/gdd-design-quality-check.js` can flag them on every `.tsx` / `.vue` /
7
7
  `.svelte` / `.astro` write.
8
8
 
9
+ This catalog grows commit by commit. The v1 floor named the eight loudest tells the
10
+ hook matches today; v2 adds five more identified through hands-on usage. Newer
11
+ categories may be catalog-only (documented and cross-linked, not yet wired to a hook
12
+ rule) until a regex earns its place. Each entry below names a **primary axis** from
13
+ `reference/anti-slop-rubric.md`, so a tell connects to the verb axis it most degrades.
14
+
9
15
  Severity here is WARN (advisory), in the vocabulary of `reference/audit-scoring.md`.
10
16
  A WARN is not a FLAG: it does not block the write and it does not fail a gate. It
11
17
  is a nudge that asks "did you choose this, or did the model default to it?" Each
@@ -227,11 +233,151 @@ and never animate keyboard-driven actions. See the Motion Anti-Patterns section
227
233
 
228
234
  ---
229
235
 
236
+ ## stock-photo-people
237
+
238
+ Rule id: `stock-photo-people` (catalog-only)
239
+
240
+ Generic smiling-team and handshake stock photography dropped in where a real product
241
+ view belongs. The diverse-team-around-a-laptop shot, the lone founder gazing out a
242
+ window, the abstract handshake: these read as filler the moment a viewer asks what the
243
+ product actually does. Like the isometric fallback, the tell is that no real screen was
244
+ available, so a stock human filled the hole.
245
+
246
+ Instances:
247
+
248
+ 1. A hero photo of four people laughing at one laptop, captioned with a value prop.
249
+ 2. `src="/images/team-meeting.jpg"` standing in for a product screenshot.
250
+ 3. A testimonial section using stock headshots instead of real customer faces.
251
+ 4. An unsplash or shutterstock asset path in a primary marketing surface.
252
+ 5. The same stock photo reused across unrelated sections of one page.
253
+
254
+ Diagnostic regex (where applicable): `\b(?:unsplash|shutterstock|istockphoto|gettyimages|stock[-_]?photo)[\w./-]*` in an asset path or `src`.
255
+
256
+ Remediation: show the real product or real people connected to it. A genuine screenshot,
257
+ a real customer portrait with permission, or a purpose-shot photo all beat a stock human.
258
+ If no real asset exists yet, a clean illustration with brand character beats a stock smile.
259
+
260
+ Primary axis: Authenticity.
261
+
262
+ ---
263
+
264
+ ## badge-spam
265
+
266
+ Rule id: `badge-spam` (catalog-only)
267
+
268
+ Decorative pills stacked to manufacture importance: "New", "Beta", "Pro", "AI-powered",
269
+ "v2" scattered across cards and nav with no state behind them. One badge that reflects a
270
+ real status orients the user. Four badges in a row are noise that the model adds because
271
+ badges look like product maturity. The tell is a cluster of status pills none of which
272
+ encode a true, current state.
273
+
274
+ Instances:
275
+
276
+ 1. A card carrying "New", "Hot", and "AI-powered" badges at once.
277
+ 2. A nav item with a permanent "Beta" pill that has shipped for a year.
278
+ 3. Every feature tile in a grid wearing the same "Pro" badge.
279
+ 4. An "AI-powered" badge on a feature with no AI in it.
280
+ 5. Three or more `<Badge>` or `.badge` elements rendered in one small region.
281
+
282
+ Diagnostic regex (where applicable): a quoted label matching `\b(?:New|Beta|Pro|AI-powered|Hot|Coming soon)\b` inside a badge or chip element, flagged at three or more in one component.
283
+
284
+ Remediation: keep one badge that carries a real, current status, and delete the rest.
285
+ A badge should change when state changes. If a label never changes, it is decoration, not
286
+ status, and belongs in the copy or not at all.
287
+
288
+ Primary axis: Authenticity.
289
+
290
+ ---
291
+
292
+ ## oversized-single-word
293
+
294
+ Rule id: `oversized-single-word` (catalog-only)
295
+
296
+ A single word blown up to display size to fill a section that has no content to carry it.
297
+ "Build.", "Ship.", "Scale." at `text-8xl` with nothing beneath but air. Large type is a
298
+ strong tool for one real headline; the tell is a one-word slab standing in for a sentence
299
+ the writer did not write, sized for drama rather than meaning.
300
+
301
+ Instances:
302
+
303
+ 1. A section whose only content is "Innovate." at `text-9xl`.
304
+ 2. A stack of one-word slabs ("Fast." "Simple." "Powerful.") each filling a viewport.
305
+ 3. A giant verb with no object, no supporting line, and 300px of padding around it.
306
+ 4. Display-size text where the word count is one and the surrounding region is empty.
307
+
308
+ Diagnostic regex (where applicable): an element with `text-(?:7xl|8xl|9xl)` whose text node is a single word.
309
+
310
+ Remediation: write the sentence the word was standing in for, then size the headline to
311
+ serve reading. If a one-word moment is genuinely the design, give it a supporting line and
312
+ a reason to be that large. Density should fit the content, not inflate to fill space.
313
+
314
+ Primary axis: Density.
315
+
316
+ ---
317
+
318
+ ## motion-without-content-intent
319
+
320
+ Rule id: `motion-without-content-intent` (catalog-only)
321
+
322
+ Scroll-triggered fades, parallax layers, and entrance animations applied to every block
323
+ because motion reads as "modern". This is the storytelling cousin of the ambient-loop tell:
324
+ where `decorative-motion-without-intent` flags a forever-looping spinner, this flags motion
325
+ wired to scroll or load that carries no content reason. Every element fading up in sequence
326
+ delays the reader and signals motion chosen as decoration, not to direct attention.
327
+
328
+ Instances:
329
+
330
+ 1. Every section wrapped in a `whileInView` fade-up with a staggered delay.
331
+ 2. Parallax on three background layers that encode no depth meaning.
332
+ 3. An entrance animation on body copy that the reader is waiting to read.
333
+ 4. Scroll-jacking that overrides native scroll for a "cinematic" reveal.
334
+
335
+ Diagnostic regex (where applicable): `whileInView|data-aos|scroll-trigger|parallax` applied broadly across blocks without a reduced-motion guard in the same file.
336
+
337
+ Remediation: tie motion to a content reason. Animate the one element that should draw the
338
+ eye, let the rest render immediately, and respect `prefers-reduced-motion`. Reading content
339
+ should never wait on a decorative reveal. See the Motion Anti-Patterns section of
340
+ `reference/anti-patterns.md`.
341
+
342
+ Primary axis: Hierarchy.
343
+
344
+ ---
345
+
346
+ ## narrator-from-a-distance-UI
347
+
348
+ Rule id: `narrator-from-a-distance-UI` (catalog-only)
349
+
350
+ Copy that describes the product from the outside in a detached marketing voice instead of
351
+ speaking to the user doing a task. "Our platform empowers teams to achieve more" is a
352
+ narrator at a distance; "Invite your team and assign the first task" speaks to the person
353
+ in front of the screen. The tell is third-person product description where a second-person
354
+ instruction belongs, especially inside the product rather than on a landing page.
355
+
356
+ Instances:
357
+
358
+ 1. A dashboard empty state reading "The platform helps you organize your work" instead of "Create your first board".
359
+ 2. In-product copy in third person ("Users can export reports") rather than direct address.
360
+ 3. A feature headline describing the feature to an investor, not to its user.
361
+ 4. Onboarding steps narrated about the product instead of instructing the new user.
362
+
363
+ Diagnostic regex (where applicable): in-product strings matching `\b(?:our platform|the platform|users can|we help you|empowers)\b` outside marketing routes.
364
+
365
+ Remediation: write to the user in second person and name the next action. Inside the
366
+ product, copy should instruct and orient, not pitch. Reserve the outside-in description for
367
+ the marketing surface, and even there, lead with what the reader can do. See
368
+ `reference/copy-quality.md` for the per-surface voice contract.
369
+
370
+ Primary axis: Directness.
371
+
372
+ ---
373
+
230
374
  ## Notes
231
375
 
232
- This is a v1 floor, not a ceiling. The regexes favor precision over recall: they
233
- aim to fire only on the obvious cases so the WARN stays trustworthy. A clean pass
234
- here does not mean the design is good. It means the eight loudest default-AI tells
235
- are absent. Real review still applies the full rubric in
236
- `reference/audit-scoring.md` and the BAN / SLOP catalog in
376
+ This is a v2 catalog, growing commit by commit, not a ceiling. The hook regexes favor
377
+ precision over recall: they aim to fire only on the obvious cases so the WARN stays
378
+ trustworthy. The five v2 categories above are catalog-only until a regex earns a place in
379
+ the hook; they still give review a named tell and a primary axis to score against. A clean
380
+ pass here does not mean the design is good. It means the loudest default-AI tells are
381
+ absent. Real review still applies the full rubric in `reference/audit-scoring.md`, the verb
382
+ axes in `reference/anti-slop-rubric.md`, and the BAN / SLOP catalog in
237
383
  `reference/anti-patterns.md`.
@@ -0,0 +1,261 @@
1
+ 'use strict';
2
+ /**
3
+ * scripts/lib/manifest/scaffolder.cjs — Phase 50 (Authoring Contract v3).
4
+ *
5
+ * Pure, dependency-free generator behind the `/gdd:new-skill` scaffolder skill.
6
+ * The SKILL.md (source/skills/new-skill/SKILL.md) drives the interactive
7
+ * prompts; this module is the deterministic core it (and the test suite) call.
8
+ *
9
+ * Exports:
10
+ * buildSkillRecord({ name, description, argumentHint, tools, userInvocable,
11
+ * composesWith }) -> a skills.json record object. Validates the name slug,
12
+ * the v3 description budget (20..1024 chars), and the comma-separated tools
13
+ * list. Throws on invalid input.
14
+ * renderSkillMd(record) -> the SKILL.md template string (frontmatter in the
15
+ * same canonical key order as generate-skill-frontmatter.cjs + a minimal
16
+ * body skeleton with the standard sections).
17
+ * suggestComposesWith(name, allSkills) -> heuristic composition suggestions
18
+ * (skills sharing a lifecycle-stage keyword with the new skill name).
19
+ *
20
+ * Dependency-free of any third party. It DOES reuse the in-repo
21
+ * generate-skill-frontmatter.cjs `frontmatterFromRecord` emitter so the
22
+ * rendered frontmatter is a byte-for-byte fixed point with the forward
23
+ * generator (description quoted, canonical key order, name leads).
24
+ */
25
+
26
+ const path = require('node:path');
27
+
28
+ // Reuse the canonical frontmatter emitter so renderSkillMd stays compatible
29
+ // with `npm run generate:skill-frontmatter` (same quoting + key order).
30
+ const { frontmatterFromRecord } = require(
31
+ path.join(__dirname, '..', '..', 'generate-skill-frontmatter.cjs'),
32
+ );
33
+
34
+ // Slug rule mirrors reference/skill-authoring-contract.md `## Frontmatter`:
35
+ // kebab-case identifier matching ^[a-z0-9][a-z0-9-._]*$.
36
+ const NAME_RE = /^[a-z0-9][a-z0-9-._]*$/;
37
+
38
+ // Description budget mirrors the Phase 28.5 contract (D-02) + skills.schema.json:
39
+ // 20..1024 chars. The v3 "Activates for requests involving X, Y, Z." sentence
40
+ // is recommended (LAX by default) but not regex-enforced here.
41
+ const DESC_MIN = 20;
42
+ const DESC_MAX = 1024;
43
+
44
+ // Lifecycle-stage keyword groups used by suggestComposesWith. Skills whose
45
+ // name shares a group with the new skill name are plausible composition
46
+ // neighbours. Kept deliberately small and dependency-free; the SKILL.md treats
47
+ // the result as a suggestion the user confirms, never an autowire.
48
+ const STAGE_GROUPS = [
49
+ ['brief', 'intake', 'start', 'new-project', 'new-cycle'],
50
+ ['explore', 'discover', 'discuss', 'sketch', 'spike', 'map'],
51
+ ['plan', 'planning', 'design', 'do', 'build'],
52
+ ['verify', 'audit', 'review', 'quality-gate', 'check'],
53
+ ['ship', 'pr', 'complete', 'closeout', 'rollout'],
54
+ ['figma', 'extract', 'export', 'import', 'sync'],
55
+ ['token', 'tokens', 'darkmode', 'style', 'theme'],
56
+ ['health', 'progress', 'stats', 'report', 'timeline'],
57
+ ];
58
+
59
+ function fail(msg) {
60
+ throw new Error(`scaffolder: ${msg}`);
61
+ }
62
+
63
+ /** Normalize a tools input (string or array) to a clean comma-list string. */
64
+ function normalizeTools(tools) {
65
+ if (tools == null) return undefined;
66
+ let parts;
67
+ if (Array.isArray(tools)) {
68
+ parts = tools;
69
+ } else if (typeof tools === 'string') {
70
+ parts = tools.split(',');
71
+ } else {
72
+ fail('tools must be a comma-separated string or an array of tool names');
73
+ }
74
+ const cleaned = parts.map((t) => String(t).trim()).filter(Boolean);
75
+ if (cleaned.length === 0) fail('tools, when provided, must name at least one tool');
76
+ // Each token: a Tool name or an mcp__* identifier. No commas, no empty.
77
+ // `\w` already includes `_`, so a single `[\w-]*` class matches plain names
78
+ // (Read) AND mcp__* identifiers (mcp__gdd_state__get) in linear time. The old
79
+ // `(__[\w-]+)*` suffix overlapped `[\w-]*` and caused exponential backtracking
80
+ // (CodeQL js/redos) on inputs like `A__-__-__...`; it was redundant. Removed.
81
+ for (const t of cleaned) {
82
+ if (!/^[A-Za-z][\w-]*$/.test(t)) {
83
+ fail(`tools entry "${t}" is not a valid tool identifier`);
84
+ }
85
+ }
86
+ return cleaned.join(', ');
87
+ }
88
+
89
+ /** Normalize a composes_with input (string or array) to a slug array. */
90
+ function normalizeComposesWith(composesWith) {
91
+ if (composesWith == null) return undefined;
92
+ let parts;
93
+ if (Array.isArray(composesWith)) parts = composesWith;
94
+ else if (typeof composesWith === 'string') parts = composesWith.split(',');
95
+ else fail('composesWith must be an array or comma-separated string of skill names');
96
+ const cleaned = parts.map((s) => String(s).trim()).filter(Boolean);
97
+ if (cleaned.length === 0) return undefined;
98
+ for (const s of cleaned) {
99
+ if (!NAME_RE.test(s)) fail(`composesWith entry "${s}" is not a valid skill slug`);
100
+ }
101
+ // De-dupe, preserve first-seen order.
102
+ return [...new Set(cleaned)];
103
+ }
104
+
105
+ /**
106
+ * Build a skills.json record object from scaffolder inputs.
107
+ * Keys are inserted in the canonical emit order so frontmatterFromRecord
108
+ * produces the same byte layout generate-skill-frontmatter.cjs would.
109
+ * @throws on an invalid name, out-of-budget description, or malformed tools.
110
+ */
111
+ function buildSkillRecord(input) {
112
+ const opts = input || {};
113
+ const name = typeof opts.name === 'string' ? opts.name.trim() : opts.name;
114
+ if (!name || typeof name !== 'string') fail('name is required (a kebab-case slug)');
115
+ if (!NAME_RE.test(name)) {
116
+ fail(`name "${name}" must match ${NAME_RE} (lower-case, starts alnum, kebab/dot/underscore)`);
117
+ }
118
+
119
+ const description = typeof opts.description === 'string' ? opts.description.trim() : opts.description;
120
+ if (!description || typeof description !== 'string') fail('description is required');
121
+ if (description.length < DESC_MIN) {
122
+ fail(`description is ${description.length} chars; require >=${DESC_MIN}`);
123
+ }
124
+ if (description.length > DESC_MAX) {
125
+ fail(`description is ${description.length} chars; require <=${DESC_MAX}`);
126
+ }
127
+
128
+ // Insertion order == canonical managed-key emit order (name leads in the
129
+ // emitter; the rest follow record insertion order).
130
+ const rec = { name, description };
131
+
132
+ const argumentHint = opts.argumentHint != null ? String(opts.argumentHint) : undefined;
133
+ if (argumentHint !== undefined) rec.argument_hint = argumentHint;
134
+
135
+ const tools = normalizeTools(opts.tools);
136
+ if (tools !== undefined) rec.tools = tools;
137
+
138
+ if (opts.userInvocable !== undefined) rec.user_invocable = Boolean(opts.userInvocable);
139
+
140
+ const composesWith = normalizeComposesWith(opts.composesWith);
141
+ if (composesWith !== undefined) rec.composes_with = composesWith;
142
+
143
+ return rec;
144
+ }
145
+
146
+ /**
147
+ * Render the SKILL.md template string for a record.
148
+ * Frontmatter is emitted via the shared generate-skill-frontmatter emitter so
149
+ * it is a fixed point with the forward generator. composes_with (a Phase 50
150
+ * field not yet in the emitter's MANAGED set) is appended as an explicit
151
+ * frontmatter line; `--extract` carries it verbatim in extra_frontmatter.
152
+ */
153
+ function renderSkillMd(record) {
154
+ if (!record || typeof record !== 'object') fail('renderSkillMd requires a record object');
155
+ // Validate/normalize defensively so renderSkillMd(buildSkillRecord(x)) and
156
+ // renderSkillMd(rawObject) both produce a contract-valid file.
157
+ const rec = buildSkillRecord({
158
+ name: record.name,
159
+ description: record.description,
160
+ argumentHint: record.argument_hint,
161
+ tools: record.tools,
162
+ userInvocable: record.user_invocable,
163
+ composesWith: record.composes_with,
164
+ });
165
+
166
+ // Separate composes_with: the shared emitter only knows the MANAGED keys, so
167
+ // composes_with rides as an extra_frontmatter line (the round-trip home the
168
+ // forward generator already uses for non-managed keys).
169
+ const composesWith = rec.composes_with;
170
+ const emitRec = { ...rec };
171
+ delete emitRec.composes_with;
172
+ if (composesWith && composesWith.length) {
173
+ emitRec.extra_frontmatter = [`composes_with: [${composesWith.join(', ')}]`];
174
+ }
175
+
176
+ const frontmatter = frontmatterFromRecord(emitRec);
177
+ const prefix = '{{command_prefix}}';
178
+ const upper = rec.name.toUpperCase();
179
+
180
+ const body = [
181
+ '',
182
+ `# ${prefix}${rec.name}`,
183
+ '',
184
+ `**Role:** ${rec.description.split('. ')[0]}.`,
185
+ '',
186
+ '## Steps',
187
+ '',
188
+ '1. State the preconditions this skill needs (read `.design/STATE.md` if relevant).',
189
+ '2. Do the work. Keep each step a single concrete action.',
190
+ '3. Report the result and recommend the next action.',
191
+ '',
192
+ '## Output',
193
+ '',
194
+ '```',
195
+ `${prefix}${rec.name} result summary goes here.`,
196
+ '```',
197
+ '',
198
+ '## Do Not',
199
+ '',
200
+ '- Do not exceed the authoring-contract length cap (warn at 100 lines).',
201
+ '- Do not invent state; read it from `.design/`.',
202
+ '',
203
+ `## ${upper} COMPLETE`,
204
+ '',
205
+ ].join('\n');
206
+
207
+ return `---\n${frontmatter}\n---\n${body}`;
208
+ }
209
+
210
+ /**
211
+ * Heuristic composition suggestions for a new skill.
212
+ * Returns skill names from `allSkills` that share a lifecycle-stage keyword
213
+ * with `name` (or whose name substring-matches a shared stage token). The
214
+ * new skill itself is never suggested. Order: stable by allSkills order.
215
+ * @param {string} name new skill slug
216
+ * @param {Array<string|{name:string}>} allSkills existing skills (names or records)
217
+ * @returns {string[]} suggested composition neighbours (possibly empty)
218
+ */
219
+ function suggestComposesWith(name, allSkills) {
220
+ if (!name || typeof name !== 'string') return [];
221
+ const self = name.trim().toLowerCase();
222
+ const names = (Array.isArray(allSkills) ? allSkills : [])
223
+ .map((s) => (typeof s === 'string' ? s : s && s.name))
224
+ .filter((n) => typeof n === 'string' && n.trim() && n.trim().toLowerCase() !== self)
225
+ .map((n) => n.trim());
226
+
227
+ // Which stage groups does the new skill touch?
228
+ const tokensOf = (slug) => slug.toLowerCase().split(/[-._]/).filter(Boolean);
229
+ const selfTokens = new Set(tokensOf(self));
230
+ const selfGroups = new Set();
231
+ STAGE_GROUPS.forEach((group, idx) => {
232
+ if (group.some((kw) => selfTokens.has(kw) || self.includes(kw))) selfGroups.add(idx);
233
+ });
234
+
235
+ if (selfGroups.size === 0) return [];
236
+
237
+ const seen = new Set();
238
+ const out = [];
239
+ for (const candidate of names) {
240
+ if (seen.has(candidate)) continue;
241
+ const cTokens = new Set(tokensOf(candidate));
242
+ const inGroup = [...selfGroups].some((idx) =>
243
+ STAGE_GROUPS[idx].some((kw) => cTokens.has(kw) || candidate.toLowerCase().includes(kw)),
244
+ );
245
+ if (inGroup) {
246
+ out.push(candidate);
247
+ seen.add(candidate);
248
+ }
249
+ }
250
+ return out;
251
+ }
252
+
253
+ module.exports = {
254
+ buildSkillRecord,
255
+ renderSkillMd,
256
+ suggestComposesWith,
257
+ NAME_RE,
258
+ DESC_MIN,
259
+ DESC_MAX,
260
+ STAGE_GROUPS,
261
+ };
@@ -60,6 +60,20 @@
60
60
  },
61
61
  "description": "Reserved for pin shortcuts; honored by the pin metadata catalogue."
62
62
  },
63
+ "composes_with": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ },
68
+ "description": "Phase 50 (v3) optional: skill names this skill calls as sub-orchestration. Each becomes a directed composition edge validated by scripts/validate-composition-graph.cjs (must be a DAG, no dangling refs)."
69
+ },
70
+ "next_skills": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string"
74
+ },
75
+ "description": "Phase 50 (v3) optional: pipeline hint listing skill names that naturally run after this one. Each becomes a directed edge in the composition graph (DAG, no dangling refs)."
76
+ },
63
77
  "extra_frontmatter": {
64
78
  "type": "array",
65
79
  "items": {
@@ -22,7 +22,7 @@
22
22
  },
23
23
  {
24
24
  "name": "audit",
25
- "description": "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 6-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix.",
25
+ "description": "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 6-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix. Activates for requests involving scoring an existing design, retroactively reviewing quality, or re-checking after a fix.",
26
26
  "argument_hint": "[--retroactive] [--quick] [--no-reflect]",
27
27
  "tools": "Read, Write, Task, Glob, Bash"
28
28
  },
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  "name": "brief",
50
- "description": "Stage 1 of 5 design intake that captures problem statement, audience, constraints, success metrics, and scope into .design/BRIEF.md, and bootstraps .design/STATE.md if missing. Use when starting a new design cycle and before {{command_prefix}}explore.",
50
+ "description": "Stage 1 of 5 design intake that captures problem statement, audience, constraints, success metrics, and scope into .design/BRIEF.md, and bootstraps .design/STATE.md if missing. Use when starting a new design cycle and before {{command_prefix}}explore. Activates for requests involving capturing a problem statement, defining audience and constraints, or starting a new design brief.",
51
51
  "argument_hint": "[--re-brief to redo intake on existing project]",
52
52
  "tools": "Read, Write, AskUserQuestion, mcp__gdd_state__frontmatter_update, mcp__gdd_state__set_status, mcp__gdd_state__update_progress, mcp__gdd_state__get"
53
53
  },
@@ -73,7 +73,7 @@
73
73
  },
74
74
  {
75
75
  "name": "compare",
76
- "description": "Compute the delta between the `DESIGN.md` baseline (from scan) and the `DESIGN-VERIFICATION.md` result (from verify), reporting per-category score delta, anti-pattern delta (resolved vs new), must-have pass/fail change, and design drift (regressions without covering tasks in `DESIGN-PLAN.md`). Use after `verify` to measure whether a design pipeline cycle actually improved the design. Writes `.design/COMPARE-REPORT.md`.",
76
+ "description": "Compute the delta between the `DESIGN.md` baseline (from scan) and the `DESIGN-VERIFICATION.md` result (from verify), reporting per-category score delta, anti-pattern delta (resolved vs new), must-have pass/fail change, and design drift (regressions without covering tasks in `DESIGN-PLAN.md`). Use after `verify` to measure whether a design pipeline cycle actually improved the design. Writes `.design/COMPARE-REPORT.md`. Activates for requests involving diffing a design baseline against verification output, or a before-after design delta.",
77
77
  "argument_hint": "",
78
78
  "user_invocable": true
79
79
  },
@@ -85,7 +85,7 @@
85
85
  },
86
86
  {
87
87
  "name": "connections",
88
- "description": "Interactive onboarding wizard for the 33 external integrations the pipeline supports - probes all (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`, `lazyweb`, `mobbin`, `slack`, `discord`, `linear`, `jira`, `notion`, `lottie`, `rive`, `framer`, `penpot`, `webflow`, `v0-dev`, `plasmic`, `builder-io`, `launchdarkly`, `statsig`, `growthbook`, `usertesting`, `maze`, `hotjar`), recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to `STATE.md <connections>`. Use after `{{command_prefix}}new-project` or whenever the user wants to add, inspect, or skip a connection. Re-runnable anytime.",
88
+ "description": "Interactive onboarding wizard for the 33 external integrations the pipeline supports - probes all (`figma`, `refero`, `preview`, `storybook`, `chromatic`, `graphify`, `pinterest`, `claude-design`, `paper-design`, `pencil-dev`, `21st-dev`, `magic-patterns`, `lazyweb`, `mobbin`, `slack`, `discord`, `linear`, `jira`, `notion`, `lottie`, `rive`, `framer`, `penpot`, `webflow`, `v0-dev`, `plasmic`, `builder-io`, `launchdarkly`, `statsig`, `growthbook`, `usertesting`, `maze`, `hotjar`), recommends based on project type, walks the user through setup (auto-run MCP install or copy-command fallback), writes results to `STATE.md <connections>`. Use after `{{command_prefix}}new-project` or whenever the user wants to add, inspect, or skip a connection. Re-runnable anytime. Activates for requests involving setting up external integrations, probing Figma or preview or storybook, or onboarding tools.",
89
89
  "argument_hint": "[list | <connection-name> | --auto]",
90
90
  "user_invocable": true,
91
91
  "tools": "Read, Write, Bash, Glob, Grep, AskUserQuestion, ToolSearch"
@@ -99,7 +99,7 @@
99
99
  },
100
100
  {
101
101
  "name": "darkmode",
102
- "description": "Audit a project's dark mode implementation - detects architecture (CSS custom props, Tailwind `dark:` prefix, or JS class toggle), runs architecture-specific contrast / token-override / anti-pattern / meta-property checks, and writes a prioritized fix list to `.design/DARKMODE-AUDIT.md`. Use when the user wants to verify dark mode quality without re-running the full design pipeline. Read-only - no score writeback to `DESIGN.md`.",
102
+ "description": "Audit a project's dark mode implementation - detects architecture (CSS custom props, Tailwind `dark:` prefix, or JS class toggle), runs architecture-specific contrast / token-override / anti-pattern / meta-property checks, and writes a prioritized fix list to `.design/DARKMODE-AUDIT.md`. Use when the user wants to verify dark mode quality without re-running the full design pipeline. Read-only - no score writeback to `DESIGN.md`. Activates for requests involving auditing dark mode, checking dark-theme contrast, or dark-mode anti-patterns.",
103
103
  "argument_hint": "",
104
104
  "user_invocable": true
105
105
  },
@@ -112,7 +112,7 @@
112
112
  {
113
113
  "name": "design",
114
114
  "frontmatter_name": "design",
115
- "description": "Stage 4 of 5 orchestrator that reads DESIGN-PLAN.md, partitions tasks by wave + parallel-safe flag, and spawns design-executor agents with the appropriate isolation (worktree for parallel batches, in-place for sequential tail). Use when DESIGN-PLAN.md is approved and ready for implementation.",
115
+ "description": "Stage 4 of 5 orchestrator that reads DESIGN-PLAN.md, partitions tasks by wave + parallel-safe flag, and spawns design-executor agents with the appropriate isolation (worktree for parallel batches, in-place for sequential tail). Use when DESIGN-PLAN.md is approved and ready for implementation. Activates for requests involving implementing UI, building components, or turning a plan into working interface code.",
116
116
  "argument_hint": "[--auto] [--parallel] [--variants N]",
117
117
  "user_invocable": true,
118
118
  "tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint"
@@ -120,7 +120,7 @@
120
120
  {
121
121
  "name": "discover",
122
122
  "frontmatter_name": "discover",
123
- "description": "Stage 1.5 of 4 orchestrator that probes Figma / Refero / Pinterest connections, spawns design-context-builder (auto-detect + interview) and (via lazy gate) design-context-checker (6-dimension validator), producing .design/DESIGN-CONTEXT.md. Use after {{command_prefix}}scan when a fast-path context build is wanted instead of the full {{command_prefix}}explore.",
123
+ "description": "Stage 1.5 of 4 orchestrator that probes Figma / Refero / Pinterest connections, spawns design-context-builder (auto-detect + interview) and (via lazy gate) design-context-checker (6-dimension validator), producing .design/DESIGN-CONTEXT.md. Use after {{command_prefix}}scan when a fast-path context build is wanted instead of the full {{command_prefix}}explore. Activates for requests involving detecting an existing design system, inventorying tokens and components, or onboarding a brownfield repo.",
124
124
  "argument_hint": "[--auto]",
125
125
  "user_invocable": true
126
126
  },
@@ -132,13 +132,13 @@
132
132
  },
133
133
  {
134
134
  "name": "do",
135
- "description": "Natural-language design task router. Parses your intent, maps to the right gdd command(s), confirms before executing.",
135
+ "description": "Natural-language design task router. Parses your intent, maps to the right gdd command(s), confirms before executing. Activates for requests involving a natural-language design request, routing intent to the right command, or not knowing which skill to use.",
136
136
  "argument_hint": "<natural language description>",
137
137
  "tools": "Read, Write, AskUserQuestion"
138
138
  },
139
139
  {
140
140
  "name": "explore",
141
- "description": "Stage 2 of 5 - unified exploration merging inventory grep + design interview. Probes 6 connections, scans the codebase, conducts the AskUserQuestion interview, and writes .design/DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md. Use after {{command_prefix}}brief to map the existing system and lock decisions before planning.",
141
+ "description": "Stage 2 of 5 - unified exploration merging inventory grep + design interview. Probes 6 connections, scans the codebase, conducts the AskUserQuestion interview, and writes .design/DESIGN.md + DESIGN-DEBT.md + DESIGN-CONTEXT.md. Use after {{command_prefix}}brief to map the existing system and lock decisions before planning. Activates for requests involving researching design direction, gathering references, or exploring visual options.",
142
142
  "argument_hint": "[--skip-interview] [--skip-scan]",
143
143
  "tools": "Read, Write, Bash, Grep, Glob, Task, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__probe_connections, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__add_decision"
144
144
  },
@@ -156,7 +156,7 @@
156
156
  },
157
157
  {
158
158
  "name": "fast",
159
- "description": "Trivial inline design task. No subagents, no planning documents, no pipeline stages. Just do the thing described.",
159
+ "description": "Trivial inline design task. No subagents, no planning documents, no pipeline stages. Just do the thing described. Activates for requests involving a single quick design fix, a one-shot change, or a fast targeted edit.",
160
160
  "argument_hint": "<task description>",
161
161
  "tools": "Read, Write, Edit, Bash, Grep, Glob",
162
162
  "disable_model_invocation": true
@@ -175,7 +175,7 @@
175
175
  },
176
176
  {
177
177
  "name": "health",
178
- "description": "Reports .design/ artifact health - staleness, missing files, token drift, broken state transitions.",
178
+ "description": "Reports .design/ artifact health - staleness, missing files, token drift, broken state transitions. Activates for requests involving checking .design artifact health, staleness, token drift, or broken state transitions.",
179
179
  "tools": "Read, Bash, Glob, Grep, mcp__gdd_state__get",
180
180
  "disable_model_invocation": true
181
181
  },
@@ -200,7 +200,7 @@
200
200
  },
201
201
  {
202
202
  "name": "live",
203
- "description": "Live in-browser design mode. The user picks a DOM element on a running dev server (via the Claude Preview MCP), the agent generates N design variants in one batch, they hot-swap in place through HMR or preview_eval using a data-gdd-variant marker, the user accepts or discards, and the whole pick-generate-accept loop persists to .design/live-sessions so it survives a crash or resume. Use when the user wants to iterate on the look of a live component against a real running server, asks to try variants on a page, or runs the live command with a url; falls back to a screenshot-only degraded mode on harnesses without MCP support.",
203
+ "description": "Live in-browser design mode. The user picks a DOM element on a running dev server (via the Claude Preview MCP), the agent generates N design variants in one batch, they hot-swap in place through HMR or preview_eval using a data-gdd-variant marker, the user accepts or discards, and the whole pick-generate-accept loop persists to .design/live-sessions so it survives a crash or resume. Use when the user wants to iterate on the look of a live component against a real running server, asks to try variants on a page, or runs the live command with a url; falls back to a screenshot-only degraded mode on harnesses without MCP support. Activates for requests involving in-browser design iteration, picking an element on a dev server, or generating variants with hot-swap.",
204
204
  "argument_hint": "[--variants N] [--resume <session-id>] [url]",
205
205
  "tools": "Read, Write, Edit, Bash, Glob, Grep, Task",
206
206
  "user_invocable": true,
@@ -239,6 +239,14 @@
239
239
  "argument_hint": "[--name <project-name>]",
240
240
  "tools": "Read, Write, AskUserQuestion, Bash, Glob"
241
241
  },
242
+ {
243
+ "name": "new-skill",
244
+ "description": "Scaffolds a new Phase-28.5 + Phase-50-compliant skill: gathers a name, a multi-paragraph v3 description, a lifecycle stage, an allowed-tools list, and optional composes_with neighbours, then writes source/skills/<name>/SKILL.md from the pure generator. Use when adding a brand-new gdd skill and you want the frontmatter, length cap, and v3 description form correct from the first commit. Activates for requests involving authoring a skill, scaffolding a command, creating a new SKILL.md, or adding a slash command.",
245
+ "argument_hint": "<skill-name>",
246
+ "tools": "Read, Write, Bash, AskUserQuestion",
247
+ "user_invocable": true,
248
+ "registered_in_phase": "50"
249
+ },
242
250
  {
243
251
  "name": "next",
244
252
  "description": "Routes to the next pipeline stage based on current STATE.md position",
@@ -304,7 +312,7 @@
304
312
  {
305
313
  "name": "plan",
306
314
  "frontmatter_name": "plan",
307
- "description": "Stage 3 of 5 orchestrator that reads DESIGN-CONTEXT.md, runs optional research (phase-researcher / pattern-mapper / assumptions-analyzer / synthesizer), spawns design-planner + design-plan-checker, and writes DESIGN-PLAN.md. Use when DESIGN-CONTEXT.md is locked and you need a wave-ordered execution plan.",
315
+ "description": "Stage 3 of 5 orchestrator that reads DESIGN-CONTEXT.md, runs optional research (phase-researcher / pattern-mapper / assumptions-analyzer / synthesizer), spawns design-planner + design-plan-checker, and writes DESIGN-PLAN.md. Use when DESIGN-CONTEXT.md is locked and you need a wave-ordered execution plan. Activates for requests involving breaking design work into steps, sequencing implementation, or planning a build.",
308
316
  "argument_hint": "[--auto] [--parallel]",
309
317
  "user_invocable": true,
310
318
  "tools": "Read, Write, Bash, Glob, Task, AskUserQuestion, ToolSearch, mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_decision, mcp__gdd_state__add_must_have, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__add_blocker, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections"
@@ -325,7 +333,7 @@
325
333
  },
326
334
  {
327
335
  "name": "progress",
328
- "description": "Shows current pipeline position and routes to next action. --forensic runs 6-check integrity audit.",
336
+ "description": "Shows current pipeline position and routes to next action. --forensic runs 6-check integrity audit. Activates for requests involving showing current project state, routing to the next action, or a status check.",
329
337
  "argument_hint": "[--forensic]",
330
338
  "tools": "Read, Bash, Grep, Glob, mcp__gdd_state__get, mcp__gdd_status, mcp__gdd_phase_current"
331
339
  },
@@ -349,7 +357,7 @@
349
357
  },
350
358
  {
351
359
  "name": "quick",
352
- "description": "Run the pipeline with optional agents skipped for speed. Skips: phase-researcher, design-assumptions-analyzer, design-integration-checker. Keeps: planner, executor, verifier, auditor.",
360
+ "description": "Run the pipeline with optional agents skipped for speed. Skips: phase-researcher, design-assumptions-analyzer, design-integration-checker. Keeps: planner, executor, verifier, auditor. Activates for requests involving a lightweight design pass, a fast iteration, or a quick low-ceremony change.",
353
361
  "argument_hint": "[--skip <agent-name>] [stage]",
354
362
  "tools": "Read, Task",
355
363
  "disable_model_invocation": true
@@ -424,7 +432,7 @@
424
432
  {
425
433
  "name": "scan",
426
434
  "frontmatter_name": "scan",
427
- "description": "Pre-pipeline initializer that maps an existing repo's design system (colors, typography, spacing, components, tokens), runs the anti-pattern audit, scores the 7 weighted categories, and writes DESIGN.md + .design/DESIGN-DEBT.md. Use when starting work in any new or existing repo before {{command_prefix}}discover.",
435
+ "description": "Pre-pipeline initializer that maps an existing repo's design system (colors, typography, spacing, components, tokens), runs the anti-pattern audit, scores the 7 weighted categories, and writes DESIGN.md + .design/DESIGN-DEBT.md. Use when starting work in any new or existing repo before {{command_prefix}}discover. Activates for requests involving a fast read-only anti-pattern sweep, a quick design lint, or spotting slop without a full audit.",
428
436
  "argument_hint": "[--quick] [--full]",
429
437
  "user_invocable": true
430
438
  },
@@ -437,7 +445,7 @@
437
445
  },
438
446
  {
439
447
  "name": "ship",
440
- "description": "Post-verify PR flow - creates a clean PR branch, invokes code review check, and prepares the PR for merge.",
448
+ "description": "Post-verify PR flow - creates a clean PR branch, invokes code review check, and prepares the PR for merge. Activates for requests involving finishing a cycle, packaging design output, or moving work to a pull request.",
441
449
  "argument_hint": "[--title <PR title>] [--draft]",
442
450
  "tools": "Read, Write, Bash, AskUserQuestion, Task",
443
451
  "disable_model_invocation": true
@@ -556,7 +564,7 @@
556
564
  {
557
565
  "name": "verify",
558
566
  "frontmatter_name": "verify",
559
- "description": "Stage 5 of 5 orchestrator that spawns design-auditor, design-verifier, and design-integration-checker in sequence, interprets pass/gap result, and drives the gap-response loop (inline fix, save-and-exit, or accept-as-is). Use when implementation is complete and ready for final pre-ship verification.",
567
+ "description": "Stage 5 of 5 orchestrator that spawns design-auditor, design-verifier, and design-integration-checker in sequence, interprets pass/gap result, and drives the gap-response loop (inline fix, save-and-exit, or accept-as-is). Use when implementation is complete and ready for final pre-ship verification. Activates for requests involving checking finished UI against the design system, running a pre-ship review, or final verification.",
560
568
  "argument_hint": "[--auto] [--post-handoff]",
561
569
  "user_invocable": true,
562
570
  "tools": "mcp__gdd_state__get, mcp__gdd_state__transition_stage, mcp__gdd_state__add_must_have, mcp__gdd_state__add_blocker, mcp__gdd_state__resolve_blocker, mcp__gdd_state__update_progress, mcp__gdd_state__set_status, mcp__gdd_state__checkpoint, mcp__gdd_state__probe_connections"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdd-audit
3
- description: "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 6-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix."
3
+ description: "Run a design audit by spawning design-auditor, design-integration-checker, and (optionally) design-verifier + design-reflector agents, then printing a consolidated 6-pillar score summary. Use when the user wants to score the current design, retroactively verify a completed cycle, or quickly re-check after a fix. Activates for requests involving scoring an existing design, retroactively reviewing quality, or re-checking after a fix."
4
4
  argument-hint: "[--retroactive] [--quick] [--no-reflect]"
5
5
  tools: Read, Write, Task, Glob, Bash
6
6
  ---