@shrkcrft/cli 0.1.0-alpha.21 → 0.1.0-alpha.23

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 (94) hide show
  1. package/dist/command-registry.d.ts +9 -0
  2. package/dist/command-registry.d.ts.map +1 -1
  3. package/dist/command-registry.js +15 -0
  4. package/dist/commands/ai-status.command.d.ts.map +1 -1
  5. package/dist/commands/ai-status.command.js +10 -0
  6. package/dist/commands/apply.command.d.ts.map +1 -1
  7. package/dist/commands/apply.command.js +9 -2
  8. package/dist/commands/ask.command.d.ts.map +1 -1
  9. package/dist/commands/ask.command.js +2 -1
  10. package/dist/commands/changes.command.d.ts.map +1 -1
  11. package/dist/commands/changes.command.js +14 -4
  12. package/dist/commands/check.command.d.ts.map +1 -1
  13. package/dist/commands/check.command.js +119 -3
  14. package/dist/commands/command-catalog.d.ts.map +1 -1
  15. package/dist/commands/command-catalog.js +224 -0
  16. package/dist/commands/commands.command.d.ts +15 -0
  17. package/dist/commands/commands.command.d.ts.map +1 -1
  18. package/dist/commands/commands.command.js +162 -3
  19. package/dist/commands/compress.command.d.ts.map +1 -1
  20. package/dist/commands/compress.command.js +39 -4
  21. package/dist/commands/constructs.command.d.ts.map +1 -1
  22. package/dist/commands/constructs.command.js +40 -9
  23. package/dist/commands/context.command.d.ts.map +1 -1
  24. package/dist/commands/context.command.js +3 -1
  25. package/dist/commands/daily.commands.d.ts.map +1 -1
  26. package/dist/commands/daily.commands.js +48 -5
  27. package/dist/commands/diff-check.command.d.ts.map +1 -1
  28. package/dist/commands/diff-check.command.js +6 -2
  29. package/dist/commands/feedback.command.d.ts.map +1 -1
  30. package/dist/commands/feedback.command.js +4 -0
  31. package/dist/commands/framework.command.d.ts.map +1 -1
  32. package/dist/commands/framework.command.js +20 -3
  33. package/dist/commands/gate.command.d.ts.map +1 -1
  34. package/dist/commands/gate.command.js +99 -2
  35. package/dist/commands/graph-code-subverbs.d.ts.map +1 -1
  36. package/dist/commands/graph-code-subverbs.js +183 -68
  37. package/dist/commands/graph.command.d.ts.map +1 -1
  38. package/dist/commands/graph.command.js +6 -0
  39. package/dist/commands/impact.command.d.ts.map +1 -1
  40. package/dist/commands/impact.command.js +91 -1
  41. package/dist/commands/knowledge.command.d.ts.map +1 -1
  42. package/dist/commands/knowledge.command.js +21 -1
  43. package/dist/commands/onboard.command.d.ts.map +1 -1
  44. package/dist/commands/onboard.command.js +11 -2
  45. package/dist/commands/orchestrate.command.d.ts.map +1 -1
  46. package/dist/commands/orchestrate.command.js +6 -1
  47. package/dist/commands/pack-author.command.d.ts.map +1 -1
  48. package/dist/commands/pack-author.command.js +13 -1
  49. package/dist/commands/packs.command.d.ts.map +1 -1
  50. package/dist/commands/packs.command.js +95 -17
  51. package/dist/commands/paths.command.d.ts.map +1 -1
  52. package/dist/commands/paths.command.js +8 -1
  53. package/dist/commands/pipelines.command.d.ts.map +1 -1
  54. package/dist/commands/pipelines.command.js +2 -1
  55. package/dist/commands/plan-context.command.d.ts.map +1 -1
  56. package/dist/commands/plan-context.command.js +6 -3
  57. package/dist/commands/plan-simulate.command.js +1 -1
  58. package/dist/commands/policy-lint.command.d.ts +3 -0
  59. package/dist/commands/policy-lint.command.d.ts.map +1 -0
  60. package/dist/commands/policy-lint.command.js +135 -0
  61. package/dist/commands/recommend.command.d.ts.map +1 -1
  62. package/dist/commands/recommend.command.js +10 -2
  63. package/dist/commands/registry.command.d.ts.map +1 -1
  64. package/dist/commands/registry.command.js +117 -9
  65. package/dist/commands/report.command.js +1 -1
  66. package/dist/commands/reuse.command.d.ts +3 -0
  67. package/dist/commands/reuse.command.d.ts.map +1 -0
  68. package/dist/commands/reuse.command.js +202 -0
  69. package/dist/commands/review.command.d.ts.map +1 -1
  70. package/dist/commands/review.command.js +20 -2
  71. package/dist/commands/rule-graph-subverbs.d.ts.map +1 -1
  72. package/dist/commands/rule-graph-subverbs.js +31 -4
  73. package/dist/commands/search-structural.command.d.ts.map +1 -1
  74. package/dist/commands/search-structural.command.js +2 -2
  75. package/dist/commands/search.command.d.ts.map +1 -1
  76. package/dist/commands/search.command.js +19 -1
  77. package/dist/commands/simulate.command.d.ts.map +1 -1
  78. package/dist/commands/simulate.command.js +6 -1
  79. package/dist/commands/smart-context.command.d.ts.map +1 -1
  80. package/dist/commands/smart-context.command.js +87 -4
  81. package/dist/commands/spec.command.d.ts.map +1 -1
  82. package/dist/commands/spec.command.js +73 -13
  83. package/dist/commands/task-context.command.d.ts.map +1 -1
  84. package/dist/commands/task-context.command.js +26 -2
  85. package/dist/commands/test.command.d.ts.map +1 -1
  86. package/dist/commands/test.command.js +17 -0
  87. package/dist/commands/trace.command.d.ts.map +1 -1
  88. package/dist/commands/trace.command.js +14 -1
  89. package/dist/main.d.ts.map +1 -1
  90. package/dist/main.js +19 -1
  91. package/dist/status/freshness.d.ts +30 -0
  92. package/dist/status/freshness.d.ts.map +1 -0
  93. package/dist/status/freshness.js +81 -0
  94. package/package.json +33 -33
