@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,658 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import * as nodePath from 'node:path';
|
|
3
|
+
import { buildAreaMap, renderAreaMapMarkdown } from "./area-map.js";
|
|
4
|
+
import { buildCoverageReport } from "./coverage-report.js";
|
|
5
|
+
import { buildDriftReport } from "./drift.js";
|
|
6
|
+
import { evaluatePolicy } from "./policy-engine.js";
|
|
7
|
+
import { listFeatureBundles, } from "./feature-bundle.js";
|
|
8
|
+
import { buildReviewPacketV3, renderReviewCommentV3, } from "./review-packet-v3.js";
|
|
9
|
+
import { renderQualityBaselineHtml, readQualityBaseline, } from "./quality-baseline.js";
|
|
10
|
+
import { buildQualityReport } from "./quality-report.js";
|
|
11
|
+
import { renderBundleValidationHtml } from "./bundle-validate-html.js";
|
|
12
|
+
import { renderImpactHtml } from "./impact-render.js";
|
|
13
|
+
import { renderImpactDot, renderImpactMermaid } from "./impact-graph.js";
|
|
14
|
+
import { renderImpactGraphSvg } from "./impact-graph-render.js";
|
|
15
|
+
import { listConstructs, warmConstructCache } from "./construct-registry.js";
|
|
16
|
+
function esc(s) {
|
|
17
|
+
return s
|
|
18
|
+
.replace(/&/g, '&')
|
|
19
|
+
.replace(/</g, '<')
|
|
20
|
+
.replace(/>/g, '>')
|
|
21
|
+
.replace(/"/g, '"');
|
|
22
|
+
}
|
|
23
|
+
const NAV = [
|
|
24
|
+
{ id: 'overview', href: 'index.html', title: 'Overview' },
|
|
25
|
+
{ id: 'quality', href: 'quality.html', title: 'Quality' },
|
|
26
|
+
{ id: 'bundles', href: 'bundles.html', title: 'Bundles' },
|
|
27
|
+
{ id: 'review', href: 'review.html', title: 'Review' },
|
|
28
|
+
{ id: 'impact', href: 'impact.html', title: 'Impact' },
|
|
29
|
+
{ id: 'coverage', href: 'coverage.html', title: 'Coverage' },
|
|
30
|
+
{ id: 'drift', href: 'drift.html', title: 'Drift' },
|
|
31
|
+
{ id: 'policies', href: 'policies.html', title: 'Policies' },
|
|
32
|
+
{ id: 'area-map', href: 'area-map.html', title: 'Area map' },
|
|
33
|
+
{ id: 'constructs', href: 'constructs.html', title: 'Constructs' },
|
|
34
|
+
{ id: 'pack-compat', href: 'pack-compat.html', title: 'Pack compat' },
|
|
35
|
+
];
|
|
36
|
+
const SITE_GENERATED_AT = new Date().toISOString();
|
|
37
|
+
function pageShellImpl(title, body, options = {}) {
|
|
38
|
+
const extraLinks = [];
|
|
39
|
+
if (options.safetyMatrixUrl)
|
|
40
|
+
extraLinks.push(`<a href="${esc(options.safetyMatrixUrl)}">Safety matrix</a>`);
|
|
41
|
+
if (options.runtimeCompatibilityUrl)
|
|
42
|
+
extraLinks.push(`<a href="${esc(options.runtimeCompatibilityUrl)}">Runtime compat</a>`);
|
|
43
|
+
const nav = (options.brand ? `<span class="brand">${esc(options.brand)}</span>` : '') +
|
|
44
|
+
NAV.map((n) => {
|
|
45
|
+
const isCurrent = n.id === options.current;
|
|
46
|
+
return `<a href="${n.href}"${isCurrent ? ' class="current"' : ''}>${esc(n.title)}</a>`;
|
|
47
|
+
}).join('') +
|
|
48
|
+
extraLinks.join('');
|
|
49
|
+
const banner = options.siteTitle
|
|
50
|
+
? `<div class="banner"><strong>${esc(options.siteTitle)}</strong></div>`
|
|
51
|
+
: '';
|
|
52
|
+
const description = options.description
|
|
53
|
+
? `<p class="muted page-desc">${esc(options.description)}</p>`
|
|
54
|
+
: '';
|
|
55
|
+
const emptyState = options.emptyState
|
|
56
|
+
? `<div class="empty"><h3>${esc(options.emptyState.title)}</h3><p>${esc(options.emptyState.body)}</p></div>`
|
|
57
|
+
: '';
|
|
58
|
+
const commandHints = options.commandHints && options.commandHints.length > 0
|
|
59
|
+
? `<aside class="hints"><h3>Helpful commands</h3><ul>${options.commandHints.map((c) => `<li><code>${esc(c)}</code></li>`).join('')}</ul></aside>`
|
|
60
|
+
: '';
|
|
61
|
+
const titleSuffix = options.brand ? esc(options.brand) : 'SharkCraft';
|
|
62
|
+
const footer = `<footer class="footer">Generated by ${titleSuffix} · ${esc(SITE_GENERATED_AT)} · <a href="index.html">index</a></footer>`;
|
|
63
|
+
return [
|
|
64
|
+
'<!doctype html><html><head><meta charset="utf-8">',
|
|
65
|
+
`<title>${titleSuffix} — ${esc(title)}</title>`,
|
|
66
|
+
'<style>',
|
|
67
|
+
'body{font:14px/1.45 -apple-system,sans-serif;max-width:1080px;margin:24px auto;padding:0 16px;color:#1f2328}',
|
|
68
|
+
'nav{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid #d0d7de;margin-bottom:16px;flex-wrap:wrap}',
|
|
69
|
+
'nav a{color:#0969da;text-decoration:none}',
|
|
70
|
+
'nav a:hover{text-decoration:underline}',
|
|
71
|
+
'nav a.current{font-weight:700;color:#1f2328;text-decoration:underline}',
|
|
72
|
+
'h1{font-size:22px;border-bottom:1px solid #d0d7de;padding-bottom:8px}',
|
|
73
|
+
'h2{font-size:16px;margin-top:24px}',
|
|
74
|
+
'h3{font-size:14px;margin-top:16px}',
|
|
75
|
+
'table{border-collapse:collapse;width:100%;margin:8px 0}',
|
|
76
|
+
'th,td{border:1px solid #d0d7de;padding:6px 10px;text-align:left;vertical-align:top}',
|
|
77
|
+
'th{background:#f6f8fa}',
|
|
78
|
+
'code,pre{background:#f6f8fa;padding:1px 4px;border-radius:4px;font-size:12px}',
|
|
79
|
+
'.tag{display:inline-block;padding:2px 8px;border-radius:9999px;font-size:11px;font-weight:600}',
|
|
80
|
+
'.tag.ok{background:#dafbe1;color:#1a7f37}',
|
|
81
|
+
'.tag.warn{background:#fff8c5;color:#9a6700}',
|
|
82
|
+
'.tag.fail{background:#ffebe9;color:#cf222e}',
|
|
83
|
+
'.tag.info{background:#eaeef2;color:#57606a}',
|
|
84
|
+
'.muted{color:#57606a}',
|
|
85
|
+
'.page-desc{margin-top:-4px;font-size:13px}',
|
|
86
|
+
'.empty{border:1px dashed #d0d7de;border-radius:8px;padding:12px 16px;margin:16px 0;background:#fafbfc}',
|
|
87
|
+
'.empty h3{margin-top:0}',
|
|
88
|
+
'.hints{border-left:3px solid #0969da;background:#f6f8fa;padding:8px 12px;margin:16px 0;border-radius:0 6px 6px 0}',
|
|
89
|
+
'.hints h3{margin-top:0;font-size:13px;color:#0969da}',
|
|
90
|
+
'.hints ul{margin:4px 0;padding-left:18px}',
|
|
91
|
+
'.footer{margin-top:32px;padding-top:8px;border-top:1px solid #d0d7de;color:#57606a;font-size:12px}',
|
|
92
|
+
'.footer a{color:#57606a}',
|
|
93
|
+
'.brand{font-weight:700;color:#1f2328;margin-right:auto;letter-spacing:0.2px}',
|
|
94
|
+
'.banner{background:#f6f8fa;border:1px solid #d0d7de;border-radius:8px;padding:8px 12px;margin-bottom:12px;font-size:13px}',
|
|
95
|
+
'</style></head><body>',
|
|
96
|
+
'<nav>',
|
|
97
|
+
nav,
|
|
98
|
+
'</nav>',
|
|
99
|
+
banner,
|
|
100
|
+
description,
|
|
101
|
+
emptyState,
|
|
102
|
+
body,
|
|
103
|
+
commandHints,
|
|
104
|
+
footer,
|
|
105
|
+
'</body></html>',
|
|
106
|
+
].join('\n') + '\n';
|
|
107
|
+
}
|
|
108
|
+
function loadImpactReports(options) {
|
|
109
|
+
const out = [];
|
|
110
|
+
const seen = new Set();
|
|
111
|
+
const tryLoad = (file) => {
|
|
112
|
+
if (seen.has(file))
|
|
113
|
+
return;
|
|
114
|
+
seen.add(file);
|
|
115
|
+
if (!existsSync(file))
|
|
116
|
+
return;
|
|
117
|
+
try {
|
|
118
|
+
const data = JSON.parse(readFileSync(file, 'utf8'));
|
|
119
|
+
if (data &&
|
|
120
|
+
typeof data === 'object' &&
|
|
121
|
+
(data.schema === 'sharkcraft.impact-analysis/v2' ||
|
|
122
|
+
data.schema?.startsWith('sharkcraft.impact-analysis'))) {
|
|
123
|
+
out.push(data);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
/* ignore */
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
if (options.impactFile)
|
|
131
|
+
tryLoad(options.impactFile);
|
|
132
|
+
if (options.impactDir) {
|
|
133
|
+
try {
|
|
134
|
+
for (const f of readdirSync(options.impactDir)) {
|
|
135
|
+
if (!f.endsWith('.json'))
|
|
136
|
+
continue;
|
|
137
|
+
const full = nodePath.join(options.impactDir, f);
|
|
138
|
+
try {
|
|
139
|
+
if (!statSync(full).isFile())
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
tryLoad(full);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
/* ignore */
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
function impactSummaryRow(impact) {
|
|
155
|
+
const target = impact.normalizedTargets[0] ?? impact.specifier ?? impact.task ?? '(unknown)';
|
|
156
|
+
const risk = impact.risk;
|
|
157
|
+
const tag = risk === 'critical' ? 'fail' : risk === 'high' || risk === 'medium' ? 'warn' : 'ok';
|
|
158
|
+
return [
|
|
159
|
+
`<tr><td><code>${esc(target)}</code></td>`,
|
|
160
|
+
`<td><span class="tag ${tag}">${esc(risk.toUpperCase())}</span></td>`,
|
|
161
|
+
`<td>${impact.directDependents.length}</td>`,
|
|
162
|
+
`<td>${impact.transitiveDependents.length}</td>`,
|
|
163
|
+
`<td>${impact.affectedPackages.length}</td>`,
|
|
164
|
+
`<td>${impact.potentialBoundaryRisks.length}</td>`,
|
|
165
|
+
`<td>${impact.affectedPolicies.length}</td></tr>`,
|
|
166
|
+
].join('');
|
|
167
|
+
}
|
|
168
|
+
function impactIndexBody(impacts) {
|
|
169
|
+
const rows = impacts.map(impactSummaryRow).join('');
|
|
170
|
+
return `<h1>Impact reports (${impacts.length})</h1>
|
|
171
|
+
<table><thead><tr><th>Target</th><th>Risk</th><th>Direct</th><th>Transitive</th><th>Packages</th><th>Boundary</th><th>Policy</th></tr></thead>
|
|
172
|
+
<tbody>${rows}</tbody></table>
|
|
173
|
+
<p class="muted">Per-report pages: ${impacts
|
|
174
|
+
.map((_, i) => `<a href="impact-${i + 1}.html">impact-${i + 1}</a>`)
|
|
175
|
+
.join(' · ')}</p>`;
|
|
176
|
+
}
|
|
177
|
+
function impactPlaceholderBody() {
|
|
178
|
+
return `<h1>Impact</h1>
|
|
179
|
+
<p><em>No impact report selected.</em></p>
|
|
180
|
+
<p>Generate one with one of:</p>
|
|
181
|
+
<ul>
|
|
182
|
+
<li><code>shrk impact --since main --format json > .sharkcraft/reports/impact.json && shrk report site --impact .sharkcraft/reports/impact.json</code></li>
|
|
183
|
+
<li><code>shrk impact src/services/user.service.ts --format html --output .sharkcraft/reports/impact-direct.html</code> (standalone)</li>
|
|
184
|
+
<li><code>shrk report site --impact-dir .sharkcraft/reports/impact</code> — embed every <code>*.json</code> in a folder.</li>
|
|
185
|
+
</ul>`;
|
|
186
|
+
}
|
|
187
|
+
export async function buildReportSite(inspection, outputDir, options = {}) {
|
|
188
|
+
mkdirSync(outputDir, { recursive: true });
|
|
189
|
+
const files = [];
|
|
190
|
+
const placeholderPages = [];
|
|
191
|
+
const write = (name, content) => {
|
|
192
|
+
const p = nodePath.join(outputDir, name);
|
|
193
|
+
writeFileSync(p, content, 'utf8');
|
|
194
|
+
files.push(p);
|
|
195
|
+
};
|
|
196
|
+
// Branding wrapper — applies optional --title / --brand / --safety-matrix /
|
|
197
|
+
// --runtime-compat to every page consistently.
|
|
198
|
+
const shell = (title, body, shellOpts = {}) => pageShellImpl(title, body, {
|
|
199
|
+
...shellOpts,
|
|
200
|
+
...(options.brand ? { brand: options.brand } : {}),
|
|
201
|
+
...(options.title ? { siteTitle: options.title } : {}),
|
|
202
|
+
...(options.safetyMatrixUrl ? { safetyMatrixUrl: options.safetyMatrixUrl } : {}),
|
|
203
|
+
...(options.runtimeCompatibilityUrl
|
|
204
|
+
? { runtimeCompatibilityUrl: options.runtimeCompatibilityUrl }
|
|
205
|
+
: {}),
|
|
206
|
+
});
|
|
207
|
+
const quality = await buildQualityReport({ inspection, config: {} });
|
|
208
|
+
const coverage = buildCoverageReport(inspection);
|
|
209
|
+
let drift;
|
|
210
|
+
try {
|
|
211
|
+
drift = buildDriftReport(inspection);
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
drift = { findings: [], counts: { error: 0, warning: 0, info: 0 } };
|
|
215
|
+
}
|
|
216
|
+
const policy = await evaluatePolicy(inspection);
|
|
217
|
+
const areas = buildAreaMap(inspection);
|
|
218
|
+
const bundles = listFeatureBundles(inspection.projectRoot);
|
|
219
|
+
// Warm construct cache so packs contribute to the constructs page.
|
|
220
|
+
await warmConstructCache(inspection);
|
|
221
|
+
const constructs = listConstructs(inspection);
|
|
222
|
+
const baselineFile = nodePath.join(inspection.projectRoot, 'sharkcraft', 'quality-baseline.json');
|
|
223
|
+
const baseline = readQualityBaseline(baselineFile);
|
|
224
|
+
let review = null;
|
|
225
|
+
if (options.bundleId || options.reviewPacketFile) {
|
|
226
|
+
const opts = {};
|
|
227
|
+
if (options.bundleId)
|
|
228
|
+
opts.bundleId = options.bundleId;
|
|
229
|
+
review = await buildReviewPacketV3(inspection, opts);
|
|
230
|
+
}
|
|
231
|
+
const impacts = loadImpactReports(options);
|
|
232
|
+
// index.html
|
|
233
|
+
const indexBody = `
|
|
234
|
+
<h1>SharkCraft report</h1>
|
|
235
|
+
<p class="muted">Generated ${esc(new Date().toISOString())}</p>
|
|
236
|
+
<table>
|
|
237
|
+
<tr><th>Quality score</th><td>${quality.score} <span class="tag ${quality.overall === 'fail' ? 'fail' : quality.overall === 'warn' ? 'warn' : 'ok'}">${esc(quality.overall.toUpperCase())}</span></td></tr>
|
|
238
|
+
<tr><th>Blockers</th><td>${quality.blockers}</td></tr>
|
|
239
|
+
<tr><th>Warnings</th><td>${quality.warnings}</td></tr>
|
|
240
|
+
<tr><th>Coverage overall</th><td>${coverage.overall}</td></tr>
|
|
241
|
+
<tr><th>Drift findings</th><td>${drift.findings.length}</td></tr>
|
|
242
|
+
<tr><th>Policy registrations</th><td>${policy.registrations.length}</td></tr>
|
|
243
|
+
<tr><th>Areas</th><td>${areas.areas.length}</td></tr>
|
|
244
|
+
<tr><th>Bundles</th><td>${bundles.length}</td></tr>
|
|
245
|
+
<tr><th>Constructs</th><td>${constructs.length}</td></tr>
|
|
246
|
+
<tr><th>Impact reports</th><td>${impacts.length}</td></tr>
|
|
247
|
+
</table>
|
|
248
|
+
<h2>Deep links</h2>
|
|
249
|
+
<ul>
|
|
250
|
+
${NAV.filter((n) => n.id !== 'overview')
|
|
251
|
+
.map((n) => `<li><a href="${n.href}">${esc(n.title)}</a></li>`)
|
|
252
|
+
.join('')}
|
|
253
|
+
</ul>`;
|
|
254
|
+
write('index.html', shell('Overview', indexBody, {
|
|
255
|
+
current: 'overview',
|
|
256
|
+
description: 'High-level snapshot of the SharkCraft state. Every page below is a deep link.',
|
|
257
|
+
commandHints: [
|
|
258
|
+
'shrk report site --output .sharkcraft/reports/site',
|
|
259
|
+
'shrk report site --manifest',
|
|
260
|
+
],
|
|
261
|
+
}));
|
|
262
|
+
// quality.html
|
|
263
|
+
let qualityBody = `<h1>Quality</h1>`;
|
|
264
|
+
qualityBody += `<p>Overall: <span class="tag ${quality.overall === 'fail' ? 'fail' : quality.overall === 'warn' ? 'warn' : 'ok'}">${esc(quality.overall.toUpperCase())}</span> · Score: ${quality.score} · Blockers: ${quality.blockers} · Warnings: ${quality.warnings}</p>`;
|
|
265
|
+
qualityBody += '<table><thead><tr><th>Gate</th><th>Result</th><th>Notes</th></tr></thead><tbody>';
|
|
266
|
+
for (const g of quality.gates) {
|
|
267
|
+
qualityBody += `<tr><td><code>${esc(g.id)}</code></td><td><span class="tag ${g.passed ? 'ok' : g.blocking ? 'fail' : 'warn'}">${g.passed ? 'OK' : g.blocking ? 'BLOCK' : 'WARN'}</span></td><td>${esc(g.notes.join('; '))}</td></tr>`;
|
|
268
|
+
}
|
|
269
|
+
qualityBody += '</tbody></table>';
|
|
270
|
+
if (baseline) {
|
|
271
|
+
qualityBody += '<h2>Baseline</h2>';
|
|
272
|
+
qualityBody += `<p>Captured ${esc(baseline.createdAt)} (toolkit ${esc(baseline.sharkcraftVersion)})</p>`;
|
|
273
|
+
qualityBody += `<p>Score: ${baseline.qualityScore} · Readiness: ${baseline.readinessScore} · Blockers: ${baseline.blockers} · Warnings: ${baseline.warnings}</p>`;
|
|
274
|
+
write('quality-baseline.html', renderQualityBaselineHtml(baseline));
|
|
275
|
+
qualityBody += '<p><a href="quality-baseline.html">Full baseline detail →</a></p>';
|
|
276
|
+
}
|
|
277
|
+
write('quality.html', shell('Quality', qualityBody, {
|
|
278
|
+
current: 'quality',
|
|
279
|
+
description: 'Quality gate matrix. Each gate is run by `shrk quality` and `shrk quality baseline compare`.',
|
|
280
|
+
commandHints: ['shrk quality --strict --ci', 'shrk quality baseline diff latest previous'],
|
|
281
|
+
}));
|
|
282
|
+
// bundles.html
|
|
283
|
+
let bundlesBody = `<h1>Bundles (${bundles.length})</h1>`;
|
|
284
|
+
if (bundles.length === 0)
|
|
285
|
+
bundlesBody += '<p><em>No bundles in this workspace.</em></p>';
|
|
286
|
+
bundlesBody += '<table><thead><tr><th>ID</th><th>Task</th><th>Status</th><th>Plans</th><th>Validations</th></tr></thead><tbody>';
|
|
287
|
+
for (const b of bundles) {
|
|
288
|
+
bundlesBody += `<tr><td><code>${esc(b.id)}</code></td><td>${esc(b.task)}</td><td>${esc(b.status)}</td><td>${b.plans.length}</td><td>${b.validations.length}</td></tr>`;
|
|
289
|
+
}
|
|
290
|
+
bundlesBody += '</tbody></table>';
|
|
291
|
+
for (const b of bundles) {
|
|
292
|
+
const last = b.validations[b.validations.length - 1];
|
|
293
|
+
if (last) {
|
|
294
|
+
const validationHtml = renderBundleValidationHtml(b, last);
|
|
295
|
+
write(`bundle-${b.id}.html`, validationHtml);
|
|
296
|
+
bundlesBody += `<p><a href="bundle-${esc(b.id)}.html">→ ${esc(b.id)} validation</a></p>`;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
write('bundles.html', shell('Bundles', bundlesBody, {
|
|
300
|
+
current: 'bundles',
|
|
301
|
+
description: 'Feature workflow bundles and their latest validation runs.',
|
|
302
|
+
commandHints: ['shrk bundle list', 'shrk bundle replay --all --report --html'],
|
|
303
|
+
}));
|
|
304
|
+
// review.html
|
|
305
|
+
let reviewBody = `<h1>Review</h1>`;
|
|
306
|
+
if (review) {
|
|
307
|
+
reviewBody += renderReviewCommentV3(review, { format: 'html' });
|
|
308
|
+
// Deep-link to affected files (link to area-map for now).
|
|
309
|
+
reviewBody += `<p>See affected areas in <a href="area-map.html">the area map</a> and dependents in <a href="impact.html">impact</a>.</p>`;
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
reviewBody += `<p><em>No review packet selected.</em></p>
|
|
313
|
+
<p>Generate one of the following to populate this page:</p>
|
|
314
|
+
<ul>
|
|
315
|
+
<li><code>shrk report site --bundle <bundleId></code> — render a bundle's review.</li>
|
|
316
|
+
<li><code>shrk report site --review <packet.json></code> — render a saved packet.</li>
|
|
317
|
+
<li><code>shrk review packet --v3 --json > /tmp/review.json && shrk report site --review /tmp/review.json</code></li>
|
|
318
|
+
</ul>`;
|
|
319
|
+
placeholderPages.push('review');
|
|
320
|
+
}
|
|
321
|
+
write('review.html', shell('Review', reviewBody, {
|
|
322
|
+
current: 'review',
|
|
323
|
+
description: review
|
|
324
|
+
? 'Rendered review packet for the selected bundle/packet.'
|
|
325
|
+
: 'Placeholder — pass --bundle or --review to populate.',
|
|
326
|
+
commandHints: ['shrk review packet --v3 --since origin/main', 'shrk report site --bundle <id>'],
|
|
327
|
+
}));
|
|
328
|
+
// impact.html — index of impact reports (or placeholder).
|
|
329
|
+
const impactGraphFiles = [];
|
|
330
|
+
const impactSvgFiles = [];
|
|
331
|
+
const impactRenderDiagnostics = [];
|
|
332
|
+
if (impacts.length > 0) {
|
|
333
|
+
write('impact.html', shell('Impact', impactIndexBody(impacts), {
|
|
334
|
+
current: 'impact',
|
|
335
|
+
description: `${impacts.length} impact report(s) embedded — click through for detail.`,
|
|
336
|
+
commandHints: [
|
|
337
|
+
'shrk impact --since origin/main --format json > impact.json',
|
|
338
|
+
'shrk report impact impact.json --format html --include-graph',
|
|
339
|
+
'shrk report site --with-impact-graphs',
|
|
340
|
+
],
|
|
341
|
+
}));
|
|
342
|
+
// Per-report detail pages.
|
|
343
|
+
for (let i = 0; i < impacts.length; i += 1) {
|
|
344
|
+
const impact = impacts[i];
|
|
345
|
+
let html = renderImpactHtml(impact);
|
|
346
|
+
if (options.withImpactGraphs) {
|
|
347
|
+
const mermaid = renderImpactMermaid(impact);
|
|
348
|
+
const dot = renderImpactDot(impact);
|
|
349
|
+
const mermaidFile = `impact-${i + 1}.mmd`;
|
|
350
|
+
const dotFile = `impact-${i + 1}.dot`;
|
|
351
|
+
write(mermaidFile, mermaid);
|
|
352
|
+
write(dotFile, dot);
|
|
353
|
+
impactGraphFiles.push({ impact: i + 1, format: 'mermaid', file: mermaidFile });
|
|
354
|
+
impactGraphFiles.push({ impact: i + 1, format: 'dot', file: dotFile });
|
|
355
|
+
// Optional SVG rendering — opt-in via --render-impact-graphs. Runs a
|
|
356
|
+
// local subprocess against the just-written source files; degrades
|
|
357
|
+
// gracefully if the renderer isn't installed.
|
|
358
|
+
let mermaidSvgLink = '';
|
|
359
|
+
let dotSvgLink = '';
|
|
360
|
+
if (options.renderImpactGraphs) {
|
|
361
|
+
const mermaidSvgPath = nodePath.join(outputDir, `impact-${i + 1}.mermaid.svg`);
|
|
362
|
+
const dotSvgPath = nodePath.join(outputDir, `impact-${i + 1}.dot.svg`);
|
|
363
|
+
const mermaidResult = await renderImpactGraphSvg({
|
|
364
|
+
sourceFile: nodePath.join(outputDir, mermaidFile),
|
|
365
|
+
svgFile: mermaidSvgPath,
|
|
366
|
+
format: 'mermaid',
|
|
367
|
+
});
|
|
368
|
+
if (mermaidResult.rendered && mermaidResult.svgFile) {
|
|
369
|
+
files.push(mermaidResult.svgFile);
|
|
370
|
+
impactSvgFiles.push({
|
|
371
|
+
impact: i + 1,
|
|
372
|
+
format: 'mermaid',
|
|
373
|
+
file: `impact-${i + 1}.mermaid.svg`,
|
|
374
|
+
renderer: mermaidResult.renderer,
|
|
375
|
+
});
|
|
376
|
+
mermaidSvgLink = ` · <a href="impact-${i + 1}.mermaid.svg">svg</a>`;
|
|
377
|
+
}
|
|
378
|
+
impactRenderDiagnostics.push({
|
|
379
|
+
impact: i + 1,
|
|
380
|
+
format: 'mermaid',
|
|
381
|
+
rendered: mermaidResult.rendered,
|
|
382
|
+
...(mermaidResult.reason ? { reason: mermaidResult.reason } : {}),
|
|
383
|
+
renderer: mermaidResult.renderer,
|
|
384
|
+
});
|
|
385
|
+
const dotResult = await renderImpactGraphSvg({
|
|
386
|
+
sourceFile: nodePath.join(outputDir, dotFile),
|
|
387
|
+
svgFile: dotSvgPath,
|
|
388
|
+
format: 'dot',
|
|
389
|
+
});
|
|
390
|
+
if (dotResult.rendered && dotResult.svgFile) {
|
|
391
|
+
files.push(dotResult.svgFile);
|
|
392
|
+
impactSvgFiles.push({
|
|
393
|
+
impact: i + 1,
|
|
394
|
+
format: 'dot',
|
|
395
|
+
file: `impact-${i + 1}.dot.svg`,
|
|
396
|
+
renderer: dotResult.renderer,
|
|
397
|
+
});
|
|
398
|
+
dotSvgLink = ` · <a href="impact-${i + 1}.dot.svg">svg</a>`;
|
|
399
|
+
}
|
|
400
|
+
impactRenderDiagnostics.push({
|
|
401
|
+
impact: i + 1,
|
|
402
|
+
format: 'dot',
|
|
403
|
+
rendered: dotResult.rendered,
|
|
404
|
+
...(dotResult.reason ? { reason: dotResult.reason } : {}),
|
|
405
|
+
renderer: dotResult.renderer,
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
// Inject the graph source into the impact detail page.
|
|
409
|
+
const inject = [
|
|
410
|
+
'<h2>Graph source</h2>',
|
|
411
|
+
'<p class="muted">Copy into <a href="https://mermaid.live">mermaid.live</a> or render locally with <code>dot</code> / <code>mmdc</code>. SharkCraft never starts a renderer or fetches anything unless you opt in with <code>--render-impact-graphs</code>.</p>',
|
|
412
|
+
`<details><summary>Mermaid (<a href="${mermaidFile}">download</a>${mermaidSvgLink})</summary><pre>${esc(mermaid)}</pre></details>`,
|
|
413
|
+
`<details><summary>DOT (<a href="${dotFile}">download</a>${dotSvgLink})</summary><pre>${esc(dot)}</pre></details>`,
|
|
414
|
+
].join('\n');
|
|
415
|
+
// Place graph source before the trailing </body> tag.
|
|
416
|
+
html = html.replace('</body>', inject + '\n</body>');
|
|
417
|
+
}
|
|
418
|
+
write(`impact-${i + 1}.html`, html);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
write('impact.html', shell('Impact', impactPlaceholderBody(), {
|
|
423
|
+
current: 'impact',
|
|
424
|
+
description: 'No impact report selected.',
|
|
425
|
+
emptyState: {
|
|
426
|
+
title: 'No impact report embedded',
|
|
427
|
+
body: 'Pass --impact <path> or --impact-dir <dir> to populate this page.',
|
|
428
|
+
},
|
|
429
|
+
commandHints: [
|
|
430
|
+
'shrk impact --since origin/main --format json > .sharkcraft/reports/impact.json',
|
|
431
|
+
'shrk report site --impact .sharkcraft/reports/impact.json',
|
|
432
|
+
],
|
|
433
|
+
}));
|
|
434
|
+
placeholderPages.push('impact');
|
|
435
|
+
}
|
|
436
|
+
// coverage.html
|
|
437
|
+
let coverageBody = `<h1>Coverage</h1><p>Overall: ${coverage.overall}</p>`;
|
|
438
|
+
coverageBody += '<table><thead><tr><th>Category</th><th>Score</th></tr></thead><tbody>';
|
|
439
|
+
for (const c of coverage.categories) {
|
|
440
|
+
coverageBody += `<tr><td>${esc(c.id)}</td><td>${c.score}</td></tr>`;
|
|
441
|
+
}
|
|
442
|
+
coverageBody += '</tbody></table>';
|
|
443
|
+
write('coverage.html', shell('Coverage', coverageBody, {
|
|
444
|
+
current: 'coverage',
|
|
445
|
+
description: 'Coverage of structured knowledge per category.',
|
|
446
|
+
commandHints: ['shrk coverage --json', 'shrk drift'],
|
|
447
|
+
}));
|
|
448
|
+
// drift.html
|
|
449
|
+
let driftBody = `<h1>Drift</h1><p>Errors: ${drift.counts.error}; Warnings: ${drift.counts.warning}; Info: ${drift.counts.info}</p>`;
|
|
450
|
+
driftBody += '<table><thead><tr><th>Severity</th><th>Category</th><th>Message</th></tr></thead><tbody>';
|
|
451
|
+
for (const f of drift.findings.slice(0, 200)) {
|
|
452
|
+
driftBody += `<tr><td>${esc(f.severity)}</td><td>${esc(f.category)}</td><td>${esc(f.message)}</td></tr>`;
|
|
453
|
+
}
|
|
454
|
+
driftBody += '</tbody></table>';
|
|
455
|
+
write('drift.html', shell('Drift', driftBody, {
|
|
456
|
+
current: 'drift',
|
|
457
|
+
description: 'Drift between live state and structured knowledge.',
|
|
458
|
+
commandHints: ['shrk drift --json', 'shrk drift baseline-create'],
|
|
459
|
+
}));
|
|
460
|
+
// policies.html
|
|
461
|
+
let policyBody = `<h1>Policies</h1><p>Registered: ${policy.registrations.length}; Findings: ${policy.checks.length}; Passed: ${policy.summary.passed}</p>`;
|
|
462
|
+
policyBody += '<h2>Registered</h2>';
|
|
463
|
+
policyBody += '<table><thead><tr><th>ID</th><th>Source</th><th>Severity</th><th>File</th></tr></thead><tbody>';
|
|
464
|
+
for (const r of policy.registrations) {
|
|
465
|
+
policyBody += `<tr><td><code>${esc(r.id)}</code></td><td>${esc(r.source)}</td><td>${esc(r.severity)}</td><td><code>${esc(r.sourceFile)}</code></td></tr>`;
|
|
466
|
+
}
|
|
467
|
+
policyBody += '</tbody></table>';
|
|
468
|
+
if (policy.checks.length > 0) {
|
|
469
|
+
policyBody += '<h2>Findings</h2><ul>';
|
|
470
|
+
for (const c of policy.checks) {
|
|
471
|
+
policyBody += `<li>[${esc(c.severity)}] <code>${esc(c.id)}</code> — ${esc(c.message)}</li>`;
|
|
472
|
+
}
|
|
473
|
+
policyBody += '</ul>';
|
|
474
|
+
}
|
|
475
|
+
write('policies.html', shell('Policies', policyBody, {
|
|
476
|
+
current: 'policies',
|
|
477
|
+
description: 'Registered policy checks + the most recent run.',
|
|
478
|
+
commandHints: ['shrk policy run --json', 'shrk policy snapshot --all --gate'],
|
|
479
|
+
}));
|
|
480
|
+
// area-map.html
|
|
481
|
+
write('area-map.html', shell('Area map', renderAreaMapHtmlBody(areas), {
|
|
482
|
+
current: 'area-map',
|
|
483
|
+
description: 'Folders grouped by area kind with their boundary rules and risk scores.',
|
|
484
|
+
commandHints: ['shrk repo areas', 'shrk check boundaries --json'],
|
|
485
|
+
}));
|
|
486
|
+
// constructs.html
|
|
487
|
+
if (constructs.length === 0) {
|
|
488
|
+
write('constructs.html', shell('Constructs', `<h1>Constructs</h1>`, {
|
|
489
|
+
current: 'constructs',
|
|
490
|
+
description: 'No constructs registered yet.',
|
|
491
|
+
emptyState: {
|
|
492
|
+
title: 'Add constructs',
|
|
493
|
+
body: 'Define them in `sharkcraft/constructs.ts` with `defineConstruct({...})`, or run `shrk constructs infer --write-drafts` and review the drafts.',
|
|
494
|
+
},
|
|
495
|
+
commandHints: ['shrk constructs infer', 'shrk constructs adopt --write-patch'],
|
|
496
|
+
}));
|
|
497
|
+
placeholderPages.push('constructs');
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
let cb = `<h1>Constructs (${constructs.length})</h1>`;
|
|
501
|
+
cb += '<table><thead><tr><th>ID</th><th>Type</th><th>Title</th><th>Files</th><th>Public API</th><th>Source</th></tr></thead><tbody>';
|
|
502
|
+
for (const c of constructs) {
|
|
503
|
+
const fileLinks = (c.files ?? [])
|
|
504
|
+
.slice(0, 5)
|
|
505
|
+
.map((f) => `<code>${esc(f)}</code>`)
|
|
506
|
+
.join(', ');
|
|
507
|
+
const api = (c.publicApi ?? []).map((a) => `<code>${esc(a)}</code>`).join(', ');
|
|
508
|
+
cb += `<tr><td><code>${esc(c.id)}</code></td><td>${esc(c.type)}</td><td>${esc(c.title)}</td><td>${fileLinks || '<span class="muted">—</span>'}</td><td>${api || '<span class="muted">—</span>'}</td><td>${esc(c.source)}${c.packageName ? ` <span class="muted">(${esc(c.packageName)})</span>` : ''}</td></tr>`;
|
|
509
|
+
}
|
|
510
|
+
cb += '</tbody></table>';
|
|
511
|
+
cb += `<p class="muted">See also: <a href="area-map.html">area map</a>, <a href="impact.html">impact</a>.</p>`;
|
|
512
|
+
write('constructs.html', shell('Constructs', cb, {
|
|
513
|
+
current: 'constructs',
|
|
514
|
+
description: 'Constructs registered via local config or pack contributions.',
|
|
515
|
+
commandHints: ['shrk constructs list', 'shrk constructs trace <id>'],
|
|
516
|
+
}));
|
|
517
|
+
}
|
|
518
|
+
// Pack compat page (optional).
|
|
519
|
+
const wantPackCompat = !options.include || options.include.includes('pack-compat');
|
|
520
|
+
if (wantPackCompat) {
|
|
521
|
+
let body = '<h2>Pack compatibility</h2>';
|
|
522
|
+
if (options.packCompatFile && existsSync(options.packCompatFile)) {
|
|
523
|
+
try {
|
|
524
|
+
const compat = JSON.parse(readFileSync(options.packCompatFile, 'utf8'));
|
|
525
|
+
const sym = (compat.symbolCompat ?? {});
|
|
526
|
+
const escHtml = (s) => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
527
|
+
body += `<p class="muted">pack: <code>${escHtml(compat.pack ?? '(unknown)')}</code></p>`;
|
|
528
|
+
body += `<p class="muted">consumer root: <code>${escHtml(compat.consumerRoot ?? '(unspecified)')}</code></p>`;
|
|
529
|
+
body += '<table><tbody>';
|
|
530
|
+
body += `<tr><th>plugin-api source</th><td><code>${escHtml(sym.pluginApiSource ?? '(not found)')}</code></td></tr>`;
|
|
531
|
+
body += `<tr><th>plugin-api resolution</th><td>${escHtml(sym.pluginApiResolution ?? '')}</td></tr>`;
|
|
532
|
+
body += `<tr><th>source mode</th><td>${escHtml(sym.sourceMode ?? '')}</td></tr>`;
|
|
533
|
+
body += `<tr><th>confidence</th><td>${escHtml(sym.confidence ?? '')}</td></tr>`;
|
|
534
|
+
body += `<tr><th>files inspected</th><td>${(sym.filesInspected ?? []).length}</td></tr>`;
|
|
535
|
+
body += `<tr><th>available symbols</th><td>${(sym.availableSymbols ?? []).length}</td></tr>`;
|
|
536
|
+
body += `<tr><th>missing symbols</th><td>${(sym.missingSymbols ?? []).length}</td></tr>`;
|
|
537
|
+
body += '</tbody></table>';
|
|
538
|
+
if ((sym.missingSymbols ?? []).length > 0) {
|
|
539
|
+
body += '<h3>Missing symbols</h3><ul>';
|
|
540
|
+
for (const s of sym.missingSymbols ?? [])
|
|
541
|
+
body += `<li><code>${escHtml(s)}</code></li>`;
|
|
542
|
+
body += '</ul>';
|
|
543
|
+
}
|
|
544
|
+
if ((sym.findings ?? []).length > 0) {
|
|
545
|
+
body += '<h3>Findings</h3><table><thead><tr><th>symbol</th><th>status</th><th>files</th></tr></thead><tbody>';
|
|
546
|
+
for (const f of sym.findings ?? []) {
|
|
547
|
+
body += `<tr><td><code>${escHtml(f.symbol)}</code></td><td>${escHtml(f.status)}</td><td>${(f.files ?? []).length}</td></tr>`;
|
|
548
|
+
}
|
|
549
|
+
body += '</tbody></table>';
|
|
550
|
+
}
|
|
551
|
+
if ((sym.suggestions ?? []).length > 0) {
|
|
552
|
+
body += '<h3>Suggestions</h3><ul>';
|
|
553
|
+
for (const s of sym.suggestions ?? [])
|
|
554
|
+
body += `<li>${escHtml(s)}</li>`;
|
|
555
|
+
body += '</ul>';
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
catch (e) {
|
|
559
|
+
body += `<p class="muted">Could not parse <code>${e.message}</code></p>`;
|
|
560
|
+
placeholderPages.push('pack-compat');
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
body +=
|
|
565
|
+
'<p>Run <code>shrk packs compat <pack> --consumer-root <repo> --json > pack-compat.json</code> ' +
|
|
566
|
+
'then rebuild the report site with <code>--pack-compat pack-compat.json</code> to populate this page.</p>';
|
|
567
|
+
placeholderPages.push('pack-compat');
|
|
568
|
+
}
|
|
569
|
+
write('pack-compat.html', shell('Pack compatibility', body, {
|
|
570
|
+
current: 'pack-compat',
|
|
571
|
+
description: 'Pack symbol compatibility report.',
|
|
572
|
+
commandHints: ['shrk packs compat <pack> --consumer-root <repo> --json'],
|
|
573
|
+
}));
|
|
574
|
+
}
|
|
575
|
+
// Pages map for quick reference.
|
|
576
|
+
const pages = {};
|
|
577
|
+
for (const f of files) {
|
|
578
|
+
const rel = nodePath.basename(f);
|
|
579
|
+
if (rel.endsWith('.html')) {
|
|
580
|
+
const id = rel.replace(/\.html$/, '');
|
|
581
|
+
pages[id] = rel;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
outputDir,
|
|
586
|
+
files,
|
|
587
|
+
pages,
|
|
588
|
+
impactCount: impacts.length,
|
|
589
|
+
hasReview: Boolean(review),
|
|
590
|
+
placeholderPages,
|
|
591
|
+
...(impactGraphFiles.length > 0 ? { impactGraphFiles } : {}),
|
|
592
|
+
...(impactSvgFiles.length > 0 ? { impactSvgFiles } : {}),
|
|
593
|
+
...(impactRenderDiagnostics.length > 0 ? { impactRenderDiagnostics } : {}),
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
function renderAreaMapHtmlBody(map) {
|
|
597
|
+
const lines = [];
|
|
598
|
+
lines.push('<h1>Area map</h1>');
|
|
599
|
+
lines.push(`<p class="muted">${map.areas.length} areas · ${map.unclassifiedFiles} unclassified files</p>`);
|
|
600
|
+
lines.push('<table><thead><tr><th>Kind</th><th>Files</th><th>Paths</th><th>Boundary rules</th><th>Risk</th></tr></thead><tbody>');
|
|
601
|
+
for (const a of map.areas) {
|
|
602
|
+
lines.push(`<tr><td>${esc(a.kind)}</td><td>${a.fileCount}</td><td>${a.paths.map((p) => `<code>${esc(p)}</code>`).join(', ')}</td><td>${a.boundaryRuleIds.length}</td><td>${a.riskScore}</td></tr>`);
|
|
603
|
+
}
|
|
604
|
+
lines.push('</tbody></table>');
|
|
605
|
+
lines.push(`<details><summary>Markdown export</summary><pre>${esc(renderAreaMapMarkdown(map))}</pre></details>`);
|
|
606
|
+
return lines.join('\n');
|
|
607
|
+
}
|
|
608
|
+
export function buildReportSiteManifest(result, hasReview) {
|
|
609
|
+
const all = [
|
|
610
|
+
{ id: 'overview', file: 'index.html', title: 'Overview' },
|
|
611
|
+
{ id: 'quality', file: 'quality.html', title: 'Quality' },
|
|
612
|
+
{ id: 'bundles', file: 'bundles.html', title: 'Bundles' },
|
|
613
|
+
{ id: 'review', file: 'review.html', title: 'Review' },
|
|
614
|
+
{ id: 'impact', file: 'impact.html', title: 'Impact' },
|
|
615
|
+
{ id: 'coverage', file: 'coverage.html', title: 'Coverage' },
|
|
616
|
+
{ id: 'drift', file: 'drift.html', title: 'Drift' },
|
|
617
|
+
{ id: 'policies', file: 'policies.html', title: 'Policies' },
|
|
618
|
+
{ id: 'area-map', file: 'area-map.html', title: 'Area map' },
|
|
619
|
+
{ id: 'constructs', file: 'constructs.html', title: 'Constructs' },
|
|
620
|
+
];
|
|
621
|
+
const populatedKey = (id) => id === 'overview' ? 'index' : id;
|
|
622
|
+
const reviewPopulated = hasReview;
|
|
623
|
+
const impactPopulated = result.impactCount > 0;
|
|
624
|
+
const placeholderSet = new Set(result.placeholderPages);
|
|
625
|
+
const pages = all.map((p) => {
|
|
626
|
+
let populated = result.pages[populatedKey(p.id)] !== undefined;
|
|
627
|
+
if (p.id === 'review')
|
|
628
|
+
populated = reviewPopulated;
|
|
629
|
+
if (p.id === 'impact')
|
|
630
|
+
populated = impactPopulated;
|
|
631
|
+
if (placeholderSet.has(p.id))
|
|
632
|
+
populated = false;
|
|
633
|
+
return {
|
|
634
|
+
id: p.id,
|
|
635
|
+
file: p.file,
|
|
636
|
+
title: p.title,
|
|
637
|
+
kind: populated ? 'page' : 'placeholder',
|
|
638
|
+
populated,
|
|
639
|
+
};
|
|
640
|
+
});
|
|
641
|
+
const notes = [];
|
|
642
|
+
if (!reviewPopulated)
|
|
643
|
+
notes.push('review.html is a placeholder — re-run with --bundle or --review to populate.');
|
|
644
|
+
if (!impactPopulated)
|
|
645
|
+
notes.push('impact.html is a placeholder — re-run with --impact or --impact-dir to populate.');
|
|
646
|
+
if (placeholderSet.has('constructs'))
|
|
647
|
+
notes.push('constructs.html shows authoring guidance because no constructs are registered.');
|
|
648
|
+
if (result.impactGraphFiles && result.impactGraphFiles.length > 0) {
|
|
649
|
+
notes.push(`impact-graph artifacts embedded: ${result.impactGraphFiles.length} files (mermaid + dot).`);
|
|
650
|
+
}
|
|
651
|
+
return {
|
|
652
|
+
schema: 'sharkcraft.report-site-manifest/v1',
|
|
653
|
+
outputDir: result.outputDir,
|
|
654
|
+
generatedAt: new Date().toISOString(),
|
|
655
|
+
pages,
|
|
656
|
+
notes,
|
|
657
|
+
};
|
|
658
|
+
}
|