@shrkcrft/inspector 0.1.0-alpha.30 → 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/acceptance-replay.js +1 -1
- package/dist/agent-contract-templates.js +6 -6
- package/dist/agent-contract.d.ts.map +1 -1
- package/dist/agent-contract.js +13 -8
- package/dist/agent-orchestration.js +2 -2
- package/dist/agent-task-prep.d.ts +16 -0
- package/dist/agent-task-prep.d.ts.map +1 -1
- package/dist/agent-task-prep.js +51 -4
- package/dist/ai-readiness.d.ts.map +1 -1
- package/dist/ai-readiness.js +21 -3
- package/dist/architecture-map.d.ts +16 -0
- package/dist/architecture-map.d.ts.map +1 -1
- package/dist/architecture-map.js +42 -26
- package/dist/area-explore.d.ts +2 -2
- package/dist/area-explore.d.ts.map +1 -1
- package/dist/area-explore.js +36 -16
- package/dist/area-map.d.ts +56 -11
- package/dist/area-map.d.ts.map +1 -1
- package/dist/area-map.js +106 -25
- package/dist/asset-doctor-proposed-exit.d.ts +21 -0
- package/dist/asset-doctor-proposed-exit.d.ts.map +1 -0
- package/dist/asset-doctor-proposed-exit.js +22 -0
- package/dist/asset-provenance.js +1 -1
- package/dist/boundaries-changed-only.d.ts +24 -1
- package/dist/boundaries-changed-only.d.ts.map +1 -1
- package/dist/boundaries-changed-only.js +12 -2
- package/dist/boundary-check-options.model.d.ts +40 -0
- package/dist/boundary-check-options.model.d.ts.map +1 -0
- package/dist/boundary-check-options.model.js +1 -0
- package/dist/boundary-check-result.model.d.ts +89 -0
- package/dist/boundary-check-result.model.d.ts.map +1 -0
- package/dist/boundary-check-result.model.js +1 -0
- package/dist/boundary-configuration-status.d.ts +38 -0
- package/dist/boundary-configuration-status.d.ts.map +1 -0
- package/dist/boundary-configuration-status.js +118 -0
- package/dist/boundary-configuration-status.model.d.ts +37 -0
- package/dist/boundary-configuration-status.model.d.ts.map +1 -0
- package/dist/boundary-configuration-status.model.js +1 -0
- package/dist/boundary-load-issue.model.d.ts +30 -0
- package/dist/boundary-load-issue.model.d.ts.map +1 -0
- package/dist/boundary-load-issue.model.js +1 -0
- package/dist/boundary-rule-check.model.d.ts +44 -0
- package/dist/boundary-rule-check.model.d.ts.map +1 -0
- package/dist/boundary-rule-check.model.js +1 -0
- package/dist/boundary-rule-invalidation.model.d.ts +31 -0
- package/dist/boundary-rule-invalidation.model.d.ts.map +1 -0
- package/dist/boundary-rule-invalidation.model.js +1 -0
- package/dist/boundary-rule-set-diff.model.d.ts +75 -0
- package/dist/boundary-rule-set-diff.model.d.ts.map +1 -0
- package/dist/boundary-rule-set-diff.model.js +1 -0
- package/dist/boundary-rule-sources.d.ts +28 -0
- package/dist/boundary-rule-sources.d.ts.map +1 -0
- package/dist/boundary-rule-sources.js +110 -0
- package/dist/boundary-stale-exception-finding.model.d.ts +12 -0
- package/dist/boundary-stale-exception-finding.model.d.ts.map +1 -0
- package/dist/boundary-stale-exception-finding.model.js +1 -0
- package/dist/boundary-unit-liveness.d.ts +35 -0
- package/dist/boundary-unit-liveness.d.ts.map +1 -0
- package/dist/boundary-unit-liveness.js +71 -0
- package/dist/change-intent.d.ts +3 -0
- package/dist/change-intent.d.ts.map +1 -1
- package/dist/change-intent.js +61 -27
- package/dist/changes-summary.d.ts.map +1 -1
- package/dist/changes-summary.js +19 -9
- package/dist/ci-integrity-report.js +1 -1
- package/dist/ci-predict.d.ts.map +1 -1
- package/dist/ci-predict.js +38 -5
- package/dist/code-intelligence-doctor.d.ts +6 -0
- package/dist/code-intelligence-doctor.d.ts.map +1 -1
- package/dist/code-intelligence-doctor.js +22 -7
- package/dist/command-recommender.d.ts +45 -2
- package/dist/command-recommender.d.ts.map +1 -1
- package/dist/command-recommender.js +41 -263
- package/dist/command-resolution-status.d.ts +44 -0
- package/dist/command-resolution-status.d.ts.map +1 -0
- package/dist/command-resolution-status.js +44 -0
- package/dist/command-safety-level.d.ts +15 -0
- package/dist/command-safety-level.d.ts.map +1 -0
- package/dist/command-safety-level.js +43 -0
- package/dist/command-taxonomy.js +1 -1
- package/dist/compliance-evidence.js +1 -1
- package/dist/compliance-profiles.js +1 -1
- package/dist/construct-registry.d.ts +40 -0
- package/dist/construct-registry.d.ts.map +1 -1
- package/dist/construct-registry.js +186 -82
- package/dist/context-tuning.d.ts +4 -0
- package/dist/context-tuning.d.ts.map +1 -1
- package/dist/context-tuning.js +10 -7
- package/dist/contract-template-registry.d.ts +10 -0
- package/dist/contract-template-registry.d.ts.map +1 -1
- package/dist/contract-template-registry.js +59 -33
- package/dist/contribution-kind.d.ts +52 -0
- package/dist/contribution-kind.d.ts.map +1 -0
- package/dist/contribution-kind.js +52 -0
- package/dist/contribution-load-failures.d.ts +106 -0
- package/dist/contribution-load-failures.d.ts.map +1 -0
- package/dist/contribution-load-failures.js +575 -0
- package/dist/contributions-report.d.ts +28 -0
- package/dist/contributions-report.d.ts.map +1 -0
- package/dist/contributions-report.js +242 -0
- package/dist/convention-registry.d.ts +22 -0
- package/dist/convention-registry.d.ts.map +1 -1
- package/dist/convention-registry.js +79 -39
- package/dist/coverage-report.d.ts.map +1 -1
- package/dist/coverage-report.js +6 -6
- package/dist/custom-checks.d.ts +60 -1
- package/dist/custom-checks.d.ts.map +1 -1
- package/dist/custom-checks.js +159 -6
- package/dist/dashboard/dashboard-data.d.ts +6 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -1
- package/dist/dashboard/dashboard-data.js +99 -8
- package/dist/dashboard/dashboard-knowledge.d.ts.map +1 -1
- package/dist/dashboard/dashboard-knowledge.js +14 -2
- package/dist/decision-records.d.ts +20 -0
- package/dist/decision-records.d.ts.map +1 -1
- package/dist/decision-records.js +68 -20
- package/dist/declared-cross-references.d.ts +61 -0
- package/dist/declared-cross-references.d.ts.map +1 -0
- package/dist/declared-cross-references.js +550 -0
- package/dist/declared-gate-plane-rules.d.ts +24 -0
- package/dist/declared-gate-plane-rules.d.ts.map +1 -0
- package/dist/declared-gate-plane-rules.js +39 -0
- package/dist/declared-reference-coverage.d.ts +27 -0
- package/dist/declared-reference-coverage.d.ts.map +1 -0
- package/dist/declared-reference-coverage.js +50 -0
- package/dist/declared-xref-status.d.ts +19 -0
- package/dist/declared-xref-status.d.ts.map +1 -0
- package/dist/declared-xref-status.js +19 -0
- package/dist/delegate-pack-recipes.d.ts +13 -2
- package/dist/delegate-pack-recipes.d.ts.map +1 -1
- package/dist/delegate-pack-recipes.js +45 -14
- package/dist/demo-package.js +2 -2
- package/dist/demo-script.js +2 -2
- package/dist/demo-workflow.js +3 -3
- package/dist/dev-cycle.js +1 -1
- package/dist/dev-session.js +1 -1
- package/dist/doc-references.d.ts +23 -2
- package/dist/doc-references.d.ts.map +1 -1
- package/dist/doc-references.js +96 -17
- package/dist/doctor-result.d.ts +8 -0
- package/dist/doctor-result.d.ts.map +1 -1
- package/dist/doctor-verdict-kind.d.ts +19 -0
- package/dist/doctor-verdict-kind.d.ts.map +1 -0
- package/dist/doctor-verdict-kind.js +19 -0
- package/dist/doctor-verdict.d.ts +18 -0
- package/dist/doctor-verdict.d.ts.map +1 -0
- package/dist/doctor-verdict.js +28 -0
- package/dist/drift.d.ts +17 -0
- package/dist/drift.d.ts.map +1 -1
- package/dist/drift.js +40 -10
- package/dist/entrypoint-matrix.d.ts.map +1 -1
- package/dist/entrypoint-matrix.js +4 -1
- package/dist/feedback-ingestion.d.ts +28 -2
- package/dist/feedback-ingestion.d.ts.map +1 -1
- package/dist/feedback-ingestion.js +68 -19
- package/dist/fix-preview.d.ts.map +1 -1
- package/dist/fix-preview.js +9 -5
- package/dist/framework-extractor-outcomes.d.ts +27 -0
- package/dist/framework-extractor-outcomes.d.ts.map +1 -0
- package/dist/framework-extractor-outcomes.js +83 -0
- package/dist/fuzzy-impact.js +1 -1
- package/dist/healing-plan.d.ts.map +1 -1
- package/dist/healing-plan.js +3 -4
- package/dist/helper-catalog.d.ts +25 -0
- package/dist/helper-catalog.d.ts.map +1 -0
- package/dist/helper-catalog.js +91 -0
- package/dist/helper-registry.d.ts.map +1 -1
- package/dist/helper-registry.js +17 -1
- package/dist/helper-view.d.ts +33 -0
- package/dist/helper-view.d.ts.map +1 -0
- package/dist/helper-view.js +1 -0
- package/dist/i-asset-doctor-flags.d.ts +16 -0
- package/dist/i-asset-doctor-flags.d.ts.map +1 -0
- package/dist/i-asset-doctor-flags.js +1 -0
- package/dist/i-command-resolution.d.ts +22 -0
- package/dist/i-command-resolution.d.ts.map +1 -0
- package/dist/i-command-resolution.js +1 -0
- package/dist/i-command-resolve-options.d.ts +24 -0
- package/dist/i-command-resolve-options.d.ts.map +1 -0
- package/dist/i-command-resolve-options.js +1 -0
- package/dist/i-command-safety.d.ts +13 -0
- package/dist/i-command-safety.d.ts.map +1 -0
- package/dist/i-command-safety.js +1 -0
- package/dist/i-contribution-accepted-entry.d.ts +18 -0
- package/dist/i-contribution-accepted-entry.d.ts.map +1 -0
- package/dist/i-contribution-accepted-entry.js +1 -0
- package/dist/i-contribution-entry-rejection.d.ts +21 -0
- package/dist/i-contribution-entry-rejection.d.ts.map +1 -0
- package/dist/i-contribution-entry-rejection.js +1 -0
- package/dist/i-contribution-file-issue.d.ts +18 -0
- package/dist/i-contribution-file-issue.d.ts.map +1 -0
- package/dist/i-contribution-file-issue.js +1 -0
- package/dist/i-contribution-file-report.d.ts +40 -0
- package/dist/i-contribution-file-report.d.ts.map +1 -0
- package/dist/i-contribution-file-report.js +1 -0
- package/dist/i-contribution-file-validation.d.ts +24 -0
- package/dist/i-contribution-file-validation.d.ts.map +1 -0
- package/dist/i-contribution-file-validation.js +1 -0
- package/dist/i-contributions-report.d.ts +31 -0
- package/dist/i-contributions-report.d.ts.map +1 -0
- package/dist/i-contributions-report.js +1 -0
- package/dist/i-declared-xref-field.d.ts +25 -0
- package/dist/i-declared-xref-field.d.ts.map +1 -0
- package/dist/i-declared-xref-field.js +1 -0
- package/dist/i-declared-xref-issue.d.ts +25 -0
- package/dist/i-declared-xref-issue.d.ts.map +1 -0
- package/dist/i-declared-xref-issue.js +1 -0
- package/dist/i-declared-xref-report.d.ts +48 -0
- package/dist/i-declared-xref-report.d.ts.map +1 -0
- package/dist/i-declared-xref-report.js +1 -0
- package/dist/i-declared-xref-row.d.ts +29 -0
- package/dist/i-declared-xref-row.d.ts.map +1 -0
- package/dist/i-declared-xref-row.js +1 -0
- package/dist/i-doctor-verdict.d.ts +10 -0
- package/dist/i-doctor-verdict.d.ts.map +1 -0
- package/dist/i-doctor-verdict.js +1 -0
- package/dist/i-kind-outcomes.d.ts +13 -0
- package/dist/i-kind-outcomes.d.ts.map +1 -0
- package/dist/i-kind-outcomes.js +1 -0
- package/dist/i-pack-doctor-verdict.d.ts +15 -0
- package/dist/i-pack-doctor-verdict.d.ts.map +1 -0
- package/dist/i-pack-doctor-verdict.js +1 -0
- package/dist/i-probed-id-field.d.ts +17 -0
- package/dist/i-probed-id-field.d.ts.map +1 -0
- package/dist/i-probed-id-field.js +1 -0
- package/dist/i-reference-kind-declaration.d.ts +38 -0
- package/dist/i-reference-kind-declaration.d.ts.map +1 -0
- package/dist/i-reference-kind-declaration.js +1 -0
- package/dist/i-reference-warm-options.d.ts +21 -0
- package/dist/i-reference-warm-options.d.ts.map +1 -0
- package/dist/i-reference-warm-options.js +1 -0
- package/dist/i-registry-outcomes.d.ts +16 -0
- package/dist/i-registry-outcomes.d.ts.map +1 -0
- package/dist/i-registry-outcomes.js +1 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts +35 -0
- package/dist/i-scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/i-scaffold-pattern-doctor-report.js +1 -0
- package/dist/i-search-tuning-key-probe.d.ts +30 -0
- package/dist/i-search-tuning-key-probe.d.ts.map +1 -0
- package/dist/i-search-tuning-key-probe.js +1 -0
- package/dist/i-search-tuning-lint-issue.d.ts +61 -0
- package/dist/i-search-tuning-lint-issue.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-issue.js +1 -0
- package/dist/i-search-tuning-lint-report.d.ts +38 -0
- package/dist/i-search-tuning-lint-report.d.ts.map +1 -0
- package/dist/i-search-tuning-lint-report.js +1 -0
- package/dist/i-unresolvable-reference-scan.d.ts +14 -0
- package/dist/i-unresolvable-reference-scan.d.ts.map +1 -0
- package/dist/i-unresolvable-reference-scan.js +1 -0
- package/dist/i-unresolvable-reference.d.ts +29 -0
- package/dist/i-unresolvable-reference.d.ts.map +1 -0
- package/dist/i-unresolvable-reference.js +1 -0
- package/dist/i-workspace-profile-payload.d.ts +12 -0
- package/dist/i-workspace-profile-payload.d.ts.map +1 -0
- package/dist/i-workspace-profile-payload.js +1 -0
- package/dist/impact-analysis.d.ts +15 -0
- package/dist/impact-analysis.d.ts.map +1 -1
- package/dist/impact-analysis.js +58 -13
- package/dist/impact-render.d.ts.map +1 -1
- package/dist/impact-render.js +22 -0
- package/dist/import-hygiene.d.ts +35 -1
- package/dist/import-hygiene.d.ts.map +1 -1
- package/dist/import-hygiene.js +107 -13
- package/dist/index.d.ts +141 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -0
- package/dist/inspection-discovery.d.ts +45 -0
- package/dist/inspection-discovery.d.ts.map +1 -0
- package/dist/inspection-discovery.js +70 -0
- package/dist/knowledge-advisory-code.d.ts +17 -0
- package/dist/knowledge-advisory-code.d.ts.map +1 -0
- package/dist/knowledge-advisory-code.js +17 -0
- package/dist/knowledge-aged-entry.d.ts +10 -0
- package/dist/knowledge-aged-entry.d.ts.map +1 -0
- package/dist/knowledge-aged-entry.js +1 -0
- package/dist/knowledge-authoring.d.ts +24 -1
- package/dist/knowledge-authoring.d.ts.map +1 -1
- package/dist/knowledge-authoring.js +46 -7
- package/dist/knowledge-entry-verdict-record.d.ts +22 -0
- package/dist/knowledge-entry-verdict-record.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict-record.js +1 -0
- package/dist/knowledge-entry-verdict.d.ts +17 -0
- package/dist/knowledge-entry-verdict.d.ts.map +1 -0
- package/dist/knowledge-entry-verdict.js +17 -0
- package/dist/knowledge-graph.d.ts +6 -0
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +18 -7
- package/dist/knowledge-kind-bucket.d.ts +19 -0
- package/dist/knowledge-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-kind-bucket.js +1 -0
- package/dist/knowledge-load-failure.d.ts +23 -0
- package/dist/knowledge-load-failure.d.ts.map +1 -0
- package/dist/knowledge-load-failure.js +1 -0
- package/dist/knowledge-reference-kind-bucket.d.ts +11 -0
- package/dist/knowledge-reference-kind-bucket.d.ts.map +1 -0
- package/dist/knowledge-reference-kind-bucket.js +1 -0
- package/dist/knowledge-stale-advisory.d.ts +14 -0
- package/dist/knowledge-stale-advisory.d.ts.map +1 -0
- package/dist/knowledge-stale-advisory.js +1 -0
- package/dist/knowledge-stale-coverage.d.ts +19 -0
- package/dist/knowledge-stale-coverage.d.ts.map +1 -0
- package/dist/knowledge-stale-coverage.js +1 -0
- package/dist/knowledge-stale-gate-flags.d.ts +33 -0
- package/dist/knowledge-stale-gate-flags.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-flags.js +1 -0
- package/dist/knowledge-stale-gate-input.d.ts +46 -0
- package/dist/knowledge-stale-gate-input.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-input.js +1 -0
- package/dist/knowledge-stale-gate-result.d.ts +33 -0
- package/dist/knowledge-stale-gate-result.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-result.js +1 -0
- package/dist/knowledge-stale-gate-rule.d.ts +33 -0
- package/dist/knowledge-stale-gate-rule.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-rule.js +1 -0
- package/dist/knowledge-stale-gate-violation.d.ts +13 -0
- package/dist/knowledge-stale-gate-violation.d.ts.map +1 -0
- package/dist/knowledge-stale-gate-violation.js +1 -0
- package/dist/knowledge-stale-gate.d.ts +83 -0
- package/dist/knowledge-stale-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-gate.js +429 -0
- package/dist/knowledge-stale-quality-gate.d.ts +26 -0
- package/dist/knowledge-stale-quality-gate.d.ts.map +1 -0
- package/dist/knowledge-stale-quality-gate.js +110 -0
- package/dist/knowledge-stale.d.ts +122 -9
- package/dist/knowledge-stale.d.ts.map +1 -1
- package/dist/knowledge-stale.js +996 -291
- package/dist/knowledge-unverifiable-reason.d.ts +12 -0
- package/dist/knowledge-unverifiable-reason.d.ts.map +1 -0
- package/dist/knowledge-unverifiable-reason.js +12 -0
- package/dist/loader-diagnostics.d.ts +14 -2
- package/dist/loader-diagnostics.d.ts.map +1 -1
- package/dist/match-terms.d.ts +48 -0
- package/dist/match-terms.d.ts.map +1 -0
- package/dist/match-terms.js +155 -0
- package/dist/migration-profile-registry.d.ts +10 -0
- package/dist/migration-profile-registry.d.ts.map +1 -1
- package/dist/migration-profile-registry.js +57 -34
- package/dist/migration-readiness.d.ts.map +1 -1
- package/dist/migration-readiness.js +1 -3
- package/dist/nearest-id.d.ts +10 -26
- package/dist/nearest-id.d.ts.map +1 -1
- package/dist/nearest-id.js +9 -59
- package/dist/pack-asset-freshness.d.ts +65 -0
- package/dist/pack-asset-freshness.d.ts.map +1 -0
- package/dist/pack-asset-freshness.js +340 -0
- package/dist/pack-author-ux.d.ts +24 -3
- package/dist/pack-author-ux.d.ts.map +1 -1
- package/dist/pack-author-ux.js +87 -93
- package/dist/pack-contributions-inventory.d.ts +79 -39
- package/dist/pack-contributions-inventory.d.ts.map +1 -1
- package/dist/pack-contributions-inventory.js +443 -286
- package/dist/pack-doctor-verdict.d.ts +29 -0
- package/dist/pack-doctor-verdict.d.ts.map +1 -0
- package/dist/pack-doctor-verdict.js +45 -0
- package/dist/pack-doctor.d.ts +74 -1
- package/dist/pack-doctor.d.ts.map +1 -1
- package/dist/pack-doctor.js +281 -1
- package/dist/pack-helper-plan.d.ts +24 -0
- package/dist/pack-helper-plan.d.ts.map +1 -0
- package/dist/pack-helper-plan.js +77 -0
- package/dist/pack-helper-registry.d.ts +14 -0
- package/dist/pack-helper-registry.d.ts.map +1 -1
- package/dist/pack-helper-registry.js +76 -37
- package/dist/pack-manifest-reader.d.ts +8 -0
- package/dist/pack-manifest-reader.d.ts.map +1 -0
- package/dist/pack-manifest-reader.js +79 -0
- package/dist/pack-release-check.d.ts +14 -1
- package/dist/pack-release-check.d.ts.map +1 -1
- package/dist/pack-release-check.js +23 -1
- package/dist/pack-signature-status.d.ts +18 -6
- package/dist/pack-signature-status.d.ts.map +1 -1
- package/dist/pack-signature-status.js +59 -105
- package/dist/pack-test-runner.d.ts +27 -5
- package/dist/pack-test-runner.d.ts.map +1 -1
- package/dist/pack-test-runner.js +91 -35
- package/dist/pack-typecheck.d.ts +8 -0
- package/dist/pack-typecheck.d.ts.map +1 -0
- package/dist/pack-typecheck.js +76 -0
- package/dist/plan-review.d.ts +2 -0
- package/dist/plan-review.d.ts.map +1 -1
- package/dist/plan-review.js +17 -5
- package/dist/plan-simulation.d.ts.map +1 -1
- package/dist/plan-simulation.js +16 -5
- package/dist/playbook-load-issue.d.ts +16 -0
- package/dist/playbook-load-issue.d.ts.map +1 -0
- package/dist/playbook-load-issue.js +1 -0
- package/dist/playbook-registry.d.ts +32 -1
- package/dist/playbook-registry.d.ts.map +1 -1
- package/dist/playbook-registry.js +144 -55
- package/dist/policy-declaration.d.ts +18 -0
- package/dist/policy-declaration.d.ts.map +1 -0
- package/dist/policy-declaration.js +1 -0
- package/dist/policy-engine.d.ts +8 -0
- package/dist/policy-engine.d.ts.map +1 -1
- package/dist/policy-engine.js +26 -9
- package/dist/policy-overrides.d.ts.map +1 -1
- package/dist/policy-overrides.js +4 -4
- package/dist/policy-registry.d.ts +27 -0
- package/dist/policy-registry.d.ts.map +1 -1
- package/dist/policy-registry.js +87 -20
- package/dist/probed-id-fields.d.ts +21 -0
- package/dist/probed-id-fields.d.ts.map +1 -0
- package/dist/probed-id-fields.js +25 -0
- package/dist/probed-id-source.d.ts +11 -0
- package/dist/probed-id-source.d.ts.map +1 -0
- package/dist/probed-id-source.js +11 -0
- package/dist/profile-registry.d.ts +25 -2
- package/dist/profile-registry.d.ts.map +1 -1
- package/dist/profile-registry.js +59 -6
- package/dist/quality-gate-examination.d.ts +15 -0
- package/dist/quality-gate-examination.d.ts.map +1 -0
- package/dist/quality-gate-examination.js +15 -0
- package/dist/quality-gate-row-status.d.ts +19 -0
- package/dist/quality-gate-row-status.d.ts.map +1 -0
- package/dist/quality-gate-row-status.js +28 -0
- package/dist/quality-gate-status.d.ts +16 -0
- package/dist/quality-gate-status.d.ts.map +1 -0
- package/dist/quality-gate-status.js +16 -0
- package/dist/quality-html.d.ts.map +1 -1
- package/dist/quality-html.js +14 -3
- package/dist/quality-report-coverage.d.ts +26 -0
- package/dist/quality-report-coverage.d.ts.map +1 -0
- package/dist/quality-report-coverage.js +48 -0
- package/dist/quality-report.d.ts +28 -1
- package/dist/quality-report.d.ts.map +1 -1
- package/dist/quality-report.js +263 -35
- package/dist/query-intent-kind.d.ts +18 -0
- package/dist/query-intent-kind.d.ts.map +1 -0
- package/dist/query-intent-kind.js +18 -0
- package/dist/query-intent-result.d.ts +23 -0
- package/dist/query-intent-result.d.ts.map +1 -0
- package/dist/query-intent-result.js +1 -0
- package/dist/query-intent.d.ts +18 -0
- package/dist/query-intent.d.ts.map +1 -0
- package/dist/query-intent.js +336 -0
- package/dist/query-resolver.d.ts +18 -0
- package/dist/query-resolver.d.ts.map +1 -1
- package/dist/query-resolver.js +7 -4
- package/dist/ranked-recommendations.d.ts +36 -0
- package/dist/ranked-recommendations.d.ts.map +1 -0
- package/dist/ranked-recommendations.js +1 -0
- package/dist/ranker-explainability.d.ts.map +1 -1
- package/dist/ranker-explainability.js +38 -10
- package/dist/recommend-recipe.d.ts +17 -0
- package/dist/recommend-recipe.d.ts.map +1 -0
- package/dist/recommend-recipe.js +1 -0
- package/dist/recommend-recipes.d.ts +9 -0
- package/dist/recommend-recipes.d.ts.map +1 -0
- package/dist/recommend-recipes.js +106 -0
- package/dist/recommendation-candidate.d.ts +30 -0
- package/dist/recommendation-candidate.d.ts.map +1 -0
- package/dist/recommendation-candidate.js +1 -0
- package/dist/recommendation-confidence.d.ts +27 -0
- package/dist/recommendation-confidence.d.ts.map +1 -0
- package/dist/recommendation-confidence.js +1 -0
- package/dist/recommendation-ranking-options.d.ts +24 -0
- package/dist/recommendation-ranking-options.d.ts.map +1 -0
- package/dist/recommendation-ranking-options.js +1 -0
- package/dist/recommendation-ranking.d.ts +50 -0
- package/dist/recommendation-ranking.d.ts.map +1 -0
- package/dist/recommendation-ranking.js +527 -0
- package/dist/recommendation-source.d.ts +23 -0
- package/dist/recommendation-source.d.ts.map +1 -0
- package/dist/recommendation-source.js +23 -0
- package/dist/recommendation-suppression.d.ts +14 -0
- package/dist/recommendation-suppression.d.ts.map +1 -0
- package/dist/recommendation-suppression.js +14 -0
- package/dist/reference-asset-kind.d.ts +14 -0
- package/dist/reference-asset-kind.d.ts.map +1 -0
- package/dist/reference-asset-kind.js +14 -0
- package/dist/reference-content-check.d.ts +32 -0
- package/dist/reference-content-check.d.ts.map +1 -0
- package/dist/reference-content-check.js +143 -0
- package/dist/reference-failure.d.ts +31 -0
- package/dist/reference-failure.d.ts.map +1 -0
- package/dist/reference-failure.js +31 -0
- package/dist/reference-id-status.d.ts +15 -0
- package/dist/reference-id-status.d.ts.map +1 -0
- package/dist/reference-id-status.js +15 -0
- package/dist/reference-kind-declarations.d.ts +42 -0
- package/dist/reference-kind-declarations.d.ts.map +1 -0
- package/dist/reference-kind-declarations.js +142 -0
- package/dist/reference-lookup.d.ts +6 -0
- package/dist/reference-lookup.d.ts.map +1 -1
- package/dist/reference-lookup.js +13 -5
- package/dist/reference-registry.d.ts +109 -11
- package/dist/reference-registry.d.ts.map +1 -1
- package/dist/reference-registry.js +186 -30
- package/dist/reference-subject.d.ts +20 -0
- package/dist/reference-subject.d.ts.map +1 -0
- package/dist/reference-subject.js +1 -0
- package/dist/registration-hint-discovery-status.d.ts +25 -0
- package/dist/registration-hint-discovery-status.d.ts.map +1 -0
- package/dist/registration-hint-discovery-status.js +25 -0
- package/dist/registration-hint-registry.d.ts +80 -0
- package/dist/registration-hint-registry.d.ts.map +1 -1
- package/dist/registration-hint-registry.js +356 -138
- package/dist/registry-lifecycle.d.ts +200 -19
- package/dist/registry-lifecycle.d.ts.map +1 -1
- package/dist/registry-lifecycle.js +526 -136
- package/dist/release-readiness.d.ts.map +1 -1
- package/dist/release-readiness.js +10 -7
- package/dist/release-smoke.d.ts.map +1 -1
- package/dist/release-smoke.js +11 -7
- package/dist/report-site.d.ts.map +1 -1
- package/dist/report-site.js +25 -7
- package/dist/repository-intelligence.d.ts.map +1 -1
- package/dist/repository-intelligence.js +3 -2
- package/dist/repository-knowledge-model.d.ts.map +1 -1
- package/dist/repository-knowledge-model.js +18 -5
- package/dist/resolve-project-config.d.ts +64 -0
- package/dist/resolve-project-config.d.ts.map +1 -1
- package/dist/resolve-project-config.js +240 -32
- package/dist/reuse/compute-reuse-coverage.d.ts +29 -0
- package/dist/reuse/compute-reuse-coverage.d.ts.map +1 -0
- package/dist/reuse/compute-reuse-coverage.js +198 -0
- package/dist/reuse/rank-reuse-candidates.d.ts +38 -0
- package/dist/reuse/rank-reuse-candidates.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-candidates.js +212 -0
- package/dist/reuse/rank-reuse-options.d.ts +20 -0
- package/dist/reuse/rank-reuse-options.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-options.js +1 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts +15 -0
- package/dist/reuse/rank-reuse-suggestions.d.ts.map +1 -0
- package/dist/reuse/rank-reuse-suggestions.js +31 -0
- package/dist/reuse/resolve-curated-reuse.d.ts +43 -0
- package/dist/reuse/resolve-curated-reuse.d.ts.map +1 -0
- package/dist/reuse/resolve-curated-reuse.js +115 -0
- package/dist/reuse/reuse-candidate.d.ts +29 -0
- package/dist/reuse/reuse-candidate.d.ts.map +1 -0
- package/dist/reuse/reuse-candidate.js +1 -0
- package/dist/reuse/reuse-coverage-report.d.ts +74 -0
- package/dist/reuse/reuse-coverage-report.d.ts.map +1 -0
- package/dist/reuse/reuse-coverage-report.js +1 -0
- package/dist/reuse/reuse-curated-coverage.d.ts +36 -0
- package/dist/reuse/reuse-curated-coverage.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-coverage.js +1 -0
- package/dist/reuse/reuse-curated-resolution.d.ts +36 -0
- package/dist/reuse/reuse-curated-resolution.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-resolution.js +1 -0
- package/dist/reuse/reuse-curated-status.d.ts +21 -0
- package/dist/reuse/reuse-curated-status.d.ts.map +1 -0
- package/dist/reuse/reuse-curated-status.js +21 -0
- package/dist/reuse/reuse-match-detail.d.ts +15 -0
- package/dist/reuse/reuse-match-detail.d.ts.map +1 -0
- package/dist/reuse/reuse-match-detail.js +1 -0
- package/dist/reuse/reuse-ranking.d.ts +37 -0
- package/dist/reuse/reuse-ranking.d.ts.map +1 -0
- package/dist/reuse/reuse-ranking.js +1 -0
- package/dist/reuse/reuse-suggestion.d.ts +19 -0
- package/dist/reuse/reuse-suggestion.d.ts.map +1 -0
- package/dist/reuse/reuse-suggestion.js +1 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts +28 -0
- package/dist/reuse/reuse-symbol-lookup.d.ts.map +1 -0
- package/dist/reuse/reuse-symbol-lookup.js +1 -0
- package/dist/reuse/reuse-tokenize.d.ts +11 -0
- package/dist/reuse/reuse-tokenize.d.ts.map +1 -0
- package/dist/reuse/reuse-tokenize.js +26 -0
- package/dist/reuse/score-reuse-name.d.ts +16 -0
- package/dist/reuse/score-reuse-name.d.ts.map +1 -0
- package/dist/reuse/score-reuse-name.js +35 -0
- package/dist/reuse/score-reuse-primitive.d.ts +33 -0
- package/dist/reuse/score-reuse-primitive.d.ts.map +1 -0
- package/dist/reuse/score-reuse-primitive.js +92 -0
- package/dist/review-packet.d.ts +2 -0
- package/dist/review-packet.d.ts.map +1 -1
- package/dist/review-packet.js +13 -6
- package/dist/role-views.d.ts.map +1 -1
- package/dist/role-views.js +16 -16
- package/dist/routing-recommends-channels.d.ts +24 -0
- package/dist/routing-recommends-channels.d.ts.map +1 -0
- package/dist/routing-recommends-channels.js +19 -0
- package/dist/run-boundary-check.d.ts +118 -0
- package/dist/run-boundary-check.d.ts.map +1 -0
- package/dist/run-boundary-check.js +592 -0
- package/dist/safety-audit.js +1 -1
- package/dist/scaffold-coverage.js +1 -1
- package/dist/scaffold-pattern-doctor-report.d.ts +19 -0
- package/dist/scaffold-pattern-doctor-report.d.ts.map +1 -0
- package/dist/scaffold-pattern-doctor-report.js +54 -0
- package/dist/scaffold-patterns.d.ts +75 -1
- package/dist/scaffold-patterns.d.ts.map +1 -1
- package/dist/scaffold-patterns.js +375 -84
- package/dist/schema-inventory.d.ts.map +1 -1
- package/dist/schema-inventory.js +4 -3
- package/dist/search-document-id.d.ts +52 -0
- package/dist/search-document-id.d.ts.map +1 -0
- package/dist/search-document-id.js +72 -0
- package/dist/search-document-prefix.d.ts +7 -0
- package/dist/search-document-prefix.d.ts.map +1 -0
- package/dist/search-document-prefix.js +1 -0
- package/dist/search-index.d.ts.map +1 -1
- package/dist/search-index.js +20 -23
- package/dist/search-tuning-explain.d.ts +6 -0
- package/dist/search-tuning-explain.d.ts.map +1 -1
- package/dist/search-tuning-explain.js +19 -17
- package/dist/search-tuning-key-probes.d.ts +16 -0
- package/dist/search-tuning-key-probes.d.ts.map +1 -0
- package/dist/search-tuning-key-probes.js +65 -0
- package/dist/search-tuning-key-resolution.d.ts +25 -0
- package/dist/search-tuning-key-resolution.d.ts.map +1 -0
- package/dist/search-tuning-key-resolution.js +1 -0
- package/dist/search-tuning-key-resolver.d.ts +4 -0
- package/dist/search-tuning-key-resolver.d.ts.map +1 -0
- package/dist/search-tuning-key-resolver.js +107 -0
- package/dist/search-tuning-key-status.d.ts +24 -0
- package/dist/search-tuning-key-status.d.ts.map +1 -0
- package/dist/search-tuning-key-status.js +24 -0
- package/dist/search-tuning-lint.d.ts +9 -0
- package/dist/search-tuning-lint.d.ts.map +1 -0
- package/dist/search-tuning-lint.js +468 -0
- package/dist/search-tuning-registry.d.ts +43 -0
- package/dist/search-tuning-registry.d.ts.map +1 -1
- package/dist/search-tuning-registry.js +214 -49
- package/dist/self-audit.d.ts +12 -0
- package/dist/self-audit.d.ts.map +1 -1
- package/dist/self-audit.js +36 -10
- package/dist/self-config-doctor-v2.d.ts +145 -3
- package/dist/self-config-doctor-v2.d.ts.map +1 -1
- package/dist/self-config-doctor-v2.js +1304 -181
- package/dist/self-config-doctor.d.ts +20 -1
- package/dist/self-config-doctor.d.ts.map +1 -1
- package/dist/self-config-doctor.js +53 -280
- package/dist/settled-unit-states.d.ts +9 -0
- package/dist/settled-unit-states.d.ts.map +1 -0
- package/dist/settled-unit-states.js +14 -0
- package/dist/sharkcraft-inspector.d.ts +34 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -1
- package/dist/sharkcraft-inspector.js +273 -26
- package/dist/spec/spec-evidence.d.ts.map +1 -1
- package/dist/spec/spec-evidence.js +14 -20
- package/dist/split-identifier.d.ts +21 -0
- package/dist/split-identifier.d.ts.map +1 -0
- package/dist/split-identifier.js +27 -0
- package/dist/start-here.d.ts.map +1 -1
- package/dist/start-here.js +1 -2
- package/dist/substitute-placeholders.d.ts +8 -0
- package/dist/substitute-placeholders.d.ts.map +1 -0
- package/dist/substitute-placeholders.js +9 -0
- package/dist/symbol-index.d.ts +33 -0
- package/dist/symbol-index.d.ts.map +1 -1
- package/dist/symbol-index.js +241 -3
- package/dist/symbol-member-entry.d.ts +26 -0
- package/dist/symbol-member-entry.d.ts.map +1 -0
- package/dist/symbol-member-entry.js +1 -0
- package/dist/symbol-member-kind.d.ts +14 -0
- package/dist/symbol-member-kind.d.ts.map +1 -0
- package/dist/symbol-member-kind.js +14 -0
- package/dist/task-packet.d.ts.map +1 -1
- package/dist/task-packet.js +52 -9
- package/dist/task-ranker.d.ts +8 -0
- package/dist/task-ranker.d.ts.map +1 -1
- package/dist/task-ranker.js +25 -13
- package/dist/task-risk.js +1 -1
- package/dist/task-routing-hint-registry.d.ts +20 -1
- package/dist/task-routing-hint-registry.d.ts.map +1 -1
- package/dist/task-routing-hint-registry.js +186 -42
- package/dist/template-drift.d.ts.map +1 -1
- package/dist/template-drift.js +30 -9
- package/dist/template-lint.d.ts.map +1 -1
- package/dist/template-lint.js +160 -2
- package/dist/term-query.d.ts +10 -0
- package/dist/term-query.d.ts.map +1 -0
- package/dist/term-query.js +1 -0
- package/dist/test-definitions.d.ts +6 -3
- package/dist/test-definitions.d.ts.map +1 -1
- package/dist/test-runner.d.ts +95 -10
- package/dist/test-runner.d.ts.map +1 -1
- package/dist/test-runner.js +309 -308
- package/dist/tuning-query-tokens.d.ts +29 -0
- package/dist/tuning-query-tokens.d.ts.map +1 -0
- package/dist/tuning-query-tokens.js +51 -0
- package/dist/typecheck-files.d.ts +36 -0
- package/dist/typecheck-files.d.ts.map +1 -0
- package/dist/typecheck-files.js +158 -0
- package/dist/uncertainty.js +1 -1
- package/dist/universal-search.d.ts.map +1 -1
- package/dist/universal-search.js +5 -3
- package/dist/unregistered-exports.d.ts +19 -0
- package/dist/unregistered-exports.d.ts.map +1 -0
- package/dist/unregistered-exports.js +141 -0
- package/dist/unresolvable-reason.d.ts +11 -0
- package/dist/unresolvable-reason.d.ts.map +1 -0
- package/dist/unresolvable-reason.js +11 -0
- package/dist/upgrade-advisor.d.ts.map +1 -1
- package/dist/upgrade-advisor.js +16 -9
- package/dist/validate-contribution-file.d.ts +4 -0
- package/dist/validate-contribution-file.d.ts.map +1 -0
- package/dist/validate-contribution-file.js +228 -0
- package/dist/why-file.d.ts +3 -0
- package/dist/why-file.d.ts.map +1 -1
- package/dist/why-file.js +7 -3
- package/package.json +17 -17
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { GATE_PLANE_CONFIG_KEY, GATE_PLANE_ORDER } from '@shrkcrft/config';
|
|
2
|
+
import { isProjectConfigAbsent, resolveProjectConfig } from "./resolve-project-config.js";
|
|
3
|
+
/**
|
|
4
|
+
* How many data-defined gate-plane rules the project declares, per plane —
|
|
5
|
+
* read through `resolveProjectConfig` (THE config reader that sees
|
|
6
|
+
* pack-contributed planes) under THE plane → config-key list beside the config
|
|
7
|
+
* schema (`GATE_PLANE_CONFIG_KEY`), the one the CLI's `collectGateRules` reads.
|
|
8
|
+
*
|
|
9
|
+
* Two "no config was read" answers, kept apart (round 11 review R12-REG-2):
|
|
10
|
+
* - NO config — the loader found no `sharkcraft/` folder
|
|
11
|
+
* (`isProjectConfigAbsent`, the answer `finish` reads as "gate not
|
|
12
|
+
* applicable"): zero rules and no `loadError`; there are no planes to run;
|
|
13
|
+
* - a config that EXISTS but failed to load: `loadError` is set, since
|
|
14
|
+
* nothing can be said about what it declares.
|
|
15
|
+
*
|
|
16
|
+
* `buildQualityReport` consumers other than `shrk quality` (MCP, the
|
|
17
|
+
* dashboard, the report site) do not run the planes — some spawn shells — so
|
|
18
|
+
* they report a not-run `gate-planes` row from this count; `shrk quality`
|
|
19
|
+
* runs them.
|
|
20
|
+
*/
|
|
21
|
+
export async function declaredGatePlaneRules(projectRoot) {
|
|
22
|
+
const resolved = await resolveProjectConfig(projectRoot);
|
|
23
|
+
if (!resolved.ok) {
|
|
24
|
+
return isProjectConfigAbsent(resolved.error)
|
|
25
|
+
? { total: 0, byPlane: {} }
|
|
26
|
+
: { total: 0, byPlane: {}, loadError: resolved.error.message };
|
|
27
|
+
}
|
|
28
|
+
const config = resolved.value.config;
|
|
29
|
+
const byPlane = {};
|
|
30
|
+
let total = 0;
|
|
31
|
+
for (const plane of GATE_PLANE_ORDER) {
|
|
32
|
+
const list = config[GATE_PLANE_CONFIG_KEY[plane]];
|
|
33
|
+
const n = Array.isArray(list) ? list.length : 0;
|
|
34
|
+
if (n > 0)
|
|
35
|
+
byPlane[plane] = n;
|
|
36
|
+
total += n;
|
|
37
|
+
}
|
|
38
|
+
return { total, byPlane };
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IVerdictCoverage } from '@shrkcrft/core';
|
|
2
|
+
import { type IKnowledgeAnchorCheck, type IKnowledgeReferenceCheck } from './knowledge-stale.js';
|
|
3
|
+
/** Why a malformed reference is unexamined — the words every surface prints. */
|
|
4
|
+
export declare const MALFORMED_REFERENCE_REASON = "malformed (a kind outside the vocabulary, or a required field missing), so never checked \u2014 `shrk doctor` names each";
|
|
5
|
+
/**
|
|
6
|
+
* THE fold of declared references into one coverage record.
|
|
7
|
+
*
|
|
8
|
+
* A reference whose outcome was CHECKED (ok / stale / missing —
|
|
9
|
+
* `isCheckableOutcome`) was examined. A MALFORMED one (`invalid`) was declared
|
|
10
|
+
* to be checked and never was: it is expected, not examined, so a run holding
|
|
11
|
+
* one is never a clean pass. An `unknown` one (a url, an unpinned or ambiguous
|
|
12
|
+
* symbol, a file that failed to read) is neither: the stale-check accounts for
|
|
13
|
+
* it at the ENTRY level (an entry with nothing checkable is unverifiable), so
|
|
14
|
+
* it leaves both sides here — which is why a scope of ONLY unknown references
|
|
15
|
+
* is `expected: 0`, "nothing to examine", never a pass.
|
|
16
|
+
*
|
|
17
|
+
* `shrk knowledge stale-check` / `verify` (and so `shrk quality`, MCP
|
|
18
|
+
* `get_quality_report`, the dashboard) and the `shrk gate` knowledge-symbol
|
|
19
|
+
* gate all settle on this one record — the gate used to count every
|
|
20
|
+
* non-stale, non-missing reference as "resolving", so a malformed or unpinned
|
|
21
|
+
* reference read as a pass there while the stale-check said 2.
|
|
22
|
+
*/
|
|
23
|
+
export declare function declaredReferenceCoverage(input: {
|
|
24
|
+
readonly references: readonly IKnowledgeReferenceCheck[];
|
|
25
|
+
readonly anchors?: readonly IKnowledgeAnchorCheck[];
|
|
26
|
+
}): IVerdictCoverage;
|
|
27
|
+
//# sourceMappingURL=declared-reference-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-reference-coverage.d.ts","sourceRoot":"","sources":["../src/declared-reference-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAC;AAK9B,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,6HACgF,CAAC;AAExH;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACrD,GAAG,gBAAgB,CA0BnB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { formatKnowledgeReference } from '@shrkcrft/knowledge';
|
|
2
|
+
import { isCheckableOutcome, ReferenceCheckOutcome, } from "./knowledge-stale.js";
|
|
3
|
+
/** Unexamined labels carried on the coverage record (the full list is in the JSON). */
|
|
4
|
+
const LABEL_CAP = 20;
|
|
5
|
+
/** Why a malformed reference is unexamined — the words every surface prints. */
|
|
6
|
+
export const MALFORMED_REFERENCE_REASON = 'malformed (a kind outside the vocabulary, or a required field missing), so never checked — `shrk doctor` names each';
|
|
7
|
+
/**
|
|
8
|
+
* THE fold of declared references into one coverage record.
|
|
9
|
+
*
|
|
10
|
+
* A reference whose outcome was CHECKED (ok / stale / missing —
|
|
11
|
+
* `isCheckableOutcome`) was examined. A MALFORMED one (`invalid`) was declared
|
|
12
|
+
* to be checked and never was: it is expected, not examined, so a run holding
|
|
13
|
+
* one is never a clean pass. An `unknown` one (a url, an unpinned or ambiguous
|
|
14
|
+
* symbol, a file that failed to read) is neither: the stale-check accounts for
|
|
15
|
+
* it at the ENTRY level (an entry with nothing checkable is unverifiable), so
|
|
16
|
+
* it leaves both sides here — which is why a scope of ONLY unknown references
|
|
17
|
+
* is `expected: 0`, "nothing to examine", never a pass.
|
|
18
|
+
*
|
|
19
|
+
* `shrk knowledge stale-check` / `verify` (and so `shrk quality`, MCP
|
|
20
|
+
* `get_quality_report`, the dashboard) and the `shrk gate` knowledge-symbol
|
|
21
|
+
* gate all settle on this one record — the gate used to count every
|
|
22
|
+
* non-stale, non-missing reference as "resolving", so a malformed or unpinned
|
|
23
|
+
* reference read as a pass there while the stale-check said 2.
|
|
24
|
+
*/
|
|
25
|
+
export function declaredReferenceCoverage(input) {
|
|
26
|
+
const anchors = input.anchors ?? [];
|
|
27
|
+
const invalidRefs = input.references.filter((c) => c.outcome === ReferenceCheckOutcome.Invalid);
|
|
28
|
+
const invalidAnchors = anchors.filter((a) => a.outcome === ReferenceCheckOutcome.Invalid);
|
|
29
|
+
const invalidCount = invalidRefs.length + invalidAnchors.length;
|
|
30
|
+
const invalidLabels = [
|
|
31
|
+
...invalidRefs.map((c) => `${c.entryId} → ${formatKnowledgeReference(c.reference)}`),
|
|
32
|
+
...invalidAnchors.map((a) => `${a.entryId} anchor[${a.anchor.id}]`),
|
|
33
|
+
];
|
|
34
|
+
const checkable = input.references.filter((c) => isCheckableOutcome(c.outcome)).length +
|
|
35
|
+
anchors.filter((a) => isCheckableOutcome(a.outcome)).length;
|
|
36
|
+
return {
|
|
37
|
+
unit: 'declared references',
|
|
38
|
+
expected: checkable + invalidCount,
|
|
39
|
+
examined: checkable,
|
|
40
|
+
...(invalidCount > 0
|
|
41
|
+
? {
|
|
42
|
+
unexamined: invalidLabels.slice(0, LABEL_CAP),
|
|
43
|
+
unexaminedTotal: invalidCount,
|
|
44
|
+
reason: MALFORMED_REFERENCE_REASON,
|
|
45
|
+
}
|
|
46
|
+
: checkable === 0
|
|
47
|
+
? { reason: 'no entry in scope declares a checkable reference' }
|
|
48
|
+
: {}),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one declared cross-reference id resolved.
|
|
3
|
+
*
|
|
4
|
+
* `Unverified` is its own outcome, never folded into either of the others: an
|
|
5
|
+
* id checked against a registry that was never warmed (or is empty) could not
|
|
6
|
+
* be looked up, and reporting it `Dangling` is how a correct id gets flagged,
|
|
7
|
+
* while reporting it `Ok` is how a dead one ships.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum DeclaredXrefStatus {
|
|
10
|
+
/** Resolves in a kind the field accepts. */
|
|
11
|
+
Ok = "ok",
|
|
12
|
+
/** Resolves in NO registry. */
|
|
13
|
+
Dangling = "dangling",
|
|
14
|
+
/** Resolves, but only in kinds the field does not accept (a template id in `relatedRules`). */
|
|
15
|
+
WrongKind = "wrong-kind",
|
|
16
|
+
/** Could not be decided — an accepted registry was not warmed, or is empty. NOT VERIFIED. */
|
|
17
|
+
Unverified = "unverified"
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=declared-xref-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-xref-status.d.ts","sourceRoot":"","sources":["../src/declared-xref-status.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,oBAAY,kBAAkB;IAC5B,4CAA4C;IAC5C,EAAE,OAAO;IACT,+BAA+B;IAC/B,QAAQ,aAAa;IACrB,+FAA+F;IAC/F,SAAS,eAAe;IACxB,6FAA6F;IAC7F,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one declared cross-reference id resolved.
|
|
3
|
+
*
|
|
4
|
+
* `Unverified` is its own outcome, never folded into either of the others: an
|
|
5
|
+
* id checked against a registry that was never warmed (or is empty) could not
|
|
6
|
+
* be looked up, and reporting it `Dangling` is how a correct id gets flagged,
|
|
7
|
+
* while reporting it `Ok` is how a dead one ships.
|
|
8
|
+
*/
|
|
9
|
+
export var DeclaredXrefStatus;
|
|
10
|
+
(function (DeclaredXrefStatus) {
|
|
11
|
+
/** Resolves in a kind the field accepts. */
|
|
12
|
+
DeclaredXrefStatus["Ok"] = "ok";
|
|
13
|
+
/** Resolves in NO registry. */
|
|
14
|
+
DeclaredXrefStatus["Dangling"] = "dangling";
|
|
15
|
+
/** Resolves, but only in kinds the field does not accept (a template id in `relatedRules`). */
|
|
16
|
+
DeclaredXrefStatus["WrongKind"] = "wrong-kind";
|
|
17
|
+
/** Could not be decided — an accepted registry was not warmed, or is empty. NOT VERIFIED. */
|
|
18
|
+
DeclaredXrefStatus["Unverified"] = "unverified";
|
|
19
|
+
})(DeclaredXrefStatus || (DeclaredXrefStatus = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type IDelegateRecipe } from '@shrkcrft/core';
|
|
2
|
-
import type
|
|
1
|
+
import { type IDelegateRecipe, type IRejectedEntry } from '@shrkcrft/core';
|
|
2
|
+
import { type ISharkCraftConfig } from '@shrkcrft/config';
|
|
3
3
|
import { type IDiscoveredPack } from '@shrkcrft/packs';
|
|
4
4
|
import { type IResolvedDelegateRecipe } from './delegate-catalog.js';
|
|
5
5
|
export interface IPackDelegateRecipe {
|
|
@@ -12,11 +12,22 @@ export interface IPackRecipeIssue {
|
|
|
12
12
|
severity: 'warning' | 'error';
|
|
13
13
|
message: string;
|
|
14
14
|
source?: string;
|
|
15
|
+
/** `load-failed` / `missing-file` — lifted into THE contribution load-failure map (round 12). */
|
|
16
|
+
code?: 'load-failed' | 'missing-file';
|
|
15
17
|
}
|
|
16
18
|
export interface ILoadPackRecipesResult {
|
|
17
19
|
recipes: readonly IPackDelegateRecipe[];
|
|
18
20
|
issues: readonly IPackRecipeIssue[];
|
|
21
|
+
/** Every declared recipe the loader refused — invalid or a duplicate id (round 12, 12.1). */
|
|
22
|
+
rejected: readonly IRejectedEntry[];
|
|
19
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* THE pack delegate-recipe acceptance predicate (round 12, 12.1): the SAME
|
|
26
|
+
* zod schema the config loader validates an inline recipe with
|
|
27
|
+
* (`DelegateRecipeSchema`), one `<path>: <message>` per issue — `[]` means
|
|
28
|
+
* accepted. A pack recipe used to be accepted with no validation at all.
|
|
29
|
+
*/
|
|
30
|
+
export declare function delegateRecipeRejectionReasons(raw: unknown): readonly string[];
|
|
20
31
|
export declare function loadDelegateRecipesFromPacks(validPacks: readonly IDiscoveredPack[]): Promise<ILoadPackRecipesResult>;
|
|
21
32
|
/**
|
|
22
33
|
* One-shot: discover packs under `projectRoot`, load their delegate recipes, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate-pack-recipes.d.ts","sourceRoot":"","sources":["../src/delegate-pack-recipes.ts"],"names":[],"mappings":"AAWA,OAAO,
|
|
1
|
+
{"version":3,"file":"delegate-pack-recipes.d.ts","sourceRoot":"","sources":["../src/delegate-pack-recipes.ts"],"names":[],"mappings":"AAWA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAA0B,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAE7F,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iGAAiG;IACjG,IAAI,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACxC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAI9E;AAED,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,SAAS,eAAe,EAAE,GACrC,OAAO,CAAC,sBAAsB,CAAC,CA0DjC;AAED;;;;;;GAMG;AACH,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAY7C"}
|
|
@@ -9,22 +9,27 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { existsSync } from 'node:fs';
|
|
11
11
|
import * as nodePath from 'node:path';
|
|
12
|
-
import { importModuleViaLoader } from '@shrkcrft/core';
|
|
12
|
+
import { importModuleViaLoader, readContributionExport, RejectionCause, } from '@shrkcrft/core';
|
|
13
|
+
import { DelegateRecipeSchema } from '@shrkcrft/config';
|
|
13
14
|
import { discoverPacks } from '@shrkcrft/packs';
|
|
14
15
|
import { resolveDelegateCatalog } from "./delegate-catalog.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
/**
|
|
17
|
+
* THE pack delegate-recipe acceptance predicate (round 12, 12.1): the SAME
|
|
18
|
+
* zod schema the config loader validates an inline recipe with
|
|
19
|
+
* (`DelegateRecipeSchema`), one `<path>: <message>` per issue — `[]` means
|
|
20
|
+
* accepted. A pack recipe used to be accepted with no validation at all.
|
|
21
|
+
*/
|
|
22
|
+
export function delegateRecipeRejectionReasons(raw) {
|
|
23
|
+
const parsed = DelegateRecipeSchema.safeParse(raw);
|
|
24
|
+
if (parsed.success)
|
|
25
|
+
return [];
|
|
26
|
+
return parsed.error.issues.map((i) => `${i.path.join('.') || '(entry)'}: ${i.message}`);
|
|
24
27
|
}
|
|
25
28
|
export async function loadDelegateRecipesFromPacks(validPacks) {
|
|
26
29
|
const recipes = [];
|
|
27
30
|
const issues = [];
|
|
31
|
+
const rejected = [];
|
|
32
|
+
const seen = new Map();
|
|
28
33
|
for (const pack of validPacks) {
|
|
29
34
|
const files = pack.manifest?.contributions?.delegateRecipeFiles ?? [];
|
|
30
35
|
for (const rel of files) {
|
|
@@ -32,27 +37,53 @@ export async function loadDelegateRecipesFromPacks(validPacks) {
|
|
|
32
37
|
if (!existsSync(file)) {
|
|
33
38
|
issues.push({
|
|
34
39
|
severity: 'warning',
|
|
40
|
+
code: 'missing-file',
|
|
35
41
|
message: `Pack ${pack.packageName} declares ${rel} but the file is missing.`,
|
|
36
42
|
source: file,
|
|
37
43
|
});
|
|
38
44
|
continue;
|
|
39
45
|
}
|
|
40
46
|
try {
|
|
41
|
-
const
|
|
42
|
-
|
|
47
|
+
const exp = readContributionExport(await importModuleViaLoader(file), { namedKeys: ['delegateRecipes'] });
|
|
48
|
+
exp.items.forEach((raw, i) => {
|
|
49
|
+
const at = {
|
|
50
|
+
file,
|
|
51
|
+
index: exp.single ? -1 : i,
|
|
52
|
+
...(exp.exportName ? { exportName: exp.exportName } : {}),
|
|
53
|
+
};
|
|
54
|
+
const rawId = raw && typeof raw === 'object' ? raw.id : undefined;
|
|
55
|
+
const id = typeof rawId === 'string' ? rawId : undefined;
|
|
56
|
+
const reasons = delegateRecipeRejectionReasons(raw);
|
|
57
|
+
if (reasons.length > 0) {
|
|
58
|
+
rejected.push({ ...at, ...(id ? { entryId: id } : {}), reasons, cause: RejectionCause.Invalid });
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const recipe = raw;
|
|
62
|
+
const prev = seen.get(recipe.id);
|
|
63
|
+
if (prev !== undefined) {
|
|
64
|
+
rejected.push({
|
|
65
|
+
...at,
|
|
66
|
+
entryId: recipe.id,
|
|
67
|
+
reasons: [`id: "${recipe.id}" is already declared in ${prev}`],
|
|
68
|
+
cause: RejectionCause.DuplicateId,
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
seen.set(recipe.id, `${pack.packageName} (${rel})`);
|
|
43
73
|
recipes.push({ recipe, packageName: pack.packageName, sourceFile: rel });
|
|
44
|
-
}
|
|
74
|
+
});
|
|
45
75
|
}
|
|
46
76
|
catch (e) {
|
|
47
77
|
issues.push({
|
|
48
78
|
severity: 'warning',
|
|
79
|
+
code: 'load-failed',
|
|
49
80
|
message: `Pack ${pack.packageName} (${rel}): ${e.message}`,
|
|
50
81
|
source: file,
|
|
51
82
|
});
|
|
52
83
|
}
|
|
53
84
|
}
|
|
54
85
|
}
|
|
55
|
-
return { recipes, issues };
|
|
86
|
+
return { recipes, issues, rejected };
|
|
56
87
|
}
|
|
57
88
|
/**
|
|
58
89
|
* One-shot: discover packs under `projectRoot`, load their delegate recipes, and
|
package/dist/demo-package.js
CHANGED
|
@@ -12,7 +12,7 @@ function readme(scenarios) {
|
|
|
12
12
|
const lines = [];
|
|
13
13
|
lines.push('# SharkCraft demo package');
|
|
14
14
|
lines.push('');
|
|
15
|
-
lines.push('Generated by
|
|
15
|
+
lines.push('Generated by SharkCraft (demo package). Drop this folder onto another machine,');
|
|
16
16
|
lines.push('read `expected-commands.md`, then run `demo.sh` after reviewing it.');
|
|
17
17
|
lines.push('');
|
|
18
18
|
lines.push('## Scenarios');
|
|
@@ -45,7 +45,7 @@ function readme(scenarios) {
|
|
|
45
45
|
function combinedDemoScript(scenarios) {
|
|
46
46
|
const lines = [];
|
|
47
47
|
lines.push('#!/usr/bin/env bash');
|
|
48
|
-
lines.push('# SharkCraft demo bundle — generated by
|
|
48
|
+
lines.push('# SharkCraft demo bundle — generated by SharkCraft (demo package).');
|
|
49
49
|
lines.push('# Each scenario is delegated to its scenario-<name>.sh file so you can');
|
|
50
50
|
lines.push('# run them individually or as a group. Nothing destructive runs here.');
|
|
51
51
|
lines.push('set -euo pipefail');
|
package/dist/demo-script.js
CHANGED
|
@@ -111,8 +111,8 @@ const SCRIPTS = {
|
|
|
111
111
|
{
|
|
112
112
|
title: 'Compare quality baselines',
|
|
113
113
|
commands: [
|
|
114
|
-
'shrk quality
|
|
115
|
-
'shrk quality
|
|
114
|
+
'shrk quality --json',
|
|
115
|
+
'shrk report quality --format json',
|
|
116
116
|
],
|
|
117
117
|
},
|
|
118
118
|
{
|
package/dist/demo-workflow.js
CHANGED
|
@@ -9,7 +9,7 @@ export const DEMO_WORKFLOW_SCHEMA = 'sharkcraft.demo-workflow/v1';
|
|
|
9
9
|
function ghaPrReview(bun) {
|
|
10
10
|
const lines = [];
|
|
11
11
|
lines.push('# SharkCraft demo PR review workflow.');
|
|
12
|
-
lines.push('# Generated by
|
|
12
|
+
lines.push('# Generated by SharkCraft (demo PR-review workflow, github-actions).');
|
|
13
13
|
lines.push('# - runs the read-only review surface on every PR.');
|
|
14
14
|
lines.push('# - no publishing, no posting comments by default.');
|
|
15
15
|
lines.push('# - uncomment the optional `gh pr comment` step to opt into PR comment posting.');
|
|
@@ -70,7 +70,7 @@ function ghaPrReview(bun) {
|
|
|
70
70
|
function gitlabPrReview(bun) {
|
|
71
71
|
const lines = [];
|
|
72
72
|
lines.push('# SharkCraft demo PR review pipeline.');
|
|
73
|
-
lines.push('# Generated by
|
|
73
|
+
lines.push('# Generated by SharkCraft (demo PR-review workflow, gitlab).');
|
|
74
74
|
lines.push('# - runs the read-only review surface on every MR.');
|
|
75
75
|
lines.push('# - no publishing, no posting comments by default.');
|
|
76
76
|
lines.push('');
|
|
@@ -114,7 +114,7 @@ function gitlabPrReview(bun) {
|
|
|
114
114
|
function bitbucketPrReview(bun) {
|
|
115
115
|
const lines = [];
|
|
116
116
|
lines.push('# SharkCraft demo PR review pipeline.');
|
|
117
|
-
lines.push('# Generated by
|
|
117
|
+
lines.push('# Generated by SharkCraft (demo PR-review workflow, bitbucket).');
|
|
118
118
|
lines.push('# - runs the read-only review surface on every pull request.');
|
|
119
119
|
lines.push('# - no publishing, no posting comments by default.');
|
|
120
120
|
lines.push('');
|
package/dist/dev-cycle.js
CHANGED
|
@@ -63,7 +63,7 @@ const RELEASE = {
|
|
|
63
63
|
{ id: 'release-readiness', title: 'Release readiness (strict)', command: 'shrk release readiness --strict', canFail: false, category: 'gate' },
|
|
64
64
|
{ id: 'release-smoke', title: 'Release smoke (default scenarios)', command: 'shrk release smoke', canFail: true, category: 'gate' },
|
|
65
65
|
{ id: 'safety-audit', title: 'Safety audit', command: 'shrk safety audit', canFail: false, category: 'audit' },
|
|
66
|
-
{ id: 'product-check', title: 'Product check', command: 'shrk
|
|
66
|
+
{ id: 'product-check', title: 'Product check', command: 'shrk quality', canFail: true, category: 'gate' },
|
|
67
67
|
{ id: 'commands-doctor', title: 'Commands doctor', command: 'shrk commands doctor', canFail: true, category: 'doctor' },
|
|
68
68
|
],
|
|
69
69
|
};
|
package/dist/dev-session.js
CHANGED
|
@@ -243,7 +243,7 @@ export function computeDevNextAction(load) {
|
|
|
243
243
|
if (state?.phase === DevSessionPhase.Completed) {
|
|
244
244
|
return {
|
|
245
245
|
action: 'Session complete',
|
|
246
|
-
command: `shrk
|
|
246
|
+
command: `shrk dev reports ${id}`,
|
|
247
247
|
reason: 'Final report has been generated.',
|
|
248
248
|
requiresHumanApproval: false,
|
|
249
249
|
};
|
package/dist/doc-references.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IDocReferenceRule, type IUnitLiveness, type IUnitStateLists, type IVerdictCoverage } from '@shrkcrft/core';
|
|
2
|
+
import { type IReadScope } from '@shrkcrft/boundaries';
|
|
2
3
|
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
3
4
|
/**
|
|
4
5
|
* The prose-reference linter.
|
|
@@ -53,7 +54,27 @@ export interface IDocReferenceResult {
|
|
|
53
54
|
readonly tokens: readonly IDocReferenceToken[];
|
|
54
55
|
readonly skipReason?: string;
|
|
55
56
|
readonly error?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Set only when a document the globs matched was NOT read (over the read
|
|
59
|
+
* cap, or unreadable): the documents read, and the unread ones. A reference
|
|
60
|
+
* in an unread document was never checked, so the rule's coverage names it
|
|
61
|
+
* (`readScopeCoverage`) and it is never a pass.
|
|
62
|
+
*/
|
|
63
|
+
readonly readScope?: IReadScope;
|
|
64
|
+
/**
|
|
65
|
+
* Set only when the rule is INTENDED-empty (round 13): every inclusion glob
|
|
66
|
+
* of its `files` is marked `expectEmpty` and no document matched. It is the
|
|
67
|
+
* settle's acceptance and stands in for the rule's own coverage record
|
|
68
|
+
* (`docReferenceCoverage`), so the rule passes with the acceptance printed.
|
|
69
|
+
*/
|
|
70
|
+
readonly emptyCoverage?: IVerdictCoverage;
|
|
71
|
+
/** Settle record B of the rule's `files` — the acceptance of its intended-empty units. */
|
|
72
|
+
readonly unitAcceptance?: IVerdictCoverage;
|
|
73
|
+
/** The rule's dead / intended-empty / went-live `files` units as printed lines (`unitStateLists`). */
|
|
74
|
+
readonly units?: IUnitStateLists;
|
|
75
|
+
/** The rule's non-live `files` units, for `--fail-on-dead-units` (`selectorUnitFails`). */
|
|
76
|
+
readonly unitLiveness?: readonly IUnitLiveness[];
|
|
56
77
|
}
|
|
57
78
|
/** Evaluate one doc-reference rule against the tree. */
|
|
58
|
-
export declare function checkDocReferences(projectRoot: string,
|
|
79
|
+
export declare function checkDocReferences(projectRoot: string, authored: IDocReferenceRule, inspection: ISharkcraftInspection, excludeDirs?: readonly string[]): IDocReferenceResult;
|
|
59
80
|
//# sourceMappingURL=doc-references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-references.d.ts","sourceRoot":"","sources":["../src/doc-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"doc-references.d.ts","sourceRoot":"","sources":["../src/doc-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAS9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;;;;;;;GAWG;AAEH,qCAAqC;AACrC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,eAAe,CAAC;CAC3D;AAED,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0BAA0B;AAC1B,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3D,mCAAmC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,qEAAqE;IACrE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACnD,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,gBAAgB,CAAC;IAC1C,0FAA0F;IAC1F,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAC3C,sGAAsG;IACtG,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACjC,2FAA2F;IAC3F,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CAClD;AAmDD,wDAAwD;AACxD,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,iBAAiB,EAC3B,UAAU,EAAE,qBAAqB,EACjC,WAAW,GAAE,SAAS,MAAM,EAAO,GAClC,mBAAmB,CA4OrB"}
|
package/dist/doc-references.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { failsWhenEmpty, normalizeRuleList, RuleEmptiness, settleRuleEmptiness, unitStateLists, UnitLivenessState, } from '@shrkcrft/core';
|
|
2
|
+
import { dotDirsNamedBy, readGlobListLiveness, readSelectedFiles, safeCompile, } from '@shrkcrft/boundaries';
|
|
2
3
|
import { nearestIds } from "./nearest-id.js";
|
|
3
4
|
import { emptyReferenceKinds, isCacheBackedKind, referenceIdExists, referenceIdPool, } from "./reference-registry.js";
|
|
4
5
|
/** Matches `<!-- marker -->`, with or without a trailing `: reason`. */
|
|
@@ -46,13 +47,46 @@ function passesContext(rule, line, index, insideFence) {
|
|
|
46
47
|
return backtickRanges(line).some((r) => index >= r.start && index < r.end);
|
|
47
48
|
}
|
|
48
49
|
/** Evaluate one doc-reference rule against the tree. */
|
|
49
|
-
export function checkDocReferences(projectRoot,
|
|
50
|
-
const severity =
|
|
50
|
+
export function checkDocReferences(projectRoot, authored, inspection, excludeDirs = []) {
|
|
51
|
+
const severity = authored.severity ?? 'error';
|
|
51
52
|
const base = {
|
|
52
|
-
ruleId:
|
|
53
|
-
...(
|
|
53
|
+
ruleId: authored.id,
|
|
54
|
+
...(authored.description ? { description: authored.description } : {}),
|
|
54
55
|
severity,
|
|
55
56
|
};
|
|
57
|
+
// The engine entry normalises idempotently (round 13): a loaded rule comes
|
|
58
|
+
// back as the SAME object; a hand-built `{ pattern, expectEmpty }` entry is a
|
|
59
|
+
// glob plus a marker; a malformed entry is a misconfigured rule, never a crash.
|
|
60
|
+
const normalized = normalizeRuleList(authored, 'files');
|
|
61
|
+
if (!normalized.ok) {
|
|
62
|
+
return {
|
|
63
|
+
...base,
|
|
64
|
+
status: 'error',
|
|
65
|
+
filesScanned: 0,
|
|
66
|
+
tokensChecked: 0,
|
|
67
|
+
tokensSkipped: 0,
|
|
68
|
+
findings: [],
|
|
69
|
+
tokens: [],
|
|
70
|
+
error: `files ${normalized.error.message}`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const rule = normalized.value;
|
|
74
|
+
// The rule's `files` judged per unit off the walk the check reads (its
|
|
75
|
+
// dot-dirs included) and settled with its `expectEmpty` markers — what an
|
|
76
|
+
// empty rule is decided from, and what rides on the result.
|
|
77
|
+
const live = readGlobListLiveness(projectRoot, 'files', rule.files, rule.expectEmptyUnits ?? [], {
|
|
78
|
+
subject: rule.id,
|
|
79
|
+
excludeDirs: new Set(excludeDirs),
|
|
80
|
+
allowDotDirs: dotDirsNamedBy(rule.files),
|
|
81
|
+
});
|
|
82
|
+
const nonLive = live.liveness.units.filter((u) => u.state !== UnitLivenessState.Live);
|
|
83
|
+
const unitFields = {
|
|
84
|
+
...(live.liveness.acceptance !== undefined ? { unitAcceptance: live.liveness.acceptance } : {}),
|
|
85
|
+
...(live.liveness.dead.length + live.liveness.intendedEmpty.length + live.liveness.wentLive.length > 0
|
|
86
|
+
? { units: unitStateLists(live.liveness) }
|
|
87
|
+
: {}),
|
|
88
|
+
...(nonLive.length > 0 ? { unitLiveness: nonLive } : {}),
|
|
89
|
+
};
|
|
56
90
|
const compiled = safeCompile(rule.tokenPattern, `${rule.tokenPatternFlags ?? ''}g`);
|
|
57
91
|
if (compiled.error || !compiled.re) {
|
|
58
92
|
return {
|
|
@@ -93,10 +127,11 @@ export function checkDocReferences(projectRoot, rule, inspection, excludeDirs =
|
|
|
93
127
|
// Prose lives in places the code walkers deliberately avoid — an agent skill
|
|
94
128
|
// file sits in `.claude/skills`. The rule's own globs say which dot-dirs it
|
|
95
129
|
// means, and it gets exactly those.
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
130
|
+
// The files the rule's list SELECTS: a `!docs/drafts/**` entry excludes.
|
|
131
|
+
const matched = readSelectedFiles(projectRoot, rule.files, new Set(excludeDirs), dotDirsNamedBy(rule.files));
|
|
132
|
+
const docs = [...matched.files.entries()].sort(([a], [b]) => a.localeCompare(b));
|
|
133
|
+
const unread = matched.unread;
|
|
134
|
+
const readScope = unread.length > 0 ? { read: docs.length, unread } : undefined;
|
|
100
135
|
const pool = referenceIdPool(inspection, kinds);
|
|
101
136
|
const exempt = new Set(rule.exempt ?? []);
|
|
102
137
|
const marker = rule.exemptMarker;
|
|
@@ -158,24 +193,66 @@ export function checkDocReferences(projectRoot, rule, inspection, excludeDirs =
|
|
|
158
193
|
}
|
|
159
194
|
const tokensChecked = tokens.filter((t) => t.skipped === undefined).length;
|
|
160
195
|
const tokensSkipped = tokens.length - tokensChecked;
|
|
196
|
+
// Its globs matched a document the reader could not read: its zero is not
|
|
197
|
+
// "matched nothing". It ran over everything readable and is PARTIAL (its
|
|
198
|
+
// coverage names the unread document), never failOnEmpty's 1 and never a pass.
|
|
199
|
+
if (tokensChecked === 0 && readScope !== undefined) {
|
|
200
|
+
return {
|
|
201
|
+
...base,
|
|
202
|
+
status: 'passed',
|
|
203
|
+
filesScanned: docs.length,
|
|
204
|
+
tokensChecked,
|
|
205
|
+
tokensSkipped,
|
|
206
|
+
findings: [],
|
|
207
|
+
tokens,
|
|
208
|
+
readScope,
|
|
209
|
+
...unitFields,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
161
212
|
// A rule that CHECKED nothing enforced nothing. Which of "0 docs" or "0
|
|
162
213
|
// tokens" happened matters to whoever has to fix it, so the reason says.
|
|
163
214
|
if (tokensChecked === 0) {
|
|
164
|
-
|
|
215
|
+
// THE rule-emptiness settle (round 13, `settleRuleEmptiness`), with THE
|
|
216
|
+
// failOnEmpty authority (`failsWhenEmpty`) — never re-derived inline. Every
|
|
217
|
+
// inclusion glob of `files` marked `expectEmpty` and no document matched →
|
|
218
|
+
// the intended empty, accepted and printed. Documents that cite no token
|
|
219
|
+
// are the stale-extractor loud skip — never assertable.
|
|
220
|
+
const emptiness = settleRuleEmptiness({
|
|
221
|
+
subject: rule.id,
|
|
222
|
+
unitLabel: 'references',
|
|
223
|
+
filesMatched: docs.length,
|
|
224
|
+
unitsMatched: 0,
|
|
225
|
+
unread: false,
|
|
226
|
+
liveness: live.liveness,
|
|
227
|
+
primaryLists: ['files'],
|
|
228
|
+
failOnEmpty: failsWhenEmpty(rule),
|
|
229
|
+
noFilesReason: `0 documents matched (${rule.files.join(', ')})`,
|
|
230
|
+
noUnitsReason: `${docs.length} document(s) scanned but no token counted as a reference` +
|
|
231
|
+
(tokensSkipped > 0 ? ` (${tokensSkipped} matched and were skipped — check \`requireContext\`)` : ''),
|
|
232
|
+
});
|
|
233
|
+
if (emptiness.state === RuleEmptiness.IntendedEmpty && emptiness.coverage !== undefined) {
|
|
234
|
+
return {
|
|
235
|
+
...base,
|
|
236
|
+
status: 'passed',
|
|
237
|
+
filesScanned: docs.length,
|
|
238
|
+
tokensChecked,
|
|
239
|
+
tokensSkipped,
|
|
240
|
+
findings: [],
|
|
241
|
+
tokens,
|
|
242
|
+
...unitFields,
|
|
243
|
+
emptyCoverage: emptiness.coverage,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
165
246
|
return {
|
|
166
247
|
...base,
|
|
167
|
-
status:
|
|
248
|
+
status: emptiness.fails ? 'failed' : 'skipped',
|
|
168
249
|
filesScanned: docs.length,
|
|
169
250
|
tokensChecked,
|
|
170
251
|
tokensSkipped,
|
|
171
252
|
findings: [],
|
|
172
253
|
tokens,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
: `${docs.length} document(s) scanned but no token counted as a reference` +
|
|
176
|
-
(tokensSkipped > 0
|
|
177
|
-
? ` (${tokensSkipped} matched and were skipped — check \`requireContext\`)`
|
|
178
|
-
: ''),
|
|
254
|
+
...unitFields,
|
|
255
|
+
...(emptiness.skipReason !== undefined ? { skipReason: emptiness.skipReason } : {}),
|
|
179
256
|
};
|
|
180
257
|
}
|
|
181
258
|
return {
|
|
@@ -186,5 +263,7 @@ export function checkDocReferences(projectRoot, rule, inspection, excludeDirs =
|
|
|
186
263
|
tokensSkipped,
|
|
187
264
|
findings,
|
|
188
265
|
tokens,
|
|
266
|
+
...(readScope !== undefined ? { readScope } : {}),
|
|
267
|
+
...unitFields,
|
|
189
268
|
};
|
|
190
269
|
}
|
package/dist/doctor-result.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IVerdictCoverage } from '@shrkcrft/core';
|
|
1
2
|
export declare enum DoctorSeverity {
|
|
2
3
|
Ok = "ok",
|
|
3
4
|
Info = "info",
|
|
@@ -47,5 +48,12 @@ export interface IDoctorResult {
|
|
|
47
48
|
*/
|
|
48
49
|
advisoryCount?: number;
|
|
49
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Scope the doctor could not verify: today, compiled pack builds with no
|
|
53
|
+
* build record (never compared with their source). `shrk doctor` settles
|
|
54
|
+
* its exit through it (NOT VERIFIED, 2, as `packs doctor` does) and never
|
|
55
|
+
* prints "Ready ✓" over it. Set only when non-empty.
|
|
56
|
+
*/
|
|
57
|
+
coverage?: readonly IVerdictCoverage[];
|
|
50
58
|
}
|
|
51
59
|
//# sourceMappingURL=doctor-result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-result.d.ts","sourceRoot":"","sources":["../src/doctor-result.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf;;;;;WAKG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-result.d.ts","sourceRoot":"","sources":["../src/doctor-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,oBAAY,cAAc;IACxB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf;;;;;WAKG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACxC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one doctor run settles — THE reading of an `IDoctorResult` that every
|
|
3
|
+
* surface shares (`shrk doctor`, `shrk check`, the dashboard, MCP
|
|
4
|
+
* `inspect_sharkcraft_setup`), so none of them can call a setup ready that
|
|
5
|
+
* another calls not verified.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum DoctorVerdictKind {
|
|
8
|
+
/** No error check, and every scope the doctor was asked to verify was verified. */
|
|
9
|
+
Ready = "ready",
|
|
10
|
+
/**
|
|
11
|
+
* No error check, but part of the setup could not be verified (today: a
|
|
12
|
+
* compiled pack build with no build record, never compared with its
|
|
13
|
+
* source). Never "ready".
|
|
14
|
+
*/
|
|
15
|
+
NotVerified = "not-verified",
|
|
16
|
+
/** At least one error-severity check. */
|
|
17
|
+
Errors = "errors"
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=doctor-verdict-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-verdict-kind.d.ts","sourceRoot":"","sources":["../src/doctor-verdict-kind.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,mFAAmF;IACnF,KAAK,UAAU;IACf;;;;OAIG;IACH,WAAW,iBAAiB;IAC5B,yCAAyC;IACzC,MAAM,WAAW;CAClB"}
|