@usesketchbook/opencode-plugin 0.0.0-stage → 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +123 -2
- package/dist/generated/baseline-manifest.d.ts +2 -0
- package/dist/generated/baseline-manifest.js +1590 -0
- package/dist/generated/catalog-baseline.d.ts +2 -0
- package/dist/generated/catalog-baseline.js +255 -0
- package/dist/gui-experimental.cjs +111 -0
- package/dist/gui.d.ts +22 -0
- package/dist/gui.js +34 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +20 -0
- package/dist/rpc.d.ts +1173 -0
- package/dist/rpc.js +212 -0
- package/dist/server/catalog.d.ts +9 -0
- package/dist/server/catalog.js +74 -0
- package/dist/server/decision-guard-hooks.d.ts +2 -0
- package/dist/server/decision-guard-hooks.js +57 -0
- package/dist/server/decision-guards.d.ts +11 -0
- package/dist/server/decision-guards.js +36 -0
- package/dist/server/engine.d.ts +6 -0
- package/dist/server/engine.js +38 -0
- package/dist/server/guard-hooks.d.ts +3 -0
- package/dist/server/guard-hooks.js +35 -0
- package/dist/server/guards.d.ts +13 -0
- package/dist/server/guards.js +42 -0
- package/dist/server/operations.d.ts +93 -0
- package/dist/server/operations.js +300 -0
- package/dist/server/permissions.d.ts +29 -0
- package/dist/server/permissions.js +97 -0
- package/dist/server/rpc.d.ts +126 -0
- package/dist/server/rpc.js +308 -0
- package/dist/server/runner.d.ts +27 -0
- package/dist/server/runner.js +136 -0
- package/dist/server/schema.d.ts +4 -0
- package/dist/server/schema.js +66 -0
- package/dist/server/tools.d.ts +2 -0
- package/dist/server/tools.js +176 -0
- package/dist/server/tui.d.ts +70 -0
- package/dist/server/tui.js +172 -0
- package/dist/shared/catalog.d.ts +52 -0
- package/dist/shared/catalog.js +84 -0
- package/dist/shared/envelope.d.ts +24 -0
- package/dist/shared/envelope.js +28 -0
- package/dist/shared/manifest.d.ts +53 -0
- package/dist/shared/manifest.js +135 -0
- package/dist/test/baseline.test.d.ts +1 -0
- package/dist/test/baseline.test.js +11 -0
- package/dist/test/catalog.test.d.ts +1 -0
- package/dist/test/catalog.test.js +232 -0
- package/dist/test/decision-guards.test.d.ts +1 -0
- package/dist/test/decision-guards.test.js +30 -0
- package/dist/test/engine.test.d.ts +1 -0
- package/dist/test/engine.test.js +23 -0
- package/dist/test/fixtures.d.ts +12 -0
- package/dist/test/fixtures.js +55 -0
- package/dist/test/guard-hooks.integration.test.d.ts +1 -0
- package/dist/test/guard-hooks.integration.test.js +321 -0
- package/dist/test/guard-hooks.test.d.ts +1 -0
- package/dist/test/guard-hooks.test.js +14 -0
- package/dist/test/guards.test.d.ts +1 -0
- package/dist/test/guards.test.js +24 -0
- package/dist/test/gui.test.d.ts +1 -0
- package/dist/test/gui.test.js +61 -0
- package/dist/test/manifest.test.d.ts +1 -0
- package/dist/test/manifest.test.js +86 -0
- package/dist/test/operations.test.d.ts +1 -0
- package/dist/test/operations.test.js +263 -0
- package/dist/test/parity.test.d.ts +1 -0
- package/dist/test/parity.test.js +56 -0
- package/dist/test/permissions.integration.test.d.ts +1 -0
- package/dist/test/permissions.integration.test.js +535 -0
- package/dist/test/permissions.test.d.ts +1 -0
- package/dist/test/permissions.test.js +42 -0
- package/dist/test/rpc.test.d.ts +1 -0
- package/dist/test/rpc.test.js +389 -0
- package/dist/test/runner.test.d.ts +1 -0
- package/dist/test/runner.test.js +47 -0
- package/dist/test/schema.test.d.ts +1 -0
- package/dist/test/schema.test.js +51 -0
- package/dist/test/tui.test.d.ts +1 -0
- package/dist/test/tui.test.js +226 -0
- package/dist/tprobe.d.ts +1 -0
- package/dist/tprobe.js +2 -0
- package/dist/tui.d.ts +10 -0
- package/dist/tui.js +21 -0
- package/dist/views/operations.d.ts +50 -0
- package/dist/views/operations.js +80 -0
- package/package.json +71 -4
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
export const BASELINE_MANIFEST = {
|
|
2
|
+
"protocolVersion": "1.0.0",
|
|
3
|
+
"envelopeVersion": 1,
|
|
4
|
+
"engine": {
|
|
5
|
+
"name": "@usesketchbook/cli",
|
|
6
|
+
"version": "0.10.0"
|
|
7
|
+
},
|
|
8
|
+
"groups": {
|
|
9
|
+
"project": "Project",
|
|
10
|
+
"components": "Components",
|
|
11
|
+
"tokens": "Tokens",
|
|
12
|
+
"design": "Design file",
|
|
13
|
+
"quality": "Quality",
|
|
14
|
+
"meta": "Help"
|
|
15
|
+
},
|
|
16
|
+
"commands": [
|
|
17
|
+
{
|
|
18
|
+
"name": "init",
|
|
19
|
+
"group": "project",
|
|
20
|
+
"summary": "Set up a design system from a starter, or update the setup in an existing project. Choose --agent to add guidance for your coding tools.",
|
|
21
|
+
"usage": "sketchbook init [--name <value>] [--primary <value>] [--font <value>] [--radius <value>] [--density <value>] [--danger <value>] [--design <value>] [--file <value>] [--prefix <value>] [--start <starter>] [--components <a,b>] [--from <file>] [--yes] [--dir <folder>] [--adopt] [--engine <spec>] [--no-install] [--agent <profiles>] [--with <groups>] [--detach-catalog] [--dry-run] [--json]",
|
|
22
|
+
"args": [],
|
|
23
|
+
"options": {
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Brand or system name"
|
|
27
|
+
},
|
|
28
|
+
"primary": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Primary color as #RRGGBB, or \"neutral\" for the shadcn default"
|
|
31
|
+
},
|
|
32
|
+
"font": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Font family name (falls back to the system stack)"
|
|
35
|
+
},
|
|
36
|
+
"radius": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "sharp | soft | round | pill-heavy (sketchbook presets radius)"
|
|
39
|
+
},
|
|
40
|
+
"density": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "compact | comfortable | spacious"
|
|
43
|
+
},
|
|
44
|
+
"danger": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Destructive color as #RRGGBB"
|
|
47
|
+
},
|
|
48
|
+
"design": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Design-file adapter: figma | none"
|
|
51
|
+
},
|
|
52
|
+
"file": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Figma file key (when design is figma)"
|
|
55
|
+
},
|
|
56
|
+
"prefix": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "Element and CSS prefix, e.g. acme (acme-button, --acme-*); rewrites sources (see sketchbook prefix)"
|
|
59
|
+
},
|
|
60
|
+
"start": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Starting point: blank | foundations | library (default) | library+kits | pick | import | from-codebase (harness/starters)",
|
|
63
|
+
"value": "starter"
|
|
64
|
+
},
|
|
65
|
+
"components": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "With --start: the components to have (pick needs it; all | none also work); dependencies come along",
|
|
68
|
+
"value": "a,b"
|
|
69
|
+
},
|
|
70
|
+
"from": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "With --start import: the tokens file; with --start from-codebase: the CSS path or glob to audit",
|
|
73
|
+
"value": "file"
|
|
74
|
+
},
|
|
75
|
+
"yes": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Confirm what would lose work: with --start, removing components or kits the starter does not include; with brand options or a starter that patches foundations, letting the brand links overwrite hand-edited linked tokens. It never detaches the catalog"
|
|
78
|
+
},
|
|
79
|
+
"dir": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Create the project in this folder (new or empty), e.g. a design-system folder inside an existing repository; default: here",
|
|
82
|
+
"value": "folder"
|
|
83
|
+
},
|
|
84
|
+
"adopt": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"description": "In an existing project: add the design system in its own folder (design-system/, or --dir) without changing your files; your package.json gets one script that runs its checks"
|
|
87
|
+
},
|
|
88
|
+
"engine": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"description": "For new projects, override the engine dependency with an npm version or tag, a local tarball, or a Git URL. A published CLI uses its version range by default. Relative local paths are resolved from the directory where init starts",
|
|
91
|
+
"value": "spec"
|
|
92
|
+
},
|
|
93
|
+
"no-install": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "New project only: skip npm install and the Chromium download (init lists them as next steps)"
|
|
96
|
+
},
|
|
97
|
+
"agent": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "Install selected agent profiles (comma-separated): claude, codex, gemini, copilot, trae, jetbrains, generic. New projects default to core only",
|
|
100
|
+
"value": "profiles"
|
|
101
|
+
},
|
|
102
|
+
"with": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Select the Claude profile and add optional groups (comma-separated): forge. Forge adds the forge-me-a-skill skill",
|
|
105
|
+
"value": "groups"
|
|
106
|
+
},
|
|
107
|
+
"detach-catalog": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"description": "With --start in the catalog source repo (catalog.source true): stop tracking harness/catalog; the components become the team's own"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"examples": [
|
|
113
|
+
"sketchbook init",
|
|
114
|
+
"sketchbook init --agent claude",
|
|
115
|
+
"sketchbook init --agent codex,trae --dry-run",
|
|
116
|
+
"sketchbook init --dir design-system --start library",
|
|
117
|
+
"sketchbook init --start library",
|
|
118
|
+
"sketchbook init --with forge",
|
|
119
|
+
"sketchbook init --start blank --yes",
|
|
120
|
+
"sketchbook init --start pick --components card,button",
|
|
121
|
+
"sketchbook init --start from-codebase --from \"../app/**/*.css\"",
|
|
122
|
+
"sketchbook init --primary \"#2563EB\" --font Inter --radius round",
|
|
123
|
+
"sketchbook init --density compact --dry-run"
|
|
124
|
+
],
|
|
125
|
+
"mutates": true,
|
|
126
|
+
"risk": "write",
|
|
127
|
+
"dryRun": true,
|
|
128
|
+
"project": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "harness",
|
|
132
|
+
"group": "project",
|
|
133
|
+
"summary": "Find and install agent skills, rules, and named workflows.",
|
|
134
|
+
"usage": "sketchbook harness [action] [item...] [--agent <client>] [--dry-run] [--json]",
|
|
135
|
+
"args": [
|
|
136
|
+
{
|
|
137
|
+
"name": "action",
|
|
138
|
+
"required": false,
|
|
139
|
+
"description": "`list` (default outside the interactive picker), `show`, or `add`"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "item",
|
|
143
|
+
"required": false,
|
|
144
|
+
"variadic": true,
|
|
145
|
+
"description": "An ID from `sketchbook harness list`, such as `recommended`, `hammock`, or `rule:contract-first`"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"options": {
|
|
149
|
+
"agent": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Show discovery and activation guidance for claude, codex, gemini, copilot, trae, jetbrains, generic, opencode, cursor, windsurf, antigravity, kiro (default: generic)",
|
|
152
|
+
"value": "client"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"examples": [
|
|
156
|
+
"sketchbook harness list",
|
|
157
|
+
"sketchbook harness show hammock --agent opencode",
|
|
158
|
+
"sketchbook harness add hammock --agent opencode --dry-run"
|
|
159
|
+
],
|
|
160
|
+
"mutates": true,
|
|
161
|
+
"risk": "install",
|
|
162
|
+
"dryRun": true,
|
|
163
|
+
"project": false,
|
|
164
|
+
"subcommands": [
|
|
165
|
+
{
|
|
166
|
+
"name": "list",
|
|
167
|
+
"usage": "sketchbook harness list [--details]",
|
|
168
|
+
"summary": "Find item IDs. Use `--details` to include integration references.",
|
|
169
|
+
"mutates": false,
|
|
170
|
+
"risk": "read",
|
|
171
|
+
"examples": [
|
|
172
|
+
"sketchbook harness list",
|
|
173
|
+
"sketchbook harness list --details"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "show",
|
|
178
|
+
"usage": "sketchbook harness show <item>",
|
|
179
|
+
"summary": "Show the item’s files, dependencies, and setup steps for your client.",
|
|
180
|
+
"mutates": false,
|
|
181
|
+
"risk": "read",
|
|
182
|
+
"examples": [
|
|
183
|
+
"sketchbook harness show hammock --agent opencode"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "add",
|
|
188
|
+
"usage": "sketchbook harness add <item...> [--dry-run]",
|
|
189
|
+
"summary": "Install the items you select and their dependencies without activating hooks. Preview new files, updates, and conflicts with `--dry-run`.",
|
|
190
|
+
"mutates": true,
|
|
191
|
+
"risk": "install",
|
|
192
|
+
"examples": [
|
|
193
|
+
"sketchbook harness add hammock --agent opencode --dry-run",
|
|
194
|
+
"sketchbook harness add recommended --agent opencode"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "workspace",
|
|
201
|
+
"group": "project",
|
|
202
|
+
"summary": "Review project status and check findings in a read-only terminal workspace. Requires an interactive terminal; use status and check for plain or JSON output.",
|
|
203
|
+
"usage": "sketchbook workspace",
|
|
204
|
+
"args": [],
|
|
205
|
+
"options": {},
|
|
206
|
+
"examples": [
|
|
207
|
+
"sketchbook workspace"
|
|
208
|
+
],
|
|
209
|
+
"mutates": false,
|
|
210
|
+
"risk": "read",
|
|
211
|
+
"interactiveOnly": true
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "status",
|
|
215
|
+
"group": "project",
|
|
216
|
+
"summary": "See your active brand, component counts, token overrides, and design sync status.",
|
|
217
|
+
"usage": "sketchbook status [--json]",
|
|
218
|
+
"args": [],
|
|
219
|
+
"options": {},
|
|
220
|
+
"examples": [
|
|
221
|
+
"sketchbook status",
|
|
222
|
+
"sketchbook status --json"
|
|
223
|
+
],
|
|
224
|
+
"mutates": false,
|
|
225
|
+
"risk": "read"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "doctor",
|
|
229
|
+
"group": "project",
|
|
230
|
+
"summary": "See what needs attention in your project. Review checks, installed files, agent profiles, and design sync. Uses the same exit codes as sketchbook check.",
|
|
231
|
+
"usage": "sketchbook doctor [--json]",
|
|
232
|
+
"args": [],
|
|
233
|
+
"options": {},
|
|
234
|
+
"examples": [
|
|
235
|
+
"sketchbook doctor",
|
|
236
|
+
"sketchbook doctor --json"
|
|
237
|
+
],
|
|
238
|
+
"mutates": false,
|
|
239
|
+
"risk": "read"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "upgrade",
|
|
243
|
+
"group": "project",
|
|
244
|
+
"summary": "Update harness-owned files from the installed engine or a newer Sketchbook source. Preview the files with --dry-run. For a folder or Git URL, use --from. Updating from that source requires --yes when files would change.",
|
|
245
|
+
"usage": "sketchbook upgrade [--from <path|git-url>] [--yes] [--dry-run] [--json]",
|
|
246
|
+
"args": [],
|
|
247
|
+
"options": {
|
|
248
|
+
"from": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "A newer Sketchbook: a folder, or a git URL (cloned shallowly; its commit is printed)",
|
|
251
|
+
"value": "path|git-url"
|
|
252
|
+
},
|
|
253
|
+
"yes": {
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"description": "Confirm writing the upstream harness code (required whenever files would change), then run the checks with it"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"examples": [
|
|
259
|
+
"sketchbook upgrade --from ../sketchbook --dry-run",
|
|
260
|
+
"sketchbook upgrade --from ../sketchbook --yes",
|
|
261
|
+
"sketchbook upgrade --from https://example.com/sketchbook.git --dry-run"
|
|
262
|
+
],
|
|
263
|
+
"mutates": true,
|
|
264
|
+
"risk": "upgrade",
|
|
265
|
+
"dryRun": true
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "propagate",
|
|
269
|
+
"group": "project",
|
|
270
|
+
"summary": "Rebuild outputs after a source change and record the build. Use --maintainer to include Storybook and the Docs site. Run the generated design scripts to carry the change into Figma.",
|
|
271
|
+
"usage": "sketchbook propagate [--maintainer] [--json]",
|
|
272
|
+
"args": [],
|
|
273
|
+
"options": {
|
|
274
|
+
"maintainer": {
|
|
275
|
+
"type": "boolean",
|
|
276
|
+
"description": "Also build Storybook and the docs site, and record them for check --maintainer"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"examples": [
|
|
280
|
+
"sketchbook propagate",
|
|
281
|
+
"sketchbook propagate --maintainer"
|
|
282
|
+
],
|
|
283
|
+
"mutates": true,
|
|
284
|
+
"risk": "write"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "generate",
|
|
288
|
+
"group": "project",
|
|
289
|
+
"summary": "Rebuild tokens, styles, and other generated outputs from your project sources. Run npm run generate in an initialized project for the same build.",
|
|
290
|
+
"usage": "sketchbook generate [--json]",
|
|
291
|
+
"args": [],
|
|
292
|
+
"options": {},
|
|
293
|
+
"examples": [
|
|
294
|
+
"sketchbook generate",
|
|
295
|
+
"sketchbook generate --json"
|
|
296
|
+
],
|
|
297
|
+
"mutates": true,
|
|
298
|
+
"risk": "write"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "prefix",
|
|
302
|
+
"group": "project",
|
|
303
|
+
"summary": "Change the element and CSS prefix across your project, then rebuild and check the outputs.",
|
|
304
|
+
"usage": "sketchbook prefix <new> [--dry-run] [--json]",
|
|
305
|
+
"args": [
|
|
306
|
+
{
|
|
307
|
+
"name": "new",
|
|
308
|
+
"required": true,
|
|
309
|
+
"description": "Lowercase letters and digits, e.g. acme"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"options": {},
|
|
313
|
+
"examples": [
|
|
314
|
+
"sketchbook prefix acme",
|
|
315
|
+
"sketchbook prefix acme --dry-run"
|
|
316
|
+
],
|
|
317
|
+
"mutates": true,
|
|
318
|
+
"risk": "write",
|
|
319
|
+
"dryRun": true
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "swap",
|
|
323
|
+
"group": "project",
|
|
324
|
+
"summary": "Change the tool that builds tokens or syncs your design file, then rebuild and check.",
|
|
325
|
+
"usage": "sketchbook swap <output> <adapter> [--file <id>] [--dry-run] [--json]",
|
|
326
|
+
"args": [
|
|
327
|
+
{
|
|
328
|
+
"name": "output",
|
|
329
|
+
"required": true,
|
|
330
|
+
"description": "What to swap: tokens | design"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "adapter",
|
|
334
|
+
"required": true,
|
|
335
|
+
"description": "tokens: style-dictionary | plain; design: figma | none"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"options": {
|
|
339
|
+
"file": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"description": "Design file key (design figma)",
|
|
342
|
+
"value": "id"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"examples": [
|
|
346
|
+
"sketchbook swap tokens plain",
|
|
347
|
+
"sketchbook swap design none"
|
|
348
|
+
],
|
|
349
|
+
"mutates": true,
|
|
350
|
+
"risk": "write",
|
|
351
|
+
"dryRun": true
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "add",
|
|
355
|
+
"group": "components",
|
|
356
|
+
"summary": "Install a catalog component with its dependencies, or start a new contract with --blank.",
|
|
357
|
+
"usage": "sketchbook add <Component Name...> [--blank] [--dry-run] [--json]",
|
|
358
|
+
"args": [
|
|
359
|
+
{
|
|
360
|
+
"name": "Component Name",
|
|
361
|
+
"required": true,
|
|
362
|
+
"variadic": true,
|
|
363
|
+
"description": "Catalog name (button, \"Button Group\") or a registry entry for --blank"
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"options": {
|
|
367
|
+
"blank": {
|
|
368
|
+
"type": "boolean",
|
|
369
|
+
"description": "Scaffold an empty contract instead of installing from the catalog"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"examples": [
|
|
373
|
+
"sketchbook add button",
|
|
374
|
+
"sketchbook add Button Group --dry-run",
|
|
375
|
+
"sketchbook add Date Picker --blank"
|
|
376
|
+
],
|
|
377
|
+
"mutates": true,
|
|
378
|
+
"risk": "write",
|
|
379
|
+
"dryRun": true
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"name": "approve",
|
|
383
|
+
"group": "components",
|
|
384
|
+
"summary": "Record a person’s approval of a component’s contract and plan, or carry it over a change that leaves the scope as approved. Check C4 verifies it.",
|
|
385
|
+
"usage": "sketchbook approve [Component Name...] [--by <name>] [--diff] [--carry] [--reason <text>] [--review] [--backfill] [--basis <ref>] [--dry-run] [--json]",
|
|
386
|
+
"args": [
|
|
387
|
+
{
|
|
388
|
+
"name": "Component Name",
|
|
389
|
+
"required": false,
|
|
390
|
+
"variadic": true,
|
|
391
|
+
"description": "Component with spec/components/<name>/contract.json and plan.md (not with --review or --backfill)"
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
"options": {
|
|
395
|
+
"by": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "The person approving (approve, --backfill) or confirming carried approvals (--review)",
|
|
398
|
+
"value": "name"
|
|
399
|
+
},
|
|
400
|
+
"diff": {
|
|
401
|
+
"type": "boolean",
|
|
402
|
+
"description": "Show what changed since the approval and how the CLI classifies it (none, mechanical, editorial, material). Read-only"
|
|
403
|
+
},
|
|
404
|
+
"carry": {
|
|
405
|
+
"type": "boolean",
|
|
406
|
+
"description": "Carry the approval over a mechanical change, or an editorial one when approval.triage is on. Refuses a material change"
|
|
407
|
+
},
|
|
408
|
+
"reason": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"description": "With --carry: why the approved scope is unchanged (required for an editorial change)",
|
|
411
|
+
"value": "text"
|
|
412
|
+
},
|
|
413
|
+
"review": {
|
|
414
|
+
"type": "boolean",
|
|
415
|
+
"description": "Show the saved changes for each pending editorial carry. With --by, confirm the batch only if every carry still matches the current scope"
|
|
416
|
+
},
|
|
417
|
+
"backfill": {
|
|
418
|
+
"type": "boolean",
|
|
419
|
+
"description": "Write a record for every plan that has none (needs --by and --basis)"
|
|
420
|
+
},
|
|
421
|
+
"basis": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "With --backfill: what the original approval rests on (for example SB-0011); \"Approved under SB-NNNN\" or another approved Status line on the plan wins",
|
|
424
|
+
"value": "ref"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"examples": [
|
|
428
|
+
"sketchbook approve switch --by \"Ana Diaz\"",
|
|
429
|
+
"sketchbook approve switch --diff",
|
|
430
|
+
"sketchbook approve switch --carry --reason \"Reworded the summary\"",
|
|
431
|
+
"sketchbook approve --review",
|
|
432
|
+
"sketchbook approve --review --by Ana",
|
|
433
|
+
"sketchbook approve --backfill --by Ana --basis SB-0011 --dry-run"
|
|
434
|
+
],
|
|
435
|
+
"mutates": true,
|
|
436
|
+
"risk": "write",
|
|
437
|
+
"dryRun": true
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "remove",
|
|
441
|
+
"group": "components",
|
|
442
|
+
"summary": "Remove a component you no longer use. Review dependencies and local edits before removing it.",
|
|
443
|
+
"usage": "sketchbook remove <Component Name...> [--yes] [--dry-run] [--json]",
|
|
444
|
+
"args": [
|
|
445
|
+
{
|
|
446
|
+
"name": "Component Name",
|
|
447
|
+
"required": true,
|
|
448
|
+
"variadic": true,
|
|
449
|
+
"description": "Installed component (button, \"Button Group\")"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"options": {
|
|
453
|
+
"yes": {
|
|
454
|
+
"type": "boolean",
|
|
455
|
+
"description": "Confirm removing a component the catalog cannot bring back as it is (team-made or customized)"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"examples": [
|
|
459
|
+
"sketchbook remove badge",
|
|
460
|
+
"sketchbook remove spinner --dry-run",
|
|
461
|
+
"sketchbook remove my-widget --yes"
|
|
462
|
+
],
|
|
463
|
+
"mutates": true,
|
|
464
|
+
"risk": "delete",
|
|
465
|
+
"dryRun": true
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "list",
|
|
469
|
+
"group": "components",
|
|
470
|
+
"summary": "Browse installed and available components and see which dependencies they need.",
|
|
471
|
+
"usage": "sketchbook list [--installed] [--available] [--json]",
|
|
472
|
+
"args": [],
|
|
473
|
+
"options": {
|
|
474
|
+
"installed": {
|
|
475
|
+
"type": "boolean",
|
|
476
|
+
"description": "Only installed components (including ones the team made)"
|
|
477
|
+
},
|
|
478
|
+
"available": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"description": "Only catalog components not installed yet"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"examples": [
|
|
484
|
+
"sketchbook list",
|
|
485
|
+
"sketchbook list --available",
|
|
486
|
+
"sketchbook list --installed --json"
|
|
487
|
+
],
|
|
488
|
+
"mutates": false,
|
|
489
|
+
"risk": "read",
|
|
490
|
+
"project": false
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "kits",
|
|
494
|
+
"group": "components",
|
|
495
|
+
"summary": "Browse template kits, install a kit with its components, or remove one.",
|
|
496
|
+
"usage": "sketchbook kits [action] [kit...] [--yes] [--dry-run] [--json]",
|
|
497
|
+
"args": [
|
|
498
|
+
{
|
|
499
|
+
"name": "action",
|
|
500
|
+
"required": false,
|
|
501
|
+
"description": "list (default) | add | remove"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "kit",
|
|
505
|
+
"required": false,
|
|
506
|
+
"variadic": true,
|
|
507
|
+
"description": "Kit id(s), e.g. sign-in settings"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"options": {
|
|
511
|
+
"yes": {
|
|
512
|
+
"type": "boolean",
|
|
513
|
+
"description": "remove: confirm removing a kit whose files differ from the catalog (your edits are only in git)"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"examples": [
|
|
517
|
+
"sketchbook kits list",
|
|
518
|
+
"sketchbook kits add sign-in --dry-run",
|
|
519
|
+
"sketchbook kits remove dashboard",
|
|
520
|
+
"sketchbook kits remove dashboard --yes"
|
|
521
|
+
],
|
|
522
|
+
"mutates": true,
|
|
523
|
+
"risk": "write",
|
|
524
|
+
"dryRun": true,
|
|
525
|
+
"subcommands": [
|
|
526
|
+
{
|
|
527
|
+
"name": "list",
|
|
528
|
+
"usage": "sketchbook kits list",
|
|
529
|
+
"summary": "List available and installed template kits.",
|
|
530
|
+
"mutates": false,
|
|
531
|
+
"risk": "read",
|
|
532
|
+
"examples": [
|
|
533
|
+
"sketchbook kits list"
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "add",
|
|
538
|
+
"usage": "sketchbook kits add <kit...>",
|
|
539
|
+
"summary": "Install template kits and their components.",
|
|
540
|
+
"mutates": true,
|
|
541
|
+
"risk": "install",
|
|
542
|
+
"examples": [
|
|
543
|
+
"sketchbook kits add sign-in --dry-run"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "remove",
|
|
548
|
+
"usage": "sketchbook kits remove <kit...>",
|
|
549
|
+
"summary": "Remove installed template kits.",
|
|
550
|
+
"mutates": true,
|
|
551
|
+
"risk": "delete",
|
|
552
|
+
"examples": [
|
|
553
|
+
"sketchbook kits remove dashboard"
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
]
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "tokens",
|
|
560
|
+
"group": "tokens",
|
|
561
|
+
"summary": "Set foundation values, rename semantic tokens, or trace the impact of a change.",
|
|
562
|
+
"usage": "sketchbook tokens <subcommand> [args...] [--value <v>] [--light <v>] [--dark <v>] [--type <type>] [--pair <fg:bg>] [--kind <text|large-text|ui>] [--against <ref>] [--from <dtcg|css>] [--name <n>] [--only <semantic|foundation|mapped>] [--min-confidence <0.6>] [--map <file>] [--preset <id>] [--out <file>] [--answers <file.json>] [--all] [--yes] [--verbose] [--no-record] [--dry-run] [--json]",
|
|
563
|
+
"args": [
|
|
564
|
+
{
|
|
565
|
+
"name": "subcommand",
|
|
566
|
+
"required": true,
|
|
567
|
+
"description": "rebuild | set | preset | presets | diff | impact | add | remove | rename | rename-plan | import | scratch | overrides"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"name": "args",
|
|
571
|
+
"required": false,
|
|
572
|
+
"variadic": true,
|
|
573
|
+
"description": "The subcommand's arguments (see below)"
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
"options": {
|
|
577
|
+
"value": {
|
|
578
|
+
"type": "string",
|
|
579
|
+
"description": "add: mode-less value (alias like {space.4}, or a literal)",
|
|
580
|
+
"value": "v"
|
|
581
|
+
},
|
|
582
|
+
"light": {
|
|
583
|
+
"type": "string",
|
|
584
|
+
"description": "add: value for light-role modes",
|
|
585
|
+
"value": "v"
|
|
586
|
+
},
|
|
587
|
+
"dark": {
|
|
588
|
+
"type": "string",
|
|
589
|
+
"description": "add: value for dark-role modes",
|
|
590
|
+
"value": "v"
|
|
591
|
+
},
|
|
592
|
+
"type": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"description": "add: $type when it cannot be inferred (color, dimension, number, …)",
|
|
595
|
+
"value": "type"
|
|
596
|
+
},
|
|
597
|
+
"pair": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"description": "add: also declare a contrast pair (fg:bg or fg/bg) in spec/tokens/contrast.json",
|
|
600
|
+
"value": "fg:bg"
|
|
601
|
+
},
|
|
602
|
+
"kind": {
|
|
603
|
+
"type": "string",
|
|
604
|
+
"description": "add: kind of the contrast pair (default text)",
|
|
605
|
+
"value": "text|large-text|ui"
|
|
606
|
+
},
|
|
607
|
+
"against": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"description": "diff: git ref to compare with (default HEAD)",
|
|
610
|
+
"value": "ref"
|
|
611
|
+
},
|
|
612
|
+
"from": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"description": "import: source format (default: from the file, .css/.scss is css, .json or a folder is dtcg)",
|
|
615
|
+
"value": "dtcg|css"
|
|
616
|
+
},
|
|
617
|
+
"name": {
|
|
618
|
+
"type": "string",
|
|
619
|
+
"description": "import: proposal name (default: the file name)",
|
|
620
|
+
"value": "n"
|
|
621
|
+
},
|
|
622
|
+
"only": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"description": "import apply: only semantic (alias mapped) or only foundation entries",
|
|
625
|
+
"value": "semantic|foundation|mapped"
|
|
626
|
+
},
|
|
627
|
+
"min-confidence": {
|
|
628
|
+
"type": "string",
|
|
629
|
+
"description": "import apply: skip entries below this confidence",
|
|
630
|
+
"value": "0.6"
|
|
631
|
+
},
|
|
632
|
+
"map": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"description": "rename: read a JSON list of semantic token renames",
|
|
635
|
+
"value": "file"
|
|
636
|
+
},
|
|
637
|
+
"preset": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"description": "rename-plan: pick a naming preset from tokens rename-plan",
|
|
640
|
+
"value": "id"
|
|
641
|
+
},
|
|
642
|
+
"out": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"description": "rename-plan: write the list to this new JSON file",
|
|
645
|
+
"value": "file"
|
|
646
|
+
},
|
|
647
|
+
"answers": {
|
|
648
|
+
"type": "string",
|
|
649
|
+
"description": "scratch: answers (name, primary, neutral, font, scale, spacing, radius, density, motion, elevation, contrast)",
|
|
650
|
+
"value": "file.json"
|
|
651
|
+
},
|
|
652
|
+
"all": {
|
|
653
|
+
"type": "boolean",
|
|
654
|
+
"description": "overrides reset: every override"
|
|
655
|
+
},
|
|
656
|
+
"yes": {
|
|
657
|
+
"type": "boolean",
|
|
658
|
+
"description": "overrides reset --all: confirm without asking; any mutating subcommand: let the brand links overwrite hand-edited linked tokens"
|
|
659
|
+
},
|
|
660
|
+
"verbose": {
|
|
661
|
+
"type": "boolean",
|
|
662
|
+
"description": "impact: list every file reference"
|
|
663
|
+
},
|
|
664
|
+
"no-record": {
|
|
665
|
+
"type": "boolean",
|
|
666
|
+
"description": "Do not propose an SB decision record (each mutating call that changes a file proposes one otherwise)"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"examples": [
|
|
670
|
+
"sketchbook tokens rename-plan",
|
|
671
|
+
"sketchbook tokens rename-plan --preset on-role-colors --out token-renames.json",
|
|
672
|
+
"sketchbook tokens rename --map token-renames.json --dry-run",
|
|
673
|
+
"sketchbook tokens set typography.family Inter --dry-run",
|
|
674
|
+
"sketchbook tokens impact color.border",
|
|
675
|
+
"sketchbook tokens import theme.css --from css"
|
|
676
|
+
],
|
|
677
|
+
"mutates": true,
|
|
678
|
+
"risk": "write",
|
|
679
|
+
"dryRun": true,
|
|
680
|
+
"subcommands": [
|
|
681
|
+
{
|
|
682
|
+
"name": "rebuild",
|
|
683
|
+
"usage": "sketchbook tokens rebuild",
|
|
684
|
+
"summary": "Rebuild foundations and linked tokens from the current brand, preserving recorded and hand-edited foundation overrides. Review the dry run first.",
|
|
685
|
+
"mutates": true,
|
|
686
|
+
"risk": "write",
|
|
687
|
+
"examples": [
|
|
688
|
+
"sketchbook tokens rebuild --dry-run",
|
|
689
|
+
"sketchbook tokens rebuild"
|
|
690
|
+
]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "set",
|
|
694
|
+
"usage": "sketchbook tokens set <key> <value>",
|
|
695
|
+
"summary": "Set one value in brand.config.json by dot path (validated against the schema and the catalog); a .preset key replaces its sibling fine overrides.",
|
|
696
|
+
"mutates": true,
|
|
697
|
+
"risk": "write",
|
|
698
|
+
"examples": [
|
|
699
|
+
"sketchbook tokens set typography.family Inter",
|
|
700
|
+
"sketchbook tokens set spacing.preset grid-8 --dry-run",
|
|
701
|
+
"sketchbook tokens set color.primary \"#0F766E\""
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "preset",
|
|
706
|
+
"usage": "sketchbook tokens preset <foundation> <id>",
|
|
707
|
+
"summary": "Switch a foundation to a catalog preset. <foundation> is a family (typeScale), its config key (typography.scale) or an area (typography, color, z-index).",
|
|
708
|
+
"mutates": true,
|
|
709
|
+
"risk": "write",
|
|
710
|
+
"examples": [
|
|
711
|
+
"sketchbook tokens preset spacing grid-8 --dry-run",
|
|
712
|
+
"sketchbook tokens preset typography perfect-fourth",
|
|
713
|
+
"sketchbook tokens preset motion material-like"
|
|
714
|
+
]
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"name": "presets",
|
|
718
|
+
"usage": "sketchbook tokens presets [foundation]",
|
|
719
|
+
"summary": "List the standards catalog (same as sketchbook presets); an area lists each of its families.",
|
|
720
|
+
"mutates": false,
|
|
721
|
+
"risk": "read",
|
|
722
|
+
"examples": [
|
|
723
|
+
"sketchbook tokens presets",
|
|
724
|
+
"sketchbook tokens presets color"
|
|
725
|
+
]
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "diff",
|
|
729
|
+
"usage": "sketchbook tokens diff [--against <ref>]",
|
|
730
|
+
"summary": "CSS custom properties added, removed and changed per mode: generated/css/tokens.css now vs a git ref (default HEAD).",
|
|
731
|
+
"mutates": false,
|
|
732
|
+
"risk": "read",
|
|
733
|
+
"examples": [
|
|
734
|
+
"sketchbook tokens diff",
|
|
735
|
+
"sketchbook tokens diff --against main"
|
|
736
|
+
]
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "impact",
|
|
740
|
+
"usage": "sketchbook tokens impact <token-path | --css-var>",
|
|
741
|
+
"summary": "What depends on a token: semantic aliases, brand links, contracts (component tokens, contrast pairs), and stories, specs, .storybook and patterns using its CSS variable.",
|
|
742
|
+
"mutates": false,
|
|
743
|
+
"risk": "read",
|
|
744
|
+
"examples": [
|
|
745
|
+
"sketchbook tokens impact color.primary",
|
|
746
|
+
"sketchbook tokens impact color.neutral.900"
|
|
747
|
+
]
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "add",
|
|
751
|
+
"usage": "sketchbook tokens add <semantic.path> (--value v | --light v --dark v) [--type t] [--pair fg:bg --kind text|large-text|ui]",
|
|
752
|
+
"summary": "Add a semantic token: one mode-less value (--value) or one per mode (--light, --dark; modes by role); optionally a contrast pair.",
|
|
753
|
+
"mutates": true,
|
|
754
|
+
"risk": "write",
|
|
755
|
+
"examples": [
|
|
756
|
+
"sketchbook tokens add color.highlight --light \"{color.neutral.100}\" --dark \"{color.neutral.800}\" --pair color.foreground:color.highlight",
|
|
757
|
+
"sketchbook tokens add space.section --value \"{space.16}\""
|
|
758
|
+
]
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"name": "remove",
|
|
762
|
+
"usage": "sketchbook tokens remove <semantic.path>",
|
|
763
|
+
"summary": "Remove a semantic token from every semantic file; refused (with the impact) while anything depends on it.",
|
|
764
|
+
"mutates": true,
|
|
765
|
+
"risk": "delete",
|
|
766
|
+
"examples": [
|
|
767
|
+
"sketchbook tokens remove color.legacy-accent --dry-run"
|
|
768
|
+
]
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "rename",
|
|
772
|
+
"usage": "sketchbook tokens rename [<old> <new> | --map <file>] [--dry-run] [--details]",
|
|
773
|
+
"summary": "Rename one semantic token or group, or use --map to rename several tokens together. Updates references and checks the whole change before writing.",
|
|
774
|
+
"mutates": true,
|
|
775
|
+
"risk": "write",
|
|
776
|
+
"examples": [
|
|
777
|
+
"sketchbook tokens rename --map token-renames.json --dry-run",
|
|
778
|
+
"sketchbook tokens rename --map token-renames.json",
|
|
779
|
+
"sketchbook tokens rename color.muted color.subtle --dry-run"
|
|
780
|
+
]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "rename-plan",
|
|
784
|
+
"usage": "sketchbook tokens rename-plan [--preset <id> --out <file>] [--dry-run]",
|
|
785
|
+
"summary": "List naming presets, or write an editable JSON rename list. Does not change tokens or overwrite a file.",
|
|
786
|
+
"mutates": true,
|
|
787
|
+
"risk": "write",
|
|
788
|
+
"examples": [
|
|
789
|
+
"sketchbook tokens rename-plan",
|
|
790
|
+
"sketchbook tokens rename-plan --preset on-role-colors --out token-renames.json"
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "import",
|
|
795
|
+
"usage": "sketchbook tokens import <file|folder> --from dtcg|css [--name n] | import apply <proposal> [--only semantic|foundation|mapped] [--min-confidence 0.6]",
|
|
796
|
+
"summary": "Parse existing tokens (DTCG / Tokens Studio, one file or a folder of sets, CSS custom properties) into generated/import/<name>.proposal.json with a proposed mapping; \"import apply\" writes a reviewed proposal into brand.config and the semantic files.",
|
|
797
|
+
"mutates": true,
|
|
798
|
+
"risk": "write",
|
|
799
|
+
"examples": [
|
|
800
|
+
"sketchbook tokens import tokens.json --from dtcg",
|
|
801
|
+
"sketchbook tokens import theme.css --from css --name brand",
|
|
802
|
+
"sketchbook tokens import apply generated/import/brand.proposal.json --dry-run"
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "scratch",
|
|
807
|
+
"usage": "sketchbook tokens scratch [--answers file.json]",
|
|
808
|
+
"summary": "Restart the foundations: a minimal brand.config.json from answers (a JSON file, or questions when interactive; defaults otherwise). The semantic interface is kept.",
|
|
809
|
+
"mutates": true,
|
|
810
|
+
"risk": "write",
|
|
811
|
+
"examples": [
|
|
812
|
+
"sketchbook tokens scratch --dry-run",
|
|
813
|
+
"sketchbook tokens scratch --answers answers.json"
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"name": "overrides",
|
|
818
|
+
"usage": "sketchbook tokens overrides list | reset <path> | reset --all [--yes]",
|
|
819
|
+
"summary": "Hand edits kept in spec/tokens/overrides.json: list them, reset one to the generated value (a hand-added token is removed), or reset all (asks unless --yes).",
|
|
820
|
+
"mutates": true,
|
|
821
|
+
"risk": "write",
|
|
822
|
+
"examples": [
|
|
823
|
+
"sketchbook tokens overrides list",
|
|
824
|
+
"sketchbook tokens overrides reset radius.md",
|
|
825
|
+
"sketchbook tokens overrides reset --all --yes"
|
|
826
|
+
]
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"name": "presets",
|
|
832
|
+
"group": "tokens",
|
|
833
|
+
"summary": "Browse foundation presets by family, with their values and sources.",
|
|
834
|
+
"usage": "sketchbook presets [family] [--json]",
|
|
835
|
+
"args": [
|
|
836
|
+
{
|
|
837
|
+
"name": "family",
|
|
838
|
+
"required": false,
|
|
839
|
+
"description": "A family id, e.g. spacing, typeScale, motion"
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"options": {},
|
|
843
|
+
"examples": [
|
|
844
|
+
"sketchbook presets",
|
|
845
|
+
"sketchbook presets motion"
|
|
846
|
+
],
|
|
847
|
+
"mutates": false,
|
|
848
|
+
"risk": "read",
|
|
849
|
+
"project": false
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"name": "brand",
|
|
853
|
+
"group": "tokens",
|
|
854
|
+
"summary": "Add, list, or switch brands that share the same semantic token names.",
|
|
855
|
+
"usage": "sketchbook brand [action] [name] [--from <current|brand>] [--yes] [--dry-run] [--json]",
|
|
856
|
+
"args": [
|
|
857
|
+
{
|
|
858
|
+
"name": "action",
|
|
859
|
+
"required": false,
|
|
860
|
+
"description": "list (default) | add | use | build"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "name",
|
|
864
|
+
"required": false,
|
|
865
|
+
"description": "Brand name (lowercase), for add and use"
|
|
866
|
+
}
|
|
867
|
+
],
|
|
868
|
+
"options": {
|
|
869
|
+
"from": {
|
|
870
|
+
"type": "string",
|
|
871
|
+
"description": "add: start from brand.config.json (current, default) or another brand",
|
|
872
|
+
"value": "current|brand"
|
|
873
|
+
},
|
|
874
|
+
"yes": {
|
|
875
|
+
"type": "boolean",
|
|
876
|
+
"description": "use: confirm overwriting brand.config.json edits saved in no brand file, and clearing foundation overrides"
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"examples": [
|
|
880
|
+
"sketchbook brand add ocean --from current",
|
|
881
|
+
"sketchbook brand list",
|
|
882
|
+
"sketchbook brand use ocean",
|
|
883
|
+
"sketchbook brand build"
|
|
884
|
+
],
|
|
885
|
+
"mutates": true,
|
|
886
|
+
"risk": "write",
|
|
887
|
+
"dryRun": true,
|
|
888
|
+
"subcommands": [
|
|
889
|
+
{
|
|
890
|
+
"name": "add",
|
|
891
|
+
"usage": "sketchbook brand add <name>",
|
|
892
|
+
"summary": "Add a brand file from the current brand or another brand.",
|
|
893
|
+
"mutates": true,
|
|
894
|
+
"risk": "write",
|
|
895
|
+
"examples": [
|
|
896
|
+
"sketchbook brand add ocean --from current"
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "list",
|
|
901
|
+
"usage": "sketchbook brand list",
|
|
902
|
+
"summary": "List available and active brands.",
|
|
903
|
+
"mutates": false,
|
|
904
|
+
"risk": "read",
|
|
905
|
+
"examples": [
|
|
906
|
+
"sketchbook brand list"
|
|
907
|
+
]
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "use",
|
|
911
|
+
"usage": "sketchbook brand use <name>",
|
|
912
|
+
"summary": "Switch the active brand.",
|
|
913
|
+
"mutates": true,
|
|
914
|
+
"risk": "write",
|
|
915
|
+
"examples": [
|
|
916
|
+
"sketchbook brand use ocean"
|
|
917
|
+
]
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "build",
|
|
921
|
+
"usage": "sketchbook brand build",
|
|
922
|
+
"summary": "Build brand CSS outputs.",
|
|
923
|
+
"mutates": true,
|
|
924
|
+
"risk": "write",
|
|
925
|
+
"examples": [
|
|
926
|
+
"sketchbook brand build"
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "icons",
|
|
933
|
+
"group": "design",
|
|
934
|
+
"summary": "List the icons in your project or add icons from Lucide.",
|
|
935
|
+
"usage": "sketchbook icons [action] [names...] [--category <category>] [--dry-run] [--json]",
|
|
936
|
+
"args": [
|
|
937
|
+
{
|
|
938
|
+
"name": "action",
|
|
939
|
+
"required": false,
|
|
940
|
+
"description": "list (default) | add | remove"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"name": "names",
|
|
944
|
+
"required": false,
|
|
945
|
+
"variadic": true,
|
|
946
|
+
"description": "Lucide icon names, e.g. chevron-down check"
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
"options": {
|
|
950
|
+
"category": {
|
|
951
|
+
"type": "string",
|
|
952
|
+
"description": "add: group in the design file (action, navigation, feedback, content, ...)",
|
|
953
|
+
"value": "category"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"examples": [
|
|
957
|
+
"sketchbook icons list",
|
|
958
|
+
"sketchbook icons add chevron-down check --category navigation",
|
|
959
|
+
"sketchbook icons remove star"
|
|
960
|
+
],
|
|
961
|
+
"mutates": true,
|
|
962
|
+
"risk": "write",
|
|
963
|
+
"dryRun": true,
|
|
964
|
+
"subcommands": [
|
|
965
|
+
{
|
|
966
|
+
"name": "list",
|
|
967
|
+
"usage": "sketchbook icons list",
|
|
968
|
+
"summary": "List the icons selected in your project.",
|
|
969
|
+
"mutates": false,
|
|
970
|
+
"risk": "read",
|
|
971
|
+
"examples": [
|
|
972
|
+
"sketchbook icons list"
|
|
973
|
+
]
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"name": "add",
|
|
977
|
+
"usage": "sketchbook icons add <name...>",
|
|
978
|
+
"summary": "Add icons from Lucide.",
|
|
979
|
+
"mutates": true,
|
|
980
|
+
"risk": "write",
|
|
981
|
+
"examples": [
|
|
982
|
+
"sketchbook icons add chevron-down check --category navigation"
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"name": "remove",
|
|
987
|
+
"usage": "sketchbook icons remove <name...>",
|
|
988
|
+
"summary": "Remove icons from the selected set.",
|
|
989
|
+
"mutates": true,
|
|
990
|
+
"risk": "delete",
|
|
991
|
+
"examples": [
|
|
992
|
+
"sketchbook icons remove star"
|
|
993
|
+
]
|
|
994
|
+
}
|
|
995
|
+
]
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"name": "api",
|
|
999
|
+
"group": "components",
|
|
1000
|
+
"summary": "Look up component property, event, and state names in the shared API vocabulary.",
|
|
1001
|
+
"usage": "sketchbook api [action] [name] [--json]",
|
|
1002
|
+
"args": [
|
|
1003
|
+
{
|
|
1004
|
+
"name": "action",
|
|
1005
|
+
"required": false,
|
|
1006
|
+
"description": "list (default) | check | explain"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"name": "name",
|
|
1010
|
+
"required": false,
|
|
1011
|
+
"description": "list: a component; explain: a prop, content or state name; practices: an aspect"
|
|
1012
|
+
}
|
|
1013
|
+
],
|
|
1014
|
+
"options": {},
|
|
1015
|
+
"examples": [
|
|
1016
|
+
"sketchbook api list",
|
|
1017
|
+
"sketchbook api list button",
|
|
1018
|
+
"sketchbook api check",
|
|
1019
|
+
"sketchbook api explain selected"
|
|
1020
|
+
],
|
|
1021
|
+
"mutates": false,
|
|
1022
|
+
"risk": "read",
|
|
1023
|
+
"subcommands": [
|
|
1024
|
+
{
|
|
1025
|
+
"name": "list",
|
|
1026
|
+
"usage": "sketchbook api list",
|
|
1027
|
+
"summary": "List every registered prop, event, and state name with its status.",
|
|
1028
|
+
"mutates": false,
|
|
1029
|
+
"risk": "read",
|
|
1030
|
+
"examples": [
|
|
1031
|
+
"sketchbook api list",
|
|
1032
|
+
"sketchbook api list button"
|
|
1033
|
+
]
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "check",
|
|
1037
|
+
"usage": "sketchbook api check",
|
|
1038
|
+
"summary": "Report unregistered or unmapped names across every contract (exit 1 when found).",
|
|
1039
|
+
"mutates": false,
|
|
1040
|
+
"risk": "read",
|
|
1041
|
+
"examples": [
|
|
1042
|
+
"sketchbook api check"
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "explain",
|
|
1047
|
+
"usage": "sketchbook api explain",
|
|
1048
|
+
"summary": "Explain one prop, content, or state name and where contracts use it.",
|
|
1049
|
+
"mutates": false,
|
|
1050
|
+
"risk": "read",
|
|
1051
|
+
"examples": [
|
|
1052
|
+
"sketchbook api explain selected"
|
|
1053
|
+
]
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"name": "figma",
|
|
1057
|
+
"usage": "sketchbook api figma",
|
|
1058
|
+
"summary": "Show the axes and properties drawn for one component in the design file.",
|
|
1059
|
+
"mutates": false,
|
|
1060
|
+
"risk": "read",
|
|
1061
|
+
"examples": [
|
|
1062
|
+
"sketchbook api figma button"
|
|
1063
|
+
]
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "practices",
|
|
1067
|
+
"usage": "sketchbook api practices",
|
|
1068
|
+
"summary": "Show the adopted Figma practices and why one option was adopted per aspect.",
|
|
1069
|
+
"mutates": false,
|
|
1070
|
+
"risk": "read",
|
|
1071
|
+
"examples": [
|
|
1072
|
+
"sketchbook api practices density"
|
|
1073
|
+
]
|
|
1074
|
+
}
|
|
1075
|
+
]
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "audit-css",
|
|
1079
|
+
"group": "tokens",
|
|
1080
|
+
"summary": "Inspect an existing stylesheet to find recurring values and draft foundation choices.",
|
|
1081
|
+
"usage": "sketchbook audit-css <paths...> [--dry-run] [--json]",
|
|
1082
|
+
"args": [
|
|
1083
|
+
{
|
|
1084
|
+
"name": "paths",
|
|
1085
|
+
"required": true,
|
|
1086
|
+
"variadic": true,
|
|
1087
|
+
"description": "CSS/SCSS files, folders or globs (quote globs), relative to the project"
|
|
1088
|
+
}
|
|
1089
|
+
],
|
|
1090
|
+
"options": {},
|
|
1091
|
+
"examples": [
|
|
1092
|
+
"sketchbook audit-css ../product/src",
|
|
1093
|
+
"sketchbook audit-css \"app/**/*.css\" --json"
|
|
1094
|
+
],
|
|
1095
|
+
"mutates": true,
|
|
1096
|
+
"risk": "write",
|
|
1097
|
+
"dryRun": true,
|
|
1098
|
+
"project": false
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "audit-page",
|
|
1102
|
+
"group": "quality",
|
|
1103
|
+
"summary": "Check a page for a level-one heading and a main landmark. This checks page structure only.",
|
|
1104
|
+
"usage": "sketchbook audit-page <file> [--json]",
|
|
1105
|
+
"args": [
|
|
1106
|
+
{
|
|
1107
|
+
"name": "file",
|
|
1108
|
+
"required": true,
|
|
1109
|
+
"description": "HTML file to check, relative to the current project"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
"options": {},
|
|
1113
|
+
"examples": [
|
|
1114
|
+
"sketchbook audit-page preview.html",
|
|
1115
|
+
"sketchbook audit-page preview.html --json"
|
|
1116
|
+
],
|
|
1117
|
+
"mutates": false,
|
|
1118
|
+
"risk": "read"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"name": "audit-decisions",
|
|
1122
|
+
"group": "quality",
|
|
1123
|
+
"summary": "Compare settled decisions with a trusted earlier copy or Git revision. Run sketchbook check to validate the log.",
|
|
1124
|
+
"usage": "sketchbook audit-decisions [baseline] [--git-ref <ref>] [--json]",
|
|
1125
|
+
"args": [
|
|
1126
|
+
{
|
|
1127
|
+
"name": "baseline",
|
|
1128
|
+
"required": false,
|
|
1129
|
+
"description": "Path to a trusted earlier copy of spec/decisions/DECISIONS.md"
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
"options": {
|
|
1133
|
+
"git-ref": {
|
|
1134
|
+
"type": "string",
|
|
1135
|
+
"description": "Compare against the committed log at this Git revision (for example HEAD)",
|
|
1136
|
+
"value": "ref"
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
"examples": [
|
|
1140
|
+
"sketchbook audit-decisions ../decisions-before.md",
|
|
1141
|
+
"sketchbook audit-decisions --git-ref HEAD --json"
|
|
1142
|
+
],
|
|
1143
|
+
"mutates": false,
|
|
1144
|
+
"risk": "read"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"name": "evidence",
|
|
1148
|
+
"group": "quality",
|
|
1149
|
+
"summary": "Record a component’s behavior spec failing (red) and passing (green) with the same test setup. Stub reports which tests pass without the element. Ready requires current green evidence and clean component checks. A test setup failure records nothing.",
|
|
1150
|
+
"usage": "sketchbook evidence <step> <Component Name...> [--dry-run] [--json]",
|
|
1151
|
+
"args": [
|
|
1152
|
+
{
|
|
1153
|
+
"name": "step",
|
|
1154
|
+
"required": true,
|
|
1155
|
+
"description": "red | green | stub | ready"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"name": "Component Name",
|
|
1159
|
+
"required": true,
|
|
1160
|
+
"variadic": true,
|
|
1161
|
+
"description": "Component whose contract names realizations.web.spec"
|
|
1162
|
+
}
|
|
1163
|
+
],
|
|
1164
|
+
"options": {},
|
|
1165
|
+
"examples": [
|
|
1166
|
+
"sketchbook evidence red banner",
|
|
1167
|
+
"sketchbook evidence green banner --json",
|
|
1168
|
+
"sketchbook evidence stub switch",
|
|
1169
|
+
"sketchbook evidence ready banner"
|
|
1170
|
+
],
|
|
1171
|
+
"mutates": true,
|
|
1172
|
+
"risk": "write",
|
|
1173
|
+
"dryRun": true,
|
|
1174
|
+
"subcommands": [
|
|
1175
|
+
{
|
|
1176
|
+
"name": "red",
|
|
1177
|
+
"usage": "sketchbook evidence red <component>",
|
|
1178
|
+
"summary": "Run the behavior spec against the approved plan and record the failing run as red (test-first).",
|
|
1179
|
+
"mutates": true,
|
|
1180
|
+
"risk": "write",
|
|
1181
|
+
"examples": [
|
|
1182
|
+
"sketchbook evidence red banner"
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "green",
|
|
1187
|
+
"usage": "sketchbook evidence green <component>",
|
|
1188
|
+
"summary": "Run the same behavior spec against the implementation and record the passing run as green.",
|
|
1189
|
+
"mutates": true,
|
|
1190
|
+
"risk": "write",
|
|
1191
|
+
"examples": [
|
|
1192
|
+
"sketchbook evidence green banner --json"
|
|
1193
|
+
]
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"name": "stub",
|
|
1197
|
+
"usage": "sketchbook evidence stub <component>",
|
|
1198
|
+
"summary": "Run the spec with the element stubbed out and record which tests still pass without it.",
|
|
1199
|
+
"mutates": true,
|
|
1200
|
+
"risk": "write",
|
|
1201
|
+
"examples": [
|
|
1202
|
+
"sketchbook evidence stub switch"
|
|
1203
|
+
]
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
"name": "ready",
|
|
1207
|
+
"usage": "sketchbook evidence ready <component>",
|
|
1208
|
+
"summary": "Run the done-gate checks (C1–C5, A1, R1, S1) and set the plan stage to ready when they pass.",
|
|
1209
|
+
"mutates": true,
|
|
1210
|
+
"risk": "write",
|
|
1211
|
+
"examples": [
|
|
1212
|
+
"sketchbook evidence ready banner"
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
]
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"name": "sync",
|
|
1219
|
+
"group": "design",
|
|
1220
|
+
"summary": "Prepare scripts to update or verify your Figma file. Record sync progress after you run the scripts. Use verify to compare a read-back with the spec, stamp to record a push or stage, and realize to write design realizations.",
|
|
1221
|
+
"usage": "sketchbook sync [what] [names...] [--verify] [--full] [--detail <combination>] [--url <http://localhost:6006>] [--ingest <file.json>] [--dry-run] [--json]",
|
|
1222
|
+
"args": [
|
|
1223
|
+
{
|
|
1224
|
+
"name": "what",
|
|
1225
|
+
"required": false,
|
|
1226
|
+
"description": "tokens (default) | verify | stamp | progress | describe | verify-library | layout | theme-matrix | components | patterns | compare | realize"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"name": "names",
|
|
1230
|
+
"required": false,
|
|
1231
|
+
"variadic": true,
|
|
1232
|
+
"description": "After \"stamp\": tokens|foundations|components, or library|doc|checked|note|clear, then component names (clear takes names only, and removes the note and its fix flag without changing the stage); after \"library\" or \"describe\": the components (describe defaults to every drawn one); after \"components\": one batch id of spec/design-docs.json; after \"realize\" or \"verify-library --ingest\": the components (default every drawn one)"
|
|
1233
|
+
}
|
|
1234
|
+
],
|
|
1235
|
+
"options": {
|
|
1236
|
+
"verify": {
|
|
1237
|
+
"type": "boolean",
|
|
1238
|
+
"description": "Same as \"sync verify\""
|
|
1239
|
+
},
|
|
1240
|
+
"full": {
|
|
1241
|
+
"type": "boolean",
|
|
1242
|
+
"description": "With tokens: write every variable, not only what changed since the last stamp"
|
|
1243
|
+
},
|
|
1244
|
+
"detail": {
|
|
1245
|
+
"type": "string",
|
|
1246
|
+
"description": "With verify: also return that combination's values (e.g. \"Dark | Round | Compact\") so --ingest names each differing variable. With library: the variant (e.g. \"Variant=Primary, Size=Medium, State=Rest, Disabled=False\") whose node-by-node bindings its verify script lists when they differ",
|
|
1247
|
+
"value": "combination"
|
|
1248
|
+
},
|
|
1249
|
+
"url": {
|
|
1250
|
+
"type": "string",
|
|
1251
|
+
"description": "With compare: the running Storybook to render the pattern states from (default http://localhost:6006)",
|
|
1252
|
+
"value": "http://localhost:6006"
|
|
1253
|
+
},
|
|
1254
|
+
"ingest": {
|
|
1255
|
+
"type": "string",
|
|
1256
|
+
"description": "With compare: the folder holding what each compare-<id>.js returned (<id>.fg.json); writes docs/design-docs/parity.md. With verify: compare the JSON that verify.js returned with the spec per theme combination and write generated/design/verify.json (read by check D1). With verify-library: record what verify-all.js returned per set in generated/design/library-verify.json (read by sync realize and check D4)",
|
|
1257
|
+
"value": "file.json"
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
"examples": [
|
|
1261
|
+
"sketchbook sync tokens",
|
|
1262
|
+
"sketchbook sync verify",
|
|
1263
|
+
"sketchbook sync verify --ingest figma-verify.json",
|
|
1264
|
+
"sketchbook sync stamp tokens",
|
|
1265
|
+
"sketchbook sync stamp library button",
|
|
1266
|
+
"sketchbook sync compare settings --url http://localhost:6006",
|
|
1267
|
+
"sketchbook sync compare --ingest generated/design/compare"
|
|
1268
|
+
],
|
|
1269
|
+
"mutates": true,
|
|
1270
|
+
"risk": "write",
|
|
1271
|
+
"dryRun": true,
|
|
1272
|
+
"subcommands": [
|
|
1273
|
+
{
|
|
1274
|
+
"name": "tokens",
|
|
1275
|
+
"usage": "sketchbook sync tokens",
|
|
1276
|
+
"summary": "Prepare the use_figma script that pushes the semantic and foundation tokens to the Figma file.",
|
|
1277
|
+
"mutates": true,
|
|
1278
|
+
"risk": "write",
|
|
1279
|
+
"examples": [
|
|
1280
|
+
"sketchbook sync tokens"
|
|
1281
|
+
]
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"name": "pages",
|
|
1285
|
+
"usage": "sketchbook sync pages",
|
|
1286
|
+
"summary": "Prepare the script that creates and orders the documentation pages in the Figma file.",
|
|
1287
|
+
"mutates": true,
|
|
1288
|
+
"risk": "write",
|
|
1289
|
+
"examples": [
|
|
1290
|
+
"sketchbook sync pages"
|
|
1291
|
+
]
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"name": "brand",
|
|
1295
|
+
"usage": "sketchbook sync brand",
|
|
1296
|
+
"summary": "Prepare the script that renders the brand page (color, type, icons).",
|
|
1297
|
+
"mutates": true,
|
|
1298
|
+
"risk": "write",
|
|
1299
|
+
"examples": [
|
|
1300
|
+
"sketchbook sync brand"
|
|
1301
|
+
]
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"name": "guide",
|
|
1305
|
+
"usage": "sketchbook sync guide",
|
|
1306
|
+
"summary": "Prepare the script that renders the guide pages from docs/design-docs.",
|
|
1307
|
+
"mutates": true,
|
|
1308
|
+
"risk": "write",
|
|
1309
|
+
"examples": [
|
|
1310
|
+
"sketchbook sync guide"
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"name": "foundations",
|
|
1315
|
+
"usage": "sketchbook sync foundations",
|
|
1316
|
+
"summary": "Prepare the scripts that create foundation variable styles in the Figma file.",
|
|
1317
|
+
"mutates": true,
|
|
1318
|
+
"risk": "write",
|
|
1319
|
+
"examples": [
|
|
1320
|
+
"sketchbook sync foundations"
|
|
1321
|
+
]
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"name": "icons",
|
|
1325
|
+
"usage": "sketchbook sync icons",
|
|
1326
|
+
"summary": "Prepare the scripts that render the selected Lucide icons as components.",
|
|
1327
|
+
"mutates": true,
|
|
1328
|
+
"risk": "write",
|
|
1329
|
+
"examples": [
|
|
1330
|
+
"sketchbook sync icons"
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "library",
|
|
1335
|
+
"usage": "sketchbook sync library [components...]",
|
|
1336
|
+
"summary": "Prepare the scripts that draw the component variants from the registry.",
|
|
1337
|
+
"mutates": true,
|
|
1338
|
+
"risk": "write",
|
|
1339
|
+
"examples": [
|
|
1340
|
+
"sketchbook sync library"
|
|
1341
|
+
]
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"name": "describe",
|
|
1345
|
+
"usage": "sketchbook sync describe [components...]",
|
|
1346
|
+
"summary": "Prepare the scripts that write each component’s anatomy and description into the Figma file.",
|
|
1347
|
+
"mutates": true,
|
|
1348
|
+
"risk": "write",
|
|
1349
|
+
"examples": [
|
|
1350
|
+
"sketchbook sync describe"
|
|
1351
|
+
]
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "verify-library",
|
|
1355
|
+
"usage": "sketchbook sync verify-library",
|
|
1356
|
+
"summary": "Prepare the verify-all script that reads the drawn library back for the realize gate.",
|
|
1357
|
+
"mutates": true,
|
|
1358
|
+
"risk": "write",
|
|
1359
|
+
"examples": [
|
|
1360
|
+
"sketchbook sync verify-library"
|
|
1361
|
+
]
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
"name": "layout",
|
|
1365
|
+
"usage": "sketchbook sync layout",
|
|
1366
|
+
"summary": "Prepare the script that lays out the drawn components on their pages.",
|
|
1367
|
+
"mutates": true,
|
|
1368
|
+
"risk": "write",
|
|
1369
|
+
"examples": [
|
|
1370
|
+
"sketchbook sync layout"
|
|
1371
|
+
]
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"name": "theme-matrix",
|
|
1375
|
+
"usage": "sketchbook sync theme-matrix",
|
|
1376
|
+
"summary": "Prepare the scripts that render the theme matrix per component.",
|
|
1377
|
+
"mutates": true,
|
|
1378
|
+
"risk": "write",
|
|
1379
|
+
"examples": [
|
|
1380
|
+
"sketchbook sync theme-matrix"
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
"name": "components",
|
|
1385
|
+
"usage": "sketchbook sync components <batch>",
|
|
1386
|
+
"summary": "Prepare the scripts that draw the design-doc batches of components.",
|
|
1387
|
+
"mutates": true,
|
|
1388
|
+
"risk": "write",
|
|
1389
|
+
"examples": [
|
|
1390
|
+
"sketchbook sync components"
|
|
1391
|
+
]
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"name": "patterns",
|
|
1395
|
+
"usage": "sketchbook sync patterns",
|
|
1396
|
+
"summary": "Prepare the scripts that render the pattern (kit) screens.",
|
|
1397
|
+
"mutates": true,
|
|
1398
|
+
"risk": "write",
|
|
1399
|
+
"examples": [
|
|
1400
|
+
"sketchbook sync patterns"
|
|
1401
|
+
]
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"name": "verify",
|
|
1405
|
+
"usage": "sketchbook sync verify --ingest <file.json>",
|
|
1406
|
+
"summary": "Compare a verify read-back with the spec per theme combination and write generated/design/verify.json (check D1).",
|
|
1407
|
+
"mutates": true,
|
|
1408
|
+
"risk": "write",
|
|
1409
|
+
"examples": [
|
|
1410
|
+
"sketchbook sync verify --ingest figma-verify.json"
|
|
1411
|
+
]
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"name": "stamp",
|
|
1415
|
+
"usage": "sketchbook sync stamp tokens|foundations|components <names> | library|doc|checked|note|clear <names>",
|
|
1416
|
+
"summary": "Record what the agent pushed to the Figma file, or component stages, checks, and fix notes.",
|
|
1417
|
+
"mutates": true,
|
|
1418
|
+
"risk": "write",
|
|
1419
|
+
"examples": [
|
|
1420
|
+
"sketchbook sync stamp tokens",
|
|
1421
|
+
"sketchbook sync stamp library button",
|
|
1422
|
+
"sketchbook sync stamp note button \"label color\""
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
"name": "progress",
|
|
1427
|
+
"usage": "sketchbook sync progress",
|
|
1428
|
+
"summary": "Write the parity progress view from the recorded sync stages.",
|
|
1429
|
+
"mutates": true,
|
|
1430
|
+
"risk": "write",
|
|
1431
|
+
"examples": [
|
|
1432
|
+
"sketchbook sync progress"
|
|
1433
|
+
]
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
"name": "realize",
|
|
1437
|
+
"usage": "sketchbook sync realize [components...]",
|
|
1438
|
+
"summary": "Write design realizations from the library verify read-back (check D4 reads the result).",
|
|
1439
|
+
"mutates": true,
|
|
1440
|
+
"risk": "write",
|
|
1441
|
+
"examples": [
|
|
1442
|
+
"sketchbook sync realize"
|
|
1443
|
+
]
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"name": "compare",
|
|
1447
|
+
"usage": "sketchbook sync compare [patterns] [--url <storybook>] | --ingest <dir>",
|
|
1448
|
+
"summary": "Render pattern states from Storybook and compare digests; with --ingest, write docs/design-docs/parity.md.",
|
|
1449
|
+
"mutates": true,
|
|
1450
|
+
"risk": "write",
|
|
1451
|
+
"examples": [
|
|
1452
|
+
"sketchbook sync compare settings --url http://localhost:6006",
|
|
1453
|
+
"sketchbook sync compare --ingest generated/design/compare"
|
|
1454
|
+
]
|
|
1455
|
+
}
|
|
1456
|
+
]
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"name": "docs",
|
|
1460
|
+
"group": "design",
|
|
1461
|
+
"summary": "Read a component or kit’s variants, tokens, and accessibility guidance. Use --json for the design blueprint.",
|
|
1462
|
+
"usage": "sketchbook docs <name> [--json]",
|
|
1463
|
+
"args": [
|
|
1464
|
+
{
|
|
1465
|
+
"name": "name",
|
|
1466
|
+
"required": true,
|
|
1467
|
+
"description": "A component folder name (spec/components) or a pattern id (src/patterns)"
|
|
1468
|
+
}
|
|
1469
|
+
],
|
|
1470
|
+
"options": {},
|
|
1471
|
+
"examples": [
|
|
1472
|
+
"sketchbook docs button",
|
|
1473
|
+
"sketchbook docs field --json",
|
|
1474
|
+
"sketchbook docs sign-in"
|
|
1475
|
+
],
|
|
1476
|
+
"mutates": false,
|
|
1477
|
+
"risk": "read"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "check",
|
|
1481
|
+
"group": "quality",
|
|
1482
|
+
"summary": "Check that your sources and outputs agree. Exit 0 means pass, 1 means a failure, and 2 means pass with flagged overrides.",
|
|
1483
|
+
"usage": "sketchbook check [--only <T1,T6>] [--fix] [--verbose] [--maintainer] [--json]",
|
|
1484
|
+
"args": [],
|
|
1485
|
+
"options": {
|
|
1486
|
+
"only": {
|
|
1487
|
+
"type": "string",
|
|
1488
|
+
"description": "Run one comma-separated list of check IDs; invalid IDs and repeated --only options fail before any checks or fixes run",
|
|
1489
|
+
"value": "T1,T6"
|
|
1490
|
+
},
|
|
1491
|
+
"fix": {
|
|
1492
|
+
"type": "boolean",
|
|
1493
|
+
"description": "Rebuild generated outputs first (the only automatic fix)"
|
|
1494
|
+
},
|
|
1495
|
+
"verbose": {
|
|
1496
|
+
"type": "boolean",
|
|
1497
|
+
"description": "List every check, not only failures and warnings"
|
|
1498
|
+
},
|
|
1499
|
+
"maintainer": {
|
|
1500
|
+
"type": "boolean",
|
|
1501
|
+
"description": "Also require the Storybook and docs site builds to be current (O1) and that every shipped component is documented in every output (M1); maintainers only"
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
"examples": [
|
|
1505
|
+
"sketchbook check",
|
|
1506
|
+
"sketchbook check --only T6",
|
|
1507
|
+
"sketchbook check --maintainer",
|
|
1508
|
+
"sketchbook check --json"
|
|
1509
|
+
],
|
|
1510
|
+
"mutates": false,
|
|
1511
|
+
"risk": "read"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
"name": "selftest",
|
|
1515
|
+
"group": "quality",
|
|
1516
|
+
"summary": "Run the harness test suite to verify the tools that build and check your project.",
|
|
1517
|
+
"usage": "sketchbook selftest [--json]",
|
|
1518
|
+
"args": [],
|
|
1519
|
+
"options": {},
|
|
1520
|
+
"examples": [
|
|
1521
|
+
"sketchbook selftest"
|
|
1522
|
+
],
|
|
1523
|
+
"mutates": false,
|
|
1524
|
+
"risk": "read"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"name": "explain",
|
|
1528
|
+
"group": "quality",
|
|
1529
|
+
"summary": "Trace a token to its source, find a component’s files, or look up a decision.",
|
|
1530
|
+
"usage": "sketchbook explain <thing...> [--json]",
|
|
1531
|
+
"args": [
|
|
1532
|
+
{
|
|
1533
|
+
"name": "thing",
|
|
1534
|
+
"required": true,
|
|
1535
|
+
"variadic": true,
|
|
1536
|
+
"description": "Token path, --css-var, component name, tag, SB-NNNN or free text"
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
"options": {},
|
|
1540
|
+
"examples": [
|
|
1541
|
+
"sketchbook explain color.primary",
|
|
1542
|
+
"sketchbook explain button",
|
|
1543
|
+
"sketchbook explain SB-0024"
|
|
1544
|
+
],
|
|
1545
|
+
"mutates": false,
|
|
1546
|
+
"risk": "read"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"name": "help",
|
|
1550
|
+
"group": "meta",
|
|
1551
|
+
"summary": "Find a command or look up its usage, options, and examples.",
|
|
1552
|
+
"usage": "sketchbook help [command] [subcommand] [--json]",
|
|
1553
|
+
"args": [
|
|
1554
|
+
{
|
|
1555
|
+
"name": "command",
|
|
1556
|
+
"required": false,
|
|
1557
|
+
"description": "A command name"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"name": "subcommand",
|
|
1561
|
+
"required": false,
|
|
1562
|
+
"description": "A subcommand name"
|
|
1563
|
+
}
|
|
1564
|
+
],
|
|
1565
|
+
"options": {},
|
|
1566
|
+
"examples": [
|
|
1567
|
+
"sketchbook help",
|
|
1568
|
+
"sketchbook help init"
|
|
1569
|
+
],
|
|
1570
|
+
"mutates": false,
|
|
1571
|
+
"risk": "read",
|
|
1572
|
+
"project": false
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"name": "capabilities",
|
|
1576
|
+
"group": "meta",
|
|
1577
|
+
"summary": "List the engine version, automation protocol, and a structured manifest of every command.",
|
|
1578
|
+
"usage": "sketchbook capabilities [--json]",
|
|
1579
|
+
"args": [],
|
|
1580
|
+
"options": {},
|
|
1581
|
+
"examples": [
|
|
1582
|
+
"sketchbook capabilities",
|
|
1583
|
+
"sketchbook capabilities --json"
|
|
1584
|
+
],
|
|
1585
|
+
"mutates": false,
|
|
1586
|
+
"risk": "read",
|
|
1587
|
+
"project": false
|
|
1588
|
+
}
|
|
1589
|
+
]
|
|
1590
|
+
};
|