@shrkcrft/inspector 0.1.0-alpha.2
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/acceptance-replay.d.ts +63 -0
- package/dist/acceptance-replay.d.ts.map +1 -0
- package/dist/acceptance-replay.js +240 -0
- package/dist/action-hint-diagnostics.d.ts +32 -0
- package/dist/action-hint-diagnostics.d.ts.map +1 -0
- package/dist/action-hint-diagnostics.js +133 -0
- package/dist/adoption-check.d.ts +28 -0
- package/dist/adoption-check.d.ts.map +1 -0
- package/dist/adoption-check.js +181 -0
- package/dist/adoption-checkpoint.d.ts +97 -0
- package/dist/adoption-checkpoint.d.ts.map +1 -0
- package/dist/adoption-checkpoint.js +209 -0
- package/dist/adoption-merge-preview.d.ts +28 -0
- package/dist/adoption-merge-preview.d.ts.map +1 -0
- package/dist/adoption-merge-preview.js +254 -0
- package/dist/adoption-report-renderer.d.ts +33 -0
- package/dist/adoption-report-renderer.d.ts.map +1 -0
- package/dist/adoption-report-renderer.js +257 -0
- package/dist/adoption-state.d.ts +100 -0
- package/dist/adoption-state.d.ts.map +1 -0
- package/dist/adoption-state.js +296 -0
- package/dist/adoption-three-way.d.ts +46 -0
- package/dist/adoption-three-way.d.ts.map +1 -0
- package/dist/adoption-three-way.js +181 -0
- package/dist/agent-brief.d.ts +77 -0
- package/dist/agent-brief.d.ts.map +1 -0
- package/dist/agent-brief.js +490 -0
- package/dist/agent-contract-gate.d.ts +108 -0
- package/dist/agent-contract-gate.d.ts.map +1 -0
- package/dist/agent-contract-gate.js +412 -0
- package/dist/agent-contract-templates.d.ts +63 -0
- package/dist/agent-contract-templates.d.ts.map +1 -0
- package/dist/agent-contract-templates.js +346 -0
- package/dist/agent-contract.d.ts +65 -0
- package/dist/agent-contract.d.ts.map +1 -0
- package/dist/agent-contract.js +555 -0
- package/dist/agent-handoff.d.ts +123 -0
- package/dist/agent-handoff.d.ts.map +1 -0
- package/dist/agent-handoff.js +470 -0
- package/dist/agent-instructions.d.ts +2 -0
- package/dist/agent-instructions.d.ts.map +1 -0
- package/dist/agent-instructions.js +21 -0
- package/dist/agent-orchestration.d.ts +61 -0
- package/dist/agent-orchestration.d.ts.map +1 -0
- package/dist/agent-orchestration.js +285 -0
- package/dist/agent-task-prep.d.ts +31 -0
- package/dist/agent-task-prep.d.ts.map +1 -0
- package/dist/agent-task-prep.js +73 -0
- package/dist/ai-readiness.d.ts +30 -0
- package/dist/ai-readiness.d.ts.map +1 -0
- package/dist/ai-readiness.js +279 -0
- package/dist/api-report.d.ts +51 -0
- package/dist/api-report.d.ts.map +1 -0
- package/dist/api-report.js +254 -0
- package/dist/apply-dispatch-trace.d.ts +93 -0
- package/dist/apply-dispatch-trace.d.ts.map +1 -0
- package/dist/apply-dispatch-trace.js +283 -0
- package/dist/apply-gate-result.d.ts +52 -0
- package/dist/apply-gate-result.d.ts.map +1 -0
- package/dist/apply-gate-result.js +44 -0
- package/dist/architecture-map.d.ts +118 -0
- package/dist/architecture-map.d.ts.map +1 -0
- package/dist/architecture-map.js +543 -0
- package/dist/area-explore.d.ts +75 -0
- package/dist/area-explore.d.ts.map +1 -0
- package/dist/area-explore.js +438 -0
- package/dist/area-map.d.ts +43 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +197 -0
- package/dist/asset-provenance.d.ts +123 -0
- package/dist/asset-provenance.d.ts.map +1 -0
- package/dist/asset-provenance.js +209 -0
- package/dist/barrel-operations.d.ts +45 -0
- package/dist/barrel-operations.d.ts.map +1 -0
- package/dist/barrel-operations.js +159 -0
- package/dist/boundaries-changed-only.d.ts +62 -0
- package/dist/boundaries-changed-only.d.ts.map +1 -0
- package/dist/boundaries-changed-only.js +97 -0
- package/dist/boundary-suggestions.d.ts +20 -0
- package/dist/boundary-suggestions.d.ts.map +1 -0
- package/dist/boundary-suggestions.js +51 -0
- package/dist/bundle-diff.d.ts +98 -0
- package/dist/bundle-diff.d.ts.map +1 -0
- package/dist/bundle-diff.js +531 -0
- package/dist/bundle-replay.d.ts +68 -0
- package/dist/bundle-replay.d.ts.map +1 -0
- package/dist/bundle-replay.js +273 -0
- package/dist/bundle-validate-html.d.ts +11 -0
- package/dist/bundle-validate-html.d.ts.map +1 -0
- package/dist/bundle-validate-html.js +60 -0
- package/dist/change-intent.d.ts +36 -0
- package/dist/change-intent.d.ts.map +1 -0
- package/dist/change-intent.js +259 -0
- package/dist/changed-preflight.d.ts +59 -0
- package/dist/changed-preflight.d.ts.map +1 -0
- package/dist/changed-preflight.js +358 -0
- package/dist/changed-scope.d.ts +112 -0
- package/dist/changed-scope.d.ts.map +1 -0
- package/dist/changed-scope.js +172 -0
- package/dist/changes-summary.d.ts +87 -0
- package/dist/changes-summary.d.ts.map +1 -0
- package/dist/changes-summary.js +323 -0
- package/dist/check-result-v1.d.ts +90 -0
- package/dist/check-result-v1.d.ts.map +1 -0
- package/dist/check-result-v1.js +335 -0
- package/dist/ci-integrity-report.d.ts +38 -0
- package/dist/ci-integrity-report.d.ts.map +1 -0
- package/dist/ci-integrity-report.js +324 -0
- package/dist/ci-permissions-fix.d.ts +38 -0
- package/dist/ci-permissions-fix.d.ts.map +1 -0
- package/dist/ci-permissions-fix.js +201 -0
- package/dist/ci-permissions.d.ts +51 -0
- package/dist/ci-permissions.d.ts.map +1 -0
- package/dist/ci-permissions.js +431 -0
- package/dist/ci-predict.d.ts +42 -0
- package/dist/ci-predict.d.ts.map +1 -0
- package/dist/ci-predict.js +300 -0
- package/dist/ci-scaffold.d.ts +47 -0
- package/dist/ci-scaffold.d.ts.map +1 -0
- package/dist/ci-scaffold.js +638 -0
- package/dist/codemod-assist.d.ts +97 -0
- package/dist/codemod-assist.d.ts.map +1 -0
- package/dist/codemod-assist.js +261 -0
- package/dist/command-recommender.d.ts +25 -0
- package/dist/command-recommender.d.ts.map +1 -0
- package/dist/command-recommender.js +145 -0
- package/dist/command-suggester.d.ts +61 -0
- package/dist/command-suggester.d.ts.map +1 -0
- package/dist/command-suggester.js +159 -0
- package/dist/command-taxonomy.d.ts +38 -0
- package/dist/command-taxonomy.d.ts.map +1 -0
- package/dist/command-taxonomy.js +164 -0
- package/dist/compliance-evidence.d.ts +58 -0
- package/dist/compliance-evidence.d.ts.map +1 -0
- package/dist/compliance-evidence.js +260 -0
- package/dist/compliance-profiles.d.ts +42 -0
- package/dist/compliance-profiles.d.ts.map +1 -0
- package/dist/compliance-profiles.js +171 -0
- package/dist/construct-adoption-diff.d.ts +55 -0
- package/dist/construct-adoption-diff.d.ts.map +1 -0
- package/dist/construct-adoption-diff.js +331 -0
- package/dist/construct-adoption.d.ts +71 -0
- package/dist/construct-adoption.d.ts.map +1 -0
- package/dist/construct-adoption.js +331 -0
- package/dist/construct-inference.d.ts +44 -0
- package/dist/construct-inference.d.ts.map +1 -0
- package/dist/construct-inference.js +391 -0
- package/dist/construct-registry.d.ts +32 -0
- package/dist/construct-registry.d.ts.map +1 -0
- package/dist/construct-registry.js +198 -0
- package/dist/contract-file-rule.d.ts +37 -0
- package/dist/contract-file-rule.d.ts.map +1 -0
- package/dist/contract-file-rule.js +99 -0
- package/dist/contract-template-registry.d.ts +28 -0
- package/dist/contract-template-registry.d.ts.map +1 -0
- package/dist/contract-template-registry.js +161 -0
- package/dist/contradictions.d.ts +52 -0
- package/dist/contradictions.d.ts.map +1 -0
- package/dist/contradictions.js +391 -0
- package/dist/convention-registry.d.ts +44 -0
- package/dist/convention-registry.d.ts.map +1 -0
- package/dist/convention-registry.js +195 -0
- package/dist/coverage-report.d.ts +25 -0
- package/dist/coverage-report.d.ts.map +1 -0
- package/dist/coverage-report.js +190 -0
- package/dist/custom-checks.d.ts +146 -0
- package/dist/custom-checks.d.ts.map +1 -0
- package/dist/custom-checks.js +260 -0
- package/dist/dashboard/dashboard-data.d.ts +59 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -0
- package/dist/dashboard/dashboard-data.js +653 -0
- package/dist/dashboard-export.d.ts +67 -0
- package/dist/dashboard-export.d.ts.map +1 -0
- package/dist/dashboard-export.js +203 -0
- package/dist/decision-records.d.ts +47 -0
- package/dist/decision-records.d.ts.map +1 -0
- package/dist/decision-records.js +255 -0
- package/dist/demo-package.d.ts +49 -0
- package/dist/demo-package.d.ts.map +1 -0
- package/dist/demo-package.js +305 -0
- package/dist/demo-script.d.ts +25 -0
- package/dist/demo-script.d.ts.map +1 -0
- package/dist/demo-script.js +198 -0
- package/dist/demo-workflow.d.ts +28 -0
- package/dist/demo-workflow.d.ts.map +1 -0
- package/dist/demo-workflow.js +178 -0
- package/dist/dev-cycle.d.ts +41 -0
- package/dist/dev-cycle.d.ts.map +1 -0
- package/dist/dev-cycle.js +94 -0
- package/dist/dev-session-html.d.ts +13 -0
- package/dist/dev-session-html.d.ts.map +1 -0
- package/dist/dev-session-html.js +223 -0
- package/dist/dev-session-report.d.ts +11 -0
- package/dist/dev-session-report.d.ts.map +1 -0
- package/dist/dev-session-report.js +206 -0
- package/dist/dev-session.d.ts +257 -0
- package/dist/dev-session.d.ts.map +1 -0
- package/dist/dev-session.js +568 -0
- package/dist/diagnostics-suggest.d.ts +17 -0
- package/dist/diagnostics-suggest.d.ts.map +1 -0
- package/dist/diagnostics-suggest.js +69 -0
- package/dist/docs-check.d.ts +40 -0
- package/dist/docs-check.d.ts.map +1 -0
- package/dist/docs-check.js +221 -0
- package/dist/doctor-acknowledgements.d.ts +69 -0
- package/dist/doctor-acknowledgements.d.ts.map +1 -0
- package/dist/doctor-acknowledgements.js +150 -0
- package/dist/doctor-result.d.ts +51 -0
- package/dist/doctor-result.d.ts.map +1 -0
- package/dist/doctor-result.js +7 -0
- package/dist/doctor-suppressions.d.ts +91 -0
- package/dist/doctor-suppressions.d.ts.map +1 -0
- package/dist/doctor-suppressions.js +238 -0
- package/dist/drift-baseline.d.ts +29 -0
- package/dist/drift-baseline.d.ts.map +1 -0
- package/dist/drift-baseline.js +80 -0
- package/dist/drift.d.ts +38 -0
- package/dist/drift.d.ts.map +1 -0
- package/dist/drift.js +107 -0
- package/dist/entrypoint-matrix.d.ts +61 -0
- package/dist/entrypoint-matrix.d.ts.map +1 -0
- package/dist/entrypoint-matrix.js +221 -0
- package/dist/examples-check.d.ts +36 -0
- package/dist/examples-check.d.ts.map +1 -0
- package/dist/examples-check.js +168 -0
- package/dist/execution-graph.d.ts +98 -0
- package/dist/execution-graph.d.ts.map +1 -0
- package/dist/execution-graph.js +484 -0
- package/dist/export-bundle.d.ts +10 -0
- package/dist/export-bundle.d.ts.map +1 -0
- package/dist/export-bundle.js +90 -0
- package/dist/failure-diagnostics.d.ts +63 -0
- package/dist/failure-diagnostics.d.ts.map +1 -0
- package/dist/failure-diagnostics.js +243 -0
- package/dist/feature-bundle.d.ts +111 -0
- package/dist/feature-bundle.d.ts.map +1 -0
- package/dist/feature-bundle.js +211 -0
- package/dist/feedback-actions-v2.d.ts +65 -0
- package/dist/feedback-actions-v2.d.ts.map +1 -0
- package/dist/feedback-actions-v2.js +183 -0
- package/dist/feedback-ingestion.d.ts +96 -0
- package/dist/feedback-ingestion.d.ts.map +1 -0
- package/dist/feedback-ingestion.js +400 -0
- package/dist/fix-preview.d.ts +82 -0
- package/dist/fix-preview.d.ts.map +1 -0
- package/dist/fix-preview.js +365 -0
- package/dist/fuzzy-impact.d.ts +50 -0
- package/dist/fuzzy-impact.d.ts.map +1 -0
- package/dist/fuzzy-impact.js +446 -0
- package/dist/generated-code.d.ts +97 -0
- package/dist/generated-code.d.ts.map +1 -0
- package/dist/generated-code.js +395 -0
- package/dist/git-helpers.d.ts +26 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +110 -0
- package/dist/golden-output.d.ts +33 -0
- package/dist/golden-output.d.ts.map +1 -0
- package/dist/golden-output.js +92 -0
- package/dist/grounding/build-grounding.d.ts +53 -0
- package/dist/grounding/build-grounding.d.ts.map +1 -0
- package/dist/grounding/build-grounding.js +51 -0
- package/dist/grounding/nx-projects.d.ts +29 -0
- package/dist/grounding/nx-projects.d.ts.map +1 -0
- package/dist/grounding/nx-projects.js +109 -0
- package/dist/grounding/validate-extracted-plan.d.ts +20 -0
- package/dist/grounding/validate-extracted-plan.d.ts.map +1 -0
- package/dist/grounding/validate-extracted-plan.js +127 -0
- package/dist/healing-plan.d.ts +33 -0
- package/dist/healing-plan.d.ts.map +1 -0
- package/dist/healing-plan.js +346 -0
- package/dist/helper-registry.d.ts +90 -0
- package/dist/helper-registry.d.ts.map +1 -0
- package/dist/helper-registry.js +529 -0
- package/dist/impact-analysis.d.ts +150 -0
- package/dist/impact-analysis.d.ts.map +1 -0
- package/dist/impact-analysis.js +697 -0
- package/dist/impact-graph-render.d.ts +51 -0
- package/dist/impact-graph-render.d.ts.map +1 -0
- package/dist/impact-graph-render.js +139 -0
- package/dist/impact-graph.d.ts +17 -0
- package/dist/impact-graph.d.ts.map +1 -0
- package/dist/impact-graph.js +119 -0
- package/dist/impact-render.d.ts +22 -0
- package/dist/impact-render.d.ts.map +1 -0
- package/dist/impact-render.js +413 -0
- package/dist/import-graph-analysis.d.ts +28 -0
- package/dist/import-graph-analysis.d.ts.map +1 -0
- package/dist/import-graph-analysis.js +193 -0
- package/dist/import-hygiene.d.ts +93 -0
- package/dist/import-hygiene.d.ts.map +1 -0
- package/dist/import-hygiene.js +366 -0
- package/dist/index.d.ts +223 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +233 -0
- package/dist/ingest-adoption.d.ts +50 -0
- package/dist/ingest-adoption.d.ts.map +1 -0
- package/dist/ingest-adoption.js +183 -0
- package/dist/ingest-apply.d.ts +80 -0
- package/dist/ingest-apply.d.ts.map +1 -0
- package/dist/ingest-apply.js +227 -0
- package/dist/ingest-body-extractor.d.ts +28 -0
- package/dist/ingest-body-extractor.d.ts.map +1 -0
- package/dist/ingest-body-extractor.js +129 -0
- package/dist/ingest-drafts.d.ts +16 -0
- package/dist/ingest-drafts.d.ts.map +1 -0
- package/dist/ingest-drafts.js +482 -0
- package/dist/inspector-cache.d.ts +41 -0
- package/dist/inspector-cache.d.ts.map +1 -0
- package/dist/inspector-cache.js +104 -0
- package/dist/install-smoke.d.ts +44 -0
- package/dist/install-smoke.d.ts.map +1 -0
- package/dist/install-smoke.js +31 -0
- package/dist/knowledge-authoring.d.ts +151 -0
- package/dist/knowledge-authoring.d.ts.map +1 -0
- package/dist/knowledge-authoring.js +586 -0
- package/dist/knowledge-graph.d.ts +76 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +336 -0
- package/dist/knowledge-lint.d.ts +97 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +302 -0
- package/dist/knowledge-rename.d.ts +38 -0
- package/dist/knowledge-rename.d.ts.map +1 -0
- package/dist/knowledge-rename.js +88 -0
- package/dist/knowledge-stale.d.ts +124 -0
- package/dist/knowledge-stale.d.ts.map +1 -0
- package/dist/knowledge-stale.js +892 -0
- package/dist/languages/command-inference.d.ts +27 -0
- package/dist/languages/command-inference.d.ts.map +1 -0
- package/dist/languages/command-inference.js +214 -0
- package/dist/languages/dependency-scan.d.ts +33 -0
- package/dist/languages/dependency-scan.d.ts.map +1 -0
- package/dist/languages/dependency-scan.js +343 -0
- package/dist/languages/index.d.ts +14 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +13 -0
- package/dist/languages/language-boundaries.d.ts +30 -0
- package/dist/languages/language-boundaries.d.ts.map +1 -0
- package/dist/languages/language-boundaries.js +176 -0
- package/dist/languages/language-cache.d.ts +54 -0
- package/dist/languages/language-cache.d.ts.map +1 -0
- package/dist/languages/language-cache.js +236 -0
- package/dist/languages/language-detection.d.ts +30 -0
- package/dist/languages/language-detection.d.ts.map +1 -0
- package/dist/languages/language-detection.js +584 -0
- package/dist/languages/language-id.d.ts +15 -0
- package/dist/languages/language-id.d.ts.map +1 -0
- package/dist/languages/language-id.js +15 -0
- package/dist/languages/language-runner.d.ts +90 -0
- package/dist/languages/language-runner.d.ts.map +1 -0
- package/dist/languages/language-runner.js +346 -0
- package/dist/languages/polyglot-boundary.d.ts +80 -0
- package/dist/languages/polyglot-boundary.d.ts.map +1 -0
- package/dist/languages/polyglot-boundary.js +373 -0
- package/dist/languages/polyglot-ci.d.ts +25 -0
- package/dist/languages/polyglot-ci.d.ts.map +1 -0
- package/dist/languages/polyglot-ci.js +278 -0
- package/dist/languages/test-impact.d.ts +19 -0
- package/dist/languages/test-impact.d.ts.map +1 -0
- package/dist/languages/test-impact.js +157 -0
- package/dist/loader-diagnostics.d.ts +40 -0
- package/dist/loader-diagnostics.d.ts.map +1 -0
- package/dist/loader-diagnostics.js +49 -0
- package/dist/memory-diff.d.ts +60 -0
- package/dist/memory-diff.d.ts.map +1 -0
- package/dist/memory-diff.js +302 -0
- package/dist/migration-profile-registry.d.ts +26 -0
- package/dist/migration-profile-registry.d.ts.map +1 -0
- package/dist/migration-profile-registry.js +135 -0
- package/dist/migration-readiness.d.ts +101 -0
- package/dist/migration-readiness.d.ts.map +1 -0
- package/dist/migration-readiness.js +253 -0
- package/dist/monorepo-onboarding.d.ts +51 -0
- package/dist/monorepo-onboarding.d.ts.map +1 -0
- package/dist/monorepo-onboarding.js +235 -0
- package/dist/onboarding-adoption-diff.d.ts +53 -0
- package/dist/onboarding-adoption-diff.d.ts.map +1 -0
- package/dist/onboarding-adoption-diff.js +285 -0
- package/dist/onboarding-adoption.d.ts +136 -0
- package/dist/onboarding-adoption.d.ts.map +1 -0
- package/dist/onboarding-adoption.js +702 -0
- package/dist/onboarding-agent-import.d.ts +40 -0
- package/dist/onboarding-agent-import.d.ts.map +1 -0
- package/dist/onboarding-agent-import.js +114 -0
- package/dist/onboarding-diff.d.ts +39 -0
- package/dist/onboarding-diff.d.ts.map +1 -0
- package/dist/onboarding-diff.js +240 -0
- package/dist/onboarding-drafts.d.ts +28 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +234 -0
- package/dist/onboarding-report.d.ts +8 -0
- package/dist/onboarding-report.d.ts.map +1 -0
- package/dist/onboarding-report.js +239 -0
- package/dist/onboarding.d.ts +134 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +729 -0
- package/dist/ownership.d.ts +38 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/ownership.js +102 -0
- package/dist/pack-author-ux.d.ts +58 -0
- package/dist/pack-author-ux.d.ts.map +1 -0
- package/dist/pack-author-ux.js +219 -0
- package/dist/pack-author.d.ts +94 -0
- package/dist/pack-author.d.ts.map +1 -0
- package/dist/pack-author.js +208 -0
- package/dist/pack-compatibility.d.ts +21 -0
- package/dist/pack-compatibility.d.ts.map +1 -0
- package/dist/pack-compatibility.js +114 -0
- package/dist/pack-contributions-inventory.d.ts +121 -0
- package/dist/pack-contributions-inventory.d.ts.map +1 -0
- package/dist/pack-contributions-inventory.js +732 -0
- package/dist/pack-docs.d.ts +11 -0
- package/dist/pack-docs.d.ts.map +1 -0
- package/dist/pack-docs.js +101 -0
- package/dist/pack-doctor.d.ts +50 -0
- package/dist/pack-doctor.d.ts.map +1 -0
- package/dist/pack-doctor.js +302 -0
- package/dist/pack-helper-registry.d.ts +29 -0
- package/dist/pack-helper-registry.d.ts.map +1 -0
- package/dist/pack-helper-registry.js +144 -0
- package/dist/pack-pending.d.ts +68 -0
- package/dist/pack-pending.d.ts.map +1 -0
- package/dist/pack-pending.js +189 -0
- package/dist/pack-quality-score.d.ts +44 -0
- package/dist/pack-quality-score.d.ts.map +1 -0
- package/dist/pack-quality-score.js +155 -0
- package/dist/pack-release-check.d.ts +24 -0
- package/dist/pack-release-check.d.ts.map +1 -0
- package/dist/pack-release-check.js +258 -0
- package/dist/pack-signature-status.d.ts +72 -0
- package/dist/pack-signature-status.d.ts.map +1 -0
- package/dist/pack-signature-status.js +222 -0
- package/dist/pack-symbol-compat.d.ts +60 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +371 -0
- package/dist/pack-test-runner.d.ts +59 -0
- package/dist/pack-test-runner.d.ts.map +1 -0
- package/dist/pack-test-runner.js +211 -0
- package/dist/pipeline-command-dictionary.d.ts +2 -0
- package/dist/pipeline-command-dictionary.d.ts.map +1 -0
- package/dist/pipeline-command-dictionary.js +20 -0
- package/dist/pipeline-lint.d.ts +30 -0
- package/dist/pipeline-lint.d.ts.map +1 -0
- package/dist/pipeline-lint.js +134 -0
- package/dist/plan-dependency-graph.d.ts +25 -0
- package/dist/plan-dependency-graph.d.ts.map +1 -0
- package/dist/plan-dependency-graph.js +195 -0
- package/dist/plan-review.d.ts +64 -0
- package/dist/plan-review.d.ts.map +1 -0
- package/dist/plan-review.js +242 -0
- package/dist/plan-simulation.d.ts +108 -0
- package/dist/plan-simulation.d.ts.map +1 -0
- package/dist/plan-simulation.js +767 -0
- package/dist/playbook-registry.d.ts +25 -0
- package/dist/playbook-registry.d.ts.map +1 -0
- package/dist/playbook-registry.js +148 -0
- package/dist/playbook-script.d.ts +60 -0
- package/dist/playbook-script.d.ts.map +1 -0
- package/dist/playbook-script.js +161 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts +52 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +1 -0
- package/dist/plugin-lifecycle-profile-registry.js +202 -0
- package/dist/plugin-lifecycle.d.ts +132 -0
- package/dist/plugin-lifecycle.d.ts.map +1 -0
- package/dist/plugin-lifecycle.js +477 -0
- package/dist/policy-engine.d.ts +101 -0
- package/dist/policy-engine.d.ts.map +1 -0
- package/dist/policy-engine.js +321 -0
- package/dist/policy-override-audit.d.ts +18 -0
- package/dist/policy-override-audit.d.ts.map +1 -0
- package/dist/policy-override-audit.js +54 -0
- package/dist/policy-overrides.d.ts +35 -0
- package/dist/policy-overrides.d.ts.map +1 -0
- package/dist/policy-overrides.js +84 -0
- package/dist/policy-test.d.ts +83 -0
- package/dist/policy-test.d.ts.map +1 -0
- package/dist/policy-test.js +342 -0
- package/dist/pr-summary.d.ts +34 -0
- package/dist/pr-summary.d.ts.map +1 -0
- package/dist/pr-summary.js +220 -0
- package/dist/product-coherence.d.ts +21 -0
- package/dist/product-coherence.d.ts.map +1 -0
- package/dist/product-coherence.js +158 -0
- package/dist/profile-registry.d.ts +42 -0
- package/dist/profile-registry.d.ts.map +1 -0
- package/dist/profile-registry.js +104 -0
- package/dist/project-coupling-audit.d.ts +64 -0
- package/dist/project-coupling-audit.d.ts.map +1 -0
- package/dist/project-coupling-audit.js +282 -0
- package/dist/project-overview.d.ts +14 -0
- package/dist/project-overview.d.ts.map +1 -0
- package/dist/project-overview.js +27 -0
- package/dist/propose-knowledge.d.ts +64 -0
- package/dist/propose-knowledge.d.ts.map +1 -0
- package/dist/propose-knowledge.js +367 -0
- package/dist/quality-baseline.d.ts +123 -0
- package/dist/quality-baseline.d.ts.map +1 -0
- package/dist/quality-baseline.js +433 -0
- package/dist/quality-html.d.ts +7 -0
- package/dist/quality-html.d.ts.map +1 -0
- package/dist/quality-html.js +64 -0
- package/dist/quality-report.d.ts +49 -0
- package/dist/quality-report.d.ts.map +1 -0
- package/dist/quality-report.js +296 -0
- package/dist/query-resolver.d.ts +38 -0
- package/dist/query-resolver.d.ts.map +1 -0
- package/dist/query-resolver.js +163 -0
- package/dist/ranker-explainability.d.ts +91 -0
- package/dist/ranker-explainability.d.ts.map +1 -0
- package/dist/ranker-explainability.js +550 -0
- package/dist/reference-lookup.d.ts +8 -0
- package/dist/reference-lookup.d.ts.map +1 -0
- package/dist/reference-lookup.js +18 -0
- package/dist/registration-hint-registry.d.ts +55 -0
- package/dist/registration-hint-registry.d.ts.map +1 -0
- package/dist/registration-hint-registry.js +327 -0
- package/dist/registry-lifecycle.d.ts +47 -0
- package/dist/registry-lifecycle.d.ts.map +1 -0
- package/dist/registry-lifecycle.js +214 -0
- package/dist/release-readiness.d.ts +64 -0
- package/dist/release-readiness.d.ts.map +1 -0
- package/dist/release-readiness.js +456 -0
- package/dist/release-smoke.d.ts +138 -0
- package/dist/release-smoke.d.ts.map +1 -0
- package/dist/release-smoke.js +459 -0
- package/dist/release-train.d.ts +33 -0
- package/dist/release-train.d.ts.map +1 -0
- package/dist/release-train.js +104 -0
- package/dist/repo-memory.d.ts +95 -0
- package/dist/repo-memory.d.ts.map +1 -0
- package/dist/repo-memory.js +614 -0
- package/dist/report-site.d.ts +92 -0
- package/dist/report-site.d.ts.map +1 -0
- package/dist/report-site.js +658 -0
- package/dist/reposet.d.ts +56 -0
- package/dist/reposet.d.ts.map +1 -0
- package/dist/reposet.js +160 -0
- package/dist/repository-intelligence.d.ts +145 -0
- package/dist/repository-intelligence.d.ts.map +1 -0
- package/dist/repository-intelligence.js +729 -0
- package/dist/repository-knowledge-model.d.ts +218 -0
- package/dist/repository-knowledge-model.d.ts.map +1 -0
- package/dist/repository-knowledge-model.js +939 -0
- package/dist/repository-map.d.ts +72 -0
- package/dist/repository-map.d.ts.map +1 -0
- package/dist/repository-map.js +332 -0
- package/dist/repository-stats.d.ts +66 -0
- package/dist/repository-stats.d.ts.map +1 -0
- package/dist/repository-stats.js +329 -0
- package/dist/review-comment-renderer.d.ts +59 -0
- package/dist/review-comment-renderer.d.ts.map +1 -0
- package/dist/review-comment-renderer.js +181 -0
- package/dist/review-comment-v2.d.ts +9 -0
- package/dist/review-comment-v2.d.ts.map +1 -0
- package/dist/review-comment-v2.js +178 -0
- package/dist/review-html.d.ts +13 -0
- package/dist/review-html.d.ts.map +1 -0
- package/dist/review-html.js +79 -0
- package/dist/review-packet-v2.d.ts +29 -0
- package/dist/review-packet-v2.d.ts.map +1 -0
- package/dist/review-packet-v2.js +71 -0
- package/dist/review-packet-v3.d.ts +22 -0
- package/dist/review-packet-v3.d.ts.map +1 -0
- package/dist/review-packet-v3.js +181 -0
- package/dist/review-packet.d.ts +49 -0
- package/dist/review-packet.d.ts.map +1 -0
- package/dist/review-packet.js +129 -0
- package/dist/risk-signals.d.ts +28 -0
- package/dist/risk-signals.d.ts.map +1 -0
- package/dist/risk-signals.js +68 -0
- package/dist/role-views.d.ts +50 -0
- package/dist/role-views.d.ts.map +1 -0
- package/dist/role-views.js +334 -0
- package/dist/rounds.d.ts +52 -0
- package/dist/rounds.d.ts.map +1 -0
- package/dist/rounds.js +172 -0
- package/dist/rule-drift.d.ts +42 -0
- package/dist/rule-drift.d.ts.map +1 -0
- package/dist/rule-drift.js +148 -0
- package/dist/rule-quality.d.ts +73 -0
- package/dist/rule-quality.d.ts.map +1 -0
- package/dist/rule-quality.js +356 -0
- package/dist/rule-scaffold.d.ts +71 -0
- package/dist/rule-scaffold.d.ts.map +1 -0
- package/dist/rule-scaffold.js +258 -0
- package/dist/safety-audit-deep.d.ts +38 -0
- package/dist/safety-audit-deep.d.ts.map +1 -0
- package/dist/safety-audit-deep.js +162 -0
- package/dist/safety-audit.d.ts +91 -0
- package/dist/safety-audit.d.ts.map +1 -0
- package/dist/safety-audit.js +138 -0
- package/dist/safety-html.d.ts +7 -0
- package/dist/safety-html.d.ts.map +1 -0
- package/dist/safety-html.js +70 -0
- package/dist/scaffold-coverage.d.ts +46 -0
- package/dist/scaffold-coverage.d.ts.map +1 -0
- package/dist/scaffold-coverage.js +273 -0
- package/dist/scaffold-patterns.d.ts +38 -0
- package/dist/scaffold-patterns.d.ts.map +1 -0
- package/dist/scaffold-patterns.js +282 -0
- package/dist/schema-inventory.d.ts +55 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +301 -0
- package/dist/search-index.d.ts +75 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +531 -0
- package/dist/search-tuning-explain.d.ts +68 -0
- package/dist/search-tuning-explain.d.ts.map +1 -0
- package/dist/search-tuning-explain.js +207 -0
- package/dist/search-tuning-registry.d.ts +54 -0
- package/dist/search-tuning-registry.d.ts.map +1 -0
- package/dist/search-tuning-registry.js +303 -0
- package/dist/self-audit.d.ts +59 -0
- package/dist/self-audit.d.ts.map +1 -0
- package/dist/self-audit.js +192 -0
- package/dist/self-config-doctor-v2.d.ts +57 -0
- package/dist/self-config-doctor-v2.d.ts.map +1 -0
- package/dist/self-config-doctor-v2.js +653 -0
- package/dist/self-config-doctor.d.ts +47 -0
- package/dist/self-config-doctor.d.ts.map +1 -0
- package/dist/self-config-doctor.js +432 -0
- package/dist/sharkcraft-inspector.d.ts +73 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -0
- package/dist/sharkcraft-inspector.js +745 -0
- package/dist/spec/spec-cross-validate.d.ts +17 -0
- package/dist/spec/spec-cross-validate.d.ts.map +1 -0
- package/dist/spec/spec-cross-validate.js +53 -0
- package/dist/spec/spec-discovery.d.ts +27 -0
- package/dist/spec/spec-discovery.d.ts.map +1 -0
- package/dist/spec/spec-discovery.js +78 -0
- package/dist/spec/spec-review.d.ts +36 -0
- package/dist/spec/spec-review.d.ts.map +1 -0
- package/dist/spec/spec-review.js +37 -0
- package/dist/stability-map.d.ts +62 -0
- package/dist/stability-map.d.ts.map +1 -0
- package/dist/stability-map.js +404 -0
- package/dist/start-here.d.ts +49 -0
- package/dist/start-here.d.ts.map +1 -0
- package/dist/start-here.js +259 -0
- package/dist/surface-profile-detect.d.ts +42 -0
- package/dist/surface-profile-detect.d.ts.map +1 -0
- package/dist/surface-profile-detect.js +76 -0
- package/dist/symbol-index.d.ts +108 -0
- package/dist/symbol-index.d.ts.map +1 -0
- package/dist/symbol-index.js +483 -0
- package/dist/task-decompose.d.ts +38 -0
- package/dist/task-decompose.d.ts.map +1 -0
- package/dist/task-decompose.js +154 -0
- package/dist/task-packet.d.ts +104 -0
- package/dist/task-packet.d.ts.map +1 -0
- package/dist/task-packet.js +156 -0
- package/dist/task-ranker.d.ts +51 -0
- package/dist/task-ranker.d.ts.map +1 -0
- package/dist/task-ranker.js +410 -0
- package/dist/task-risk.d.ts +84 -0
- package/dist/task-risk.d.ts.map +1 -0
- package/dist/task-risk.js +731 -0
- package/dist/task-routing-hint-registry.d.ts +36 -0
- package/dist/task-routing-hint-registry.d.ts.map +1 -0
- package/dist/task-routing-hint-registry.js +186 -0
- package/dist/template-authoring.d.ts +113 -0
- package/dist/template-authoring.d.ts.map +1 -0
- package/dist/template-authoring.js +521 -0
- package/dist/template-body-inference-v2.d.ts +19 -0
- package/dist/template-body-inference-v2.d.ts.map +1 -0
- package/dist/template-body-inference-v2.js +468 -0
- package/dist/template-body-inference.d.ts +59 -0
- package/dist/template-body-inference.d.ts.map +1 -0
- package/dist/template-body-inference.js +277 -0
- package/dist/template-drift.d.ts +39 -0
- package/dist/template-drift.d.ts.map +1 -0
- package/dist/template-drift.js +353 -0
- package/dist/template-lint.d.ts +31 -0
- package/dist/template-lint.d.ts.map +1 -0
- package/dist/template-lint.js +113 -0
- package/dist/test-definitions.d.ts +41 -0
- package/dist/test-definitions.d.ts.map +1 -0
- package/dist/test-definitions.js +6 -0
- package/dist/test-impact.d.ts +30 -0
- package/dist/test-impact.d.ts.map +1 -0
- package/dist/test-impact.js +173 -0
- package/dist/test-runner.d.ts +87 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +560 -0
- package/dist/uncertainty-report.d.ts +46 -0
- package/dist/uncertainty-report.d.ts.map +1 -0
- package/dist/uncertainty-report.js +108 -0
- package/dist/uncertainty.d.ts +38 -0
- package/dist/uncertainty.d.ts.map +1 -0
- package/dist/uncertainty.js +115 -0
- package/dist/universal-search.d.ts +64 -0
- package/dist/universal-search.d.ts.map +1 -0
- package/dist/universal-search.js +347 -0
- package/dist/upgrade-advisor.d.ts +22 -0
- package/dist/upgrade-advisor.d.ts.map +1 -0
- package/dist/upgrade-advisor.js +109 -0
- package/dist/why-file.d.ts +75 -0
- package/dist/why-file.d.ts.map +1 -0
- package/dist/why-file.js +202 -0
- package/dist/workflow-simulation.d.ts +46 -0
- package/dist/workflow-simulation.d.ts.map +1 -0
- package/dist/workflow-simulation.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
function nodeKey(kind, id) {
|
|
2
|
+
return `${kind}:${id}`;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Build the full SharkCraft knowledge graph for the current inspection.
|
|
6
|
+
* Pure — no I/O beyond what the inspection already cached.
|
|
7
|
+
*/
|
|
8
|
+
export function buildKnowledgeGraph(inspection) {
|
|
9
|
+
const nodes = [];
|
|
10
|
+
const edges = [];
|
|
11
|
+
const byId = new Map();
|
|
12
|
+
function addNode(n) {
|
|
13
|
+
const key = nodeKey(n.kind, n.id);
|
|
14
|
+
if (byId.has(key))
|
|
15
|
+
return;
|
|
16
|
+
byId.set(key, n);
|
|
17
|
+
nodes.push(n);
|
|
18
|
+
}
|
|
19
|
+
function addEdge(from, to, relation, why) {
|
|
20
|
+
const fromKey = nodeKey(from.kind, from.id);
|
|
21
|
+
const toKey = nodeKey(to.kind, to.id);
|
|
22
|
+
if (!byId.has(toKey))
|
|
23
|
+
return; // don't add edges to nodes we didn't see
|
|
24
|
+
if (!byId.has(fromKey))
|
|
25
|
+
return;
|
|
26
|
+
edges.push({ from: fromKey, to: toKey, relation, why });
|
|
27
|
+
}
|
|
28
|
+
function sourceOf(map, id) {
|
|
29
|
+
const s = map.get(id);
|
|
30
|
+
if (!s)
|
|
31
|
+
return 'builtin';
|
|
32
|
+
if (s.type === 'pack')
|
|
33
|
+
return `pack:${s.packageName ?? '<unknown>'}`;
|
|
34
|
+
return 'local';
|
|
35
|
+
}
|
|
36
|
+
// ── Nodes ─────────────────────────────────────────────────────────────
|
|
37
|
+
for (const e of inspection.knowledgeEntries) {
|
|
38
|
+
const kind = String(e.type) === 'rule' ? 'rule' : String(e.type) === 'path' ? 'path' : 'knowledge';
|
|
39
|
+
addNode({
|
|
40
|
+
id: e.id,
|
|
41
|
+
kind,
|
|
42
|
+
title: e.title,
|
|
43
|
+
summary: e.content.slice(0, 120),
|
|
44
|
+
source: sourceOf(inspection.entrySources, e.id),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
for (const t of inspection.templates) {
|
|
48
|
+
addNode({
|
|
49
|
+
id: t.id,
|
|
50
|
+
kind: 'template',
|
|
51
|
+
title: t.name,
|
|
52
|
+
summary: t.description,
|
|
53
|
+
source: sourceOf(inspection.templateSources, t.id),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
for (const p of inspection.pipelines) {
|
|
57
|
+
addNode({
|
|
58
|
+
id: p.id,
|
|
59
|
+
kind: 'pipeline',
|
|
60
|
+
title: p.title,
|
|
61
|
+
summary: p.description,
|
|
62
|
+
source: sourceOf(inspection.pipelineSources, p.id),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
for (const preset of inspection.presetRegistry.list()) {
|
|
66
|
+
addNode({
|
|
67
|
+
id: preset.id,
|
|
68
|
+
kind: 'preset',
|
|
69
|
+
title: preset.title,
|
|
70
|
+
summary: preset.description,
|
|
71
|
+
source: sourceOf(inspection.presetSources, preset.id),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
for (const r of inspection.boundaryRegistry.list()) {
|
|
75
|
+
addNode({
|
|
76
|
+
id: r.id,
|
|
77
|
+
kind: 'boundary',
|
|
78
|
+
title: r.title,
|
|
79
|
+
summary: r.description,
|
|
80
|
+
source: sourceOf(inspection.boundarySources, r.id),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
for (const pack of inspection.packs.discoveredPacks) {
|
|
84
|
+
addNode({
|
|
85
|
+
id: pack.packageName,
|
|
86
|
+
kind: 'pack',
|
|
87
|
+
title: `${pack.packageName}@${pack.packageVersion}`,
|
|
88
|
+
summary: pack.manifest?.info.description,
|
|
89
|
+
source: 'pack',
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// ── Edges ─────────────────────────────────────────────────────────────
|
|
93
|
+
// Action hints → related templates / paths / rules.
|
|
94
|
+
for (const e of inspection.knowledgeEntries) {
|
|
95
|
+
const ah = e.actionHints;
|
|
96
|
+
if (!ah)
|
|
97
|
+
continue;
|
|
98
|
+
const fromKind = String(e.type) === 'rule' ? 'rule' : String(e.type) === 'path' ? 'path' : 'knowledge';
|
|
99
|
+
for (const id of ah.relatedTemplates ?? []) {
|
|
100
|
+
addEdge({ kind: fromKind, id: e.id }, { kind: 'template', id }, 'related-template', 'actionHints.relatedTemplates');
|
|
101
|
+
}
|
|
102
|
+
for (const id of ah.relatedPathConventions ?? []) {
|
|
103
|
+
addEdge({ kind: fromKind, id: e.id }, { kind: 'path', id }, 'related-path', 'actionHints.relatedPathConventions');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// Preset includes/references/composes.
|
|
107
|
+
for (const preset of inspection.presetRegistry.list()) {
|
|
108
|
+
for (const id of preset.includes.templateIds ?? []) {
|
|
109
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'template', id }, 'preset-references', 'includes.templateIds');
|
|
110
|
+
}
|
|
111
|
+
for (const id of preset.includes.pipelineIds ?? []) {
|
|
112
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'pipeline', id }, 'preset-references', 'includes.pipelineIds');
|
|
113
|
+
}
|
|
114
|
+
for (const id of preset.includes.ruleIds ?? []) {
|
|
115
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'rule', id }, 'preset-references', 'includes.ruleIds');
|
|
116
|
+
}
|
|
117
|
+
for (const id of preset.includes.pathConventionIds ?? []) {
|
|
118
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'path', id }, 'preset-references', 'includes.pathConventionIds');
|
|
119
|
+
}
|
|
120
|
+
for (const id of preset.includes.knowledgeIds ?? []) {
|
|
121
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'knowledge', id }, 'preset-references', 'includes.knowledgeIds');
|
|
122
|
+
}
|
|
123
|
+
for (const id of preset.composes ?? []) {
|
|
124
|
+
addEdge({ kind: 'preset', id: preset.id }, { kind: 'preset', id }, 'composes', 'composes');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// Pipeline step references.
|
|
128
|
+
for (const pipeline of inspection.pipelines) {
|
|
129
|
+
for (const step of pipeline.steps ?? []) {
|
|
130
|
+
for (const ref of step.references ?? []) {
|
|
131
|
+
// Try template first, then knowledge.
|
|
132
|
+
const tplKey = nodeKey('template', ref);
|
|
133
|
+
const ruleKey = nodeKey('rule', ref);
|
|
134
|
+
const pathKey = nodeKey('path', ref);
|
|
135
|
+
const kKey = nodeKey('knowledge', ref);
|
|
136
|
+
const targetKind = byId.has(tplKey)
|
|
137
|
+
? 'template'
|
|
138
|
+
: byId.has(ruleKey)
|
|
139
|
+
? 'rule'
|
|
140
|
+
: byId.has(pathKey)
|
|
141
|
+
? 'path'
|
|
142
|
+
: byId.has(kKey)
|
|
143
|
+
? 'knowledge'
|
|
144
|
+
: null;
|
|
145
|
+
if (!targetKind)
|
|
146
|
+
continue;
|
|
147
|
+
addEdge({ kind: 'pipeline', id: pipeline.id }, { kind: targetKind, id: ref }, 'pipeline-step-references', `step ${step.id} references`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// Boundary rules: related rules / paths.
|
|
152
|
+
for (const r of inspection.boundaryRegistry.list()) {
|
|
153
|
+
for (const id of r.relatedRules ?? []) {
|
|
154
|
+
addEdge({ kind: 'boundary', id: r.id }, { kind: 'rule', id }, 'boundary-related-rule', 'relatedRules');
|
|
155
|
+
}
|
|
156
|
+
for (const id of r.relatedPathConventions ?? []) {
|
|
157
|
+
addEdge({ kind: 'boundary', id: r.id }, { kind: 'path', id }, 'boundary-related-path', 'relatedPathConventions');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// Pack contributions: pack → its contributed items.
|
|
161
|
+
for (const [id, src] of inspection.entrySources) {
|
|
162
|
+
if (src.type !== 'pack' || !src.packageName)
|
|
163
|
+
continue;
|
|
164
|
+
addEdge({ kind: 'pack', id: src.packageName }, { kind: 'knowledge', id }, 'pack-contributes', 'knowledge entry');
|
|
165
|
+
}
|
|
166
|
+
for (const [id, src] of inspection.templateSources) {
|
|
167
|
+
if (src.type !== 'pack' || !src.packageName)
|
|
168
|
+
continue;
|
|
169
|
+
addEdge({ kind: 'pack', id: src.packageName }, { kind: 'template', id }, 'pack-contributes', 'template');
|
|
170
|
+
}
|
|
171
|
+
for (const [id, src] of inspection.pipelineSources) {
|
|
172
|
+
if (src.type !== 'pack' || !src.packageName)
|
|
173
|
+
continue;
|
|
174
|
+
addEdge({ kind: 'pack', id: src.packageName }, { kind: 'pipeline', id }, 'pack-contributes', 'pipeline');
|
|
175
|
+
}
|
|
176
|
+
for (const [id, src] of inspection.presetSources) {
|
|
177
|
+
if (src.type !== 'pack' || !src.packageName)
|
|
178
|
+
continue;
|
|
179
|
+
addEdge({ kind: 'pack', id: src.packageName }, { kind: 'preset', id }, 'pack-contributes', 'preset');
|
|
180
|
+
}
|
|
181
|
+
for (const [id, src] of inspection.boundarySources) {
|
|
182
|
+
if (src.type !== 'pack' || !src.packageName)
|
|
183
|
+
continue;
|
|
184
|
+
addEdge({ kind: 'pack', id: src.packageName }, { kind: 'boundary', id }, 'pack-contributes', 'boundary rule');
|
|
185
|
+
}
|
|
186
|
+
return { nodes, edges, byId };
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Find the shortest directed path (BFS) between two graph nodes. Edges are
|
|
190
|
+
* treated in the direction they were added. Returns the node sequence with
|
|
191
|
+
* the edge that landed on each step explained.
|
|
192
|
+
*/
|
|
193
|
+
export function findGraphPath(graph, fromRef, toRef) {
|
|
194
|
+
const fromNode = getGraphNode(graph, fromRef);
|
|
195
|
+
const toNode = getGraphNode(graph, toRef);
|
|
196
|
+
if (!fromNode) {
|
|
197
|
+
return {
|
|
198
|
+
found: false,
|
|
199
|
+
steps: [],
|
|
200
|
+
reason: 'from node not found',
|
|
201
|
+
explanation: `From node "${fromRef.id}" not in the graph. Try \`shrk graph --type <kind>\` to list available ids.`,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
if (!toNode) {
|
|
205
|
+
return {
|
|
206
|
+
found: false,
|
|
207
|
+
steps: [],
|
|
208
|
+
reason: 'to node not found',
|
|
209
|
+
explanation: `To node "${toRef.id}" not in the graph. Try \`shrk graph --type <kind>\` to list available ids.`,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
const fromKey = nodeKey(fromNode.node.kind, fromNode.node.id);
|
|
213
|
+
const toKey = nodeKey(toNode.node.kind, toNode.node.id);
|
|
214
|
+
if (fromKey === toKey)
|
|
215
|
+
return { found: true, steps: [{ node: fromKey }] };
|
|
216
|
+
const adj = new Map();
|
|
217
|
+
for (const e of graph.edges) {
|
|
218
|
+
const list = adj.get(e.from) ?? [];
|
|
219
|
+
list.push({ to: e.to, relation: e.relation, why: e.why });
|
|
220
|
+
adj.set(e.from, list);
|
|
221
|
+
}
|
|
222
|
+
const parents = new Map();
|
|
223
|
+
const visited = new Set([fromKey]);
|
|
224
|
+
const queue = [fromKey];
|
|
225
|
+
while (queue.length) {
|
|
226
|
+
const cur = queue.shift();
|
|
227
|
+
if (cur === toKey) {
|
|
228
|
+
const reversed = [{ node: toKey }];
|
|
229
|
+
let pivot = toKey;
|
|
230
|
+
while (parents.has(pivot)) {
|
|
231
|
+
const p = parents.get(pivot);
|
|
232
|
+
reversed.push({ node: p.from, via: { relation: p.relation, why: p.why } });
|
|
233
|
+
pivot = p.from;
|
|
234
|
+
}
|
|
235
|
+
const steps = reversed.reverse();
|
|
236
|
+
const cleaned = [];
|
|
237
|
+
for (let i = 0; i < steps.length; i += 1) {
|
|
238
|
+
const s = steps[i];
|
|
239
|
+
if (i === 0)
|
|
240
|
+
cleaned.push({ node: s.node });
|
|
241
|
+
else
|
|
242
|
+
cleaned.push({ node: s.node, via: steps[i - 1].via });
|
|
243
|
+
}
|
|
244
|
+
return { found: true, steps: cleaned };
|
|
245
|
+
}
|
|
246
|
+
for (const e of adj.get(cur) ?? []) {
|
|
247
|
+
if (visited.has(e.to))
|
|
248
|
+
continue;
|
|
249
|
+
visited.add(e.to);
|
|
250
|
+
parents.set(e.to, { from: cur, relation: e.relation, why: e.why });
|
|
251
|
+
queue.push(e.to);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
found: false,
|
|
256
|
+
steps: [],
|
|
257
|
+
reason: 'no path',
|
|
258
|
+
explanation: explainNoPath(fromNode.node.kind, toNode.node.kind, fromRef.id, toRef.id),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Build a kind-aware "why is there no path" explanation. Most kinds in
|
|
263
|
+
* the SharkCraft graph connect via tag overlap / appliesWhen / scope —
|
|
264
|
+
* not via direct edges — so an empty BFS result is the expected case
|
|
265
|
+
* for many queries. The explanation makes that visible.
|
|
266
|
+
*/
|
|
267
|
+
function explainNoPath(fromKind, toKind, fromId, toId) {
|
|
268
|
+
if (fromKind === toKind) {
|
|
269
|
+
if (fromKind === 'rule') {
|
|
270
|
+
return `No direct graph edge between ${fromKind}:${fromId} and ${toKind}:${toId}. Rules connect via tags / appliesWhen, not direct edges. Try: shrk rules get ${fromId} --json | jq '.appliesWhen,.tags'`;
|
|
271
|
+
}
|
|
272
|
+
if (fromKind === 'knowledge') {
|
|
273
|
+
return `No direct graph edge between ${fromKind}:${fromId} and ${toKind}:${toId}. Knowledge entries connect via scope / tags, not direct edges. Try: shrk knowledge get ${fromId} --json | jq '.scope,.tags'`;
|
|
274
|
+
}
|
|
275
|
+
if (fromKind === 'path') {
|
|
276
|
+
return `No direct graph edge between ${fromKind}:${fromId} and ${toKind}:${toId}. Path conventions are siblings — they don't reference each other. Try: shrk paths get ${fromId}`;
|
|
277
|
+
}
|
|
278
|
+
return `No direct graph edge between ${fromKind}:${fromId} and ${toKind}:${toId}.`;
|
|
279
|
+
}
|
|
280
|
+
// Heterogeneous pair — explain the actual connection model.
|
|
281
|
+
const connector = HETEROGENEOUS_CONNECTORS[`${fromKind}->${toKind}`]
|
|
282
|
+
?? HETEROGENEOUS_CONNECTORS[`${toKind}->${fromKind}`];
|
|
283
|
+
if (connector) {
|
|
284
|
+
return `No direct edge between ${fromKind}:${fromId} and ${toKind}:${toId}. ${connector}`;
|
|
285
|
+
}
|
|
286
|
+
return `No direct edge between ${fromKind}:${fromId} and ${toKind}:${toId}. Graph edges exist for related-template / preset-references / pipeline-step-references / boundary-source-target relations — try \`shrk graph ${toId}\` to inspect ${toKind}:${toId}'s neighbours.`;
|
|
287
|
+
}
|
|
288
|
+
const HETEROGENEOUS_CONNECTORS = Object.freeze({
|
|
289
|
+
'rule->pipeline': 'Rules attach to pipelines via tag overlap and appliesWhen — not direct edges. Try `shrk pipelines get <id>` to see the pipeline\'s tags and `shrk rules get <id>` to see the rule\'s appliesWhen.',
|
|
290
|
+
'rule->template': 'Rules apply to templates via tag overlap — not direct edges. Try `shrk task "<task>" --json` to see the ranker output for both at once.',
|
|
291
|
+
'rule->knowledge': 'Rules and knowledge entries don\'t connect via the graph. They are siblings in the asset registries — both surfaced together by the task-packet ranker.',
|
|
292
|
+
'knowledge->pipeline': 'Knowledge entries reference pipelines indirectly via scope / appliesWhen. Try `shrk pipelines get <id>` to see the pipeline\'s tags.',
|
|
293
|
+
'knowledge->template': 'Knowledge entries reference templates via the `related` field. Try `shrk knowledge get <id>` to see related ids.',
|
|
294
|
+
'template->pipeline': 'Templates are referenced from pipeline steps via `cliCommands`. Try `shrk pipelines get <id>` and look for `gen <template-id>` in step commands.',
|
|
295
|
+
'preset->knowledge': 'Presets bundle knowledge entries via `contributes`. Try `shrk presets get <id>` to see what the preset includes.',
|
|
296
|
+
'preset->rule': 'Presets bundle rules via `contributes`. Try `shrk presets get <id>`.',
|
|
297
|
+
'pack->knowledge': 'Packs ship knowledge entries. Try `shrk packs get <name>` to see what the pack contributes.',
|
|
298
|
+
'pack->rule': 'Packs ship rules. Try `shrk packs get <name>`.',
|
|
299
|
+
});
|
|
300
|
+
/**
|
|
301
|
+
* Get a node + its incoming/outgoing edges grouped by kind.
|
|
302
|
+
*/
|
|
303
|
+
export function getGraphNode(graph, ref) {
|
|
304
|
+
let node = null;
|
|
305
|
+
if (ref.kind) {
|
|
306
|
+
node = graph.byId.get(nodeKey(ref.kind, ref.id)) ?? null;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
// Try each kind.
|
|
310
|
+
for (const k of [
|
|
311
|
+
'preset',
|
|
312
|
+
'template',
|
|
313
|
+
'pipeline',
|
|
314
|
+
'rule',
|
|
315
|
+
'path',
|
|
316
|
+
'knowledge',
|
|
317
|
+
'boundary',
|
|
318
|
+
'pack',
|
|
319
|
+
'doc',
|
|
320
|
+
]) {
|
|
321
|
+
const found = graph.byId.get(nodeKey(k, ref.id));
|
|
322
|
+
if (found) {
|
|
323
|
+
node = found;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (!node)
|
|
329
|
+
return null;
|
|
330
|
+
const key = nodeKey(node.kind, node.id);
|
|
331
|
+
return {
|
|
332
|
+
node,
|
|
333
|
+
outgoing: graph.edges.filter((e) => e.from === key),
|
|
334
|
+
incoming: graph.edges.filter((e) => e.to === key),
|
|
335
|
+
};
|
|
336
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge lint + fix-preview.
|
|
3
|
+
*
|
|
4
|
+
* Pure inspector — classifies findings on the current knowledge entries.
|
|
5
|
+
* Never fills meaningful prose with fake content. Stub candidates use
|
|
6
|
+
* explicit TODO markers so a human / agent must finish the wording.
|
|
7
|
+
*
|
|
8
|
+
* Output schemas:
|
|
9
|
+
* - sharkcraft.knowledge-lint/v1
|
|
10
|
+
* - sharkcraft.knowledge-lint-fix-preview/v1
|
|
11
|
+
*/
|
|
12
|
+
import type { IKnowledgeEntry } from '@shrkcrft/knowledge';
|
|
13
|
+
export declare const KNOWLEDGE_LINT_SCHEMA = "sharkcraft.knowledge-lint/v1";
|
|
14
|
+
export declare const KNOWLEDGE_LINT_FIX_PREVIEW_SCHEMA = "sharkcraft.knowledge-lint-fix-preview/v1";
|
|
15
|
+
export declare enum KnowledgeLintCategory {
|
|
16
|
+
SafeMechanicalStub = "safe-mechanical-stub",
|
|
17
|
+
NeedsHumanWording = "needs-human-wording",
|
|
18
|
+
ShouldAcknowledge = "should-acknowledge",
|
|
19
|
+
ObsoleteEntry = "obsolete-entry",
|
|
20
|
+
StaleReference = "stale-reference",
|
|
21
|
+
MissingProvenance = "missing-provenance",
|
|
22
|
+
MissingActionHints = "missing-action-hints"
|
|
23
|
+
}
|
|
24
|
+
export declare enum KnowledgeLintSeverity {
|
|
25
|
+
Info = "info",
|
|
26
|
+
Warning = "warning"
|
|
27
|
+
}
|
|
28
|
+
export interface IKnowledgeLintFinding {
|
|
29
|
+
code: string;
|
|
30
|
+
category: KnowledgeLintCategory;
|
|
31
|
+
severity: KnowledgeLintSeverity;
|
|
32
|
+
entryId: string;
|
|
33
|
+
field: string;
|
|
34
|
+
message: string;
|
|
35
|
+
/** A safe, mechanical hint — ONLY populated when category=SafeMechanicalStub. */
|
|
36
|
+
stubSuggestion?: string;
|
|
37
|
+
/** Set when the lint is opt-in advisory (does not affect exit code). */
|
|
38
|
+
advisory?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface IKnowledgeLintReport {
|
|
41
|
+
schema: typeof KNOWLEDGE_LINT_SCHEMA;
|
|
42
|
+
generatedAt: string;
|
|
43
|
+
entries: number;
|
|
44
|
+
findings: readonly IKnowledgeLintFinding[];
|
|
45
|
+
counts: Readonly<Record<KnowledgeLintCategory, number>>;
|
|
46
|
+
}
|
|
47
|
+
export interface IKnowledgeLintOptions {
|
|
48
|
+
/** Restrict lint to specific entry ids. */
|
|
49
|
+
entryIds?: readonly string[];
|
|
50
|
+
/** When true, also emit MissingProvenance / MissingActionHints
|
|
51
|
+
* advisories. Default true. */
|
|
52
|
+
includeAdvisory?: boolean;
|
|
53
|
+
/** External signal: ids whose references are known to be stale (from
|
|
54
|
+
* `buildKnowledgeStaleReport`). The lint just records — it does not
|
|
55
|
+
* re-run stale-check. */
|
|
56
|
+
staleReferenceEntryIds?: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
export declare function lintKnowledge(entries: readonly IKnowledgeEntry[], options?: IKnowledgeLintOptions): IKnowledgeLintReport;
|
|
59
|
+
export interface IKnowledgeLintFixPreview {
|
|
60
|
+
schema: typeof KNOWLEDGE_LINT_FIX_PREVIEW_SCHEMA;
|
|
61
|
+
generatedAt: string;
|
|
62
|
+
/** Per-entry list of mechanical stubs that can be safely applied. */
|
|
63
|
+
safeStubs: ReadonlyArray<{
|
|
64
|
+
entryId: string;
|
|
65
|
+
code: string;
|
|
66
|
+
field: string;
|
|
67
|
+
suggestion: string;
|
|
68
|
+
}>;
|
|
69
|
+
/** Per-entry list of TODO items that need human wording. */
|
|
70
|
+
todos: ReadonlyArray<{
|
|
71
|
+
entryId: string;
|
|
72
|
+
code: string;
|
|
73
|
+
field: string;
|
|
74
|
+
description: string;
|
|
75
|
+
}>;
|
|
76
|
+
/** Per-entry list of items to acknowledge as intentional. */
|
|
77
|
+
acknowledgements: ReadonlyArray<{
|
|
78
|
+
entryId: string;
|
|
79
|
+
code: string;
|
|
80
|
+
field: string;
|
|
81
|
+
description: string;
|
|
82
|
+
}>;
|
|
83
|
+
/** Reverse-link to the source lint report. */
|
|
84
|
+
basedOn: typeof KNOWLEDGE_LINT_SCHEMA;
|
|
85
|
+
/** Files the CLI adapter would write (preview-only). */
|
|
86
|
+
files: ReadonlyArray<{
|
|
87
|
+
path: string;
|
|
88
|
+
purpose: 'markdown-summary' | 'patch' | 'todos-json';
|
|
89
|
+
language: 'markdown' | 'json' | 'typescript';
|
|
90
|
+
}>;
|
|
91
|
+
/** Next commands an agent should run. */
|
|
92
|
+
nextCommands: readonly string[];
|
|
93
|
+
}
|
|
94
|
+
export declare function buildKnowledgeLintFixPreview(report: IKnowledgeLintReport): IKnowledgeLintFixPreview;
|
|
95
|
+
export declare function renderKnowledgeLintMarkdown(report: IKnowledgeLintReport): string;
|
|
96
|
+
export declare function renderKnowledgeLintFixPreviewMarkdown(preview: IKnowledgeLintFixPreview): string;
|
|
97
|
+
//# sourceMappingURL=knowledge-lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-lint.d.ts","sourceRoot":"","sources":["../src/knowledge-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AACpE,eAAO,MAAM,iCAAiC,6CAA6C,CAAC;AAE5F,oBAAY,qBAAqB;IAC/B,kBAAkB,yBAAyB;IAC3C,iBAAiB,wBAAwB;IACzC,iBAAiB,uBAAuB;IACxC,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,iBAAiB,uBAAuB;IACxC,kBAAkB,yBAAyB;CAC5C;AAED,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,qBAAqB,CAAC;IAChC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,qBAAqB,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC3C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;mCAC+B;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;6BAEyB;IACzB,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CA0JtB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,iCAAiC,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,SAAS,EAAE,aAAa,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,4DAA4D;IAC5D,KAAK,EAAE,aAAa,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,6DAA6D;IAC7D,gBAAgB,EAAE,aAAa,CAAC;QAC9B,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,8CAA8C;IAC9C,OAAO,EAAE,OAAO,qBAAqB,CAAC;IACtC,wDAAwD;IACxD,KAAK,EAAE,aAAa,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,kBAAkB,GAAG,OAAO,GAAG,YAAY,CAAC;QACrD,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,YAAY,CAAC;KAC9C,CAAC,CAAC;IACH,yCAAyC;IACzC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,wBAAwB,CAwD1B;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CA0BhF;AAED,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,wBAAwB,GAChC,MAAM,CAkCR"}
|