@savvy-web/mcp 0.1.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 (34) hide show
  1. package/547.js +417 -0
  2. package/bin/savvy-mcp.js +153 -0
  3. package/index.d.ts +127 -0
  4. package/index.js +3 -0
  5. package/package.json +80 -0
  6. package/resources/content/_templates/guides.md +12 -0
  7. package/resources/content/_templates/packages.md +21 -0
  8. package/resources/content/_templates/standards.md +17 -0
  9. package/resources/content/guides/api-docs-from-api-extractor.md +160 -0
  10. package/resources/content/guides/building-a-github-action.md +233 -0
  11. package/resources/content/guides/choosing-a-builder.md +140 -0
  12. package/resources/content/guides/llm-friendly-json-schemas.md +64 -0
  13. package/resources/content/manifest.json +490 -0
  14. package/resources/content/packages/cli/command-tree.md +70 -0
  15. package/resources/content/packages/cli/init-and-check.md +51 -0
  16. package/resources/content/packages/mcp/resource-taxonomy.md +63 -0
  17. package/resources/content/packages/rslib-builder/overview.md +68 -0
  18. package/resources/content/packages/silk/export-map.md +67 -0
  19. package/resources/content/packages/silk/install-and-setup.md +59 -0
  20. package/resources/content/packages/silk-effects/index.md +76 -0
  21. package/resources/content/packages/silk-effects/managed-section.md +84 -0
  22. package/resources/content/packages/silk-effects/platform-layers.md +94 -0
  23. package/resources/content/standards/api-model-pipeline.md +63 -0
  24. package/resources/content/standards/catalog-usage.md +48 -0
  25. package/resources/content/standards/changeset-discipline.md +52 -0
  26. package/resources/content/standards/changeset-format.md +131 -0
  27. package/resources/content/standards/commit-contract.md +58 -0
  28. package/resources/content/standards/dependency-conventions.md +82 -0
  29. package/resources/content/standards/linting-conventions.md +47 -0
  30. package/resources/content/standards/publishability.md +57 -0
  31. package/resources/content/standards/semver.md +51 -0
  32. package/resources/content/standards/test-classification.md +49 -0
  33. package/resources/content/tags.json +27 -0
  34. package/tsdoc-metadata.json +11 -0
