@duro-app/cli 2.0.0 → 3.0.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 (41) hide show
  1. package/README.md +49 -4
  2. package/dist/bin.js +15 -1
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/hook.d.ts.map +1 -1
  5. package/dist/commands/hook.js +21 -0
  6. package/dist/commands/hook.js.map +1 -1
  7. package/dist/commands/mcp.d.ts +28 -1
  8. package/dist/commands/mcp.d.ts.map +1 -1
  9. package/dist/commands/mcp.js +22 -1
  10. package/dist/commands/mcp.js.map +1 -1
  11. package/dist/commands/mockup.d.ts +38 -0
  12. package/dist/commands/mockup.d.ts.map +1 -0
  13. package/dist/commands/mockup.js +436 -0
  14. package/dist/commands/mockup.js.map +1 -0
  15. package/dist/commands/skill.d.ts +9 -0
  16. package/dist/commands/skill.d.ts.map +1 -0
  17. package/dist/commands/skill.js +100 -0
  18. package/dist/commands/skill.js.map +1 -0
  19. package/dist/disambiguation.d.ts.map +1 -1
  20. package/dist/disambiguation.js +4 -2
  21. package/dist/disambiguation.js.map +1 -1
  22. package/dist/hook-script.d.ts +7 -6
  23. package/dist/hook-script.d.ts.map +1 -1
  24. package/dist/hook-script.js +6 -5
  25. package/dist/hook-script.js.map +1 -1
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/manifest.d.ts +2 -0
  31. package/dist/manifest.d.ts.map +1 -1
  32. package/dist/manifest.js +58 -1
  33. package/dist/manifest.js.map +1 -1
  34. package/dist/registry-types.d.ts +6 -0
  35. package/dist/registry-types.d.ts.map +1 -1
  36. package/dist/skill-template.d.ts +22 -0
  37. package/dist/skill-template.d.ts.map +1 -0
  38. package/dist/skill-template.js +119 -0
  39. package/dist/skill-template.js.map +1 -0
  40. package/package.json +5 -5
  41. package/registry.json +152 -7
@@ -19,12 +19,13 @@ export const HOOK_NOTES_PATH = '.claude/duro-hook.local.md';
19
19
  /** What settings.json runs. Also the marker install matches on. */
20
20
  export const HOOK_COMMAND = `sh ${HOOK_SCRIPT_PATH}`;
21
21
  /**
22
- * Floor for the npx pin. `hook session-start` landed in 1.2.0; on older
23
- * versions the unknown "hook" positional falls through to lookup/search and
24
- * caches junk. Raise this only when the script needs newer CLI behavior —
25
- * a floating pin keeps patch releases from showing up as --check drift.
22
+ * Floor for the npx pin. Raise this only when the session payload needs
23
+ * newer CLI behavior — a floating pin keeps patch releases from showing up
24
+ * as --check drift, but a floor left behind a major means no consumer ever
25
+ * sees what the payload gained (1.2.0 pinned every repo out of 2.x).
26
+ * 3.0.0: the SCREENS section and the /duro-mockup pointer.
26
27
  */
