@shrkcrft/inspector 0.1.0-alpha.1
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 +57 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +214 -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 +382 -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 +38 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +173 -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 +422 -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 +224 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +234 -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-merge.d.ts +71 -0
- package/dist/onboarding-drafts-merge.d.ts.map +1 -0
- package/dist/onboarding-drafts-merge.js +174 -0
- package/dist/onboarding-drafts.d.ts +42 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +268 -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 +73 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +519 -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 +81 -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 +65 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
// ── Verb hints (what kind of work) ──────────────────────────────────────
|
|
2
|
+
const VERB_HINTS = [
|
|
3
|
+
{
|
|
4
|
+
regex: /\b(create|add|implement|generate|new|build|introduce|provide)\b/,
|
|
5
|
+
appliesWhen: ['generate-code', 'generate-service', 'generate-utility', 'generate-template'],
|
|
6
|
+
tags: ['feature', 'generation'],
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
regex: /\b(refactor|rewrite|migrate|extract|rename)\b/,
|
|
10
|
+
appliesWhen: ['refactor'],
|
|
11
|
+
tags: ['refactor', 'safe', 'generation'],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
regex: /\b(test|spec|coverage)\b/,
|
|
15
|
+
appliesWhen: ['generate-test'],
|
|
16
|
+
tags: ['test', 'testing'],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
regex: /\b(fix|bug|broken|crash)\b/,
|
|
20
|
+
appliesWhen: ['fix-bug'],
|
|
21
|
+
tags: ['safety'],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
regex: /\b(review|audit|inspect)\b/,
|
|
25
|
+
appliesWhen: ['review-pr', 'check-boundaries'],
|
|
26
|
+
tags: ['review'],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
// ── Domain hints (what *kind of thing* is being worked on) ──────────────
|
|
30
|
+
// These boost rules/templates/pipelines whose own `appliesWhen` or `tags`
|
|
31
|
+
// declare the same domain — much higher signal than verb hints alone for
|
|
32
|
+
// "create a user profile *plugin*" vs "add pagination *capability*".
|
|
33
|
+
const DOMAIN_HINTS = [
|
|
34
|
+
{
|
|
35
|
+
token: 'plugin',
|
|
36
|
+
appliesWhen: ['create-plugin', 'generate-plugin', 'plugin-dev', 'register-plugin'],
|
|
37
|
+
tags: ['plugin'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
token: 'defaults',
|
|
41
|
+
appliesWhen: ['register-defaults', 'create-defaults', 'plugin-defaults'],
|
|
42
|
+
tags: ['defaults'],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
token: 'capability',
|
|
46
|
+
appliesWhen: ['create-capability', 'generate-capability'],
|
|
47
|
+
tags: ['capability'],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
token: 'policy',
|
|
51
|
+
appliesWhen: ['create-policy', 'generate-policy'],
|
|
52
|
+
tags: ['policy'],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
token: 'adapter',
|
|
56
|
+
appliesWhen: ['create-adapter', 'generate-adapter'],
|
|
57
|
+
tags: ['adapter'],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
token: 'service',
|
|
61
|
+
appliesWhen: ['generate-service'],
|
|
62
|
+
tags: ['service'],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
token: 'utility',
|
|
66
|
+
appliesWhen: ['generate-utility'],
|
|
67
|
+
tags: ['utility', 'utils'],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
token: 'utilities',
|
|
71
|
+
appliesWhen: ['generate-utility'],
|
|
72
|
+
tags: ['utility', 'utils'],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
token: 'pipeline',
|
|
76
|
+
appliesWhen: ['create-pipeline'],
|
|
77
|
+
tags: ['pipeline'],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
token: 'route',
|
|
81
|
+
appliesWhen: ['generate-route'],
|
|
82
|
+
tags: ['http', 'routes', 'api'],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
token: 'kernel',
|
|
86
|
+
appliesWhen: ['create-kernel-service'],
|
|
87
|
+
tags: ['kernel'],
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
function tokenize(s) {
|
|
91
|
+
return s
|
|
92
|
+
.toLowerCase()
|
|
93
|
+
.split(/[^a-z0-9]+/)
|
|
94
|
+
.filter((t) => t.length >= 3);
|
|
95
|
+
}
|
|
96
|
+
function uniqueTokens(s) {
|
|
97
|
+
return new Set(tokenize(s));
|
|
98
|
+
}
|
|
99
|
+
function score(reasons, by, why) {
|
|
100
|
+
reasons.push(why);
|
|
101
|
+
return by;
|
|
102
|
+
}
|
|
103
|
+
function commonTokens(a, b) {
|
|
104
|
+
const out = [];
|
|
105
|
+
for (const t of b)
|
|
106
|
+
if (a.has(t))
|
|
107
|
+
out.push(t);
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
/** Match free-text task tokens against a string corpus and return a token-hit count. */
|
|
111
|
+
function tokenHits(taskTokens, ...corpus) {
|
|
112
|
+
let hits = 0;
|
|
113
|
+
for (const c of corpus) {
|
|
114
|
+
if (!c)
|
|
115
|
+
continue;
|
|
116
|
+
const tokens = tokenize(c);
|
|
117
|
+
for (const t of tokens)
|
|
118
|
+
if (taskTokens.has(t))
|
|
119
|
+
hits += 1;
|
|
120
|
+
}
|
|
121
|
+
return hits;
|
|
122
|
+
}
|
|
123
|
+
function deriveContext(task) {
|
|
124
|
+
const lower = task.toLowerCase();
|
|
125
|
+
const verbAppliesWhen = new Set();
|
|
126
|
+
const verbTags = new Set();
|
|
127
|
+
for (const v of VERB_HINTS) {
|
|
128
|
+
if (v.regex.test(lower)) {
|
|
129
|
+
for (const a of v.appliesWhen)
|
|
130
|
+
verbAppliesWhen.add(a);
|
|
131
|
+
for (const t of v.tags)
|
|
132
|
+
verbTags.add(t);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const taskTokens = uniqueTokens(task);
|
|
136
|
+
const domainAppliesWhen = new Set();
|
|
137
|
+
const domainTags = new Set();
|
|
138
|
+
const domainTokens = new Set();
|
|
139
|
+
for (const d of DOMAIN_HINTS) {
|
|
140
|
+
if (taskTokens.has(d.token)) {
|
|
141
|
+
domainTokens.add(d.token);
|
|
142
|
+
for (const a of d.appliesWhen)
|
|
143
|
+
domainAppliesWhen.add(a);
|
|
144
|
+
for (const t of d.tags)
|
|
145
|
+
domainTags.add(t);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
verbAppliesWhen,
|
|
150
|
+
verbTags,
|
|
151
|
+
domainAppliesWhen,
|
|
152
|
+
domainTags,
|
|
153
|
+
domainTokens,
|
|
154
|
+
taskTokens,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
// Domain-tag matches outweigh generic verb-tag matches. The intent: a rule
|
|
158
|
+
// tagged `plugin` should rank above a generic `feature` rule when the task
|
|
159
|
+
// mentions a plugin.
|
|
160
|
+
const DOMAIN_TAG_WEIGHT = 6;
|
|
161
|
+
const VERB_TAG_WEIGHT = 2;
|
|
162
|
+
const DOMAIN_APPLIES_WEIGHT = 6;
|
|
163
|
+
const VERB_APPLIES_WEIGHT = 4;
|
|
164
|
+
const TITLE_DOMAIN_TOKEN_WEIGHT = 4;
|
|
165
|
+
function applyTagScore(itemTags, ctx, reasons) {
|
|
166
|
+
let s = 0;
|
|
167
|
+
const itemTagSet = new Set(itemTags ?? []);
|
|
168
|
+
const domainHits = commonTokens(ctx.domainTags, itemTagSet);
|
|
169
|
+
if (domainHits.length) {
|
|
170
|
+
s += score(reasons, DOMAIN_TAG_WEIGHT * domainHits.length, `domain tags: ${domainHits.join(', ')}`);
|
|
171
|
+
}
|
|
172
|
+
const verbHits = commonTokens(ctx.verbTags, itemTagSet);
|
|
173
|
+
if (verbHits.length) {
|
|
174
|
+
s += score(reasons, VERB_TAG_WEIGHT * verbHits.length, `tags: ${verbHits.join(', ')}`);
|
|
175
|
+
}
|
|
176
|
+
return s;
|
|
177
|
+
}
|
|
178
|
+
function applyAppliesWhenScore(itemAppliesWhen, ctx, reasons) {
|
|
179
|
+
let s = 0;
|
|
180
|
+
const set = new Set(itemAppliesWhen ?? []);
|
|
181
|
+
const domainHits = commonTokens(ctx.domainAppliesWhen, set);
|
|
182
|
+
if (domainHits.length) {
|
|
183
|
+
s += score(reasons, DOMAIN_APPLIES_WEIGHT * domainHits.length, `appliesWhen(domain): ${domainHits.join(', ')}`);
|
|
184
|
+
}
|
|
185
|
+
const verbHits = commonTokens(ctx.verbAppliesWhen, set);
|
|
186
|
+
if (verbHits.length) {
|
|
187
|
+
s += score(reasons, VERB_APPLIES_WEIGHT * verbHits.length, `appliesWhen: ${verbHits.join(', ')}`);
|
|
188
|
+
}
|
|
189
|
+
return s;
|
|
190
|
+
}
|
|
191
|
+
function applyTitleDomainBoost(text, ctx, reasons) {
|
|
192
|
+
if (!text)
|
|
193
|
+
return 0;
|
|
194
|
+
let s = 0;
|
|
195
|
+
const titleTokens = new Set(tokenize(text));
|
|
196
|
+
for (const dom of ctx.domainTokens) {
|
|
197
|
+
if (titleTokens.has(dom)) {
|
|
198
|
+
s += score(reasons, TITLE_DOMAIN_TOKEN_WEIGHT, `title mentions "${dom}"`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return s;
|
|
202
|
+
}
|
|
203
|
+
function applyIdDomainBoost(id, ctx, reasons) {
|
|
204
|
+
let s = 0;
|
|
205
|
+
const idLower = id.toLowerCase();
|
|
206
|
+
for (const dom of ctx.domainTokens) {
|
|
207
|
+
if (idLower.includes(dom)) {
|
|
208
|
+
s += score(reasons, 3, `id contains "${dom}"`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return s;
|
|
212
|
+
}
|
|
213
|
+
// ── Knowledge entries (rules, paths, other) ─────────────────────────────
|
|
214
|
+
export function rankKnowledgeEntries(entries, task) {
|
|
215
|
+
const ctx = deriveContext(task);
|
|
216
|
+
const out = [];
|
|
217
|
+
for (const e of entries) {
|
|
218
|
+
const reasons = [];
|
|
219
|
+
let s = 0;
|
|
220
|
+
// Priority baseline — lower than before to let structured matches dominate.
|
|
221
|
+
const p = String(e.priority);
|
|
222
|
+
if (p === 'critical')
|
|
223
|
+
s += score(reasons, 4, 'priority:critical');
|
|
224
|
+
else if (p === 'high')
|
|
225
|
+
s += score(reasons, 3, 'priority:high');
|
|
226
|
+
else if (p === 'medium')
|
|
227
|
+
s += score(reasons, 1, 'priority:medium');
|
|
228
|
+
s += applyAppliesWhenScore(e.appliesWhen, ctx, reasons);
|
|
229
|
+
s += applyTagScore(e.tags ?? [], ctx, reasons);
|
|
230
|
+
s += applyTitleDomainBoost(e.title, ctx, reasons);
|
|
231
|
+
s += applyIdDomainBoost(e.id, ctx, reasons);
|
|
232
|
+
const hits = tokenHits(ctx.taskTokens, e.title, e.content, (e.tags ?? []).join(' '));
|
|
233
|
+
if (hits)
|
|
234
|
+
s += score(reasons, Math.min(6, hits), `token hits: ${hits}`);
|
|
235
|
+
if (s > 0)
|
|
236
|
+
out.push({ item: e, score: s, reasons });
|
|
237
|
+
}
|
|
238
|
+
out.sort((a, b) => b.score - a.score);
|
|
239
|
+
return out;
|
|
240
|
+
}
|
|
241
|
+
// ── Templates ───────────────────────────────────────────────────────────
|
|
242
|
+
export function rankTemplates(templates, task) {
|
|
243
|
+
const ctx = deriveContext(task);
|
|
244
|
+
const out = [];
|
|
245
|
+
for (const t of templates) {
|
|
246
|
+
const reasons = [];
|
|
247
|
+
let s = 0;
|
|
248
|
+
s += applyAppliesWhenScore(t.appliesWhen, ctx, reasons);
|
|
249
|
+
s += applyTagScore(t.tags ?? [], ctx, reasons);
|
|
250
|
+
s += applyTitleDomainBoost(t.name, ctx, reasons);
|
|
251
|
+
s += applyTitleDomainBoost(t.description, ctx, reasons);
|
|
252
|
+
s += applyIdDomainBoost(t.id, ctx, reasons);
|
|
253
|
+
const hits = tokenHits(ctx.taskTokens, t.id, t.name, t.description, (t.tags ?? []).join(' '));
|
|
254
|
+
if (hits)
|
|
255
|
+
s += score(reasons, Math.min(8, hits * 2), `token hits: ${hits}`);
|
|
256
|
+
if (s > 0)
|
|
257
|
+
out.push({ item: t, score: s, reasons });
|
|
258
|
+
}
|
|
259
|
+
out.sort((a, b) => b.score - a.score);
|
|
260
|
+
return out;
|
|
261
|
+
}
|
|
262
|
+
// ── Path conventions (treated like knowledge entries with type "path") ──
|
|
263
|
+
export function rankPathConventions(paths, task) {
|
|
264
|
+
return rankKnowledgeEntries(paths, task);
|
|
265
|
+
}
|
|
266
|
+
// ── Pipelines ───────────────────────────────────────────────────────────
|
|
267
|
+
export function rankPipelines(pipelines, task) {
|
|
268
|
+
const ctx = deriveContext(task);
|
|
269
|
+
const out = [];
|
|
270
|
+
for (const p of pipelines) {
|
|
271
|
+
const reasons = [];
|
|
272
|
+
let s = 0;
|
|
273
|
+
s += applyTagScore(p.tags ?? [], ctx, reasons);
|
|
274
|
+
s += applyTitleDomainBoost(p.title, ctx, reasons);
|
|
275
|
+
s += applyTitleDomainBoost(p.description, ctx, reasons);
|
|
276
|
+
s += applyIdDomainBoost(p.id, ctx, reasons);
|
|
277
|
+
const stepReasons = [];
|
|
278
|
+
for (const step of p.steps ?? []) {
|
|
279
|
+
const stepHits = tokenHits(ctx.taskTokens, step.id, step.description, step.instruction);
|
|
280
|
+
if (stepHits > 0) {
|
|
281
|
+
s += Math.min(3, stepHits);
|
|
282
|
+
stepReasons.push(`${step.id}:${stepHits}`);
|
|
283
|
+
}
|
|
284
|
+
// Step references to templates that match the domain.
|
|
285
|
+
for (const ref of step.references ?? []) {
|
|
286
|
+
for (const dom of ctx.domainTokens) {
|
|
287
|
+
if (ref.toLowerCase().includes(dom)) {
|
|
288
|
+
s += score(reasons, 2, `step ${step.id} references ${ref}`);
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (stepReasons.length)
|
|
295
|
+
reasons.push(`step hits: ${stepReasons.join(', ')}`);
|
|
296
|
+
const titleHits = tokenHits(ctx.taskTokens, p.title, p.description);
|
|
297
|
+
if (titleHits)
|
|
298
|
+
s += score(reasons, Math.min(8, titleHits * 2), `title/description hits: ${titleHits}`);
|
|
299
|
+
if (s > 0)
|
|
300
|
+
out.push({ item: p, score: s, reasons });
|
|
301
|
+
}
|
|
302
|
+
out.sort((a, b) => b.score - a.score);
|
|
303
|
+
return out;
|
|
304
|
+
}
|
|
305
|
+
// ── Presets ─────────────────────────────────────────────────────────────
|
|
306
|
+
export function rankPresets(presets, task, detectedProfiles) {
|
|
307
|
+
const ctx = deriveContext(task);
|
|
308
|
+
const profileSet = new Set(detectedProfiles);
|
|
309
|
+
const out = [];
|
|
310
|
+
for (const p of presets) {
|
|
311
|
+
const reasons = [];
|
|
312
|
+
let s = p.weight ?? 5;
|
|
313
|
+
if (s > 0)
|
|
314
|
+
reasons.push(`base weight: ${s}`);
|
|
315
|
+
let blocked = false;
|
|
316
|
+
for (const need of p.appliesTo ?? []) {
|
|
317
|
+
if (profileSet.has(need)) {
|
|
318
|
+
s += score(reasons, 5, `profile matches: ${need}`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
for (const block of p.notAppropriateFor ?? []) {
|
|
322
|
+
if (profileSet.has(block)) {
|
|
323
|
+
blocked = true;
|
|
324
|
+
reasons.push(`not appropriate: ${block}`);
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (blocked)
|
|
329
|
+
continue;
|
|
330
|
+
s += applyTagScore(p.tags ?? [], ctx, reasons);
|
|
331
|
+
s += applyTitleDomainBoost(p.title, ctx, reasons);
|
|
332
|
+
s += applyTitleDomainBoost(p.description, ctx, reasons);
|
|
333
|
+
s += applyIdDomainBoost(p.id, ctx, reasons);
|
|
334
|
+
const hits = tokenHits(ctx.taskTokens, p.id, p.title, p.description);
|
|
335
|
+
if (hits)
|
|
336
|
+
s += score(reasons, Math.min(6, hits), `token hits: ${hits}`);
|
|
337
|
+
out.push({ item: p, score: s, reasons });
|
|
338
|
+
}
|
|
339
|
+
out.sort((a, b) => b.score - a.score);
|
|
340
|
+
return out;
|
|
341
|
+
}
|
|
342
|
+
export function rankAll(inspection, task, limit = 10) {
|
|
343
|
+
const initialRules = rankKnowledgeEntries(inspection.ruleService.list(), task);
|
|
344
|
+
const initialPaths = rankPathConventions(inspection.pathService.list(), task);
|
|
345
|
+
const initialTemplates = rankTemplates(inspection.templates, task);
|
|
346
|
+
const initialPipelines = rankPipelines(inspection.pipelines, task);
|
|
347
|
+
// Cross-link boost: once we know the top templates and paths, walk the
|
|
348
|
+
// top entries again and bump rules whose actionHints reference those
|
|
349
|
+
// ids. This produces the "related-X amplifies Y" signal without making
|
|
350
|
+
// the per-rule scoring expensive.
|
|
351
|
+
const topTemplateIds = new Set(initialTemplates.slice(0, 8).map((r) => r.item.id));
|
|
352
|
+
const topPathIds = new Set(initialPaths.slice(0, 8).map((r) => r.item.id));
|
|
353
|
+
const rules = initialRules.map((r) => {
|
|
354
|
+
let extra = 0;
|
|
355
|
+
const extraReasons = [];
|
|
356
|
+
const ah = r.item.actionHints;
|
|
357
|
+
if (ah) {
|
|
358
|
+
for (const tid of ah.relatedTemplates ?? []) {
|
|
359
|
+
if (topTemplateIds.has(tid)) {
|
|
360
|
+
extra += 4;
|
|
361
|
+
extraReasons.push(`relatedTemplate hit: ${tid}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
for (const pid of ah.relatedPathConventions ?? []) {
|
|
365
|
+
if (topPathIds.has(pid)) {
|
|
366
|
+
extra += 3;
|
|
367
|
+
extraReasons.push(`relatedPath hit: ${pid}`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (extra === 0)
|
|
372
|
+
return r;
|
|
373
|
+
return { item: r.item, score: r.score + extra, reasons: [...r.reasons, ...extraReasons] };
|
|
374
|
+
});
|
|
375
|
+
rules.sort((a, b) => b.score - a.score);
|
|
376
|
+
// Pipeline → template cross-link: bump templates that the top pipeline
|
|
377
|
+
// references in any step.
|
|
378
|
+
const topPipeline = initialPipelines[0]?.item;
|
|
379
|
+
const referencedFromTopPipeline = new Set();
|
|
380
|
+
if (topPipeline) {
|
|
381
|
+
for (const step of topPipeline.steps ?? []) {
|
|
382
|
+
for (const ref of step.references ?? [])
|
|
383
|
+
referencedFromTopPipeline.add(ref);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
const templates = initialTemplates.map((r) => {
|
|
387
|
+
if (!referencedFromTopPipeline.has(r.item.id))
|
|
388
|
+
return r;
|
|
389
|
+
return {
|
|
390
|
+
item: r.item,
|
|
391
|
+
score: r.score + 3,
|
|
392
|
+
reasons: [...r.reasons, `referenced by top pipeline ${topPipeline?.id}`],
|
|
393
|
+
};
|
|
394
|
+
});
|
|
395
|
+
templates.sort((a, b) => b.score - a.score);
|
|
396
|
+
return {
|
|
397
|
+
rules: rules.slice(0, limit),
|
|
398
|
+
paths: initialPaths.slice(0, limit),
|
|
399
|
+
templates: templates.slice(0, limit),
|
|
400
|
+
pipelines: initialPipelines.slice(0, limit),
|
|
401
|
+
presets: rankPresets(inspection.presetRegistry.list(), task, inspection.workspace.profiles).slice(0, limit),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
// Expose a small "explain" formatter for CLI/MCP output.
|
|
405
|
+
export function explainRanked(items, describe, limit = 5) {
|
|
406
|
+
return items
|
|
407
|
+
.slice(0, limit)
|
|
408
|
+
.map((r) => ` • [${r.score}] ${describe(r.item)} — ${r.reasons.join('; ')}`)
|
|
409
|
+
.join('\n');
|
|
410
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type IChangeIntent } from './change-intent.js';
|
|
2
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
3
|
+
export declare const TASK_RISK_SCHEMA = "sharkcraft.task-risk/v1";
|
|
4
|
+
export declare enum TaskRiskLevel {
|
|
5
|
+
Low = "low",
|
|
6
|
+
Medium = "medium",
|
|
7
|
+
High = "high",
|
|
8
|
+
Critical = "critical"
|
|
9
|
+
}
|
|
10
|
+
export interface ITaskRiskReason {
|
|
11
|
+
code: string;
|
|
12
|
+
message: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ITaskRiskMemorySignal {
|
|
16
|
+
code: string;
|
|
17
|
+
message: string;
|
|
18
|
+
weight: number;
|
|
19
|
+
source: 'file' | 'diagnostic' | 'construct' | 'boundary' | 'policy' | 'plan' | 'pack';
|
|
20
|
+
}
|
|
21
|
+
export interface ITaskRiskMemoryReport {
|
|
22
|
+
/** True if no memory index was found. */
|
|
23
|
+
missing: boolean;
|
|
24
|
+
/** True if the memory index is older than 30 days. */
|
|
25
|
+
stale: boolean;
|
|
26
|
+
/** ISO timestamp when the loaded index was generated. */
|
|
27
|
+
indexGeneratedAt?: string;
|
|
28
|
+
/** Raw memory adjustment before cap. */
|
|
29
|
+
rawScore: number;
|
|
30
|
+
/** Final adjustment after cap. */
|
|
31
|
+
score: number;
|
|
32
|
+
/** Memory-derived risk level (low/medium/high/critical). */
|
|
33
|
+
level: TaskRiskLevel;
|
|
34
|
+
/** Reasons that fired during memory scoring. */
|
|
35
|
+
reasons: readonly ITaskRiskReason[];
|
|
36
|
+
/** Each individual signal (for transparency / explainability). */
|
|
37
|
+
signals: readonly ITaskRiskMemorySignal[];
|
|
38
|
+
/** True if the cap was applied. */
|
|
39
|
+
capped: boolean;
|
|
40
|
+
/** Cap value used. */
|
|
41
|
+
cap: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ITaskRiskReport {
|
|
44
|
+
schema: typeof TASK_RISK_SCHEMA;
|
|
45
|
+
generatedAt: string;
|
|
46
|
+
task: string;
|
|
47
|
+
intent: IChangeIntent;
|
|
48
|
+
riskLevel: TaskRiskLevel;
|
|
49
|
+
score: number;
|
|
50
|
+
reasons: readonly ITaskRiskReason[];
|
|
51
|
+
affectedFiles: readonly string[];
|
|
52
|
+
affectedConstructs: readonly string[];
|
|
53
|
+
highFanInFiles: readonly string[];
|
|
54
|
+
highFanOutFiles: readonly string[];
|
|
55
|
+
ownershipGaps: readonly string[];
|
|
56
|
+
testGaps: readonly string[];
|
|
57
|
+
boundaryConcerns: readonly string[];
|
|
58
|
+
policyConcerns: readonly string[];
|
|
59
|
+
recommendedReviewCommands: readonly string[];
|
|
60
|
+
humanApprovalRequired: boolean;
|
|
61
|
+
/** Pre-memory base score. Equals `score` when memory wasn't applied. */
|
|
62
|
+
baseScore: number;
|
|
63
|
+
/** Pre-memory base level. */
|
|
64
|
+
baseRiskLevel: TaskRiskLevel;
|
|
65
|
+
/** Memory adjustment applied, when --include-memory or includeMemory is set. */
|
|
66
|
+
memory?: ITaskRiskMemoryReport;
|
|
67
|
+
/** Convenience — same as `score` post-memory. */
|
|
68
|
+
adjustedScore: number;
|
|
69
|
+
/** Convenience — same as `riskLevel` post-memory. */
|
|
70
|
+
adjustedRiskLevel: TaskRiskLevel;
|
|
71
|
+
}
|
|
72
|
+
export interface IBuildTaskRiskOptions {
|
|
73
|
+
files?: readonly string[];
|
|
74
|
+
since?: string;
|
|
75
|
+
staged?: boolean;
|
|
76
|
+
/** When true, the memory index (if present) influences the score. */
|
|
77
|
+
includeMemory?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare function buildTaskRiskReport(task: string, inspection: ISharkcraftInspection, options?: IBuildTaskRiskOptions): Promise<ITaskRiskReport>;
|
|
80
|
+
export declare function renderTaskRiskText(r: ITaskRiskReport): string;
|
|
81
|
+
export declare function renderTaskRiskMarkdown(r: ITaskRiskReport): string;
|
|
82
|
+
export declare function summarizeTaskRisk(r: ITaskRiskReport): string;
|
|
83
|
+
export declare function _classifyLevel(score: number): TaskRiskLevel;
|
|
84
|
+
//# sourceMappingURL=task-risk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-risk.d.ts","sourceRoot":"","sources":["../src/task-risk.ts"],"names":[],"mappings":"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"}
|