@shrkcrft/cli 0.1.0-alpha.8 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/commands/boundaries.command.d.ts.map +1 -1
- package/dist/commands/boundaries.command.js +12 -0
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +30 -20
- package/dist/commands/command-catalog.d.ts +3 -7
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +47 -113
- package/dist/commands/commands.command.d.ts.map +1 -1
- package/dist/commands/commands.command.js +4 -4
- package/dist/commands/constructs.command.d.ts.map +1 -1
- package/dist/commands/constructs.command.js +22 -5
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +9 -42
- package/dist/commands/export.command.d.ts.map +1 -1
- package/dist/commands/export.command.js +3 -76
- package/dist/commands/help.command.d.ts +3 -4
- package/dist/commands/help.command.d.ts.map +1 -1
- package/dist/commands/help.command.js +21 -77
- package/dist/commands/helper.command.js +1 -1
- package/dist/commands/import.command.d.ts.map +1 -1
- package/dist/commands/import.command.js +5 -121
- package/dist/commands/init.command.d.ts.map +1 -1
- package/dist/commands/init.command.js +16 -184
- package/dist/commands/mcp.command.d.ts.map +1 -1
- package/dist/commands/mcp.command.js +131 -2
- package/dist/commands/onboard.command.d.ts.map +1 -1
- package/dist/commands/onboard.command.js +15 -3
- package/dist/commands/packs-new.d.ts +1 -1
- package/dist/commands/packs-new.d.ts.map +1 -1
- package/dist/commands/packs-new.js +36 -5
- package/dist/commands/packs.command.d.ts.map +1 -1
- package/dist/commands/packs.command.js +17 -3
- package/dist/commands/plugin.command.d.ts +11 -0
- package/dist/commands/plugin.command.d.ts.map +1 -0
- package/dist/commands/plugin.command.js +394 -0
- package/dist/commands/profiles.command.js +4 -4
- package/dist/commands/release.command.js +13 -13
- package/dist/commands/review.command.d.ts.map +1 -1
- package/dist/commands/review.command.js +28 -2
- package/dist/commands/search.command.js +1 -1
- package/dist/commands/task-context.command.js +16 -0
- package/dist/export/export-formats.d.ts +1 -1
- package/dist/export/export-formats.d.ts.map +1 -1
- package/dist/export/export-formats.js +12 -139
- package/dist/init/init-templates.d.ts.map +1 -1
- package/dist/init/init-templates.js +113 -133
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +46 -117
- package/dist/output/failure-hints.d.ts +9 -1
- package/dist/output/failure-hints.d.ts.map +1 -1
- package/dist/output/failure-hints.js +8 -2
- package/dist/output/watch-loop.d.ts +1 -9
- package/dist/output/watch-loop.d.ts.map +1 -1
- package/dist/output/watch-loop.js +3 -13
- package/dist/schemas/json-schemas.d.ts +36 -36
- package/dist/schemas/json-schemas.js +36 -36
- package/dist/surface/about.d.ts.map +1 -1
- package/dist/surface/about.js +15 -37
- package/dist/surface/no-args-landing.d.ts.map +1 -1
- package/dist/surface/no-args-landing.js +13 -9
- package/dist/surface/surface-config-writer.d.ts.map +1 -1
- package/dist/surface/surface-config-writer.js +11 -23
- package/package.json +25 -26
- package/dist/commands/diff-check.command.d.ts +0 -30
- package/dist/commands/diff-check.command.d.ts.map +0 -1
- package/dist/commands/diff-check.command.js +0 -210
- package/dist/export/claude-commands-export.d.ts +0 -60
- package/dist/export/claude-commands-export.d.ts.map +0 -1
- package/dist/export/claude-commands-export.js +0 -276
- package/dist/init/paths-advisory.d.ts +0 -20
- package/dist/init/paths-advisory.d.ts.map +0 -1
- package/dist/init/paths-advisory.js +0 -88
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
SharkCraft CLI (`shrk`): structured project intelligence for AI coding agents.
|
|
4
4
|
|
|
5
|
-
Part of [SharkCraft](https://github.com/
|
|
5
|
+
Part of [SharkCraft](https://github.com/sharkcraft/sharkcraft) — a deterministic, local-first toolkit that gives AI coding agents durable project context. See the main repo for documentation, examples, and the `shrk` CLI.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundaries.command.d.ts","sourceRoot":"","sources":["../../src/commands/boundaries.command.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAwB,KAAK,eAAe,EAA+B,MAAM,wBAAwB,CAAC;AAGjH,eAAO,MAAM,qBAAqB,EAAE,eAuBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAqClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmDtC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAyEpC,CAAC;AAsCF,uCAAuC;AACvC,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"boundaries.command.d.ts","sourceRoot":"","sources":["../../src/commands/boundaries.command.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAwB,KAAK,eAAe,EAA+B,MAAM,wBAAwB,CAAC;AAGjH,eAAO,MAAM,qBAAqB,EAAE,eAuBnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAqClC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmDtC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAyEpC,CAAC;AAsCF,uCAAuC;AACvC,eAAO,MAAM,wBAAwB,EAAE,eAmFtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eA0CtC,CAAC"}
|
|
@@ -218,6 +218,18 @@ export const boundariesEnforceCommand = {
|
|
|
218
218
|
const fileList = filesRaw
|
|
219
219
|
? filesRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
|
220
220
|
: [];
|
|
221
|
+
if (since) {
|
|
222
|
+
const { verifyGitRef } = await import('@shrkcrft/inspector');
|
|
223
|
+
const verify = verifyGitRef(cwd, since);
|
|
224
|
+
if (!verify.valid) {
|
|
225
|
+
process.stderr.write(`error: --since ref "${since}" does not resolve to a commit in this repository.\n` +
|
|
226
|
+
(verify.suggestions && verify.suggestions.length > 0
|
|
227
|
+
? `\nDid you mean:\n${verify.suggestions.map((s) => ` --since ${s}`).join('\n')}\n`
|
|
228
|
+
: '') +
|
|
229
|
+
'\nUse `git branch -a` to list available refs.\n');
|
|
230
|
+
return 2;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
221
233
|
const wantChangedScope = changedOnly || staged || Boolean(since) || fileList.length > 0;
|
|
222
234
|
const { filterViolationsToChangedScope } = await import('@shrkcrft/inspector');
|
|
223
235
|
const filtered = wantChangedScope
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.command.d.ts","sourceRoot":"","sources":["../../src/commands/check.command.ts"],"names":[],"mappings":"
|
|
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;AA0kBhC,eAAO,MAAM,YAAY,EAAE,eAmD1B,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
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, runDoctor, suggestBoundaryFixes, verifyGitRef, } 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";
|
|
5
5
|
import { asJson, header, kv } from "../output/format-output.js";
|
|
6
|
-
import { maybeRunInWatchMode } from "../output/watch-loop.js";
|
|
7
6
|
import { validateTemplateVariables } from '@shrkcrft/templates';
|
|
8
7
|
import { FileChangeType, planGeneration } from '@shrkcrft/generator';
|
|
9
8
|
import { evaluateBoundaries, loadTsconfigPaths, scanImports, summarizeImports, } from '@shrkcrft/boundaries';
|
|
@@ -153,6 +152,13 @@ async function checkImports(args) {
|
|
|
153
152
|
const cwd = resolveCwd(args);
|
|
154
153
|
const changedOnly = flagBool(args, 'changed-only');
|
|
155
154
|
const since = flagString(args, 'since');
|
|
155
|
+
if (since) {
|
|
156
|
+
const verify = verifyGitRef(cwd, since);
|
|
157
|
+
if (!verify.valid) {
|
|
158
|
+
process.stderr.write(renderSinceRefError(since, verify.suggestions ?? []));
|
|
159
|
+
return 2;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
156
162
|
let files;
|
|
157
163
|
if (changedOnly || since) {
|
|
158
164
|
const changed = resolveChangedFiles({
|
|
@@ -294,6 +300,13 @@ function readChangedScopeOptions(args, cwd) {
|
|
|
294
300
|
: [];
|
|
295
301
|
if (!changedOnly && !staged && !since && files.length === 0)
|
|
296
302
|
return null;
|
|
303
|
+
if (since) {
|
|
304
|
+
const verify = verifyGitRef(cwd, since);
|
|
305
|
+
if (!verify.valid) {
|
|
306
|
+
process.stderr.write(renderSinceRefError(since, verify.suggestions ?? []));
|
|
307
|
+
process.exit(2);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
297
310
|
const out = { projectRoot: cwd };
|
|
298
311
|
if (files.length > 0)
|
|
299
312
|
out.files = files;
|
|
@@ -305,23 +318,20 @@ function readChangedScopeOptions(args, cwd) {
|
|
|
305
318
|
out.includeWorktree = true;
|
|
306
319
|
return out;
|
|
307
320
|
}
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
321
|
+
function renderSinceRefError(ref, suggestions) {
|
|
322
|
+
const lines = [];
|
|
323
|
+
lines.push(`error: --since ref "${ref}" does not resolve to a commit in this repository.`);
|
|
324
|
+
if (suggestions.length > 0) {
|
|
325
|
+
lines.push('');
|
|
326
|
+
lines.push('Did you mean:');
|
|
327
|
+
for (const s of suggestions)
|
|
328
|
+
lines.push(` --since ${s}`);
|
|
329
|
+
}
|
|
330
|
+
lines.push('');
|
|
331
|
+
lines.push('Use `git branch -a` to list available refs, or skip --since to use the working tree.');
|
|
332
|
+
return lines.join('\n') + '\n';
|
|
315
333
|
}
|
|
316
|
-
|
|
317
|
-
'sharkcraft',
|
|
318
|
-
'packages',
|
|
319
|
-
'apps',
|
|
320
|
-
'libs',
|
|
321
|
-
'src',
|
|
322
|
-
'tools',
|
|
323
|
-
];
|
|
324
|
-
async function checkBoundariesOnce(args) {
|
|
334
|
+
async function checkBoundaries(args) {
|
|
325
335
|
const cwd = resolveCwd(args);
|
|
326
336
|
const inspection = await inspectSharkcraft({ cwd });
|
|
327
337
|
const rules = inspection.boundaryRegistry.list();
|
|
@@ -521,8 +531,8 @@ async function checkBoundariesOnce(args) {
|
|
|
521
531
|
// ────────────────────────────────────────────────────────────────────────
|
|
522
532
|
export const checkCommand = {
|
|
523
533
|
name: 'check',
|
|
524
|
-
description: 'Run SharkCraft-level validation across knowledge / rules / templates / pipelines / packs / action hints / doctor.
|
|
525
|
-
usage: 'shrk [--cwd <dir>] check [packs|pipelines|knowledge|generation
|
|
534
|
+
description: 'Run SharkCraft-level validation across knowledge / rules / templates / pipelines / packs / action hints / doctor.',
|
|
535
|
+
usage: 'shrk [--cwd <dir>] check [packs|pipelines|knowledge|generation] [--strict] [--min-score <0-100>] [--json]',
|
|
526
536
|
async run(args) {
|
|
527
537
|
const sub = args.positional[0];
|
|
528
538
|
if (sub === 'generation')
|
|
@@ -236,13 +236,9 @@ export declare function commandLifecycle(e: ICommandCatalogEntry): CommandLifecy
|
|
|
236
236
|
/**
|
|
237
237
|
* Default-help visibility rule. Honors an explicit
|
|
238
238
|
* {@link ICommandCatalogEntry.showInDefaultHelp} when set; otherwise
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
* Deprecated, retired, aliased commands and anything in the
|
|
244
|
-
* {@link R46_OVERLAY} are always hidden regardless of allowlist
|
|
245
|
-
* membership.
|
|
239
|
+
* primary + common are visible and advanced / machine / internal / legacy
|
|
240
|
+
* are hidden. Deprecated and retired commands are always hidden by
|
|
241
|
+
* default regardless of surface.
|
|
246
242
|
*/
|
|
247
243
|
export declare function defaultShowInHelp(e: ICommandCatalogEntry): boolean;
|
|
248
244
|
/**
|
|
@@ -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,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;;;OAWG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,oBAAoB,
|
|
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,iBAAiB;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB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AAED,wBAAgB,wBAAwB,IAAI,SAAS,uBAAuB,EAAE,CAsB7E;AAED,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,SAAS,uBAAuB,EAAE,GACvC,MAAM,CAaR"}
|
|
@@ -291,15 +291,6 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
291
291
|
surface: CommandSurface.Common,
|
|
292
292
|
taskRole: CommandTaskRole.Validate,
|
|
293
293
|
}),
|
|
294
|
-
entry({
|
|
295
|
-
command: 'diff-check',
|
|
296
|
-
description: 'Self-check current git diff against boundary + import-hygiene rules. Single-call composite for agents to validate edits before declaring done. Read-only.',
|
|
297
|
-
category: 'core',
|
|
298
|
-
safetyLevel: SafetyLevel.ReadOnly,
|
|
299
|
-
mcpAvailable: true,
|
|
300
|
-
surface: CommandSurface.Common,
|
|
301
|
-
taskRole: CommandTaskRole.Validate,
|
|
302
|
-
}),
|
|
303
294
|
entry({
|
|
304
295
|
command: 'review',
|
|
305
296
|
description: 'PR-review packet — changed files, affected rules, missing tests heuristic.',
|
|
@@ -643,11 +634,6 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
643
634
|
category: 'task-context',
|
|
644
635
|
safetyLevel: SafetyLevel.ReadOnly,
|
|
645
636
|
mcpAvailable: true,
|
|
646
|
-
// Overlaps with `shrk task` (machine packet) and `shrk recommend`
|
|
647
|
-
// (human routing). Pointing at `task` as canonical so users who
|
|
648
|
-
// hit this via tab-complete see the canonical machine-pipe form.
|
|
649
|
-
overlapsWith: ['task', 'recommend'],
|
|
650
|
-
preferredCommand: 'shrk task "<task>"',
|
|
651
637
|
}),
|
|
652
638
|
entry({
|
|
653
639
|
command: 'validate-change',
|
|
@@ -1021,7 +1007,7 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
1021
1007
|
// `commands doctor` is honest.
|
|
1022
1008
|
entry({
|
|
1023
1009
|
command: 'profiles',
|
|
1024
|
-
description: 'List / inspect pack-contributed profiles (migration, conventions, …). Subcommands: list, get, doctor, search.',
|
|
1010
|
+
description: 'List / inspect pack-contributed profiles (plugin-lifecycle, migration, conventions, …). Subcommands: list, get, doctor, search.',
|
|
1025
1011
|
category: 'core',
|
|
1026
1012
|
safetyLevel: SafetyLevel.ReadOnly,
|
|
1027
1013
|
mcpAvailable: true,
|
|
@@ -1122,7 +1108,13 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
1122
1108
|
}),
|
|
1123
1109
|
entry({
|
|
1124
1110
|
command: 'mcp serve',
|
|
1125
|
-
description: 'Start the read-only MCP server (stdio).',
|
|
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).',
|
|
1126
1118
|
category: 'meta',
|
|
1127
1119
|
safetyLevel: SafetyLevel.ReadOnly,
|
|
1128
1120
|
}),
|
|
@@ -2274,6 +2266,13 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
2274
2266
|
safetyLevel: SafetyLevel.ReadOnly,
|
|
2275
2267
|
mcpAvailable: true,
|
|
2276
2268
|
}),
|
|
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
|
+
}),
|
|
2277
2276
|
entry({
|
|
2278
2277
|
command: 'onboard adopt status --max-age-days',
|
|
2279
2278
|
description: 'Adoption checkpoint status with custom max-age (default 30 days).',
|
|
@@ -2330,7 +2329,7 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
2330
2329
|
}),
|
|
2331
2330
|
entry({
|
|
2332
2331
|
command: 'release smoke --matrix',
|
|
2333
|
-
description: 'Run smoke scenarios across multiple repo targets (sharkcraft/dogfood/synthetic/
|
|
2332
|
+
description: 'Run smoke scenarios across multiple repo targets (sharkcraft/dogfood/synthetic/adopter).',
|
|
2334
2333
|
category: 'release',
|
|
2335
2334
|
safetyLevel: SafetyLevel.WritesDraftsOnly,
|
|
2336
2335
|
writesFiles: true,
|
|
@@ -2722,6 +2721,34 @@ export const COMMAND_CATALOG = Object.freeze([
|
|
|
2722
2721
|
safetyLevel: SafetyLevel.ReadOnly,
|
|
2723
2722
|
mcpAvailable: true,
|
|
2724
2723
|
}),
|
|
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
|
+
}),
|
|
2725
2752
|
entry({
|
|
2726
2753
|
command: 'helper list',
|
|
2727
2754
|
description: 'List available helper plan generators. Read-only.',
|
|
@@ -3123,99 +3150,12 @@ export function commandLifecycle(e) {
|
|
|
3123
3150
|
return CommandLifecycle.Deprecated;
|
|
3124
3151
|
return CommandLifecycle.Active;
|
|
3125
3152
|
}
|
|
3126
|
-
/**
|
|
3127
|
-
* The "Primary verbs" allowlist — top-level commands that pay rent in
|
|
3128
|
-
* the default help surface. Everything else stays callable but is
|
|
3129
|
-
* hidden from `--full-help` and from MCP tool advertising; users find
|
|
3130
|
-
* them via `shrk surface list`, `shrk help <cmd>`, or `--full-help`.
|
|
3131
|
-
*
|
|
3132
|
-
* Picked to cover the canonical agent-flow journeys:
|
|
3133
|
-
* - bootstrap a repo, verify it
|
|
3134
|
-
* - get a brief / context / task packet for an agent
|
|
3135
|
-
* - generate safely (plan → apply → check)
|
|
3136
|
-
* - browse what shrk knows (rules / paths / templates / presets)
|
|
3137
|
-
* - inline the rules into the agent's prompt (export, mcp, dashboard)
|
|
3138
|
-
* - daily operations (review, impact, search, explain, why, surface)
|
|
3139
|
-
*
|
|
3140
|
-
* Anything not in this set falls back to the legacy
|
|
3141
|
-
* surface-tier-based visibility, with deprecated / retired / aliased
|
|
3142
|
-
* commands hidden regardless. Adding a verb here is the explicit
|
|
3143
|
-
* "this is rent-paying" decision.
|
|
3144
|
-
*/
|
|
3145
|
-
const PRIMARY_VERBS_ALLOWLIST = new Set([
|
|
3146
|
-
// Bootstrap
|
|
3147
|
-
'init',
|
|
3148
|
-
'doctor',
|
|
3149
|
-
'inspect',
|
|
3150
|
-
'onboard',
|
|
3151
|
-
'version',
|
|
3152
|
-
'help',
|
|
3153
|
-
'preflight',
|
|
3154
|
-
'self-config',
|
|
3155
|
-
// Per-task
|
|
3156
|
-
'brief',
|
|
3157
|
-
'recommend',
|
|
3158
|
-
'context',
|
|
3159
|
-
'task',
|
|
3160
|
-
'coverage',
|
|
3161
|
-
'explain',
|
|
3162
|
-
'why',
|
|
3163
|
-
'search',
|
|
3164
|
-
'impact',
|
|
3165
|
-
'graph',
|
|
3166
|
-
// Generate code safely
|
|
3167
|
-
'gen',
|
|
3168
|
-
'apply',
|
|
3169
|
-
'check',
|
|
3170
|
-
'quality',
|
|
3171
|
-
'plan',
|
|
3172
|
-
'fix',
|
|
3173
|
-
// Browse / inline
|
|
3174
|
-
'knowledge',
|
|
3175
|
-
'rules',
|
|
3176
|
-
'templates',
|
|
3177
|
-
'paths',
|
|
3178
|
-
'import',
|
|
3179
|
-
'export',
|
|
3180
|
-
// Architecture & quality gates
|
|
3181
|
-
'drift',
|
|
3182
|
-
'safety',
|
|
3183
|
-
// Run for an agent
|
|
3184
|
-
'mcp',
|
|
3185
|
-
'dashboard',
|
|
3186
|
-
// Ops
|
|
3187
|
-
'surface',
|
|
3188
|
-
'presets',
|
|
3189
|
-
'review',
|
|
3190
|
-
'packs',
|
|
3191
|
-
'ci',
|
|
3192
|
-
'commands',
|
|
3193
|
-
]);
|
|
3194
|
-
function topLevelVerb(command) {
|
|
3195
|
-
// Strip leading `--cwd <dir>` / `--<flag>` tokens and angle-bracket
|
|
3196
|
-
// placeholders; the canonical first verb is whatever leads.
|
|
3197
|
-
const tokens = command.split(/\s+/);
|
|
3198
|
-
for (const t of tokens) {
|
|
3199
|
-
if (!t)
|
|
3200
|
-
continue;
|
|
3201
|
-
if (t.startsWith('--') || t.startsWith('-'))
|
|
3202
|
-
continue;
|
|
3203
|
-
if (t.startsWith('<') || t.startsWith('"'))
|
|
3204
|
-
continue;
|
|
3205
|
-
return t;
|
|
3206
|
-
}
|
|
3207
|
-
return command;
|
|
3208
|
-
}
|
|
3209
3153
|
/**
|
|
3210
3154
|
* Default-help visibility rule. Honors an explicit
|
|
3211
3155
|
* {@link ICommandCatalogEntry.showInDefaultHelp} when set; otherwise
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3215
|
-
*
|
|
3216
|
-
* Deprecated, retired, aliased commands and anything in the
|
|
3217
|
-
* {@link R46_OVERLAY} are always hidden regardless of allowlist
|
|
3218
|
-
* membership.
|
|
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.
|
|
3219
3159
|
*/
|
|
3220
3160
|
export function defaultShowInHelp(e) {
|
|
3221
3161
|
if (e.showInDefaultHelp !== undefined)
|
|
@@ -3228,12 +3168,6 @@ export function defaultShowInHelp(e) {
|
|
|
3228
3168
|
return false;
|
|
3229
3169
|
if (lc === CommandLifecycle.Alias)
|
|
3230
3170
|
return false;
|
|
3231
|
-
// Allowlist gate — the top-level verb must be one of the ~30
|
|
3232
|
-
// rent-paying verbs. Subcommands of an allowlisted verb inherit
|
|
3233
|
-
// visibility (so `check boundaries` shows under `check`).
|
|
3234
|
-
const verb = topLevelVerb(e.command);
|
|
3235
|
-
if (!PRIMARY_VERBS_ALLOWLIST.has(verb))
|
|
3236
|
-
return false;
|
|
3237
3171
|
const surface = commandSurface(e);
|
|
3238
3172
|
return surface === CommandSurface.Primary || surface === CommandSurface.Common;
|
|
3239
3173
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.command.d.ts","sourceRoot":"","sources":["../../src/commands/commands.command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;QAA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|
|
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 {
|
|
4
|
-
import { buildCommandTaxonomy, buildPrimaryCommandsReport, renderCommandTaxonomyMarkdown, renderCommandTaxonomyText, renderPrimaryCommandsText } from '@shrkcrft/inspector';
|
|
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';
|
|
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
|
|
592
|
+
// (a) primary commands should declare an audience (so adopters 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({
|
|
@@ -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,
|
|
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"}
|
|
@@ -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
|
|
94
|
+
description: 'Trace all files / publicApi / events / tokens belonging to a construct. --deep adds related/sandbox/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|barrel)/i.test(t)) ?? [],
|
|
121
|
+
registryHints: c.tags?.filter((t) => /(registry|composer|defaults|sandbox|demo|barrel)/i.test(t)) ?? [],
|
|
122
122
|
}
|
|
123
123
|
: undefined;
|
|
124
124
|
if (flagBool(args, 'json')) {
|
|
@@ -175,11 +175,28 @@ export const constructsImpactCommand = {
|
|
|
175
175
|
}
|
|
176
176
|
const trace = traceConstruct(c);
|
|
177
177
|
/**
|
|
178
|
-
* Registry touch-points are
|
|
179
|
-
*
|
|
180
|
-
*
|
|
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.
|
|
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
|
+
}
|
|
183
200
|
const verificationCommands = [
|
|
184
201
|
'shrk check boundaries --changed-only',
|
|
185
202
|
'shrk doctor',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.command.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.command.ts"],"names":[],"mappings":"AAqBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.command.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.command.ts"],"names":[],"mappings":"AAqBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAwJhC,eAAO,MAAM,aAAa,EAAE,eAW3B,CAAC;AA+ZF,eAAO,MAAM,qBAAqB,EAAE,eAmCnC,CAAC;AAuDF,eAAO,MAAM,yBAAyB,EAAE,eAavC,CAAC;AAIF,eAAO,MAAM,wBAAwB,EAAE,eA2CtC,CAAC;AAgCF,eAAO,MAAM,6BAA6B,EAAE,eAa3C,CAAC"}
|
|
@@ -38,7 +38,7 @@ function describeStrictMode(mode) {
|
|
|
38
38
|
case 'all':
|
|
39
39
|
return 'strict=all (every warning fails)';
|
|
40
40
|
case 'warnings':
|
|
41
|
-
return 'strict=warnings (structural warnings fail,
|
|
41
|
+
return 'strict=warnings (structural warnings fail, hint-quality excluded)';
|
|
42
42
|
case 'errors':
|
|
43
43
|
return 'strict=errors (only errors fail)';
|
|
44
44
|
case 'off':
|
|
@@ -59,10 +59,8 @@ function evaluateStrict(mode, checks, errorCount) {
|
|
|
59
59
|
for (const c of checks) {
|
|
60
60
|
if (c.severity !== DoctorSeverity.Warning)
|
|
61
61
|
continue;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// tomorrow). `--strict=all` counts every warning, advisory or not.
|
|
65
|
-
if (mode === 'warnings' && c.advisory === true) {
|
|
62
|
+
const isHintQuality = c.id.startsWith('actionhints-');
|
|
63
|
+
if (mode === 'warnings' && isHintQuality) {
|
|
66
64
|
excludedWarnings += 1;
|
|
67
65
|
}
|
|
68
66
|
else {
|
|
@@ -76,7 +74,7 @@ function evaluateStrict(mode, checks, errorCount) {
|
|
|
76
74
|
excludedWarnings,
|
|
77
75
|
reason: mode === 'all'
|
|
78
76
|
? 'any warning'
|
|
79
|
-
: 'structural warnings only (
|
|
77
|
+
: 'structural warnings only (hint-quality excluded)',
|
|
80
78
|
};
|
|
81
79
|
}
|
|
82
80
|
function buildFilterOptions(args, suppressions) {
|
|
@@ -422,7 +420,7 @@ async function doctorCommandImpl(args) {
|
|
|
422
420
|
void saveDoctorSuppressions;
|
|
423
421
|
void existsSync;
|
|
424
422
|
if (strictMode === 'warnings' && strictEval.excludedWarnings > 0) {
|
|
425
|
-
process.stdout.write(` (strict=warnings excluded ${strictEval.excludedWarnings}
|
|
423
|
+
process.stdout.write(` (strict=warnings excluded ${strictEval.excludedWarnings} hint-quality warning(s); use --strict=all to include)\n`);
|
|
426
424
|
}
|
|
427
425
|
// Surface acknowledgement state. Bare suppressions don't qualify as
|
|
428
426
|
// acknowledgements; expiring/expired ones get a callout so authors don't
|
|
@@ -460,27 +458,10 @@ async function doctorCommandImpl(args) {
|
|
|
460
458
|
if (!inspection.sharkcraftDir) {
|
|
461
459
|
process.stdout.write('\nNothing here yet — try `shrk init --zero-config` to detect your stack and pick a preset.\n');
|
|
462
460
|
}
|
|
463
|
-
|
|
464
|
-
// users actually want answered (can I let an agent write here? can
|
|
465
|
-
// I let an agent read here?). The 0..100 score follows, scoped to
|
|
466
|
-
// the workspace shape so libraries don't get dinged for "no
|
|
467
|
-
// pipelines" and apps don't get dinged for "no published API".
|
|
468
|
-
process.stdout.write(`\nShape: ${report.workspaceShape.label}` +
|
|
469
|
-
` (score counts ${report.dimensions.filter((d) => d.applies === 'core').length} of ${report.dimensions.length} dimensions)\n`);
|
|
470
|
-
process.stdout.write(` ${report.verdicts.readyForAgentReads ? '✓' : '✗'} Ready for agent reads (context / task lookups)\n`);
|
|
471
|
-
process.stdout.write(` ${report.verdicts.readyForAgentWrites ? '✓' : '✗'} Ready for agent writes (apply / generate)\n`);
|
|
472
|
-
if (report.verdicts.blockers.length > 0) {
|
|
473
|
-
process.stdout.write(` Blockers:\n`);
|
|
474
|
-
for (const b of report.verdicts.blockers) {
|
|
475
|
-
process.stdout.write(` • ${b}\n`);
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
process.stdout.write(`\nAI-readiness: ${report.score} / 100 (${report.grade}, shape-aware)\n`);
|
|
461
|
+
process.stdout.write(`\nAI-readiness: ${report.score} / 100 (${report.grade})\n`);
|
|
479
462
|
if (report.topRecommendations.length) {
|
|
480
463
|
// Keep the default doctor output short: top 3 recommendations,
|
|
481
|
-
// pass `--verbose` for the full list.
|
|
482
|
-
// from `core` dimensions now — n/a-for-shape dimensions stop
|
|
483
|
-
// generating the misleading "add a pipeline" advice for libraries.
|
|
464
|
+
// pass `--verbose` for the full list.
|
|
484
465
|
const verbose = flagBool(args, 'verbose');
|
|
485
466
|
const visible = verbose ? report.topRecommendations : report.topRecommendations.slice(0, 3);
|
|
486
467
|
process.stdout.write(`Top recommendations${verbose ? '' : ` (top ${visible.length})`}:\n`);
|
|
@@ -490,21 +471,6 @@ async function doctorCommandImpl(args) {
|
|
|
490
471
|
process.stdout.write(` … (${report.topRecommendations.length - visible.length} more — pass --verbose to see all)\n`);
|
|
491
472
|
}
|
|
492
473
|
}
|
|
493
|
-
// Surface N/A dimensions when --show-na is passed, so users can see
|
|
494
|
-
// what was deliberately skipped and disagree if they want to.
|
|
495
|
-
if (flagBool(args, 'show-na')) {
|
|
496
|
-
const skipped = report.dimensions.filter((d) => d.applies !== 'core');
|
|
497
|
-
if (skipped.length > 0) {
|
|
498
|
-
process.stdout.write(`\nNot counted in score (${skipped.length} dimensions):\n`);
|
|
499
|
-
for (const d of skipped) {
|
|
500
|
-
const tag = d.applies === 'n/a-for-shape' ? 'n/a' : 'advisory';
|
|
501
|
-
process.stdout.write(` [${tag}] ${d.title}: ${d.note}`);
|
|
502
|
-
if (d.appliesReason)
|
|
503
|
-
process.stdout.write(` — ${d.appliesReason}`);
|
|
504
|
-
process.stdout.write('\n');
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
474
|
if (strictEval.failed) {
|
|
509
475
|
process.stdout.write(`\nStrict mode: failing because ${strictEval.countedWarnings} warning(s) + ${result.summary.errors} error(s) exist (${strictEval.reason}).\n`);
|
|
510
476
|
}
|
|
@@ -513,7 +479,8 @@ async function doctorCommandImpl(args) {
|
|
|
513
479
|
}
|
|
514
480
|
// Failure-to-success hints surface only when something is wrong.
|
|
515
481
|
if (overallExitCode !== 0 || result.summary.warnings > 0) {
|
|
516
|
-
|
|
482
|
+
const folderMissing = result.checks.some((c) => c.id === 'sharkcraft-folder' && (c.severity === 'error' || c.severity === 'warning'));
|
|
483
|
+
process.stdout.write(renderFailureHints(doctorHints({ sharkcraftFolderMissing: folderMissing })));
|
|
517
484
|
}
|
|
518
485
|
// When there are preview-eligible findings (action-hints,
|
|
519
486
|
// knowledge-stale, template-drift, self-config, pack-conflict,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.command.d.ts","sourceRoot":"","sources":["../../src/commands/export.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.command.d.ts","sourceRoot":"","sources":["../../src/commands/export.command.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAgBhC,eAAO,MAAM,aAAa,EAAE,eAkF3B,CAAC"}
|