@shrkcrft/cli 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (120) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/api-diff.command.d.ts +11 -0
  3. package/dist/commands/api-diff.command.d.ts.map +1 -0
  4. package/dist/commands/api-diff.command.js +116 -0
  5. package/dist/commands/arch.command.d.ts +9 -0
  6. package/dist/commands/arch.command.d.ts.map +1 -0
  7. package/dist/commands/arch.command.js +186 -0
  8. package/dist/commands/boundaries.command.d.ts.map +1 -1
  9. package/dist/commands/boundaries.command.js +0 -12
  10. package/dist/commands/check.command.d.ts.map +1 -1
  11. package/dist/commands/check.command.js +20 -30
  12. package/dist/commands/code-intel.command.d.ts +18 -0
  13. package/dist/commands/code-intel.command.d.ts.map +1 -0
  14. package/dist/commands/code-intel.command.js +146 -0
  15. package/dist/commands/command-catalog.d.ts +7 -3
  16. package/dist/commands/command-catalog.d.ts.map +1 -1
  17. package/dist/commands/command-catalog.js +201 -47
  18. package/dist/commands/commands.command.d.ts.map +1 -1
  19. package/dist/commands/commands.command.js +4 -4
  20. package/dist/commands/completion.command.d.ts +10 -0
  21. package/dist/commands/completion.command.d.ts.map +1 -0
  22. package/dist/commands/completion.command.js +121 -0
  23. package/dist/commands/constructs.command.d.ts.map +1 -1
  24. package/dist/commands/constructs.command.js +5 -22
  25. package/dist/commands/context.command.d.ts.map +1 -1
  26. package/dist/commands/context.command.js +89 -0
  27. package/dist/commands/diff-check.command.d.ts +30 -0
  28. package/dist/commands/diff-check.command.d.ts.map +1 -0
  29. package/dist/commands/diff-check.command.js +210 -0
  30. package/dist/commands/doctor.command.d.ts.map +1 -1
  31. package/dist/commands/doctor.command.js +42 -9
  32. package/dist/commands/export.command.d.ts.map +1 -1
  33. package/dist/commands/export.command.js +76 -3
  34. package/dist/commands/framework.command.d.ts +12 -0
  35. package/dist/commands/framework.command.d.ts.map +1 -0
  36. package/dist/commands/framework.command.js +180 -0
  37. package/dist/commands/gate.command.d.ts +15 -0
  38. package/dist/commands/gate.command.d.ts.map +1 -0
  39. package/dist/commands/gate.command.js +296 -0
  40. package/dist/commands/graph-code-subverbs.d.ts +11 -0
  41. package/dist/commands/graph-code-subverbs.d.ts.map +1 -0
  42. package/dist/commands/graph-code-subverbs.js +818 -0
  43. package/dist/commands/graph.command.d.ts.map +1 -1
  44. package/dist/commands/graph.command.js +22 -0
  45. package/dist/commands/help.command.d.ts +4 -3
  46. package/dist/commands/help.command.d.ts.map +1 -1
  47. package/dist/commands/help.command.js +77 -21
  48. package/dist/commands/helper.command.js +1 -1
  49. package/dist/commands/impact.command.d.ts.map +1 -1
  50. package/dist/commands/impact.command.js +170 -1
  51. package/dist/commands/import.command.d.ts.map +1 -1
  52. package/dist/commands/import.command.js +121 -5
  53. package/dist/commands/init.command.d.ts.map +1 -1
  54. package/dist/commands/init.command.js +184 -16
  55. package/dist/commands/mcp.command.d.ts.map +1 -1
  56. package/dist/commands/mcp.command.js +2 -131
  57. package/dist/commands/migrate.command.d.ts +13 -0
  58. package/dist/commands/migrate.command.d.ts.map +1 -0
  59. package/dist/commands/migrate.command.js +152 -0
  60. package/dist/commands/onboard.command.d.ts.map +1 -1
  61. package/dist/commands/onboard.command.js +3 -15
  62. package/dist/commands/packs-new.d.ts +1 -1
  63. package/dist/commands/packs-new.d.ts.map +1 -1
  64. package/dist/commands/packs-new.js +5 -36
  65. package/dist/commands/packs.command.d.ts.map +1 -1
  66. package/dist/commands/packs.command.js +3 -17
  67. package/dist/commands/plan-context.command.d.ts +11 -0
  68. package/dist/commands/plan-context.command.d.ts.map +1 -0
  69. package/dist/commands/plan-context.command.js +77 -0
  70. package/dist/commands/profiles.command.js +4 -4
  71. package/dist/commands/release.command.js +13 -13
  72. package/dist/commands/review.command.d.ts.map +1 -1
  73. package/dist/commands/review.command.js +2 -28
  74. package/dist/commands/rule-graph-subverbs.d.ts +3 -0
  75. package/dist/commands/rule-graph-subverbs.d.ts.map +1 -0
  76. package/dist/commands/rule-graph-subverbs.js +132 -0
  77. package/dist/commands/search-structural.command.d.ts +18 -0
  78. package/dist/commands/search-structural.command.d.ts.map +1 -0
  79. package/dist/commands/search-structural.command.js +376 -0
  80. package/dist/commands/search.command.js +1 -1
  81. package/dist/commands/task-context.command.js +0 -16
  82. package/dist/commands/task.command.d.ts.map +1 -1
  83. package/dist/commands/task.command.js +8 -2
  84. package/dist/dashboard/code-intelligence-data.d.ts +33 -0
  85. package/dist/dashboard/code-intelligence-data.d.ts.map +1 -0
  86. package/dist/dashboard/code-intelligence-data.js +307 -0
  87. package/dist/dashboard/dashboard-api-server.d.ts.map +1 -1
  88. package/dist/dashboard/dashboard-api-server.js +162 -1
  89. package/dist/export/claude-commands-export.d.ts +60 -0
  90. package/dist/export/claude-commands-export.d.ts.map +1 -0
  91. package/dist/export/claude-commands-export.js +276 -0
  92. package/dist/export/export-formats.d.ts +1 -1
  93. package/dist/export/export-formats.d.ts.map +1 -1
  94. package/dist/export/export-formats.js +139 -12
  95. package/dist/init/init-templates.d.ts.map +1 -1
  96. package/dist/init/init-templates.js +133 -113
  97. package/dist/init/paths-advisory.d.ts +20 -0
  98. package/dist/init/paths-advisory.d.ts.map +1 -0
  99. package/dist/init/paths-advisory.js +88 -0
  100. package/dist/main.d.ts +1 -1
  101. package/dist/main.d.ts.map +1 -1
  102. package/dist/main.js +137 -46
  103. package/dist/output/failure-hints.d.ts +1 -9
  104. package/dist/output/failure-hints.d.ts.map +1 -1
  105. package/dist/output/failure-hints.js +2 -8
  106. package/dist/output/watch-loop.d.ts +9 -1
  107. package/dist/output/watch-loop.d.ts.map +1 -1
  108. package/dist/output/watch-loop.js +13 -3
  109. package/dist/schemas/json-schemas.d.ts +36 -36
  110. package/dist/schemas/json-schemas.js +36 -36
  111. package/dist/surface/about.d.ts.map +1 -1
  112. package/dist/surface/about.js +37 -15
  113. package/dist/surface/no-args-landing.d.ts.map +1 -1
  114. package/dist/surface/no-args-landing.js +9 -13
  115. package/dist/surface/surface-config-writer.d.ts.map +1 -1
  116. package/dist/surface/surface-config-writer.js +23 -11
  117. package/package.json +37 -25
  118. package/dist/commands/plugin.command.d.ts +0 -11
  119. package/dist/commands/plugin.command.d.ts.map +0 -1
  120. package/dist/commands/plugin.command.js +0 -394
