@shrkcrft/cli 0.1.0-alpha.29 → 0.1.0-alpha.31
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/dist/asset-preview/apply-asset-preview.js +1 -1
- package/dist/authoring/authoring-kit.d.ts +9 -1
- package/dist/authoring/authoring-kit.d.ts.map +1 -1
- package/dist/authoring/authoring-kit.js +26 -13
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts +11 -0
- package/dist/bootstrap/unlinked-workspace-dependency.d.ts.map +1 -0
- package/dist/bootstrap/unlinked-workspace-dependency.js +99 -0
- package/dist/command-registry.d.ts +100 -1
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +130 -3
- package/dist/commands/api-diff.command.d.ts.map +1 -1
- package/dist/commands/api-diff.command.js +12 -0
- package/dist/commands/apply.command.d.ts.map +1 -1
- package/dist/commands/apply.command.js +3 -0
- package/dist/commands/arch.command.d.ts.map +1 -1
- package/dist/commands/arch.command.js +26 -7
- package/dist/commands/architecture.command.d.ts.map +1 -1
- package/dist/commands/architecture.command.js +8 -2
- package/dist/commands/baseline.command.d.ts +76 -0
- package/dist/commands/baseline.command.d.ts.map +1 -1
- package/dist/commands/baseline.command.js +599 -75
- package/dist/commands/biome.command.d.ts.map +1 -1
- package/dist/commands/biome.command.js +20 -0
- package/dist/commands/boundaries.command.d.ts +9 -1
- package/dist/commands/boundaries.command.d.ts.map +1 -1
- package/dist/commands/boundaries.command.js +88 -20
- package/dist/commands/bundle.command.d.ts.map +1 -1
- package/dist/commands/bundle.command.js +57 -11
- package/dist/commands/cache-align.command.d.ts.map +1 -1
- package/dist/commands/cache-align.command.js +3 -1
- package/dist/commands/changelog-data.d.ts.map +1 -1
- package/dist/commands/changelog-data.js +164 -0
- package/dist/commands/changes.command.d.ts.map +1 -1
- package/dist/commands/changes.command.js +15 -0
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +1260 -324
- package/dist/commands/checks.command.d.ts.map +1 -1
- package/dist/commands/checks.command.js +188 -40
- package/dist/commands/ci.command.d.ts.map +1 -1
- package/dist/commands/ci.command.js +35 -2
- package/dist/commands/code-intel.command.d.ts.map +1 -1
- package/dist/commands/code-intel.command.js +8 -1
- package/dist/commands/command-catalog.d.ts +23 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +152 -35
- package/dist/commands/commands.command.d.ts +21 -3
- package/dist/commands/commands.command.d.ts.map +1 -1
- package/dist/commands/commands.command.js +172 -27
- package/dist/commands/compress.command.d.ts.map +1 -1
- package/dist/commands/compress.command.js +4 -0
- package/dist/commands/constructs.command.d.ts.map +1 -1
- package/dist/commands/constructs.command.js +50 -12
- package/dist/commands/context.command.d.ts.map +1 -1
- package/dist/commands/context.command.js +40 -5
- package/dist/commands/contract-templates.command.d.ts.map +1 -1
- package/dist/commands/contract-templates.command.js +9 -1
- package/dist/commands/contract.command.d.ts.map +1 -1
- package/dist/commands/contract.command.js +35 -0
- package/dist/commands/conventions.command.d.ts.map +1 -1
- package/dist/commands/conventions.command.js +189 -29
- package/dist/commands/coverage.command.d.ts.map +1 -1
- package/dist/commands/coverage.command.js +9 -0
- package/dist/commands/daily.commands.d.ts +0 -1
- package/dist/commands/daily.commands.d.ts.map +1 -1
- package/dist/commands/daily.commands.js +12 -76
- package/dist/commands/dashboard.command.d.ts.map +1 -1
- package/dist/commands/dashboard.command.js +10 -0
- package/dist/commands/dev.command.d.ts.map +1 -1
- package/dist/commands/dev.command.js +45 -2
- package/dist/commands/diagnostics.command.d.ts +0 -2
- package/dist/commands/diagnostics.command.d.ts.map +1 -1
- package/dist/commands/diagnostics.command.js +5 -78
- package/dist/commands/diff-check.command.d.ts +6 -4
- package/dist/commands/diff-check.command.d.ts.map +1 -1
- package/dist/commands/diff-check.command.js +190 -103
- package/dist/commands/docs-references.command.d.ts +20 -0
- package/dist/commands/docs-references.command.d.ts.map +1 -0
- package/dist/commands/docs-references.command.js +520 -0
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +60 -5
- package/dist/commands/drift.command.d.ts.map +1 -1
- package/dist/commands/drift.command.js +17 -4
- package/dist/commands/eslint.command.d.ts.map +1 -1
- package/dist/commands/eslint.command.js +20 -0
- package/dist/commands/export.command.d.ts.map +1 -1
- package/dist/commands/export.command.js +23 -1
- package/dist/commands/feedback-dispatch.command.d.ts.map +1 -1
- package/dist/commands/feedback-dispatch.command.js +29 -0
- package/dist/commands/feedback.command.d.ts.map +1 -1
- package/dist/commands/feedback.command.js +6 -1
- package/dist/commands/finish.command.d.ts.map +1 -1
- package/dist/commands/finish.command.js +32 -8
- package/dist/commands/fix.command.d.ts.map +1 -1
- package/dist/commands/fix.command.js +19 -0
- package/dist/commands/gate.command.d.ts +6 -1
- package/dist/commands/gate.command.d.ts.map +1 -1
- package/dist/commands/gate.command.js +50 -124
- package/dist/commands/gates.command.d.ts +54 -0
- package/dist/commands/gates.command.d.ts.map +1 -1
- package/dist/commands/gates.command.js +1314 -64
- package/dist/commands/gen.command.d.ts.map +1 -1
- package/dist/commands/gen.command.js +4 -0
- package/dist/commands/generated.command.d.ts +62 -0
- package/dist/commands/generated.command.d.ts.map +1 -1
- package/dist/commands/generated.command.js +639 -156
- package/dist/commands/graph-code-subverbs.d.ts +15 -0
- package/dist/commands/graph-code-subverbs.d.ts.map +1 -1
- package/dist/commands/graph-code-subverbs.js +203 -25
- package/dist/commands/graph.command.d.ts.map +1 -1
- package/dist/commands/graph.command.js +79 -37
- package/dist/commands/help.command.d.ts +30 -6
- package/dist/commands/help.command.d.ts.map +1 -1
- package/dist/commands/help.command.js +323 -199
- package/dist/commands/helper.command.d.ts +1 -0
- package/dist/commands/helper.command.d.ts.map +1 -1
- package/dist/commands/helper.command.js +195 -56
- package/dist/commands/impact.command.d.ts.map +1 -1
- package/dist/commands/impact.command.js +115 -12
- package/dist/commands/infer.command.d.ts.map +1 -1
- package/dist/commands/infer.command.js +20 -45
- package/dist/commands/ingest.command.d.ts +0 -1
- package/dist/commands/ingest.command.d.ts.map +1 -1
- package/dist/commands/ingest.command.js +25 -41
- package/dist/commands/knowledge-author.command.d.ts +0 -3
- package/dist/commands/knowledge-author.command.d.ts.map +1 -1
- package/dist/commands/knowledge-author.command.js +10 -23
- package/dist/commands/knowledge.command.d.ts.map +1 -1
- package/dist/commands/knowledge.command.js +469 -129
- package/dist/commands/languages.command.d.ts.map +1 -1
- package/dist/commands/languages.command.js +27 -0
- package/dist/commands/lint.command.d.ts.map +1 -1
- package/dist/commands/lint.command.js +3 -0
- package/dist/commands/mcp.command.d.ts +18 -0
- package/dist/commands/mcp.command.d.ts.map +1 -1
- package/dist/commands/mcp.command.js +33 -8
- package/dist/commands/onboard.command.d.ts.map +1 -1
- package/dist/commands/onboard.command.js +20 -0
- package/dist/commands/owners.command.d.ts.map +1 -1
- package/dist/commands/owners.command.js +14 -2
- package/dist/commands/packs-new.d.ts +13 -1
- package/dist/commands/packs-new.d.ts.map +1 -1
- package/dist/commands/packs-new.js +500 -335
- package/dist/commands/packs.command.d.ts.map +1 -1
- package/dist/commands/packs.command.js +378 -36
- package/dist/commands/paths.command.d.ts.map +1 -1
- package/dist/commands/paths.command.js +9 -1
- package/dist/commands/pipelines.command.d.ts.map +1 -1
- package/dist/commands/pipelines.command.js +7 -1
- package/dist/commands/plan-check.command.d.ts.map +1 -1
- package/dist/commands/plan-check.command.js +3 -0
- package/dist/commands/plan.command.d.ts.map +1 -1
- package/dist/commands/plan.command.js +3 -0
- package/dist/commands/playbooks.command.d.ts.map +1 -1
- package/dist/commands/playbooks.command.js +7 -2
- package/dist/commands/policy-lint.command.d.ts +19 -2
- package/dist/commands/policy-lint.command.d.ts.map +1 -1
- package/dist/commands/policy-lint.command.js +224 -65
- package/dist/commands/policy.command.d.ts.map +1 -1
- package/dist/commands/policy.command.js +6 -1
- package/dist/commands/pr.command.d.ts.map +1 -1
- package/dist/commands/pr.command.js +14 -0
- package/dist/commands/presets.command.d.ts.map +1 -1
- package/dist/commands/presets.command.js +12 -27
- package/dist/commands/profiles.command.d.ts.map +1 -1
- package/dist/commands/profiles.command.js +94 -26
- package/dist/commands/provenance.command.js +1 -1
- package/dist/commands/quality.command.d.ts.map +1 -1
- package/dist/commands/quality.command.js +129 -33
- package/dist/commands/recommend.command.d.ts +20 -4
- package/dist/commands/recommend.command.d.ts.map +1 -1
- package/dist/commands/recommend.command.js +172 -278
- package/dist/commands/registrations.command.d.ts.map +1 -1
- package/dist/commands/registrations.command.js +138 -13
- package/dist/commands/registry-lifecycle-run.d.ts +14 -0
- package/dist/commands/registry-lifecycle-run.d.ts.map +1 -0
- package/dist/commands/registry-lifecycle-run.js +336 -0
- package/dist/commands/registry.command.d.ts.map +1 -1
- package/dist/commands/registry.command.js +235 -62
- package/dist/commands/release.command.d.ts.map +1 -1
- package/dist/commands/release.command.js +99 -20
- package/dist/commands/report.command.d.ts.map +1 -1
- package/dist/commands/report.command.js +38 -2
- package/dist/commands/reuse-coverage.command.d.ts +23 -0
- package/dist/commands/reuse-coverage.command.d.ts.map +1 -0
- package/dist/commands/reuse-coverage.command.js +536 -0
- package/dist/commands/reuse.command.d.ts +3 -18
- package/dist/commands/reuse.command.d.ts.map +1 -1
- package/dist/commands/reuse.command.js +395 -244
- package/dist/commands/review.command.d.ts.map +1 -1
- package/dist/commands/review.command.js +33 -1
- package/dist/commands/rounds.command.d.ts.map +1 -1
- package/dist/commands/rounds.command.js +5 -0
- package/dist/commands/safety.command.d.ts.map +1 -1
- package/dist/commands/safety.command.js +9 -0
- package/dist/commands/scaffolds.command.d.ts.map +1 -1
- package/dist/commands/scaffolds.command.js +97 -25
- package/dist/commands/search.command.d.ts +0 -8
- package/dist/commands/search.command.d.ts.map +1 -1
- package/dist/commands/search.command.js +136 -28
- package/dist/commands/self-config-xrefs.command.d.ts +24 -0
- package/dist/commands/self-config-xrefs.command.d.ts.map +1 -0
- package/dist/commands/self-config-xrefs.command.js +170 -0
- package/dist/commands/self-config.command.d.ts.map +1 -1
- package/dist/commands/self-config.command.js +261 -65
- package/dist/commands/smart-context.command.d.ts.map +1 -1
- package/dist/commands/smart-context.command.js +39 -3
- package/dist/commands/spec.command.d.ts.map +1 -1
- package/dist/commands/spec.command.js +3 -0
- package/dist/commands/stats.command.d.ts.map +1 -1
- package/dist/commands/stats.command.js +3 -0
- package/dist/commands/surface.command.d.ts +6 -1
- package/dist/commands/surface.command.d.ts.map +1 -1
- package/dist/commands/surface.command.js +256 -54
- package/dist/commands/task-context.command.js +1 -1
- package/dist/commands/task.command.d.ts.map +1 -1
- package/dist/commands/task.command.js +22 -1
- package/dist/commands/templates.command.d.ts +4 -0
- package/dist/commands/templates.command.d.ts.map +1 -1
- package/dist/commands/templates.command.js +109 -22
- package/dist/commands/test.command.d.ts.map +1 -1
- package/dist/commands/test.command.js +161 -33
- package/dist/commands/tests.command.d.ts.map +1 -1
- package/dist/commands/tests.command.js +29 -3
- package/dist/commands/trace.command.d.ts.map +1 -1
- package/dist/commands/trace.command.js +29 -4
- package/dist/commands/watch.command.d.ts.map +1 -1
- package/dist/commands/watch.command.js +3 -0
- package/dist/commands/why.command.d.ts.map +1 -1
- package/dist/commands/why.command.js +3 -0
- package/dist/commands/wiring.command.d.ts +18 -4
- package/dist/commands/wiring.command.d.ts.map +1 -1
- package/dist/commands/wiring.command.js +362 -74
- package/dist/dashboard/code-intelligence-data.js +4 -4
- package/dist/diff/deleted-orphan-coverage.d.ts +32 -0
- package/dist/diff/deleted-orphan-coverage.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-coverage.js +107 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts +23 -0
- package/dist/diff/deleted-orphan-scope-notes.d.ts.map +1 -0
- package/dist/diff/deleted-orphan-scope-notes.js +49 -0
- package/dist/diff/deleted-orphans.d.ts +32 -0
- package/dist/diff/deleted-orphans.d.ts.map +1 -1
- package/dist/diff/deleted-orphans.js +42 -2
- package/dist/dispatch/closest-match.d.ts +15 -0
- package/dist/dispatch/closest-match.d.ts.map +1 -0
- package/dist/dispatch/closest-match.js +47 -0
- package/dist/dispatch/global-flags.d.ts +94 -0
- package/dist/dispatch/global-flags.d.ts.map +1 -0
- package/dist/dispatch/global-flags.js +123 -0
- package/dist/dispatch/guard-invocation-input.d.ts +24 -0
- package/dist/dispatch/guard-invocation-input.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation-input.js +1 -0
- package/dist/dispatch/guard-invocation.d.ts +33 -0
- package/dist/dispatch/guard-invocation.d.ts.map +1 -0
- package/dist/dispatch/guard-invocation.js +183 -0
- package/dist/dispatch/help-intercept.d.ts +22 -0
- package/dist/dispatch/help-intercept.d.ts.map +1 -0
- package/dist/dispatch/help-intercept.js +42 -0
- package/dist/dispatch/i-declared-invocation.d.ts +17 -0
- package/dist/dispatch/i-declared-invocation.d.ts.map +1 -0
- package/dist/dispatch/i-declared-invocation.js +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts +28 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.d.ts.map +1 -0
- package/dist/dispatch/i-unknown-flag-refusal-input.js +1 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts +15 -0
- package/dist/dispatch/invocation-rejection-kind.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection-kind.js +15 -0
- package/dist/dispatch/invocation-rejection.d.ts +18 -0
- package/dist/dispatch/invocation-rejection.d.ts.map +1 -0
- package/dist/dispatch/invocation-rejection.js +1 -0
- package/dist/dispatch/judge-invocation.d.ts +24 -0
- package/dist/dispatch/judge-invocation.d.ts.map +1 -0
- package/dist/dispatch/judge-invocation.js +50 -0
- package/dist/dispatch/positional-mode.d.ts +18 -0
- package/dist/dispatch/positional-mode.d.ts.map +1 -0
- package/dist/dispatch/positional-mode.js +18 -0
- package/dist/dispatch/read-tracking-map.d.ts +28 -0
- package/dist/dispatch/read-tracking-map.d.ts.map +1 -0
- package/dist/dispatch/read-tracking-map.js +58 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts +30 -0
- package/dist/dispatch/refuse-sibling-valve-flags.d.ts.map +1 -0
- package/dist/dispatch/refuse-sibling-valve-flags.js +65 -0
- package/dist/dispatch/subverb-spec.d.ts +26 -0
- package/dist/dispatch/subverb-spec.d.ts.map +1 -0
- package/dist/dispatch/subverb-spec.js +1 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts +22 -0
- package/dist/dispatch/undocumented-flag-reads.d.ts.map +1 -0
- package/dist/dispatch/undocumented-flag-reads.js +283 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts +13 -0
- package/dist/dispatch/unknown-flag-refusal-mode.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal-mode.js +13 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts +22 -0
- package/dist/dispatch/unknown-flag-refusal.d.ts.map +1 -0
- package/dist/dispatch/unknown-flag-refusal.js +57 -0
- package/dist/dispatch/unread-flags.d.ts +152 -0
- package/dist/dispatch/unread-flags.d.ts.map +1 -0
- package/dist/dispatch/unread-flags.js +295 -0
- package/dist/dispatch/verdict-valve-flag.d.ts +21 -0
- package/dist/dispatch/verdict-valve-flag.d.ts.map +1 -0
- package/dist/dispatch/verdict-valve-flag.js +21 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts +14 -0
- package/dist/dispatch/walk-declared-subverbs.d.ts.map +1 -0
- package/dist/dispatch/walk-declared-subverbs.js +28 -0
- package/dist/exit-codes.d.ts +41 -3
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +153 -14
- package/dist/finish/run-finish.d.ts +72 -5
- package/dist/finish/run-finish.d.ts.map +1 -1
- package/dist/finish/run-finish.js +453 -104
- package/dist/gates/accepted-empty-note.d.ts +10 -0
- package/dist/gates/accepted-empty-note.d.ts.map +1 -0
- package/dist/gates/accepted-empty-note.js +11 -0
- package/dist/gates/allow-empty.d.ts +25 -0
- package/dist/gates/allow-empty.d.ts.map +1 -0
- package/dist/gates/allow-empty.js +27 -0
- package/dist/gates/asset-doctor-failing-units.d.ts +16 -0
- package/dist/gates/asset-doctor-failing-units.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failing-units.js +14 -0
- package/dist/gates/asset-doctor-failure-line.d.ts +16 -0
- package/dist/gates/asset-doctor-failure-line.d.ts.map +1 -0
- package/dist/gates/asset-doctor-failure-line.js +28 -0
- package/dist/gates/empty-rule-advice-lines.d.ts +15 -0
- package/dist/gates/empty-rule-advice-lines.d.ts.map +1 -0
- package/dist/gates/empty-rule-advice-lines.js +20 -0
- package/dist/gates/gate-envelope.d.ts +85 -8
- package/dist/gates/gate-envelope.d.ts.map +1 -1
- package/dist/gates/gate-envelope.js +56 -7
- package/dist/gates/gate-rule-globs.d.ts +67 -0
- package/dist/gates/gate-rule-globs.d.ts.map +1 -0
- package/dist/gates/gate-rule-globs.js +139 -0
- package/dist/gates/gate-rule-view.d.ts +25 -6
- package/dist/gates/gate-rule-view.d.ts.map +1 -1
- package/dist/gates/gate-rule-view.js +105 -77
- package/dist/gates/i-coverage-dead-glob.d.ts +19 -0
- package/dist/gates/i-coverage-dead-glob.d.ts.map +1 -0
- package/dist/gates/i-coverage-dead-glob.js +1 -0
- package/dist/gates/i-coverage-negation.d.ts +13 -0
- package/dist/gates/i-coverage-negation.d.ts.map +1 -0
- package/dist/gates/i-coverage-negation.js +1 -0
- package/dist/gates/i-registration-query-settle-input.d.ts +18 -0
- package/dist/gates/i-registration-query-settle-input.d.ts.map +1 -0
- package/dist/gates/i-registration-query-settle-input.js +1 -0
- package/dist/gates/i-unit-state-note-row.d.ts +16 -0
- package/dist/gates/i-unit-state-note-row.d.ts.map +1 -0
- package/dist/gates/i-unit-state-note-row.js +1 -0
- package/dist/gates/i-unit-state-notes.d.ts +32 -0
- package/dist/gates/i-unit-state-notes.d.ts.map +1 -0
- package/dist/gates/i-unit-state-notes.js +1 -0
- package/dist/gates/incomplete-registry-inventory.d.ts +19 -0
- package/dist/gates/incomplete-registry-inventory.d.ts.map +1 -0
- package/dist/gates/incomplete-registry-inventory.js +63 -0
- package/dist/gates/measure-registration-roles.d.ts +10 -0
- package/dist/gates/measure-registration-roles.d.ts.map +1 -0
- package/dist/gates/measure-registration-roles.js +9 -0
- package/dist/gates/plane-verdict.d.ts +14 -0
- package/dist/gates/plane-verdict.d.ts.map +1 -0
- package/dist/gates/plane-verdict.js +22 -0
- package/dist/gates/qualify-clean-for-units.d.ts +12 -0
- package/dist/gates/qualify-clean-for-units.d.ts.map +1 -0
- package/dist/gates/qualify-clean-for-units.js +18 -0
- package/dist/gates/registration-graph-verdict.d.ts +34 -0
- package/dist/gates/registration-graph-verdict.d.ts.map +1 -0
- package/dist/gates/registration-graph-verdict.js +70 -0
- package/dist/gates/registration-roles.d.ts +9 -0
- package/dist/gates/registration-roles.d.ts.map +1 -0
- package/dist/gates/registration-roles.js +1 -0
- package/dist/gates/registry-liveness.d.ts +11 -0
- package/dist/gates/registry-liveness.d.ts.map +1 -0
- package/dist/gates/registry-liveness.js +13 -0
- package/dist/gates/rule-coverage.d.ts +225 -4
- package/dist/gates/rule-coverage.d.ts.map +1 -1
- package/dist/gates/rule-coverage.js +610 -43
- package/dist/gates/run-gate-planes.d.ts +58 -0
- package/dist/gates/run-gate-planes.d.ts.map +1 -0
- package/dist/gates/run-gate-planes.js +403 -0
- package/dist/gates/scaffold-selftest.d.ts +56 -0
- package/dist/gates/scaffold-selftest.d.ts.map +1 -0
- package/dist/gates/scaffold-selftest.js +119 -0
- package/dist/gates/seam-rejected-rules.d.ts +28 -0
- package/dist/gates/seam-rejected-rules.d.ts.map +1 -0
- package/dist/gates/seam-rejected-rules.js +95 -0
- package/dist/gates/self-test-check.d.ts +29 -0
- package/dist/gates/self-test-check.d.ts.map +1 -0
- package/dist/gates/self-test-check.js +1 -0
- package/dist/gates/self-test-subject.d.ts +28 -0
- package/dist/gates/self-test-subject.d.ts.map +1 -0
- package/dist/gates/self-test-subject.js +1 -0
- package/dist/gates/self-test.d.ts +20 -0
- package/dist/gates/self-test.d.ts.map +1 -0
- package/dist/gates/self-test.js +82 -0
- package/dist/gates/settle-verdict.d.ts +14 -0
- package/dist/gates/settle-verdict.d.ts.map +1 -0
- package/dist/gates/settle-verdict.js +13 -0
- package/dist/gates/settled-verdict.d.ts +8 -0
- package/dist/gates/settled-verdict.d.ts.map +1 -0
- package/dist/gates/settled-verdict.js +1 -0
- package/dist/gates/template-registry-coverage.d.ts +18 -0
- package/dist/gates/template-registry-coverage.d.ts.map +1 -0
- package/dist/gates/template-registry-coverage.js +24 -0
- package/dist/gates/unit-state-notes.d.ts +40 -0
- package/dist/gates/unit-state-notes.d.ts.map +1 -0
- package/dist/gates/unit-state-notes.js +71 -0
- package/dist/gates/verdict-line.d.ts +18 -0
- package/dist/gates/verdict-line.d.ts.map +1 -0
- package/dist/gates/verdict-line.js +40 -0
- package/dist/graph/graph-reuse-lookup.d.ts +10 -0
- package/dist/graph/graph-reuse-lookup.d.ts.map +1 -0
- package/dist/graph/graph-reuse-lookup.js +41 -0
- package/dist/graph/index-behind-hint.d.ts +11 -0
- package/dist/graph/index-behind-hint.d.ts.map +1 -0
- package/dist/graph/index-behind-hint.js +27 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts +3 -0
- package/dist/knowledge/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts +10 -0
- package/dist/knowledge/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge/knowledge-stale-gate.js +9 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +204 -83
- package/dist/output/failure-hints.d.ts.map +1 -1
- package/dist/output/failure-hints.js +11 -9
- package/dist/output/rejected-entries-note.d.ts +57 -0
- package/dist/output/rejected-entries-note.d.ts.map +1 -0
- package/dist/output/rejected-entries-note.js +103 -0
- package/dist/output/stdout-is-pipe.d.ts +13 -0
- package/dist/output/stdout-is-pipe.d.ts.map +1 -0
- package/dist/output/stdout-is-pipe.js +21 -0
- package/dist/packs/stale-build-warning.d.ts +11 -0
- package/dist/packs/stale-build-warning.d.ts.map +1 -0
- package/dist/packs/stale-build-warning.js +23 -0
- package/dist/quality/run-quality.d.ts +123 -0
- package/dist/quality/run-quality.d.ts.map +1 -0
- package/dist/quality/run-quality.js +442 -0
- package/dist/schemas/json-schemas.d.ts +184 -3
- package/dist/schemas/json-schemas.d.ts.map +1 -1
- package/dist/schemas/json-schemas.js +113 -2
- package/dist/shrk.d.ts +3 -0
- package/dist/shrk.d.ts.map +1 -0
- package/dist/shrk.js +30 -0
- package/dist/surface/audience-applicability.d.ts +26 -0
- package/dist/surface/audience-applicability.d.ts.map +1 -0
- package/dist/surface/audience-applicability.js +60 -0
- package/dist/surface/catalog-command-safety.d.ts +18 -0
- package/dist/surface/catalog-command-safety.d.ts.map +1 -0
- package/dist/surface/catalog-command-safety.js +62 -0
- package/dist/surface/cli-command-resolver.d.ts +21 -0
- package/dist/surface/cli-command-resolver.d.ts.map +1 -0
- package/dist/surface/cli-command-resolver.js +87 -0
- package/dist/surface/command-dispatch-kind.d.ts +20 -0
- package/dist/surface/command-dispatch-kind.d.ts.map +1 -0
- package/dist/surface/command-dispatch-kind.js +20 -0
- package/dist/surface/command-index-entry.d.ts +40 -0
- package/dist/surface/command-index-entry.d.ts.map +1 -0
- package/dist/surface/command-index-entry.js +1 -0
- package/dist/surface/command-index.d.ts +77 -0
- package/dist/surface/command-index.d.ts.map +1 -0
- package/dist/surface/command-index.js +323 -0
- package/dist/surface/i-command-index.d.ts +22 -0
- package/dist/surface/i-command-index.d.ts.map +1 -0
- package/dist/surface/i-command-index.js +1 -0
- package/dist/surface/i-command-string-context.d.ts +20 -0
- package/dist/surface/i-command-string-context.d.ts.map +1 -0
- package/dist/surface/i-command-string-context.js +1 -0
- package/dist/surface/i-surface-denial.d.ts +13 -0
- package/dist/surface/i-surface-denial.d.ts.map +1 -0
- package/dist/surface/i-surface-denial.js +1 -0
- package/dist/surface/load-surface-context.d.ts +17 -1
- package/dist/surface/load-surface-context.d.ts.map +1 -1
- package/dist/surface/load-surface-context.js +48 -10
- package/dist/surface/not-enabled-error.d.ts +38 -4
- package/dist/surface/not-enabled-error.d.ts.map +1 -1
- package/dist/surface/not-enabled-error.js +96 -6
- package/dist/surface/profiles.d.ts +7 -0
- package/dist/surface/profiles.d.ts.map +1 -1
- package/dist/surface/resolve-command-string.d.ts +10 -0
- package/dist/surface/resolve-command-string.d.ts.map +1 -0
- package/dist/surface/resolve-command-string.js +572 -0
- package/dist/surface/surface-config-writer.d.ts +7 -2
- package/dist/surface/surface-config-writer.d.ts.map +1 -1
- package/dist/surface/surface-config-writer.js +25 -6
- package/dist/surface/surface-layer.d.ts +11 -0
- package/dist/surface/surface-layer.d.ts.map +1 -0
- package/dist/surface/surface-layer.js +11 -0
- package/dist/surface/surface-refusal-reason.d.ts +16 -0
- package/dist/surface/surface-refusal-reason.d.ts.map +1 -0
- package/dist/surface/surface-refusal-reason.js +16 -0
- package/dist/surface/surface-selector.d.ts +26 -0
- package/dist/surface/surface-selector.d.ts.map +1 -0
- package/dist/surface/surface-selector.js +42 -0
- package/dist/surface/surface-summary.d.ts +61 -18
- package/dist/surface/surface-summary.d.ts.map +1 -1
- package/dist/surface/surface-summary.js +147 -60
- package/dist/surface/tier.d.ts +85 -22
- package/dist/surface/tier.d.ts.map +1 -1
- package/dist/surface/tier.js +132 -30
- package/dist/usage/usage-log.d.ts +6 -1
- package/dist/usage/usage-log.d.ts.map +1 -1
- package/dist/usage/usage-log.js +7 -2
- package/dist/validation/run-validation-loop.d.ts +9 -0
- package/dist/validation/run-validation-loop.d.ts.map +1 -1
- package/dist/validation/run-validation-loop.js +14 -11
- package/dist/validation/typecheck-emitted.d.ts +8 -9
- package/dist/validation/typecheck-emitted.d.ts.map +1 -1
- package/dist/validation/typecheck-emitted.js +17 -97
- package/package.json +34 -34
|
@@ -11,6 +11,7 @@ import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
|
11
11
|
import * as nodePath from 'node:path';
|
|
12
12
|
import { buildPrSummary, inspectSharkcraft, } from '@shrkcrft/inspector';
|
|
13
13
|
import { flagBool, flagNumber, flagString, flagList, resolveCwd, } from "../command-registry.js";
|
|
14
|
+
import { PositionalMode } from "../dispatch/positional-mode.js";
|
|
14
15
|
import { asJson } from "../output/format-output.js";
|
|
15
16
|
async function runPrSummary(args) {
|
|
16
17
|
const cwd = resolveCwd(args);
|
|
@@ -117,6 +118,19 @@ function writeOutputFile(cwd, file, body) {
|
|
|
117
118
|
}
|
|
118
119
|
export const prCommand = {
|
|
119
120
|
name: 'pr',
|
|
121
|
+
positionals: PositionalMode.None,
|
|
122
|
+
subverbs: [
|
|
123
|
+
{
|
|
124
|
+
name: 'summary',
|
|
125
|
+
description: 'The PR summary (the default).',
|
|
126
|
+
usage: 'shrk pr summary [--since <ref>|--staged|--files a,b,c] [--max-items N] [--format markdown|json] [--output <file>] [--include-raw-links]',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'description',
|
|
130
|
+
description: 'The PR description (the same generator).',
|
|
131
|
+
usage: 'shrk pr description [--since <ref>|--staged|--files a,b,c] [--max-items N] [--format markdown|json] [--output <file>] [--include-raw-links]',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
120
134
|
description: 'PR summary / description generator. Consumes `shrk changes summary` + .sharkcraft/reports/*. Read-only by default. Write only when --output is passed.',
|
|
121
135
|
usage: 'shrk pr <summary|description> [--since <ref>|--staged|--files a,b,c] [--max-items N] [--format markdown|json] [--output <file>] [--include-raw-links]',
|
|
122
136
|
async run(args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.command.d.ts","sourceRoot":"","sources":["../../src/commands/presets.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presets.command.d.ts","sourceRoot":"","sources":["../../src/commands/presets.command.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAgChC,eAAO,MAAM,kBAAkB,EAAE,eAqChC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAoF/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAqFnC,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,eA4CrC,CAAC;AA2BF,eAAO,MAAM,qBAAqB,EAAE,eAmDnC,CAAC;AAiBF,eAAO,MAAM,mBAAmB,EAAE,eAoEjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eA+DlC,CAAC;AAmCF,eAAO,MAAM,kBAAkB,EAAE,eAgFhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAiDjC,CAAC;AAIF,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as nodePath from 'node:path';
|
|
2
|
-
import { inspectSharkcraft, inspectionReferenceLookup } from '@shrkcrft/inspector';
|
|
2
|
+
import { ContributionKind, inspectSharkcraft, inspectionReferenceLookup } from '@shrkcrft/inspector';
|
|
3
3
|
import { applyPresetPlan, previewResolvedPresetApplication, recommendPresets, resolvePreset, resolvePresetReferences, } from '@shrkcrft/presets';
|
|
4
|
+
import { describeWorkspaceProfile } from '@shrkcrft/workspace';
|
|
4
5
|
import { flagBool, resolveCwd, } from "../command-registry.js";
|
|
5
6
|
import { asJson, header, kv } from "../output/format-output.js";
|
|
7
|
+
import { writeRejectedEntriesNote } from "../output/rejected-entries-note.js";
|
|
6
8
|
function compact(p) {
|
|
7
9
|
return {
|
|
8
10
|
id: p.id,
|
|
@@ -36,11 +38,15 @@ export const presetsListCommand = {
|
|
|
36
38
|
async run(args) {
|
|
37
39
|
const inspection = await inspectSharkcraft({ cwd: resolveCwd(args) });
|
|
38
40
|
const presets = inspection.presetRegistry.list();
|
|
41
|
+
// A preset its loader refused is named with every failing field (round
|
|
42
|
+
// 12, 12.1) — it was a `skipping invalid preset (…)` warning string.
|
|
43
|
+
const note = { next: 'shrk packs contributions' };
|
|
39
44
|
if (flagBool(args, 'json')) {
|
|
40
45
|
process.stdout.write(asJson(presets.map((p) => ({
|
|
41
46
|
...compact(p),
|
|
42
47
|
source: inspection.presetSources.get(p.id) ?? null,
|
|
43
48
|
}))) + '\n');
|
|
49
|
+
await writeRejectedEntriesNote(inspection, [ContributionKind.Preset], { ...note, json: true });
|
|
44
50
|
return 0;
|
|
45
51
|
}
|
|
46
52
|
process.stdout.write(header(`Presets (${presets.length})`));
|
|
@@ -52,6 +58,7 @@ export const presetsListCommand = {
|
|
|
52
58
|
process.stdout.write(` tags=[${p.tags.join(', ')}]\n`);
|
|
53
59
|
}
|
|
54
60
|
}
|
|
61
|
+
await writeRejectedEntriesNote(inspection, [ContributionKind.Preset], note);
|
|
55
62
|
return 0;
|
|
56
63
|
},
|
|
57
64
|
};
|
|
@@ -216,32 +223,10 @@ export const presetsExplainCommand = {
|
|
|
216
223
|
},
|
|
217
224
|
};
|
|
218
225
|
function humanizeProfile(profile) {
|
|
219
|
-
//
|
|
220
|
-
//
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
'has-typescript': 'uses TypeScript',
|
|
224
|
-
'has-bun': 'uses Bun',
|
|
225
|
-
'has-nx': 'is an Nx workspace',
|
|
226
|
-
'has-turborepo': 'is a Turborepo workspace',
|
|
227
|
-
'has-package-workspaces': 'uses package workspaces (npm/pnpm/yarn)',
|
|
228
|
-
'has-react': 'uses React',
|
|
229
|
-
'has-next': 'uses Next.js',
|
|
230
|
-
'has-angular': 'uses Angular',
|
|
231
|
-
'has-vue': 'uses Vue',
|
|
232
|
-
'has-nestjs': 'uses NestJS',
|
|
233
|
-
'has-mcp-sdk': 'depends on the MCP SDK',
|
|
234
|
-
'has-tests': 'has a test runner',
|
|
235
|
-
'has-eslint': 'uses ESLint',
|
|
236
|
-
'has-biome': 'uses Biome',
|
|
237
|
-
'has-github-actions': 'has GitHub Actions',
|
|
238
|
-
'is-library': 'is published as a library',
|
|
239
|
-
'is-service': 'runs as a service',
|
|
240
|
-
'is-monorepo': 'is a monorepo',
|
|
241
|
-
'is-frontend': 'is a frontend',
|
|
242
|
-
'is-backend': 'is a backend',
|
|
243
|
-
};
|
|
244
|
-
return map[profile] ?? profile;
|
|
226
|
+
// THE WorkspaceProfile label table (@shrkcrft/workspace) — the builtin
|
|
227
|
+
// `workspace` profile kind renders the same clause. Unknown ids fall
|
|
228
|
+
// through verbatim.
|
|
229
|
+
return describeWorkspaceProfile(profile);
|
|
245
230
|
}
|
|
246
231
|
export const presetsRecommendCommand = {
|
|
247
232
|
name: 'recommend',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.command.d.ts","sourceRoot":"","sources":["../../src/commands/profiles.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profiles.command.d.ts","sourceRoot":"","sources":["../../src/commands/profiles.command.ts"],"names":[],"mappings":"AAkBA,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAyChC,eAAO,MAAM,mBAAmB,EAAE,eA+BjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eA2ChC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAsBnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAgCnC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAiC7B,CAAC"}
|
|
@@ -1,59 +1,102 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `shrk profiles ...` — unified read-only surface for
|
|
3
|
-
*
|
|
2
|
+
* `shrk profiles ...` — unified read-only surface for every profile kind: the
|
|
3
|
+
* builtin `workspace` vocabulary (WorkspaceProfile ids, with this repo's
|
|
4
|
+
* detection) and pack-/local-contributed `migration` profiles.
|
|
4
5
|
*/
|
|
5
|
-
import { findProfile, inspectSharkcraft, listProfileIssues, listProfiles, ProfileKind, } from '@shrkcrft/inspector';
|
|
6
|
-
import { flagBool,
|
|
6
|
+
import { ContributionKind, findProfile, formatReferenceKindDeclaration, inspectSharkcraft, isProfileKind, listProfileIssues, listProfiles, nearestIds, PROFILE_KIND_REFERENCE_KIND, ProfileKind, } from '@shrkcrft/inspector';
|
|
7
|
+
import { flagBool, resolveCwd, } from "../command-registry.js";
|
|
8
|
+
import { PositionalMode } from "../dispatch/positional-mode.js";
|
|
9
|
+
import { usageExitFor } from "../exit-codes.js";
|
|
7
10
|
import { asJson, header } from "../output/format-output.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
import { writeRejectedEntriesNote } from "../output/rejected-entries-note.js";
|
|
12
|
+
/** Every profile kind, in enum order — what `--kind` accepts. */
|
|
13
|
+
const KNOWN_KINDS = Object.values(ProfileKind).join(', ');
|
|
14
|
+
/**
|
|
15
|
+
* Parse `--kind`. An unknown (or valueless) kind is a usage error naming the
|
|
16
|
+
* known kinds — it used to be dropped silently, so `--kind bogus` listed every
|
|
17
|
+
* kind and a typo read as "no filter". Exit per THE usage split
|
|
18
|
+
* (`usageExitFor`: 2 on this non-verdict verb).
|
|
19
|
+
*/
|
|
20
|
+
function parseKind(args, commandPath) {
|
|
21
|
+
if (!args.flags.has('kind'))
|
|
22
|
+
return {};
|
|
23
|
+
const raw = args.flags.get('kind');
|
|
24
|
+
if (typeof raw === 'string' && isProfileKind(raw))
|
|
25
|
+
return { kind: raw };
|
|
26
|
+
process.stderr.write(`unknown --kind ${typeof raw === 'string' ? `"${raw}"` : '(no value)'} — known: ${KNOWN_KINDS}\n`);
|
|
27
|
+
return { exit: usageExitFor(commandPath) };
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The empty state, from THE declaration table — so it can only name paths
|
|
31
|
+
* that really fill the kind (it used to say "contribute via packs:
|
|
32
|
+
* migrationProfileFiles, etc.", where "etc." named nothing and the local path
|
|
33
|
+
* went unmentioned).
|
|
34
|
+
*/
|
|
35
|
+
function emptyState(kind) {
|
|
36
|
+
if (!kind)
|
|
37
|
+
return ' (none)\n';
|
|
38
|
+
return ` (none — ${kind} profiles are declared via: ${formatReferenceKindDeclaration(PROFILE_KIND_REFERENCE_KIND[kind])})\n`;
|
|
39
|
+
}
|
|
40
|
+
function sourceLabel(e) {
|
|
41
|
+
const src = e.source === 'pack' ? `pack:${e.packageName ?? '?'}` : e.source;
|
|
42
|
+
return e.detected === true ? `${src} · detected` : src;
|
|
15
43
|
}
|
|
16
44
|
export const profilesListCommand = {
|
|
17
45
|
name: 'list',
|
|
18
|
-
description: 'List all registered profiles (
|
|
19
|
-
usage: 'shrk profiles list [--kind
|
|
46
|
+
description: 'List all registered profiles (workspace, migration).',
|
|
47
|
+
usage: 'shrk profiles list [--kind workspace|migration] [--json]',
|
|
20
48
|
async run(args) {
|
|
49
|
+
const parsed = parseKind(args, 'profiles list');
|
|
50
|
+
if (parsed.exit !== undefined)
|
|
51
|
+
return parsed.exit;
|
|
52
|
+
const { kind } = parsed;
|
|
21
53
|
const cwd = resolveCwd(args);
|
|
22
54
|
const inspection = await inspectSharkcraft({ cwd });
|
|
23
|
-
const kind = parseKind(flagString(args, 'kind'));
|
|
24
55
|
const entries = await listProfiles(inspection, kind ? { kind } : {});
|
|
56
|
+
// Only migration profiles are contributed (the workspace kind is builtin):
|
|
57
|
+
// one its loader refused is named (round 12, 12.1) — it read "Invalid
|
|
58
|
+
// migration profile at <file>; skipped." with no id, on `profiles doctor` only.
|
|
59
|
+
const migration = !kind || kind === ProfileKind.Migration;
|
|
60
|
+
const note = { next: 'shrk profiles doctor' };
|
|
25
61
|
if (flagBool(args, 'json')) {
|
|
26
62
|
process.stdout.write(asJson(entries) + '\n');
|
|
63
|
+
if (migration) {
|
|
64
|
+
await writeRejectedEntriesNote(inspection, [ContributionKind.MigrationProfile], { ...note, json: true });
|
|
65
|
+
}
|
|
27
66
|
return 0;
|
|
28
67
|
}
|
|
29
68
|
process.stdout.write(header(`Profiles (${entries.length}${kind ? `, kind=${kind}` : ''})`));
|
|
30
|
-
if (entries.length === 0)
|
|
31
|
-
process.stdout.write(
|
|
32
|
-
return 0;
|
|
33
|
-
}
|
|
69
|
+
if (entries.length === 0)
|
|
70
|
+
process.stdout.write(emptyState(kind));
|
|
34
71
|
for (const e of entries) {
|
|
35
|
-
|
|
36
|
-
process.stdout.write(` • ${e.kind.padEnd(18)} ${e.id.padEnd(24)} ${e.title} [${src}]\n`);
|
|
72
|
+
process.stdout.write(` • ${e.kind.padEnd(18)} ${e.id.padEnd(24)} ${e.title} [${sourceLabel(e)}]\n`);
|
|
37
73
|
}
|
|
74
|
+
if (migration)
|
|
75
|
+
await writeRejectedEntriesNote(inspection, [ContributionKind.MigrationProfile], note);
|
|
38
76
|
return 0;
|
|
39
77
|
},
|
|
40
78
|
};
|
|
41
79
|
export const profilesGetCommand = {
|
|
42
80
|
name: 'get',
|
|
43
81
|
description: 'Show one profile by id (and optional --kind).',
|
|
44
|
-
usage: 'shrk profiles get <id> [--kind
|
|
82
|
+
usage: 'shrk profiles get <id> [--kind workspace|migration] [--json]',
|
|
45
83
|
async run(args) {
|
|
46
84
|
const id = args.positional[0];
|
|
47
85
|
if (!id) {
|
|
48
86
|
process.stderr.write('Usage: shrk profiles get <id>\n');
|
|
49
87
|
return 2;
|
|
50
88
|
}
|
|
89
|
+
const parsed = parseKind(args, 'profiles get');
|
|
90
|
+
if (parsed.exit !== undefined)
|
|
91
|
+
return parsed.exit;
|
|
92
|
+
const { kind } = parsed;
|
|
51
93
|
const cwd = resolveCwd(args);
|
|
52
94
|
const inspection = await inspectSharkcraft({ cwd });
|
|
53
|
-
const kind = parseKind(flagString(args, 'kind'));
|
|
54
95
|
const entry = await findProfile(inspection, id, kind);
|
|
55
96
|
if (!entry) {
|
|
56
|
-
|
|
97
|
+
const pool = (await listProfiles(inspection, kind ? { kind } : {})).map((e) => e.id);
|
|
98
|
+
const near = nearestIds(id, pool, 3).map((n) => n.id);
|
|
99
|
+
process.stderr.write(`Unknown profile "${id}"${kind ? ` (kind=${kind})` : ''}.${near.length > 0 ? ` Did you mean: ${near.join(', ')}?` : ''}\n`);
|
|
57
100
|
return 2;
|
|
58
101
|
}
|
|
59
102
|
if (flagBool(args, 'json')) {
|
|
@@ -65,6 +108,10 @@ export const profilesGetCommand = {
|
|
|
65
108
|
if (entry.description)
|
|
66
109
|
process.stdout.write(` description ${entry.description}\n`);
|
|
67
110
|
process.stdout.write(` source ${entry.source}${entry.packageName ? ' (' + entry.packageName + ')' : ''}\n`);
|
|
111
|
+
if (entry.detected !== undefined) {
|
|
112
|
+
const reason = entry.payload?.reason;
|
|
113
|
+
process.stdout.write(` detected ${entry.detected ? `yes${reason ? ` — ${reason}` : ''}` : 'no (not detected in this repo)'}\n`);
|
|
114
|
+
}
|
|
68
115
|
if (entry.sourceFile)
|
|
69
116
|
process.stdout.write(` sourceFile ${entry.sourceFile}\n`);
|
|
70
117
|
if (entry.tags && entry.tags.length > 0)
|
|
@@ -101,16 +148,19 @@ export const profilesDoctorCommand = {
|
|
|
101
148
|
export const profilesSearchCommand = {
|
|
102
149
|
name: 'search',
|
|
103
150
|
description: 'Search registered profiles by free-text token across id / title / tags.',
|
|
104
|
-
usage: 'shrk profiles search <query> [--kind
|
|
151
|
+
usage: 'shrk profiles search <query> [--kind workspace|migration] [--json]',
|
|
105
152
|
async run(args) {
|
|
106
153
|
const query = args.positional[0];
|
|
107
154
|
if (!query) {
|
|
108
155
|
process.stderr.write('Usage: shrk profiles search <query>\n');
|
|
109
156
|
return 2;
|
|
110
157
|
}
|
|
158
|
+
const parsed = parseKind(args, 'profiles search');
|
|
159
|
+
if (parsed.exit !== undefined)
|
|
160
|
+
return parsed.exit;
|
|
161
|
+
const { kind } = parsed;
|
|
111
162
|
const cwd = resolveCwd(args);
|
|
112
163
|
const inspection = await inspectSharkcraft({ cwd });
|
|
113
|
-
const kind = parseKind(flagString(args, 'kind'));
|
|
114
164
|
const all = await listProfiles(inspection, kind ? { kind } : {});
|
|
115
165
|
const q = query.toLowerCase();
|
|
116
166
|
const matches = all.filter((e) => {
|
|
@@ -132,8 +182,26 @@ export const profilesSearchCommand = {
|
|
|
132
182
|
};
|
|
133
183
|
export const profilesCommand = {
|
|
134
184
|
name: 'profiles',
|
|
135
|
-
description: 'List / inspect
|
|
185
|
+
description: 'List / inspect profiles: the builtin workspace vocabulary (WorkspaceProfile ids, with detection) and migration profiles.',
|
|
136
186
|
usage: 'shrk profiles list|get|doctor|search ...',
|
|
187
|
+
booleanFlags: new Set(['json']),
|
|
188
|
+
positionals: PositionalMode.None,
|
|
189
|
+
subverbs: [
|
|
190
|
+
{ name: 'list', description: profilesListCommand.description, usage: profilesListCommand.usage },
|
|
191
|
+
{
|
|
192
|
+
name: 'get',
|
|
193
|
+
description: profilesGetCommand.description,
|
|
194
|
+
usage: profilesGetCommand.usage,
|
|
195
|
+
positionals: PositionalMode.Free,
|
|
196
|
+
},
|
|
197
|
+
{ name: 'doctor', description: profilesDoctorCommand.description, usage: profilesDoctorCommand.usage },
|
|
198
|
+
{
|
|
199
|
+
name: 'search',
|
|
200
|
+
description: profilesSearchCommand.description,
|
|
201
|
+
usage: profilesSearchCommand.usage,
|
|
202
|
+
positionals: PositionalMode.Free,
|
|
203
|
+
},
|
|
204
|
+
],
|
|
137
205
|
async run(args) {
|
|
138
206
|
const sub = args.positional[0];
|
|
139
207
|
args.positional = args.positional.slice(1);
|
|
@@ -31,7 +31,7 @@ export const provenanceListCommand = {
|
|
|
31
31
|
}
|
|
32
32
|
process.stdout.write(header(`Provenance entries (${entries.length})`));
|
|
33
33
|
if (entries.length === 0) {
|
|
34
|
-
process.stdout.write(' (ledger is empty — run a `shrk knowledge
|
|
34
|
+
process.stdout.write(' (ledger is empty — run a `shrk knowledge add --id <id> --write-preview` to start it)\n');
|
|
35
35
|
return 0;
|
|
36
36
|
}
|
|
37
37
|
for (const e of entries) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quality.command.d.ts","sourceRoot":"","sources":["../../src/commands/quality.command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"quality.command.d.ts","sourceRoot":"","sources":["../../src/commands/quality.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AA2ChC,eAAO,MAAM,cAAc,EAAE,eA+I5B,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,18 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inspectSharkcraft, } from '@shrkcrft/inspector';
|
|
2
2
|
import { flagBool, flagNumber, resolveCwd, } from "../command-registry.js";
|
|
3
|
+
import { GLOBAL_FLAGS } from "../dispatch/global-flags.js";
|
|
4
|
+
import { PositionalMode } from "../dispatch/positional-mode.js";
|
|
5
|
+
import { ExitCode } from "../exit-codes.js";
|
|
6
|
+
import { runQuality } from "../quality/run-quality.js";
|
|
7
|
+
import { verdictLine } from "../gates/verdict-line.js";
|
|
3
8
|
import { asJson, header, kv } from "../output/format-output.js";
|
|
9
|
+
import { narrowToScope, prepare, resolveScope } from "./gates.command.js";
|
|
4
10
|
// `quality baseline {create|compare|update|show|diff|prune|history}`
|
|
5
11
|
// removed. The baseline machinery was hidden / unused; `doctor` and
|
|
6
12
|
// `drift` cover the actionable cases.
|
|
13
|
+
/** Flags `quality` accepts; anything else is a typo, not an opt-in. */
|
|
14
|
+
const QUALITY_FLAGS = new Set([
|
|
15
|
+
'strict',
|
|
16
|
+
'ci',
|
|
17
|
+
'json',
|
|
18
|
+
'min-readiness',
|
|
19
|
+
'require-boundary-clean',
|
|
20
|
+
'require-drift-clean',
|
|
21
|
+
'require-agent-tests',
|
|
22
|
+
'require-context-tests',
|
|
23
|
+
'require-pack-signatures',
|
|
24
|
+
'changed-only',
|
|
25
|
+
'since',
|
|
26
|
+
'base',
|
|
27
|
+
'fail-fast',
|
|
28
|
+
'no-color',
|
|
29
|
+
'color',
|
|
30
|
+
// Every dispatcher global (THE list). Quality is a verdict verb, so its piped
|
|
31
|
+
// non-zero exit prints a note naming `--no-hints` as the way to silence it —
|
|
32
|
+
// rejecting that very flag with exit 3 would make the advice unfollowable.
|
|
33
|
+
...GLOBAL_FLAGS,
|
|
34
|
+
]);
|
|
35
|
+
const STATUS_TAG = Object.freeze({
|
|
36
|
+
passed: 'OK ',
|
|
37
|
+
failed: 'FAIL ',
|
|
38
|
+
skipped: 'SKIP ',
|
|
39
|
+
error: 'ERROR',
|
|
40
|
+
});
|
|
7
41
|
export const qualityCommand = {
|
|
8
42
|
name: 'quality',
|
|
9
|
-
description: '
|
|
10
|
-
usage: 'shrk [--cwd <dir>] quality [--strict] [--ci] [--min-readiness <n>] [--require-boundary-clean] [--require-drift-clean] [--require-agent-tests] [--require-context-tests] [--require-pack-signatures] [--json]',
|
|
43
|
+
description: 'THE "before you push" command: runs every configured gate — doctor / readiness / boundaries / coverage / drift / context+agent tests / packs doctor AND all seven data-defined rule planes — to completion, reporting EVERY failure with the command that reproduces it. Exhaustive by default so N independent failures cost one local run instead of N CI round-trips; `--fail-fast` opts into stop-at-first.',
|
|
44
|
+
usage: 'shrk [--cwd <dir>] quality [--changed-only | --since <ref>] [--fail-fast] [--strict] [--ci] [--min-readiness <n>] [--require-boundary-clean] [--require-drift-clean] [--require-agent-tests] [--require-context-tests] [--require-pack-signatures] [--json]',
|
|
45
|
+
booleanFlags: new Set([
|
|
46
|
+
'strict',
|
|
47
|
+
'ci',
|
|
48
|
+
'json',
|
|
49
|
+
'changed-only',
|
|
50
|
+
'fail-fast',
|
|
51
|
+
'require-boundary-clean',
|
|
52
|
+
'require-drift-clean',
|
|
53
|
+
'require-agent-tests',
|
|
54
|
+
'require-context-tests',
|
|
55
|
+
'require-pack-signatures',
|
|
56
|
+
]),
|
|
57
|
+
// THE accepted set: the dispatcher refuses any other flag BEFORE `run` (a
|
|
58
|
+
// mistyped `--changed-only` would otherwise run the UNSCOPED form and exit 0
|
|
59
|
+
// as though the scoped check had passed). Round 11 moved this out of an
|
|
60
|
+
// inline guard here, so exactly one checker (`firstUnknownFlag`) judges it.
|
|
61
|
+
flags: QUALITY_FLAGS,
|
|
62
|
+
// Flag-driven: a bare token used to be ignored and the whole gate run.
|
|
63
|
+
positionals: PositionalMode.None,
|
|
11
64
|
async run(args) {
|
|
12
65
|
const cwd = resolveCwd(args);
|
|
13
66
|
const strict = flagBool(args, 'strict');
|
|
14
67
|
const ci = flagBool(args, 'ci');
|
|
15
68
|
const wantJson = flagBool(args, 'json') || ci;
|
|
69
|
+
const failFast = flagBool(args, 'fail-fast');
|
|
16
70
|
const inspection = await inspectSharkcraft({
|
|
17
71
|
cwd,
|
|
18
72
|
...(flagBool(args, 'require-pack-signatures') ? { verifyPackSignatures: true } : {}),
|
|
@@ -29,41 +83,83 @@ export const qualityCommand = {
|
|
|
29
83
|
...(flagBool(args, 'require-context-tests') ? { requireContextTests: true } : {}),
|
|
30
84
|
...(flagBool(args, 'require-pack-signatures') ? { requirePackSignatures: true } : {}),
|
|
31
85
|
};
|
|
32
|
-
|
|
86
|
+
// The data-defined planes come through the SAME preparation `gates check`
|
|
87
|
+
// uses — a second copy of the config load + scope narrowing would
|
|
88
|
+
// eventually disagree with it, and the aggregate wired into pre-push is
|
|
89
|
+
// the copy nobody notices is wrong.
|
|
90
|
+
const prep = await prepare(args);
|
|
91
|
+
const scope = resolveScope(args, cwd);
|
|
92
|
+
if (scope.error) {
|
|
93
|
+
process.stderr.write(`Cannot scope to the changeset: ${scope.error}\n`);
|
|
94
|
+
return ExitCode.UsageError;
|
|
95
|
+
}
|
|
96
|
+
const allRules = prep.ok ? prep.value.rules : [];
|
|
97
|
+
const { selected } = narrowToScope(allRules, scope.files);
|
|
98
|
+
const outOfScope = allRules.filter((r) => !selected.includes(r));
|
|
99
|
+
const run = await runQuality({
|
|
100
|
+
inspection,
|
|
101
|
+
config,
|
|
102
|
+
strict,
|
|
103
|
+
failFast,
|
|
104
|
+
cwd,
|
|
105
|
+
gateRules: selected,
|
|
106
|
+
excludeDirs: prep.ok ? prep.value.excludeDirs : [],
|
|
107
|
+
...(scope.files ? { changedFiles: scope.files } : {}),
|
|
108
|
+
skippedByScope: outOfScope,
|
|
109
|
+
...(prep.ok ? { planeDiagnostics: prep.value.planeDiagnostics, rejectedRules: prep.value.rejectedRules } : {}),
|
|
110
|
+
});
|
|
111
|
+
// 0 clean · 1 a blocking gate failed · 2 ran but proved nothing (a gate
|
|
112
|
+
// errored, a required gate examined nothing, or a rule passed over part of
|
|
113
|
+
// its scope). Settled by the one coverage guard inside `runQuality`, so a
|
|
114
|
+
// skip nobody asked for is never masked by a passing sibling.
|
|
115
|
+
const exit = run.exit;
|
|
33
116
|
if (wantJson) {
|
|
34
|
-
process.stdout.write(asJson(
|
|
35
|
-
return
|
|
117
|
+
process.stdout.write(asJson({ ...run, exitCode: exit }) + '\n');
|
|
118
|
+
return exit;
|
|
36
119
|
}
|
|
37
|
-
process.stdout.write(header('SharkCraft quality gate'));
|
|
38
|
-
process.stdout.write(kv('
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
: g.blocking
|
|
48
|
-
? 'BLOCK'
|
|
49
|
-
: 'WARN ';
|
|
50
|
-
process.stdout.write(` ${tag} ${g.label}\n`);
|
|
51
|
-
for (const n of g.notes)
|
|
52
|
-
process.stdout.write(` ↳ ${n}\n`);
|
|
120
|
+
process.stdout.write(header('SharkCraft quality — every gate'));
|
|
121
|
+
process.stdout.write(kv('summary', `${run.passed} passed / ${run.failed + run.failedWarnings} failed` +
|
|
122
|
+
(run.failedWarnings > 0 ? ` (${run.failed} blocking, ${run.failedWarnings} advisory)` : '') +
|
|
123
|
+
` / ${run.skipped} skipped` +
|
|
124
|
+
(run.errored > 0 ? ` / ${run.errored} could not run` : '')) + '\n');
|
|
125
|
+
if (run.scopedFiles !== undefined) {
|
|
126
|
+
process.stdout.write(kv('scope', `changed-only (${run.scopedFiles} file(s))`) + '\n');
|
|
127
|
+
}
|
|
128
|
+
if (run.failFast) {
|
|
129
|
+
process.stdout.write(kv('mode', '--fail-fast — stopped at the first blocking failure') + '\n');
|
|
53
130
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for
|
|
58
|
-
|
|
131
|
+
process.stdout.write('\n');
|
|
132
|
+
for (const item of run.items) {
|
|
133
|
+
// A gate that passed over PART of its scope is not "SKIP" (it ran); it
|
|
134
|
+
// is labelled for what it is. Its status stays `skipped` (accidental),
|
|
135
|
+
// so the verdict is unchanged: never a pass.
|
|
136
|
+
process.stdout.write(` ${item.partial === true ? 'PART ' : STATUS_TAG[item.status]} ${item.label}\n`);
|
|
137
|
+
for (const n of item.notes)
|
|
138
|
+
process.stdout.write(` ↳ ${n}\n`);
|
|
139
|
+
// Every failure carries the command that reproduces it alone — the whole
|
|
140
|
+
// point of the aggregate is that the next step never needs re-derivation.
|
|
141
|
+
if (item.status === 'failed' || item.status === 'error') {
|
|
142
|
+
process.stdout.write(` $ ${item.repro}\n`);
|
|
59
143
|
}
|
|
60
144
|
}
|
|
61
|
-
if (
|
|
62
|
-
process.stdout.write('\
|
|
63
|
-
for (const
|
|
64
|
-
process.stdout.write(` • ${
|
|
145
|
+
if (run.diagnostics.length > 0) {
|
|
146
|
+
process.stdout.write('\nDiagnostics:\n');
|
|
147
|
+
for (const d of run.diagnostics)
|
|
148
|
+
process.stdout.write(` • ${d}\n`);
|
|
149
|
+
}
|
|
150
|
+
process.stdout.write(`\nVerdict: ${run.verdict.toUpperCase()} (exit ${exit})\n`);
|
|
151
|
+
if (run.verdict === 'pass' && run.failedWarnings > 0) {
|
|
152
|
+
process.stdout.write(` ${run.failedWarnings} advisory gate(s) failed without blocking — re-run with --strict to make them block.\n`);
|
|
153
|
+
}
|
|
154
|
+
if (run.verdict === 'not-verified') {
|
|
155
|
+
process.stdout.write(' Nothing failed, but not everything was measured — an unmeasured gate is not a pass.\n');
|
|
156
|
+
}
|
|
157
|
+
// Which gates went unexamined, from the settled verdict itself.
|
|
158
|
+
if (exit !== ExitCode.VerifiedPass) {
|
|
159
|
+
const line = verdictLine(run, '');
|
|
160
|
+
if (line)
|
|
161
|
+
process.stdout.write(` ${line}\n`);
|
|
65
162
|
}
|
|
66
|
-
|
|
67
|
-
return report.overall === 'fail' ? 1 : 0;
|
|
163
|
+
return exit;
|
|
68
164
|
},
|
|
69
165
|
};
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import { type ICommandHandler } from '../command-registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* `shrk recommend` renders THE ranked list (`rankRecommendationCandidates`,
|
|
4
|
+
* inspector). It used to re-rank it: a CLI-only grounding prepend, a
|
|
5
|
+
* routing-hint "R1" promotion gated on create/build wording, and a separate
|
|
6
|
+
* "engine match" block — three code paths answering "what do I run first?",
|
|
7
|
+
* each with its own thresholds, none reachable from MCP or `shrk context`.
|
|
8
|
+
* Now every row, its attribution, `nextCommand`, the confidence and the
|
|
9
|
+
* coverage-gap verdict come from the one list; the CLI only gates rows by
|
|
10
|
+
* surface tier and re-picks `nextCommand` over what it renders, by THE rule.
|
|
11
|
+
*/
|
|
2
12
|
export declare const recommendCommand: ICommandHandler;
|
|
3
13
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
14
|
+
* DX#2 — does the query read like planning (a planning verb leading the query
|
|
15
|
+
* or in slots 1–3)? A thin wrapper over THE query-intent classifier
|
|
16
|
+
* (`classifyQueryIntent`, inspector), kept for its callers; the planning verb
|
|
17
|
+
* set lives there now.
|
|
7
18
|
*/
|
|
8
|
-
export declare function looksLikeCreateBuild(query: string): boolean;
|
|
9
19
|
export declare function looksLikePlanning(query: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Does the query read like create/build work? A thin wrapper over THE
|
|
22
|
+
* query-intent classifier — which now also refuses a create word used as a
|
|
23
|
+
* noun or adjective in a repair query ("fix the broken build").
|
|
24
|
+
*/
|
|
25
|
+
export declare function looksLikeCreateBuild(query: string): boolean;
|
|
10
26
|
//# sourceMappingURL=recommend.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommend.command.d.ts","sourceRoot":"","sources":["../../src/commands/recommend.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recommend.command.d.ts","sourceRoot":"","sources":["../../src/commands/recommend.command.ts"],"names":[],"mappings":"AAmBA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAQhC;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,eA6K9B,CAAC;AAwGF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE3D"}
|