spectra-cli 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +350 -0
- package/dist/adapters/go-adapter.d.ts +38 -0
- package/dist/adapters/go-adapter.d.ts.map +1 -0
- package/dist/adapters/go-adapter.js +58 -0
- package/dist/adapters/go-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +21 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +36 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/java-adapter.d.ts +39 -0
- package/dist/adapters/java-adapter.d.ts.map +1 -0
- package/dist/adapters/java-adapter.js +65 -0
- package/dist/adapters/java-adapter.js.map +1 -0
- package/dist/adapters/language-adapter-registry.d.ts +56 -0
- package/dist/adapters/language-adapter-registry.d.ts.map +1 -0
- package/dist/adapters/language-adapter-registry.js +110 -0
- package/dist/adapters/language-adapter-registry.js.map +1 -0
- package/dist/adapters/language-adapter.d.ts +127 -0
- package/dist/adapters/language-adapter.d.ts.map +1 -0
- package/dist/adapters/language-adapter.js +2 -0
- package/dist/adapters/language-adapter.js.map +1 -0
- package/dist/adapters/python-adapter.d.ts +61 -0
- package/dist/adapters/python-adapter.d.ts.map +1 -0
- package/dist/adapters/python-adapter.js +260 -0
- package/dist/adapters/python-adapter.js.map +1 -0
- package/dist/adapters/tree-sitter-comment-extractor.d.ts +15 -0
- package/dist/adapters/tree-sitter-comment-extractor.d.ts.map +1 -0
- package/dist/adapters/tree-sitter-comment-extractor.js +105 -0
- package/dist/adapters/tree-sitter-comment-extractor.js.map +1 -0
- package/dist/adapters/ts-js-adapter.d.ts +38 -0
- package/dist/adapters/ts-js-adapter.d.ts.map +1 -0
- package/dist/adapters/ts-js-adapter.js +164 -0
- package/dist/adapters/ts-js-adapter.js.map +1 -0
- package/dist/auth/auth-detector.d.ts +41 -0
- package/dist/auth/auth-detector.d.ts.map +1 -0
- package/dist/auth/auth-detector.js +324 -0
- package/dist/auth/auth-detector.js.map +1 -0
- package/dist/auth/cli-proxy.d.ts +35 -0
- package/dist/auth/cli-proxy.d.ts.map +1 -0
- package/dist/auth/cli-proxy.js +225 -0
- package/dist/auth/cli-proxy.js.map +1 -0
- package/dist/auth/codex-proxy.d.ts +22 -0
- package/dist/auth/codex-proxy.d.ts.map +1 -0
- package/dist/auth/codex-proxy.js +199 -0
- package/dist/auth/codex-proxy.js.map +1 -0
- package/dist/batch/batch-orchestrator.d.ts +214 -0
- package/dist/batch/batch-orchestrator.d.ts.map +1 -0
- package/dist/batch/batch-orchestrator.js +1552 -0
- package/dist/batch/batch-orchestrator.js.map +1 -0
- package/dist/batch/batch-readme-generator.d.ts +32 -0
- package/dist/batch/batch-readme-generator.d.ts.map +1 -0
- package/dist/batch/batch-readme-generator.js +153 -0
- package/dist/batch/batch-readme-generator.js.map +1 -0
- package/dist/batch/budget-gate.d.ts +107 -0
- package/dist/batch/budget-gate.d.ts.map +1 -0
- package/dist/batch/budget-gate.js +279 -0
- package/dist/batch/budget-gate.js.map +1 -0
- package/dist/batch/checkpoint.d.ts +25 -0
- package/dist/batch/checkpoint.d.ts.map +1 -0
- package/dist/batch/checkpoint.js +68 -0
- package/dist/batch/checkpoint.js.map +1 -0
- package/dist/batch/cost-summary.d.ts +78 -0
- package/dist/batch/cost-summary.d.ts.map +1 -0
- package/dist/batch/cost-summary.js +191 -0
- package/dist/batch/cost-summary.js.map +1 -0
- package/dist/batch/delta-regenerator.d.ts +41 -0
- package/dist/batch/delta-regenerator.d.ts.map +1 -0
- package/dist/batch/delta-regenerator.js +267 -0
- package/dist/batch/delta-regenerator.js.map +1 -0
- package/dist/batch/directory-classifier.d.ts +79 -0
- package/dist/batch/directory-classifier.d.ts.map +1 -0
- package/dist/batch/directory-classifier.js +270 -0
- package/dist/batch/directory-classifier.js.map +1 -0
- package/dist/batch/language-grouper.d.ts +28 -0
- package/dist/batch/language-grouper.d.ts.map +1 -0
- package/dist/batch/language-grouper.js +67 -0
- package/dist/batch/language-grouper.js.map +1 -0
- package/dist/batch/model-override-decision.d.ts +27 -0
- package/dist/batch/model-override-decision.d.ts.map +1 -0
- package/dist/batch/model-override-decision.js +14 -0
- package/dist/batch/model-override-decision.js.map +1 -0
- package/dist/batch/module-grouper.d.ts +59 -0
- package/dist/batch/module-grouper.d.ts.map +1 -0
- package/dist/batch/module-grouper.js +286 -0
- package/dist/batch/module-grouper.js.map +1 -0
- package/dist/batch/progress-reporter.d.ts +68 -0
- package/dist/batch/progress-reporter.d.ts.map +1 -0
- package/dist/batch/progress-reporter.js +273 -0
- package/dist/batch/progress-reporter.js.map +1 -0
- package/dist/batch/readme-graph-section.d.ts +53 -0
- package/dist/batch/readme-graph-section.d.ts.map +1 -0
- package/dist/batch/readme-graph-section.js +183 -0
- package/dist/batch/readme-graph-section.js.map +1 -0
- package/dist/cli/commands/auth-status.d.ts +10 -0
- package/dist/cli/commands/auth-status.d.ts.map +1 -0
- package/dist/cli/commands/auth-status.js +50 -0
- package/dist/cli/commands/auth-status.js.map +1 -0
- package/dist/cli/commands/batch.d.ts +10 -0
- package/dist/cli/commands/batch.d.ts.map +1 -0
- package/dist/cli/commands/batch.js +133 -0
- package/dist/cli/commands/batch.js.map +1 -0
- package/dist/cli/commands/cache.d.ts +13 -0
- package/dist/cli/commands/cache.d.ts.map +1 -0
- package/dist/cli/commands/cache.js +65 -0
- package/dist/cli/commands/cache.js.map +1 -0
- package/dist/cli/commands/community.d.ts +10 -0
- package/dist/cli/commands/community.d.ts.map +1 -0
- package/dist/cli/commands/community.js +92 -0
- package/dist/cli/commands/community.js.map +1 -0
- package/dist/cli/commands/diff.d.ts +10 -0
- package/dist/cli/commands/diff.d.ts.map +1 -0
- package/dist/cli/commands/diff.js +49 -0
- package/dist/cli/commands/diff.js.map +1 -0
- package/dist/cli/commands/direction-audit.d.ts +12 -0
- package/dist/cli/commands/direction-audit.d.ts.map +1 -0
- package/dist/cli/commands/direction-audit.js +458 -0
- package/dist/cli/commands/direction-audit.js.map +1 -0
- package/dist/cli/commands/export.d.ts +22 -0
- package/dist/cli/commands/export.d.ts.map +1 -0
- package/dist/cli/commands/export.js +123 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +10 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +50 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/graph.d.ts +20 -0
- package/dist/cli/commands/graph.d.ts.map +1 -0
- package/dist/cli/commands/graph.js +189 -0
- package/dist/cli/commands/graph.js.map +1 -0
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +33 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/install.d.ts +11 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +52 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/mcp-server.d.ts +23 -0
- package/dist/cli/commands/mcp-server.d.ts.map +1 -0
- package/dist/cli/commands/mcp-server.js +90 -0
- package/dist/cli/commands/mcp-server.js.map +1 -0
- package/dist/cli/commands/panoramic.d.ts +7 -0
- package/dist/cli/commands/panoramic.d.ts.map +1 -0
- package/dist/cli/commands/panoramic.js +43 -0
- package/dist/cli/commands/panoramic.js.map +1 -0
- package/dist/cli/commands/prepare.d.ts +13 -0
- package/dist/cli/commands/prepare.d.ts.map +1 -0
- package/dist/cli/commands/prepare.js +148 -0
- package/dist/cli/commands/prepare.js.map +1 -0
- package/dist/cli/commands/query.d.ts +13 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +116 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +16 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +188 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +193 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/error-handler.d.ts +41 -0
- package/dist/cli/utils/error-handler.d.ts.map +1 -0
- package/dist/cli/utils/error-handler.js +90 -0
- package/dist/cli/utils/error-handler.js.map +1 -0
- package/dist/cli/utils/parse-args.d.ts +111 -0
- package/dist/cli/utils/parse-args.d.ts.map +1 -0
- package/dist/cli/utils/parse-args.js +756 -0
- package/dist/cli/utils/parse-args.js.map +1 -0
- package/dist/config/project-config.d.ts +49 -0
- package/dist/config/project-config.d.ts.map +1 -0
- package/dist/config/project-config.js +118 -0
- package/dist/config/project-config.js.map +1 -0
- package/dist/config/spec-driver-config.d.ts +32 -0
- package/dist/config/spec-driver-config.d.ts.map +1 -0
- package/dist/config/spec-driver-config.js +91 -0
- package/dist/config/spec-driver-config.js.map +1 -0
- package/dist/core/ast-analyzer.d.ts +49 -0
- package/dist/core/ast-analyzer.d.ts.map +1 -0
- package/dist/core/ast-analyzer.js +439 -0
- package/dist/core/ast-analyzer.js.map +1 -0
- package/dist/core/code-slice-extractor.d.ts +47 -0
- package/dist/core/code-slice-extractor.d.ts.map +1 -0
- package/dist/core/code-slice-extractor.js +227 -0
- package/dist/core/code-slice-extractor.js.map +1 -0
- package/dist/core/context-assembler.d.ts +80 -0
- package/dist/core/context-assembler.d.ts.map +1 -0
- package/dist/core/context-assembler.js +262 -0
- package/dist/core/context-assembler.js.map +1 -0
- package/dist/core/grammar-manager.d.ts +79 -0
- package/dist/core/grammar-manager.d.ts.map +1 -0
- package/dist/core/grammar-manager.js +188 -0
- package/dist/core/grammar-manager.js.map +1 -0
- package/dist/core/llm-client.d.ts +120 -0
- package/dist/core/llm-client.d.ts.map +1 -0
- package/dist/core/llm-client.js +608 -0
- package/dist/core/llm-client.js.map +1 -0
- package/dist/core/model-selection.d.ts +50 -0
- package/dist/core/model-selection.d.ts.map +1 -0
- package/dist/core/model-selection.js +410 -0
- package/dist/core/model-selection.js.map +1 -0
- package/dist/core/query-mappers/base-mapper.d.ts +22 -0
- package/dist/core/query-mappers/base-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/base-mapper.js +2 -0
- package/dist/core/query-mappers/base-mapper.js.map +1 -0
- package/dist/core/query-mappers/go-mapper.d.ts +46 -0
- package/dist/core/query-mappers/go-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/go-mapper.js +477 -0
- package/dist/core/query-mappers/go-mapper.js.map +1 -0
- package/dist/core/query-mappers/index.d.ts +6 -0
- package/dist/core/query-mappers/index.d.ts.map +1 -0
- package/dist/core/query-mappers/index.js +5 -0
- package/dist/core/query-mappers/index.js.map +1 -0
- package/dist/core/query-mappers/java-mapper.d.ts +40 -0
- package/dist/core/query-mappers/java-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/java-mapper.js +405 -0
- package/dist/core/query-mappers/java-mapper.js.map +1 -0
- package/dist/core/query-mappers/python-mapper.d.ts +65 -0
- package/dist/core/query-mappers/python-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/python-mapper.js +673 -0
- package/dist/core/query-mappers/python-mapper.js.map +1 -0
- package/dist/core/query-mappers/typescript-mapper.d.ts +54 -0
- package/dist/core/query-mappers/typescript-mapper.d.ts.map +1 -0
- package/dist/core/query-mappers/typescript-mapper.js +706 -0
- package/dist/core/query-mappers/typescript-mapper.js.map +1 -0
- package/dist/core/secret-redactor.d.ts +10 -0
- package/dist/core/secret-redactor.d.ts.map +1 -0
- package/dist/core/secret-redactor.js +208 -0
- package/dist/core/secret-redactor.js.map +1 -0
- package/dist/core/single-spec-orchestrator.d.ts +103 -0
- package/dist/core/single-spec-orchestrator.d.ts.map +1 -0
- package/dist/core/single-spec-orchestrator.js +911 -0
- package/dist/core/single-spec-orchestrator.js.map +1 -0
- package/dist/core/token-counter.d.ts +48 -0
- package/dist/core/token-counter.d.ts.map +1 -0
- package/dist/core/token-counter.js +136 -0
- package/dist/core/token-counter.js.map +1 -0
- package/dist/core/tree-sitter-analyzer.d.ts +62 -0
- package/dist/core/tree-sitter-analyzer.d.ts.map +1 -0
- package/dist/core/tree-sitter-analyzer.js +229 -0
- package/dist/core/tree-sitter-analyzer.js.map +1 -0
- package/dist/core/tree-sitter-fallback.d.ts +14 -0
- package/dist/core/tree-sitter-fallback.d.ts.map +1 -0
- package/dist/core/tree-sitter-fallback.js +423 -0
- package/dist/core/tree-sitter-fallback.js.map +1 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts +22 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.js +107 -0
- package/dist/debt-scanner/aggregator/quality-report-patcher.js.map +1 -0
- package/dist/debt-scanner/aggregator/readme-indexer.d.ts +6 -0
- package/dist/debt-scanner/aggregator/readme-indexer.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/readme-indexer.js +52 -0
- package/dist/debt-scanner/aggregator/readme-indexer.js.map +1 -0
- package/dist/debt-scanner/aggregator/report-builder.d.ts +25 -0
- package/dist/debt-scanner/aggregator/report-builder.d.ts.map +1 -0
- package/dist/debt-scanner/aggregator/report-builder.js +162 -0
- package/dist/debt-scanner/aggregator/report-builder.js.map +1 -0
- package/dist/debt-scanner/comments/debt-classifier.d.ts +28 -0
- package/dist/debt-scanner/comments/debt-classifier.d.ts.map +1 -0
- package/dist/debt-scanner/comments/debt-classifier.js +50 -0
- package/dist/debt-scanner/comments/debt-classifier.js.map +1 -0
- package/dist/debt-scanner/comments/index.d.ts +32 -0
- package/dist/debt-scanner/comments/index.d.ts.map +1 -0
- package/dist/debt-scanner/comments/index.js +103 -0
- package/dist/debt-scanner/comments/index.js.map +1 -0
- package/dist/debt-scanner/comments/symbol-resolver.d.ts +18 -0
- package/dist/debt-scanner/comments/symbol-resolver.d.ts.map +1 -0
- package/dist/debt-scanner/comments/symbol-resolver.js +18 -0
- package/dist/debt-scanner/comments/symbol-resolver.js.map +1 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.d.ts +6 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.js +62 -0
- package/dist/debt-scanner/design-docs/doc-discoverer.js.map +1 -0
- package/dist/debt-scanner/design-docs/index.d.ts +28 -0
- package/dist/debt-scanner/design-docs/index.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/index.js +60 -0
- package/dist/debt-scanner/design-docs/index.js.map +1 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts +68 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.js +151 -0
- package/dist/debt-scanner/design-docs/llm-topic-inferrer.js.map +1 -0
- package/dist/debt-scanner/design-docs/markdown-sections.d.ts +24 -0
- package/dist/debt-scanner/design-docs/markdown-sections.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/markdown-sections.js +92 -0
- package/dist/debt-scanner/design-docs/markdown-sections.js.map +1 -0
- package/dist/debt-scanner/design-docs/rule-detector.d.ts +18 -0
- package/dist/debt-scanner/design-docs/rule-detector.d.ts.map +1 -0
- package/dist/debt-scanner/design-docs/rule-detector.js +46 -0
- package/dist/debt-scanner/design-docs/rule-detector.js.map +1 -0
- package/dist/debt-scanner/index.d.ts +43 -0
- package/dist/debt-scanner/index.d.ts.map +1 -0
- package/dist/debt-scanner/index.js +177 -0
- package/dist/debt-scanner/index.js.map +1 -0
- package/dist/debt-scanner/llm-clients.d.ts +33 -0
- package/dist/debt-scanner/llm-clients.d.ts.map +1 -0
- package/dist/debt-scanner/llm-clients.js +78 -0
- package/dist/debt-scanner/llm-clients.js.map +1 -0
- package/dist/debt-scanner/types.d.ts +97 -0
- package/dist/debt-scanner/types.d.ts.map +1 -0
- package/dist/debt-scanner/types.js +7 -0
- package/dist/debt-scanner/types.js.map +1 -0
- package/dist/diff/drift-orchestrator.d.ts +25 -0
- package/dist/diff/drift-orchestrator.d.ts.map +1 -0
- package/dist/diff/drift-orchestrator.js +248 -0
- package/dist/diff/drift-orchestrator.js.map +1 -0
- package/dist/diff/noise-filter.d.ts +27 -0
- package/dist/diff/noise-filter.d.ts.map +1 -0
- package/dist/diff/noise-filter.js +129 -0
- package/dist/diff/noise-filter.js.map +1 -0
- package/dist/diff/semantic-diff.d.ts +12 -0
- package/dist/diff/semantic-diff.d.ts.map +1 -0
- package/dist/diff/semantic-diff.js +94 -0
- package/dist/diff/semantic-diff.js.map +1 -0
- package/dist/diff/structural-diff.d.ts +16 -0
- package/dist/diff/structural-diff.d.ts.map +1 -0
- package/dist/diff/structural-diff.js +171 -0
- package/dist/diff/structural-diff.js.map +1 -0
- package/dist/extraction/artifact-classifier.d.ts +19 -0
- package/dist/extraction/artifact-classifier.d.ts.map +1 -0
- package/dist/extraction/artifact-classifier.js +104 -0
- package/dist/extraction/artifact-classifier.js.map +1 -0
- package/dist/extraction/extraction-cache.d.ts +32 -0
- package/dist/extraction/extraction-cache.d.ts.map +1 -0
- package/dist/extraction/extraction-cache.js +117 -0
- package/dist/extraction/extraction-cache.js.map +1 -0
- package/dist/extraction/extraction-pipeline.d.ts +44 -0
- package/dist/extraction/extraction-pipeline.d.ts.map +1 -0
- package/dist/extraction/extraction-pipeline.js +286 -0
- package/dist/extraction/extraction-pipeline.js.map +1 -0
- package/dist/extraction/extraction-types.d.ts +180 -0
- package/dist/extraction/extraction-types.d.ts.map +1 -0
- package/dist/extraction/extraction-types.js +63 -0
- package/dist/extraction/extraction-types.js.map +1 -0
- package/dist/extraction/image-extractor.d.ts +21 -0
- package/dist/extraction/image-extractor.d.ts.map +1 -0
- package/dist/extraction/image-extractor.js +211 -0
- package/dist/extraction/image-extractor.js.map +1 -0
- package/dist/extraction/index.d.ts +8 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +6 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/markdown-extractor.d.ts +11 -0
- package/dist/extraction/markdown-extractor.d.ts.map +1 -0
- package/dist/extraction/markdown-extractor.js +212 -0
- package/dist/extraction/markdown-extractor.js.map +1 -0
- package/dist/extraction/openapi-extractor.d.ts +10 -0
- package/dist/extraction/openapi-extractor.d.ts.map +1 -0
- package/dist/extraction/openapi-extractor.js +449 -0
- package/dist/extraction/openapi-extractor.js.map +1 -0
- package/dist/generator/frontmatter.d.ts +58 -0
- package/dist/generator/frontmatter.d.ts.map +1 -0
- package/dist/generator/frontmatter.js +100 -0
- package/dist/generator/frontmatter.js.map +1 -0
- package/dist/generator/index-generator.d.ts +27 -0
- package/dist/generator/index-generator.d.ts.map +1 -0
- package/dist/generator/index-generator.js +129 -0
- package/dist/generator/index-generator.js.map +1 -0
- package/dist/generator/mermaid-class-diagram.d.ts +14 -0
- package/dist/generator/mermaid-class-diagram.d.ts.map +1 -0
- package/dist/generator/mermaid-class-diagram.js +115 -0
- package/dist/generator/mermaid-class-diagram.js.map +1 -0
- package/dist/generator/mermaid-dependency-graph.d.ts +15 -0
- package/dist/generator/mermaid-dependency-graph.d.ts.map +1 -0
- package/dist/generator/mermaid-dependency-graph.js +84 -0
- package/dist/generator/mermaid-dependency-graph.js.map +1 -0
- package/dist/generator/spec-renderer.d.ts +24 -0
- package/dist/generator/spec-renderer.d.ts.map +1 -0
- package/dist/generator/spec-renderer.js +110 -0
- package/dist/generator/spec-renderer.js.map +1 -0
- package/dist/graph/dependency-graph.d.ts +24 -0
- package/dist/graph/dependency-graph.d.ts.map +1 -0
- package/dist/graph/dependency-graph.js +206 -0
- package/dist/graph/dependency-graph.js.map +1 -0
- package/dist/graph/directory-graph.d.ts +16 -0
- package/dist/graph/directory-graph.d.ts.map +1 -0
- package/dist/graph/directory-graph.js +281 -0
- package/dist/graph/directory-graph.js.map +1 -0
- package/dist/graph/mermaid-renderer.d.ts +22 -0
- package/dist/graph/mermaid-renderer.d.ts.map +1 -0
- package/dist/graph/mermaid-renderer.js +133 -0
- package/dist/graph/mermaid-renderer.js.map +1 -0
- package/dist/graph/topological-sort.d.ts +31 -0
- package/dist/graph/topological-sort.d.ts.map +1 -0
- package/dist/graph/topological-sort.js +167 -0
- package/dist/graph/topological-sort.js.map +1 -0
- package/dist/hooks/git-hook-installer.d.ts +37 -0
- package/dist/hooks/git-hook-installer.d.ts.map +1 -0
- package/dist/hooks/git-hook-installer.js +136 -0
- package/dist/hooks/git-hook-installer.js.map +1 -0
- package/dist/hooks/hook-installer.d.ts +39 -0
- package/dist/hooks/hook-installer.d.ts.map +1 -0
- package/dist/hooks/hook-installer.js +164 -0
- package/dist/hooks/hook-installer.js.map +1 -0
- package/dist/installer/skill-installer.d.ts +63 -0
- package/dist/installer/skill-installer.d.ts.map +1 -0
- package/dist/installer/skill-installer.js +203 -0
- package/dist/installer/skill-installer.js.map +1 -0
- package/dist/installer/skill-templates.d.ts +19 -0
- package/dist/installer/skill-templates.d.ts.map +1 -0
- package/dist/installer/skill-templates.js +42 -0
- package/dist/installer/skill-templates.js.map +1 -0
- package/dist/mcp/graph-tools.d.ts +17 -0
- package/dist/mcp/graph-tools.d.ts.map +1 -0
- package/dist/mcp/graph-tools.js +269 -0
- package/dist/mcp/graph-tools.js.map +1 -0
- package/dist/mcp/index.d.ts +10 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +18 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +10 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +235 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/models/code-skeleton.d.ts +394 -0
- package/dist/models/code-skeleton.d.ts.map +1 -0
- package/dist/models/code-skeleton.js +119 -0
- package/dist/models/code-skeleton.js.map +1 -0
- package/dist/models/dependency-graph.d.ts +172 -0
- package/dist/models/dependency-graph.d.ts.map +1 -0
- package/dist/models/dependency-graph.js +44 -0
- package/dist/models/dependency-graph.js.map +1 -0
- package/dist/models/drift-item.d.ts +104 -0
- package/dist/models/drift-item.d.ts.map +1 -0
- package/dist/models/drift-item.js +38 -0
- package/dist/models/drift-item.js.map +1 -0
- package/dist/models/module-spec.d.ts +1905 -0
- package/dist/models/module-spec.d.ts.map +1 -0
- package/dist/models/module-spec.js +272 -0
- package/dist/models/module-spec.js.map +1 -0
- package/dist/panoramic/abstract-registry.d.ts +87 -0
- package/dist/panoramic/abstract-registry.d.ts.map +1 -0
- package/dist/panoramic/abstract-registry.js +88 -0
- package/dist/panoramic/abstract-registry.js.map +1 -0
- package/dist/panoramic/anchoring/chunker.d.ts +34 -0
- package/dist/panoramic/anchoring/chunker.d.ts.map +1 -0
- package/dist/panoramic/anchoring/chunker.js +274 -0
- package/dist/panoramic/anchoring/chunker.js.map +1 -0
- package/dist/panoramic/anchoring/edge-builder.d.ts +53 -0
- package/dist/panoramic/anchoring/edge-builder.d.ts.map +1 -0
- package/dist/panoramic/anchoring/edge-builder.js +183 -0
- package/dist/panoramic/anchoring/edge-builder.js.map +1 -0
- package/dist/panoramic/anchoring/embedding-provider.d.ts +51 -0
- package/dist/panoramic/anchoring/embedding-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/embedding-provider.js +7 -0
- package/dist/panoramic/anchoring/embedding-provider.js.map +1 -0
- package/dist/panoramic/anchoring/index.d.ts +73 -0
- package/dist/panoramic/anchoring/index.d.ts.map +1 -0
- package/dist/panoramic/anchoring/index.js +91 -0
- package/dist/panoramic/anchoring/index.js.map +1 -0
- package/dist/panoramic/anchoring/providers/factory.d.ts +35 -0
- package/dist/panoramic/anchoring/providers/factory.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/factory.js +33 -0
- package/dist/panoramic/anchoring/providers/factory.js.map +1 -0
- package/dist/panoramic/anchoring/providers/local-provider.d.ts +48 -0
- package/dist/panoramic/anchoring/providers/local-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/local-provider.js +145 -0
- package/dist/panoramic/anchoring/providers/local-provider.js.map +1 -0
- package/dist/panoramic/anchoring/providers/openai-provider.d.ts +45 -0
- package/dist/panoramic/anchoring/providers/openai-provider.d.ts.map +1 -0
- package/dist/panoramic/anchoring/providers/openai-provider.js +78 -0
- package/dist/panoramic/anchoring/providers/openai-provider.js.map +1 -0
- package/dist/panoramic/anchoring/similarity.d.ts +37 -0
- package/dist/panoramic/anchoring/similarity.d.ts.map +1 -0
- package/dist/panoramic/anchoring/similarity.js +75 -0
- package/dist/panoramic/anchoring/similarity.js.map +1 -0
- package/dist/panoramic/api-surface/endpoint-utils.d.ts +15 -0
- package/dist/panoramic/api-surface/endpoint-utils.d.ts.map +1 -0
- package/dist/panoramic/api-surface/endpoint-utils.js +145 -0
- package/dist/panoramic/api-surface/endpoint-utils.js.map +1 -0
- package/dist/panoramic/api-surface/express-extractor.d.ts +3 -0
- package/dist/panoramic/api-surface/express-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/express-extractor.js +288 -0
- package/dist/panoramic/api-surface/express-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/fastapi-extractor.d.ts +6 -0
- package/dist/panoramic/api-surface/fastapi-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/fastapi-extractor.js +287 -0
- package/dist/panoramic/api-surface/fastapi-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/framework-introspection.d.ts +3 -0
- package/dist/panoramic/api-surface/framework-introspection.d.ts.map +1 -0
- package/dist/panoramic/api-surface/framework-introspection.js +189 -0
- package/dist/panoramic/api-surface/framework-introspection.js.map +1 -0
- package/dist/panoramic/api-surface/index.d.ts +13 -0
- package/dist/panoramic/api-surface/index.d.ts.map +1 -0
- package/dist/panoramic/api-surface/index.js +238 -0
- package/dist/panoramic/api-surface/index.js.map +1 -0
- package/dist/panoramic/api-surface/openapi-extractor.d.ts +3 -0
- package/dist/panoramic/api-surface/openapi-extractor.d.ts.map +1 -0
- package/dist/panoramic/api-surface/openapi-extractor.js +247 -0
- package/dist/panoramic/api-surface/openapi-extractor.js.map +1 -0
- package/dist/panoramic/api-surface/types.d.ts +140 -0
- package/dist/panoramic/api-surface/types.d.ts.map +1 -0
- package/dist/panoramic/api-surface/types.js +7 -0
- package/dist/panoramic/api-surface/types.js.map +1 -0
- package/dist/panoramic/api-surface/utils.d.ts +29 -0
- package/dist/panoramic/api-surface/utils.d.ts.map +1 -0
- package/dist/panoramic/api-surface/utils.js +340 -0
- package/dist/panoramic/api-surface/utils.js.map +1 -0
- package/dist/panoramic/batch-project-docs.d.ts +101 -0
- package/dist/panoramic/batch-project-docs.d.ts.map +1 -0
- package/dist/panoramic/batch-project-docs.js +616 -0
- package/dist/panoramic/batch-project-docs.js.map +1 -0
- package/dist/panoramic/builders/architecture-ir-builder.d.ts +19 -0
- package/dist/panoramic/builders/architecture-ir-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/architecture-ir-builder.js +561 -0
- package/dist/panoramic/builders/architecture-ir-builder.js.map +1 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts +6 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts.map +1 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js +98 -0
- package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js.map +1 -0
- package/dist/panoramic/builders/component-view-builder.d.ts +38 -0
- package/dist/panoramic/builders/component-view-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/component-view-builder.js +694 -0
- package/dist/panoramic/builders/component-view-builder.js.map +1 -0
- package/dist/panoramic/builders/doc-graph-builder.d.ts +179 -0
- package/dist/panoramic/builders/doc-graph-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/doc-graph-builder.js +546 -0
- package/dist/panoramic/builders/doc-graph-builder.js.map +1 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts +38 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts.map +1 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.js +361 -0
- package/dist/panoramic/builders/dynamic-scenarios-builder.js.map +1 -0
- package/dist/panoramic/cache/cache-key-builder.d.ts +25 -0
- package/dist/panoramic/cache/cache-key-builder.d.ts.map +1 -0
- package/dist/panoramic/cache/cache-key-builder.js +119 -0
- package/dist/panoramic/cache/cache-key-builder.js.map +1 -0
- package/dist/panoramic/cache/cache-manager.d.ts +58 -0
- package/dist/panoramic/cache/cache-manager.d.ts.map +1 -0
- package/dist/panoramic/cache/cache-manager.js +170 -0
- package/dist/panoramic/cache/cache-manager.js.map +1 -0
- package/dist/panoramic/cache/content-hasher.d.ts +47 -0
- package/dist/panoramic/cache/content-hasher.d.ts.map +1 -0
- package/dist/panoramic/cache/content-hasher.js +89 -0
- package/dist/panoramic/cache/content-hasher.js.map +1 -0
- package/dist/panoramic/cache/index.d.ts +10 -0
- package/dist/panoramic/cache/index.d.ts.map +1 -0
- package/dist/panoramic/cache/index.js +13 -0
- package/dist/panoramic/cache/index.js.map +1 -0
- package/dist/panoramic/cache/manifest-manager.d.ts +83 -0
- package/dist/panoramic/cache/manifest-manager.d.ts.map +1 -0
- package/dist/panoramic/cache/manifest-manager.js +119 -0
- package/dist/panoramic/cache/manifest-manager.js.map +1 -0
- package/dist/panoramic/cache/schemas.d.ts +199 -0
- package/dist/panoramic/cache/schemas.d.ts.map +1 -0
- package/dist/panoramic/cache/schemas.js +53 -0
- package/dist/panoramic/cache/schemas.js.map +1 -0
- package/dist/panoramic/cluster-orchestrator.d.ts +278 -0
- package/dist/panoramic/cluster-orchestrator.d.ts.map +1 -0
- package/dist/panoramic/cluster-orchestrator.js +531 -0
- package/dist/panoramic/cluster-orchestrator.js.map +1 -0
- package/dist/panoramic/community/community-detector.d.ts +41 -0
- package/dist/panoramic/community/community-detector.d.ts.map +1 -0
- package/dist/panoramic/community/community-detector.js +190 -0
- package/dist/panoramic/community/community-detector.js.map +1 -0
- package/dist/panoramic/community/god-node-analyzer.d.ts +28 -0
- package/dist/panoramic/community/god-node-analyzer.d.ts.map +1 -0
- package/dist/panoramic/community/god-node-analyzer.js +91 -0
- package/dist/panoramic/community/god-node-analyzer.js.map +1 -0
- package/dist/panoramic/community/graph-report-generator.d.ts +31 -0
- package/dist/panoramic/community/graph-report-generator.d.ts.map +1 -0
- package/dist/panoramic/community/graph-report-generator.js +98 -0
- package/dist/panoramic/community/graph-report-generator.js.map +1 -0
- package/dist/panoramic/community/index.d.ts +31 -0
- package/dist/panoramic/community/index.d.ts.map +1 -0
- package/dist/panoramic/community/index.js +63 -0
- package/dist/panoramic/community/index.js.map +1 -0
- package/dist/panoramic/community/surprising-edges.d.ts +42 -0
- package/dist/panoramic/community/surprising-edges.d.ts.map +1 -0
- package/dist/panoramic/community/surprising-edges.js +154 -0
- package/dist/panoramic/community/surprising-edges.js.map +1 -0
- package/dist/panoramic/cross-reference-index.d.ts +4 -0
- package/dist/panoramic/cross-reference-index.d.ts.map +1 -0
- package/dist/panoramic/cross-reference-index.js +201 -0
- package/dist/panoramic/cross-reference-index.js.map +1 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.d.ts +7 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.d.ts.map +1 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.js +183 -0
- package/dist/panoramic/exporters/architecture-ir-exporters.js.map +1 -0
- package/dist/panoramic/exporters/export-types.d.ts +33 -0
- package/dist/panoramic/exporters/export-types.d.ts.map +1 -0
- package/dist/panoramic/exporters/export-types.js +7 -0
- package/dist/panoramic/exporters/export-types.js.map +1 -0
- package/dist/panoramic/exporters/html-exporter.d.ts +83 -0
- package/dist/panoramic/exporters/html-exporter.d.ts.map +1 -0
- package/dist/panoramic/exporters/html-exporter.js +224 -0
- package/dist/panoramic/exporters/html-exporter.js.map +1 -0
- package/dist/panoramic/exporters/html-template.d.ts +32 -0
- package/dist/panoramic/exporters/html-template.d.ts.map +1 -0
- package/dist/panoramic/exporters/html-template.js +737 -0
- package/dist/panoramic/exporters/html-template.js.map +1 -0
- package/dist/panoramic/exporters/obsidian-exporter.d.ts +67 -0
- package/dist/panoramic/exporters/obsidian-exporter.d.ts.map +1 -0
- package/dist/panoramic/exporters/obsidian-exporter.js +333 -0
- package/dist/panoramic/exporters/obsidian-exporter.js.map +1 -0
- package/dist/panoramic/generator-registry.d.ts +86 -0
- package/dist/panoramic/generator-registry.d.ts.map +1 -0
- package/dist/panoramic/generator-registry.js +194 -0
- package/dist/panoramic/generator-registry.js.map +1 -0
- package/dist/panoramic/generators/architecture-ir-generator.d.ts +36 -0
- package/dist/panoramic/generators/architecture-ir-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/architecture-ir-generator.js +51 -0
- package/dist/panoramic/generators/architecture-ir-generator.js.map +1 -0
- package/dist/panoramic/generators/architecture-overview-generator.d.ts +31 -0
- package/dist/panoramic/generators/architecture-overview-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/architecture-overview-generator.js +454 -0
- package/dist/panoramic/generators/architecture-overview-generator.js.map +1 -0
- package/dist/panoramic/generators/config-reference-generator.d.ts +78 -0
- package/dist/panoramic/generators/config-reference-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/config-reference-generator.js +201 -0
- package/dist/panoramic/generators/config-reference-generator.js.map +1 -0
- package/dist/panoramic/generators/cross-package-analyzer.d.ts +112 -0
- package/dist/panoramic/generators/cross-package-analyzer.d.ts.map +1 -0
- package/dist/panoramic/generators/cross-package-analyzer.js +258 -0
- package/dist/panoramic/generators/cross-package-analyzer.js.map +1 -0
- package/dist/panoramic/generators/data-model-generator.d.ts +528 -0
- package/dist/panoramic/generators/data-model-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/data-model-generator.js +674 -0
- package/dist/panoramic/generators/data-model-generator.js.map +1 -0
- package/dist/panoramic/generators/event-surface-generator.d.ts +52 -0
- package/dist/panoramic/generators/event-surface-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/event-surface-generator.js +634 -0
- package/dist/panoramic/generators/event-surface-generator.js.map +1 -0
- package/dist/panoramic/generators/interface-surface-generator.d.ts +50 -0
- package/dist/panoramic/generators/interface-surface-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/interface-surface-generator.js +393 -0
- package/dist/panoramic/generators/interface-surface-generator.js.map +1 -0
- package/dist/panoramic/generators/mock-readme-generator.d.ts +90 -0
- package/dist/panoramic/generators/mock-readme-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/mock-readme-generator.js +113 -0
- package/dist/panoramic/generators/mock-readme-generator.js.map +1 -0
- package/dist/panoramic/generators/pattern-hints-generator.d.ts +28 -0
- package/dist/panoramic/generators/pattern-hints-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/pattern-hints-generator.js +170 -0
- package/dist/panoramic/generators/pattern-hints-generator.js.map +1 -0
- package/dist/panoramic/generators/runtime-topology-generator.d.ts +77 -0
- package/dist/panoramic/generators/runtime-topology-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/runtime-topology-generator.js +679 -0
- package/dist/panoramic/generators/runtime-topology-generator.js.map +1 -0
- package/dist/panoramic/generators/troubleshooting-generator.d.ts +51 -0
- package/dist/panoramic/generators/troubleshooting-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/troubleshooting-generator.js +464 -0
- package/dist/panoramic/generators/troubleshooting-generator.js.map +1 -0
- package/dist/panoramic/generators/workspace-index-generator.d.ts +148 -0
- package/dist/panoramic/generators/workspace-index-generator.d.ts.map +1 -0
- package/dist/panoramic/generators/workspace-index-generator.js +500 -0
- package/dist/panoramic/generators/workspace-index-generator.js.map +1 -0
- package/dist/panoramic/graph/confidence-mapper.d.ts +39 -0
- package/dist/panoramic/graph/confidence-mapper.d.ts.map +1 -0
- package/dist/panoramic/graph/confidence-mapper.js +55 -0
- package/dist/panoramic/graph/confidence-mapper.js.map +1 -0
- package/dist/panoramic/graph/graph-builder.d.ts +33 -0
- package/dist/panoramic/graph/graph-builder.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-builder.js +382 -0
- package/dist/panoramic/graph/graph-builder.js.map +1 -0
- package/dist/panoramic/graph/graph-paths.d.ts +13 -0
- package/dist/panoramic/graph/graph-paths.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-paths.js +16 -0
- package/dist/panoramic/graph/graph-paths.js.map +1 -0
- package/dist/panoramic/graph/graph-query.d.ts +226 -0
- package/dist/panoramic/graph/graph-query.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-query.js +571 -0
- package/dist/panoramic/graph/graph-query.js.map +1 -0
- package/dist/panoramic/graph/graph-types.d.ts +156 -0
- package/dist/panoramic/graph/graph-types.d.ts.map +1 -0
- package/dist/panoramic/graph/graph-types.js +10 -0
- package/dist/panoramic/graph/graph-types.js.map +1 -0
- package/dist/panoramic/graph/index.d.ts +6 -0
- package/dist/panoramic/graph/index.d.ts.map +1 -0
- package/dist/panoramic/graph/index.js +8 -0
- package/dist/panoramic/graph/index.js.map +1 -0
- package/dist/panoramic/hyperedges/constants.d.ts +16 -0
- package/dist/panoramic/hyperedges/constants.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/constants.js +13 -0
- package/dist/panoramic/hyperedges/constants.js.map +1 -0
- package/dist/panoramic/hyperedges/extractor.d.ts +80 -0
- package/dist/panoramic/hyperedges/extractor.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/extractor.js +133 -0
- package/dist/panoramic/hyperedges/extractor.js.map +1 -0
- package/dist/panoramic/hyperedges/index.d.ts +12 -0
- package/dist/panoramic/hyperedges/index.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/index.js +19 -0
- package/dist/panoramic/hyperedges/index.js.map +1 -0
- package/dist/panoramic/hyperedges/prompt.d.ts +30 -0
- package/dist/panoramic/hyperedges/prompt.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/prompt.js +88 -0
- package/dist/panoramic/hyperedges/prompt.js.map +1 -0
- package/dist/panoramic/hyperedges/schema.d.ts +91 -0
- package/dist/panoramic/hyperedges/schema.d.ts.map +1 -0
- package/dist/panoramic/hyperedges/schema.js +52 -0
- package/dist/panoramic/hyperedges/schema.js.map +1 -0
- package/dist/panoramic/index.d.ts +17 -0
- package/dist/panoramic/index.d.ts.map +1 -0
- package/dist/panoramic/index.js +22 -0
- package/dist/panoramic/index.js.map +1 -0
- package/dist/panoramic/interfaces.d.ts +243 -0
- package/dist/panoramic/interfaces.d.ts.map +1 -0
- package/dist/panoramic/interfaces.js +130 -0
- package/dist/panoramic/interfaces.js.map +1 -0
- package/dist/panoramic/internal.d.ts +67 -0
- package/dist/panoramic/internal.d.ts.map +1 -0
- package/dist/panoramic/internal.js +93 -0
- package/dist/panoramic/internal.js.map +1 -0
- package/dist/panoramic/models/architecture-ir-model.d.ts +92 -0
- package/dist/panoramic/models/architecture-ir-model.d.ts.map +1 -0
- package/dist/panoramic/models/architecture-ir-model.js +14 -0
- package/dist/panoramic/models/architecture-ir-model.js.map +1 -0
- package/dist/panoramic/models/architecture-overview-model.d.ts +77 -0
- package/dist/panoramic/models/architecture-overview-model.d.ts.map +1 -0
- package/dist/panoramic/models/architecture-overview-model.js +31 -0
- package/dist/panoramic/models/architecture-overview-model.js.map +1 -0
- package/dist/panoramic/models/component-view-model.d.ts +127 -0
- package/dist/panoramic/models/component-view-model.d.ts.map +1 -0
- package/dist/panoramic/models/component-view-model.js +65 -0
- package/dist/panoramic/models/component-view-model.js.map +1 -0
- package/dist/panoramic/models/docs-bundle-profiles.d.ts +4 -0
- package/dist/panoramic/models/docs-bundle-profiles.d.ts.map +1 -0
- package/dist/panoramic/models/docs-bundle-profiles.js +82 -0
- package/dist/panoramic/models/docs-bundle-profiles.js.map +1 -0
- package/dist/panoramic/models/docs-bundle-types.d.ts +94 -0
- package/dist/panoramic/models/docs-bundle-types.d.ts.map +1 -0
- package/dist/panoramic/models/docs-bundle-types.js +10 -0
- package/dist/panoramic/models/docs-bundle-types.js.map +1 -0
- package/dist/panoramic/models/docs-quality-model.d.ts +125 -0
- package/dist/panoramic/models/docs-quality-model.d.ts.map +1 -0
- package/dist/panoramic/models/docs-quality-model.js +166 -0
- package/dist/panoramic/models/docs-quality-model.js.map +1 -0
- package/dist/panoramic/models/pattern-hints-model.d.ts +89 -0
- package/dist/panoramic/models/pattern-hints-model.d.ts.map +1 -0
- package/dist/panoramic/models/pattern-hints-model.js +61 -0
- package/dist/panoramic/models/pattern-hints-model.js.map +1 -0
- package/dist/panoramic/models/pattern-knowledge-base.d.ts +31 -0
- package/dist/panoramic/models/pattern-knowledge-base.d.ts.map +1 -0
- package/dist/panoramic/models/pattern-knowledge-base.js +407 -0
- package/dist/panoramic/models/pattern-knowledge-base.js.map +1 -0
- package/dist/panoramic/models/runtime-topology-model.d.ts +145 -0
- package/dist/panoramic/models/runtime-topology-model.d.ts.map +1 -0
- package/dist/panoramic/models/runtime-topology-model.js +300 -0
- package/dist/panoramic/models/runtime-topology-model.js.map +1 -0
- package/dist/panoramic/output-filenames.d.ts +26 -0
- package/dist/panoramic/output-filenames.d.ts.map +1 -0
- package/dist/panoramic/output-filenames.js +48 -0
- package/dist/panoramic/output-filenames.js.map +1 -0
- package/dist/panoramic/parser-registry.d.ts +89 -0
- package/dist/panoramic/parser-registry.d.ts.map +1 -0
- package/dist/panoramic/parser-registry.js +169 -0
- package/dist/panoramic/parser-registry.js.map +1 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.d.ts +48 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.js +52 -0
- package/dist/panoramic/parsers/abstract-artifact-parser.js.map +1 -0
- package/dist/panoramic/parsers/abstract-config-parser.d.ts +35 -0
- package/dist/panoramic/parsers/abstract-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/abstract-config-parser.js +34 -0
- package/dist/panoramic/parsers/abstract-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.d.ts +34 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.js +195 -0
- package/dist/panoramic/parsers/behavior-yaml-parser.js.map +1 -0
- package/dist/panoramic/parsers/comment-tracker.d.ts +37 -0
- package/dist/panoramic/parsers/comment-tracker.d.ts.map +1 -0
- package/dist/panoramic/parsers/comment-tracker.js +50 -0
- package/dist/panoramic/parsers/comment-tracker.js.map +1 -0
- package/dist/panoramic/parsers/dockerfile-parser.d.ts +42 -0
- package/dist/panoramic/parsers/dockerfile-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/dockerfile-parser.js +128 -0
- package/dist/panoramic/parsers/dockerfile-parser.js.map +1 -0
- package/dist/panoramic/parsers/env-config-parser.d.ts +37 -0
- package/dist/panoramic/parsers/env-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/env-config-parser.js +73 -0
- package/dist/panoramic/parsers/env-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/index.d.ts +25 -0
- package/dist/panoramic/parsers/index.d.ts.map +1 -0
- package/dist/panoramic/parsers/index.js +25 -0
- package/dist/panoramic/parsers/index.js.map +1 -0
- package/dist/panoramic/parsers/skill-md-parser.d.ts +42 -0
- package/dist/panoramic/parsers/skill-md-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/skill-md-parser.js +105 -0
- package/dist/panoramic/parsers/skill-md-parser.js.map +1 -0
- package/dist/panoramic/parsers/toml-config-parser.d.ts +39 -0
- package/dist/panoramic/parsers/toml-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/toml-config-parser.js +98 -0
- package/dist/panoramic/parsers/toml-config-parser.js.map +1 -0
- package/dist/panoramic/parsers/types.d.ts +314 -0
- package/dist/panoramic/parsers/types.d.ts.map +1 -0
- package/dist/panoramic/parsers/types.js +136 -0
- package/dist/panoramic/parsers/types.js.map +1 -0
- package/dist/panoramic/parsers/yaml-config-parser.d.ts +58 -0
- package/dist/panoramic/parsers/yaml-config-parser.d.ts.map +1 -0
- package/dist/panoramic/parsers/yaml-config-parser.js +356 -0
- package/dist/panoramic/parsers/yaml-config-parser.js.map +1 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts +74 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.js +421 -0
- package/dist/panoramic/pipelines/adr-decision-pipeline.js.map +1 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts +30 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.js +141 -0
- package/dist/panoramic/pipelines/adr-evidence-verifier.js.map +1 -0
- package/dist/panoramic/pipelines/adr-mapreduce.d.ts +316 -0
- package/dist/panoramic/pipelines/adr-mapreduce.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-mapreduce.js +331 -0
- package/dist/panoramic/pipelines/adr-mapreduce.js.map +1 -0
- package/dist/panoramic/pipelines/adr-migration.d.ts +26 -0
- package/dist/panoramic/pipelines/adr-migration.d.ts.map +1 -0
- package/dist/panoramic/pipelines/adr-migration.js +203 -0
- package/dist/panoramic/pipelines/adr-migration.js.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts +121 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js +412 -0
- package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative.d.ts +123 -0
- package/dist/panoramic/pipelines/architecture-narrative.d.ts.map +1 -0
- package/dist/panoramic/pipelines/architecture-narrative.js +419 -0
- package/dist/panoramic/pipelines/architecture-narrative.js.map +1 -0
- package/dist/panoramic/pipelines/coverage-auditor.d.ts +95 -0
- package/dist/panoramic/pipelines/coverage-auditor.d.ts.map +1 -0
- package/dist/panoramic/pipelines/coverage-auditor.js +290 -0
- package/dist/panoramic/pipelines/coverage-auditor.js.map +1 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts +32 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts.map +1 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.js +108 -0
- package/dist/panoramic/pipelines/debt-intelligence-pipeline.js.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts +26 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js +108 -0
- package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts +16 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.js +588 -0
- package/dist/panoramic/pipelines/docs-bundle-orchestrator.js.map +1 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts +55 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts.map +1 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.js +1045 -0
- package/dist/panoramic/pipelines/docs-quality-evaluator.js.map +1 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts +8 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts.map +1 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.js +99 -0
- package/dist/panoramic/pipelines/narrative-provenance-adapter.js.map +1 -0
- package/dist/panoramic/pipelines/product-ux-docs.d.ts +123 -0
- package/dist/panoramic/pipelines/product-ux-docs.d.ts.map +1 -0
- package/dist/panoramic/pipelines/product-ux-docs.js +959 -0
- package/dist/panoramic/pipelines/product-ux-docs.js.map +1 -0
- package/dist/panoramic/project-context.d.ts +17 -0
- package/dist/panoramic/project-context.d.ts.map +1 -0
- package/dist/panoramic/project-context.js +289 -0
- package/dist/panoramic/project-context.js.map +1 -0
- package/dist/panoramic/qa/citation.d.ts +21 -0
- package/dist/panoramic/qa/citation.d.ts.map +1 -0
- package/dist/panoramic/qa/citation.js +184 -0
- package/dist/panoramic/qa/citation.js.map +1 -0
- package/dist/panoramic/qa/debt-context.d.ts +33 -0
- package/dist/panoramic/qa/debt-context.d.ts.map +1 -0
- package/dist/panoramic/qa/debt-context.js +82 -0
- package/dist/panoramic/qa/debt-context.js.map +1 -0
- package/dist/panoramic/qa/graph-retriever.d.ts +29 -0
- package/dist/panoramic/qa/graph-retriever.d.ts.map +1 -0
- package/dist/panoramic/qa/graph-retriever.js +65 -0
- package/dist/panoramic/qa/graph-retriever.js.map +1 -0
- package/dist/panoramic/qa/index.d.ts +23 -0
- package/dist/panoramic/qa/index.d.ts.map +1 -0
- package/dist/panoramic/qa/index.js +201 -0
- package/dist/panoramic/qa/index.js.map +1 -0
- package/dist/panoramic/qa/llm-caller.d.ts +35 -0
- package/dist/panoramic/qa/llm-caller.d.ts.map +1 -0
- package/dist/panoramic/qa/llm-caller.js +138 -0
- package/dist/panoramic/qa/llm-caller.js.map +1 -0
- package/dist/panoramic/qa/prompt-builder.d.ts +36 -0
- package/dist/panoramic/qa/prompt-builder.d.ts.map +1 -0
- package/dist/panoramic/qa/prompt-builder.js +143 -0
- package/dist/panoramic/qa/prompt-builder.js.map +1 -0
- package/dist/panoramic/qa/rag-reranker.d.ts +43 -0
- package/dist/panoramic/qa/rag-reranker.d.ts.map +1 -0
- package/dist/panoramic/qa/rag-reranker.js +129 -0
- package/dist/panoramic/qa/rag-reranker.js.map +1 -0
- package/dist/panoramic/qa/types.d.ts +126 -0
- package/dist/panoramic/qa/types.d.ts.map +1 -0
- package/dist/panoramic/qa/types.js +6 -0
- package/dist/panoramic/qa/types.js.map +1 -0
- package/dist/panoramic/query.d.ts +29 -0
- package/dist/panoramic/query.d.ts.map +1 -0
- package/dist/panoramic/query.js +80 -0
- package/dist/panoramic/query.js.map +1 -0
- package/dist/panoramic/stored-module-specs.d.ts +26 -0
- package/dist/panoramic/stored-module-specs.d.ts.map +1 -0
- package/dist/panoramic/stored-module-specs.js +155 -0
- package/dist/panoramic/stored-module-specs.js.map +1 -0
- package/dist/panoramic/utils/html-sanitizer.d.ts +33 -0
- package/dist/panoramic/utils/html-sanitizer.d.ts.map +1 -0
- package/dist/panoramic/utils/html-sanitizer.js +170 -0
- package/dist/panoramic/utils/html-sanitizer.js.map +1 -0
- package/dist/panoramic/utils/llm-enricher.d.ts +74 -0
- package/dist/panoramic/utils/llm-enricher.d.ts.map +1 -0
- package/dist/panoramic/utils/llm-enricher.js +315 -0
- package/dist/panoramic/utils/llm-enricher.js.map +1 -0
- package/dist/panoramic/utils/llm-facade.d.ts +66 -0
- package/dist/panoramic/utils/llm-facade.d.ts.map +1 -0
- package/dist/panoramic/utils/llm-facade.js +136 -0
- package/dist/panoramic/utils/llm-facade.js.map +1 -0
- package/dist/panoramic/utils/logger.d.ts +43 -0
- package/dist/panoramic/utils/logger.d.ts.map +1 -0
- package/dist/panoramic/utils/logger.js +76 -0
- package/dist/panoramic/utils/logger.js.map +1 -0
- package/dist/panoramic/utils/mermaid-helpers.d.ts +19 -0
- package/dist/panoramic/utils/mermaid-helpers.d.ts.map +1 -0
- package/dist/panoramic/utils/mermaid-helpers.js +21 -0
- package/dist/panoramic/utils/mermaid-helpers.js.map +1 -0
- package/dist/panoramic/utils/multi-format-writer.d.ts +43 -0
- package/dist/panoramic/utils/multi-format-writer.d.ts.map +1 -0
- package/dist/panoramic/utils/multi-format-writer.js +73 -0
- package/dist/panoramic/utils/multi-format-writer.js.map +1 -0
- package/dist/panoramic/utils/template-loader.d.ts +15 -0
- package/dist/panoramic/utils/template-loader.d.ts.map +1 -0
- package/dist/panoramic/utils/template-loader.js +65 -0
- package/dist/panoramic/utils/template-loader.js.map +1 -0
- package/dist/panoramic/utils/text-segmenter.d.ts +50 -0
- package/dist/panoramic/utils/text-segmenter.d.ts.map +1 -0
- package/dist/panoramic/utils/text-segmenter.js +151 -0
- package/dist/panoramic/utils/text-segmenter.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +7 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +70 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/scripts/preuninstall.d.ts +7 -0
- package/dist/scripts/preuninstall.d.ts.map +1 -0
- package/dist/scripts/preuninstall.js +62 -0
- package/dist/scripts/preuninstall.js.map +1 -0
- package/dist/spec-store/index.d.ts +9 -0
- package/dist/spec-store/index.d.ts.map +1 -0
- package/dist/spec-store/index.js +9 -0
- package/dist/spec-store/index.js.map +1 -0
- package/dist/spec-store/spec-identity.d.ts +28 -0
- package/dist/spec-store/spec-identity.d.ts.map +1 -0
- package/dist/spec-store/spec-identity.js +24 -0
- package/dist/spec-store/spec-identity.js.map +1 -0
- package/dist/spec-store/spec-store.d.ts +62 -0
- package/dist/spec-store/spec-store.d.ts.map +1 -0
- package/dist/spec-store/spec-store.js +201 -0
- package/dist/spec-store/spec-store.js.map +1 -0
- package/dist/utils/atomic-write.d.ts +10 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/atomic-write.js +27 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/dist/utils/chunk-splitter.d.ts +32 -0
- package/dist/utils/chunk-splitter.d.ts.map +1 -0
- package/dist/utils/chunk-splitter.js +116 -0
- package/dist/utils/chunk-splitter.js.map +1 -0
- package/dist/utils/file-scanner.d.ts +38 -0
- package/dist/utils/file-scanner.d.ts.map +1 -0
- package/dist/utils/file-scanner.js +323 -0
- package/dist/utils/file-scanner.js.map +1 -0
- package/dist/utils/git-blame.d.ts +32 -0
- package/dist/utils/git-blame.d.ts.map +1 -0
- package/dist/utils/git-blame.js +151 -0
- package/dist/utils/git-blame.js.map +1 -0
- package/dist/utils/specify-template-sync.d.ts +16 -0
- package/dist/utils/specify-template-sync.d.ts.map +1 -0
- package/dist/utils/specify-template-sync.js +66 -0
- package/dist/utils/specify-template-sync.js.map +1 -0
- package/dist/watcher/file-watcher.d.ts +77 -0
- package/dist/watcher/file-watcher.d.ts.map +1 -0
- package/dist/watcher/file-watcher.js +233 -0
- package/dist/watcher/file-watcher.js.map +1 -0
- package/dist/watcher/index.d.ts +6 -0
- package/dist/watcher/index.d.ts.map +1 -0
- package/dist/watcher/index.js +5 -0
- package/dist/watcher/index.js.map +1 -0
- package/grammars/manifest.json +28 -0
- package/grammars/tree-sitter-go.wasm +0 -0
- package/grammars/tree-sitter-java.wasm +0 -0
- package/grammars/tree-sitter-javascript.wasm +0 -0
- package/grammars/tree-sitter-python.wasm +0 -0
- package/grammars/tree-sitter-typescript.wasm +0 -0
- package/package.json +84 -0
- package/plugins/spec-driver/.claude-plugin/plugin.json +16 -0
- package/plugins/spec-driver/README.md +401 -0
- package/plugins/spec-driver/agents/analyze.artifact.yaml +10 -0
- package/plugins/spec-driver/agents/analyze.md +144 -0
- package/plugins/spec-driver/agents/checklist.artifact.yaml +8 -0
- package/plugins/spec-driver/agents/checklist.md +84 -0
- package/plugins/spec-driver/agents/clarify.artifact.yaml +6 -0
- package/plugins/spec-driver/agents/clarify.md +104 -0
- package/plugins/spec-driver/agents/constitution.artifact.yaml +9 -0
- package/plugins/spec-driver/agents/constitution.md +100 -0
- package/plugins/spec-driver/agents/implement.artifact.yaml +8 -0
- package/plugins/spec-driver/agents/implement.md +159 -0
- package/plugins/spec-driver/agents/plan.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/plan.md +116 -0
- package/plugins/spec-driver/agents/product-research.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/product-research.md +94 -0
- package/plugins/spec-driver/agents/quality-review.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/quality-review.md +165 -0
- package/plugins/spec-driver/agents/refactor-plan.md +132 -0
- package/plugins/spec-driver/agents/spec-review.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/spec-review.md +111 -0
- package/plugins/spec-driver/agents/specify.artifact.yaml +9 -0
- package/plugins/spec-driver/agents/specify.md +109 -0
- package/plugins/spec-driver/agents/sync.artifact.yaml +19 -0
- package/plugins/spec-driver/agents/sync.md +91 -0
- package/plugins/spec-driver/agents/tasks.artifact.yaml +10 -0
- package/plugins/spec-driver/agents/tasks.md +88 -0
- package/plugins/spec-driver/agents/tech-research.artifact.yaml +12 -0
- package/plugins/spec-driver/agents/tech-research.md +102 -0
- package/plugins/spec-driver/agents/verify.artifact.yaml +11 -0
- package/plugins/spec-driver/agents/verify.md +204 -0
- package/plugins/spec-driver/config/orchestration.yaml +779 -0
- package/plugins/spec-driver/contracts/orchestration-overrides-contract.yaml +124 -0
- package/plugins/spec-driver/contracts/orchestration-schema.mjs +301 -0
- package/plugins/spec-driver/contracts/scan-project-output.md +70 -0
- package/plugins/spec-driver/contracts/wrapper-source-of-truth.yaml +44 -0
- package/plugins/spec-driver/hooks/hooks.json +70 -0
- package/plugins/spec-driver/hooks/post-tool-use-format.sh +28 -0
- package/plugins/spec-driver/hooks/pre-tool-use-guard.sh +42 -0
- package/plugins/spec-driver/hooks/stop-task-check.sh +22 -0
- package/plugins/spec-driver/hooks/worktree-lifecycle.sh +33 -0
- package/plugins/spec-driver/lib/orchestration-output-serializer.mjs +219 -0
- package/plugins/spec-driver/lib/orchestration-resolver.mjs +485 -0
- package/plugins/spec-driver/lib/orchestrator-fallback.mjs +98 -0
- package/plugins/spec-driver/lib/orchestrator.mjs +280 -0
- package/plugins/spec-driver/scorecards/default-governance.yaml +63 -0
- package/plugins/spec-driver/scripts/codex-skills.sh +225 -0
- package/plugins/spec-driver/scripts/experimental/README.md +9 -0
- package/plugins/spec-driver/scripts/generate-adoption-insights.mjs +523 -0
- package/plugins/spec-driver/scripts/generate-product-entity-catalog.mjs +472 -0
- package/plugins/spec-driver/scripts/generate-product-quality-reports.mjs +18 -0
- package/plugins/spec-driver/scripts/generate-product-scorecards.mjs +25 -0
- package/plugins/spec-driver/scripts/generate-project-context-suggestions.mjs +622 -0
- package/plugins/spec-driver/scripts/generate-workflow-registry.mjs +16 -0
- package/plugins/spec-driver/scripts/init-project.sh +328 -0
- package/plugins/spec-driver/scripts/lib/config-schema.mjs +433 -0
- package/plugins/spec-driver/scripts/lib/init-project-output.sh +146 -0
- package/plugins/spec-driver/scripts/lib/product-artifact-patchers.mjs +29 -0
- package/plugins/spec-driver/scripts/lib/product-artifact-paths.mjs +129 -0
- package/plugins/spec-driver/scripts/lib/product-governance-helpers.mjs +48 -0
- package/plugins/spec-driver/scripts/lib/product-quality-core.mjs +531 -0
- package/plugins/spec-driver/scripts/lib/product-scorecard-core.mjs +810 -0
- package/plugins/spec-driver/scripts/lib/project-context-paths.mjs +21 -0
- package/plugins/spec-driver/scripts/lib/project-profile-resolver.mjs +704 -0
- package/plugins/spec-driver/scripts/lib/project-profile-schema.mjs +78 -0
- package/plugins/spec-driver/scripts/lib/script-cli-args.mjs +25 -0
- package/plugins/spec-driver/scripts/lib/script-diagnostics.mjs +29 -0
- package/plugins/spec-driver/scripts/lib/script-report-io.mjs +37 -0
- package/plugins/spec-driver/scripts/lib/simple-yaml.mjs +257 -0
- package/plugins/spec-driver/scripts/lib/sync-conflict-resolver.mjs +128 -0
- package/plugins/spec-driver/scripts/lib/sync-merge-strategy.mjs +388 -0
- package/plugins/spec-driver/scripts/lib/sync-product-mapping.mjs +228 -0
- package/plugins/spec-driver/scripts/lib/sync-timeline-builder.mjs +114 -0
- package/plugins/spec-driver/scripts/lib/sync-validator.mjs +174 -0
- package/plugins/spec-driver/scripts/lib/workflow-registry-core.mjs +281 -0
- package/plugins/spec-driver/scripts/orchestrator-cli.mjs +490 -0
- package/plugins/spec-driver/scripts/orchestrator-cli.sh +36 -0
- package/plugins/spec-driver/scripts/postinstall.sh +101 -0
- package/plugins/spec-driver/scripts/record-workflow-run.mjs +332 -0
- package/plugins/spec-driver/scripts/resolve-project-context.mjs +56 -0
- package/plugins/spec-driver/scripts/scan-project.sh +668 -0
- package/plugins/spec-driver/scripts/sync-merge-engine.mjs +663 -0
- package/plugins/spec-driver/scripts/validate-config.mjs +223 -0
- package/plugins/spec-driver/scripts/validate-orchestration-overrides.mjs +190 -0
- package/plugins/spec-driver/scripts/validate-wrapper-sources.mjs +302 -0
- package/plugins/spec-driver/skills/spec-driver-constitution/SKILL.md +77 -0
- package/plugins/spec-driver/skills/spec-driver-doc/SKILL.md +732 -0
- package/plugins/spec-driver/skills/spec-driver-feature/SKILL.md +336 -0
- package/plugins/spec-driver/skills/spec-driver-fix/SKILL.md +457 -0
- package/plugins/spec-driver/skills/spec-driver-implement/SKILL.md +653 -0
- package/plugins/spec-driver/skills/spec-driver-refactor/SKILL.md +250 -0
- package/plugins/spec-driver/skills/spec-driver-resume/SKILL.md +325 -0
- package/plugins/spec-driver/skills/spec-driver-story/SKILL.md +566 -0
- package/plugins/spec-driver/skills/spec-driver-sync/SKILL.md +300 -0
- package/plugins/spec-driver/templates/code-of-conduct-v2.1.md +85 -0
- package/plugins/spec-driver/templates/licenses/Apache-2.0.txt +201 -0
- package/plugins/spec-driver/templates/licenses/BSD-2-Clause.txt +24 -0
- package/plugins/spec-driver/templates/licenses/BSD-3-Clause.txt +28 -0
- package/plugins/spec-driver/templates/licenses/GPL-3.0.txt +232 -0
- package/plugins/spec-driver/templates/licenses/ISC.txt +15 -0
- package/plugins/spec-driver/templates/licenses/MIT.txt +21 -0
- package/plugins/spec-driver/templates/licenses/MPL-2.0.txt +373 -0
- package/plugins/spec-driver/templates/licenses/Unlicense.txt +24 -0
- package/plugins/spec-driver/templates/orchestration-overrides.example.yaml +81 -0
- package/plugins/spec-driver/templates/product-research-template.md +95 -0
- package/plugins/spec-driver/templates/product-spec-template.md +250 -0
- package/plugins/spec-driver/templates/research-synthesis-template.md +102 -0
- package/plugins/spec-driver/templates/spec-driver.config-template.yaml +244 -0
- package/plugins/spec-driver/templates/specify-base/agent-file-template.md +28 -0
- package/plugins/spec-driver/templates/specify-base/checklist-template.md +40 -0
- package/plugins/spec-driver/templates/specify-base/constitution-template.md +50 -0
- package/plugins/spec-driver/templates/specify-base/plan-template.md +134 -0
- package/plugins/spec-driver/templates/specify-base/product-research-template.md +95 -0
- package/plugins/spec-driver/templates/specify-base/project-context-template.yaml +40 -0
- package/plugins/spec-driver/templates/specify-base/research-synthesis-template.md +102 -0
- package/plugins/spec-driver/templates/specify-base/spec-template.md +115 -0
- package/plugins/spec-driver/templates/specify-base/tasks-template.md +266 -0
- package/plugins/spec-driver/templates/specify-base/tech-research-template.md +111 -0
- package/plugins/spec-driver/templates/specify-base/verification-report-template.md +63 -0
- package/plugins/spec-driver/templates/tech-research-template.md +111 -0
- package/plugins/spec-driver/templates/verification-report-template.md +63 -0
- package/plugins/spec-driver/workflows/golden-paths.yaml +39 -0
- package/plugins/spec-driver/workflows/spec-driver-doc.yaml +24 -0
- package/plugins/spec-driver/workflows/spec-driver-feature.yaml +29 -0
- package/plugins/spec-driver/workflows/spec-driver-fix.yaml +21 -0
- package/plugins/spec-driver/workflows/spec-driver-implement.yaml +23 -0
- package/plugins/spec-driver/workflows/spec-driver-resume.yaml +20 -0
- package/plugins/spec-driver/workflows/spec-driver-story.yaml +24 -0
- package/plugins/spec-driver/workflows/spec-driver-sync.yaml +34 -0
- package/plugins/spectra/.claude-plugin/plugin.json +20 -0
- package/plugins/spectra/.mcp.json +8 -0
- package/plugins/spectra/README.md +128 -0
- package/plugins/spectra/contracts/skill-source-of-truth.yaml +34 -0
- package/plugins/spectra/hooks/hooks.json +15 -0
- package/plugins/spectra/scripts/postinstall.sh +12 -0
- package/plugins/spectra/scripts/sync-skill-mirrors.mjs +148 -0
- package/plugins/spectra/scripts/validate-skill-sources.mjs +280 -0
- package/plugins/spectra/skills/spectra/SKILL.md +214 -0
- package/plugins/spectra/skills/spectra-batch/SKILL.md +232 -0
- package/plugins/spectra/skills/spectra-diff/SKILL.md +99 -0
- package/queries/go.scm +54 -0
- package/queries/java.scm +50 -0
- package/queries/javascript.scm +30 -0
- package/queries/python.scm +35 -0
- package/queries/typescript.scm +50 -0
- package/scripts/lifecycle-runner.cjs +33 -0
- package/templates/adr-draft.hbs +51 -0
- package/templates/adr-index.hbs +25 -0
- package/templates/api-surface.hbs +40 -0
- package/templates/architecture-ir.hbs +49 -0
- package/templates/architecture-narrative.hbs +116 -0
- package/templates/architecture-overview.hbs +103 -0
- package/templates/component-view.hbs +87 -0
- package/templates/config-reference.hbs +22 -0
- package/templates/coverage-report.hbs +84 -0
- package/templates/cross-package-analysis.hbs +43 -0
- package/templates/data-model.hbs +72 -0
- package/templates/delta-report.hbs +53 -0
- package/templates/docs-bundle-index.hbs +41 -0
- package/templates/drift-report.hbs +53 -0
- package/templates/dynamic-scenarios.hbs +46 -0
- package/templates/event-surface.hbs +90 -0
- package/templates/feature-brief-index.hbs +27 -0
- package/templates/feature-brief.hbs +28 -0
- package/templates/index-spec.hbs +57 -0
- package/templates/interface-surface.hbs +87 -0
- package/templates/module-spec.hbs +117 -0
- package/templates/pattern-hints.hbs +85 -0
- package/templates/product-overview.hbs +65 -0
- package/templates/quality-report.hbs +130 -0
- package/templates/runtime-topology.hbs +128 -0
- package/templates/troubleshooting.hbs +86 -0
- package/templates/user-journeys.hbs +44 -0
- package/templates/workspace-index.hbs +26 -0
|
@@ -0,0 +1,1045 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docs quality evaluator
|
|
3
|
+
*
|
|
4
|
+
* 在现有 panoramic / ADR 结构化输出之上,生成 provenance、conflict、required-doc
|
|
5
|
+
* 与总体质量结论。059 不新增事实抽取器,也不把 Markdown 当作 canonical facts。
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import { loadTemplate } from '../utils/template-loader.js';
|
|
10
|
+
import { adaptArchitectureNarrativeProvenance } from './narrative-provenance-adapter.js';
|
|
11
|
+
import { determineDocsQualityStatus, normalizeConfidence, summarizeDocsQualityStats, summarizeProvenanceRecord, summarizeProvenanceSection, } from '../models/docs-quality-model.js';
|
|
12
|
+
import { createLogger } from '../utils/logger.js';
|
|
13
|
+
const logger = createLogger('docs-quality-evaluator');
|
|
14
|
+
const DOC_METADATA = {
|
|
15
|
+
'product-overview': {
|
|
16
|
+
title: 'Product Overview',
|
|
17
|
+
relativePath: 'product-overview.md',
|
|
18
|
+
},
|
|
19
|
+
'user-journeys': {
|
|
20
|
+
title: 'User Journeys',
|
|
21
|
+
relativePath: 'user-journeys.md',
|
|
22
|
+
},
|
|
23
|
+
'feature-briefs/index': {
|
|
24
|
+
title: 'Feature Briefs',
|
|
25
|
+
relativePath: 'feature-briefs/index.md',
|
|
26
|
+
},
|
|
27
|
+
'architecture-narrative': {
|
|
28
|
+
title: 'Architecture Narrative',
|
|
29
|
+
relativePath: 'architecture-narrative.md',
|
|
30
|
+
},
|
|
31
|
+
'architecture-overview': {
|
|
32
|
+
title: 'Architecture Overview',
|
|
33
|
+
relativePath: 'architecture-overview.md',
|
|
34
|
+
},
|
|
35
|
+
'runtime-topology': {
|
|
36
|
+
title: 'Runtime Topology',
|
|
37
|
+
relativePath: 'runtime-topology.md',
|
|
38
|
+
},
|
|
39
|
+
'component-view': {
|
|
40
|
+
title: 'Component View',
|
|
41
|
+
relativePath: 'component-view.md',
|
|
42
|
+
},
|
|
43
|
+
'dynamic-scenarios': {
|
|
44
|
+
title: 'Dynamic Scenarios',
|
|
45
|
+
relativePath: 'dynamic-scenarios.md',
|
|
46
|
+
},
|
|
47
|
+
'pattern-hints': {
|
|
48
|
+
title: 'Pattern Hints',
|
|
49
|
+
relativePath: 'pattern-hints.md',
|
|
50
|
+
},
|
|
51
|
+
'api-surface': {
|
|
52
|
+
title: 'API Surface',
|
|
53
|
+
relativePath: 'api-surface.md',
|
|
54
|
+
},
|
|
55
|
+
'interface-surface': {
|
|
56
|
+
title: 'Interface Surface',
|
|
57
|
+
relativePath: 'interface-surface.md',
|
|
58
|
+
},
|
|
59
|
+
'data-model': {
|
|
60
|
+
title: 'Data Model',
|
|
61
|
+
relativePath: 'data-model.md',
|
|
62
|
+
},
|
|
63
|
+
'workspace-index': {
|
|
64
|
+
title: 'Workspace Index',
|
|
65
|
+
relativePath: 'workspace-index.md',
|
|
66
|
+
},
|
|
67
|
+
'cross-package-analysis': {
|
|
68
|
+
title: 'Cross-Package Analysis',
|
|
69
|
+
relativePath: 'cross-package-analysis.md',
|
|
70
|
+
},
|
|
71
|
+
'docs/adr/index': {
|
|
72
|
+
title: 'ADR Index',
|
|
73
|
+
relativePath: 'docs/adr/index.md',
|
|
74
|
+
},
|
|
75
|
+
'quality-report': {
|
|
76
|
+
title: 'Docs Quality Report',
|
|
77
|
+
relativePath: 'quality-report.md',
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
const REQUIRED_DOC_RULES = [
|
|
81
|
+
{
|
|
82
|
+
docId: 'product-overview',
|
|
83
|
+
title: DOC_METADATA['product-overview'].title,
|
|
84
|
+
requiredBy: ['product-managed'],
|
|
85
|
+
reason: '产品事实已被纳入编排时,必须有产品概览作为统一入口。',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
docId: 'user-journeys',
|
|
89
|
+
title: DOC_METADATA['user-journeys'].title,
|
|
90
|
+
requiredBy: ['product-managed'],
|
|
91
|
+
reason: '产品 / UX 文档至少需要一份用户旅程,说明用户目标与关键任务流。',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
docId: 'feature-briefs/index',
|
|
95
|
+
title: DOC_METADATA['feature-briefs/index'].title,
|
|
96
|
+
requiredBy: ['product-managed'],
|
|
97
|
+
reason: '产品事实接入后应沉淀 feature brief 索引,连接 issue/PR 与产品叙事。',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
docId: 'architecture-narrative',
|
|
101
|
+
title: DOC_METADATA['architecture-narrative'].title,
|
|
102
|
+
requiredBy: ['general'],
|
|
103
|
+
reason: '叙事文档是 explanation 层的默认入口。',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
docId: 'architecture-overview',
|
|
107
|
+
title: DOC_METADATA['architecture-overview'].title,
|
|
108
|
+
requiredBy: ['runtime-project', 'architecture-heavy'],
|
|
109
|
+
reason: '架构概览提供 system context / deployment / layered 的统一总览。',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
docId: 'pattern-hints',
|
|
113
|
+
title: DOC_METADATA['pattern-hints'].title,
|
|
114
|
+
requiredBy: ['architecture-heavy'],
|
|
115
|
+
reason: '模式提示用于解释系统采用当前架构形态的证据与替代方案。',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
docId: 'docs/adr/index',
|
|
119
|
+
title: DOC_METADATA['docs/adr/index'].title,
|
|
120
|
+
requiredBy: ['architecture-heavy'],
|
|
121
|
+
reason: 'ADR 索引是架构决策审计入口。',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
docId: 'runtime-topology',
|
|
125
|
+
title: DOC_METADATA['runtime-topology'].title,
|
|
126
|
+
requiredBy: ['runtime-project'],
|
|
127
|
+
reason: '运行时项目必须显式记录服务、容器和部署边界。',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
docId: 'component-view',
|
|
131
|
+
title: DOC_METADATA['component-view'].title,
|
|
132
|
+
requiredBy: ['runtime-project'],
|
|
133
|
+
reason: '组件视图是运行时链路与部署角色之间的关键中间层。',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
docId: 'dynamic-scenarios',
|
|
137
|
+
title: DOC_METADATA['dynamic-scenarios'].title,
|
|
138
|
+
requiredBy: ['runtime-project'],
|
|
139
|
+
reason: '动态链路文档用于说明主链路、参与者和 hand-off。',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
docId: 'interface-surface',
|
|
143
|
+
title: DOC_METADATA['interface-surface'].title,
|
|
144
|
+
requiredBy: ['library-sdk'],
|
|
145
|
+
reason: 'SDK / library 项目需要一份聚焦公开入口、关键类型与关键方法的接口摘要。',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
docId: 'api-surface',
|
|
149
|
+
title: DOC_METADATA['api-surface'].title,
|
|
150
|
+
requiredBy: ['http-api'],
|
|
151
|
+
reason: 'HTTP API 项目需要稳定的 REST / RPC / endpoint 接口入口摘要。',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
docId: 'data-model',
|
|
155
|
+
title: DOC_METADATA['data-model'].title,
|
|
156
|
+
requiredBy: ['library-sdk'],
|
|
157
|
+
reason: 'SDK / library 项目需要对外和内部关键结构的数据模型摘要。',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
docId: 'workspace-index',
|
|
161
|
+
title: DOC_METADATA['workspace-index'].title,
|
|
162
|
+
requiredBy: ['monorepo'],
|
|
163
|
+
reason: 'Monorepo 需要 workspace / package 结构索引。',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
docId: 'cross-package-analysis',
|
|
167
|
+
title: DOC_METADATA['cross-package-analysis'].title,
|
|
168
|
+
requiredBy: ['monorepo'],
|
|
169
|
+
reason: 'Monorepo 需要跨包依赖分析和关系摘要。',
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
const TOPIC_PATTERNS = {
|
|
173
|
+
'product-positioning': [
|
|
174
|
+
{ value: 'sdk', patterns: [/\bsdk\b/i, /\blibrary\b/i] },
|
|
175
|
+
{ value: 'cli', patterns: [/\bcli\b/i, /\bcommand[- ]line\b/i] },
|
|
176
|
+
{ value: 'plugin', patterns: [/\bplugin\b/i, /\bextension\b/i] },
|
|
177
|
+
{ value: 'service', patterns: [/\bservice\b/i] },
|
|
178
|
+
{ value: 'platform', patterns: [/\bplatform\b/i, /\bframework\b/i] },
|
|
179
|
+
],
|
|
180
|
+
'runtime-hosting': [
|
|
181
|
+
{ value: 'containerized', patterns: [/\bdocker\b/i, /\bcompose\b/i, /\bcontainer/i] },
|
|
182
|
+
{ value: 'serverless', patterns: [/\bserverless\b/i, /\blambda\b/i] },
|
|
183
|
+
{ value: 'browser', patterns: [/\bbrowser\b/i] },
|
|
184
|
+
{ value: 'desktop', patterns: [/\bdesktop\b/i] },
|
|
185
|
+
{ value: 'local-process', patterns: [/\blocal process\b/i, /\bhost process\b/i, /\blocal runtime\b/i] },
|
|
186
|
+
],
|
|
187
|
+
'protocol-boundary': [
|
|
188
|
+
{ value: 'http-rest', patterns: [/\bhttp\b/i, /\brest\b/i] },
|
|
189
|
+
{ value: 'grpc', patterns: [/\bgrpc\b/i] },
|
|
190
|
+
{ value: 'json-rpc', patterns: [/\bjson-rpc\b/i] },
|
|
191
|
+
{ value: 'websocket', patterns: [/\bwebsocket\b/i] },
|
|
192
|
+
{ value: 'stdio', patterns: [/\bstdio\b/i, /\bstdin\b/i, /\bstdout\b/i] },
|
|
193
|
+
{ value: 'event-bus', patterns: [/\bevent/i, /\bpub(?:lish)?\b/i, /\bsub(?:scribe)?\b/i] },
|
|
194
|
+
],
|
|
195
|
+
'extensibility-boundary': [
|
|
196
|
+
{ value: 'registry', patterns: [/\bregistry\b/i] },
|
|
197
|
+
{ value: 'plugin', patterns: [/\bplugin\b/i, /\bextension\b/i] },
|
|
198
|
+
{ value: 'hook', patterns: [/\bhook\b/i] },
|
|
199
|
+
{ value: 'adapter', patterns: [/\badapter\b/i] },
|
|
200
|
+
{ value: 'middleware', patterns: [/\bmiddleware\b/i] },
|
|
201
|
+
],
|
|
202
|
+
'degradation-strategy': [
|
|
203
|
+
{ value: 'partial', patterns: [/\bpartial\b/i] },
|
|
204
|
+
{ value: 'warning', patterns: [/\bwarn(?:ing)?\b/i] },
|
|
205
|
+
{ value: 'fallback', patterns: [/\bfallback\b/i, /\bbest effort\b/i] },
|
|
206
|
+
{ value: 'graceful', patterns: [/\bgraceful\b/i, /\bdegrad/i] },
|
|
207
|
+
{ value: 'strict', patterns: [/\bfail fast\b/i, /\bstrict\b/i, /\bblocking\b/i] },
|
|
208
|
+
],
|
|
209
|
+
};
|
|
210
|
+
export function evaluateDocsQuality(options) {
|
|
211
|
+
const dependencyWarnings = [...(options.dependencyWarnings ?? [])];
|
|
212
|
+
const presentDocs = collectPresentDocs(options.generatedDocs, options.projectRoot, options.outputDir);
|
|
213
|
+
const warnings = collectGeneratedDocWarnings(options.generatedDocs);
|
|
214
|
+
if (!hasReadme(options.projectRoot)) {
|
|
215
|
+
warnings.push('未找到 README.md,部分产品定位和协议边界冲突无法完整校验。');
|
|
216
|
+
}
|
|
217
|
+
if (!hasCurrentSpec(options.projectRoot)) {
|
|
218
|
+
warnings.push('未找到 current-spec.md,产品级事实冲突校验将按可见 sources 保守降级。');
|
|
219
|
+
}
|
|
220
|
+
const provenance = buildProvenanceRecords(options, presentDocs);
|
|
221
|
+
const evidenceDocs = collectEvidenceDocuments(options);
|
|
222
|
+
const conflicts = detectConflicts(evidenceDocs);
|
|
223
|
+
const requiredDocs = evaluateRequiredDocs(options, presentDocs, dependencyWarnings);
|
|
224
|
+
const bundleCoverage = determineBundleCoverage(requiredDocs, options.docsBundleManifest);
|
|
225
|
+
const status = determineDocsQualityStatus({
|
|
226
|
+
bundleCoverage,
|
|
227
|
+
conflicts,
|
|
228
|
+
requiredDocs,
|
|
229
|
+
warnings,
|
|
230
|
+
dependencyWarnings,
|
|
231
|
+
});
|
|
232
|
+
const stats = summarizeDocsQualityStats({
|
|
233
|
+
provenance,
|
|
234
|
+
conflicts,
|
|
235
|
+
requiredDocs,
|
|
236
|
+
dependencyWarnings,
|
|
237
|
+
warnings,
|
|
238
|
+
});
|
|
239
|
+
return {
|
|
240
|
+
title: `文档质量报告: ${options.architectureNarrative.projectName}`,
|
|
241
|
+
generatedAt: new Date().toISOString().split('T')[0],
|
|
242
|
+
projectName: options.architectureNarrative.projectName,
|
|
243
|
+
status,
|
|
244
|
+
bundleCoverage,
|
|
245
|
+
summary: buildSummaryLines({
|
|
246
|
+
provenance,
|
|
247
|
+
conflicts,
|
|
248
|
+
requiredDocs,
|
|
249
|
+
bundleCoverage,
|
|
250
|
+
dependencyWarnings,
|
|
251
|
+
warnings,
|
|
252
|
+
}),
|
|
253
|
+
provenance,
|
|
254
|
+
conflicts,
|
|
255
|
+
requiredDocs,
|
|
256
|
+
dependencyWarnings: uniqueSorted(dependencyWarnings),
|
|
257
|
+
warnings: uniqueSorted(warnings),
|
|
258
|
+
stats,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
export function renderDocsQualityReport(report) {
|
|
262
|
+
const template = loadTemplate('quality-report.hbs', import.meta.url);
|
|
263
|
+
return template(report);
|
|
264
|
+
}
|
|
265
|
+
function buildProvenanceRecords(options, presentDocs) {
|
|
266
|
+
return [
|
|
267
|
+
adaptArchitectureNarrativeProvenance(options.architectureNarrative, {
|
|
268
|
+
outputDir: options.outputDir,
|
|
269
|
+
projectRoot: options.projectRoot,
|
|
270
|
+
}),
|
|
271
|
+
options.componentView
|
|
272
|
+
? buildComponentViewProvenance(options.componentView, presentDocs.get('component-view')?.path)
|
|
273
|
+
: createMissingRecord('component-view', 'Component View', '当前批次未生成 component-view。'),
|
|
274
|
+
options.dynamicScenarios
|
|
275
|
+
? buildDynamicScenariosProvenance(options.dynamicScenarios, presentDocs.get('dynamic-scenarios')?.path)
|
|
276
|
+
: createMissingRecord('dynamic-scenarios', 'Dynamic Scenarios', '当前批次未生成 dynamic-scenarios。'),
|
|
277
|
+
options.adrIndex
|
|
278
|
+
? buildAdrProvenance(options.adrIndex, presentDocs.get('docs/adr/index')?.path)
|
|
279
|
+
: createMissingRecord('docs/adr/index', 'ADR Index', '当前批次未生成 ADR 索引。'),
|
|
280
|
+
options.productOverview
|
|
281
|
+
? buildProductOverviewProvenance(options.productOverview, presentDocs.get('product-overview')?.path)
|
|
282
|
+
: (hasCurrentSpec(options.projectRoot)
|
|
283
|
+
? createMissingRecord('product-overview', 'Product Overview', '检测到 current-spec,但当前批次未生成 product-overview。')
|
|
284
|
+
: null),
|
|
285
|
+
options.userJourneys
|
|
286
|
+
? buildUserJourneysProvenance(options.userJourneys, presentDocs.get('user-journeys')?.path)
|
|
287
|
+
: (hasCurrentSpec(options.projectRoot)
|
|
288
|
+
? createMissingRecord('user-journeys', 'User Journeys', '检测到 current-spec,但当前批次未生成 user-journeys。')
|
|
289
|
+
: null),
|
|
290
|
+
options.featureBriefIndex
|
|
291
|
+
? buildFeatureBriefIndexProvenance(options.featureBriefIndex, presentDocs.get('feature-briefs/index')?.path)
|
|
292
|
+
: (hasCurrentSpec(options.projectRoot)
|
|
293
|
+
? createMissingRecord('feature-briefs/index', 'Feature Briefs', '检测到 current-spec,但当前批次未生成 feature briefs 索引。')
|
|
294
|
+
: null),
|
|
295
|
+
].filter((record) => record !== null);
|
|
296
|
+
}
|
|
297
|
+
function buildComponentViewProvenance(output, sourcePath) {
|
|
298
|
+
const componentEntries = output.model.components.flatMap((component) => component.evidence.map((evidence) => ({
|
|
299
|
+
sourceType: mapComponentSourceType(evidence.sourceType),
|
|
300
|
+
originType: evidence.sourceType,
|
|
301
|
+
ref: `${component.name}:${evidence.ref}`,
|
|
302
|
+
path: component.relatedFiles[0],
|
|
303
|
+
note: evidence.note ?? component.summary,
|
|
304
|
+
confidence: normalizeConfidence(component.confidence),
|
|
305
|
+
inferred: Boolean(component.inferred || evidence.inferred),
|
|
306
|
+
})));
|
|
307
|
+
const relationshipEntries = output.model.relationships.flatMap((relationship) => relationship.evidence.map((evidence) => ({
|
|
308
|
+
sourceType: mapComponentSourceType(evidence.sourceType),
|
|
309
|
+
originType: evidence.sourceType,
|
|
310
|
+
ref: `${relationship.fromId}->${relationship.toId}:${relationship.kind}`,
|
|
311
|
+
note: evidence.note ?? relationship.label,
|
|
312
|
+
confidence: normalizeConfidence(relationship.confidence),
|
|
313
|
+
inferred: Boolean(evidence.inferred),
|
|
314
|
+
})));
|
|
315
|
+
return summarizeProvenanceRecord({
|
|
316
|
+
documentId: 'component-view',
|
|
317
|
+
title: output.title,
|
|
318
|
+
sourcePath,
|
|
319
|
+
available: true,
|
|
320
|
+
warnings: output.warnings,
|
|
321
|
+
sections: [
|
|
322
|
+
summarizeProvenanceSection({
|
|
323
|
+
id: 'components',
|
|
324
|
+
title: 'Components',
|
|
325
|
+
summary: `关键组件数: ${output.model.components.length}`,
|
|
326
|
+
entries: componentEntries,
|
|
327
|
+
}),
|
|
328
|
+
summarizeProvenanceSection({
|
|
329
|
+
id: 'relationships',
|
|
330
|
+
title: 'Relationships',
|
|
331
|
+
summary: `关系数: ${output.model.relationships.length}`,
|
|
332
|
+
entries: relationshipEntries,
|
|
333
|
+
}),
|
|
334
|
+
],
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
function buildDynamicScenariosProvenance(output, sourcePath) {
|
|
338
|
+
const scenarioEntries = output.model.scenarios.flatMap((scenario) => scenario.evidence.map((evidence) => ({
|
|
339
|
+
sourceType: mapComponentSourceType(evidence.sourceType),
|
|
340
|
+
originType: evidence.sourceType,
|
|
341
|
+
ref: `${scenario.id}:${evidence.ref}`,
|
|
342
|
+
note: evidence.note ?? scenario.summary,
|
|
343
|
+
confidence: normalizeConfidence(scenario.confidence),
|
|
344
|
+
inferred: Boolean(scenario.inferred || evidence.inferred),
|
|
345
|
+
})));
|
|
346
|
+
const stepEntries = output.model.scenarios.flatMap((scenario) => scenario.steps.flatMap((step) => step.evidence.map((evidence) => ({
|
|
347
|
+
sourceType: mapComponentSourceType(evidence.sourceType),
|
|
348
|
+
originType: evidence.sourceType,
|
|
349
|
+
ref: `${scenario.id}:step-${step.index}:${evidence.ref}`,
|
|
350
|
+
note: `${step.actor} -> ${step.target ?? 'n/a'}: ${step.action}`,
|
|
351
|
+
confidence: normalizeConfidence(step.confidence),
|
|
352
|
+
inferred: Boolean(step.inferred || evidence.inferred),
|
|
353
|
+
}))));
|
|
354
|
+
return summarizeProvenanceRecord({
|
|
355
|
+
documentId: 'dynamic-scenarios',
|
|
356
|
+
title: output.title,
|
|
357
|
+
sourcePath,
|
|
358
|
+
available: true,
|
|
359
|
+
warnings: output.warnings,
|
|
360
|
+
sections: [
|
|
361
|
+
summarizeProvenanceSection({
|
|
362
|
+
id: 'scenarios',
|
|
363
|
+
title: 'Scenarios',
|
|
364
|
+
summary: `场景数: ${output.model.scenarios.length}`,
|
|
365
|
+
entries: scenarioEntries,
|
|
366
|
+
}),
|
|
367
|
+
summarizeProvenanceSection({
|
|
368
|
+
id: 'steps',
|
|
369
|
+
title: 'Steps',
|
|
370
|
+
summary: `步骤数: ${output.model.stats.totalSteps}`,
|
|
371
|
+
entries: stepEntries,
|
|
372
|
+
}),
|
|
373
|
+
],
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
function buildAdrProvenance(output, sourcePath) {
|
|
377
|
+
const draftSections = output.drafts.map((draft) => summarizeProvenanceSection({
|
|
378
|
+
id: draft.decisionId.toLowerCase(),
|
|
379
|
+
title: draft.title,
|
|
380
|
+
summary: draft.summary,
|
|
381
|
+
entries: draft.evidence.map((evidence) => toAdrProvenanceEntry(draft, evidence)),
|
|
382
|
+
}));
|
|
383
|
+
return summarizeProvenanceRecord({
|
|
384
|
+
documentId: 'docs/adr/index',
|
|
385
|
+
title: output.title,
|
|
386
|
+
sourcePath,
|
|
387
|
+
available: true,
|
|
388
|
+
warnings: output.warnings,
|
|
389
|
+
sections: draftSections,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
function buildProductOverviewProvenance(output, sourcePath) {
|
|
393
|
+
return summarizeProvenanceRecord({
|
|
394
|
+
documentId: 'product-overview',
|
|
395
|
+
title: output.title,
|
|
396
|
+
sourcePath,
|
|
397
|
+
available: true,
|
|
398
|
+
warnings: output.warnings,
|
|
399
|
+
sections: [
|
|
400
|
+
summarizeProvenanceSection({
|
|
401
|
+
id: 'summary',
|
|
402
|
+
title: 'Summary',
|
|
403
|
+
summary: `摘要段落: ${output.summary.length}`,
|
|
404
|
+
entries: output.evidence.map((evidence) => toProductProvenanceEntry('overview', evidence, output.confidence)),
|
|
405
|
+
}),
|
|
406
|
+
summarizeProvenanceSection({
|
|
407
|
+
id: 'target-users',
|
|
408
|
+
title: 'Target Users',
|
|
409
|
+
summary: `用户段数: ${output.targetUsers.length}`,
|
|
410
|
+
entries: output.targetUsers.flatMap((user) => user.evidence.map((evidence) => toProductProvenanceEntry(`user:${user.name}`, evidence, user.confidence))),
|
|
411
|
+
}),
|
|
412
|
+
summarizeProvenanceSection({
|
|
413
|
+
id: 'core-scenarios',
|
|
414
|
+
title: 'Core Scenarios',
|
|
415
|
+
summary: `核心场景数: ${output.coreScenarios.length}`,
|
|
416
|
+
entries: output.coreScenarios.flatMap((scenario) => scenario.evidence.map((evidence) => toProductProvenanceEntry(`scenario:${scenario.title}`, evidence, scenario.confidence))),
|
|
417
|
+
}),
|
|
418
|
+
],
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
function buildUserJourneysProvenance(output, sourcePath) {
|
|
422
|
+
return summarizeProvenanceRecord({
|
|
423
|
+
documentId: 'user-journeys',
|
|
424
|
+
title: output.title,
|
|
425
|
+
sourcePath,
|
|
426
|
+
available: true,
|
|
427
|
+
warnings: output.warnings,
|
|
428
|
+
sections: output.journeys.map((journey) => summarizeProvenanceSection({
|
|
429
|
+
id: journey.id,
|
|
430
|
+
title: journey.title,
|
|
431
|
+
summary: `${journey.actor} -> ${journey.goal}`,
|
|
432
|
+
entries: journey.evidence.map((evidence) => toProductProvenanceEntry(journey.id, evidence, journey.confidence)),
|
|
433
|
+
})),
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
function buildFeatureBriefIndexProvenance(output, sourcePath) {
|
|
437
|
+
return summarizeProvenanceRecord({
|
|
438
|
+
documentId: 'feature-briefs/index',
|
|
439
|
+
title: output.title,
|
|
440
|
+
sourcePath,
|
|
441
|
+
available: true,
|
|
442
|
+
warnings: output.warnings,
|
|
443
|
+
sections: output.briefs.map((brief) => summarizeProvenanceSection({
|
|
444
|
+
id: brief.id.toLowerCase(),
|
|
445
|
+
title: brief.title,
|
|
446
|
+
summary: brief.summary,
|
|
447
|
+
entries: brief.evidence.map((evidence) => toProductProvenanceEntry(brief.id, evidence, brief.confidence)),
|
|
448
|
+
})),
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function toProductProvenanceEntry(ref, evidence, confidence) {
|
|
452
|
+
return {
|
|
453
|
+
sourceType: mapProductSourceType(evidence.sourceType),
|
|
454
|
+
originType: evidence.sourceType,
|
|
455
|
+
ref: `${ref}:${evidence.label}`,
|
|
456
|
+
path: evidence.path,
|
|
457
|
+
excerpt: evidence.excerpt,
|
|
458
|
+
confidence: normalizeConfidence(confidence),
|
|
459
|
+
inferred: evidence.inferred,
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function toAdrProvenanceEntry(draft, evidence) {
|
|
463
|
+
return {
|
|
464
|
+
sourceType: mapAdrSourceType(evidence.sourceType),
|
|
465
|
+
originType: evidence.sourceType,
|
|
466
|
+
ref: `${draft.decisionId}:${evidence.label}`,
|
|
467
|
+
path: evidence.path,
|
|
468
|
+
excerpt: evidence.excerpt,
|
|
469
|
+
note: draft.summary,
|
|
470
|
+
confidence: normalizeConfidence(draft.confidence),
|
|
471
|
+
inferred: draft.inferred,
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
function createMissingRecord(documentId, title, reason) {
|
|
475
|
+
return summarizeProvenanceRecord({
|
|
476
|
+
documentId,
|
|
477
|
+
title,
|
|
478
|
+
available: false,
|
|
479
|
+
warnings: [],
|
|
480
|
+
missingReason: reason,
|
|
481
|
+
sections: [],
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function evaluateRequiredDocs(options, presentDocs, dependencyWarnings) {
|
|
485
|
+
const projectKinds = inferProjectKinds(options, presentDocs);
|
|
486
|
+
const manifest = options.docsBundleManifest;
|
|
487
|
+
if (!manifest) {
|
|
488
|
+
dependencyWarnings.push('缺少 docs-bundle manifest,发布覆盖度只能按 partial 模式估算。');
|
|
489
|
+
}
|
|
490
|
+
return REQUIRED_DOC_RULES
|
|
491
|
+
.filter((rule) => rule.requiredBy.some((kind) => projectKinds.has(kind)))
|
|
492
|
+
.map((rule) => {
|
|
493
|
+
const presentDoc = presentDocs.get(rule.docId);
|
|
494
|
+
const includedInBundles = manifest
|
|
495
|
+
? manifest.profiles
|
|
496
|
+
.filter((profile) => profile.documentIds.includes(rule.docId))
|
|
497
|
+
.map((profile) => profile.id)
|
|
498
|
+
: [];
|
|
499
|
+
const missingFromBundles = manifest && presentDoc && includedInBundles.length === 0
|
|
500
|
+
? manifest.profiles.map((profile) => profile.id)
|
|
501
|
+
: [];
|
|
502
|
+
return {
|
|
503
|
+
docId: rule.docId,
|
|
504
|
+
title: rule.title,
|
|
505
|
+
required: true,
|
|
506
|
+
present: Boolean(presentDoc),
|
|
507
|
+
presentPath: presentDoc?.path,
|
|
508
|
+
coverage: presentDoc
|
|
509
|
+
? (manifest && includedInBundles.length === 0 ? 'partial' : 'covered')
|
|
510
|
+
: 'missing',
|
|
511
|
+
requiredBy: [...rule.requiredBy],
|
|
512
|
+
includedInBundles,
|
|
513
|
+
missingFromBundles,
|
|
514
|
+
notes: [
|
|
515
|
+
rule.reason,
|
|
516
|
+
...(manifest
|
|
517
|
+
? (includedInBundles.length === 0 && presentDoc
|
|
518
|
+
? ['文档已生成,但当前 bundle profiles 未包含该文档。']
|
|
519
|
+
: [])
|
|
520
|
+
: ['docs-bundle manifest 不可用,发布覆盖度未完全校验。']),
|
|
521
|
+
],
|
|
522
|
+
};
|
|
523
|
+
})
|
|
524
|
+
.sort((left, right) => left.docId.localeCompare(right.docId));
|
|
525
|
+
}
|
|
526
|
+
function inferProjectKinds(options, presentDocs) {
|
|
527
|
+
const projectKinds = new Set(['general']);
|
|
528
|
+
const hasRuntime = Boolean(options.runtimeTopology?.topology.services.length
|
|
529
|
+
|| options.architectureOverview?.deploymentView?.available);
|
|
530
|
+
const isMonorepo = Boolean(options.projectContext?.workspaceType === 'monorepo'
|
|
531
|
+
|| presentDocs.has('workspace-index')
|
|
532
|
+
|| presentDocs.has('cross-package-analysis'));
|
|
533
|
+
const isHttpApi = presentDocs.has('api-surface');
|
|
534
|
+
const isLibrarySdk = Boolean(looksLikeLibrarySdkProject(options.projectRoot)
|
|
535
|
+
|| presentDocs.has('interface-surface')
|
|
536
|
+
|| (presentDocs.has('data-model') && !hasRuntime && !presentDocs.has('api-surface')));
|
|
537
|
+
const isArchitectureHeavy = Boolean(options.architectureOverview
|
|
538
|
+
|| options.patternHints
|
|
539
|
+
|| options.adrIndex);
|
|
540
|
+
const isProductManaged = Boolean(hasCurrentSpec(options.projectRoot)
|
|
541
|
+
|| presentDocs.has('product-overview')
|
|
542
|
+
|| presentDocs.has('user-journeys')
|
|
543
|
+
|| presentDocs.has('feature-briefs/index'));
|
|
544
|
+
if (hasRuntime) {
|
|
545
|
+
projectKinds.add('runtime-project');
|
|
546
|
+
}
|
|
547
|
+
if (isMonorepo) {
|
|
548
|
+
projectKinds.add('monorepo');
|
|
549
|
+
}
|
|
550
|
+
if (isLibrarySdk) {
|
|
551
|
+
projectKinds.add('library-sdk');
|
|
552
|
+
}
|
|
553
|
+
if (isHttpApi) {
|
|
554
|
+
projectKinds.add('http-api');
|
|
555
|
+
}
|
|
556
|
+
if (isArchitectureHeavy) {
|
|
557
|
+
projectKinds.add('architecture-heavy');
|
|
558
|
+
}
|
|
559
|
+
if (isProductManaged) {
|
|
560
|
+
projectKinds.add('product-managed');
|
|
561
|
+
}
|
|
562
|
+
return projectKinds;
|
|
563
|
+
}
|
|
564
|
+
function looksLikeLibrarySdkProject(projectRoot) {
|
|
565
|
+
return looksLikeNodeLibrary(projectRoot) || looksLikePythonLibrary(projectRoot);
|
|
566
|
+
}
|
|
567
|
+
function looksLikeNodeLibrary(projectRoot) {
|
|
568
|
+
const packageJsonPath = path.join(projectRoot, 'package.json');
|
|
569
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
570
|
+
return false;
|
|
571
|
+
}
|
|
572
|
+
try {
|
|
573
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
574
|
+
if (pkg.exports || pkg.main || pkg.module || pkg.types || pkg.typings) {
|
|
575
|
+
return true;
|
|
576
|
+
}
|
|
577
|
+
const keywords = Array.isArray(pkg.keywords)
|
|
578
|
+
? pkg.keywords.filter((item) => typeof item === 'string')
|
|
579
|
+
: [];
|
|
580
|
+
return keywords.some((keyword) => /(sdk|library|client|plugin|toolkit|api-client)/i.test(keyword));
|
|
581
|
+
}
|
|
582
|
+
catch (err) {
|
|
583
|
+
logger.debug(`JS library 检测失败,降级为 false: ${String(err)}`);
|
|
584
|
+
return false;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function looksLikePythonLibrary(projectRoot) {
|
|
588
|
+
const pyprojectPath = path.join(projectRoot, 'pyproject.toml');
|
|
589
|
+
if (!fs.existsSync(pyprojectPath)) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
try {
|
|
593
|
+
const content = fs.readFileSync(pyprojectPath, 'utf-8');
|
|
594
|
+
return /^\[project\]/m.test(content) || /^\[tool\.poetry\]/m.test(content);
|
|
595
|
+
}
|
|
596
|
+
catch (err) {
|
|
597
|
+
logger.debug(`Python library 检测失败,降级为 false: ${String(err)}`);
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function determineBundleCoverage(requiredDocs, manifest) {
|
|
602
|
+
if (!manifest) {
|
|
603
|
+
return 'partial';
|
|
604
|
+
}
|
|
605
|
+
return requiredDocs.some((doc) => doc.present && doc.includedInBundles.length === 0)
|
|
606
|
+
? 'partial'
|
|
607
|
+
: 'full';
|
|
608
|
+
}
|
|
609
|
+
function detectConflicts(documents) {
|
|
610
|
+
const claims = documents.flatMap((document) => extractTopicClaims(document));
|
|
611
|
+
const records = [];
|
|
612
|
+
for (const topic of Object.keys(TOPIC_PATTERNS)) {
|
|
613
|
+
const topicClaims = claims.filter((claim) => claim.topic === topic);
|
|
614
|
+
const distinctValues = uniqueSorted(topicClaims.map((claim) => claim.canonicalValue));
|
|
615
|
+
if (topicClaims.length < 2 || distinctValues.length < 2) {
|
|
616
|
+
continue;
|
|
617
|
+
}
|
|
618
|
+
const sourceRefs = dedupeConflictSources(topicClaims).slice(0, 4);
|
|
619
|
+
records.push({
|
|
620
|
+
topic,
|
|
621
|
+
severity: severityForTopic(topic),
|
|
622
|
+
summary: `${humanizeTopic(topic)} 在多个来源之间存在不一致:${distinctValues.join(' vs ')}`,
|
|
623
|
+
sources: sourceRefs,
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
return records.sort((left, right) => severityWeight(right.severity) - severityWeight(left.severity)
|
|
627
|
+
|| left.topic.localeCompare(right.topic));
|
|
628
|
+
}
|
|
629
|
+
function collectEvidenceDocuments(options) {
|
|
630
|
+
const documents = [];
|
|
631
|
+
if (options.runtimeTopology?.topology.services.length) {
|
|
632
|
+
documents.push({
|
|
633
|
+
sourceType: 'generated-doc',
|
|
634
|
+
label: 'runtime-topology',
|
|
635
|
+
path: normalizeProjectPath(path.join(options.outputDir, 'runtime-topology.md'), options.projectRoot),
|
|
636
|
+
text: options.runtimeTopology.topology.services.map((service) => [
|
|
637
|
+
service.name,
|
|
638
|
+
service.image,
|
|
639
|
+
service.command ?? '',
|
|
640
|
+
service.dependsOn.map((dependency) => dependency.service).join(' '),
|
|
641
|
+
].join('\n')).join('\n\n'),
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
documents.push({
|
|
645
|
+
sourceType: 'generated-doc',
|
|
646
|
+
label: 'architecture-narrative',
|
|
647
|
+
path: normalizeProjectPath(path.join(options.outputDir, 'architecture-narrative.md'), options.projectRoot),
|
|
648
|
+
text: [
|
|
649
|
+
...options.architectureNarrative.executiveSummary,
|
|
650
|
+
...options.architectureNarrative.observations,
|
|
651
|
+
...options.architectureNarrative.keyModules.map((module) => [
|
|
652
|
+
module.sourceTarget,
|
|
653
|
+
module.intentSummary,
|
|
654
|
+
module.businessSummary,
|
|
655
|
+
module.dependencySummary,
|
|
656
|
+
].join('\n')),
|
|
657
|
+
].join('\n'),
|
|
658
|
+
});
|
|
659
|
+
if (options.patternHints) {
|
|
660
|
+
documents.push({
|
|
661
|
+
sourceType: 'generated-doc',
|
|
662
|
+
label: 'pattern-hints',
|
|
663
|
+
path: normalizeProjectPath(path.join(options.outputDir, 'pattern-hints.md'), options.projectRoot),
|
|
664
|
+
text: options.patternHints.model.matchedPatterns.map((hint) => [
|
|
665
|
+
hint.patternName,
|
|
666
|
+
hint.summary,
|
|
667
|
+
hint.explanation,
|
|
668
|
+
].join('\n')).join('\n\n'),
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
for (const readmePath of findFilesByBasename(options.projectRoot, ['README.md', 'readme.md'])) {
|
|
672
|
+
documents.push({
|
|
673
|
+
sourceType: 'readme',
|
|
674
|
+
label: path.basename(readmePath),
|
|
675
|
+
path: normalizeProjectPath(readmePath, options.projectRoot),
|
|
676
|
+
text: fs.readFileSync(readmePath, 'utf-8'),
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
for (const specPath of findSpecEvidenceFiles(options.projectRoot)) {
|
|
680
|
+
const basename = path.basename(specPath);
|
|
681
|
+
const sourceType = basename === 'current-spec.md'
|
|
682
|
+
? 'current-spec'
|
|
683
|
+
: 'spec';
|
|
684
|
+
documents.push({
|
|
685
|
+
sourceType,
|
|
686
|
+
label: basename,
|
|
687
|
+
path: normalizeProjectPath(specPath, options.projectRoot),
|
|
688
|
+
text: fs.readFileSync(specPath, 'utf-8'),
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
return documents;
|
|
692
|
+
}
|
|
693
|
+
function extractTopicClaims(document) {
|
|
694
|
+
const claims = [];
|
|
695
|
+
for (const topic of Object.keys(TOPIC_PATTERNS)) {
|
|
696
|
+
const matches = TOPIC_PATTERNS[topic]
|
|
697
|
+
.filter((matcher) => matcher.patterns.some((pattern) => pattern.test(document.text)))
|
|
698
|
+
.map((matcher) => matcher.value);
|
|
699
|
+
const canonicalValue = uniqueSorted(matches).join('+');
|
|
700
|
+
if (!canonicalValue) {
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
claims.push({
|
|
704
|
+
topic,
|
|
705
|
+
sourceType: document.sourceType,
|
|
706
|
+
label: document.label,
|
|
707
|
+
path: document.path,
|
|
708
|
+
canonicalValue,
|
|
709
|
+
excerpt: extractExcerpt(document.text, TOPIC_PATTERNS[topic]),
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
return claims;
|
|
713
|
+
}
|
|
714
|
+
function collectPresentDocs(generatedDocs, projectRoot, outputDir) {
|
|
715
|
+
const docs = new Map();
|
|
716
|
+
for (const generatedDoc of generatedDocs) {
|
|
717
|
+
for (const filePath of generatedDoc.writtenFiles.filter((candidate) => candidate.endsWith('.md'))) {
|
|
718
|
+
const docId = toDocumentId(generatedDoc.generatorId, filePath, outputDir);
|
|
719
|
+
if (!docId || !DOC_METADATA[docId]) {
|
|
720
|
+
continue;
|
|
721
|
+
}
|
|
722
|
+
docs.set(docId, {
|
|
723
|
+
id: docId,
|
|
724
|
+
title: DOC_METADATA[docId].title,
|
|
725
|
+
path: normalizeProjectPath(filePath, projectRoot),
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
return docs;
|
|
730
|
+
}
|
|
731
|
+
function collectGeneratedDocWarnings(generatedDocs) {
|
|
732
|
+
return uniqueSorted(generatedDocs.flatMap((doc) => doc.warnings.map((warning) => `${doc.generatorId}: ${warning}`)));
|
|
733
|
+
}
|
|
734
|
+
function toDocumentId(generatorId, filePath, outputDir) {
|
|
735
|
+
if (generatorId === 'adr-pipeline') {
|
|
736
|
+
return filePath.endsWith(path.join('docs', 'adr', 'index.md')) ? 'docs/adr/index' : undefined;
|
|
737
|
+
}
|
|
738
|
+
if (generatorId === 'cross-package-deps') {
|
|
739
|
+
return 'cross-package-analysis';
|
|
740
|
+
}
|
|
741
|
+
if (generatorId === 'quality-report') {
|
|
742
|
+
return 'quality-report';
|
|
743
|
+
}
|
|
744
|
+
if (DOC_METADATA[generatorId]) {
|
|
745
|
+
return generatorId;
|
|
746
|
+
}
|
|
747
|
+
const relative = path.relative(outputDir, filePath).split(path.sep).join('/');
|
|
748
|
+
const matched = Object.entries(DOC_METADATA)
|
|
749
|
+
.find(([, metadata]) => metadata.relativePath === relative);
|
|
750
|
+
return matched?.[0];
|
|
751
|
+
}
|
|
752
|
+
function buildSummaryLines(input) {
|
|
753
|
+
const availableDocs = input.provenance.filter((record) => record.available).length;
|
|
754
|
+
const highCoverageDocs = input.provenance.filter((record) => record.coverage === 'high').length;
|
|
755
|
+
const coveredRequiredDocs = input.requiredDocs.filter((doc) => doc.coverage === 'covered').length;
|
|
756
|
+
const missingRequiredDocs = input.requiredDocs.filter((doc) => doc.coverage === 'missing').length;
|
|
757
|
+
return [
|
|
758
|
+
`Explanation provenance 可用文档 ${availableDocs}/${input.provenance.length},其中高覆盖 ${highCoverageDocs} 份。`,
|
|
759
|
+
input.conflicts.length > 0
|
|
760
|
+
? `检测到 ${input.conflicts.length} 条显式冲突,最高严重级别为 ${input.conflicts[0].severity}。`
|
|
761
|
+
: '未检测到显式冲突记录。',
|
|
762
|
+
`Required docs 覆盖 ${coveredRequiredDocs}/${input.requiredDocs.length},缺失 ${missingRequiredDocs} 份。`,
|
|
763
|
+
input.bundleCoverage === 'full'
|
|
764
|
+
? 'docs bundle manifest 可用,已完成发布覆盖校验。'
|
|
765
|
+
: 'docs bundle manifest 缺失或覆盖不完整,发布覆盖校验按 partial 模式降级。',
|
|
766
|
+
...(input.dependencyWarnings.length > 0
|
|
767
|
+
? [`Dependency warnings: ${input.dependencyWarnings.length} 条。`]
|
|
768
|
+
: []),
|
|
769
|
+
...(input.warnings.length > 0
|
|
770
|
+
? [`General warnings: ${input.warnings.length} 条。`]
|
|
771
|
+
: []),
|
|
772
|
+
];
|
|
773
|
+
}
|
|
774
|
+
function severityForTopic(topic) {
|
|
775
|
+
switch (topic) {
|
|
776
|
+
case 'product-positioning':
|
|
777
|
+
case 'runtime-hosting':
|
|
778
|
+
return 'high';
|
|
779
|
+
case 'protocol-boundary':
|
|
780
|
+
case 'extensibility-boundary':
|
|
781
|
+
return 'medium';
|
|
782
|
+
case 'degradation-strategy':
|
|
783
|
+
default:
|
|
784
|
+
return 'low';
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
function severityWeight(severity) {
|
|
788
|
+
switch (severity) {
|
|
789
|
+
case 'high':
|
|
790
|
+
return 3;
|
|
791
|
+
case 'medium':
|
|
792
|
+
return 2;
|
|
793
|
+
case 'low':
|
|
794
|
+
default:
|
|
795
|
+
return 1;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
function humanizeTopic(topic) {
|
|
799
|
+
switch (topic) {
|
|
800
|
+
case 'product-positioning':
|
|
801
|
+
return '产品定位';
|
|
802
|
+
case 'runtime-hosting':
|
|
803
|
+
return '运行时宿主';
|
|
804
|
+
case 'protocol-boundary':
|
|
805
|
+
return '协议边界';
|
|
806
|
+
case 'extensibility-boundary':
|
|
807
|
+
return '扩展边界';
|
|
808
|
+
case 'degradation-strategy':
|
|
809
|
+
default:
|
|
810
|
+
return '降级策略';
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
function dedupeConflictSources(claims) {
|
|
814
|
+
const seen = new Set();
|
|
815
|
+
const result = [];
|
|
816
|
+
for (const claim of claims) {
|
|
817
|
+
const key = `${claim.topic}:${claim.sourceType}:${claim.label}:${claim.canonicalValue}`;
|
|
818
|
+
if (seen.has(key)) {
|
|
819
|
+
continue;
|
|
820
|
+
}
|
|
821
|
+
seen.add(key);
|
|
822
|
+
result.push({
|
|
823
|
+
sourceType: claim.sourceType,
|
|
824
|
+
label: claim.label,
|
|
825
|
+
canonicalValue: claim.canonicalValue,
|
|
826
|
+
path: claim.path,
|
|
827
|
+
excerpt: claim.excerpt,
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
return result;
|
|
831
|
+
}
|
|
832
|
+
function mapComponentSourceType(sourceType) {
|
|
833
|
+
switch (sourceType) {
|
|
834
|
+
case 'architecture-ir':
|
|
835
|
+
case 'baseline-skeleton':
|
|
836
|
+
return 'code';
|
|
837
|
+
case 'runtime-topology':
|
|
838
|
+
return 'config';
|
|
839
|
+
case 'test-file':
|
|
840
|
+
return 'test';
|
|
841
|
+
case 'module-spec':
|
|
842
|
+
return 'spec';
|
|
843
|
+
case 'architecture-narrative':
|
|
844
|
+
case 'event-surface':
|
|
845
|
+
default:
|
|
846
|
+
return 'generated-doc';
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
function mapAdrSourceType(sourceType) {
|
|
850
|
+
switch (sourceType) {
|
|
851
|
+
case 'current-spec':
|
|
852
|
+
return 'current-spec';
|
|
853
|
+
case 'commit':
|
|
854
|
+
return 'commit';
|
|
855
|
+
case 'spec':
|
|
856
|
+
case 'blueprint':
|
|
857
|
+
return 'spec';
|
|
858
|
+
case 'source-path':
|
|
859
|
+
return 'code';
|
|
860
|
+
case 'architecture-overview':
|
|
861
|
+
case 'architecture-narrative':
|
|
862
|
+
case 'pattern-hints':
|
|
863
|
+
default:
|
|
864
|
+
return 'generated-doc';
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
function mapProductSourceType(sourceType) {
|
|
868
|
+
switch (sourceType) {
|
|
869
|
+
case 'current-spec':
|
|
870
|
+
return 'current-spec';
|
|
871
|
+
case 'readme':
|
|
872
|
+
return 'readme';
|
|
873
|
+
case 'design-doc':
|
|
874
|
+
return 'design-doc';
|
|
875
|
+
case 'issue':
|
|
876
|
+
return 'issue';
|
|
877
|
+
case 'pull-request':
|
|
878
|
+
return 'pull-request';
|
|
879
|
+
case 'commit':
|
|
880
|
+
return 'commit';
|
|
881
|
+
case 'inference':
|
|
882
|
+
return 'inference';
|
|
883
|
+
default:
|
|
884
|
+
return 'generated-doc';
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
function hasReadme(projectRoot) {
|
|
888
|
+
return findFilesByBasename(projectRoot, ['README.md', 'readme.md']).length > 0;
|
|
889
|
+
}
|
|
890
|
+
function hasCurrentSpec(projectRoot) {
|
|
891
|
+
return findSpecEvidenceFiles(projectRoot).some((filePath) => path.basename(filePath) === 'current-spec.md');
|
|
892
|
+
}
|
|
893
|
+
function findSpecEvidenceFiles(projectRoot) {
|
|
894
|
+
const specsDir = path.join(projectRoot, 'specs');
|
|
895
|
+
if (!fs.existsSync(specsDir)) {
|
|
896
|
+
return [];
|
|
897
|
+
}
|
|
898
|
+
const results = [];
|
|
899
|
+
walkDirectory(specsDir, (filePath) => {
|
|
900
|
+
const basename = path.basename(filePath);
|
|
901
|
+
if (basename === 'current-spec.md' || basename === 'spec.md' || basename === 'blueprint.md') {
|
|
902
|
+
results.push(filePath);
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
return results.sort((left, right) => left.localeCompare(right));
|
|
906
|
+
}
|
|
907
|
+
function findFilesByBasename(projectRoot, fileNames) {
|
|
908
|
+
return fileNames
|
|
909
|
+
.map((fileName) => path.join(projectRoot, fileName))
|
|
910
|
+
.filter((candidatePath) => fs.existsSync(candidatePath));
|
|
911
|
+
}
|
|
912
|
+
function walkDirectory(dir, visitor) {
|
|
913
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
914
|
+
if (entry.name === 'node_modules' || entry.name === '.git') {
|
|
915
|
+
continue;
|
|
916
|
+
}
|
|
917
|
+
const fullPath = path.join(dir, entry.name);
|
|
918
|
+
if (entry.isDirectory()) {
|
|
919
|
+
walkDirectory(fullPath, visitor);
|
|
920
|
+
continue;
|
|
921
|
+
}
|
|
922
|
+
if (entry.isFile()) {
|
|
923
|
+
visitor(fullPath);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function extractExcerpt(text, topicPatterns) {
|
|
928
|
+
const lines = text.split('\n').map((line) => line.trim()).filter(Boolean);
|
|
929
|
+
for (const line of lines) {
|
|
930
|
+
if (topicPatterns.some((matcher) => matcher.patterns.some((pattern) => pattern.test(line)))) {
|
|
931
|
+
return line.slice(0, 180);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
return text.trim().slice(0, 180);
|
|
935
|
+
}
|
|
936
|
+
function normalizeProjectPath(candidatePath, projectRoot) {
|
|
937
|
+
const relative = path.relative(projectRoot, candidatePath);
|
|
938
|
+
return relative.startsWith('..')
|
|
939
|
+
? candidatePath.split(path.sep).join('/')
|
|
940
|
+
: relative.split(path.sep).join('/');
|
|
941
|
+
}
|
|
942
|
+
function uniqueSorted(values) {
|
|
943
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
944
|
+
}
|
|
945
|
+
// ============================================================
|
|
946
|
+
// DocumentGenerator Adapter
|
|
947
|
+
// ============================================================
|
|
948
|
+
/**
|
|
949
|
+
* 安全读取 JSON 文件,失败时返回 undefined(各字段均可选)
|
|
950
|
+
*/
|
|
951
|
+
function safeReadJson(filePath) {
|
|
952
|
+
try {
|
|
953
|
+
if (!fs.existsSync(filePath)) {
|
|
954
|
+
return undefined;
|
|
955
|
+
}
|
|
956
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
957
|
+
return JSON.parse(content);
|
|
958
|
+
}
|
|
959
|
+
catch {
|
|
960
|
+
return undefined;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* DocsQualityEvaluatorGenerator
|
|
965
|
+
*
|
|
966
|
+
* 将 evaluateDocsQuality() 适配为 DocumentGenerator 接口。
|
|
967
|
+
* 编排感知型 extract:从 outputDir 读取上游 JSON 产物(各字段均可选)。
|
|
968
|
+
* generate() 无 fs 写出副作用(纯计算)。
|
|
969
|
+
* render() 调用 renderDocsQualityReport() 返回 Markdown 质量报告。
|
|
970
|
+
*
|
|
971
|
+
* 必须最后注册,确保上游 JSON 产物已写出。
|
|
972
|
+
*
|
|
973
|
+
* TInput: EvaluateDocsQualityOptions
|
|
974
|
+
* TOutput: DocsQualityReport
|
|
975
|
+
*/
|
|
976
|
+
export class DocsQualityEvaluatorGenerator {
|
|
977
|
+
id = 'docs-quality-evaluator';
|
|
978
|
+
name = '文档质量评估器';
|
|
979
|
+
description = '聚合评估各上游产物的 provenance、conflict 与 required-doc 覆盖,生成总体质量结论报告';
|
|
980
|
+
outputDir;
|
|
981
|
+
constructor(outputDir) {
|
|
982
|
+
this.outputDir = outputDir;
|
|
983
|
+
}
|
|
984
|
+
isApplicable(context) {
|
|
985
|
+
// 只要项目根目录存在即可适用(上游产物读取为可选)
|
|
986
|
+
return Boolean(context.projectRoot);
|
|
987
|
+
}
|
|
988
|
+
async extract(context) {
|
|
989
|
+
// 编排感知型 extract:从 outputDir 读取上游 JSON 产物,各字段均可选
|
|
990
|
+
const outputDir = this.outputDir;
|
|
991
|
+
// product-ux-docs 产物
|
|
992
|
+
const productOverview = safeReadJson(path.join(outputDir, 'product-overview.json'));
|
|
993
|
+
const userJourneys = safeReadJson(path.join(outputDir, 'user-journeys.json'));
|
|
994
|
+
const featureBriefIndex = safeReadJson(path.join(outputDir, 'feature-briefs', 'index.json'));
|
|
995
|
+
// adr-decision-pipeline 产物
|
|
996
|
+
const adrIndex = safeReadJson(path.join(outputDir, 'docs', 'adr', 'index.json'));
|
|
997
|
+
// 其他上游 Generator 产物
|
|
998
|
+
const architectureOverview = safeReadJson(path.join(outputDir, 'architecture-overview.json'));
|
|
999
|
+
const patternHints = safeReadJson(path.join(outputDir, 'pattern-hints.json'));
|
|
1000
|
+
const componentView = safeReadJson(path.join(outputDir, 'component-view.json'));
|
|
1001
|
+
const dynamicScenarios = safeReadJson(path.join(outputDir, 'dynamic-scenarios.json'));
|
|
1002
|
+
const runtimeTopology = safeReadJson(path.join(outputDir, 'runtime-topology.json'));
|
|
1003
|
+
const docsBundleManifest = safeReadJson(path.join(outputDir, 'docs-bundle-manifest.json'));
|
|
1004
|
+
const dependencyWarnings = safeReadJson(path.join(outputDir, 'dependency-warnings.json'));
|
|
1005
|
+
// 最小化 architectureNarrative(必需字段,无法从 JSON 读取时使用 stub)
|
|
1006
|
+
const architectureNarrative = {
|
|
1007
|
+
title: '',
|
|
1008
|
+
generatedAt: new Date().toISOString().split('T')[0],
|
|
1009
|
+
projectName: '',
|
|
1010
|
+
executiveSummary: [],
|
|
1011
|
+
repositoryMap: [],
|
|
1012
|
+
keyModules: [],
|
|
1013
|
+
keySymbols: [],
|
|
1014
|
+
keyMethods: [],
|
|
1015
|
+
observations: [],
|
|
1016
|
+
supportingDocs: [],
|
|
1017
|
+
};
|
|
1018
|
+
return {
|
|
1019
|
+
projectRoot: context.projectRoot,
|
|
1020
|
+
outputDir,
|
|
1021
|
+
projectContext: context,
|
|
1022
|
+
generatedDocs: [],
|
|
1023
|
+
architectureNarrative,
|
|
1024
|
+
architectureOverview,
|
|
1025
|
+
patternHints,
|
|
1026
|
+
componentView,
|
|
1027
|
+
dynamicScenarios,
|
|
1028
|
+
runtimeTopology,
|
|
1029
|
+
adrIndex,
|
|
1030
|
+
productOverview,
|
|
1031
|
+
userJourneys,
|
|
1032
|
+
featureBriefIndex,
|
|
1033
|
+
docsBundleManifest,
|
|
1034
|
+
dependencyWarnings,
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
async generate(input, _options) {
|
|
1038
|
+
// generate() 为纯计算,无 fs 写出副作用
|
|
1039
|
+
return evaluateDocsQuality(input);
|
|
1040
|
+
}
|
|
1041
|
+
render(output) {
|
|
1042
|
+
return renderDocsQualityReport(output);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
//# sourceMappingURL=docs-quality-evaluator.js.map
|