@@ -1 +1 @@
1
- {"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,QAAQ,cAAc;IACtB,iBAAiB,mBAAmB;IACpC,gBAAgB,kBAAkB;IAClC,YAAY,kBAAkB;IAC9B,SAAS,eAAe;IACxB,cAAc,oBAAoB;CACnC;AAED;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,8BAA8B;AAC9B,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,UAAU,eAAe;CAC1B;AAED;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;;GAMG;AACH,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,YAAY,iBAAi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AC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,wBAAwB,IAAI,SAAS,uBAAuB,EAAE,CAsB7E;AAED,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,SAAS,uBAAuB,EAAE,GACvC,MAAM,CAaR"}
1
+ {"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,QAAQ,cAAc;IACtB,iBAAiB,mBAAmB;IACpC,gBAAgB,kBAAkB;IAClC,YAAY,kBAAkB;IAC9B,SAAS,eAAe;IACxB,cAAc,oBAAoB;CACnC;AAED;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,8BAA8B;AAC9B,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,UAAU,eAAe;CAC1B;AAED;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;;GAMG;AACH,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,QAAQ,aAA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;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,wBAAwB,IAAI,SAAS,uBAAuB,EAAE,CAsB7E;AAED,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,SAAS,uBAAuB,EAAE,GACvC,MAAM,CAaR"}
@@ -263,6 +263,87 @@ export const COMMAND_CATALOG = Object.freeze([
263
263
  surface: CommandSurface.Common,
264
264
  taskRole: CommandTaskRole.Inspect,
265
265
  }),