@@ -149,6 +149,15 @@ export declare function resolveCwd(args: ParsedArgs): string;
149
149
  export declare function flagString(args: ParsedArgs, name: string): string | undefined;
150
150
  export declare function flagBool(args: ParsedArgs, name: string): boolean;
151
151
  export declare function flagNumber(args: ParsedArgs, name: string): number | undefined;
152
+ /**
153
+ * Parse a `--limit`/`--depth`-style flag as a positive integer, falling back to
154
+ * `fallback` when the flag is absent OR malformed (non-numeric, NaN, <= 0,
155
+ * non-integer). Guards the `Number(flagString(...))` footgun where a
156
+ * fat-fingered `--limit abc` becomes NaN and silently yields empty-or-unbounded
157
+ * results (`[].slice(0, NaN) === []`, `x >= NaN === false`). Use everywhere a
158
+ * count/cap is read from a flag.
159
+ */
160
+ export declare function flagPositiveInt(args: ParsedArgs, name: string, fallback: number): number;
152
161
  /**
153
162
  * Canonical multi-value flag parser.
154
163
  *
@@ -1 +1 @@
1
- {"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../src/command-registry.ts"],"names":[],"mappings":"AAEA,MAAM,WA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I,EAAE,MAAM,EACZ,OAAO,GAAE,gBAAqB,GAC7B,MAAM,EAAE,CAkCV;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQjE"}
@@ -396,6 +396,21 @@ export function flagNumber(args, name) {
396
396
  const n = Number(v);
397
397
  return Number.isFinite(n) ? n : undefined;
398
398
  }
399
+ /**
400
+ * Parse a `--limit`/`--depth`-style flag as a positive integer, falling back to
401
+ * `fallback` when the flag is absent OR malformed (non-numeric, NaN, <= 0,
402
+ * non-integer). Guards the `Number(flagString(...))` footgun where a
403
+ * fat-fingered `--limit abc` becomes NaN and silently yields empty-or-unbounded
404
+ * results (`[].slice(0, NaN) === []`, `x >= NaN === false`). Use everywhere a
405
+ * count/cap is read from a flag.
406
+ */
407
+ export function flagPositiveInt(args, name, fallback) {
408
+ const v = args.flags.get(name);
409
+ if (typeof v !== 'string')
410
+ return fallback;
411
+ const n = Number(v);
412
+ return Number.isFinite(n) && n > 0 ? Math.floor(n) : fallback;
413
+ }
399
414
  export function flagList(args, name, options = {}) {
400
415
  const split = options.split ?? 'always';
401
416
  const raw = args.multiFlags.get(name) ?? [];
@@ -1 +1 @@
1
- {"version":3,"file":"ai-status.command.d.ts","sourceRoot":"","sources":["../../src/commands/ai-status.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,eAkD7B,CAAC"}
1
+ {"version":3,"file":"ai-status.command.d.ts","sourceRoot":"","sources":["../../src/commands/ai-status.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,EAAE,eA+D7B,CAAC"}
@@ -34,9 +34,15 @@ export const aiStatusCommand = {
34
34
  ? await pingProvider(selection.provider, pingTimeoutMs)
35
35
  : { ok: false, reason: 'no provider reachable — nothing to ping', elapsedMs: 0 };
36
36
  }
37
+ // Freshness-shaped signal, consistent with the other status commands:
38
+ // the LLM wiring is `fresh` when a provider is reachable (and the optional
39
+ // ping succeeded), else `stale` — i.e. shrk is on the deterministic
40
+ // baseline and the setup hints apply.
41
+ const state = ai.reachable && (!ping || ping.ok) ? 'fresh' : 'stale';
37
42
  if (json) {
38
43
  process.stdout.write(asJson({
39
44
  ai,
45
+ state,
40
46
  ...(ping ? { ping } : {}),
41
47
  }) + '\n');
42
48
  return ai.reachable && (!ping || ping.ok) ? 0 : 1;
@@ -45,6 +51,10 @@ export const aiStatusCommand = {
45
51
  process.stdout.write(kv('reachable', ai.reachable ? 'yes' : 'no') + '\n');
46
52
  process.stdout.write(kv('requested provider', ai.requestedProvider) + '\n');
47
53
  process.stdout.write(kv('resolved provider', ai.providerId ?? '(none)') + '\n');
54
+ process.stdout.write(kv('state', state) + '\n');
55
+ if (state === 'stale') {
56
+ process.stdout.write('! stale — no AI provider reachable; running on the deterministic baseline. See the setup hints below.\n');
57
+ }
48
58
  if (ping) {
49
59
  process.stdout.write(kv('ping', ping.ok
50
60
  ? `ok in ${ping.elapsedMs}ms` + (ping.model ? ` (model: ${ping.model})` : '')
@@ -1 +1 @@
1
- {"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../src/commands/apply.command.ts"],"names":[],"mappings":"AAqDA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAyLhC,eAAO,MAAM,YAAY,EAAE,eAisB1B,CAAC"}
1
+ {"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../src/commands/apply.command.ts"],"names":[],"mappings":"AAqDA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAyLhC,eAAO,MAAM,YAAY,EAAE,eAwsB1B,CAAC"}
@@ -407,7 +407,12 @@ export const applyCommand = {
407
407
  livePlan = result.value.plan;
408
408
  }
409
409
  const diff = diffPlanChanges(saved, livePlan);
410
- if (diff.length > 0 && !allowDivergent && !force) {
410
+ // Divergence acceptance is decoupled from the overwrite strategy: only the
411
+ // explicit --allow-divergent waives a divergence refusal. --force selects
412
+ // the overwrite strategy and must NOT double as a silent divergence bypass
413
+ // (a signed-but-drifted plan would otherwise apply while printing
414
+ // "Signature: verified"). A user who wants both passes --force --allow-divergent.
415
+ if (diff.length > 0 && !allowDivergent) {
411
416
  if (!wantJson) {
412
417
  process.stdout.write('Plan diverged from the saved version:\n');
413
418
  for (const d of diff) {
@@ -462,7 +467,9 @@ export const applyCommand = {
462
467
  // continue to carry their structured folderOps verbatim.
463
468
  const liveFolderOps = plannedFolderOps;
464
469
  const folderOpDiff = diffPlanFolderOps(saved, liveFolderOps);
465
- if (folderOpDiff.length > 0 && !allowDivergent && !force) {
470
+ // Same decoupling as the file-op divergence gate above: --force is the
471
+ // overwrite strategy only; --allow-divergent is the explicit waiver.
472
+ if (folderOpDiff.length > 0 && !allowDivergent) {
466
473
  if (!wantJson) {
467
474
  process.stdout.write('Folder-op set diverged from the saved version:\n');
468
475
  for (const d of folderOpDiff) {
@@ -1 +1 @@
1
- {"version":3,"file":"ask.command.d.ts","sourceRoot":"","sources":["../../src/commands/ask.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAIhC,eAAO,MAAM,UAAU,EAAE,eA6DxB,CAAC"}
1
+ {"version":3,"file":"ask.command.d.ts","sourceRoot":"","sources":["../../src/commands/ask.command.ts"],"names":[],"mappings":"AAYA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAIhC,eAAO,MAAM,UAAU,EAAE,eA8DxB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { inspectSharkcraft, buildProjectOverview, renderOverviewText } from '@shrkcrft/inspector';
1
+ import { inspectSharkcraft, buildProjectOverview, renderOverviewText, contextTuningBoostFor, } from '@shrkcrft/inspector';
2
2
  import { buildContext } from '@shrkcrft/context';
3
3
  import { AiMessageRole, buildPromptMessages, selectAiProvider, } from '@shrkcrft/ai';
4
4
  import { flagBool, flagNumber, flagString, resolveCwd, } from "../command-registry.js";
@@ -24,6 +24,7 @@ export const askCommand = {
24
24
  task: question,
25
25
  maxTokens,
26
26
  projectOverview: renderOverviewText(overview),
27
+ boostFor: contextTuningBoostFor(inspection, question),
27
28
  });
28
29
  const messages = buildPromptMessages({
29
30
  systemPreamble: 'You are an AI engineer working in a SharkCraft-instrumented repository. Use the supplied repository context as authoritative ground truth. Quote knowledge entry ids you used.',
@@ -1 +1 @@
1
- {"version":3,"file":"changes.command.d.ts","sourceRoot":"","sources":["../../src/commands/changes.command.ts"],"names":[],"mappings":"AAiBA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAqHhC,eAAO,MAAM,cAAc,EAAE,eAoB5B,CAAC"}
1
+ {"version":3,"file":"changes.command.d.ts","sourceRoot":"","sources":["../../src/commands/changes.command.ts"],"names":[],"mappings":"AAiBA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AA2HhC,eAAO,MAAM,cAAc,EAAE,eAwB5B,CAAC"}
@@ -14,7 +14,11 @@ async function runChangesSummary(args) {
14
14
  const inspection = await inspectSharkcraft({ cwd });
15
15
  const since = flagString(args, 'since');
16
16
  const staged = flagBool(args, 'staged');
17
- const files = flagList(args, 'files');
17
+ // `--files a,b` OR bare positional args after the subverb
18
+ // (`shrk changes summary a.ts b.ts`). Positionals were dropped silently
19
+ // before, yielding a confident full-diff / "0 files" with exit 0.
20
+ const filesFlag = flagList(args, 'files');
21
+ const files = filesFlag.length ? filesFlag : args.positional;
18
22
  // Optional round / label propagated into the report.
19
23
  const roundLabel = flagString(args, 'round') ?? flagString(args, 'label');
20
24
  const opts = {};
@@ -79,7 +83,9 @@ async function runChangesAcceptanceReplay(args) {
79
83
  const inspection = await inspectSharkcraft({ cwd });
80
84
  const since = flagString(args, 'since');
81
85
  const staged = flagBool(args, 'staged');
82
- const files = flagList(args, 'files');
86
+ // `--files a,b` OR bare positional args after the subverb (see above).
87
+ const filesFlag = flagList(args, 'files');
88
+ const files = filesFlag.length ? filesFlag : args.positional;
83
89
  const roundLabel = flagString(args, 'round') ?? flagString(args, 'label');
84
90
  const profileRaw = flagString(args, 'profile') ?? 'changed-only';
85
91
  const profile = (() => {
@@ -136,12 +142,16 @@ async function runChangesAcceptanceReplay(args) {
136
142
  export const changesCommand = {
137
143
  name: 'changes',
138
144
  description: 'Changes summary — grouped diff over --since/--staged/--files. Supports --round label and `changes acceptance-replay`. Read-only.',
139
- usage: 'shrk changes <summary|impact|report|acceptance-replay> [--since <ref>] [--staged] [--files a,b,c] [--round <name>] [--profile changed-only|standard|strict] [--format text|markdown|json] [--output <file>]',
145
+ usage: 'shrk changes <summary|impact|report|acceptance-replay> [files... | --files a,b,c] [--since <ref>] [--staged] [--round <name>] [--profile changed-only|standard|strict] [--format text|markdown|json] [--output <file>]',
146
+ booleanFlags: new Set(['json', 'staged']),
140
147
  async run(args) {
141
148
  const sub = args.positional[0];
142
149
  const sliced = { ...args, positional: args.positional.slice(1) };
150
+ // Always dispatch on the sliced args so positionals AFTER the subverb
151
+ // become the file list (handled in the runners). Passing the un-sliced
152
+ // `args` here used to leak the subverb token (e.g. "summary") forward.
143
153
  if (sub === 'summary' || sub === undefined)
144
- return runChangesSummary(sliced.positional.length > 0 ? sliced : args);
154
+ return runChangesSummary(sliced);
145
155
  if (sub === 'report')
146
156
  return runChangesSummary(sliced);
147
157
  if (sub === 'impact')
@@ -1 +1 @@
1
- {"version":3,"file":"check.command.d.ts","sourceRoot":"","sources":["../../src/commands/check.command.ts"],"names":[],"mappings":"AAmBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAikBhC,eAAO,MAAM,YAAY,EAAE,eA0D1B,CAAC"}
1
+ {"version":3,"file":"check.command.d.ts","sourceRoot":"","sources":["../../src/commands/check.command.ts"],"names":[],"mappings":"AAoBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAurBhC,eAAO,MAAM,YAAY,EAAE,eAyE1B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { buildAiReadinessReport, buildImportHygieneReport, buildPackDoctorReport, ChangedScopeMode, diagnoseActionHints, emitImportHygieneAllowlistDraft, filterViolationsToChangedScope, ImportHygieneFindingKind, inspectSharkcraft, isTodoReason, renderImportHygieneText, resolveChangedFiles, runDoctor, suggestBoundaryFixes, } from '@shrkcrft/inspector';
1
+ import { buildAiReadinessReport, buildImportHygieneReport, buildPackDoctorReport, ChangedScopeMode, diagnoseActionHints, emitImportHygieneAllowlistDraft, filterViolationsToChangedScope, ImportHygieneFindingKind, inspectSharkcraft, isTodoReason, renderImportHygieneText, resolveChangedFiles, resolveProjectConfig, runDoctor, suggestBoundaryFixes, } from '@shrkcrft/inspector';
2
2
  import { mkdirSync, writeFileSync, readFileSync, existsSync } from 'node:fs';
3
3
  import * as nodePath from 'node:path';
4
4
  import { flagBool, flagNumber, flagString, flagVars, resolveCwd, } from "../command-registry.js";
@@ -6,7 +6,7 @@ import { asJson, header, kv } from "../output/format-output.js";
6
6
  import { maybeRunInWatchMode } from "../output/watch-loop.js";
7
7
  import { validateTemplateVariables } from '@shrkcrft/templates';
8
8
  import { FileChangeType, planGeneration } from '@shrkcrft/generator';
9
- import { evaluateBoundaries, loadTsconfigPaths, scanImports, summarizeImports, } from '@shrkcrft/boundaries';
9
+ import { evaluateBoundaries, loadTsconfigPaths, runWiring, scanImports, summarizeImports, } from '@shrkcrft/boundaries';
10
10
  function knowledgeGroup(inspection) {
11
11
  const dup = inspection.validationIssues.filter((i) => i.code === 'duplicate-id');
12
12
  const missing = inspection.validationIssues.filter((i) => i.code !== 'duplicate-id');
@@ -517,20 +517,136 @@ async function checkBoundariesOnce(args) {
517
517
  return failed ? 1 : 0;
518
518
  }
519
519
  // ────────────────────────────────────────────────────────────────────────
520
+ // ────────────────────────────────────────────────────────────────────────
521
+ // Subcommand: wiring — "declared but not wired" completeness checks
522
+ // ────────────────────────────────────────────────────────────────────────
523
+ async function checkWiring(args) {
524
+ const cwd = resolveCwd(args);
525
+ const wantJson = flagBool(args, 'json');
526
+ const changedOnly = flagBool(args, 'changed-only');
527
+ const since = flagString(args, 'since');
528
+ const only = flagString(args, 'only');
529
+ // Distinguish "config is invalid" from "config valid with no wiring rules":
530
+ // an invalid config (e.g. a malformed wiringRule) must NOT fail open with a
531
+ // misleading "no rules configured" + exit 0.
532
+ const loaded = await resolveProjectConfig(cwd);
533
+ if (!loaded.ok) {
534
+ const msg = loaded.error.message;
535
+ if (wantJson) {
536
+ process.stdout.write(asJson({ schema: 'sharkcraft.wiring/v1', error: msg, rules: [], violations: [], diagnostics: [msg], verdict: 'errors' }) + '\n');
537
+ return 1;
538
+ }
539
+ process.stdout.write(header('Wiring check'));
540
+ process.stdout.write(` ✗ Could not load config: ${msg}\n Run \`shrk doctor\` for details.\n`);
541
+ return 1;
542
+ }
543
+ const rules = loaded.value.config.wiringRules ?? [];
544
+ const planeDiagnostics = loaded.value.planeDiagnostics;
545
+ if (rules.length === 0) {
546
+ if (wantJson) {
547
+ process.stdout.write(asJson({ schema: 'sharkcraft.wiring/v1', rules: [], violations: [], verdict: 'pass' }) + '\n');
548
+ return 0;
549
+ }
550
+ process.stdout.write(header('Wiring check'));
551
+ process.stdout.write(' No wiring rules configured. Declare `wiringRules[]` in sharkcraft.config.ts to enable\n' +
552
+ ' cross-file "declared but not wired" checks (see docs/wiring.md).\n');
553
+ return 0;
554
+ }
555
+ let changedFiles;
556
+ if (changedOnly || since) {
557
+ const changed = resolveChangedFiles({
558
+ projectRoot: cwd,
559
+ ...(since ? { since } : {}),
560
+ ...(changedOnly && !since ? { includeWorktree: true } : {}),
561
+ });
562
+ changedFiles = changed.files;
563
+ }
564
+ const reportRaw = runWiring(cwd, rules, {
565
+ ...(changedOnly || since ? { changedOnly: true, changedFiles: changedFiles ?? [] } : {}),
566
+ ...(only ? { only: only.split(',').map((s) => s.trim()).filter(Boolean) } : {}),
567
+ });
568
+ // Surface pack-plane merge notes (missing/invalid pack rule files, dropped
569
+ // collisions) alongside the rule engine's own misconfiguration diagnostics.
570
+ const report = planeDiagnostics.length > 0
571
+ ? { ...reportRaw, diagnostics: [...reportRaw.diagnostics, ...planeDiagnostics] }
572
+ : reportRaw;
573
+ if (wantJson) {
574
+ process.stdout.write(asJson(report) + '\n');
575
+ return report.verdict === 'errors' ? 1 : 0;
576
+ }
577
+ process.stdout.write(header('Wiring check'));
578
+ // `evaluated` counts rules that actually ran a comparison (globs matched >0
579
+ // files). When 0 rules evaluated but rules ARE configured, say so loudly —
580
+ // "checked nothing" must never read as the green "every token is wired" pass.
581
+ if (report.evaluated === 0) {
582
+ process.stdout.write(` ! Nothing evaluated — ${report.rules.length} rule(s) configured but none matched files in scope` +
583
+ (changedOnly || since ? ' (changed-only).\n' : '.\n'));
584
+ return 0;
585
+ }
586
+ process.stdout.write(kv('rules evaluated', `${report.evaluated} of ${report.rules.length}`) + '\n');
587
+ const errors = report.violations.filter((v) => v.severity === 'error').length;
588
+ const warnings = report.violations.filter((v) => v.severity === 'warning').length;
589
+ process.stdout.write(kv('violations', `${errors} error(s), ${warnings} warning(s)`) + '\n');
590
+ // Misconfigured rules (uncompilable pattern / no capture group) — surface
591
+ // them loudly; a broken rule must never read as a silent green.
592
+ if (report.diagnostics.length > 0) {
593
+ process.stdout.write('\nMisconfigured rules:\n');
594
+ for (const d of report.diagnostics)
595
+ process.stdout.write(` ! ${d}\n`);
596
+ }
597
+ if (report.violations.length === 0 && report.diagnostics.length === 0) {
598
+ process.stdout.write('\nNo wiring violations — every declared token is registered. ✓\n');
599
+ return 0;
600
+ }
601
+ if (report.violations.length === 0) {
602
+ return report.verdict === 'errors' ? 1 : 0;
603
+ }
604
+ // Group by rule for a readable report.
605
+ for (const r of report.rules) {
606
+ if (r.violations.length === 0)
607
+ continue;
608
+ process.stdout.write(`\n[${r.severity}] ${r.ruleId}${r.description ? ' — ' + r.description : ''}\n`);
609
+ process.stdout.write(` declared ${r.declaredCount} / registered ${r.registeredCount} — ${r.violations.length} not wired:\n`);
610
+ for (const v of r.violations.slice(0, 50)) {
611
+ process.stdout.write(` • ${v.token} (${v.file}:${v.line})\n`);
612
+ }
613
+ if (r.violations.length > 50) {
614
+ process.stdout.write(` … (${r.violations.length - 50} more)\n`);
615
+ }
616
+ const hint = r.violations.find((v) => v.hint)?.hint;
617
+ if (hint)
618
+ process.stdout.write(` → ${hint}\n`);
619
+ }
620
+ return report.verdict === 'errors' ? 1 : 0;
621
+ }
520
622
  // Main shrk check + subcommands
521
623
  // ────────────────────────────────────────────────────────────────────────
522
624
  export const checkCommand = {
523
625
  name: 'check',
524
626
  description: 'Run SharkCraft-level validation across knowledge / rules / templates / pipelines / packs / action hints / doctor. `check boundaries [--watch [--paths a,b] [--debounce N] [--once]]` re-runs the boundary scan on file changes.',
525
- usage: 'shrk [--cwd <dir>] check [packs|pipelines|knowledge|generation|boundaries|imports] [--strict] [--min-score <0-100>] [--json] [--watch [--paths <list>] [--debounce N] [--once]]',
627
+ usage: 'shrk [--cwd <dir>] check [packs|pipelines|knowledge|generation|boundaries|imports|wiring] [--strict] [--min-score <0-100>] [--changed-only] [--since <ref>] [--only <ids>] [--json] [--watch [--paths <list>] [--debounce N] [--once]]',
526
628
  async run(args) {
527
629
  const sub = args.positional[0];
630
+ // `check generation <id> <name>` legitimately takes extra positionals;
631
+ // every other subverb (boundaries/imports/wiring/…) and the full sweep are
632
+ // flag-driven. Reject stray positional file args instead of silently
633
+ // dropping them and reporting a confident green — pass files via --files.
634
+ if (sub !== 'generation') {
635
+ const extras = args.positional.slice(1);
636
+ if (extras.length > 0) {
637
+ process.stderr.write(`Unexpected positional argument(s): ${extras.join(', ')}. ` +
638
+ `Use --files a.ts,b.ts (or --changed-only) instead of passing files positionally.\n`);
639
+ return 2;
640
+ }
641
+ }
528
642
  if (sub === 'generation')
529
643
  return checkGeneration(args);
530
644
  if (sub === 'boundaries')
531
645
  return checkBoundaries(args);
532
646
  if (sub === 'imports' || sub === 'import-hygiene')
533
647
  return checkImports(args);
648
+ if (sub === 'wiring')
649
+ return checkWiring(args);
534
650
  if (sub === 'registry-lifecycle') {
535
651
  const cwd = resolveCwd(args);
536
652
  const { buildRegistryLifecycleReport, renderRegistryLifecycleReportText } = await import('@shrkcrft/inspector');
@@ -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;;;;;;;;;;;;;;;;;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CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;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;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAW/C"}
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,WAA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,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;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;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAW/C"}
@@ -382,6 +382,30 @@ export const COMMAND_CATALOG = Object.freeze([
382
382
  surface: CommandSurface.Common,
383
383
  taskRole: CommandTaskRole.Validate,
384
384
  }),
385
+ entry({
386
+ command: 'check wiring',
387
+ description: 'Completeness checks: flags config-defined "declared but not wired" tokens (a declared value/identifier set that must be a subset of a registered set). Generic + deterministic; rules from sharkcraft.config.ts wiringRules[]. [--changed-only] [--only <ids>] [--json]',
388
+ category: 'core',
389
+ safetyLevel: SafetyLevel.ReadOnly,
390
+ surface: CommandSurface.Common,
391
+ taskRole: CommandTaskRole.Validate,
392
+ }),
393
+ entry({
394
+ command: 'policy-lint',
395
+ description: 'Lint template/markup, stylesheet, and AOT-invisible TS surfaces against config-defined policyRules[] — sees `.html` files AND inline `template:` strings that tsc/AOT cannot. Deterministic; no AI. [--surface template|style|ts] [--changed-only] [--only <ids>] [--json]',
396
+ category: 'core',
397
+ safetyLevel: SafetyLevel.ReadOnly,
398
+ surface: CommandSurface.Common,
399
+ taskRole: CommandTaskRole.Validate,
400
+ }),
401
+ entry({
402
+ command: 'reuse',
403
+ description: 'Intent → the canonical primitive to reuse: matches your intent against config reusePrimitives[] then resolves the symbol through the code graph (transitive star-barrels) to its import path, sibling exports, and real consumer files to copy. Read-only; no AI.',
404
+ category: 'core',
405
+ safetyLevel: SafetyLevel.ReadOnly,
406
+ surface: CommandSurface.Common,
407
+ taskRole: CommandTaskRole.Search,
408
+ }),
385
409
  entry({
386
410
  command: 'diff-check',
387
411
  description: 'Self-check current git diff against boundary + import-hygiene rules. Single-call composite for agents to validate edits before declaring done. Read-only.',
@@ -3182,6 +3206,206 @@ export const COMMAND_CATALOG = Object.freeze([
3182
3206
  intendedAudience: [CommandAudience.Human, CommandAudience.Maintainer],
3183
3207
  taskRole: CommandTaskRole.Inspect,
3184
3208
  }),
3209
+ // ── D3-2: registered command groups that resolved live but had ZERO
3210
+ // catalog entries, so `shrk commands doctor` was blind to them and
3211
+ // `shrk help <group>` had no metadata. One canonical row per registered
3212
+ // sub-verb. Everything is ReadOnly except `checks run --execute`
3213
+ // (RunsShell) and `audit project-coupling` (RunsShell, advanced).
3214
+ // `mcpAvailable` mirrors a real read-only MCP tool where one exists.
3215
+ //
3216
+ // paths — path-convention registry
3217
+ // (MCP: list_path_conventions / get_path_convention / search_path_conventions).
3218
+ entry({
3219
+ command: 'paths list',
3220
+ description: 'List path conventions.',
3221
+ category: 'paths',
3222
+ safetyLevel: SafetyLevel.ReadOnly,
3223
+ mcpAvailable: true,
3224
+ taskRole: CommandTaskRole.Inspect,
3225
+ }),
3226
+ entry({
3227
+ command: 'paths get',
3228
+ description: 'Get one path convention by id.',
3229
+ category: 'paths',
3230
+ safetyLevel: SafetyLevel.ReadOnly,
3231
+ mcpAvailable: true,
3232
+ taskRole: CommandTaskRole.Inspect,
3233
+ }),
3234
+ entry({
3235
+ command: 'paths search',
3236
+ description: 'Search path conventions by scope / query.',
3237
+ category: 'paths',
3238
+ safetyLevel: SafetyLevel.ReadOnly,
3239
+ mcpAvailable: true,
3240
+ taskRole: CommandTaskRole.Search,
3241
+ }),
3242
+ entry({
3243
+ command: 'paths best',
3244
+ description: 'Pick the best path convention for a task.',
3245
+ category: 'paths',
3246
+ safetyLevel: SafetyLevel.ReadOnly,
3247
+ taskRole: CommandTaskRole.Inspect,
3248
+ }),
3249
+ // pipelines — pipeline registry
3250
+ // (MCP: list_pipelines / get_pipeline / get_pipeline_context / create_pipeline_plan).
3251
+ entry({
3252
+ command: 'pipelines list',
3253
+ description: 'List available pipelines.',
3254
+ category: 'pipelines',
3255
+ safetyLevel: SafetyLevel.ReadOnly,
3256
+ mcpAvailable: true,
3257
+ taskRole: CommandTaskRole.Inspect,
3258
+ }),
3259
+ entry({
3260
+ command: 'pipelines get',
3261
+ description: 'Show one pipeline by id.',
3262
+ category: 'pipelines',
3263
+ safetyLevel: SafetyLevel.ReadOnly,
3264
+ mcpAvailable: true,
3265
+ taskRole: CommandTaskRole.Inspect,
3266
+ }),
3267
+ entry({
3268
+ command: 'pipelines context',
3269
+ description: 'Token-budgeted context for a pipeline + task.',
3270
+ category: 'pipelines',
3271
+ safetyLevel: SafetyLevel.ReadOnly,
3272
+ mcpAvailable: true,
3273
+ taskRole: CommandTaskRole.Context,
3274
+ }),
3275
+ entry({
3276
+ command: 'pipelines plan',
3277
+ description: 'Render a pipeline as an ordered step plan for a task.',
3278
+ category: 'pipelines',
3279
+ safetyLevel: SafetyLevel.ReadOnly,
3280
+ mcpAvailable: true,
3281
+ taskRole: CommandTaskRole.Context,
3282
+ }),
3283
+ entry({
3284
+ command: 'pipelines script',
3285
+ description: 'Render a pipeline as a runnable bash-style preview script (no execution).',
3286
+ category: 'pipelines',
3287
+ safetyLevel: SafetyLevel.ReadOnly,
3288
+ taskRole: CommandTaskRole.Context,
3289
+ }),
3290
+ entry({
3291
+ command: 'pipelines next',
3292
+ description: 'Show the next recommended step in a pipeline for a task.',
3293
+ category: 'pipelines',
3294
+ safetyLevel: SafetyLevel.ReadOnly,
3295
+ taskRole: CommandTaskRole.Inspect,
3296
+ }),
3297
+ entry({
3298
+ command: 'pipelines vars',
3299
+ description: 'List the variables a pipeline consumes.',
3300
+ category: 'pipelines',
3301
+ safetyLevel: SafetyLevel.ReadOnly,
3302
+ taskRole: CommandTaskRole.Inspect,
3303
+ }),
3304
+ // checks — custom-check registry declared by rules (metadata.checks[]).
3305
+ entry({
3306
+ command: 'checks list',
3307
+ description: 'List custom checks declared by rules (metadata.checks[]). Read-only.',
3308
+ category: 'checks',
3309
+ safetyLevel: SafetyLevel.ReadOnly,
3310
+ taskRole: CommandTaskRole.Inspect,
3311
+ }),
3312
+ entry({
3313
+ command: 'checks doctor',
3314
+ description: 'Validate custom-check descriptors (missing fields, duplicate ids).',
3315
+ category: 'checks',
3316
+ safetyLevel: SafetyLevel.ReadOnly,
3317
+ taskRole: CommandTaskRole.Diagnose,
3318
+ }),
3319
+ entry({
3320
+ command: 'checks run',
3321
+ description: 'Preview a custom check. Read-only by default — pass --execute to run it.',
3322
+ category: 'checks',
3323
+ safetyLevel: SafetyLevel.ReadOnly,
3324
+ taskRole: CommandTaskRole.Validate,
3325
+ }),
3326
+ entry({
3327
+ command: 'checks run --execute',
3328
+ description: 'Actually invoke the custom check command (runs the configured shell command).',
3329
+ category: 'checks',
3330
+ safetyLevel: SafetyLevel.RunsShell,
3331
+ runsShell: true,
3332
+ requiresReview: true,
3333
+ taskRole: CommandTaskRole.Validate,
3334
+ }),
3335
+ entry({
3336
+ command: 'checks parse-report',
3337
+ description: 'Parse a check report file into the canonical finding shape. Read-only.',
3338
+ category: 'checks',
3339
+ safetyLevel: SafetyLevel.ReadOnly,
3340
+ taskRole: CommandTaskRole.Inspect,
3341
+ }),
3342
+ entry({
3343
+ command: 'checks import',
3344
+ description: 'Import an external tool report into the universal check-result protocol. Read-only.',
3345
+ category: 'checks',
3346
+ safetyLevel: SafetyLevel.ReadOnly,
3347
+ taskRole: CommandTaskRole.Inspect,
3348
+ }),
3349
+ entry({
3350
+ command: 'checks aggregate',
3351
+ description: 'Aggregate multiple check reports into one verdict. Read-only.',
3352
+ category: 'checks',
3353
+ safetyLevel: SafetyLevel.ReadOnly,
3354
+ taskRole: CommandTaskRole.Validate,
3355
+ }),
3356
+ entry({
3357
+ command: 'checks report',
3358
+ description: 'Render aggregated check results in the chosen format. Read-only.',
3359
+ category: 'checks',
3360
+ safetyLevel: SafetyLevel.ReadOnly,
3361
+ taskRole: CommandTaskRole.Inspect,
3362
+ }),
3363
+ entry({
3364
+ command: 'checks convert',
3365
+ description: 'Convert a check report between supported formats. Read-only.',
3366
+ category: 'checks',
3367
+ safetyLevel: SafetyLevel.ReadOnly,
3368
+ taskRole: CommandTaskRole.Inspect,
3369
+ }),
3370
+ // audit — project-specific coupling audit (MCP: get_project_coupling_report).
3371
+ // RunsShell/advanced per the brief: the report/plan modes materialise
3372
+ // artifacts and the audit is a heavyweight, opt-in surface.
3373
+ entry({
3374
+ command: 'audit project-coupling',
3375
+ description: 'Audit / plan / report project-specific coupling. Pass --token to scan for identifiers; the engine ships zero built-in tokens.',
3376
+ category: 'analysis',
3377
+ safetyLevel: SafetyLevel.RunsShell,
3378
+ runsShell: true,
3379
+ mcpAvailable: true,
3380
+ surface: CommandSurface.Advanced,
3381
+ intendedAudience: [CommandAudience.Human, CommandAudience.Agent],
3382
+ taskRole: CommandTaskRole.Inspect,
3383
+ }),
3384
+ // ownership — CODEOWNERS / sharkcraft ownership registry
3385
+ // (MCP: get_ownership / match_owners).
3386
+ entry({
3387
+ command: 'ownership list',
3388
+ description: 'List ownership rules from CODEOWNERS / sharkcraft/ownership.ts.',
3389
+ category: 'ownership',
3390
+ safetyLevel: SafetyLevel.ReadOnly,
3391
+ mcpAvailable: true,
3392
+ taskRole: CommandTaskRole.Inspect,
3393
+ }),
3394
+ entry({
3395
+ command: 'ownership for',
3396
+ description: 'Show the ownership match for a single file.',
3397
+ category: 'ownership',
3398
+ safetyLevel: SafetyLevel.ReadOnly,
3399
+ mcpAvailable: true,
3400
+ taskRole: CommandTaskRole.Inspect,
3401
+ }),
3402
+ entry({
3403
+ command: 'ownership affected',
3404
+ description: 'Show owners affected by --since <ref>, --bundle <id>, or --files a,b.',
3405
+ category: 'ownership',
3406
+ safetyLevel: SafetyLevel.ReadOnly,
3407
+ taskRole: CommandTaskRole.Inspect,
3408
+ }),
3185
3409
  ]);
3186
3410
  /** Return every canonical command string in the catalog. */
3187
3411
  export function listCatalogCommandStrings() {
@@ -1,5 +1,20 @@
1
1
  import { type CommandRegistry, type ICommandHandler } from '../command-registry.js';
2
+ import { type ISurfaceProfile } from '../surface/profiles.js';
3
+ import { type ICommandCatalogEntry } from './command-catalog.js';
2
4
  export declare function makeCommandsCommand(registry: CommandRegistry): ICommandHandler;
5
+ export interface ICommandsProfileView {
6
+ profile: ISurfaceProfile;
7
+ entries: readonly ICommandCatalogEntry[];
8
+ hidden: readonly string[];
9
+ catalogTotal: number;
10
+ }
11
+ /**
12
+ * Pure: render the catalog as a surface profile sees it. Every command the
13
+ * profile lists in `hidden` is filtered out of `entries` (commands stay
14
+ * callable — this is a listing filter, not a disable). Returns undefined when
15
+ * the profile id is unknown. Exported for tests.
16
+ */
17
+ export declare function buildCommandsProfileView(profileId: string, packProfiles?: readonly ISurfaceProfile[]): ICommandsProfileView | undefined;
3
18
  export interface IRetirementPlanGroup {
4
19
  reason: 'deprecated' | 'aliases' | 'machine-in-help' | 'overlapping' | 'missing-replacedBy' | 'legacy-no-removeAfter';
5
20
  entries: readonly {