@shrkcrft/inspector 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/acceptance-replay.d.ts +63 -0
- package/dist/acceptance-replay.d.ts.map +1 -0
- package/dist/acceptance-replay.js +240 -0
- package/dist/action-hint-diagnostics.d.ts +32 -0
- package/dist/action-hint-diagnostics.d.ts.map +1 -0
- package/dist/action-hint-diagnostics.js +133 -0
- package/dist/adoption-check.d.ts +28 -0
- package/dist/adoption-check.d.ts.map +1 -0
- package/dist/adoption-check.js +181 -0
- package/dist/adoption-checkpoint.d.ts +97 -0
- package/dist/adoption-checkpoint.d.ts.map +1 -0
- package/dist/adoption-checkpoint.js +209 -0
- package/dist/adoption-merge-preview.d.ts +28 -0
- package/dist/adoption-merge-preview.d.ts.map +1 -0
- package/dist/adoption-merge-preview.js +254 -0
- package/dist/adoption-report-renderer.d.ts +33 -0
- package/dist/adoption-report-renderer.d.ts.map +1 -0
- package/dist/adoption-report-renderer.js +257 -0
- package/dist/adoption-state.d.ts +100 -0
- package/dist/adoption-state.d.ts.map +1 -0
- package/dist/adoption-state.js +296 -0
- package/dist/adoption-three-way.d.ts +46 -0
- package/dist/adoption-three-way.d.ts.map +1 -0
- package/dist/adoption-three-way.js +181 -0
- package/dist/agent-brief.d.ts +77 -0
- package/dist/agent-brief.d.ts.map +1 -0
- package/dist/agent-brief.js +490 -0
- package/dist/agent-contract-gate.d.ts +108 -0
- package/dist/agent-contract-gate.d.ts.map +1 -0
- package/dist/agent-contract-gate.js +412 -0
- package/dist/agent-contract-templates.d.ts +63 -0
- package/dist/agent-contract-templates.d.ts.map +1 -0
- package/dist/agent-contract-templates.js +346 -0
- package/dist/agent-contract.d.ts +65 -0
- package/dist/agent-contract.d.ts.map +1 -0
- package/dist/agent-contract.js +555 -0
- package/dist/agent-handoff.d.ts +123 -0
- package/dist/agent-handoff.d.ts.map +1 -0
- package/dist/agent-handoff.js +470 -0
- package/dist/agent-instructions.d.ts +2 -0
- package/dist/agent-instructions.d.ts.map +1 -0
- package/dist/agent-instructions.js +21 -0
- package/dist/agent-orchestration.d.ts +61 -0
- package/dist/agent-orchestration.d.ts.map +1 -0
- package/dist/agent-orchestration.js +285 -0
- package/dist/agent-task-prep.d.ts +31 -0
- package/dist/agent-task-prep.d.ts.map +1 -0
- package/dist/agent-task-prep.js +73 -0
- package/dist/ai-readiness.d.ts +30 -0
- package/dist/ai-readiness.d.ts.map +1 -0
- package/dist/ai-readiness.js +279 -0
- package/dist/api-report.d.ts +51 -0
- package/dist/api-report.d.ts.map +1 -0
- package/dist/api-report.js +254 -0
- package/dist/apply-dispatch-trace.d.ts +93 -0
- package/dist/apply-dispatch-trace.d.ts.map +1 -0
- package/dist/apply-dispatch-trace.js +283 -0
- package/dist/apply-gate-result.d.ts +52 -0
- package/dist/apply-gate-result.d.ts.map +1 -0
- package/dist/apply-gate-result.js +44 -0
- package/dist/architecture-map.d.ts +118 -0
- package/dist/architecture-map.d.ts.map +1 -0
- package/dist/architecture-map.js +543 -0
- package/dist/area-explore.d.ts +75 -0
- package/dist/area-explore.d.ts.map +1 -0
- package/dist/area-explore.js +438 -0
- package/dist/area-map.d.ts +43 -0
- package/dist/area-map.d.ts.map +1 -0
- package/dist/area-map.js +197 -0
- package/dist/asset-provenance.d.ts +123 -0
- package/dist/asset-provenance.d.ts.map +1 -0
- package/dist/asset-provenance.js +209 -0
- package/dist/barrel-operations.d.ts +45 -0
- package/dist/barrel-operations.d.ts.map +1 -0
- package/dist/barrel-operations.js +159 -0
- package/dist/boundaries-changed-only.d.ts +62 -0
- package/dist/boundaries-changed-only.d.ts.map +1 -0
- package/dist/boundaries-changed-only.js +97 -0
- package/dist/boundary-suggestions.d.ts +20 -0
- package/dist/boundary-suggestions.d.ts.map +1 -0
- package/dist/boundary-suggestions.js +51 -0
- package/dist/bundle-diff.d.ts +98 -0
- package/dist/bundle-diff.d.ts.map +1 -0
- package/dist/bundle-diff.js +531 -0
- package/dist/bundle-replay.d.ts +68 -0
- package/dist/bundle-replay.d.ts.map +1 -0
- package/dist/bundle-replay.js +273 -0
- package/dist/bundle-validate-html.d.ts +11 -0
- package/dist/bundle-validate-html.d.ts.map +1 -0
- package/dist/bundle-validate-html.js +60 -0
- package/dist/change-intent.d.ts +36 -0
- package/dist/change-intent.d.ts.map +1 -0
- package/dist/change-intent.js +259 -0
- package/dist/changed-preflight.d.ts +59 -0
- package/dist/changed-preflight.d.ts.map +1 -0
- package/dist/changed-preflight.js +358 -0
- package/dist/changed-scope.d.ts +112 -0
- package/dist/changed-scope.d.ts.map +1 -0
- package/dist/changed-scope.js +172 -0
- package/dist/changes-summary.d.ts +87 -0
- package/dist/changes-summary.d.ts.map +1 -0
- package/dist/changes-summary.js +323 -0
- package/dist/check-result-v1.d.ts +90 -0
- package/dist/check-result-v1.d.ts.map +1 -0
- package/dist/check-result-v1.js +335 -0
- package/dist/ci-integrity-report.d.ts +38 -0
- package/dist/ci-integrity-report.d.ts.map +1 -0
- package/dist/ci-integrity-report.js +324 -0
- package/dist/ci-permissions-fix.d.ts +38 -0
- package/dist/ci-permissions-fix.d.ts.map +1 -0
- package/dist/ci-permissions-fix.js +201 -0
- package/dist/ci-permissions.d.ts +51 -0
- package/dist/ci-permissions.d.ts.map +1 -0
- package/dist/ci-permissions.js +431 -0
- package/dist/ci-predict.d.ts +42 -0
- package/dist/ci-predict.d.ts.map +1 -0
- package/dist/ci-predict.js +300 -0
- package/dist/ci-scaffold.d.ts +47 -0
- package/dist/ci-scaffold.d.ts.map +1 -0
- package/dist/ci-scaffold.js +638 -0
- package/dist/codemod-assist.d.ts +97 -0
- package/dist/codemod-assist.d.ts.map +1 -0
- package/dist/codemod-assist.js +261 -0
- package/dist/command-recommender.d.ts +25 -0
- package/dist/command-recommender.d.ts.map +1 -0
- package/dist/command-recommender.js +145 -0
- package/dist/command-suggester.d.ts +61 -0
- package/dist/command-suggester.d.ts.map +1 -0
- package/dist/command-suggester.js +159 -0
- package/dist/command-taxonomy.d.ts +38 -0
- package/dist/command-taxonomy.d.ts.map +1 -0
- package/dist/command-taxonomy.js +164 -0
- package/dist/compliance-evidence.d.ts +58 -0
- package/dist/compliance-evidence.d.ts.map +1 -0
- package/dist/compliance-evidence.js +260 -0
- package/dist/compliance-profiles.d.ts +42 -0
- package/dist/compliance-profiles.d.ts.map +1 -0
- package/dist/compliance-profiles.js +171 -0
- package/dist/construct-adoption-diff.d.ts +55 -0
- package/dist/construct-adoption-diff.d.ts.map +1 -0
- package/dist/construct-adoption-diff.js +331 -0
- package/dist/construct-adoption.d.ts +71 -0
- package/dist/construct-adoption.d.ts.map +1 -0
- package/dist/construct-adoption.js +331 -0
- package/dist/construct-inference.d.ts +44 -0
- package/dist/construct-inference.d.ts.map +1 -0
- package/dist/construct-inference.js +391 -0
- package/dist/construct-registry.d.ts +32 -0
- package/dist/construct-registry.d.ts.map +1 -0
- package/dist/construct-registry.js +198 -0
- package/dist/contract-file-rule.d.ts +37 -0
- package/dist/contract-file-rule.d.ts.map +1 -0
- package/dist/contract-file-rule.js +99 -0
- package/dist/contract-template-registry.d.ts +28 -0
- package/dist/contract-template-registry.d.ts.map +1 -0
- package/dist/contract-template-registry.js +161 -0
- package/dist/contradictions.d.ts +52 -0
- package/dist/contradictions.d.ts.map +1 -0
- package/dist/contradictions.js +391 -0
- package/dist/convention-registry.d.ts +44 -0
- package/dist/convention-registry.d.ts.map +1 -0
- package/dist/convention-registry.js +195 -0
- package/dist/coverage-report.d.ts +25 -0
- package/dist/coverage-report.d.ts.map +1 -0
- package/dist/coverage-report.js +190 -0
- package/dist/custom-checks.d.ts +146 -0
- package/dist/custom-checks.d.ts.map +1 -0
- package/dist/custom-checks.js +260 -0
- package/dist/dashboard/dashboard-data.d.ts +59 -0
- package/dist/dashboard/dashboard-data.d.ts.map +1 -0
- package/dist/dashboard/dashboard-data.js +653 -0
- package/dist/dashboard-export.d.ts +67 -0
- package/dist/dashboard-export.d.ts.map +1 -0
- package/dist/dashboard-export.js +203 -0
- package/dist/decision-records.d.ts +47 -0
- package/dist/decision-records.d.ts.map +1 -0
- package/dist/decision-records.js +255 -0
- package/dist/demo-package.d.ts +49 -0
- package/dist/demo-package.d.ts.map +1 -0
- package/dist/demo-package.js +305 -0
- package/dist/demo-script.d.ts +25 -0
- package/dist/demo-script.d.ts.map +1 -0
- package/dist/demo-script.js +198 -0
- package/dist/demo-workflow.d.ts +28 -0
- package/dist/demo-workflow.d.ts.map +1 -0
- package/dist/demo-workflow.js +178 -0
- package/dist/dev-cycle.d.ts +41 -0
- package/dist/dev-cycle.d.ts.map +1 -0
- package/dist/dev-cycle.js +94 -0
- package/dist/dev-session-html.d.ts +13 -0
- package/dist/dev-session-html.d.ts.map +1 -0
- package/dist/dev-session-html.js +223 -0
- package/dist/dev-session-report.d.ts +11 -0
- package/dist/dev-session-report.d.ts.map +1 -0
- package/dist/dev-session-report.js +206 -0
- package/dist/dev-session.d.ts +257 -0
- package/dist/dev-session.d.ts.map +1 -0
- package/dist/dev-session.js +568 -0
- package/dist/diagnostics-suggest.d.ts +17 -0
- package/dist/diagnostics-suggest.d.ts.map +1 -0
- package/dist/diagnostics-suggest.js +69 -0
- package/dist/docs-check.d.ts +40 -0
- package/dist/docs-check.d.ts.map +1 -0
- package/dist/docs-check.js +221 -0
- package/dist/doctor-acknowledgements.d.ts +69 -0
- package/dist/doctor-acknowledgements.d.ts.map +1 -0
- package/dist/doctor-acknowledgements.js +150 -0
- package/dist/doctor-result.d.ts +51 -0
- package/dist/doctor-result.d.ts.map +1 -0
- package/dist/doctor-result.js +7 -0
- package/dist/doctor-suppressions.d.ts +91 -0
- package/dist/doctor-suppressions.d.ts.map +1 -0
- package/dist/doctor-suppressions.js +238 -0
- package/dist/drift-baseline.d.ts +29 -0
- package/dist/drift-baseline.d.ts.map +1 -0
- package/dist/drift-baseline.js +80 -0
- package/dist/drift.d.ts +38 -0
- package/dist/drift.d.ts.map +1 -0
- package/dist/drift.js +107 -0
- package/dist/entrypoint-matrix.d.ts +61 -0
- package/dist/entrypoint-matrix.d.ts.map +1 -0
- package/dist/entrypoint-matrix.js +221 -0
- package/dist/examples-check.d.ts +36 -0
- package/dist/examples-check.d.ts.map +1 -0
- package/dist/examples-check.js +168 -0
- package/dist/execution-graph.d.ts +98 -0
- package/dist/execution-graph.d.ts.map +1 -0
- package/dist/execution-graph.js +484 -0
- package/dist/export-bundle.d.ts +10 -0
- package/dist/export-bundle.d.ts.map +1 -0
- package/dist/export-bundle.js +90 -0
- package/dist/failure-diagnostics.d.ts +63 -0
- package/dist/failure-diagnostics.d.ts.map +1 -0
- package/dist/failure-diagnostics.js +243 -0
- package/dist/feature-bundle.d.ts +111 -0
- package/dist/feature-bundle.d.ts.map +1 -0
- package/dist/feature-bundle.js +211 -0
- package/dist/feedback-actions-v2.d.ts +65 -0
- package/dist/feedback-actions-v2.d.ts.map +1 -0
- package/dist/feedback-actions-v2.js +183 -0
- package/dist/feedback-ingestion.d.ts +96 -0
- package/dist/feedback-ingestion.d.ts.map +1 -0
- package/dist/feedback-ingestion.js +400 -0
- package/dist/fix-preview.d.ts +82 -0
- package/dist/fix-preview.d.ts.map +1 -0
- package/dist/fix-preview.js +365 -0
- package/dist/fuzzy-impact.d.ts +50 -0
- package/dist/fuzzy-impact.d.ts.map +1 -0
- package/dist/fuzzy-impact.js +446 -0
- package/dist/generated-code.d.ts +97 -0
- package/dist/generated-code.d.ts.map +1 -0
- package/dist/generated-code.js +395 -0
- package/dist/git-helpers.d.ts +26 -0
- package/dist/git-helpers.d.ts.map +1 -0
- package/dist/git-helpers.js +110 -0
- package/dist/golden-output.d.ts +33 -0
- package/dist/golden-output.d.ts.map +1 -0
- package/dist/golden-output.js +92 -0
- package/dist/grounding/build-grounding.d.ts +53 -0
- package/dist/grounding/build-grounding.d.ts.map +1 -0
- package/dist/grounding/build-grounding.js +51 -0
- package/dist/grounding/nx-projects.d.ts +29 -0
- package/dist/grounding/nx-projects.d.ts.map +1 -0
- package/dist/grounding/nx-projects.js +109 -0
- package/dist/grounding/validate-extracted-plan.d.ts +20 -0
- package/dist/grounding/validate-extracted-plan.d.ts.map +1 -0
- package/dist/grounding/validate-extracted-plan.js +127 -0
- package/dist/healing-plan.d.ts +33 -0
- package/dist/healing-plan.d.ts.map +1 -0
- package/dist/healing-plan.js +346 -0
- package/dist/helper-registry.d.ts +90 -0
- package/dist/helper-registry.d.ts.map +1 -0
- package/dist/helper-registry.js +529 -0
- package/dist/impact-analysis.d.ts +150 -0
- package/dist/impact-analysis.d.ts.map +1 -0
- package/dist/impact-analysis.js +697 -0
- package/dist/impact-graph-render.d.ts +51 -0
- package/dist/impact-graph-render.d.ts.map +1 -0
- package/dist/impact-graph-render.js +139 -0
- package/dist/impact-graph.d.ts +17 -0
- package/dist/impact-graph.d.ts.map +1 -0
- package/dist/impact-graph.js +119 -0
- package/dist/impact-render.d.ts +22 -0
- package/dist/impact-render.d.ts.map +1 -0
- package/dist/impact-render.js +413 -0
- package/dist/import-graph-analysis.d.ts +28 -0
- package/dist/import-graph-analysis.d.ts.map +1 -0
- package/dist/import-graph-analysis.js +193 -0
- package/dist/import-hygiene.d.ts +93 -0
- package/dist/import-hygiene.d.ts.map +1 -0
- package/dist/import-hygiene.js +366 -0
- package/dist/index.d.ts +223 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +233 -0
- package/dist/ingest-adoption.d.ts +50 -0
- package/dist/ingest-adoption.d.ts.map +1 -0
- package/dist/ingest-adoption.js +183 -0
- package/dist/ingest-apply.d.ts +80 -0
- package/dist/ingest-apply.d.ts.map +1 -0
- package/dist/ingest-apply.js +227 -0
- package/dist/ingest-body-extractor.d.ts +28 -0
- package/dist/ingest-body-extractor.d.ts.map +1 -0
- package/dist/ingest-body-extractor.js +129 -0
- package/dist/ingest-drafts.d.ts +16 -0
- package/dist/ingest-drafts.d.ts.map +1 -0
- package/dist/ingest-drafts.js +482 -0
- package/dist/inspector-cache.d.ts +41 -0
- package/dist/inspector-cache.d.ts.map +1 -0
- package/dist/inspector-cache.js +104 -0
- package/dist/install-smoke.d.ts +44 -0
- package/dist/install-smoke.d.ts.map +1 -0
- package/dist/install-smoke.js +31 -0
- package/dist/knowledge-authoring.d.ts +151 -0
- package/dist/knowledge-authoring.d.ts.map +1 -0
- package/dist/knowledge-authoring.js +586 -0
- package/dist/knowledge-graph.d.ts +76 -0
- package/dist/knowledge-graph.d.ts.map +1 -0
- package/dist/knowledge-graph.js +336 -0
- package/dist/knowledge-lint.d.ts +97 -0
- package/dist/knowledge-lint.d.ts.map +1 -0
- package/dist/knowledge-lint.js +302 -0
- package/dist/knowledge-rename.d.ts +38 -0
- package/dist/knowledge-rename.d.ts.map +1 -0
- package/dist/knowledge-rename.js +88 -0
- package/dist/knowledge-stale.d.ts +124 -0
- package/dist/knowledge-stale.d.ts.map +1 -0
- package/dist/knowledge-stale.js +892 -0
- package/dist/languages/command-inference.d.ts +27 -0
- package/dist/languages/command-inference.d.ts.map +1 -0
- package/dist/languages/command-inference.js +214 -0
- package/dist/languages/dependency-scan.d.ts +33 -0
- package/dist/languages/dependency-scan.d.ts.map +1 -0
- package/dist/languages/dependency-scan.js +343 -0
- package/dist/languages/index.d.ts +14 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +13 -0
- package/dist/languages/language-boundaries.d.ts +30 -0
- package/dist/languages/language-boundaries.d.ts.map +1 -0
- package/dist/languages/language-boundaries.js +176 -0
- package/dist/languages/language-cache.d.ts +54 -0
- package/dist/languages/language-cache.d.ts.map +1 -0
- package/dist/languages/language-cache.js +236 -0
- package/dist/languages/language-detection.d.ts +30 -0
- package/dist/languages/language-detection.d.ts.map +1 -0
- package/dist/languages/language-detection.js +584 -0
- package/dist/languages/language-id.d.ts +15 -0
- package/dist/languages/language-id.d.ts.map +1 -0
- package/dist/languages/language-id.js +15 -0
- package/dist/languages/language-runner.d.ts +90 -0
- package/dist/languages/language-runner.d.ts.map +1 -0
- package/dist/languages/language-runner.js +346 -0
- package/dist/languages/polyglot-boundary.d.ts +80 -0
- package/dist/languages/polyglot-boundary.d.ts.map +1 -0
- package/dist/languages/polyglot-boundary.js +373 -0
- package/dist/languages/polyglot-ci.d.ts +25 -0
- package/dist/languages/polyglot-ci.d.ts.map +1 -0
- package/dist/languages/polyglot-ci.js +278 -0
- package/dist/languages/test-impact.d.ts +19 -0
- package/dist/languages/test-impact.d.ts.map +1 -0
- package/dist/languages/test-impact.js +157 -0
- package/dist/loader-diagnostics.d.ts +40 -0
- package/dist/loader-diagnostics.d.ts.map +1 -0
- package/dist/loader-diagnostics.js +49 -0
- package/dist/memory-diff.d.ts +60 -0
- package/dist/memory-diff.d.ts.map +1 -0
- package/dist/memory-diff.js +302 -0
- package/dist/migration-profile-registry.d.ts +26 -0
- package/dist/migration-profile-registry.d.ts.map +1 -0
- package/dist/migration-profile-registry.js +135 -0
- package/dist/migration-readiness.d.ts +101 -0
- package/dist/migration-readiness.d.ts.map +1 -0
- package/dist/migration-readiness.js +253 -0
- package/dist/monorepo-onboarding.d.ts +51 -0
- package/dist/monorepo-onboarding.d.ts.map +1 -0
- package/dist/monorepo-onboarding.js +235 -0
- package/dist/onboarding-adoption-diff.d.ts +53 -0
- package/dist/onboarding-adoption-diff.d.ts.map +1 -0
- package/dist/onboarding-adoption-diff.js +285 -0
- package/dist/onboarding-adoption.d.ts +136 -0
- package/dist/onboarding-adoption.d.ts.map +1 -0
- package/dist/onboarding-adoption.js +702 -0
- package/dist/onboarding-agent-import.d.ts +40 -0
- package/dist/onboarding-agent-import.d.ts.map +1 -0
- package/dist/onboarding-agent-import.js +114 -0
- package/dist/onboarding-diff.d.ts +39 -0
- package/dist/onboarding-diff.d.ts.map +1 -0
- package/dist/onboarding-diff.js +240 -0
- package/dist/onboarding-drafts.d.ts +28 -0
- package/dist/onboarding-drafts.d.ts.map +1 -0
- package/dist/onboarding-drafts.js +234 -0
- package/dist/onboarding-report.d.ts +8 -0
- package/dist/onboarding-report.d.ts.map +1 -0
- package/dist/onboarding-report.js +239 -0
- package/dist/onboarding.d.ts +134 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +729 -0
- package/dist/ownership.d.ts +38 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/ownership.js +102 -0
- package/dist/pack-author-ux.d.ts +58 -0
- package/dist/pack-author-ux.d.ts.map +1 -0
- package/dist/pack-author-ux.js +219 -0
- package/dist/pack-author.d.ts +94 -0
- package/dist/pack-author.d.ts.map +1 -0
- package/dist/pack-author.js +208 -0
- package/dist/pack-compatibility.d.ts +21 -0
- package/dist/pack-compatibility.d.ts.map +1 -0
- package/dist/pack-compatibility.js +114 -0
- package/dist/pack-contributions-inventory.d.ts +121 -0
- package/dist/pack-contributions-inventory.d.ts.map +1 -0
- package/dist/pack-contributions-inventory.js +732 -0
- package/dist/pack-docs.d.ts +11 -0
- package/dist/pack-docs.d.ts.map +1 -0
- package/dist/pack-docs.js +101 -0
- package/dist/pack-doctor.d.ts +50 -0
- package/dist/pack-doctor.d.ts.map +1 -0
- package/dist/pack-doctor.js +302 -0
- package/dist/pack-helper-registry.d.ts +29 -0
- package/dist/pack-helper-registry.d.ts.map +1 -0
- package/dist/pack-helper-registry.js +144 -0
- package/dist/pack-pending.d.ts +68 -0
- package/dist/pack-pending.d.ts.map +1 -0
- package/dist/pack-pending.js +189 -0
- package/dist/pack-quality-score.d.ts +44 -0
- package/dist/pack-quality-score.d.ts.map +1 -0
- package/dist/pack-quality-score.js +155 -0
- package/dist/pack-release-check.d.ts +24 -0
- package/dist/pack-release-check.d.ts.map +1 -0
- package/dist/pack-release-check.js +258 -0
- package/dist/pack-signature-status.d.ts +72 -0
- package/dist/pack-signature-status.d.ts.map +1 -0
- package/dist/pack-signature-status.js +222 -0
- package/dist/pack-symbol-compat.d.ts +60 -0
- package/dist/pack-symbol-compat.d.ts.map +1 -0
- package/dist/pack-symbol-compat.js +371 -0
- package/dist/pack-test-runner.d.ts +59 -0
- package/dist/pack-test-runner.d.ts.map +1 -0
- package/dist/pack-test-runner.js +211 -0
- package/dist/pipeline-command-dictionary.d.ts +2 -0
- package/dist/pipeline-command-dictionary.d.ts.map +1 -0
- package/dist/pipeline-command-dictionary.js +20 -0
- package/dist/pipeline-lint.d.ts +30 -0
- package/dist/pipeline-lint.d.ts.map +1 -0
- package/dist/pipeline-lint.js +134 -0
- package/dist/plan-dependency-graph.d.ts +25 -0
- package/dist/plan-dependency-graph.d.ts.map +1 -0
- package/dist/plan-dependency-graph.js +195 -0
- package/dist/plan-review.d.ts +64 -0
- package/dist/plan-review.d.ts.map +1 -0
- package/dist/plan-review.js +242 -0
- package/dist/plan-simulation.d.ts +108 -0
- package/dist/plan-simulation.d.ts.map +1 -0
- package/dist/plan-simulation.js +767 -0
- package/dist/playbook-registry.d.ts +25 -0
- package/dist/playbook-registry.d.ts.map +1 -0
- package/dist/playbook-registry.js +148 -0
- package/dist/playbook-script.d.ts +60 -0
- package/dist/playbook-script.d.ts.map +1 -0
- package/dist/playbook-script.js +161 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts +52 -0
- package/dist/plugin-lifecycle-profile-registry.d.ts.map +1 -0
- package/dist/plugin-lifecycle-profile-registry.js +202 -0
- package/dist/plugin-lifecycle.d.ts +132 -0
- package/dist/plugin-lifecycle.d.ts.map +1 -0
- package/dist/plugin-lifecycle.js +477 -0
- package/dist/policy-engine.d.ts +101 -0
- package/dist/policy-engine.d.ts.map +1 -0
- package/dist/policy-engine.js +321 -0
- package/dist/policy-override-audit.d.ts +18 -0
- package/dist/policy-override-audit.d.ts.map +1 -0
- package/dist/policy-override-audit.js +54 -0
- package/dist/policy-overrides.d.ts +35 -0
- package/dist/policy-overrides.d.ts.map +1 -0
- package/dist/policy-overrides.js +84 -0
- package/dist/policy-test.d.ts +83 -0
- package/dist/policy-test.d.ts.map +1 -0
- package/dist/policy-test.js +342 -0
- package/dist/pr-summary.d.ts +34 -0
- package/dist/pr-summary.d.ts.map +1 -0
- package/dist/pr-summary.js +220 -0
- package/dist/product-coherence.d.ts +21 -0
- package/dist/product-coherence.d.ts.map +1 -0
- package/dist/product-coherence.js +158 -0
- package/dist/profile-registry.d.ts +42 -0
- package/dist/profile-registry.d.ts.map +1 -0
- package/dist/profile-registry.js +104 -0
- package/dist/project-coupling-audit.d.ts +64 -0
- package/dist/project-coupling-audit.d.ts.map +1 -0
- package/dist/project-coupling-audit.js +282 -0
- package/dist/project-overview.d.ts +14 -0
- package/dist/project-overview.d.ts.map +1 -0
- package/dist/project-overview.js +27 -0
- package/dist/propose-knowledge.d.ts +64 -0
- package/dist/propose-knowledge.d.ts.map +1 -0
- package/dist/propose-knowledge.js +367 -0
- package/dist/quality-baseline.d.ts +123 -0
- package/dist/quality-baseline.d.ts.map +1 -0
- package/dist/quality-baseline.js +433 -0
- package/dist/quality-html.d.ts +7 -0
- package/dist/quality-html.d.ts.map +1 -0
- package/dist/quality-html.js +64 -0
- package/dist/quality-report.d.ts +49 -0
- package/dist/quality-report.d.ts.map +1 -0
- package/dist/quality-report.js +296 -0
- package/dist/query-resolver.d.ts +38 -0
- package/dist/query-resolver.d.ts.map +1 -0
- package/dist/query-resolver.js +163 -0
- package/dist/ranker-explainability.d.ts +91 -0
- package/dist/ranker-explainability.d.ts.map +1 -0
- package/dist/ranker-explainability.js +550 -0
- package/dist/reference-lookup.d.ts +8 -0
- package/dist/reference-lookup.d.ts.map +1 -0
- package/dist/reference-lookup.js +18 -0
- package/dist/registration-hint-registry.d.ts +55 -0
- package/dist/registration-hint-registry.d.ts.map +1 -0
- package/dist/registration-hint-registry.js +327 -0
- package/dist/registry-lifecycle.d.ts +47 -0
- package/dist/registry-lifecycle.d.ts.map +1 -0
- package/dist/registry-lifecycle.js +214 -0
- package/dist/release-readiness.d.ts +64 -0
- package/dist/release-readiness.d.ts.map +1 -0
- package/dist/release-readiness.js +456 -0
- package/dist/release-smoke.d.ts +138 -0
- package/dist/release-smoke.d.ts.map +1 -0
- package/dist/release-smoke.js +459 -0
- package/dist/release-train.d.ts +33 -0
- package/dist/release-train.d.ts.map +1 -0
- package/dist/release-train.js +104 -0
- package/dist/repo-memory.d.ts +95 -0
- package/dist/repo-memory.d.ts.map +1 -0
- package/dist/repo-memory.js +614 -0
- package/dist/report-site.d.ts +92 -0
- package/dist/report-site.d.ts.map +1 -0
- package/dist/report-site.js +658 -0
- package/dist/reposet.d.ts +56 -0
- package/dist/reposet.d.ts.map +1 -0
- package/dist/reposet.js +160 -0
- package/dist/repository-intelligence.d.ts +145 -0
- package/dist/repository-intelligence.d.ts.map +1 -0
- package/dist/repository-intelligence.js +729 -0
- package/dist/repository-knowledge-model.d.ts +218 -0
- package/dist/repository-knowledge-model.d.ts.map +1 -0
- package/dist/repository-knowledge-model.js +939 -0
- package/dist/repository-map.d.ts +72 -0
- package/dist/repository-map.d.ts.map +1 -0
- package/dist/repository-map.js +332 -0
- package/dist/repository-stats.d.ts +66 -0
- package/dist/repository-stats.d.ts.map +1 -0
- package/dist/repository-stats.js +329 -0
- package/dist/review-comment-renderer.d.ts +59 -0
- package/dist/review-comment-renderer.d.ts.map +1 -0
- package/dist/review-comment-renderer.js +181 -0
- package/dist/review-comment-v2.d.ts +9 -0
- package/dist/review-comment-v2.d.ts.map +1 -0
- package/dist/review-comment-v2.js +178 -0
- package/dist/review-html.d.ts +13 -0
- package/dist/review-html.d.ts.map +1 -0
- package/dist/review-html.js +79 -0
- package/dist/review-packet-v2.d.ts +29 -0
- package/dist/review-packet-v2.d.ts.map +1 -0
- package/dist/review-packet-v2.js +71 -0
- package/dist/review-packet-v3.d.ts +22 -0
- package/dist/review-packet-v3.d.ts.map +1 -0
- package/dist/review-packet-v3.js +181 -0
- package/dist/review-packet.d.ts +49 -0
- package/dist/review-packet.d.ts.map +1 -0
- package/dist/review-packet.js +129 -0
- package/dist/risk-signals.d.ts +28 -0
- package/dist/risk-signals.d.ts.map +1 -0
- package/dist/risk-signals.js +68 -0
- package/dist/role-views.d.ts +50 -0
- package/dist/role-views.d.ts.map +1 -0
- package/dist/role-views.js +334 -0
- package/dist/rounds.d.ts +52 -0
- package/dist/rounds.d.ts.map +1 -0
- package/dist/rounds.js +172 -0
- package/dist/rule-drift.d.ts +42 -0
- package/dist/rule-drift.d.ts.map +1 -0
- package/dist/rule-drift.js +148 -0
- package/dist/rule-quality.d.ts +73 -0
- package/dist/rule-quality.d.ts.map +1 -0
- package/dist/rule-quality.js +356 -0
- package/dist/rule-scaffold.d.ts +71 -0
- package/dist/rule-scaffold.d.ts.map +1 -0
- package/dist/rule-scaffold.js +258 -0
- package/dist/safety-audit-deep.d.ts +38 -0
- package/dist/safety-audit-deep.d.ts.map +1 -0
- package/dist/safety-audit-deep.js +162 -0
- package/dist/safety-audit.d.ts +91 -0
- package/dist/safety-audit.d.ts.map +1 -0
- package/dist/safety-audit.js +138 -0
- package/dist/safety-html.d.ts +7 -0
- package/dist/safety-html.d.ts.map +1 -0
- package/dist/safety-html.js +70 -0
- package/dist/scaffold-coverage.d.ts +46 -0
- package/dist/scaffold-coverage.d.ts.map +1 -0
- package/dist/scaffold-coverage.js +273 -0
- package/dist/scaffold-patterns.d.ts +38 -0
- package/dist/scaffold-patterns.d.ts.map +1 -0
- package/dist/scaffold-patterns.js +282 -0
- package/dist/schema-inventory.d.ts +55 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +301 -0
- package/dist/search-index.d.ts +75 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +531 -0
- package/dist/search-tuning-explain.d.ts +68 -0
- package/dist/search-tuning-explain.d.ts.map +1 -0
- package/dist/search-tuning-explain.js +207 -0
- package/dist/search-tuning-registry.d.ts +54 -0
- package/dist/search-tuning-registry.d.ts.map +1 -0
- package/dist/search-tuning-registry.js +303 -0
- package/dist/self-audit.d.ts +59 -0
- package/dist/self-audit.d.ts.map +1 -0
- package/dist/self-audit.js +192 -0
- package/dist/self-config-doctor-v2.d.ts +57 -0
- package/dist/self-config-doctor-v2.d.ts.map +1 -0
- package/dist/self-config-doctor-v2.js +653 -0
- package/dist/self-config-doctor.d.ts +47 -0
- package/dist/self-config-doctor.d.ts.map +1 -0
- package/dist/self-config-doctor.js +432 -0
- package/dist/sharkcraft-inspector.d.ts +73 -0
- package/dist/sharkcraft-inspector.d.ts.map +1 -0
- package/dist/sharkcraft-inspector.js +745 -0
- package/dist/spec/spec-cross-validate.d.ts +17 -0
- package/dist/spec/spec-cross-validate.d.ts.map +1 -0
- package/dist/spec/spec-cross-validate.js +53 -0
- package/dist/spec/spec-discovery.d.ts +27 -0
- package/dist/spec/spec-discovery.d.ts.map +1 -0
- package/dist/spec/spec-discovery.js +78 -0
- package/dist/spec/spec-review.d.ts +36 -0
- package/dist/spec/spec-review.d.ts.map +1 -0
- package/dist/spec/spec-review.js +37 -0
- package/dist/stability-map.d.ts +62 -0
- package/dist/stability-map.d.ts.map +1 -0
- package/dist/stability-map.js +404 -0
- package/dist/start-here.d.ts +49 -0
- package/dist/start-here.d.ts.map +1 -0
- package/dist/start-here.js +259 -0
- package/dist/surface-profile-detect.d.ts +42 -0
- package/dist/surface-profile-detect.d.ts.map +1 -0
- package/dist/surface-profile-detect.js +76 -0
- package/dist/symbol-index.d.ts +108 -0
- package/dist/symbol-index.d.ts.map +1 -0
- package/dist/symbol-index.js +483 -0
- package/dist/task-decompose.d.ts +38 -0
- package/dist/task-decompose.d.ts.map +1 -0
- package/dist/task-decompose.js +154 -0
- package/dist/task-packet.d.ts +104 -0
- package/dist/task-packet.d.ts.map +1 -0
- package/dist/task-packet.js +156 -0
- package/dist/task-ranker.d.ts +51 -0
- package/dist/task-ranker.d.ts.map +1 -0
- package/dist/task-ranker.js +410 -0
- package/dist/task-risk.d.ts +84 -0
- package/dist/task-risk.d.ts.map +1 -0
- package/dist/task-risk.js +731 -0
- package/dist/task-routing-hint-registry.d.ts +36 -0
- package/dist/task-routing-hint-registry.d.ts.map +1 -0
- package/dist/task-routing-hint-registry.js +186 -0
- package/dist/template-authoring.d.ts +113 -0
- package/dist/template-authoring.d.ts.map +1 -0
- package/dist/template-authoring.js +521 -0
- package/dist/template-body-inference-v2.d.ts +19 -0
- package/dist/template-body-inference-v2.d.ts.map +1 -0
- package/dist/template-body-inference-v2.js +468 -0
- package/dist/template-body-inference.d.ts +59 -0
- package/dist/template-body-inference.d.ts.map +1 -0
- package/dist/template-body-inference.js +277 -0
- package/dist/template-drift.d.ts +39 -0
- package/dist/template-drift.d.ts.map +1 -0
- package/dist/template-drift.js +353 -0
- package/dist/template-lint.d.ts +31 -0
- package/dist/template-lint.d.ts.map +1 -0
- package/dist/template-lint.js +113 -0
- package/dist/test-definitions.d.ts +41 -0
- package/dist/test-definitions.d.ts.map +1 -0
- package/dist/test-definitions.js +6 -0
- package/dist/test-impact.d.ts +30 -0
- package/dist/test-impact.d.ts.map +1 -0
- package/dist/test-impact.js +173 -0
- package/dist/test-runner.d.ts +87 -0
- package/dist/test-runner.d.ts.map +1 -0
- package/dist/test-runner.js +560 -0
- package/dist/uncertainty-report.d.ts +46 -0
- package/dist/uncertainty-report.d.ts.map +1 -0
- package/dist/uncertainty-report.js +108 -0
- package/dist/uncertainty.d.ts +38 -0
- package/dist/uncertainty.d.ts.map +1 -0
- package/dist/uncertainty.js +115 -0
- package/dist/universal-search.d.ts +64 -0
- package/dist/universal-search.d.ts.map +1 -0
- package/dist/universal-search.js +347 -0
- package/dist/upgrade-advisor.d.ts +22 -0
- package/dist/upgrade-advisor.d.ts.map +1 -0
- package/dist/upgrade-advisor.js +109 -0
- package/dist/why-file.d.ts +75 -0
- package/dist/why-file.d.ts.map +1 -0
- package/dist/why-file.js +202 -0
- package/dist/workflow-simulation.d.ts +46 -0
- package/dist/workflow-simulation.d.ts.map +1 -0
- package/dist/workflow-simulation.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture map v2.
|
|
3
|
+
*
|
|
4
|
+
* Layered, risk-aware architecture summary built on top of the
|
|
5
|
+
* repository intelligence graph. Detects packages → layer groups,
|
|
6
|
+
* public-API surfaces, current boundary violations, ownership coverage
|
|
7
|
+
* hints, and suggested architecture-review commands.
|
|
8
|
+
*
|
|
9
|
+
* Read-only.
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
+
import { evaluateBoundaries, loadTsconfigPaths, scanImports } from '@shrkcrft/boundaries';
|
|
13
|
+
import { analyzeImportGraph } from "./import-graph-analysis.js";
|
|
14
|
+
import { buildRepositoryIntelligenceGraph, RepoNodeKind, } from "./repository-intelligence.js";
|
|
15
|
+
import { getChangedFiles } from "./git-helpers.js";
|
|
16
|
+
export const ARCHITECTURE_MAP_SCHEMA = 'sharkcraft.architecture-map/v2';
|
|
17
|
+
const SHARKCRAFT_LAYERS = Object.freeze([
|
|
18
|
+
{ id: 'core', label: 'core', members: ['@shrkcrft/core'] },
|
|
19
|
+
{
|
|
20
|
+
id: 'foundations',
|
|
21
|
+
label: 'foundations',
|
|
22
|
+
members: ['@shrkcrft/shared', '@shrkcrft/workspace', '@shrkcrft/config'],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'asset-registries',
|
|
26
|
+
label: 'asset registries',
|
|
27
|
+
members: [
|
|
28
|
+
'@shrkcrft/knowledge',
|
|
29
|
+
'@shrkcrft/rules',
|
|
30
|
+
'@shrkcrft/paths',
|
|
31
|
+
'@shrkcrft/templates',
|
|
32
|
+
'@shrkcrft/pipelines',
|
|
33
|
+
'@shrkcrft/presets',
|
|
34
|
+
'@shrkcrft/boundaries',
|
|
35
|
+
'@shrkcrft/plugin-api',
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{ id: 'packs', label: 'packs', members: ['@shrkcrft/packs'] },
|
|
39
|
+
{
|
|
40
|
+
id: 'generation',
|
|
41
|
+
label: 'generation/inspection',
|
|
42
|
+
members: ['@shrkcrft/generator', '@shrkcrft/importer', '@shrkcrft/inspector'],
|
|
43
|
+
},
|
|
44
|
+
{ id: 'mcp', label: 'mcp', members: ['@shrkcrft/mcp-server'] },
|
|
45
|
+
{
|
|
46
|
+
id: 'cli',
|
|
47
|
+
label: 'cli/dashboard',
|
|
48
|
+
members: ['@shrkcrft/cli', '@shrkcrft/dashboard', '@shrkcrft/dashboard-api', '@shrkcrft/ai'],
|
|
49
|
+
},
|
|
50
|
+
]);
|
|
51
|
+
export async function buildArchitectureMap(inspection, options = {}) {
|
|
52
|
+
const include = new Set(options.include && options.include.length > 0
|
|
53
|
+
? options.include
|
|
54
|
+
: ['layers', 'constructs', 'boundaries', 'policies', 'public-api', 'tests', 'ownership']);
|
|
55
|
+
const signalsEnabled = options.signals === true;
|
|
56
|
+
const graph = await buildRepositoryIntelligenceGraph(inspection, { includeImports: signalsEnabled });
|
|
57
|
+
const packageLabels = new Set(graph.nodes.filter((n) => n.kind === RepoNodeKind.Package).map((n) => n.label));
|
|
58
|
+
const layers = include.has('layers')
|
|
59
|
+
? SHARKCRAFT_LAYERS.map((l) => ({
|
|
60
|
+
id: l.id,
|
|
61
|
+
label: l.label,
|
|
62
|
+
members: l.members.filter((m) => packageLabels.has(m)),
|
|
63
|
+
})).filter((l) => l.members.length > 0)
|
|
64
|
+
: [];
|
|
65
|
+
const publicApiSurfaces = include.has('public-api')
|
|
66
|
+
? graph.nodes.filter((n) => n.kind === RepoNodeKind.PublicApi).map((n) => n.label)
|
|
67
|
+
: [];
|
|
68
|
+
const boundaryRules = include.has('boundaries')
|
|
69
|
+
? graph.nodes.filter((n) => n.kind === RepoNodeKind.BoundaryRule).map((n) => n.label)
|
|
70
|
+
: [];
|
|
71
|
+
const constructsByKind = include.has('constructs')
|
|
72
|
+
? aggregateConstructKinds(graph)
|
|
73
|
+
: [];
|
|
74
|
+
const packs = graph.nodes.filter((n) => n.kind === RepoNodeKind.Pack).map((n) => n.label);
|
|
75
|
+
const testsCoverageHint = include.has('tests')
|
|
76
|
+
? graph.summaries.tests === 0
|
|
77
|
+
? 'No test files detected — run `shrk tests missing`.'
|
|
78
|
+
: `${graph.summaries.tests} test file(s) detected.`
|
|
79
|
+
: '';
|
|
80
|
+
const ownershipCoverageHint = include.has('ownership')
|
|
81
|
+
? graph.summaries.ownership === 0
|
|
82
|
+
? 'No ownership rules detected — `shrk owners` and `shrk ownership` surfaces are empty.'
|
|
83
|
+
: `${graph.summaries.ownership} ownership rule(s) detected.`
|
|
84
|
+
: '';
|
|
85
|
+
// Boundary violations (real signal when --signals is enabled).
|
|
86
|
+
let boundaryViolations = [];
|
|
87
|
+
let boundaryViolationCounts = { error: 0, warning: 0, info: 0 };
|
|
88
|
+
if (signalsEnabled && include.has('boundaries') && inspection.boundaryRegistry.size() > 0) {
|
|
89
|
+
try {
|
|
90
|
+
const scan = scanImports({ projectRoot: inspection.projectRoot });
|
|
91
|
+
const tsconfigPaths = loadTsconfigPaths(inspection.projectRoot);
|
|
92
|
+
const evalResult = evaluateBoundaries(scan, inspection.boundaryRegistry.list(), {
|
|
93
|
+
...(tsconfigPaths.aliases.size > 0 ? { tsconfigPaths } : {}),
|
|
94
|
+
});
|
|
95
|
+
boundaryViolations = evalResult.violations.slice(0, 50).map((v) => ({
|
|
96
|
+
ruleId: v.ruleId,
|
|
97
|
+
file: v.file,
|
|
98
|
+
importSpecifier: v.importSpecifier,
|
|
99
|
+
severity: v.severity,
|
|
100
|
+
line: v.line,
|
|
101
|
+
message: v.message,
|
|
102
|
+
}));
|
|
103
|
+
boundaryViolationCounts = evalResult.counts;
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
/* best-effort */
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// High-impact files from import graph fan-in/fan-out.
|
|
110
|
+
let highImpactFiles = [];
|
|
111
|
+
if (signalsEnabled) {
|
|
112
|
+
try {
|
|
113
|
+
const ig = analyzeImportGraph(inspection.projectRoot);
|
|
114
|
+
const fanInMap = new Map();
|
|
115
|
+
const fanOutMap = new Map();
|
|
116
|
+
for (const f of ig.topFanIn)
|
|
117
|
+
fanInMap.set(f.file, f.in);
|
|
118
|
+
for (const f of ig.topFanOut)
|
|
119
|
+
fanOutMap.set(f.file, f.out);
|
|
120
|
+
const allFiles = new Set([...fanInMap.keys(), ...fanOutMap.keys()]);
|
|
121
|
+
highImpactFiles = [...allFiles]
|
|
122
|
+
.map((file) => ({ file, fanIn: fanInMap.get(file) ?? 0, fanOut: fanOutMap.get(file) ?? 0 }))
|
|
123
|
+
.sort((a, b) => b.fanIn + b.fanOut - (a.fanIn + a.fanOut))
|
|
124
|
+
.slice(0, 20);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
/* best-effort */
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Pack-contributed architecture rules: boundary rules with source=pack
|
|
131
|
+
// would surface here; the registry doesn't carry source on the rule
|
|
132
|
+
// itself, so we leave the placeholder empty in v2.
|
|
133
|
+
const packArchitectureRules = [];
|
|
134
|
+
const suggestedReviewCommands = [
|
|
135
|
+
'shrk check boundaries --json',
|
|
136
|
+
'shrk drift --json',
|
|
137
|
+
'shrk coverage --json',
|
|
138
|
+
'shrk impact --since main',
|
|
139
|
+
'shrk intelligence graph --json',
|
|
140
|
+
];
|
|
141
|
+
const risks = [];
|
|
142
|
+
if (options.risk !== false) {
|
|
143
|
+
if (graph.summaries.tests === 0) {
|
|
144
|
+
risks.push({
|
|
145
|
+
id: 'no-tests-detected',
|
|
146
|
+
severity: 'warning',
|
|
147
|
+
description: 'No tests detected. Architecture changes should be backed by tests.',
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (graph.summaries.boundaries === 0) {
|
|
151
|
+
risks.push({
|
|
152
|
+
id: 'no-boundary-rules',
|
|
153
|
+
severity: 'info',
|
|
154
|
+
description: 'No boundary rules declared. Layer enforcement is best-effort.',
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
if (boundaryViolationCounts.error > 0) {
|
|
158
|
+
risks.push({
|
|
159
|
+
id: 'boundary-violations-error',
|
|
160
|
+
severity: 'error',
|
|
161
|
+
description: `${boundaryViolationCounts.error} boundary violation(s) at error severity.`,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
if (boundaryViolationCounts.warning > 0) {
|
|
165
|
+
risks.push({
|
|
166
|
+
id: 'boundary-violations-warning',
|
|
167
|
+
severity: 'warning',
|
|
168
|
+
description: `${boundaryViolationCounts.warning} boundary violation(s) at warning severity.`,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
if (graph.truncation.filesCapped) {
|
|
172
|
+
risks.push({
|
|
173
|
+
id: 'file-list-truncated',
|
|
174
|
+
severity: 'info',
|
|
175
|
+
description: `File list truncated at ${graph.truncation.filesCap}; some packages may have files not shown.`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
schema: ARCHITECTURE_MAP_SCHEMA,
|
|
181
|
+
generatedAt: new Date().toISOString(),
|
|
182
|
+
projectRoot: inspection.projectRoot,
|
|
183
|
+
layers,
|
|
184
|
+
publicApiSurfaces,
|
|
185
|
+
boundaryRules,
|
|
186
|
+
boundaryViolations,
|
|
187
|
+
boundaryViolationCounts,
|
|
188
|
+
constructsByKind,
|
|
189
|
+
packs,
|
|
190
|
+
testsCoverageHint,
|
|
191
|
+
ownershipCoverageHint,
|
|
192
|
+
packArchitectureRules,
|
|
193
|
+
highImpactFiles,
|
|
194
|
+
suggestedReviewCommands,
|
|
195
|
+
risks,
|
|
196
|
+
graphSummary: graph.summaries,
|
|
197
|
+
signalsEnabled,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
export async function buildArchitectureViolations(inspection) {
|
|
201
|
+
const violations = [];
|
|
202
|
+
if (inspection.boundaryRegistry.size() > 0) {
|
|
203
|
+
try {
|
|
204
|
+
const scan = scanImports({ projectRoot: inspection.projectRoot });
|
|
205
|
+
const tsconfigPaths = loadTsconfigPaths(inspection.projectRoot);
|
|
206
|
+
const evalResult = evaluateBoundaries(scan, inspection.boundaryRegistry.list(), {
|
|
207
|
+
...(tsconfigPaths.aliases.size > 0 ? { tsconfigPaths } : {}),
|
|
208
|
+
});
|
|
209
|
+
for (const v of evalResult.violations) {
|
|
210
|
+
violations.push({
|
|
211
|
+
ruleId: v.ruleId,
|
|
212
|
+
file: v.file,
|
|
213
|
+
importSpecifier: v.importSpecifier,
|
|
214
|
+
severity: v.severity,
|
|
215
|
+
line: v.line,
|
|
216
|
+
message: v.message,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
/* best-effort */
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
const byRuleMap = new Map();
|
|
225
|
+
for (const v of violations)
|
|
226
|
+
byRuleMap.set(v.ruleId, (byRuleMap.get(v.ruleId) ?? 0) + 1);
|
|
227
|
+
const byRule = [...byRuleMap.entries()].map(([ruleId, count]) => ({ ruleId, count })).sort((a, b) => b.count - a.count);
|
|
228
|
+
return {
|
|
229
|
+
schema: 'sharkcraft.architecture-violations/v1',
|
|
230
|
+
generatedAt: new Date().toISOString(),
|
|
231
|
+
total: violations.length,
|
|
232
|
+
byRule,
|
|
233
|
+
violations: violations.slice(0, 100),
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function normalizeViolationKey(v) {
|
|
237
|
+
return `${v.file}::${v.line}::${v.ruleId}::${v.importSpecifier}`;
|
|
238
|
+
}
|
|
239
|
+
function loadBaselineViolations(baselineFile, warnings) {
|
|
240
|
+
if (!existsSync(baselineFile)) {
|
|
241
|
+
warnings.push(`Baseline file not found: ${baselineFile}`);
|
|
242
|
+
return { violations: [], total: 0 };
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
const raw = readFileSync(baselineFile, 'utf8');
|
|
246
|
+
const parsed = JSON.parse(raw);
|
|
247
|
+
return {
|
|
248
|
+
violations: parsed.violations ?? [],
|
|
249
|
+
total: parsed.total ?? (parsed.violations?.length ?? 0),
|
|
250
|
+
source: baselineFile,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
catch (e) {
|
|
254
|
+
warnings.push(`Baseline JSON parse failed: ${e.message}`);
|
|
255
|
+
return { violations: [], total: 0 };
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
export async function buildArchitectureViolationsDiff(inspection, options = {}) {
|
|
259
|
+
const warnings = [];
|
|
260
|
+
const explicitFiles = options.files ?? [];
|
|
261
|
+
let changedSet = new Set(explicitFiles);
|
|
262
|
+
let changedFilesFromGit = false;
|
|
263
|
+
if (options.since || options.staged) {
|
|
264
|
+
try {
|
|
265
|
+
const changed = getChangedFiles(inspection.projectRoot, {
|
|
266
|
+
...(options.since ? { since: options.since } : {}),
|
|
267
|
+
...(options.staged ? { staged: true } : {}),
|
|
268
|
+
});
|
|
269
|
+
if (changed.length === 0 && options.since) {
|
|
270
|
+
warnings.push(`No changed files detected against ref "${options.since}".`);
|
|
271
|
+
}
|
|
272
|
+
changedFilesFromGit = changed.length > 0 || Boolean(options.since || options.staged);
|
|
273
|
+
for (const c of changed)
|
|
274
|
+
changedSet.add(c);
|
|
275
|
+
}
|
|
276
|
+
catch (e) {
|
|
277
|
+
warnings.push(`Failed to derive changed files from git: ${e.message}`);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Current violations (full or scoped)
|
|
281
|
+
const currentReport = await buildArchitectureViolations(inspection);
|
|
282
|
+
const currentViolations = currentReport.violations;
|
|
283
|
+
const baseline = options.baselineFile != null ? loadBaselineViolations(options.baselineFile, warnings) : null;
|
|
284
|
+
const baselineKeys = new Set((baseline?.violations ?? []).map(normalizeViolationKey));
|
|
285
|
+
const currentKeys = new Set(currentViolations.map(normalizeViolationKey));
|
|
286
|
+
const entries = [];
|
|
287
|
+
const counts = { existingTouched: 0, newInChangedFile: 0, resolved: 0, unknown: 0 };
|
|
288
|
+
// Filter current to changed files when we have a changed set
|
|
289
|
+
const scoped = changedSet.size > 0
|
|
290
|
+
? currentViolations.filter((v) => changedSet.has(v.file))
|
|
291
|
+
: currentViolations;
|
|
292
|
+
for (const v of scoped) {
|
|
293
|
+
let classification = 'unknown';
|
|
294
|
+
if (baseline) {
|
|
295
|
+
if (baselineKeys.has(normalizeViolationKey(v)))
|
|
296
|
+
classification = 'existing-touched';
|
|
297
|
+
else
|
|
298
|
+
classification = 'new-in-changed-file';
|
|
299
|
+
}
|
|
300
|
+
else if (changedSet.size > 0) {
|
|
301
|
+
classification = 'existing-touched';
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
classification = 'unknown';
|
|
305
|
+
}
|
|
306
|
+
entries.push({ classification, violation: v });
|
|
307
|
+
counts[classification === 'existing-touched' ? 'existingTouched' : classification === 'new-in-changed-file' ? 'newInChangedFile' : 'unknown'] += 1;
|
|
308
|
+
}
|
|
309
|
+
// Resolved: baseline entries not present in current
|
|
310
|
+
if (baseline) {
|
|
311
|
+
for (const v of baseline.violations) {
|
|
312
|
+
if (!currentKeys.has(normalizeViolationKey(v))) {
|
|
313
|
+
entries.push({ classification: 'resolved', violation: v });
|
|
314
|
+
counts.resolved += 1;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
schema: 'sharkcraft.architecture-violations-diff/v1',
|
|
320
|
+
generatedAt: new Date().toISOString(),
|
|
321
|
+
baselineLoaded: baseline !== null && (baseline.source ?? '').length > 0,
|
|
322
|
+
...(baseline?.source ? { baselineSource: baseline.source } : {}),
|
|
323
|
+
filesProvided: explicitFiles,
|
|
324
|
+
changedFilesFromGit,
|
|
325
|
+
warnings,
|
|
326
|
+
totalCurrent: currentReport.total,
|
|
327
|
+
totalBaseline: baseline?.total ?? 0,
|
|
328
|
+
entries,
|
|
329
|
+
counts,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
export function renderArchitectureViolationsDiffText(report) {
|
|
333
|
+
const lines = [];
|
|
334
|
+
lines.push('=== Architecture violations diff ===');
|
|
335
|
+
lines.push(` current total ${report.totalCurrent}`);
|
|
336
|
+
if (report.baselineLoaded)
|
|
337
|
+
lines.push(` baseline total ${report.totalBaseline}`);
|
|
338
|
+
lines.push(` existing-touched ${report.counts.existingTouched}`);
|
|
339
|
+
lines.push(` new-in-changed ${report.counts.newInChangedFile}`);
|
|
340
|
+
lines.push(` resolved ${report.counts.resolved}`);
|
|
341
|
+
lines.push(` unknown ${report.counts.unknown}`);
|
|
342
|
+
for (const w of report.warnings)
|
|
343
|
+
lines.push(` ! ${w}`);
|
|
344
|
+
for (const e of report.entries.slice(0, 50)) {
|
|
345
|
+
const v = e.violation;
|
|
346
|
+
lines.push(` [${e.classification}] [${v.severity}] ${v.ruleId} ${v.file}:${v.line} → ${v.importSpecifier}`);
|
|
347
|
+
}
|
|
348
|
+
return lines.join('\n') + '\n';
|
|
349
|
+
}
|
|
350
|
+
export function renderArchitectureViolationsDiffMarkdown(report) {
|
|
351
|
+
const lines = [];
|
|
352
|
+
lines.push('# Architecture violations diff');
|
|
353
|
+
lines.push('');
|
|
354
|
+
lines.push(`- current total: **${report.totalCurrent}**`);
|
|
355
|
+
if (report.baselineLoaded)
|
|
356
|
+
lines.push(`- baseline total: ${report.totalBaseline}`);
|
|
357
|
+
lines.push(`- existing-touched: ${report.counts.existingTouched}`);
|
|
358
|
+
lines.push(`- new-in-changed: ${report.counts.newInChangedFile}`);
|
|
359
|
+
lines.push(`- resolved: ${report.counts.resolved}`);
|
|
360
|
+
lines.push(`- unknown: ${report.counts.unknown}`);
|
|
361
|
+
if (report.warnings.length > 0) {
|
|
362
|
+
lines.push('');
|
|
363
|
+
lines.push('## Warnings');
|
|
364
|
+
for (const w of report.warnings)
|
|
365
|
+
lines.push(`- ${w}`);
|
|
366
|
+
}
|
|
367
|
+
if (report.entries.length > 0) {
|
|
368
|
+
lines.push('');
|
|
369
|
+
lines.push('## Entries');
|
|
370
|
+
for (const e of report.entries) {
|
|
371
|
+
const v = e.violation;
|
|
372
|
+
lines.push(`- **${e.classification}** \`${v.ruleId}\` ${v.file}:${v.line} → \`${v.importSpecifier}\``);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return lines.join('\n') + '\n';
|
|
376
|
+
}
|
|
377
|
+
export function renderArchitectureViolationsDiffHtml(report) {
|
|
378
|
+
const body = [];
|
|
379
|
+
body.push('<h1>Architecture violations diff</h1>');
|
|
380
|
+
body.push('<ul>');
|
|
381
|
+
body.push(`<li>current total: <strong>${report.totalCurrent}</strong></li>`);
|
|
382
|
+
if (report.baselineLoaded)
|
|
383
|
+
body.push(`<li>baseline total: ${report.totalBaseline}</li>`);
|
|
384
|
+
body.push(`<li>existing-touched: ${report.counts.existingTouched}</li>`);
|
|
385
|
+
body.push(`<li>new-in-changed: ${report.counts.newInChangedFile}</li>`);
|
|
386
|
+
body.push(`<li>resolved: ${report.counts.resolved}</li>`);
|
|
387
|
+
body.push(`<li>unknown: ${report.counts.unknown}</li>`);
|
|
388
|
+
body.push('</ul>');
|
|
389
|
+
if (report.entries.length > 0) {
|
|
390
|
+
body.push('<table><thead><tr><th>Classification</th><th>Severity</th><th>Rule</th><th>File</th><th>Line</th><th>Specifier</th></tr></thead><tbody>');
|
|
391
|
+
for (const e of report.entries) {
|
|
392
|
+
const v = e.violation;
|
|
393
|
+
body.push(`<tr><td>${escapeHtml(e.classification)}</td><td>${escapeHtml(v.severity)}</td><td>${escapeHtml(v.ruleId)}</td><td>${escapeHtml(v.file)}</td><td>${v.line}</td><td>${escapeHtml(v.importSpecifier)}</td></tr>`);
|
|
394
|
+
}
|
|
395
|
+
body.push('</tbody></table>');
|
|
396
|
+
}
|
|
397
|
+
return `<!doctype html><meta charset="utf-8"><title>Architecture violations diff</title>${body.join('\n')}`;
|
|
398
|
+
}
|
|
399
|
+
export async function buildArchitectureArea(inspection, areaId) {
|
|
400
|
+
const map = await buildArchitectureMap(inspection);
|
|
401
|
+
const layer = map.layers.find((l) => l.id === areaId);
|
|
402
|
+
return {
|
|
403
|
+
schema: 'sharkcraft.architecture-area/v1',
|
|
404
|
+
area: areaId,
|
|
405
|
+
members: layer?.members ?? [],
|
|
406
|
+
found: layer !== undefined,
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function aggregateConstructKinds(graph) {
|
|
410
|
+
const counts = new Map();
|
|
411
|
+
for (const n of graph.nodes) {
|
|
412
|
+
if (n.kind !== RepoNodeKind.Construct)
|
|
413
|
+
continue;
|
|
414
|
+
const ck = n.meta?.constructType ?? 'unknown';
|
|
415
|
+
counts.set(ck, (counts.get(ck) ?? 0) + 1);
|
|
416
|
+
}
|
|
417
|
+
return [...counts.entries()].map(([kind, count]) => ({ kind, count })).sort((a, b) => b.count - a.count);
|
|
418
|
+
}
|
|
419
|
+
function escapeHtml(s) {
|
|
420
|
+
return s
|
|
421
|
+
.replace(/&/g, '&')
|
|
422
|
+
.replace(/</g, '<')
|
|
423
|
+
.replace(/>/g, '>')
|
|
424
|
+
.replace(/"/g, '"')
|
|
425
|
+
.replace(/'/g, ''');
|
|
426
|
+
}
|
|
427
|
+
export function renderArchitectureMapText(map) {
|
|
428
|
+
const lines = [];
|
|
429
|
+
lines.push('=== Architecture map ===');
|
|
430
|
+
lines.push(` packages ${map.graphSummary.packages}`);
|
|
431
|
+
lines.push(` apps ${map.graphSummary.apps}`);
|
|
432
|
+
lines.push(` libraries ${map.graphSummary.libraries}`);
|
|
433
|
+
lines.push(` constructs ${map.graphSummary.constructs}`);
|
|
434
|
+
lines.push(` boundary rules ${map.boundaryRules.length}`);
|
|
435
|
+
lines.push(` public api surfs ${map.publicApiSurfaces.length}`);
|
|
436
|
+
lines.push(` packs ${map.packs.length}`);
|
|
437
|
+
if (map.signalsEnabled) {
|
|
438
|
+
lines.push(` boundary violations error=${map.boundaryViolationCounts.error} warning=${map.boundaryViolationCounts.warning} info=${map.boundaryViolationCounts.info}`);
|
|
439
|
+
}
|
|
440
|
+
if (map.layers.length > 0) {
|
|
441
|
+
lines.push('Layers:');
|
|
442
|
+
for (const l of map.layers)
|
|
443
|
+
lines.push(` • ${l.label} — ${l.members.length} member(s)`);
|
|
444
|
+
}
|
|
445
|
+
if (map.constructsByKind.length > 0) {
|
|
446
|
+
lines.push('Constructs by kind:');
|
|
447
|
+
for (const c of map.constructsByKind)
|
|
448
|
+
lines.push(` • ${c.kind} (${c.count})`);
|
|
449
|
+
}
|
|
450
|
+
if (map.testsCoverageHint)
|
|
451
|
+
lines.push(`Tests: ${map.testsCoverageHint}`);
|
|
452
|
+
if (map.ownershipCoverageHint)
|
|
453
|
+
lines.push(`Ownership: ${map.ownershipCoverageHint}`);
|
|
454
|
+
if (map.highImpactFiles.length > 0) {
|
|
455
|
+
lines.push('High-impact files (top 5):');
|
|
456
|
+
for (const f of map.highImpactFiles.slice(0, 5))
|
|
457
|
+
lines.push(` • ${f.file} (in=${f.fanIn} out=${f.fanOut})`);
|
|
458
|
+
}
|
|
459
|
+
if (map.boundaryViolations.length > 0) {
|
|
460
|
+
lines.push('Top boundary violations:');
|
|
461
|
+
for (const v of map.boundaryViolations.slice(0, 5))
|
|
462
|
+
lines.push(` [${v.severity}] ${v.ruleId} ${v.file}:${v.line} → ${v.importSpecifier}`);
|
|
463
|
+
}
|
|
464
|
+
if (map.risks.length > 0) {
|
|
465
|
+
lines.push('Risks:');
|
|
466
|
+
for (const r of map.risks)
|
|
467
|
+
lines.push(` [${r.severity}] ${r.id} — ${r.description}`);
|
|
468
|
+
}
|
|
469
|
+
lines.push('Suggested review:');
|
|
470
|
+
for (const c of map.suggestedReviewCommands)
|
|
471
|
+
lines.push(` $ ${c}`);
|
|
472
|
+
return lines.join('\n') + '\n';
|
|
473
|
+
}
|
|
474
|
+
export function renderArchitectureMapMarkdown(map) {
|
|
475
|
+
const lines = [];
|
|
476
|
+
lines.push('# Architecture map');
|
|
477
|
+
lines.push('');
|
|
478
|
+
lines.push(`Generated: ${map.generatedAt}`);
|
|
479
|
+
lines.push('');
|
|
480
|
+
lines.push('## Layers');
|
|
481
|
+
if (map.layers.length === 0)
|
|
482
|
+
lines.push('_None detected._');
|
|
483
|
+
else
|
|
484
|
+
for (const l of map.layers)
|
|
485
|
+
lines.push(`- **${l.label}** — ${l.members.join(', ')}`);
|
|
486
|
+
lines.push('');
|
|
487
|
+
if (map.publicApiSurfaces.length > 0) {
|
|
488
|
+
lines.push('## Public API surfaces');
|
|
489
|
+
for (const s of map.publicApiSurfaces)
|
|
490
|
+
lines.push(`- ${s}`);
|
|
491
|
+
lines.push('');
|
|
492
|
+
}
|
|
493
|
+
if (map.boundaryRules.length > 0) {
|
|
494
|
+
lines.push('## Boundary rules');
|
|
495
|
+
for (const b of map.boundaryRules)
|
|
496
|
+
lines.push(`- ${b}`);
|
|
497
|
+
lines.push('');
|
|
498
|
+
}
|
|
499
|
+
if (map.boundaryViolations.length > 0) {
|
|
500
|
+
lines.push('## Boundary violations');
|
|
501
|
+
for (const v of map.boundaryViolations.slice(0, 20))
|
|
502
|
+
lines.push(`- **${v.severity}** \`${v.ruleId}\` ${v.file}:${v.line} → \`${v.importSpecifier}\``);
|
|
503
|
+
lines.push('');
|
|
504
|
+
}
|
|
505
|
+
if (map.highImpactFiles.length > 0) {
|
|
506
|
+
lines.push('## High-impact files');
|
|
507
|
+
for (const f of map.highImpactFiles.slice(0, 10))
|
|
508
|
+
lines.push(`- \`${f.file}\` — fan-in ${f.fanIn} / fan-out ${f.fanOut}`);
|
|
509
|
+
lines.push('');
|
|
510
|
+
}
|
|
511
|
+
if (map.risks.length > 0) {
|
|
512
|
+
lines.push('## Risks');
|
|
513
|
+
for (const r of map.risks)
|
|
514
|
+
lines.push(`- **${r.severity}** — ${r.id}: ${r.description}`);
|
|
515
|
+
lines.push('');
|
|
516
|
+
}
|
|
517
|
+
lines.push('## Suggested review');
|
|
518
|
+
for (const c of map.suggestedReviewCommands)
|
|
519
|
+
lines.push(`- \`${c}\``);
|
|
520
|
+
return lines.join('\n') + '\n';
|
|
521
|
+
}
|
|
522
|
+
export function renderArchitectureMapHtml(map) {
|
|
523
|
+
const body = [];
|
|
524
|
+
body.push('<h1>Architecture map</h1>');
|
|
525
|
+
body.push(`<p>Generated: ${escapeHtml(map.generatedAt)}</p>`);
|
|
526
|
+
body.push('<h2>Layers</h2><ul>');
|
|
527
|
+
for (const l of map.layers)
|
|
528
|
+
body.push(`<li><strong>${escapeHtml(l.label)}</strong> — ${escapeHtml(l.members.join(', '))}</li>`);
|
|
529
|
+
body.push('</ul>');
|
|
530
|
+
if (map.publicApiSurfaces.length > 0) {
|
|
531
|
+
body.push('<h2>Public API surfaces</h2><ul>');
|
|
532
|
+
for (const s of map.publicApiSurfaces)
|
|
533
|
+
body.push(`<li>${escapeHtml(s)}</li>`);
|
|
534
|
+
body.push('</ul>');
|
|
535
|
+
}
|
|
536
|
+
if (map.risks.length > 0) {
|
|
537
|
+
body.push('<h2>Risks</h2><ul>');
|
|
538
|
+
for (const r of map.risks)
|
|
539
|
+
body.push(`<li><em>${escapeHtml(r.severity)}</em> — ${escapeHtml(r.id)}: ${escapeHtml(r.description)}</li>`);
|
|
540
|
+
body.push('</ul>');
|
|
541
|
+
}
|
|
542
|
+
return `<!doctype html><meta charset="utf-8"><title>Architecture map</title>${body.join('\n')}`;
|
|
543
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace-aware "explore this directory".
|
|
3
|
+
*
|
|
4
|
+
* Answers "explain this *specific* directory" with one deterministic
|
|
5
|
+
* call. Built on top of `buildAreaMap` (whole-repo) and the registries
|
|
6
|
+
* already in `ISharkcraftInspection`.
|
|
7
|
+
*
|
|
8
|
+
* Output:
|
|
9
|
+
* - inferred area kind + role,
|
|
10
|
+
* - key modules (largest / construct-defining),
|
|
11
|
+
* - related commands (from the command catalog the caller injects),
|
|
12
|
+
* - related MCP tools (id proximity to area name),
|
|
13
|
+
* - tests under the dir,
|
|
14
|
+
* - boundary rules / path conventions that mention the dir,
|
|
15
|
+
* - common edit risks (generated files, signed/sensitive files,
|
|
16
|
+
* dist/ subdir, etc.).
|
|
17
|
+
*
|
|
18
|
+
* Pure-data; no execution.
|
|
19
|
+
*/
|
|
20
|
+
import type { ISharkcraftInspection } from './sharkcraft-inspector.js';
|
|
21
|
+
import { AreaKind } from './area-map.js';
|
|
22
|
+
export declare const AREA_EXPLORE_SCHEMA = "sharkcraft.area-explore/v1";
|
|
23
|
+
export interface IAreaExploreFileEntry {
|
|
24
|
+
readonly relPath: string;
|
|
25
|
+
readonly sizeBytes: number;
|
|
26
|
+
readonly kind: 'source' | 'test' | 'doc' | 'generated' | 'config' | 'other';
|
|
27
|
+
}
|
|
28
|
+
export interface IAreaExploreRiskEntry {
|
|
29
|
+
readonly kind: 'generated-files' | 'high-fan-in' | 'signed-asset' | 'mcp-tool-dir' | 'cli-write-path' | 'pack-contribution' | 'no-tests';
|
|
30
|
+
readonly message: string;
|
|
31
|
+
readonly severity: 'info' | 'warning';
|
|
32
|
+
}
|
|
33
|
+
export interface IAreaExploreReport {
|
|
34
|
+
readonly schema: typeof AREA_EXPLORE_SCHEMA;
|
|
35
|
+
readonly projectRoot: string;
|
|
36
|
+
readonly path: string;
|
|
37
|
+
readonly resolvedPath: string;
|
|
38
|
+
readonly exists: boolean;
|
|
39
|
+
readonly inferredKind: AreaKind;
|
|
40
|
+
readonly role: string;
|
|
41
|
+
readonly fileCount: number;
|
|
42
|
+
readonly testCount: number;
|
|
43
|
+
readonly keyFiles: ReadonlyArray<IAreaExploreFileEntry>;
|
|
44
|
+
readonly relatedCommands: ReadonlyArray<string>;
|
|
45
|
+
readonly relatedMcpTools: ReadonlyArray<string>;
|
|
46
|
+
readonly relatedTemplates: ReadonlyArray<string>;
|
|
47
|
+
readonly relatedPipelines: ReadonlyArray<string>;
|
|
48
|
+
readonly boundaryRuleIds: ReadonlyArray<string>;
|
|
49
|
+
readonly pathConventionIds: ReadonlyArray<string>;
|
|
50
|
+
readonly risks: ReadonlyArray<IAreaExploreRiskEntry>;
|
|
51
|
+
readonly nextCommands: ReadonlyArray<string>;
|
|
52
|
+
}
|
|
53
|
+
export interface IExploreAreaInput {
|
|
54
|
+
inspection: ISharkcraftInspection;
|
|
55
|
+
/** Directory to explore, relative to the project root (or absolute). */
|
|
56
|
+
path: string;
|
|
57
|
+
/** Caller-injected command catalog (catalog entries with a `command` field). */
|
|
58
|
+
commandCatalog?: ReadonlyArray<{
|
|
59
|
+
command: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Caller-injected MCP tool names (id strings). */
|
|
62
|
+
mcpToolNames?: ReadonlyArray<string>;
|
|
63
|
+
/** Path-convention registry (best-effort). */
|
|
64
|
+
pathConventions?: ReadonlyArray<{
|
|
65
|
+
id: string;
|
|
66
|
+
pattern?: string;
|
|
67
|
+
path?: string;
|
|
68
|
+
}>;
|
|
69
|
+
/** Limit on key files surfaced. */
|
|
70
|
+
topFiles?: number;
|
|
71
|
+
}
|
|
72
|
+
export declare function exploreArea(input: IExploreAreaInput): IAreaExploreReport;
|
|
73
|
+
export declare function renderAreaExploreText(report: IAreaExploreReport): string;
|
|
74
|
+
export declare function renderAreaExploreMarkdown(report: IAreaExploreReport): string;
|
|
75
|
+
//# sourceMappingURL=area-explore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area-explore.d.ts","sourceRoot":"","sources":["../src/area-explore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAgB,MAAM,eAAe,CAAC;AAEvD,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAEhE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC7E;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EACT,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GACnB,UAAU,CAAC;IACf,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,mBAAmB,CAAC;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACxD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACrD,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9C;AAiMD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,qBAAqB,CAAC;IAClC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,cAAc,CAAC,EAAE,aAAa,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,mDAAmD;IACnD,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,8CAA8C;IAC9C,eAAe,CAAC,EAAE,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjF,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CA+IxE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAoDxE;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAuC5E"}
|