@duro-app/cli 5.15.0 → 5.17.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 (77) hide show
  1. package/README.md +32 -11
  2. package/dist/bin.js +13 -5
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/doctor.d.ts +7 -1
  5. package/dist/commands/doctor.d.ts.map +1 -1
  6. package/dist/commands/doctor.js +25 -12
  7. package/dist/commands/doctor.js.map +1 -1
  8. package/dist/commands/hook.d.ts.map +1 -1
  9. package/dist/commands/hook.js +11 -2
  10. package/dist/commands/hook.js.map +1 -1
  11. package/dist/commands/list.d.ts.map +1 -1
  12. package/dist/commands/list.js +23 -2
  13. package/dist/commands/list.js.map +1 -1
  14. package/dist/commands/lookup.d.ts.map +1 -1
  15. package/dist/commands/lookup.js +15 -1
  16. package/dist/commands/lookup.js.map +1 -1
  17. package/dist/commands/mcp.d.ts +57 -0
  18. package/dist/commands/mcp.d.ts.map +1 -1
  19. package/dist/commands/mcp.js +87 -37
  20. package/dist/commands/mcp.js.map +1 -1
  21. package/dist/commands/mockup.d.ts +33 -5
  22. package/dist/commands/mockup.d.ts.map +1 -1
  23. package/dist/commands/mockup.js +167 -13
  24. package/dist/commands/mockup.js.map +1 -1
  25. package/dist/commands/skill.d.ts +6 -0
  26. package/dist/commands/skill.d.ts.map +1 -1
  27. package/dist/commands/skill.js +168 -24
  28. package/dist/commands/skill.js.map +1 -1
  29. package/dist/format.d.ts.map +1 -1
  30. package/dist/format.js +7 -0
  31. package/dist/format.js.map +1 -1
  32. package/dist/hook-script.d.ts +2 -2
  33. package/dist/hook-script.d.ts.map +1 -1
  34. package/dist/hook-script.js +1 -1
  35. package/dist/manifest.d.ts +2 -0
  36. package/dist/manifest.d.ts.map +1 -1
  37. package/dist/manifest.js +28 -10
  38. package/dist/manifest.js.map +1 -1
  39. package/dist/registry-types.d.ts +5 -0
  40. package/dist/registry-types.d.ts.map +1 -1
  41. package/dist/registry.d.ts +20 -0
  42. package/dist/registry.d.ts.map +1 -1
  43. package/dist/registry.js +38 -0
  44. package/dist/registry.js.map +1 -1
  45. package/dist/skill-template.d.ts +1 -1
  46. package/dist/skill-template.d.ts.map +1 -1
  47. package/dist/skill-template.js +20 -9
  48. package/dist/skill-template.js.map +1 -1
  49. package/package.json +6 -5
  50. package/registry.json +35 -0
  51. package/{LICENSE → skills/colors/LICENSE} +1 -1
  52. package/skills/colors/NOTICE.md +36 -0
  53. package/skills/colors/SKILL.md +99 -0
  54. package/skills/colors/color-formats.md +90 -0
  55. package/skills/colors/color-usage.md +109 -0
  56. package/skills/colors/contrast.md +70 -0
  57. package/skills/colors/palette-generation.md +108 -0
  58. package/skills/colors/palette-structure.md +72 -0
  59. package/skills/colors/token-naming.md +99 -0
  60. package/skills/typography/LICENSE +21 -0
  61. package/skills/typography/NOTICE.md +36 -0
  62. package/skills/typography/SKILL.md +169 -0
  63. package/skills/typography/choosing-fonts.md +53 -0
  64. package/skills/typography/css-cheat-sheet.md +67 -0
  65. package/skills/typography/details-and-accessibility.md +84 -0
  66. package/skills/typography/spacing-and-sizing.md +87 -0
  67. package/skills/typography/variable-fonts-and-opentype.md +100 -0
  68. package/skills/typography/wrapping-and-punctuation.md +23 -0
  69. package/skills/ui/LICENSE +21 -0
  70. package/skills/ui/NOTICE.md +36 -0
  71. package/skills/ui/SKILL.md +139 -0
  72. package/skills/ui/animations.md +170 -0
  73. package/skills/ui/enter-exit.md +157 -0
  74. package/skills/ui/icon-transitions.md +72 -0
  75. package/skills/ui/icons.md +105 -0
  76. package/skills/ui/performance.md +63 -0
  77. package/skills/ui/surfaces.md +166 -0