@@ -0,0 +1,64 @@
1
+ ---
2
+ id: guides/llm-friendly-json-schemas
3
+ title: LLM-friendly JSON Schemas for tool outputs
4
+ summary: Load when designing the output schema of an MCP tool or a GitHub Action.
5
+ tier: guides
6
+ source: hand
7
+ tags: [mcp]
8
+ priority: 0.5
9
+ related: [packages/mcp/resource-taxonomy]
10
+ ---
11
+
12
+ A coding agent consumes a tool's structured output by reading it, not by running a
13
+ parser against it. The schema you choose is a prompt: it decides how reliably the
14
+ model can locate a value, follow a reference, and reason about what it got back.
15
+ Read this when designing a new MCP tool's output schema or a GitHub Action's
16
+ `outputs`, where the same constraints apply.
17
+
18
+ ## Prefer flat, named fields over deep nesting
19
+
20
+ A model retrieves a value by following a path it has to hold in working memory.
21
+ `result.targets[0].registry` is harder to reference reliably than a flat
22
+ `registries: string[]`. Keep the shape shallow. When you must nest, name every
23
+ level with a descriptive key rather than relying on positional structure, so the
24
+ path reads like prose.
25
+
26
+ ## Avoid recursive and open-ended shapes
27
+
28
+ A schema that can nest itself arbitrarily (a tree of the same node type) forces the
29
+ model to track depth it cannot see. Where the domain is genuinely recursive,
30
+ flatten it: emit a list of nodes plus a parent-id field rather than a literal tree.
31
+
32
+ ## Use enums and literals for closed sets
33
+
34
+ When a field can only take a handful of values, type it as a union of literals, not
35
+ an open string. An enum tells the model the complete option set up front, which
36
+ both narrows its generation and lets it reason exhaustively ("if not `public`, then
37
+ `restricted`"). This mirrors how the Silk schemas type `access` as
38
+ `"public" | "restricted"` and `tier` as `standards | packages | guides`.
39
+
40
+ ## Collapse relations to identifier arrays
41
+
42
+ Do not inline a related entity's full record where a reference will do. Emit an
43
+ array of stable identifiers (the `related: string[]` pattern in the resource
44
+ corpus) and let the consumer fetch the target if it needs more. This keeps each
45
+ payload small and the relationship explicit, and it survives the related record
46
+ changing shape.
47
+
48
+ ## Pair the structured payload with a short human-readable summary
49
+
50
+ A model orients faster on one sentence than on a field-by-field scan. Return both:
51
+ the structured object for precise extraction, and a brief natural-language summary
52
+ for orientation. The MCP tools in this ecosystem follow this dual-channel
53
+ convention — a structured result alongside a lean markdown transcript — so the
54
+ agent gets a fast "what is this" read and an exact "what are the values" read from
55
+ the same call.
56
+
57
+ ## Putting it together
58
+
59
+ When you sketch a new output schema, ask: can the model name every value in one
60
+ short path; is every closed set an enum; are relations references rather than
61
+ inlined records; and is there a one-line summary to orient on? If so, the schema
62
+ is doing its job as a prompt. The resource taxonomy
63
+ (`silk://packages/mcp/resource-taxonomy`) applies these same rules to the
64
+ documentation corpus's own front-matter.
@@ -0,0 +1,490 @@
1
+ {
2
+ "generatedAt": "2026-06-02T04:03:48.449Z",
3
+ "entries": [
4
+ {
5
+ "id": "guides/api-docs-from-api-extractor",
6
+ "title": "Generating API docs from API Extractor",
7
+ "summary": "Configure apiModel, build the model, and render LLM-lean markdown with api-extractor-llms.",
8
+ "tier": "guides",
9
+ "source": "hand",
10
+ "status": "stable",
11
+ "tags": [
12
+ "api",
13
+ "build"
14
+ ],
15
+ "audience": [
16
+ "assistant"
17
+ ],
18
+ "priority": 0.5,
19
+ "related": [
20
+ "standards/api-model-pipeline",
21
+ "packages/rslib-builder/overview"
22
+ ],
23
+ "uri": "silk://guides/api-docs-from-api-extractor",
24
+ "lastModified": "2026-06-02T03:58:56Z"
25
+ },
26
+ {
27
+ "id": "guides/building-a-github-action",
28
+ "title": "Building a GitHub Action",
29
+ "summary": "Scaffold a Node.js 24 GitHub Action with @savvy-web/github-action-builder and the github-action-effects services.",
30
+ "tier": "guides",
31
+ "source": "hand",
32
+ "status": "stable",
33
+ "tags": [
34
+ "github-actions",
35
+ "build"
36
+ ],
37
+ "audience": [
38
+ "assistant"
39
+ ],
40
+ "priority": 0.5,
41
+ "related": [
42
+ "guides/choosing-a-builder",
43
+ "standards/api-model-pipeline"
44
+ ],
45
+ "uri": "silk://guides/building-a-github-action",
46
+ "lastModified": "2026-06-02T03:58:56Z"
47
+ },
48
+ {
49
+ "id": "guides/choosing-a-builder",
50
+ "title": "Choosing a builder (rslib vs bun)",
51
+ "summary": "When to reach for @savvy-web/rslib-builder vs @savvy-web/bun-builder for a Silk package.",
52
+ "tier": "guides",
53
+ "source": "hand",
54
+ "status": "stable",
55
+ "tags": [
56
+ "build"
57
+ ],
58
+ "audience": [
59
+ "assistant"
60
+ ],
61
+ "priority": 0.5,
62
+ "related": [
63
+ "packages/rslib-builder/overview"
64
+ ],
65
+ "uri": "silk://guides/choosing-a-builder",
66
+ "lastModified": "2026-06-02T03:58:56Z"
67
+ },
68
+ {
69
+ "id": "guides/llm-friendly-json-schemas",
70
+ "title": "LLM-friendly JSON Schemas for tool outputs",
71
+ "summary": "Load when designing the output schema of an MCP tool or a GitHub Action.",
72
+ "tier": "guides",
73
+ "source": "hand",
74
+ "status": "stable",
75
+ "tags": [
76
+ "mcp"
77
+ ],
78
+ "audience": [
79
+ "assistant"
80
+ ],
81
+ "priority": 0.5,
82
+ "related": [
83
+ "packages/mcp/resource-taxonomy"
84
+ ],
85
+ "uri": "silk://guides/llm-friendly-json-schemas",
86
+ "lastModified": "2026-06-02T03:58:56Z"
87
+ },
88
+ {
89
+ "id": "packages/cli/command-tree",
90
+ "title": "The savvy command tree",
91
+ "summary": "Load to orient on what the savvy binary does and how its command groups are organized.",
92
+ "tier": "packages",
93
+ "source": "hand",
94
+ "status": "stable",
95
+ "tags": [
96
+ "cli"
97
+ ],
98
+ "audience": [
99
+ "assistant"
100
+ ],
101
+ "priority": 0.5,
102
+ "related": [
103
+ "packages/cli/init-and-check",
104
+ "packages/silk/install-and-setup"
105
+ ],
106
+ "uri": "silk://packages/cli/command-tree",
107
+ "lastModified": "2026-06-02T03:58:56Z"
108
+ },
109
+ {
110
+ "id": "packages/cli/init-and-check",
111
+ "title": "savvy init and check",
112
+ "summary": "Load when running or wiring the savvy init/check orchestrators.",
113
+ "tier": "packages",
114
+ "source": "hand",
115
+ "status": "stable",
116
+ "tags": [
117
+ "cli",
118
+ "init"
119
+ ],
120
+ "audience": [
121
+ "assistant"
122
+ ],
123
+ "priority": 0.5,
124
+ "related": [
125
+ "packages/cli/command-tree",
126
+ "packages/silk/install-and-setup"
127
+ ],
128
+ "uri": "silk://packages/cli/init-and-check",
129
+ "lastModified": "2026-06-02T03:58:56Z"
130
+ },
131
+ {
132
+ "id": "packages/mcp/resource-taxonomy",
133
+ "title": "The silk:// resource taxonomy",
134
+ "summary": "Load to understand how silk:// docs are addressed, tiered, and discovered.",
135
+ "tier": "packages",
136
+ "source": "hand",
137
+ "status": "stable",
138
+ "tags": [
139
+ "mcp"
140
+ ],
141
+ "audience": [
142
+ "assistant"
143
+ ],
144
+ "priority": 0.5,
145
+ "related": [
146
+ "packages/silk-effects/"
147
+ ],
148
+ "uri": "silk://packages/mcp/resource-taxonomy",
149
+ "lastModified": "2026-06-02T03:58:56Z"
150
+ },
151
+ {
152
+ "id": "packages/rslib-builder/overview",
153
+ "title": "rslib-builder overview",
154
+ "summary": "Load when setting up or understanding the rslib-builder build for a Silk package.",
155
+ "tier": "packages",
156
+ "source": "hand",
157
+ "status": "stable",
158
+ "tags": [
159
+ "build"
160
+ ],
161
+ "audience": [
162
+ "assistant"
163
+ ],
164
+ "priority": 0.5,
165
+ "related": [
166
+ "standards/catalog-usage",
167
+ "standards/publishability"
168
+ ],
169
+ "uri": "silk://packages/rslib-builder/overview",
170
+ "lastModified": "2026-06-02T03:58:56Z"
171
+ },
172
+ {
173
+ "id": "packages/silk/export-map",
174
+ "title": "silk subpath export map",
175
+ "summary": "Load when wiring a config file to a @savvy-web/silk subpath, or auditing the export map.",
176
+ "tier": "packages",
177
+ "source": "hand",
178
+ "status": "stable",
179
+ "tags": [
180
+ "silk"
181
+ ],
182
+ "audience": [
183
+ "assistant"
184
+ ],
185
+ "priority": 0.5,
186
+ "related": [
187
+ "packages/silk/install-and-setup"
188
+ ],
189
+ "uri": "silk://packages/silk/export-map",
190
+ "lastModified": "2026-06-02T03:58:56Z"
191
+ },
192
+ {
193
+ "id": "packages/silk/install-and-setup",
194
+ "title": "Installing @savvy-web/silk",
195
+ "summary": "Load when installing the Silk dev-tooling system into a consumer repo.",
196
+ "tier": "packages",
197
+ "source": "hand",
198
+ "status": "stable",
199
+ "tags": [
200
+ "silk",
201
+ "init"
202
+ ],
203
+ "audience": [
204
+ "assistant"
205
+ ],
206
+ "priority": 0.5,
207
+ "related": [
208
+ "packages/silk/export-map",
209
+ "packages/cli/init-and-check"
210
+ ],
211
+ "uri": "silk://packages/silk/install-and-setup",
212
+ "lastModified": "2026-06-02T03:58:56Z"
213
+ },
214
+ {
215
+ "id": "packages/silk-effects/",
216
+ "title": "silk-effects overview",
217
+ "summary": "Load to orient on the shared Effect library and its service map before diving into a service.",
218
+ "tier": "packages",
219
+ "source": "hand",
220
+ "status": "stable",
221
+ "tags": [
222
+ "silk-effects",
223
+ "effect"
224
+ ],
225
+ "audience": [
226
+ "assistant"
227
+ ],
228
+ "priority": 0.5,
229
+ "related": [
230
+ "packages/silk-effects/platform-layers",
231
+ "packages/silk-effects/managed-section",
232
+ "standards/publishability"
233
+ ],
234
+ "uri": "silk://packages/silk-effects/",
235
+ "lastModified": "2026-06-02T03:58:56Z"
236
+ },
237
+ {
238
+ "id": "packages/silk-effects/managed-section",
239
+ "title": "ManagedSection",
240
+ "summary": "Load when reading, writing, or syncing tool-owned BEGIN/END regions in user-editable files.",
241
+ "tier": "packages",
242
+ "source": "hand",
243
+ "status": "stable",
244
+ "tags": [
245
+ "managed-section",
246
+ "effect"
247
+ ],
248
+ "audience": [
249
+ "assistant"
250
+ ],
251
+ "priority": 0.5,
252
+ "related": [
253
+ "packages/silk-effects/",
254
+ "packages/silk-effects/platform-layers"
255
+ ],
256
+ "uri": "silk://packages/silk-effects/managed-section",
257
+ "lastModified": "2026-06-02T03:58:56Z"
258
+ },
259
+ {
260
+ "id": "packages/silk-effects/platform-layers",
261
+ "title": "Providing platform layers",
262
+ "summary": "Load when wiring silk-effects services into a program and deciding which layers to provide.",
263
+ "tier": "packages",
264
+ "source": "hand",
265
+ "status": "stable",
266
+ "tags": [
267
+ "silk-effects",
268
+ "effect"
269
+ ],
270
+ "audience": [
271
+ "assistant"
272
+ ],
273
+ "priority": 0.5,
274
+ "related": [
275
+ "packages/silk-effects/",
276
+ "packages/silk-effects/managed-section"
277
+ ],
278
+ "uri": "silk://packages/silk-effects/platform-layers",
279
+ "lastModified": "2026-06-02T03:58:56Z"
280
+ },
281
+ {
282
+ "id": "standards/api-model-pipeline",
283
+ "title": "API Extractor as docs source of truth",
284
+ "summary": "How package API surfaces become generated silk://packages/<pkg>/api docs via API Extractor models.",
285
+ "tier": "standards",
286
+ "source": "hand",
287
+ "status": "stable",
288
+ "tags": [
289
+ "api",
290
+ "build"
291
+ ],
292
+ "audience": [
293
+ "assistant"
294
+ ],
295
+ "priority": 0.5,
296
+ "related": [
297
+ "packages/mcp/resource-taxonomy"
298
+ ],
299
+ "uri": "silk://standards/api-model-pipeline",
300
+ "lastModified": "2026-06-02T03:58:56Z"
301
+ },
302
+ {
303
+ "id": "standards/catalog-usage",
304
+ "title": "Catalog usage",
305
+ "summary": "Load when adding or pinning a dependency in a Silk Suite package.",
306
+ "tier": "standards",
307
+ "source": "hand",
308
+ "status": "stable",
309
+ "tags": [
310
+ "catalog",
311
+ "dependencies"
312
+ ],
313
+ "audience": [
314
+ "assistant"
315
+ ],
316
+ "priority": 0.8,
317
+ "related": [
318
+ "standards/publishability"
319
+ ],
320
+ "uri": "silk://standards/catalog-usage",
321
+ "lastModified": "2026-06-02T03:58:56Z"
322
+ },
323
+ {
324
+ "id": "standards/changeset-discipline",
325
+ "title": "Changeset discipline",
326
+ "summary": "Load when deciding whether a branch needs a changeset and how to author one.",
327
+ "tier": "standards",
328
+ "source": "hand",
329
+ "status": "stable",
330
+ "tags": [
331
+ "changeset",
332
+ "release"
333
+ ],
334
+ "audience": [
335
+ "assistant"
336
+ ],
337
+ "priority": 0.8,
338
+ "related": [
339
+ "packages/silk-effects/",
340
+ "standards/publishability"
341
+ ],
342
+ "uri": "silk://standards/changeset-discipline",
343
+ "lastModified": "2026-06-02T03:58:56Z"
344
+ },
345
+ {
346
+ "id": "standards/changeset-format",
347
+ "title": "Changeset file format (CSH001–CSH005)",
348
+ "summary": "The YAML frontmatter, 13 valid section headings, and CSH001–CSH005 structural rules for changesets.",
349
+ "tier": "standards",
350
+ "source": "hand",
351
+ "status": "stable",
352
+ "tags": [
353
+ "changeset"
354
+ ],
355
+ "audience": [
356
+ "assistant"
357
+ ],
358
+ "priority": 0.5,
359
+ "related": [
360
+ "standards/changeset-discipline"
361
+ ],
362
+ "uri": "silk://standards/changeset-format",
363
+ "lastModified": "2026-06-02T03:58:56Z"
364
+ },
365
+ {
366
+ "id": "standards/commit-contract",
367
+ "title": "Silk commit contract",
368
+ "summary": "Load when composing any conventional commit, amending, squashing, or opening a PR.",
369
+ "tier": "standards",
370
+ "source": "hand",
371
+ "status": "stable",
372
+ "tags": [
373
+ "commit",
374
+ "dco",
375
+ "tdd"
376
+ ],
377
+ "audience": [
378
+ "assistant"
379
+ ],
380
+ "priority": 0.8,
381
+ "related": [
382
+ "standards/changeset-discipline"
383
+ ],
384
+ "uri": "silk://standards/commit-contract",
385
+ "lastModified": "2026-06-02T03:58:56Z"
386
+ },
387
+ {
388
+ "id": "standards/dependency-conventions",
389
+ "title": "Dependency conventions",
390
+ "summary": "When to use catalog:silk vs catalog:silkPeers, and how the pnpm-plugin-silk config dependency pins versions.",
391
+ "tier": "standards",
392
+ "source": "hand",
393
+ "status": "stable",
394
+ "tags": [
395
+ "dependencies",
396
+ "catalog"
397
+ ],
398
+ "audience": [
399
+ "assistant"
400
+ ],
401
+ "priority": 0.5,
402
+ "related": [
403
+ "standards/catalog-usage"
404
+ ],
405
+ "uri": "silk://standards/dependency-conventions",
406
+ "lastModified": "2026-06-02T03:58:56Z"
407
+ },
408
+ {
409
+ "id": "standards/linting-conventions",
410
+ "title": "Linting and formatting",
411
+ "summary": "Load when writing TypeScript or markdown that must pass Biome and markdownlint.",
412
+ "tier": "standards",
413
+ "source": "hand",
414
+ "status": "stable",
415
+ "tags": [
416
+ "lint"
417
+ ],
418
+ "audience": [
419
+ "assistant"
420
+ ],
421
+ "priority": 0.8,
422
+ "related": [
423
+ "standards/test-classification"
424
+ ],
425
+ "uri": "silk://standards/linting-conventions",
426
+ "lastModified": "2026-06-02T03:58:56Z"
427
+ },
428
+ {
429
+ "id": "standards/publishability",
430
+ "title": "Publishability rules",
431
+ "summary": "Load when deciding whether a package publishes and how private vs publishConfig interact.",
432
+ "tier": "standards",
433
+ "source": "hand",
434
+ "status": "stable",
435
+ "tags": [
436
+ "publishability"
437
+ ],
438
+ "audience": [
439
+ "assistant"
440
+ ],
441
+ "priority": 0.8,
442
+ "related": [
443
+ "packages/silk-effects/",
444
+ "standards/catalog-usage"
445
+ ],
446
+ "uri": "silk://standards/publishability",
447
+ "lastModified": "2026-06-02T03:58:56Z"
448
+ },
449
+ {
450
+ "id": "standards/semver",
451
+ "title": "Strict SemVer (no v-prefix)",
452
+ "summary": "Strict SemVer 2.0.0 everywhere; git tags carry no leading v.",
453
+ "tier": "standards",
454
+ "source": "hand",
455
+ "status": "stable",
456
+ "tags": [
457
+ "semver"
458
+ ],
459
+ "audience": [
460
+ "assistant"
461
+ ],
462
+ "priority": 0.5,
463
+ "related": [
464
+ "standards/changeset-discipline"
465
+ ],
466
+ "uri": "silk://standards/semver",
467
+ "lastModified": "2026-06-02T03:58:56Z"
468
+ },
469
+ {
470
+ "id": "standards/test-classification",
471
+ "title": "Test classification",
472
+ "summary": "Load when naming a test file or wondering why Vitest classifies it as unit, e2e, or int.",
473
+ "tier": "standards",
474
+ "source": "hand",
475
+ "status": "stable",
476
+ "tags": [
477
+ "test"
478
+ ],
479
+ "audience": [
480
+ "assistant"
481
+ ],
482
+ "priority": 0.8,
483
+ "related": [
484
+ "standards/linting-conventions"
485
+ ],
486
+ "uri": "silk://standards/test-classification",
487
+ "lastModified": "2026-06-02T03:58:56Z"
488
+ }
489
+ ]
490
+ }
@@ -0,0 +1,70 @@
1
+ ---
2
+ id: packages/cli/command-tree
3
+ title: The savvy command tree
4
+ summary: Load to orient on what the savvy binary does and how its command groups are organized.
5
+ tier: packages
6
+ source: hand
7
+ tags: [cli]
8
+ priority: 0.5
9
+ related: [packages/cli/init-and-check, packages/silk/install-and-setup]
10
+ ---
11
+
12
+ ## What
13
+
14
+ `@savvy-web/cli` owns the `savvy` binary — the single command host for the Silk
15
+ Suite's everyday dev tooling, built on `@effect/cli` + `@effect/platform-node`. It
16
+ carries no business logic of its own: every handler imports its work from
17
+ `@savvy-web/silk-effects`. The binary replaces three standalone bins
18
+ (`savvy-changesets`, `savvy-commit`, `savvy-lint`) with one. It is a `fixed`
19
+ changeset group with `@savvy-web/silk` — they always release together.
20
+
21
+ ## API
22
+
23
+ The tree is static — no runtime discovery, no contribution manifest, no per-command
24
+ "is the system configured" gate. Commands assume the system is set up (`savvy init`
25
+ sets it up).
26
+
27
+ ```text
28
+ savvy init orchestrator → changeset · commit · lint init in one pass
29
+ savvy check orchestrator → runs all three checks
30
+ savvy commit init · check · hook(session-start · pre-commit-message ·
31
+ post-commit-verify · user-prompt-submit)
32
+ savvy changeset init · check · lint · transform · validate-file · version ·
33
+ classify · analyze-branch · release-surface ·
34
+ config(show · validate) · deps(detect · regen)
35
+ savvy lint init · check · fmt(package-json · pnpm-workspace · yaml)
36
+ ```
37
+
38
+ Each group lives under `src/commands/{commit,changeset,lint}/` and exports its
39
+ group command plus named handlers (e.g. `runChangesetInit`). The top-level `init`
40
+ and `check` orchestrators sequence the three tool handlers and short-circuit on
41
+ first failure; the tool handlers are injected so the orchestration logic is
42
+ unit-testable without a runtime. The plugin hooks and skills shell out to these
43
+ subcommands.
44
+
45
+ ## Layer
46
+
47
+ The runtime layer stack is assembled once in `runCli()` (`src/cli/index.ts`) as the
48
+ union of the three source CLIs' stacks. It uses `provideMerge` (not `provide`) so
49
+ base silk-effects services are both fed to upper services and re-exposed for
50
+ handlers that yield those tags directly, and it hand-wires a minimal workspace
51
+ trio (`WorkspaceRoot`, `WorkspaceDiscovery`, `PackageManagerDetector`) rather than
52
+ the heavier `WorkspacesLive`.
53
+
54
+ Because the command groups are typed with an `any` R-channel (an Effect/cli
55
+ declaration-emit escape hatch), the type-checker cannot prove `AppLive` supplies
56
+ every required service. The real layer-completeness gate is the **runtime smoke
57
+ tests** that run each command, not `tsgo`. Treat them as the contract when adding a
58
+ command that needs a new service.
59
+
60
+ ## Usage
61
+
62
+ The `savvy` bin resolves to `src/bin/cli.ts` → `runCli()`. Tools it shells out to
63
+ (`@biomejs/biome`, `husky`, `@commitlint/*`, `@changesets/cli`, `lint-staged`,
64
+ `markdownlint-cli2`) are not direct deps; `@savvy-web/silk` co-installs them as
65
+ peers and pnpm's public-hoist-pattern makes them resolvable.
66
+
67
+ ## Related
68
+
69
+ Init and check: `silk://packages/cli/init-and-check`. Install surface:
70
+ `silk://packages/silk/install-and-setup`.
@@ -0,0 +1,51 @@
1
+ ---
2
+ id: packages/cli/init-and-check
3
+ title: savvy init and check
4
+ summary: Load when running or wiring the savvy init/check orchestrators.
5
+ tier: packages
6
+ source: hand
7
+ tags: [cli, init]
8
+ priority: 0.5
9
+ related: [packages/cli/command-tree, packages/silk/install-and-setup]
10
+ ---
11
+
12
+ ## What
13
+
14
+ `savvy init` and `savvy check` are the top-level orchestrators of the `savvy`
15
+ command tree. `init` is what sets the system up — it runs the changeset, commit,
16
+ and lint `init` handlers in one pass, seeding configs and wiring husky hooks.
17
+ `check` runs all three checks. The rest of the tree (`commit`, `changeset`, `lint`)
18
+ assumes `init` has already run.
19
+
20
+ ## API
21
+
22
+ Both orchestrators sequence the three per-tool handlers and short-circuit on the
23
+ first failure. They live at `src/commands/init.ts` and `src/commands/check.ts`. The
24
+ per-tool handlers are injected rather than imported inline, so the orchestration
25
+ logic — the sequencing and short-circuit — is unit-testable without standing up the
26
+ full runtime. Per-tool `init` and `check` stay reachable under their namespaces
27
+ (`savvy changeset init`, `savvy lint check`, and so on).
28
+
29
+ ## Layer
30
+
31
+ `init` and `check` run on the same merged runtime stack as the rest of the tree,
32
+ assembled once in `runCli()`. Because they orchestrate the same handlers the plugin
33
+ hooks call, they are covered by the runtime smoke tests that gate layer
34
+ completeness.
35
+
36
+ ## Usage
37
+
38
+ ```bash
39
+ savvy init # seed configs + wire husky hooks for changesets, commitlint, lint-staged
40
+ savvy check # run the changeset, commit, and lint checks; fail on the first violation
41
+ ```
42
+
43
+ `savvy init` is what a consumer runs after installing `@savvy-web/silk`: the
44
+ install pulls the `savvy` bin and the real tools as peers, then `init` seeds the
45
+ configs that reference `@savvy-web/silk/*` and points the husky hooks at `savvy`
46
+ subcommands.
47
+
48
+ ## Related
49
+
50
+ The full command tree: `silk://packages/cli/command-tree`. The install flow that
51
+ precedes `init`: `silk://packages/silk/install-and-setup`.