27
- export const HOOK_MIN_CLI = '1.2.0';
28
+ export const HOOK_MIN_CLI = '3.0.0';
28
29
  export const HOOK_SCRIPT = `#!/bin/sh
29
30
  # Duro design-system session bootstrap — GENERATED by \`duro hook install\`.
30
31
  # Regenerate: npx -y @duro-app/cli hook install (--check verifies it in CI)
@@ -1 +1 @@
1
- {"version":3,"file":"hook-script.js","sourceRoot":"","sources":["../src/hook-script.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAA;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,6BAA6B,CAAA;AAC5D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,eAAe,GAAG,CAAA;AACtD,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,4BAA4B,CAAA;AAE3D,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,gBAAgB,EAAE,CAAA;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAA;AAEnC,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;IASvB,eAAe;SACV,eAAe;SACf,eAAe;;;;6BAIK,YAAY;;;;;;;;;;;;;;;CAexC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,kDAAkD,iBAAiB,IAAI,CAAA"}
1
+ {"version":3,"file":"hook-script.js","sourceRoot":"","sources":["../src/hook-script.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,+BAA+B,CAAA;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAA;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,6BAA6B,CAAA;AAC5D;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,eAAe,GAAG,CAAA;AACtD,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,4BAA4B,CAAA;AAE3D,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,gBAAgB,EAAE,CAAA;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAA;AAEnC,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;IASvB,eAAe;SACV,eAAe;SACf,eAAe;;;;6BAIK,YAAY;;;;;;;;;;;;;;;CAexC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,kDAAkD,iBAAiB,IAAI,CAAA"}
package/dist/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export type * from './registry-types.js';
2
2
  export { loadRegistry, lookup, lookupNames } from './registry.js';
3
3
  export { search, suggestions } from './search.js';
4
4
  export { buildManifest, COMMANDS } from './manifest.js';
5
+ export { checkArtboard, seedArtboard, type Finding } from './commands/mockup.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,qBAAqB,CAAA;AACxC,OAAO,EAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,qBAAqB,CAAA;AACxC,OAAO,EAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAA;AACrD,OAAO,EAAC,aAAa,EAAE,YAAY,EAAE,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { loadRegistry, lookup, lookupNames } from './registry.js';
2
2
  export { search, suggestions } from './search.js';
3
3
  export { buildManifest, COMMANDS } from './manifest.js';
4
+ export { checkArtboard, seedArtboard } from './commands/mockup.js';
4
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAA;AACrD,OAAO,EAAC,aAAa,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA"}
@@ -42,6 +42,8 @@ export declare function buildManifest(registry: Registry, version: string): {
42
42
  names: string[];
43
43
  kinds: string[];
44
44
  events: string[];
45
+ mockupActions: string[];
46
+ skillActions: string[];
45
47
  };
46
48
  };
47
49
  //# sourceMappingURL=manifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAGjD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IACxF,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IAC7E,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,CAAA;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,WAAW,EA6FjC,CAAA;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAmBhE"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAGjD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IACxF,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;IAC7E,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC,CAAA;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,WAAW,EAwJjC,CAAA;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;EAqBhE"}
package/dist/manifest.js CHANGED
@@ -77,9 +77,64 @@ export const COMMANDS = [
77
77
  },
78
78
  examples: ['duro hook session-start', 'duro hook install', 'duro hook install --check'],
79
79
  },
80
+ {
81
+ name: 'skill',
82
+ summary: 'Claude Code skill /duro-mockup — the mockup → implementation → proof workflow; install writes it into the current repo',
83
+ args: [
84
+ {
85
+ name: 'action',
86
+ required: true,
87
+ description: 'install (write .claude/skills/duro-mockup/SKILL.md)',
88
+ valuesFrom: 'skillActions',
89
+ },
90
+ ],
91
+ flags: [
92
+ {
93
+ name: 'check',
94
+ type: 'boolean',
95
+ description: 'install: report drift and exit 1 instead of writing (for CI)',
96
+ },
97
+ ],
98
+ returns: {
99
+ shape: '{ok: boolean, changes: FileChange[]}',
100
+ description: 'What the wired file did',
101
+ },
102
+ examples: ['duro skill install', 'duro skill install --check'],
103
+ },
104
+ {
105
+ 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',
107
+ args: [
108
+ {
109
+ name: 'action',
110
+ required: true,
111
+ description: 'seed (write <Name>.dc.html) | check <file.dc.html>... (exit 1 on findings)',
112
+ valuesFrom: 'mockupActions',
113
+ },
114
+ ],
115
+ flags: [
116
+ { name: 'out', type: 'string', description: 'seed: directory (default docs/mockups/<name>)' },
117
+ { name: 'name', type: 'string', description: 'seed: artboard stem (default Main)' },
118
+ {
119
+ name: 'theme',
120
+ type: 'string',
121
+ description: 'seed: dark (default) | light | high-contrast — sets <html data-theme>',
122
+ },
123
+ ],
124
+ returns: {
125
+ shape: '{ok: boolean, path: string} | {ok: boolean, findings: Finding[]}',
126
+ 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
+ },
128
+ examples: [
129
+ 'duro mockup seed --name Main --out docs/mockups/approvals',
130
+ 'duro mockup check docs/mockups/approvals/*.dc.html',
131
+ 'duro mockup check Main.dc.html --json',
132
+ ],
133
+ mcpTool: 'duro_ds_mockup_check',
134
+ },
80
135
  {
81
136
  name: 'mcp',
82
- summary: 'Run a stdio MCP server exposing duro_ds_lookup / duro_ds_list / duro_ds_manifest',
137
+ summary: 'Run a stdio MCP server exposing duro_ds_lookup / duro_ds_list / duro_ds_manifest / duro_ds_mockup_check',
83
138
  args: [],
84
139
  flags: [],
85
140
  returns: { shape: 'never', description: 'Serves until stdin closes' },
@@ -105,6 +160,8 @@ export function buildManifest(registry, version) {
105
160
  names: lookupNames(registry),
106
161
  kinds: ['components', 'recipes', 'tokens'],
107
162
  events: ['session-start', 'install'],
163
+ mockupActions: ['seed', 'check'],
164
+ skillActions: ['install'],
108
165
  },
109
166
  };
110
167
  }
@@ -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,OAAO,EAAE,EAAC,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wCAAwC,EAAC;QACtF,QAAQ,EAAE,CAAC,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AAa,EAAE,QAAQ,CAAC,aAAa;QACrC,WAAW,EAAE,oDAAoD;QACjE,KAAK,EAAE,sCAAsC;QAC7C,WAAW,EAAE;YACX,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,qBAAqB,EAAC;YACnE,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAC;SACzE;QACD,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE;YACL,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC;YAC5B,KAAK,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;YAC1C,MAAM,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;YACpC,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAChC,YAAY,EAAE,CAAC,SAAS,CAAC;SAC1B;KACF,CAAA;AACH,CAAC"}
@@ -57,6 +57,12 @@ export interface RecipeEntry {
57
57
  }
58
58
  export interface TokenRegistry {
59
59
  groups: Record<string, TokenGroup>;
60
+ /**
61
+ * The tokens as resolved CSS custom properties, every theme, for HTML that
62
+ * loads no stylesheet (`duro mockup seed` inlines it). Same names as
63
+ * `@duro-app/tokens/vars.css`; generated by packages/tokens.
64
+ */
65
+ mockupCss: string;
60
66
  }
61
67
  export interface TokenGroup {
62
68
  /** The deep import a consumer must copy. */
@@ -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,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AAM,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"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The generated Claude Code skill that runs a screen from mockup to PR
3
+ * without leaving the design system.
4
+ *
5
+ * Kept as data (not prose in a README) so `duro skill install` can write it
6
+ * and `duro skill install --check` can byte-compare it: every consuming repo
7
+ * runs the same workflow, and a change to it is a regenerate rather than
8
+ * N hand-edits. Repo-specific notes go in SKILL_NOTES_PATH, which the skill
9
+ * tells the agent to read and which regeneration never touches.
10
+ */
11
+ /** Repo-relative paths the install owns. */
12
+ export declare const SKILL_DIR = ".claude/skills/duro-mockup";
13
+ export declare const SKILL_PATH = ".claude/skills/duro-mockup/SKILL.md";
14
+ /** Repo-specific caveats, read by the skill and never touched by install. */
15
+ export declare const SKILL_NOTES_PATH = ".claude/duro-mockup.local.md";
16
+ /**
17
+ * Floor for the npx pin inside the skill. `duro mockup` landed in 3.0.0. A
18
+ * floating pin keeps patch releases from showing up as --check drift.
19
+ */
20
+ export declare const SKILL_MIN_CLI = "3.0.0";
21
+ 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.\n---\n\n# duro-mockup\n\nGENERATED by `duro skill install` \u2014 do not hand-edit. Regenerate:\n`npx -y @duro-app/cli@^3.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. What does not bind: the artboard's pixel geometry.\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@^3.0.0 mockup seed --out docs/mockups/<screen> --name Main # direction A\nnpx -y @duro-app/cli@^3.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, type, shadows and motion come only from the token block;\n widths, heights and positions are yours. 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@^3.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@^3.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@^3.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@^3.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@^3.0.0 <recipe> --source-only`.\n- Geometry in the artboard is a sketch. Match its hierarchy and states, not\n its pixel widths.\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";
22
+ //# sourceMappingURL=skill-template.d.ts.map
@@ -0,0 +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;;;GAGG;AACH,eAAO,MAAM,aAAa,UAAU,CAAA;AAIpC,eAAO,MAAM,KAAK,g2KAgGjB,CAAA"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * The generated Claude Code skill that runs a screen from mockup to PR
3
+ * without leaving the design system.
4
+ *
5
+ * Kept as data (not prose in a README) so `duro skill install` can write it
6
+ * and `duro skill install --check` can byte-compare it: every consuming repo
7
+ * runs the same workflow, and a change to it is a regenerate rather than
8
+ * N hand-edits. Repo-specific notes go in SKILL_NOTES_PATH, which the skill
9
+ * tells the agent to read and which regeneration never touches.
10
+ */
11
+ /** Repo-relative paths the install owns. */
12
+ export const SKILL_DIR = '.claude/skills/duro-mockup';
13
+ export const SKILL_PATH = `${SKILL_DIR}/SKILL.md`;
14
+ /** Repo-specific caveats, read by the skill and never touched by install. */
15
+ export const SKILL_NOTES_PATH = '.claude/duro-mockup.local.md';
16
+ /**
17
+ * Floor for the npx pin inside the skill. `duro mockup` landed in 3.0.0. A
18
+ * floating pin keeps patch releases from showing up as --check drift.
19
+ */
20
+ export const SKILL_MIN_CLI = '3.0.0';
21
+ const DURO = `npx -y @duro-app/cli@^${SKILL_MIN_CLI}`;
22
+ export const SKILL = `---
23
+ name: duro-mockup
24
+ description: 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.
25
+ ---
26
+
27
+ # duro-mockup
28
+
29
+ GENERATED by \`duro skill install\` — do not hand-edit. Regenerate:
30
+ \`${DURO} skill install\` (\`--check\` verifies it in CI). Repo-specific notes
31
+ live in \`${SKILL_NOTES_PATH}\`; read it if it exists.
32
+
33
+ Standing rule (fleet decision \`ui.mockup-handoff\`): a mockup is written in
34
+ the design system's own vocabulary, and the direction the user picks is a
35
+ contract. What binds: layout, hierarchy, states, the \`data-duro\` component
36
+ map and the token names. What does not bind: the artboard's pixel geometry.
37
+
38
+ **This overrides the \`design\` skill's step 0.** That skill says to lift
39
+ resolved values from the real stylesheets. Here you never write a resolved
40
+ value: every colour, spacing, radius, font, shadow and duration is a
41
+ \`var(--duro-*)\` from the seeded token block, and every element a person can
42
+ act on carries \`data-duro="<Component>"\`. The rest of the \`design\` skill
43
+ (artboard shape, \`seed-canvas.mjs\`, the canvas Artifact) still applies.
44
+
45
+ ## Args
46
+
47
+ - \`propose <screen>\` — seed 2–4 direction artboards, check them, publish the canvas.
48
+ - \`implement <screen> <direction>\` — build the picked direction from its component map.
49
+ - \`prove <route>\` — screenshot the built route and assemble the PR section.
50
+ - no args — infer the stage from what exists under \`docs/mockups/<screen>/\`.
51
+
52
+ ## propose
53
+
54
+ \`\`\`bash
55
+ ${DURO} mockup seed --out docs/mockups/<screen> --name Main # direction A
56
+ ${DURO} mockup seed --out docs/mockups/<screen> --name <Direction> # B, C, …
57
+ \`\`\`
58
+
59
+ - \`<screen>\` is kebab-case (\`approval-gates\`). Artboards are committed with
60
+ the PR — never leave them in a scratch directory; a session scratchpad is
61
+ garbage-collected and the canvas URL would be the only surviving artefact.
62
+ - Author each artboard inside the seeded \`<style>\` and root div. Colours,
63
+ spacing, radii, type, shadows and motion come only from the token block;
64
+ widths, heights and positions are yours. Every button, row, chip, tab,
65
+ input, link, table and dialog — whatever element it is drawn as — carries
66
+ \`data-duro="<Component>"\` or \`data-duro="<Component>.<Part>"\`, using names
67
+ from \`${DURO} list components\`. Notes for the implementer go after the
68
+ name: \`data-duro="Button variant=primary"\`.
69
+ - Start from a recipe when one fits the screen shape (\`${DURO} list recipes\`
70
+ — admin-detail-page, split-pane, page-with-sidenav, settings-page, …) and
71
+ say so in the artboard's header comment; a hand-rolled layout needs a reason.
72
+ - Gate before publishing:
73
+
74
+ \`\`\`bash
75
+ ${DURO} mockup check docs/mockups/<screen>/*.dc.html
76
+ \`\`\`
77
+
78
+ Exit 1 lists \`file:line rule: message\`. Fix every finding; do not publish
79
+ an artboard that fails. Then seed the canvas with the \`design\` skill's
80
+ helper (it lives under the current Claude Code version's bundled-skills
81
+ directory — locate it, never hardcode the path) and publish the Artifact.
82
+ - Ask the user to pick a direction. Record the answer as
83
+ \`<canvas URL> · direction <X>\` — it goes in the PR.
84
+ - If the user edits an artboard in the canvas editor, its property panel
85
+ writes literals back over \`var()\` by design. Re-extract and run
86
+ \`mockup check\` again, but treat those findings as advisory: the authored
87
+ file in \`docs/mockups/\` is the contract, the canvas is the review surface.
88
+
89
+ ## implement
90
+
91
+ - Read the picked artboard. Its \`data-duro\` attributes ARE the component
92
+ list: for each one, \`${DURO} <Component>\` (or the \`duro_ds_lookup\` MCP
93
+ tool) gives props and usage. Do not substitute a hand-rolled element for a
94
+ named component; if a named component does not fit, say so and propose the
95
+ design-system change rather than working around it.
96
+ - Tokens map one to one: \`var(--duro-spacing-md)\` is \`spacing.md\` from
97
+ \`@duro-app/tokens/tokens/spacing.css\`, \`--duro-color-bg-card\` is
98
+ \`colors.bgCard\`, \`--duro-radius-sm\` is \`radii.sm\`, \`--duro-typography-*\`
99
+ and \`--duro-type-scale-*\` are \`typography\`/\`typeScale\`, \`--duro-shadow-*\`
100
+ is \`shadows\`, \`--duro-duration-*\`/\`--duro-easing-*\` are \`duration\`/\`easing\`.
101
+ A media query on \`768px\` is \`breakpoints.md\` from
102
+ \`@duro-app/tokens/tokens/breakpoints.css\`. The lint config refuses the raw
103
+ value, so write the token the first time.
104
+ - Layout comes from a recipe before a grid: \`${DURO} <recipe> --source-only\`.
105
+ - Geometry in the artboard is a sketch. Match its hierarchy and states, not
106
+ its pixel widths.
107
+
108
+ ## prove
109
+
110
+ - Run the app, load the route in a real browser (Chrome MCP), and take a
111
+ screenshot at the artboard's width (1120px) in the artboard's theme.
112
+ - The PR body carries, under \`## Mockup\`: the canvas URL and direction, the
113
+ path \`docs/mockups/<screen>/\`, and the artboard next to the live screenshot.
114
+ A PR that touches no screen writes \`Mockup: none\` instead. CI checks for
115
+ one or the other.
116
+ - If the screenshot and the artboard disagree on hierarchy or states, that is
117
+ a finding to fix, not a caption to write.
118
+ `;
119
+ //# sourceMappingURL=skill-template.js.map
@@ -0,0 +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;;;GAGG;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;;;;;;;;;;;;;;;;;;;;;;;;EAwB1B,IAAI;EACJ,IAAI;;;;;;;;;;;WAWK,IAAI;;0DAE2C,IAAI;;;;;;EAM5D,IAAI;;;;;;;;;;;;;;;;;0BAiBoB,IAAI;;;;;;;;;;;;gDAYkB,IAAI;;;;;;;;;;;;;;CAcnD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/cli",
3
- "version": "2.0.0",
3
+ "version": "3.0.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.",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@modelcontextprotocol/sdk": ">=1.0.0",
48
- "@duro-app/ui": "^2.0.0"
48
+ "@duro-app/ui": "^3.0.0"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@duro-app/ui": {
@@ -60,9 +60,9 @@
60
60
  "@types/node": "^24.0.0",
61
61
  "ts-morph": "^26.0.0",
62
62
  "typescript": "^5.7.0",
63
- "@duro-app/eslint-plugin": "^2.0.0",
64
- "@duro-app/ui": "^2.0.0",
65
- "@duro-app/tokens": "^2.0.0"
63
+ "@duro-app/eslint-plugin": "^3.0.0",
64
+ "@duro-app/tokens": "^3.0.0",
65
+ "@duro-app/ui": "^3.0.0"
66
66
  },
67
67
  "scripts": {
68
68
  "registry": "node scripts/build-registry.mjs",