package/dist/manifest.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { lookupNames } from './registry.js';
2
+ /** `duro mockup <sub>`: the spec owns the names, the command dispatches on them. */
3
+ export const MOCKUP_SUBCOMMANDS = ['seed', 'check', 'canvas'];
2
4
  export const COMMANDS = [
3
5
  {
4
6
  name: 'lookup',
@@ -79,12 +81,12 @@ export const COMMANDS = [
79
81
  },
80
82
  {
81
83
  name: 'skill',
82
- summary: 'Claude Code skill /duro-mockup — the mockup → implementation → proof workflow; install writes it into the current repo',
84
+ summary: 'Claude Code skills — /duro-mockup (the mockup → implementation → proof workflow) plus the colors, typography and ui interface skills; install writes all four into the current repo',
83
85
  args: [
84
86
  {
85
87
  name: 'action',
86
88
  required: true,
87
- description: 'install (write .claude/skills/duro-mockup/SKILL.md)',
89
+ description: 'install (write .claude/skills/{duro-mockup,colors,typography,ui}/)',
88
90
  valuesFrom: 'skillActions',
89
91
  },
90
92
  ],
@@ -94,41 +96,56 @@ export const COMMANDS = [
94
96
  type: 'boolean',
95
97
  description: 'install: report drift and exit 1 instead of writing (for CI)',
96
98
  },
99
+ {
100
+ name: 'force',
101
+ type: 'boolean',
102
+ description: 'install: with --force, write into an existing colors, typography or ui skill directory that lacks the shipped NOTICE.md (a skill of your own); without --force install refuses',
103
+ },
97
104
  ],
98
105
  returns: {
99
106
  shape: '{ok: boolean, changes: FileChange[]}',
100
- description: 'What the wired file did',
107
+ description: 'What each wired file did: written, unchanged, stale or removed',
101
108
  },
102
109
  examples: ['duro skill install', 'duro skill install --check'],
103
110
  },
104
111
  {
105
112
  name: 'mockup',
106
- summary: 'Token-seeded mockup artboards: seed writes a .dc.html whose only design vocabulary is the resolved token block; check refuses raw colours/values and controls that name no component',
113
+ summary: 'Token-seeded mockup artboards: seed writes a .dc.html whose only design vocabulary is the resolved token block; check refuses raw colours/values and controls that name no component; canvas writes one review page of every direction in a directory, refusing any artboard that fails check',
107
114
  args: [
108
115
  {
109
116
  name: 'action',
110
117
  required: true,
111
- description: 'seed (write <Name>.dc.html) | check <file.dc.html>... (exit 1 on findings)',
118
+ description: 'seed (write <Name>.dc.html) | check <file.dc.html>... (exit 1 on findings) | canvas <dir> (write the review page; exit 1 on findings)',
112
119
  valuesFrom: 'mockupActions',
113
120
  },
114
121
  ],
115
122
  flags: [
116
- { name: 'out', type: 'string', description: 'seed: directory (default docs/mockups/<name>)' },
123
+ {
124
+ name: 'out',
125
+ type: 'string',
126
+ description: 'seed: directory (default docs/mockups/<name>); canvas: the page (default <dir>/canvas.html)',
127
+ },
117
128
  { name: 'name', type: 'string', description: 'seed: artboard stem (default Main)' },
118
129
  {
119
130
  name: 'theme',
120
131
  type: 'string',
121
132
  description: 'seed: dark (default) | light | high-contrast — sets <html data-theme>',
122
133
  },
134
+ {
135
+ name: 'title',
136
+ type: 'string',
137
+ description: 'canvas: the page title (default "<dir> directions")',
138
+ },
123
139
  ],
124
140
  returns: {
125
- shape: '{ok: boolean, path: string} | {ok: boolean, findings: Finding[]}',
141
+ shape: '{ok: boolean, path: string} | {ok: boolean, findings: Finding[], skew?: {own, installed}} | {ok: boolean, path: string, artboards: number, skew?: {own, installed}}',
126
142
  description: 'seed: where it wrote. check: {file, line, rule, message} per finding — raw-color, raw-length, raw-breakpoint, unknown-component, no-component-map, unannotated-control',
127
143
  },
128
144
  examples: [
129
145
  'duro mockup seed --name Main --out docs/mockups/approvals',
130
146
  'duro mockup check docs/mockups/approvals/*.dc.html',
131
147
  'duro mockup check Main.dc.html --json',
148
+ 'duro mockup canvas docs/mockups/approvals',
132
149
  ],
133
150
  mcpTool: 'duro_ds_mockup_check',
134
151
  },
@@ -151,7 +168,7 @@ export const COMMANDS = [
151
168
  },
152
169
  {
153
170
  name: 'mcp',
154
- summary: 'Run a stdio MCP server exposing duro_ds_lookup / duro_ds_list / duro_ds_manifest / duro_ds_mockup_check',
171
+ summary: 'Run a stdio MCP server exposing duro_ds_lookup / duro_ds_list / duro_ds_manifest / duro_ds_mockup_check / duro_ds_mockup_canvas',
155
172
  args: [],
156
173
  flags: [],
157
174
  returns: { shape: 'never', description: 'Serves until stdin closes' },
@@ -174,10 +191,11 @@ export function buildManifest(registry, version) {
174
191
  ],
175
192
  commands: COMMANDS,
176
193
  enums: {
177
- names: lookupNames(registry),
194
+ // Guides are fetched by name (guide:<skill>) and stay out of the manifest.
195
+ names: lookupNames(registry).filter((name) => !name.startsWith('guide:')),
178
196
  kinds: ['components', 'recipes', 'tokens'],
179
197
  events: ['session-start', 'install'],
180
- mockupActions: ['seed', 'check'],
198
+ mockupActions: MOCKUP_SUBCOMMANDS,
181
199
  skillActions: ['install'],
182
200
  },
183
201
  };
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAgBzC,MAAM,CAAC,MAAM,QAAQ,GAAkB;IACrC;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EACL,+LAA+L;QACjM,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,uGAAuG;gBACzG,UAAU,EAAE,OAAO;aACpB;SACF;QACD,KAAK,EAAE;YACL,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAC;YACtF,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAC;YAChE,EAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,oCAAoC,EAAC;SAC1F;QACD,OAAO,EAAE;YACP,KAAK,EACH,wFAAwF;YAC1F,WAAW,EAAE,uEAAuE;SACrF;QACD,QAAQ,EAAE;YACR,aAAa;YACb,yBAAyB;YACzB,+BAA+B;YAC/B,uBAAuB;SACxB;QACD,OAAO,EAAE,gBAAgB;KAC1B;IACD;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,yCAAyC;QAClD,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,8CAA8C;gBAC3D,UAAU,EAAE,OAAO;aACpB;SACF;QACD,KAAK,EAAE,EAAE;QACT,OAA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sB,EAAC;SACzE;QACD,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE;YACL,2EAA2E;YAC3E,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzE,KAAK,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;YAC1C,MAAM,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;YACpC,aAAa,EAAE,kBAAkB;YACjC,YAAY,EAAE,CAAC,SAAS,CAAC;SAC1B;KACF,CAAA;AACH,CAAC"}
@@ -10,6 +10,11 @@ export interface Registry {
10
10
  rules: RulesRegistry;
11
11
  /** Exported string-literal unions: ButtonVariant -> ['primary', ...]. */
12
12
  unions: Record<string, string[]>;
13
+ /**
14
+ * The packaged interface skills (packages/cli/skills): skill name -> relative
15
+ * path -> file text. Absent in a registry built before guides existed.
16
+ */
17
+ guides?: Record<string, Record<string, string>>;
13
18
  }
14
19
  export type ComponentKind = 'component' | 'compound' | 'provider' | 'hook' | 'function';
15
20
  export interface ComponentEntry {
@@ -1 +1 @@
1
- {"version":3,"file":"registry-types.d.ts","sourceRoot":"","sources":["../src/registry-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAA;AAE9D,YAAY,EAAC,aAAa,EAAC,CAAA;AAE3B,MAAM,WAAW,QAAQ;IACvB,4EAA4E;IAC5E,aAAa,EAAE,CAAC,CAAA;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACpC,MAAM,EAAE,aAAa,CAAA;IACrB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,aAAa,CAAA;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAA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,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,SAAS,GAAG,YAAY,GAAG,MAAM,CAAA;IAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC"}
@@ -25,7 +25,27 @@ export type LookupResult = {
25
25
  kind: 'rules';
26
26
  key: string;
27
27
  entry: Registry['rules'];
28
+ } | {
29
+ kind: 'guide';
30
+ key: string;
31
+ skill: string;
32
+ file: string;
33
+ content: string;
34
+ };
35
+ export declare const GUIDE_PREFIX = "guide:";
36
+ export type GuideLookup = {
37
+ ok: true;
38
+ skill: string;
39
+ file: string;
40
+ content: string;
41
+ } | {
42
+ ok: false;
43
+ message: string;
28
44
  };
45
+ /** `guide:<skill>` is the skill's SKILL.md; `guide:<skill>/<file>` is one of its files. */
46
+ export declare function lookupGuide(registry: Registry, name: string): GuideLookup;
47
+ /** Lookup names of the guides: `guide:<skill>` and `guide:<skill>/<file>` for the rest. */
48
+ export declare function guideNames(registry: Registry): string[];
29
49
  /** All lookup names, for suggestions and the manifest's enums. */
30
50
  export declare function lookupNames(registry: Registry): string[];
31
51
  export declare function lookup(registry: Registry, name: string): LookupResult | null;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],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,CAwBzE;AAED,2FAA2F;AAC3F,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,CAMvD;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,CASxD;AAED,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAoB5E"}
package/dist/registry.js CHANGED
@@ -24,6 +24,38 @@ export function loadRegistry() {
24
24
  cached = parsed;
25
25
  return parsed;
26
26
  }
27
+ export const GUIDE_PREFIX = 'guide:';
28
+ const GUIDE_ENTRY = 'SKILL.md';
29
+ /** `guide:<skill>` is the skill's SKILL.md; `guide:<skill>/<file>` is one of its files. */
30
+ export function lookupGuide(registry, name) {
31
+ const guides = registry.guides;
32
+ const spec = name.slice(GUIDE_PREFIX.length);
33
+ const slash = spec.indexOf('/');
34
+ const skill = slash === -1 ? spec : spec.slice(0, slash);
35
+ const file = slash === -1 ? GUIDE_ENTRY : spec.slice(slash + 1);
36
+ if (!guides || Object.keys(guides).length === 0) {
37
+ return { ok: false, message: `unknown guide "${skill}" — this registry has no guides` };
38
+ }
39
+ const files = guides[skill];
40
+ if (!files) {
41
+ return {
42
+ ok: false,
43
+ message: `unknown guide "${skill}" — guides: ${Object.keys(guides).join(', ')}`,
44
+ };
45
+ }
46
+ const content = files[file];
47
+ if (content === undefined) {
48
+ return {
49
+ ok: false,
50
+ message: `unknown file "${file}" in guide "${skill}" — files: ${Object.keys(files).join(', ')}`,
51
+ };
52
+ }
53
+ return { ok: true, skill, file, content };
54
+ }
55
+ /** Lookup names of the guides: `guide:<skill>` and `guide:<skill>/<file>` for the rest. */
56
+ export function guideNames(registry) {
57
+ return Object.entries(registry.guides ?? {}).flatMap(([skill, files]) => Object.keys(files).map((file) => file === GUIDE_ENTRY ? `${GUIDE_PREFIX}${skill}` : `${GUIDE_PREFIX}${skill}/${file}`));
58
+ }
27
59
  /** All lookup names, for suggestions and the manifest's enums. */
28
60
  export function lookupNames(registry) {
29
61
  return [
@@ -32,9 +64,15 @@ export function lookupNames(registry) {
32
64
  ...Object.keys(registry.tokens.groups),
33
65
  'icons',
34
66
  'rules',
67
+ ...guideNames(registry),
35
68
  ];
36
69
  }
37
70
  export function lookup(registry, name) {
71
+ // Resolved first: typography, colors and spacing are also token-group names.
72
+ if (name.startsWith(GUIDE_PREFIX)) {
73
+ const guide = lookupGuide(registry, GUIDE_PREFIX + name.slice(GUIDE_PREFIX.length));
74
+ return guide.ok ? { kind: 'guide', key: name, ...guide } : null;
75
+ }
38
76
  if (name === 'rules')
39
77
  return { kind: 'rules', key: name, entry: registry.rules };
40
78
  if (name === 'icons')
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAGpC,IAAI,MAAM,GAAoB,IAAI,CAAA;AAElC;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAA;IACzB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACxD,IAAI,MAAgB,CAAA;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAa,CAAA;IAC5D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QACzF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,CAA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;QACjC,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAC,CAAA;IACzE,CAAC;IACD,iDAAiD;IACjD,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAChC,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,CAAA;IAC1F,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAC3D,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -20,5 +20,5 @@ export declare const SKILL_NOTES_PATH = ".claude/duro-mockup.local.md";
20
20
  * up as --check drift.
21
21
  */
22
22
  export declare const SKILL_MIN_CLI = "5.0.0";
23
- export declare const SKILL = "---\nname: duro-mockup\ndescription: Take a new screen from mockup directions to an implemented, verified PR without leaving the Duro design system. Use whenever the user asks for a screen, a page, a UI proposal, mockups, or \"show me options\" in a repo that consumes @duro-app/ui \u2014 and when planning (plan mode) a new screen or a material layout, hierarchy or interaction change there.\n---\n\n# duro-mockup\n\nGENERATED by `duro skill install` \u2014 do not hand-edit. Regenerate:\n`npx -y @duro-app/cli@^5.0.0 skill install` (`--check` verifies it in CI). Repo-specific notes\nlive in `.claude/duro-mockup.local.md`; read it if it exists.\n\nStanding rule (fleet decision `ui.mockup-handoff`): a mockup is written in\nthe design system's own vocabulary, and the direction the user picks is a\ncontract. What binds: layout, hierarchy, states, the `data-duro` component\nmap and the token names, sizes and border widths included (ADR-0027). What\ndoes not bind: positions (top, left, inset, transform).\n\n**This overrides the `design` skill's step 0.** That skill says to lift\nresolved values from the real stylesheets. Here you never write a resolved\nvalue: every colour, spacing, radius, font, shadow and duration is a\n`var(--duro-*)` from the seeded token block, and every element a person can\nact on carries `data-duro=\"<Component>\"`. The rest of the `design` skill\n(artboard shape, `seed-canvas.mjs`, the canvas Artifact) still applies.\n\n## Args\n\n- `propose <screen>` \u2014 seed 2\u20134 direction artboards, check them, publish the canvas.\n- `implement <screen> <direction>` \u2014 build the picked direction from its component map.\n- `prove <route>` \u2014 screenshot the built route and assemble the PR section.\n- no args \u2014 infer the stage from what exists under `docs/mockups/<screen>/`.\n\n## propose\n\n```bash\nnpx -y @duro-app/cli@^5.0.0 mockup seed --out docs/mockups/<screen> --name Main # direction A\nnpx -y @duro-app/cli@^5.0.0 mockup seed --out docs/mockups/<screen> --name <Direction> # B, C, \u2026\n```\n\n- `<screen>` is kebab-case (`approval-gates`). Artboards are committed with\n the PR \u2014 never leave them in a scratch directory; a session scratchpad is\n garbage-collected and the canvas URL would be the only surviving artefact.\n- Author each artboard inside the seeded `<style>` and root div. Colours,\n spacing, radii, sizes, border widths, type, shadows and motion come only\n from the token block (`var(--duro-size-*)`, `var(--duro-border-*)`);\n positions are yours, and the root keeps the seeded canvas size\n (`var(--duro-mockup-canvas-width)` / `-height`). A custom property you define\n outside the token block holds a token too (`--gap: var(--duro-spacing-md)`);\n `--gap: 12px` is the same raw value one `var()` away. Every button, row, chip, tab,\n input, link, table and dialog \u2014 whatever element it is drawn as \u2014 carries\n `data-duro=\"<Component>\"` or `data-duro=\"<Component>.<Part>\"`, using names\n from `npx -y @duro-app/cli@^5.0.0 list components`. Notes for the implementer go after the\n name: `data-duro=\"Button variant=primary\"`.\n- Start from a recipe when one fits the screen shape (`npx -y @duro-app/cli@^5.0.0 list recipes`\n \u2014 admin-detail-page, split-pane, page-with-sidenav, settings-page, \u2026) and\n say so in the artboard's header comment; a hand-rolled layout needs a reason.\n- Gate before publishing:\n\n```bash\nnpx -y @duro-app/cli@^5.0.0 mockup check docs/mockups/<screen>/*.dc.html\n```\n\n Exit 1 lists `file:line rule: message`. Fix every finding; do not publish\n an artboard that fails. Then seed the canvas with the `design` skill's\n helper (it lives under the current Claude Code version's bundled-skills\n directory \u2014 locate it, never hardcode the path) and publish the Artifact.\n- Ask the user to pick a direction. Record the answer as\n `<canvas URL> \u00B7 direction <X>` \u2014 it goes in the PR.\n- If the user edits an artboard in the canvas editor, its property panel\n writes literals back over `var()` by design. Re-extract and run\n `mockup check` again, but treat those findings as advisory: the authored\n file in `docs/mockups/` is the contract, the canvas is the review surface.\n\n## implement\n\n- Read the picked artboard. Its `data-duro` attributes ARE the component\n list: for each one, `npx -y @duro-app/cli@^5.0.0 <Component>` (or the `duro_ds_lookup` MCP\n tool) gives props and usage. Do not substitute a hand-rolled element for a\n named component; if a named component does not fit, say so and propose the\n design-system change rather than working around it.\n- Tokens map one to one: `var(--duro-spacing-md)` is `spacing.md` from\n `@duro-app/tokens/tokens/spacing.css`, `--duro-color-bg-card` is\n `colors.bgCard`, `--duro-radius-sm` is `radii.sm`, `--duro-typography-*`\n and `--duro-type-scale-*` are `typography`/`typeScale`, `--duro-shadow-*`\n is `shadows`, `--duro-duration-*`/`--duro-easing-*` are `duration`/`easing`.\n A media query on `768px` is `breakpoints.md` from\n `@duro-app/tokens/tokens/breakpoints.css`. The lint config refuses the raw\n value, so write the token the first time.\n- Layout comes from a recipe before a grid: `npx -y @duro-app/cli@^5.0.0 <recipe> --source-only`.\n- Positions in the artboard are a sketch: match its hierarchy and states.\n Its sizes are tokens, so they bind like colours do; a size the artboard\n needs and no token has is added to `@duro-app/tokens` first.\n\n## prove\n\n- Run the app, load the route in a real browser (Chrome MCP), and take a\n screenshot at the artboard's width (1120px) in the artboard's theme.\n- The PR body carries, under `## Mockup`: the canvas URL and direction, the\n path `docs/mockups/<screen>/`, and the artboard next to the live screenshot.\n A PR that touches no screen writes `Mockup: none` instead. CI checks for\n one or the other.\n- If the screenshot and the artboard disagree on hierarchy or states, that is\n a finding to fix, not a caption to write.\n";
23
+ export declare const SKILL = "---\nname: duro-mockup\ndescription: Take a new screen from mockup directions to an implemented, verified PR without leaving the Duro design system. Use whenever the user asks for a screen, a page, a UI proposal, mockups, or \"show me options\" in a repo that consumes @duro-app/ui \u2014 and when planning (plan mode) a new screen or a material layout, hierarchy or interaction change there.\n---\n\n# duro-mockup\n\nGENERATED by `duro skill install` \u2014 do not hand-edit. Regenerate:\n`npx -y @duro-app/cli@^5.0.0 skill install` (`--check` verifies it in CI). Repo-specific notes\nlive in `.claude/duro-mockup.local.md`; read it if it exists.\n\nStanding rule (fleet decision `ui.mockup-handoff`): a mockup is written in\nthe design system's own vocabulary, and the direction the user picks is a\ncontract. What binds: layout, hierarchy, states, the `data-duro` component\nmap and the token names, sizes and border widths included (ADR-0027). What\ndoes not bind: positions (top, left, inset, transform).\n\n**This overrides the `design` skill's step 0.** That skill says to lift\nresolved values from the real stylesheets. Here you never write a resolved\nvalue: every colour, spacing, radius, font, shadow and duration is a\n`var(--duro-*)` from the seeded token block, and every element a person can\nact on carries `data-duro=\"<Component>\"`. Everything this workflow needs ships\nwith the CLI: `mockup seed` writes the artboard, `mockup check` gates it and\n`mockup canvas` builds the page the person picks from.\n\n## Args\n\n- `propose <screen>` \u2014 seed 2\u20134 direction artboards, check them, publish the canvas.\n- `implement <screen> <direction>` \u2014 build the picked direction from its component map.\n- `prove <route>` \u2014 screenshot the built route and assemble the PR section.\n- no args \u2014 infer the stage from what exists under `docs/mockups/<screen>/`.\n\n## propose\n\n```bash\nnpx -y @duro-app/cli@^5.0.0 mockup seed --out docs/mockups/<screen> --name Main # direction A\nnpx -y @duro-app/cli@^5.0.0 mockup seed --out docs/mockups/<screen> --name <Direction> # B, C, \u2026\n```\n\n- `<screen>` is kebab-case (`approval-gates`). Artboards are committed with\n the PR \u2014 never leave them in a scratch directory; a session scratchpad is\n garbage-collected and the canvas URL would be the only surviving artefact.\n- Author each artboard inside the seeded `<style>` and root div. Colours,\n spacing, radii, sizes, border widths, type, shadows and motion come only\n from the token block (`var(--duro-size-*)`, `var(--duro-border-*)`);\n positions are yours, and the root keeps the seeded canvas size\n (`var(--duro-mockup-canvas-width)` / `-height`). A custom property you define\n outside the token block holds a token too (`--gap: var(--duro-spacing-md)`);\n `--gap: 12px` is the same raw value one `var()` away. Every button, row, chip, tab,\n input, link, table and dialog \u2014 whatever element it is drawn as \u2014 carries\n `data-duro=\"<Component>\"` or `data-duro=\"<Component>.<Part>\"`, using names\n from `npx -y @duro-app/cli@^5.0.0 list components`. Notes for the implementer go after the\n name: `data-duro=\"Button variant=primary\"`.\n- Start from a recipe when one fits the screen shape (`npx -y @duro-app/cli@^5.0.0 list recipes`\n \u2014 admin-detail-page, split-pane, page-with-sidenav, settings-page, \u2026) and\n say so in the artboard's header comment; a hand-rolled layout needs a reason.\n- Gate before publishing:\n\n```bash\nnpx -y @duro-app/cli@^5.0.0 mockup check docs/mockups/<screen>/*.dc.html\n```\n\n Exit 1 lists `file:line rule: message`. Fix every finding; do not publish\n an artboard that fails. A note that `@duro-app/ui` differs from the\n checker means an `unknown-component` may only be newer than the checker:\n rerun with the version the note names before changing the artboard.\n- Build the review page, one self-contained file with every direction under a\n letter (it refuses while any artboard fails the check):\n\n```bash\nnpx -y @duro-app/cli@^5.0.0 mockup canvas docs/mockups/<screen>\n```\n\n Publish `docs/mockups/<screen>/canvas.html` as the Artifact (the\n `duro_ds_mockup_canvas` MCP tool returns the same page from the artboards'\n HTML). Where Artifacts are unavailable, open it locally in the browser and\n say so; the pick does not wait on publishing.\n- Ask the user to pick a direction. Record the answer as\n `<canvas URL> \u00B7 direction <X>` \u2014 it goes in the PR.\n- Delete the directions that were not picked, rebuild the canvas, and commit\n the picked artboards: the files in `docs/mockups/` are the contract, the\n canvas is the review surface.\n\n## implement\n\n- Read the picked artboard. Its `data-duro` attributes ARE the component\n list: for each one, `npx -y @duro-app/cli@^5.0.0 <Component>` (or the `duro_ds_lookup` MCP\n tool) gives props and usage. Do not substitute a hand-rolled element for a\n named component; if a named component does not fit, say so and propose the\n design-system change rather than working around it.\n- Tokens map one to one: `var(--duro-spacing-md)` is `spacing.md` from\n `@duro-app/tokens/tokens/spacing.css`, `--duro-color-bg-card` is\n `colors.bgCard`, `--duro-radius-sm` is `radii.sm`, `--duro-typography-*`\n and `--duro-type-scale-*` are `typography`/`typeScale`, `--duro-shadow-*`\n is `shadows`, `--duro-duration-*`/`--duro-easing-*` are `duration`/`easing`.\n A media query on `768px` is `breakpoints.md` from\n `@duro-app/tokens/tokens/breakpoints.css`. The lint config refuses the raw\n value, so write the token the first time.\n- Layout comes from a recipe before a grid: `npx -y @duro-app/cli@^5.0.0 <recipe> --source-only`.\n- Positions in the artboard are a sketch: match its hierarchy and states.\n Its sizes are tokens, so they bind like colours do; a size the artboard\n needs and no token has is added to `@duro-app/tokens` first.\n\n## prove\n\n- Run the app, load the route in a real browser (Chrome MCP), and take a\n screenshot at the artboard's width (1120px) in the artboard's theme.\n- The PR body carries, under `## Mockup`: the canvas URL and direction, the\n path `docs/mockups/<screen>/`, and the artboard next to the live screenshot.\n A PR that touches no screen writes `Mockup: none` instead. CI checks for\n one or the other.\n- If the screenshot and the artboard disagree on hierarchy or states, that is\n a finding to fix, not a caption to write.\n";
24
24
  //# sourceMappingURL=skill-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-template.d.ts","sourceRoot":"","sources":["../src/skill-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,4CAA4C;AAC5C,eAAO,MAAM,SAAS,+BAA+B,CAAA;AACrD,eAAO,MAAM,UAAU,wCAA0B,CAAA;AACjD,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,iCAAiC,CAAA;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UAAU,CAAA;AAIpC,eAAO,MAAM,KAAK,k7LAsGjB,CAAA"}
1
+ {"version":3,"file":"skill-template.d.ts","sourceRoot":"","sources":["../src/skill-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,4CAA4C;AAC5C,eAAO,MAAM,SAAS,+BAA+B,CAAA;AACrD,eAAO,MAAM,UAAU,wCAA0B,CAAA;AACjD,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,iCAAiC,CAAA;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UAAU,CAAA;AAIpC,eAAO,MAAM,KAAK,02MAiHjB,CAAA"}
@@ -42,8 +42,9 @@ does not bind: positions (top, left, inset, transform).
42
42
  resolved values from the real stylesheets. Here you never write a resolved
43
43
  value: every colour, spacing, radius, font, shadow and duration is a
44
44
  \`var(--duro-*)\` from the seeded token block, and every element a person can
45
- act on carries \`data-duro="<Component>"\`. The rest of the \`design\` skill
46
- (artboard shape, \`seed-canvas.mjs\`, the canvas Artifact) still applies.
45
+ act on carries \`data-duro="<Component>"\`. Everything this workflow needs ships
46
+ with the CLI: \`mockup seed\` writes the artboard, \`mockup check\` gates it and
47
+ \`mockup canvas\` builds the page the person picks from.
47
48
 
48
49
  ## Args
49
50
 
@@ -83,15 +84,25 @@ ${DURO} mockup check docs/mockups/<screen>/*.dc.html
83
84
  \`\`\`
84
85
 
85
86
  Exit 1 lists \`file:line rule: message\`. Fix every finding; do not publish
86
- an artboard that fails. Then seed the canvas with the \`design\` skill's
87
- helper (it lives under the current Claude Code version's bundled-skills
88
- directory — locate it, never hardcode the path) and publish the Artifact.
87
+ an artboard that fails. A note that \`@duro-app/ui\` differs from the
88
+ checker means an \`unknown-component\` may only be newer than the checker:
89
+ rerun with the version the note names before changing the artboard.
90
+ - Build the review page, one self-contained file with every direction under a
91
+ letter (it refuses while any artboard fails the check):
92
+
93
+ \`\`\`bash
94
+ ${DURO} mockup canvas docs/mockups/<screen>
95
+ \`\`\`
96
+
97
+ Publish \`docs/mockups/<screen>/canvas.html\` as the Artifact (the
98
+ \`duro_ds_mockup_canvas\` MCP tool returns the same page from the artboards'
99
+ HTML). Where Artifacts are unavailable, open it locally in the browser and
100
+ say so; the pick does not wait on publishing.
89
101
  - Ask the user to pick a direction. Record the answer as
90
102
  \`<canvas URL> · direction <X>\` — it goes in the PR.
91
- - If the user edits an artboard in the canvas editor, its property panel
92
- writes literals back over \`var()\` by design. Re-extract and run
93
- \`mockup check\` again, but treat those findings as advisory: the authored
94
- file in \`docs/mockups/\` is the contract, the canvas is the review surface.
103
+ - Delete the directions that were not picked, rebuild the canvas, and commit
104
+ the picked artboards: the files in \`docs/mockups/\` are the contract, the
105
+ canvas is the review surface.
95
106
 
96
107
  ## implement
97
108
 
@@ -1 +1 @@
1
- {"version":3,"file":"skill-template.js","sourceRoot":"","sources":["../src/skill-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,SAAS,GAAG,4BAA4B,CAAA;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,SAAS,WAAW,CAAA;AACjD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAA;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAA;AAEpC,MAAM,IAAI,GAAG,yBAAyB,aAAa,EAAE,CAAA;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;IAQjB,IAAI;YACI,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;EAyB1B,IAAI;EACJ,IAAI;;;;;;;;;;;;;;;WAeK,IAAI;;0DAE2C,IAAI;;;;;;EAM5D,IAAI;;;;;;;;;;;;;;;;;0BAiBoB,IAAI;;;;;;;;;;;;gDAYkB,IAAI;;;;;;;;;;;;;;;CAenD,CAAA"}
1
+ {"version":3,"file":"skill-template.js","sourceRoot":"","sources":["../src/skill-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,SAAS,GAAG,4BAA4B,CAAA;AACrD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,SAAS,WAAW,CAAA;AACjD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAA;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAA;AAEpC,MAAM,IAAI,GAAG,yBAAyB,aAAa,EAAE,CAAA;AAErD,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;IAQjB,IAAI;YACI,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B1B,IAAI;EACJ,IAAI;;;;;;;;;;;;;;;WAeK,IAAI;;0DAE2C,IAAI;;;;;;EAM5D,IAAI;;;;;;;;;;;EAWJ,IAAI;;;;;;;;;;;;;;;;0BAgBoB,IAAI;;;;;;;;;;;;gDAYkB,IAAI;;;;;;;;;;;;;;;CAenD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/cli",
3
- "version": "5.15.0",
3
+ "version": "5.17.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Machine-queryable docs for the Duro design system: components, props, recipes, tokens and rules as CLI output, JSON, or an MCP server.",
@@ -38,6 +38,7 @@
38
38
  },
39
39
  "files": [
40
40
  "dist",
41
+ "skills",
41
42
  "registry.json"
42
43
  ],
43
44
  "engines": {
@@ -45,7 +46,7 @@
45
46
  },
46
47
  "peerDependencies": {
47
48
  "@modelcontextprotocol/sdk": ">=1.0.0",
48
- "@duro-app/ui": "^5.15.0"
49
+ "@duro-app/ui": "^5.17.0"
49
50
  },
50
51
  "peerDependenciesMeta": {
51
52
  "@duro-app/ui": {
@@ -60,9 +61,9 @@
60
61
  "@types/node": "^24.0.0",
61
62
  "ts-morph": "^26.0.0",
62
63
  "typescript": "^5.7.0",
63
- "@duro-app/eslint-plugin": "^5.15.0",
64
- "@duro-app/tokens": "^5.15.0",
65
- "@duro-app/ui": "^5.15.0"
64
+ "@duro-app/tokens": "^5.17.0",
65
+ "@duro-app/ui": "^5.17.0",
66
+ "@duro-app/eslint-plugin": "^5.17.0"
66
67
  },
67
68
  "scripts": {
68
69
  "registry": "node scripts/build-registry.mjs",