266
+ entry({
267
+ command: 'rule-graph',
268
+ description: 'Bridge the code graph to asset registries (boundary rules, path conventions, templates). Sub-verbs: index, status, for <file>.',
269
+ category: 'core',
270
+ safetyLevel: SafetyLevel.WritesSessionOnly,
271
+ mcpAvailable: true,
272
+ surface: CommandSurface.Common,
273
+ taskRole: CommandTaskRole.Inspect,
274
+ }),
275
+ entry({
276
+ command: 'search-structural',
277
+ description: 'Declarative AST pattern search over the project. Read-only; no rewrites in this round.',
278
+ category: 'core',
279
+ safetyLevel: SafetyLevel.ReadOnly,
280
+ mcpAvailable: true,
281
+ surface: CommandSurface.Common,
282
+ taskRole: CommandTaskRole.Inspect,
283
+ }),
284
+ entry({
285
+ command: 'plan-context',
286
+ description: 'Produce a deterministic, token-budgeted context pack (`sharkcraft.context-pack/v1`) for an AI coding agent.',
287
+ category: 'core',
288
+ safetyLevel: SafetyLevel.ReadOnly,
289
+ mcpAvailable: true,
290
+ surface: CommandSurface.Common,
291
+ taskRole: CommandTaskRole.Context,
292
+ }),
293
+ entry({
294
+ command: 'arch',
295
+ description: 'Architecture-guard checks (public-API misuse, barrel risks, cycle severity, project contracts).',
296
+ category: 'core',
297
+ safetyLevel: SafetyLevel.ReadOnly,
298
+ mcpAvailable: true,
299
+ surface: CommandSurface.Common,
300
+ taskRole: CommandTaskRole.Validate,
301
+ }),
302
+ entry({
303
+ command: 'framework',
304
+ description: 'Framework-aware extractors: NestJS controllers/modules/providers/routes, React components/hook usages. Sub-verbs: index, status, list, routes.',
305
+ category: 'core',
306
+ safetyLevel: SafetyLevel.WritesSessionOnly,
307
+ mcpAvailable: true,
308
+ surface: CommandSurface.Common,
309
+ taskRole: CommandTaskRole.Inspect,
310
+ }),
311
+ entry({
312
+ command: 'api-diff',
313
+ description: 'Compare the current public API surface to a baseline. Reports added / removed / kind-changed / moved symbols with breaking-change severity.',
314
+ category: 'core',
315
+ safetyLevel: SafetyLevel.ReadOnly,
316
+ mcpAvailable: true,
317
+ surface: CommandSurface.Common,
318
+ taskRole: CommandTaskRole.Validate,
319
+ }),
320
+ entry({
321
+ command: 'gate',
322
+ description: 'Aggregator quality-gate: graph freshness + architecture + impact-since-ref → one pass/fail. The pre-merge gate for AI-agent-authored changes.',
323
+ category: 'core',
324
+ safetyLevel: SafetyLevel.ReadOnly,
325
+ mcpAvailable: true,
326
+ surface: CommandSurface.Common,
327
+ taskRole: CommandTaskRole.Validate,
328
+ }),
329
+ entry({
330
+ command: 'migrate',
331
+ description: 'Run a multi-step migration: structural rewrites + shell + checks orchestrated as one replayable plan.',
332
+ category: 'core',
333
+ safetyLevel: SafetyLevel.WritesSource,
334
+ mcpAvailable: false,
335
+ surface: CommandSurface.Common,
336
+ taskRole: CommandTaskRole.Generate,
337
+ }),
338
+ entry({
339
+ command: 'code-intel',
340
+ description: 'One-shot view of code-intelligence doctor checks (graph, rule-graph, api-surface, quality-gate, migrations, architecture, impact, framework, structural-search, context-planner). Read-only.',
341
+ category: 'core',
342
+ safetyLevel: SafetyLevel.ReadOnly,
343
+ mcpAvailable: true,
344
+ surface: CommandSurface.Common,
345
+ taskRole: CommandTaskRole.Diagnose,
346
+ }),
266
347
  entry({
267
348
  command: 'check',
268
349
  description: 'Run validation checks across registries / packs / boundaries.',
@@ -291,6 +372,15 @@ export const COMMAND_CATALOG = Object.freeze([
291
372
  surface: CommandSurface.Common,
292
373
  taskRole: CommandTaskRole.Validate,
293
374
  }),
375
+ entry({
376
+ command: 'diff-check',
377
+ description: 'Self-check current git diff against boundary + import-hygiene rules. Single-call composite for agents to validate edits before declaring done. Read-only.',
378
+ category: 'core',
379
+ safetyLevel: SafetyLevel.ReadOnly,
380
+ mcpAvailable: true,
381
+ surface: CommandSurface.Common,
382
+ taskRole: CommandTaskRole.Validate,
383
+ }),
294
384
  entry({
295
385
  command: 'review',
296
386
  description: 'PR-review packet — changed files, affected rules, missing tests heuristic.',
@@ -634,6 +724,11 @@ export const COMMAND_CATALOG = Object.freeze([
634
724
  category: 'task-context',
635
725
  safetyLevel: SafetyLevel.ReadOnly,
636
726
  mcpAvailable: true,
727
+ // Overlaps with `shrk task` (machine packet) and `shrk recommend`
728
+ // (human routing). Pointing at `task` as canonical so users who
729
+ // hit this via tab-complete see the canonical machine-pipe form.
730
+ overlapsWith: ['task', 'recommend'],
731
+ preferredCommand: 'shrk task "<task>"',
637
732
  }),
638
733
  entry({
639
734
  command: 'validate-change',
@@ -943,6 +1038,13 @@ export const COMMAND_CATALOG = Object.freeze([
943
1038
  safetyLevel: SafetyLevel.ReadOnly,
944
1039
  surface: CommandSurface.Common,
945
1040
  }),
1041
+ entry({
1042
+ command: 'completion',
1043
+ description: 'Print a sourcable shell-completion script for the `shrk` CLI (bash | zsh | fish). Pipe into your shell rc.',
1044
+ category: 'meta',
1045
+ safetyLevel: SafetyLevel.ReadOnly,
1046
+ surface: CommandSurface.Common,
1047
+ }),
946
1048
  entry({
947
1049
  command: 'explain',
948
1050
  description: 'Universal explainer: knowledge entry, rule, template, command id, or stderr blob.',
@@ -1007,7 +1109,7 @@ export const COMMAND_CATALOG = Object.freeze([
1007
1109
  // `commands doctor` is honest.
1008
1110
  entry({
1009
1111
  command: 'profiles',
1010
- description: 'List / inspect pack-contributed profiles (plugin-lifecycle, migration, conventions, …). Subcommands: list, get, doctor, search.',
1112
+ description: 'List / inspect pack-contributed profiles (migration, conventions, …). Subcommands: list, get, doctor, search.',
1011
1113
  category: 'core',
1012
1114
  safetyLevel: SafetyLevel.ReadOnly,
1013
1115
  mcpAvailable: true,
@@ -1108,13 +1210,7 @@ export const COMMAND_CATALOG = Object.freeze([
1108
1210
  }),
1109
1211
  entry({
1110
1212
  command: 'mcp serve',
1111
- description: 'Start the read-only MCP server (stdio or --http).',
1112
- category: 'meta',
1113
- safetyLevel: SafetyLevel.ReadOnly,
1114
- }),
1115
- entry({
1116
- command: 'mcp install',
1117
- description: 'Print the MCP config snippet + path for Claude Code / Claude Desktop / Cursor / Cline (copy-paste, no file writes).',
1213
+ description: 'Start the read-only MCP server (stdio).',
1118
1214
  category: 'meta',
1119
1215
  safetyLevel: SafetyLevel.ReadOnly,
1120
1216
  }),
@@ -2266,13 +2362,6 @@ export const COMMAND_CATALOG = Object.freeze([
2266
2362
  safetyLevel: SafetyLevel.ReadOnly,
2267
2363
  mcpAvailable: true,
2268
2364
  }),
2269
- entry({
2270
- command: 'packs compat --fast',
2271
- description: 'Pack compat scan with regex-only export walker (legacy). Default is TS-AST based.',
2272
- category: 'packs',
2273
- safetyLevel: SafetyLevel.ReadOnly,
2274
- mcpAvailable: false,
2275
- }),
2276
2365
  entry({
2277
2366
  command: 'onboard adopt status --max-age-days',
2278
2367
  description: 'Adoption checkpoint status with custom max-age (default 30 days).',
@@ -2329,7 +2418,7 @@ export const COMMAND_CATALOG = Object.freeze([
2329
2418
  }),
2330
2419
  entry({
2331
2420
  command: 'release smoke --matrix',
2332
- description: 'Run smoke scenarios across multiple repo targets (sharkcraft/dogfood/synthetic/adopter).',
2421
+ description: 'Run smoke scenarios across multiple repo targets (sharkcraft/dogfood/synthetic/consumer).',
2333
2422
  category: 'release',
2334
2423
  safetyLevel: SafetyLevel.WritesDraftsOnly,
2335
2424
  writesFiles: true,
@@ -2721,34 +2810,6 @@ export const COMMAND_CATALOG = Object.freeze([
2721
2810
  safetyLevel: SafetyLevel.ReadOnly,
2722
2811
  mcpAvailable: true,
2723
2812
  }),
2724
- entry({
2725
- command: 'plugin rename',
2726
- description: 'Plan-only plugin rename (profile-driven) — emits replace ops + manual folder rename checklist.',
2727
- category: 'lifecycle',
2728
- safetyLevel: SafetyLevel.WritesDraftsOnly,
2729
- mcpAvailable: true,
2730
- }),
2731
- entry({
2732
- command: 'plugin remove',
2733
- description: 'Plan-only destructive plugin remove (profile-driven) — destructive; requires human approval.',
2734
- category: 'lifecycle',
2735
- safetyLevel: SafetyLevel.WritesDraftsOnly,
2736
- mcpAvailable: true,
2737
- }),
2738
- entry({
2739
- command: 'plugin lifecycle list',
2740
- description: 'List plugins detected under the active profile roots and key-table. Read-only.',
2741
- category: 'lifecycle',
2742
- safetyLevel: SafetyLevel.ReadOnly,
2743
- mcpAvailable: false,
2744
- }),
2745
- entry({
2746
- command: 'plugin lifecycle inspect',
2747
- description: 'Inspect references to a plugin across the profile layers + key-table. Read-only.',
2748
- category: 'lifecycle',
2749
- safetyLevel: SafetyLevel.ReadOnly,
2750
- mcpAvailable: false,
2751
- }),
2752
2813
  entry({
2753
2814
  command: 'helper list',
2754
2815
  description: 'List available helper plan generators. Read-only.',
@@ -3150,12 +3211,99 @@ export function commandLifecycle(e) {
3150
3211
  return CommandLifecycle.Deprecated;
3151
3212
  return CommandLifecycle.Active;
3152
3213
  }
3214
+ /**
3215
+ * The "Primary verbs" allowlist — top-level commands that pay rent in
3216
+ * the default help surface. Everything else stays callable but is
3217
+ * hidden from `--full-help` and from MCP tool advertising; users find
3218
+ * them via `shrk surface list`, `shrk help <cmd>`, or `--full-help`.
3219
+ *
3220
+ * Picked to cover the canonical agent-flow journeys:
3221
+ * - bootstrap a repo, verify it
3222
+ * - get a brief / context / task packet for an agent
3223
+ * - generate safely (plan → apply → check)
3224
+ * - browse what shrk knows (rules / paths / templates / presets)
3225
+ * - inline the rules into the agent's prompt (export, mcp, dashboard)
3226
+ * - daily operations (review, impact, search, explain, why, surface)
3227
+ *
3228
+ * Anything not in this set falls back to the legacy
3229
+ * surface-tier-based visibility, with deprecated / retired / aliased
3230
+ * commands hidden regardless. Adding a verb here is the explicit
3231
+ * "this is rent-paying" decision.
3232
+ */
3233
+ const PRIMARY_VERBS_ALLOWLIST = new Set([
3234
+ // Bootstrap
3235
+ 'init',
3236
+ 'doctor',
3237
+ 'inspect',
3238
+ 'onboard',
3239
+ 'version',
3240
+ 'help',
3241
+ 'preflight',
3242
+ 'self-config',
3243
+ // Per-task
3244
+ 'brief',
3245
+ 'recommend',
3246
+ 'context',
3247
+ 'task',
3248
+ 'coverage',
3249
+ 'explain',
3250
+ 'why',
3251
+ 'search',
3252
+ 'impact',
3253
+ 'graph',
3254
+ // Generate code safely
3255
+ 'gen',
3256
+ 'apply',
3257
+ 'check',
3258
+ 'quality',
3259
+ 'plan',
3260
+ 'fix',
3261
+ // Browse / inline
3262
+ 'knowledge',
3263
+ 'rules',
3264
+ 'templates',
3265
+ 'paths',
3266
+ 'import',
3267
+ 'export',
3268
+ // Architecture & quality gates
3269
+ 'drift',
3270
+ 'safety',
3271
+ // Run for an agent
3272
+ 'mcp',
3273
+ 'dashboard',
3274
+ // Ops
3275
+ 'surface',
3276
+ 'presets',
3277
+ 'review',
3278
+ 'packs',
3279
+ 'ci',
3280
+ 'commands',
3281
+ ]);
3282
+ function topLevelVerb(command) {
3283
+ // Strip leading `--cwd <dir>` / `--<flag>` tokens and angle-bracket
3284
+ // placeholders; the canonical first verb is whatever leads.
3285
+ const tokens = command.split(/\s+/);
3286
+ for (const t of tokens) {
3287
+ if (!t)
3288
+ continue;
3289
+ if (t.startsWith('--') || t.startsWith('-'))
3290
+ continue;
3291
+ if (t.startsWith('<') || t.startsWith('"'))
3292
+ continue;
3293
+ return t;
3294
+ }
3295
+ return command;
3296
+ }
3153
3297
  /**
3154
3298
  * Default-help visibility rule. Honors an explicit
3155
3299
  * {@link ICommandCatalogEntry.showInDefaultHelp} when set; otherwise
3156
- * primary + common are visible and advanced / machine / internal / legacy
3157
- * are hidden. Deprecated and retired commands are always hidden by
3158
- * default regardless of surface.
3300
+ * the {@link PRIMARY_VERBS_ALLOWLIST} gates membership in the visible
3301
+ * surface (primary + common entries whose top-level verb pays rent
3302
+ * make the cut; everything else is hidden from `--full-help`).
3303
+ *
3304
+ * Deprecated, retired, aliased commands and anything in the
3305
+ * {@link R46_OVERLAY} are always hidden regardless of allowlist
3306
+ * membership.
3159
3307
  */
3160
3308
  export function defaultShowInHelp(e) {
3161
3309
  if (e.showInDefaultHelp !== undefined)
@@ -3168,6 +3316,12 @@ export function defaultShowInHelp(e) {
3168
3316
  return false;
3169
3317
  if (lc === CommandLifecycle.Alias)
3170
3318
  return false;
3319
+ // Allowlist gate — the top-level verb must be one of the ~30
3320
+ // rent-paying verbs. Subcommands of an allowlisted verb inherit
3321
+ // visibility (so `check boundaries` shows under `check`).
3322
+ const verb = topLevelVerb(e.command);
3323
+ if (!PRIMARY_VERBS_ALLOWLIST.has(verb))
3324
+ return false;
3171
3325
  const surface = commandSurface(e);
3172
3326
  return surface === CommandSurface.Primary || surface === CommandSurface.Common;
3173
3327
  }
@@ -1 +1 @@
1
- {"version":3,"file":"commands.command.d.ts","sourceRoot":"","sources":["../../src/commands/commands.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AA6BhC,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CA+I9E;AAgLD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EACF,YAAY,GACZ,SAAS,GACT,iBAAiB,GACjB,aAAa,GACb,oBAAoB,GACpB,uBAAuB,CAAC;IAC5B,OAAO,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE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QD,wBAAsB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA+ElF"}
@@ -1,7 +1,7 @@
1
- import { flagBool, flagString, } from "../command-registry.js";
1
+ import { flagBool, flagString } from "../command-registry.js";
2
2
  import { asJson, header } from "../output/format-output.js";
3
- import { COMMAND_CATALOG, CommandLifecycle, CommandSurface, R46_OVERLAY, SafetyLevel, buildCommandSafetyMatrix, commandLifecycle, commandSurface, commandTaskRole, defaultShowInHelp, renderCommandSafetyMatrixMarkdown, } from "./command-catalog.js";
4
- import { buildCommandTaxonomy, buildPrimaryCommandsReport, renderCommandTaxonomyMarkdown, renderCommandTaxonomyText, renderPrimaryCommandsText, } from '@shrkcrft/inspector';
3
+ import { buildCommandSafetyMatrix, COMMAND_CATALOG, CommandLifecycle, commandLifecycle, CommandSurface, commandSurface, commandTaskRole, defaultShowInHelp, R46_OVERLAY, renderCommandSafetyMatrixMarkdown, SafetyLevel } from "./command-catalog.js";
4
+ import { buildCommandTaxonomy, buildPrimaryCommandsReport, renderCommandTaxonomyMarkdown, renderCommandTaxonomyText, renderPrimaryCommandsText } from '@shrkcrft/inspector';
5
5
  export function makeCommandsCommand(registry) {
6
6
  return {
7
7
  name: 'commands',
@@ -589,7 +589,7 @@ export function buildCommandsUxReport() {
589
589
  // issue is clearly structural (none of these currently rise to error).
590
590
  for (const e of COMMAND_CATALOG) {
591
591
  const surface = commandSurface(e);
592
- // (a) primary commands should declare an audience (so adopters can see
592
+ // (a) primary commands should declare an audience (so consumers can see
593
593
  // who the command is for at a glance).
594
594
  if (surface === CommandSurface.Primary && (!e.intendedAudience || e.intendedAudience.length === 0)) {
595
595
  issues.push({
@@ -0,0 +1,10 @@
1
+ import { type ICommandHandler } from '../command-registry.js';
2
+ /**
3
+ * `shrk completion <bash|zsh|fish>` — print a sourcable completion
4
+ * script. The list of verbs is generated from the registered
5
+ * `COMMAND_CATALOG` so completion can't drift from the runtime
6
+ * surface. Subverbs for the high-traffic groups (graph, arch,
7
+ * impact, gate, context, search-structural) are hand-curated.
8
+ */
9
+ export declare const completionCommand: ICommandHandler;
10
+ //# sourceMappingURL=completion.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion.command.d.ts","sourceRoot":"","sources":["../../src/commands/completion.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAIhC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAqC/B,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { flagBool, flagString, } from "../command-registry.js";
2
+ import { asJson } from "../output/format-output.js";
3
+ import { COMMAND_CATALOG } from "./command-catalog.js";
4
+ /**
5
+ * `shrk completion <bash|zsh|fish>` — print a sourcable completion
6
+ * script. The list of verbs is generated from the registered
7
+ * `COMMAND_CATALOG` so completion can't drift from the runtime
8
+ * surface. Subverbs for the high-traffic groups (graph, arch,
9
+ * impact, gate, context, search-structural) are hand-curated.
10
+ */
11
+ export const completionCommand = {
12
+ name: 'completion',
13
+ description: 'Print a sourcable shell-completion script for the `shrk` CLI. Pipe into your shell rc: `shrk completion bash >> ~/.bashrc`.',
14
+ usage: 'shrk completion <bash|zsh|fish> [--json]',
15
+ async run(args) {
16
+ const shell = (args.positional[0] ?? flagString(args, 'shell') ?? 'bash').toLowerCase();
17
+ const wantJson = flagBool(args, 'json');
18
+ const verbs = collectTopLevelVerbs();
19
+ if (wantJson) {
20
+ process.stdout.write(asJson({
21
+ schema: 'sharkcraft.cli-completion/v1',
22
+ shell,
23
+ verbs,
24
+ subverbs: SUBVERBS,
25
+ }) + '\n');
26
+ return 0;
27
+ }
28
+ switch (shell) {
29
+ case 'bash':
30
+ process.stdout.write(renderBash(verbs));
31
+ return 0;
32
+ case 'zsh':
33
+ process.stdout.write(renderZsh(verbs));
34
+ return 0;
35
+ case 'fish':
36
+ process.stdout.write(renderFish(verbs));
37
+ return 0;
38
+ default:
39
+ process.stderr.write(`Unknown shell "${shell}". Use bash | zsh | fish.\n`);
40
+ return 2;
41
+ }
42
+ },
43
+ };
44
+ /**
45
+ * Subverbs the high-traffic verbs accept. Hand-curated because the
46
+ * runtime catalog represents them as a single CLI surface; we don't
47
+ * want to parse the dispatch chain at completion time.
48
+ */
49
+ const SUBVERBS = Object.freeze({
50
+ graph: ['index', 'status', 'search', 'context', 'impact', 'callers', 'cycles', 'unresolved', 'deps', 'why', 'export'],
51
+ arch: ['check', 'baseline'],
52
+ impact: ['tests', 'graph', 'baseline'],
53
+ gate: ['scaffold-ci', 'scaffold-hook'],
54
+ context: ['build', 'refresh', 'status', 'benchmark'],
55
+ 'search-structural': ['registry'],
56
+ doctor: ['suppress', 'suppressions', 'acknowledge', 'acknowledgements', 'watch'],
57
+ });
58
+ function collectTopLevelVerbs() {
59
+ const set = new Set();
60
+ for (const e of COMMAND_CATALOG) {
61
+ // `command` may carry an argument hint like 'fix preview' — keep
62
+ // only the first token so completion works at the top level.
63
+ const head = e.command.split(/\s+/)[0];
64
+ if (head.length > 0)
65
+ set.add(head);
66
+ }
67
+ return [...set].sort();
68
+ }
69
+ function renderBash(verbs) {
70
+ const verbList = verbs.join(' ');
71
+ const subverbCases = Object.entries(SUBVERBS)
72
+ .map(([verb, subs]) => ` ${verb}) COMPREPLY=($(compgen -W "${subs.join(' ')}" -- "$cur")); return 0;;`)
73
+ .join('\n');
74
+ return `# shrk bash completion. Source from ~/.bashrc:
75
+ # eval "$(shrk completion bash)"
76
+ _shrk_complete() {
77
+ local cur prev words cword
78
+ _init_completion || return
79
+ if [ "$cword" -eq 1 ]; then
80
+ COMPREPLY=($(compgen -W "${verbList}" -- "$cur"))
81
+ return 0
82
+ fi
83
+ case "\${words[1]}" in
84
+ ${subverbCases}
85
+ esac
86
+ COMPREPLY=()
87
+ }
88
+ complete -F _shrk_complete shrk
89
+ `;
90
+ }
91
+ function renderZsh(verbs) {
92
+ const verbList = verbs.join(' ');
93
+ const subverbCases = Object.entries(SUBVERBS)
94
+ .map(([verb, subs]) => ` ${verb}) compadd -- ${subs.join(' ')};;`)
95
+ .join('\n');
96
+ return `# shrk zsh completion. Source from ~/.zshrc:
97
+ # eval "$(shrk completion zsh)"
98
+ _shrk() {
99
+ if [[ \${#words} -eq 2 ]]; then
100
+ compadd -- ${verbList}
101
+ return
102
+ fi
103
+ case "\${words[2]}" in
104
+ ${subverbCases}
105
+ esac
106
+ }
107
+ compdef _shrk shrk
108
+ `;
109
+ }
110
+ function renderFish(verbs) {
111
+ const lines = [
112
+ '# shrk fish completion. Source from ~/.config/fish/completions/shrk.fish:',
113
+ '# shrk completion fish > ~/.config/fish/completions/shrk.fish',
114
+ 'complete -e -c shrk',
115
+ `complete -c shrk -n '__fish_use_subcommand' -a '${verbs.join(' ')}'`,
116
+ ];
117
+ for (const [verb, subs] of Object.entries(SUBVERBS)) {
118
+ lines.push(`complete -c shrk -n '__fish_seen_subcommand_from ${verb}' -a '${subs.join(' ')}'`);
119
+ }
120
+ return lines.join('\n') + '\n';
121
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"constructs.command.d.ts","sourceRoot":"","sources":["../../src/commands/constructs.command.ts"],"names":[],"mappings":"AA6BA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAahC,eAAO,MAAM,qBAAqB,EAAE,eAqBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAoDlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA8DpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAmFrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmCtC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAwBpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAiClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAiBrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAiBrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eA4BrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eA8BrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA0DpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA0LpC,CAAC"}
1
+ {"version":3,"file":"constructs.command.d.ts","sourceRoot":"","sources":["../../src/commands/constructs.command.ts"],"names":[],"mappings":"AA6BA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAahC,eAAO,MAAM,qBAAqB,EAAE,eAqBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAoDlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA8DpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAoErC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmCtC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAwBpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAiClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAiBrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAiBrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eA4BrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eA8BrC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA0DpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eA0LpC,CAAC"}
@@ -91,7 +91,7 @@ export const constructsGetCommand = {
91
91
  };
92
92
  export const constructsTraceCommand = {
93
93
  name: 'trace',
94
- description: 'Trace all files / publicApi / events / tokens belonging to a construct. --deep adds related/sandbox/test pointers when present.',
94
+ description: 'Trace all files / publicApi / events / tokens belonging to a construct. --deep adds related / test pointers when present.',
95
95
  usage: 'shrk constructs trace <id> [--deep] [--json]',
96
96
  async run(args) {
97
97
  const id = args.positional[0];
@@ -118,7 +118,7 @@ export const constructsTraceCommand = {
118
118
  ? {
119
119
  related: relatedAll,
120
120
  tags: c.tags ?? [],
121
- registryHints: c.tags?.filter((t) => /(registry|composer|defaults|sandbox|demo|barrel)/i.test(t)) ?? [],
121
+ registryHints: c.tags?.filter((t) => /(registry|barrel)/i.test(t)) ?? [],
122
122
  }
123
123
  : undefined;
124
124
  if (flagBool(args, 'json')) {
@@ -175,28 +175,11 @@ export const constructsImpactCommand = {
175
175
  }
176
176
  const trace = traceConstruct(c);
177
177
  /**
178
- * Registry touch-points are inferred from the active plugin
179
- * lifecycle profile (key-table + barrels). The engine no longer
180
- * hardcodes project-specific paths.
178
+ * Registry touch-points are not inferred pack-contributed
179
+ * touch-point hints can be added in the future via the convention
180
+ * registry.
181
181
  */
182
182
  const registryTouchPoints = [];
183
- try {
184
- const { listPluginLifecycleProfiles } = await import('@shrkcrft/inspector');
185
- const profiles = await listPluginLifecycleProfiles(inspection);
186
- for (const entry of profiles) {
187
- const p = entry.profile;
188
- if (c.tags?.some((t) => /plugin-key|key-table/i.test(t)) && p.keyTable) {
189
- registryTouchPoints.push(p.keyTable.path);
190
- }
191
- if (c.tags?.some((t) => /barrel|public-api/i.test(t)) && p.barrels) {
192
- for (const b of p.barrels)
193
- registryTouchPoints.push(b.path);
194
- }
195
- }
196
- }
197
- catch {
198
- // Best-effort enrichment; absence of profiles just means no touch-points.
199
- }
200
183
  const verificationCommands = [
201
184
  'shrk check boundaries --changed-only',
202
185
  'shrk doctor',
@@ -1 +1 @@
1
- {"version":3,"file":"context.command.d.ts","sourceRoot":"","sources":["../../src/commands/context.command.ts"],"names":[],"mappings":"AASA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,cAAc,EAAE,eA6H5B,CAAC"}
1
+ {"version":3,"file":"context.command.d.ts","sourceRoot":"","sources":["../../src/commands/context.command.ts"],"names":[],"mappings":"AAiBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,cAAc,EAAE,eAiI5B,CAAC"}