@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,614 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository memory.
|
|
3
|
+
*
|
|
4
|
+
* Build a local-only index of historical signals from .sharkcraft/ artefacts
|
|
5
|
+
* (sessions, reports, bundles, plans, validations, smoke, policy, etc.).
|
|
6
|
+
* Pure local — no network, no telemetry, no embeddings, no model calls.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync, } from 'node:fs';
|
|
9
|
+
import * as nodePath from 'node:path';
|
|
10
|
+
export const REPO_MEMORY_SCHEMA = 'sharkcraft.memory/v1';
|
|
11
|
+
const MEMORY_DIR = nodePath.join('.sharkcraft', 'memory');
|
|
12
|
+
const INDEX_FILE = nodePath.join(MEMORY_DIR, 'index.json');
|
|
13
|
+
/** Heuristic language tagging by path extension. Returns undefined if unknown. */
|
|
14
|
+
function languageForPath(path) {
|
|
15
|
+
const lower = path.toLowerCase();
|
|
16
|
+
if (lower.endsWith('.ts') || lower.endsWith('.tsx'))
|
|
17
|
+
return 'typescript';
|
|
18
|
+
if (lower.endsWith('.js') || lower.endsWith('.jsx') || lower.endsWith('.mjs') || lower.endsWith('.cjs'))
|
|
19
|
+
return 'javascript';
|
|
20
|
+
if (lower.endsWith('.java'))
|
|
21
|
+
return 'java';
|
|
22
|
+
if (lower.endsWith('.cs'))
|
|
23
|
+
return 'csharp';
|
|
24
|
+
if (lower.endsWith('.py'))
|
|
25
|
+
return 'python';
|
|
26
|
+
if (lower.endsWith('.go'))
|
|
27
|
+
return 'go';
|
|
28
|
+
if (lower.endsWith('.rs'))
|
|
29
|
+
return 'rust';
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
/** Heuristic language tagging by diagnostic code prefix. */
|
|
33
|
+
function languageForDiagnosticCode(code) {
|
|
34
|
+
const lower = code.toLowerCase();
|
|
35
|
+
if (lower.startsWith('ts.') || lower.includes('typescript'))
|
|
36
|
+
return 'typescript';
|
|
37
|
+
if (lower.startsWith('java.'))
|
|
38
|
+
return 'java';
|
|
39
|
+
if (lower.startsWith('cs.') || lower.startsWith('csharp.'))
|
|
40
|
+
return 'csharp';
|
|
41
|
+
if (lower.startsWith('py.') || lower.startsWith('python.'))
|
|
42
|
+
return 'python';
|
|
43
|
+
if (lower.startsWith('go.'))
|
|
44
|
+
return 'go';
|
|
45
|
+
if (lower.startsWith('rust.'))
|
|
46
|
+
return 'rust';
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
/** Heuristic language tagging by boundary rule id. */
|
|
50
|
+
function languageForRuleId(id) {
|
|
51
|
+
return languageForDiagnosticCode(id);
|
|
52
|
+
}
|
|
53
|
+
/** Heuristic language tagging from a validation command string. */
|
|
54
|
+
function languageForValidationCommand(cmd) {
|
|
55
|
+
if (/(^|\s)tsc\b/.test(cmd) || /\bbun\s+test\b/.test(cmd) || /\bnpm\s+test\b/.test(cmd) || /\bpnpm\s+test\b/.test(cmd))
|
|
56
|
+
return 'typescript';
|
|
57
|
+
if (/\bmvn\b|\bgradle\b|\bgradlew\b/.test(cmd))
|
|
58
|
+
return 'java';
|
|
59
|
+
if (/\bdotnet\b/.test(cmd))
|
|
60
|
+
return 'csharp';
|
|
61
|
+
if (/\bpytest\b|\bmypy\b|\bruff\b|\bpython\s/.test(cmd))
|
|
62
|
+
return 'python';
|
|
63
|
+
if (/\bgo\s+(test|vet|build)\b/.test(cmd))
|
|
64
|
+
return 'go';
|
|
65
|
+
if (/\bcargo\b/.test(cmd))
|
|
66
|
+
return 'rust';
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
const SOURCE_DIRS = [
|
|
70
|
+
'.sharkcraft/sessions',
|
|
71
|
+
'.sharkcraft/reports',
|
|
72
|
+
'.sharkcraft/bundles',
|
|
73
|
+
'.sharkcraft/plans',
|
|
74
|
+
];
|
|
75
|
+
function walkJsonFiles(root) {
|
|
76
|
+
const out = [];
|
|
77
|
+
if (!existsSync(root))
|
|
78
|
+
return out;
|
|
79
|
+
const stack = [root];
|
|
80
|
+
while (stack.length > 0) {
|
|
81
|
+
const cur = stack.pop();
|
|
82
|
+
let st;
|
|
83
|
+
try {
|
|
84
|
+
st = statSync(cur);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (st.isDirectory()) {
|
|
90
|
+
let entries;
|
|
91
|
+
try {
|
|
92
|
+
entries = readdirSync(cur);
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (const e of entries)
|
|
98
|
+
stack.push(nodePath.join(cur, e));
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (!st.isFile())
|
|
102
|
+
continue;
|
|
103
|
+
if (!cur.endsWith('.json') && !cur.endsWith('.md'))
|
|
104
|
+
continue;
|
|
105
|
+
out.push(cur);
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
function safeReadJson(file) {
|
|
110
|
+
try {
|
|
111
|
+
return JSON.parse(readFileSync(file, 'utf8'));
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function bumpFile(map, file) {
|
|
118
|
+
const cur = map.get(file) ?? {
|
|
119
|
+
touchCount: 0,
|
|
120
|
+
conflictCount: 0,
|
|
121
|
+
failedValidationCount: 0,
|
|
122
|
+
warningCount: 0,
|
|
123
|
+
};
|
|
124
|
+
map.set(file, cur);
|
|
125
|
+
return cur;
|
|
126
|
+
}
|
|
127
|
+
function normalizeFileKey(file) {
|
|
128
|
+
return file.replace(/\\/g, '/');
|
|
129
|
+
}
|
|
130
|
+
function pushUnique(arr, v) {
|
|
131
|
+
if (!arr.includes(v))
|
|
132
|
+
arr.push(v);
|
|
133
|
+
}
|
|
134
|
+
function extractFilesFromAny(node, sink) {
|
|
135
|
+
if (node === null || node === undefined)
|
|
136
|
+
return;
|
|
137
|
+
if (typeof node === 'string') {
|
|
138
|
+
if (/[a-z0-9_.-]+\/[a-z0-9_.\-/]+\.(ts|tsx|js|jsx|md|json)/i.test(node))
|
|
139
|
+
sink(node);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (Array.isArray(node)) {
|
|
143
|
+
for (const v of node)
|
|
144
|
+
extractFilesFromAny(v, sink);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (typeof node === 'object') {
|
|
148
|
+
for (const [k, v] of Object.entries(node)) {
|
|
149
|
+
if (k === 'file' ||
|
|
150
|
+
k === 'relativePath' ||
|
|
151
|
+
k === 'path' ||
|
|
152
|
+
k === 'target' ||
|
|
153
|
+
k === 'source') {
|
|
154
|
+
if (typeof v === 'string')
|
|
155
|
+
sink(v);
|
|
156
|
+
}
|
|
157
|
+
extractFilesFromAny(v, sink);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function extractTaskFromName(file) {
|
|
162
|
+
// .sharkcraft/sessions/<ts>-<slug>/...
|
|
163
|
+
const m = file.match(/sessions\/[^/]+\/?/);
|
|
164
|
+
if (m)
|
|
165
|
+
return m[0];
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
export async function buildRepositoryMemory(inspection) {
|
|
169
|
+
const root = inspection.projectRoot;
|
|
170
|
+
const scannedDirs = [];
|
|
171
|
+
const files = new Map();
|
|
172
|
+
const diagnostics = new Map();
|
|
173
|
+
const plansWithConflicts = [];
|
|
174
|
+
const boundaryViolations = new Map();
|
|
175
|
+
const policyViolations = new Map();
|
|
176
|
+
const releaseBlockers = [];
|
|
177
|
+
const packIssues = [];
|
|
178
|
+
const failedValidationCommands = [];
|
|
179
|
+
const slowValidationCommands = [];
|
|
180
|
+
const recentTaskTypes = [];
|
|
181
|
+
const playbooks = new Map();
|
|
182
|
+
const constructs = new Map();
|
|
183
|
+
const warnings = [];
|
|
184
|
+
let sourceCount = 0;
|
|
185
|
+
for (const rel of SOURCE_DIRS) {
|
|
186
|
+
const abs = nodePath.join(root, rel);
|
|
187
|
+
if (!existsSync(abs))
|
|
188
|
+
continue;
|
|
189
|
+
scannedDirs.push(rel);
|
|
190
|
+
const filesInDir = walkJsonFiles(abs);
|
|
191
|
+
for (const file of filesInDir) {
|
|
192
|
+
sourceCount++;
|
|
193
|
+
const json = safeReadJson(file);
|
|
194
|
+
if (!json || typeof json !== 'object')
|
|
195
|
+
continue;
|
|
196
|
+
const fname = file.toLowerCase();
|
|
197
|
+
// File touch heuristic: walk the JSON looking for file-shaped strings.
|
|
198
|
+
extractFilesFromAny(json, (f) => {
|
|
199
|
+
const key = normalizeFileKey(f);
|
|
200
|
+
bumpFile(files, key).touchCount += 1;
|
|
201
|
+
});
|
|
202
|
+
// Plan files with conflicts.
|
|
203
|
+
const j = json;
|
|
204
|
+
if (Array.isArray(j['expectedChanges'])) {
|
|
205
|
+
for (const c of j['expectedChanges']) {
|
|
206
|
+
if (c['type'] === 'conflict') {
|
|
207
|
+
plansWithConflicts.push(file);
|
|
208
|
+
const target = typeof c['relativePath'] === 'string' ? c['relativePath'] : '';
|
|
209
|
+
if (target)
|
|
210
|
+
bumpFile(files, normalizeFileKey(target)).conflictCount += 1;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// Validation reports.
|
|
215
|
+
if (Array.isArray(j['verificationResults'])) {
|
|
216
|
+
for (const v of j['verificationResults']) {
|
|
217
|
+
const cmd = typeof v['command'] === 'string' ? v['command'] : '';
|
|
218
|
+
if (typeof v['exitCode'] === 'number' && v['exitCode'] !== 0 && cmd) {
|
|
219
|
+
failedValidationCommands.push(cmd);
|
|
220
|
+
}
|
|
221
|
+
if (typeof v['durationMs'] === 'number' && cmd) {
|
|
222
|
+
const d = v['durationMs'];
|
|
223
|
+
if (d > 30000)
|
|
224
|
+
slowValidationCommands.push({ command: cmd, durationMs: d });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// Boundary violations.
|
|
229
|
+
if (Array.isArray(j['violations'])) {
|
|
230
|
+
for (const v of j['violations']) {
|
|
231
|
+
const ruleId = typeof v['ruleId'] === 'string' ? v['ruleId'] : '';
|
|
232
|
+
if (ruleId)
|
|
233
|
+
boundaryViolations.set(ruleId, (boundaryViolations.get(ruleId) ?? 0) + 1);
|
|
234
|
+
const fp = typeof v['file'] === 'string' ? v['file'] : '';
|
|
235
|
+
if (fp)
|
|
236
|
+
bumpFile(files, normalizeFileKey(fp)).warningCount += 1;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// Policy / compliance reports.
|
|
240
|
+
if (Array.isArray(j['policyViolations']) || Array.isArray(j['findings'])) {
|
|
241
|
+
const list = (Array.isArray(j['policyViolations']) ? j['policyViolations'] : j['findings']);
|
|
242
|
+
if (list) {
|
|
243
|
+
for (const v of list) {
|
|
244
|
+
const code = typeof v['policyId'] === 'string'
|
|
245
|
+
? v['policyId']
|
|
246
|
+
: typeof v['code'] === 'string'
|
|
247
|
+
? v['code']
|
|
248
|
+
: '';
|
|
249
|
+
if (code)
|
|
250
|
+
policyViolations.set(code, (policyViolations.get(code) ?? 0) + 1);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// Release readiness / smoke.
|
|
255
|
+
if (Array.isArray(j['blockers'])) {
|
|
256
|
+
for (const b of j['blockers']) {
|
|
257
|
+
const id = typeof b['id'] === 'string' ? b['id'] : '';
|
|
258
|
+
if (id)
|
|
259
|
+
pushUnique(releaseBlockers, id);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
// Pack issues.
|
|
263
|
+
if (Array.isArray(j['packs'])) {
|
|
264
|
+
for (const p of j['packs']) {
|
|
265
|
+
if (p['valid'] === false || (Array.isArray(p['warnings']) && p['warnings'].length > 0)) {
|
|
266
|
+
const name = typeof p['name'] === 'string' ? p['name'] : '(unnamed pack)';
|
|
267
|
+
pushUnique(packIssues, name);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// Diagnostics.
|
|
272
|
+
const code = typeof j['code'] === 'string' ? j['code'] : '';
|
|
273
|
+
if (code && (fname.includes('diagnostic') || code.startsWith('plan-') || code.includes('failed'))) {
|
|
274
|
+
const cur = diagnostics.get(code) ?? { count: 0 };
|
|
275
|
+
cur.count += 1;
|
|
276
|
+
if (typeof j['generatedAt'] === 'string')
|
|
277
|
+
cur.lastSeen = j['generatedAt'];
|
|
278
|
+
diagnostics.set(code, cur);
|
|
279
|
+
}
|
|
280
|
+
// Sessions: capture taskType / playbook.
|
|
281
|
+
const taskKind = typeof j['intent'] === 'object' && j['intent'] !== null ? j['intent']['kind'] : undefined;
|
|
282
|
+
if (typeof taskKind === 'string')
|
|
283
|
+
pushUnique(recentTaskTypes, taskKind);
|
|
284
|
+
const taskHint = extractTaskFromName(file);
|
|
285
|
+
if (taskHint)
|
|
286
|
+
void taskHint;
|
|
287
|
+
const playbookId = typeof j['playbookId'] === 'string' ? j['playbookId'] : '';
|
|
288
|
+
if (playbookId) {
|
|
289
|
+
const cur = playbooks.get(playbookId) ?? { successCount: 0, failureCount: 0 };
|
|
290
|
+
const status = typeof j['status'] === 'string' ? j['status'].toLowerCase() : '';
|
|
291
|
+
if (status === 'success' || status === 'completed')
|
|
292
|
+
cur.successCount += 1;
|
|
293
|
+
else if (status === 'failed' || status === 'error')
|
|
294
|
+
cur.failureCount += 1;
|
|
295
|
+
playbooks.set(playbookId, cur);
|
|
296
|
+
}
|
|
297
|
+
// Constructs touched.
|
|
298
|
+
if (Array.isArray(j['affectedConstructs'])) {
|
|
299
|
+
for (const c of j['affectedConstructs']) {
|
|
300
|
+
const id = typeof c === 'string'
|
|
301
|
+
? c
|
|
302
|
+
: typeof c === 'object' && c !== null && typeof c.id === 'string'
|
|
303
|
+
? (c.id)
|
|
304
|
+
: '';
|
|
305
|
+
if (id) {
|
|
306
|
+
const cur = constructs.get(id) ?? { weight: 0 };
|
|
307
|
+
cur.weight += 1;
|
|
308
|
+
constructs.set(id, cur);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (sourceCount === 0)
|
|
315
|
+
warnings.push('No .sharkcraft/ history found — index is empty.');
|
|
316
|
+
// Language tagging derived from file paths.
|
|
317
|
+
const languageByFile = {};
|
|
318
|
+
const riskyByLang = {};
|
|
319
|
+
for (const [path] of files) {
|
|
320
|
+
const lang = languageForPath(path);
|
|
321
|
+
if (!lang)
|
|
322
|
+
continue;
|
|
323
|
+
languageByFile[path] = lang;
|
|
324
|
+
if (!riskyByLang[lang])
|
|
325
|
+
riskyByLang[lang] = [];
|
|
326
|
+
riskyByLang[lang].push(path);
|
|
327
|
+
}
|
|
328
|
+
const diagsByLang = {};
|
|
329
|
+
for (const code of diagnostics.keys()) {
|
|
330
|
+
const langGuess = languageForDiagnosticCode(code);
|
|
331
|
+
if (!langGuess)
|
|
332
|
+
continue;
|
|
333
|
+
if (!diagsByLang[langGuess])
|
|
334
|
+
diagsByLang[langGuess] = [];
|
|
335
|
+
diagsByLang[langGuess].push(code);
|
|
336
|
+
}
|
|
337
|
+
const boundaryByLang = {};
|
|
338
|
+
for (const id of boundaryViolations.keys()) {
|
|
339
|
+
const langGuess = languageForRuleId(id);
|
|
340
|
+
if (!langGuess)
|
|
341
|
+
continue;
|
|
342
|
+
if (!boundaryByLang[langGuess])
|
|
343
|
+
boundaryByLang[langGuess] = [];
|
|
344
|
+
boundaryByLang[langGuess].push(id);
|
|
345
|
+
}
|
|
346
|
+
const validationByLang = {};
|
|
347
|
+
for (const cmd of failedValidationCommands) {
|
|
348
|
+
const langGuess = languageForValidationCommand(cmd);
|
|
349
|
+
if (!langGuess)
|
|
350
|
+
continue;
|
|
351
|
+
if (!validationByLang[langGuess])
|
|
352
|
+
validationByLang[langGuess] = [];
|
|
353
|
+
validationByLang[langGuess].push(cmd);
|
|
354
|
+
}
|
|
355
|
+
const planConflictsByLang = {};
|
|
356
|
+
for (const path of plansWithConflicts) {
|
|
357
|
+
const lang = languageForPath(path);
|
|
358
|
+
if (!lang)
|
|
359
|
+
continue;
|
|
360
|
+
if (!planConflictsByLang[lang])
|
|
361
|
+
planConflictsByLang[lang] = [];
|
|
362
|
+
planConflictsByLang[lang].push(path);
|
|
363
|
+
}
|
|
364
|
+
const hotspots = [];
|
|
365
|
+
for (const [lang, lst] of Object.entries(riskyByLang)) {
|
|
366
|
+
const top = lst.slice(0, 8);
|
|
367
|
+
let totalWeight = 0;
|
|
368
|
+
for (const path of lst) {
|
|
369
|
+
const acc = files.get(path);
|
|
370
|
+
if (acc)
|
|
371
|
+
totalWeight += acc.touchCount + acc.conflictCount + acc.failedValidationCount;
|
|
372
|
+
}
|
|
373
|
+
hotspots.push({ language: lang, fileCount: lst.length, totalWeight, topFiles: top });
|
|
374
|
+
}
|
|
375
|
+
hotspots.sort((a, b) => b.totalWeight - a.totalWeight);
|
|
376
|
+
const trend = hotspots.map((h) => ({
|
|
377
|
+
language: h.language,
|
|
378
|
+
trend: h.totalWeight >= 6 ? 'rising' : h.totalWeight > 0 ? 'stable' : 'unknown',
|
|
379
|
+
weight: h.totalWeight,
|
|
380
|
+
}));
|
|
381
|
+
return {
|
|
382
|
+
schema: REPO_MEMORY_SCHEMA,
|
|
383
|
+
generatedAt: new Date().toISOString(),
|
|
384
|
+
projectRoot: root,
|
|
385
|
+
sourceCount,
|
|
386
|
+
scannedDirs,
|
|
387
|
+
languageByFile,
|
|
388
|
+
riskyFilesByLanguage: Object.fromEntries(Object.entries(riskyByLang).map(([k, v]) => [k, v.slice(0, 30)])),
|
|
389
|
+
diagnosticsByLanguage: diagsByLang,
|
|
390
|
+
boundaryViolationsByLanguage: boundaryByLang,
|
|
391
|
+
validationFailuresByLanguage: validationByLang,
|
|
392
|
+
planConflictsByLanguage: planConflictsByLang,
|
|
393
|
+
languageHotspots: hotspots,
|
|
394
|
+
languageRiskTrend: trend,
|
|
395
|
+
files: [...files.entries()]
|
|
396
|
+
.map(([path, v]) => ({ path, ...v }))
|
|
397
|
+
.sort((a, b) => b.touchCount + b.conflictCount + b.failedValidationCount - (a.touchCount + a.conflictCount + a.failedValidationCount))
|
|
398
|
+
.slice(0, 200),
|
|
399
|
+
diagnostics: [...diagnostics.entries()]
|
|
400
|
+
.map(([code, v]) => ({ code, count: v.count, ...(v.lastSeen ? { lastSeen: v.lastSeen } : {}) }))
|
|
401
|
+
.sort((a, b) => b.count - a.count)
|
|
402
|
+
.slice(0, 100),
|
|
403
|
+
plansWithConflicts: [...new Set(plansWithConflicts)].slice(0, 50),
|
|
404
|
+
boundaryViolationsRecurring: [...boundaryViolations.entries()]
|
|
405
|
+
.filter(([, n]) => n >= 2)
|
|
406
|
+
.map(([id]) => id)
|
|
407
|
+
.slice(0, 50),
|
|
408
|
+
policyViolationsRecurring: [...policyViolations.entries()]
|
|
409
|
+
.filter(([, n]) => n >= 2)
|
|
410
|
+
.map(([id]) => id)
|
|
411
|
+
.slice(0, 50),
|
|
412
|
+
releaseBlockers,
|
|
413
|
+
packIssues,
|
|
414
|
+
failedValidationCommands: [...new Set(failedValidationCommands)].slice(0, 50),
|
|
415
|
+
slowValidationCommands: slowValidationCommands.slice(0, 25),
|
|
416
|
+
recentTaskTypes,
|
|
417
|
+
playbooks: [...playbooks.entries()].map(([id, v]) => ({ id, ...v })),
|
|
418
|
+
highRiskConstructs: [...constructs.entries()]
|
|
419
|
+
.map(([id, v]) => ({ id, weight: v.weight, ...(v.lastSeen ? { lastSeen: v.lastSeen } : {}) }))
|
|
420
|
+
.sort((a, b) => b.weight - a.weight)
|
|
421
|
+
.slice(0, 50),
|
|
422
|
+
warnings,
|
|
423
|
+
notes: ['Local-only index. No network. No telemetry. No embeddings.'],
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
export function memoryIndexPath(projectRoot) {
|
|
427
|
+
return nodePath.join(projectRoot, INDEX_FILE);
|
|
428
|
+
}
|
|
429
|
+
export function memoryDir(projectRoot) {
|
|
430
|
+
return nodePath.join(projectRoot, MEMORY_DIR);
|
|
431
|
+
}
|
|
432
|
+
export function saveRepositoryMemory(projectRoot, index) {
|
|
433
|
+
const dir = memoryDir(projectRoot);
|
|
434
|
+
mkdirSync(dir, { recursive: true });
|
|
435
|
+
const file = memoryIndexPath(projectRoot);
|
|
436
|
+
writeFileSync(file, JSON.stringify(index, null, 2) + '\n', 'utf8');
|
|
437
|
+
return file;
|
|
438
|
+
}
|
|
439
|
+
export function loadRepositoryMemory(projectRoot) {
|
|
440
|
+
const file = memoryIndexPath(projectRoot);
|
|
441
|
+
if (!existsSync(file))
|
|
442
|
+
return null;
|
|
443
|
+
try {
|
|
444
|
+
return JSON.parse(readFileSync(file, 'utf8'));
|
|
445
|
+
}
|
|
446
|
+
catch {
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
export function resetRepositoryMemory(projectRoot, opts) {
|
|
451
|
+
const dir = memoryDir(projectRoot);
|
|
452
|
+
const safetyPrefix = nodePath.join(projectRoot, '.sharkcraft', 'memory');
|
|
453
|
+
// Triple-check: refuse if we would touch anything outside .sharkcraft/memory.
|
|
454
|
+
if (!dir.startsWith(safetyPrefix)) {
|
|
455
|
+
return { dryRun: opts.dryRun, removed: [], notRemoved: [dir] };
|
|
456
|
+
}
|
|
457
|
+
if (!existsSync(dir))
|
|
458
|
+
return { dryRun: opts.dryRun, removed: [], notRemoved: [] };
|
|
459
|
+
if (opts.dryRun) {
|
|
460
|
+
return { dryRun: true, removed: [dir], notRemoved: [] };
|
|
461
|
+
}
|
|
462
|
+
rmSync(dir, { recursive: true, force: true });
|
|
463
|
+
return { dryRun: false, removed: [dir], notRemoved: [] };
|
|
464
|
+
}
|
|
465
|
+
export function memoryRiskForTask(index, task) {
|
|
466
|
+
if (!index || index.sourceCount === 0) {
|
|
467
|
+
return {
|
|
468
|
+
schema: REPO_MEMORY_SCHEMA,
|
|
469
|
+
task,
|
|
470
|
+
generatedAt: new Date().toISOString(),
|
|
471
|
+
recommendation: 'no-memory',
|
|
472
|
+
matchedFiles: [],
|
|
473
|
+
matchedDiagnostics: [],
|
|
474
|
+
matchedConstructs: [],
|
|
475
|
+
notes: ['No memory index found. Run `shrk memory build` first.'],
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
const lower = task.toLowerCase();
|
|
479
|
+
const tokens = lower.split(/[^a-z0-9]+/).filter((t) => t.length >= 3);
|
|
480
|
+
const matchedFiles = index.files
|
|
481
|
+
.filter((f) => tokens.some((t) => f.path.toLowerCase().includes(t)))
|
|
482
|
+
.slice(0, 20);
|
|
483
|
+
const matchedDiagnostics = index.diagnostics
|
|
484
|
+
.filter((d) => tokens.some((t) => d.code.toLowerCase().includes(t)))
|
|
485
|
+
.slice(0, 10);
|
|
486
|
+
const matchedConstructs = index.highRiskConstructs
|
|
487
|
+
.filter((c) => tokens.some((t) => c.id.toLowerCase().includes(t)))
|
|
488
|
+
.slice(0, 10);
|
|
489
|
+
const matches = matchedFiles.length + matchedDiagnostics.length + matchedConstructs.length;
|
|
490
|
+
let recommendation = 'no-overlap';
|
|
491
|
+
if (matches === 0)
|
|
492
|
+
recommendation = 'no-overlap';
|
|
493
|
+
else if (matches < 3)
|
|
494
|
+
recommendation = 'overlap-weak';
|
|
495
|
+
else
|
|
496
|
+
recommendation = 'overlap-strong';
|
|
497
|
+
const notes = [];
|
|
498
|
+
if (matches > 0) {
|
|
499
|
+
notes.push(`Memory shows historical activity for ${matches} signal(s) relevant to this task.`);
|
|
500
|
+
}
|
|
501
|
+
return {
|
|
502
|
+
schema: REPO_MEMORY_SCHEMA,
|
|
503
|
+
task,
|
|
504
|
+
generatedAt: new Date().toISOString(),
|
|
505
|
+
recommendation,
|
|
506
|
+
matchedFiles,
|
|
507
|
+
matchedDiagnostics,
|
|
508
|
+
matchedConstructs,
|
|
509
|
+
notes,
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
export function renderMemoryReportText(index) {
|
|
513
|
+
let out = `=== Repository memory ===\n`;
|
|
514
|
+
out += ` project root ${index.projectRoot}\n`;
|
|
515
|
+
out += ` generated ${index.generatedAt}\n`;
|
|
516
|
+
out += ` sources scanned ${index.sourceCount}\n`;
|
|
517
|
+
out += ` scanned dirs ${index.scannedDirs.join(', ') || '(none)'}\n\n`;
|
|
518
|
+
if (index.files.length) {
|
|
519
|
+
out += `Top files (touch + conflict + failure):\n`;
|
|
520
|
+
for (const f of index.files.slice(0, 20))
|
|
521
|
+
out += ` ${String(f.touchCount).padStart(4)}x ${f.path} conflicts=${f.conflictCount} warnings=${f.warningCount}\n`;
|
|
522
|
+
out += `\n`;
|
|
523
|
+
}
|
|
524
|
+
if (index.diagnostics.length) {
|
|
525
|
+
out += `Recurring diagnostics:\n`;
|
|
526
|
+
for (const d of index.diagnostics)
|
|
527
|
+
out += ` ${String(d.count).padStart(3)}x ${d.code}\n`;
|
|
528
|
+
out += `\n`;
|
|
529
|
+
}
|
|
530
|
+
if (index.plansWithConflicts.length) {
|
|
531
|
+
out += `Plans with conflicts (${index.plansWithConflicts.length}):\n`;
|
|
532
|
+
for (const p of index.plansWithConflicts.slice(0, 10))
|
|
533
|
+
out += ` • ${p}\n`;
|
|
534
|
+
out += `\n`;
|
|
535
|
+
}
|
|
536
|
+
if (index.boundaryViolationsRecurring.length) {
|
|
537
|
+
out += `Recurring boundary violations: ${index.boundaryViolationsRecurring.join(', ')}\n\n`;
|
|
538
|
+
}
|
|
539
|
+
if (index.policyViolationsRecurring.length) {
|
|
540
|
+
out += `Recurring policy violations: ${index.policyViolationsRecurring.join(', ')}\n\n`;
|
|
541
|
+
}
|
|
542
|
+
if (index.releaseBlockers.length) {
|
|
543
|
+
out += `Release blockers seen: ${index.releaseBlockers.join(', ')}\n\n`;
|
|
544
|
+
}
|
|
545
|
+
if (index.packIssues.length) {
|
|
546
|
+
out += `Pack issues seen: ${index.packIssues.join(', ')}\n\n`;
|
|
547
|
+
}
|
|
548
|
+
if (index.failedValidationCommands.length) {
|
|
549
|
+
out += `Failed validation commands:\n`;
|
|
550
|
+
for (const c of index.failedValidationCommands.slice(0, 10))
|
|
551
|
+
out += ` • ${c}\n`;
|
|
552
|
+
out += `\n`;
|
|
553
|
+
}
|
|
554
|
+
if (index.slowValidationCommands.length) {
|
|
555
|
+
out += `Slow validation commands:\n`;
|
|
556
|
+
for (const s of index.slowValidationCommands.slice(0, 10))
|
|
557
|
+
out += ` • ${s.command} (${s.durationMs}ms)\n`;
|
|
558
|
+
out += `\n`;
|
|
559
|
+
}
|
|
560
|
+
if (index.recentTaskTypes.length) {
|
|
561
|
+
out += `Recent task types: ${index.recentTaskTypes.join(', ')}\n\n`;
|
|
562
|
+
}
|
|
563
|
+
if (index.playbooks.length) {
|
|
564
|
+
out += `Playbooks (success / failure):\n`;
|
|
565
|
+
for (const p of index.playbooks)
|
|
566
|
+
out += ` • ${p.id}: ✔${p.successCount} ✗${p.failureCount}\n`;
|
|
567
|
+
out += `\n`;
|
|
568
|
+
}
|
|
569
|
+
if (index.highRiskConstructs.length) {
|
|
570
|
+
out += `Constructs by activity weight:\n`;
|
|
571
|
+
for (const c of index.highRiskConstructs.slice(0, 15))
|
|
572
|
+
out += ` ${String(c.weight).padStart(3)}x ${c.id}\n`;
|
|
573
|
+
out += `\n`;
|
|
574
|
+
}
|
|
575
|
+
if (index.warnings.length) {
|
|
576
|
+
out += `Warnings:\n`;
|
|
577
|
+
for (const w of index.warnings)
|
|
578
|
+
out += ` • ${w}\n`;
|
|
579
|
+
out += `\n`;
|
|
580
|
+
}
|
|
581
|
+
out += `Notes:\n`;
|
|
582
|
+
for (const n of index.notes)
|
|
583
|
+
out += ` • ${n}\n`;
|
|
584
|
+
return out;
|
|
585
|
+
}
|
|
586
|
+
export function renderMemoryRiskText(r) {
|
|
587
|
+
let out = `=== Memory-based risk for task ===\n`;
|
|
588
|
+
out += ` task ${r.task}\n`;
|
|
589
|
+
out += ` recommendation ${r.recommendation}\n\n`;
|
|
590
|
+
if (r.matchedFiles.length) {
|
|
591
|
+
out += `Matched risky files:\n`;
|
|
592
|
+
for (const f of r.matchedFiles)
|
|
593
|
+
out += ` ${String(f.touchCount).padStart(4)}x ${f.path} conflicts=${f.conflictCount}\n`;
|
|
594
|
+
out += `\n`;
|
|
595
|
+
}
|
|
596
|
+
if (r.matchedDiagnostics.length) {
|
|
597
|
+
out += `Matched diagnostics:\n`;
|
|
598
|
+
for (const d of r.matchedDiagnostics)
|
|
599
|
+
out += ` ${String(d.count).padStart(3)}x ${d.code}\n`;
|
|
600
|
+
out += `\n`;
|
|
601
|
+
}
|
|
602
|
+
if (r.matchedConstructs.length) {
|
|
603
|
+
out += `Matched constructs:\n`;
|
|
604
|
+
for (const c of r.matchedConstructs)
|
|
605
|
+
out += ` ${String(c.weight).padStart(3)}x ${c.id}\n`;
|
|
606
|
+
out += `\n`;
|
|
607
|
+
}
|
|
608
|
+
if (r.notes.length) {
|
|
609
|
+
out += `Notes:\n`;
|
|
610
|
+
for (const n of r.notes)
|
|
611
|
+
out += ` • ${n}\n`;
|
|
612
|
+
}
|
|
613
|
+
return out;
|
|
614
|
+
}
|