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,810 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import {
|
|
5
|
+
getLegacyProductEntityPath,
|
|
6
|
+
getLegacyProductQualityReportJsonPath,
|
|
7
|
+
getLegacyProductScorecardReportJsonPath,
|
|
8
|
+
getLegacyProductWorkflowIndexJsonPath,
|
|
9
|
+
getProductCurrentSpecPath,
|
|
10
|
+
getProductEntityPath,
|
|
11
|
+
getProductQualityReportJsonPath,
|
|
12
|
+
getProductScorecardReportJsonPath,
|
|
13
|
+
getProductScorecardReportMarkdownPath,
|
|
14
|
+
getProductWorkflowIndexJsonPath,
|
|
15
|
+
getProductsRoot,
|
|
16
|
+
getScorecardIndexPath,
|
|
17
|
+
toRelativePosix,
|
|
18
|
+
} from './product-artifact-paths.mjs';
|
|
19
|
+
import { patchProductCatalogIndex, patchYamlArtifact } from './product-artifact-patchers.mjs';
|
|
20
|
+
import {
|
|
21
|
+
isObject,
|
|
22
|
+
parseProductMapping,
|
|
23
|
+
slugToTitle,
|
|
24
|
+
toPosix,
|
|
25
|
+
} from './product-governance-helpers.mjs';
|
|
26
|
+
import { appendWarningsSection, dedupeStringValues, escapeMarkdownTableCell } from './script-diagnostics.mjs';
|
|
27
|
+
import { readJsonArtifact, writeJsonArtifact, writeMarkdownArtifact, writeYamlArtifact } from './script-report-io.mjs';
|
|
28
|
+
import { parseYamlDocument } from './simple-yaml.mjs';
|
|
29
|
+
|
|
30
|
+
const SCORECARD_SCHEMA_VERSION = 1;
|
|
31
|
+
export const VALID_RULE_FIELDS = new Set([
|
|
32
|
+
'title',
|
|
33
|
+
'weight',
|
|
34
|
+
'enabled',
|
|
35
|
+
'appliesTo',
|
|
36
|
+
'thresholds',
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
export function generateProductScorecards(options = {}) {
|
|
40
|
+
const projectRoot = path.resolve(options.projectRoot ?? process.cwd());
|
|
41
|
+
const generatedAt = options.generatedAt ?? new Date().toISOString();
|
|
42
|
+
const productsRoot = getProductsRoot(projectRoot);
|
|
43
|
+
const mappingPath = path.join(productsRoot, 'product-mapping.yaml');
|
|
44
|
+
if (!fs.existsSync(mappingPath)) {
|
|
45
|
+
throw new Error(`未找到 product mapping: ${mappingPath}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const mapping = parseProductMapping(fs.readFileSync(mappingPath, 'utf-8'));
|
|
49
|
+
const ruleset = loadScorecardRules(projectRoot);
|
|
50
|
+
const repoMeta = detectRepoMetadata(projectRoot);
|
|
51
|
+
const branchPolicy = detectBranchPolicy(projectRoot);
|
|
52
|
+
const workflowIndex = readWorkflowIndex(projectRoot);
|
|
53
|
+
const scorecardSummaries = [];
|
|
54
|
+
const warnings = [...ruleset.warnings];
|
|
55
|
+
|
|
56
|
+
for (const [productId, productDef] of Object.entries(mapping.products)) {
|
|
57
|
+
const entityPath = fs.existsSync(getProductEntityPath(projectRoot, productId))
|
|
58
|
+
? getProductEntityPath(projectRoot, productId)
|
|
59
|
+
: getLegacyProductEntityPath(projectRoot, productId);
|
|
60
|
+
const entity = fs.existsSync(entityPath)
|
|
61
|
+
? parseYamlDocument(fs.readFileSync(entityPath, 'utf-8'))
|
|
62
|
+
: {};
|
|
63
|
+
const currentSpecPath = getProductCurrentSpecPath(projectRoot, productId);
|
|
64
|
+
const qualityReport = readQualityReport(projectRoot, productId, entity);
|
|
65
|
+
const featureInputs = collectFeatureInputs(projectRoot, productDef.specs);
|
|
66
|
+
const productContext = {
|
|
67
|
+
projectRoot,
|
|
68
|
+
productId,
|
|
69
|
+
productDef,
|
|
70
|
+
entity,
|
|
71
|
+
currentSpecPath,
|
|
72
|
+
currentSpecExists: fs.existsSync(currentSpecPath),
|
|
73
|
+
currentSpecStat: safeStat(currentSpecPath),
|
|
74
|
+
qualityReport,
|
|
75
|
+
featureInputs,
|
|
76
|
+
repoMeta,
|
|
77
|
+
branchPolicy,
|
|
78
|
+
workflowIndex,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const applicableRules = ruleset.rules.filter((rule) => isRuleApplicable(rule, productContext));
|
|
82
|
+
const ruleResults = applicableRules.map((rule) => evaluateRule(rule, productContext));
|
|
83
|
+
const score = calculateOverallScore(ruleResults);
|
|
84
|
+
const status = determineScorecardStatus(ruleResults);
|
|
85
|
+
const summary = buildScorecardSummary(ruleResults, productContext, score, status);
|
|
86
|
+
const report = {
|
|
87
|
+
schemaVersion: SCORECARD_SCHEMA_VERSION,
|
|
88
|
+
generatedAt,
|
|
89
|
+
rulesetId: ruleset.id,
|
|
90
|
+
rulesetTitle: ruleset.title,
|
|
91
|
+
productId,
|
|
92
|
+
productName: productContext.entity.name ?? slugToTitle(productId),
|
|
93
|
+
kind: productContext.entity.kind ?? 'unknown',
|
|
94
|
+
status,
|
|
95
|
+
score,
|
|
96
|
+
summary,
|
|
97
|
+
stats: {
|
|
98
|
+
ruleCount: ruleResults.length,
|
|
99
|
+
passCount: ruleResults.filter((rule) => rule.status === 'pass').length,
|
|
100
|
+
warnCount: ruleResults.filter((rule) => rule.status === 'warn').length,
|
|
101
|
+
failCount: ruleResults.filter((rule) => rule.status === 'fail').length,
|
|
102
|
+
maxWeightedScore: ruleResults.reduce((sum, rule) => sum + rule.weight, 0),
|
|
103
|
+
},
|
|
104
|
+
rules: ruleResults,
|
|
105
|
+
warnings: dedupeStringValues([
|
|
106
|
+
...warnings,
|
|
107
|
+
...ruleResults.flatMap((rule) => rule.warnings ?? []),
|
|
108
|
+
]),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const jsonPath = getProductScorecardReportJsonPath(projectRoot, productId);
|
|
112
|
+
const markdownPath = getProductScorecardReportMarkdownPath(projectRoot, productId);
|
|
113
|
+
writeJsonArtifact(jsonPath, report);
|
|
114
|
+
writeMarkdownArtifact(markdownPath, renderScorecardMarkdown(report));
|
|
115
|
+
|
|
116
|
+
patchEntityScorecard(entityPath, report, projectRoot, productId);
|
|
117
|
+
|
|
118
|
+
scorecardSummaries.push({
|
|
119
|
+
id: productId,
|
|
120
|
+
name: report.productName,
|
|
121
|
+
kind: report.kind,
|
|
122
|
+
status: report.status,
|
|
123
|
+
score: report.score,
|
|
124
|
+
reportPath: toPosix(path.relative(projectRoot, jsonPath)),
|
|
125
|
+
markdownPath: toPosix(path.relative(projectRoot, markdownPath)),
|
|
126
|
+
ruleCount: report.stats.ruleCount,
|
|
127
|
+
passCount: report.stats.passCount,
|
|
128
|
+
warnCount: report.stats.warnCount,
|
|
129
|
+
failCount: report.stats.failCount,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const scorecardIndexPath = getScorecardIndexPath(projectRoot);
|
|
134
|
+
fs.mkdirSync(path.dirname(scorecardIndexPath), { recursive: true });
|
|
135
|
+
const scorecardIndex = {
|
|
136
|
+
schemaVersion: SCORECARD_SCHEMA_VERSION,
|
|
137
|
+
generatedAt,
|
|
138
|
+
rulesetId: ruleset.id,
|
|
139
|
+
productCount: scorecardSummaries.length,
|
|
140
|
+
products: scorecardSummaries,
|
|
141
|
+
warnings: dedupeStringValues(warnings),
|
|
142
|
+
};
|
|
143
|
+
writeYamlArtifact(scorecardIndexPath, scorecardIndex);
|
|
144
|
+
patchCatalogIndex(projectRoot, scorecardSummaries);
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
projectRoot,
|
|
148
|
+
generatedAt,
|
|
149
|
+
rulesetId: ruleset.id,
|
|
150
|
+
scorecardIndexPath: toPosix(path.relative(projectRoot, scorecardIndexPath)),
|
|
151
|
+
products: scorecardSummaries,
|
|
152
|
+
warnings: dedupeStringValues(warnings),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function loadScorecardRules(projectRoot) {
|
|
157
|
+
const libDir = path.dirname(new URL(import.meta.url).pathname);
|
|
158
|
+
const scriptDir = path.dirname(libDir);
|
|
159
|
+
const pluginDir = path.dirname(scriptDir);
|
|
160
|
+
const defaultsDir = path.join(pluginDir, 'scorecards');
|
|
161
|
+
const overrideDir = path.join(projectRoot, '.specify', 'scorecards');
|
|
162
|
+
const warnings = [];
|
|
163
|
+
const ruleMap = new Map();
|
|
164
|
+
let rulesetId = 'default-governance';
|
|
165
|
+
let rulesetTitle = '默认持续治理评分';
|
|
166
|
+
|
|
167
|
+
for (const filePath of listYamlFiles(defaultsDir)) {
|
|
168
|
+
const doc = parseYamlDocument(fs.readFileSync(filePath, 'utf-8'));
|
|
169
|
+
const normalized = normalizeRulesDocument(doc, filePath);
|
|
170
|
+
rulesetId = normalized.id ?? rulesetId;
|
|
171
|
+
rulesetTitle = normalized.title ?? rulesetTitle;
|
|
172
|
+
for (const rule of normalized.rules) {
|
|
173
|
+
ruleMap.set(rule.id, rule);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
for (const filePath of listYamlFiles(overrideDir)) {
|
|
178
|
+
const doc = parseYamlDocument(fs.readFileSync(filePath, 'utf-8'));
|
|
179
|
+
const normalized = normalizeRulesDocument(doc, filePath);
|
|
180
|
+
for (const overrideRule of normalized.rules) {
|
|
181
|
+
const existing = ruleMap.get(overrideRule.id);
|
|
182
|
+
if (!existing) {
|
|
183
|
+
ruleMap.set(overrideRule.id, overrideRule);
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const merged = mergeRule(existing, overrideRule);
|
|
188
|
+
const ignoredFields = Object.keys(overrideRule).filter((key) => !VALID_RULE_FIELDS.has(key) && key !== 'id' && key !== 'evaluator');
|
|
189
|
+
for (const field of ignoredFields) {
|
|
190
|
+
warnings.push(`scorecard override 忽略非 metadata 字段: ${path.basename(filePath)}.${overrideRule.id}.${field}`);
|
|
191
|
+
}
|
|
192
|
+
ruleMap.set(overrideRule.id, merged);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
id: rulesetId,
|
|
198
|
+
title: rulesetTitle,
|
|
199
|
+
rules: Array.from(ruleMap.values()).filter((rule) => rule.enabled !== false),
|
|
200
|
+
warnings,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function normalizeRulesDocument(doc, filePath) {
|
|
205
|
+
const ruleset = isObject(doc.ruleset) ? doc.ruleset : {};
|
|
206
|
+
const id = typeof ruleset.id === 'string' ? ruleset.id : (typeof doc.id === 'string' ? doc.id : null);
|
|
207
|
+
const title = typeof ruleset.title === 'string' ? ruleset.title : (typeof doc.title === 'string' ? doc.title : null);
|
|
208
|
+
const rules = Array.isArray(doc.rules)
|
|
209
|
+
? doc.rules
|
|
210
|
+
.filter((rule) => isObject(rule) && typeof rule.id === 'string' && typeof rule.evaluator === 'string')
|
|
211
|
+
.map((rule) => ({
|
|
212
|
+
id: rule.id,
|
|
213
|
+
title: typeof rule.title === 'string' ? rule.title : slugToTitle(rule.id),
|
|
214
|
+
evaluator: rule.evaluator,
|
|
215
|
+
weight: typeof rule.weight === 'number' ? rule.weight : 10,
|
|
216
|
+
enabled: rule.enabled !== false,
|
|
217
|
+
appliesTo: isObject(rule.appliesTo) ? rule.appliesTo : {},
|
|
218
|
+
thresholds: isObject(rule.thresholds) ? rule.thresholds : {},
|
|
219
|
+
sourcePath: toPosix(filePath),
|
|
220
|
+
}))
|
|
221
|
+
: [];
|
|
222
|
+
|
|
223
|
+
return { id, title, rules };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function mergeRule(base, override) {
|
|
227
|
+
return {
|
|
228
|
+
...base,
|
|
229
|
+
...pickDefined(override, ['title', 'weight', 'enabled']),
|
|
230
|
+
appliesTo: {
|
|
231
|
+
...(isObject(base.appliesTo) ? base.appliesTo : {}),
|
|
232
|
+
...(isObject(override.appliesTo) ? override.appliesTo : {}),
|
|
233
|
+
},
|
|
234
|
+
thresholds: {
|
|
235
|
+
...(isObject(base.thresholds) ? base.thresholds : {}),
|
|
236
|
+
...(isObject(override.thresholds) ? override.thresholds : {}),
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function pickDefined(source, keys) {
|
|
242
|
+
const result = {};
|
|
243
|
+
for (const key of keys) {
|
|
244
|
+
if (source[key] !== undefined) {
|
|
245
|
+
result[key] = source[key];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function isRuleApplicable(rule, productContext) {
|
|
252
|
+
const appliesTo = isObject(rule.appliesTo) ? rule.appliesTo : {};
|
|
253
|
+
const kinds = Array.isArray(appliesTo.kinds) ? appliesTo.kinds : [];
|
|
254
|
+
const productIds = Array.isArray(appliesTo.productIds) ? appliesTo.productIds : [];
|
|
255
|
+
if (kinds.length > 0 && !kinds.includes(productContext.entity.kind)) {
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
if (productIds.length > 0 && !productIds.includes(productContext.productId)) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function evaluateRule(rule, productContext) {
|
|
265
|
+
switch (rule.evaluator) {
|
|
266
|
+
case 'spec-freshness':
|
|
267
|
+
return evaluateSpecFreshness(rule, productContext);
|
|
268
|
+
case 'verification-freshness':
|
|
269
|
+
return evaluateVerificationFreshness(rule, productContext);
|
|
270
|
+
case 'docs-coverage':
|
|
271
|
+
return evaluateDocsCoverage(rule, productContext);
|
|
272
|
+
case 'docs-conflicts':
|
|
273
|
+
return evaluateDocsConflicts(rule, productContext);
|
|
274
|
+
case 'branch-hygiene':
|
|
275
|
+
return evaluateBranchHygiene(rule, productContext);
|
|
276
|
+
case 'workflow-readiness':
|
|
277
|
+
return evaluateWorkflowReadiness(rule, productContext);
|
|
278
|
+
default:
|
|
279
|
+
return buildRuleResult(rule, 'warn', 50, [
|
|
280
|
+
`未知 evaluator: ${rule.evaluator}`,
|
|
281
|
+
], { sourcePath: rule.sourcePath }, [`unknown-evaluator:${rule.evaluator}`]);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function evaluateSpecFreshness(rule, productContext) {
|
|
286
|
+
if (!productContext.currentSpecExists || !productContext.currentSpecStat) {
|
|
287
|
+
return buildRuleResult(rule, 'fail', 0, [
|
|
288
|
+
'缺少 current-spec.md,无法证明产品事实已经同步到当前状态。',
|
|
289
|
+
], { currentSpecPath: relativeProductPath(productContext.currentSpecPath, productContext.projectRoot) });
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const latestSpecTime = maxTime(productContext.featureInputs.map((feature) => feature.specStat?.mtimeMs ?? 0));
|
|
293
|
+
const laggingSpecs = productContext.featureInputs
|
|
294
|
+
.filter((feature) => feature.specStat && feature.specStat.mtimeMs > productContext.currentSpecStat.mtimeMs)
|
|
295
|
+
.map((feature) => feature.id);
|
|
296
|
+
const lagDays = latestSpecTime > 0
|
|
297
|
+
? Math.max(0, daysBetween(productContext.currentSpecStat.mtimeMs, latestSpecTime))
|
|
298
|
+
: 0;
|
|
299
|
+
|
|
300
|
+
if (laggingSpecs.length === 0) {
|
|
301
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
302
|
+
`current-spec 覆盖了全部 ${productContext.featureInputs.length} 个增量 spec。`,
|
|
303
|
+
], { laggingSpecs, lagDays });
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const warnLagDays = Number(rule.thresholds?.warnLagDays ?? 7);
|
|
307
|
+
const failLagDays = Number(rule.thresholds?.failLagDays ?? 30);
|
|
308
|
+
const maxLaggingSpecsWarn = Number(rule.thresholds?.maxLaggingSpecsWarn ?? 2);
|
|
309
|
+
if (lagDays <= warnLagDays && laggingSpecs.length <= maxLaggingSpecsWarn) {
|
|
310
|
+
return buildRuleResult(rule, 'warn', 70, [
|
|
311
|
+
`current-spec 落后于 ${laggingSpecs.length} 个增量 spec,最大滞后约 ${lagDays} 天。`,
|
|
312
|
+
], { laggingSpecs, lagDays });
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const status = lagDays > failLagDays || laggingSpecs.length > maxLaggingSpecsWarn ? 'fail' : 'warn';
|
|
316
|
+
const score = status === 'fail' ? 25 : 60;
|
|
317
|
+
return buildRuleResult(rule, status, score, [
|
|
318
|
+
`current-spec 落后于 ${laggingSpecs.length} 个增量 spec,最大滞后约 ${lagDays} 天。`,
|
|
319
|
+
], { laggingSpecs, lagDays });
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function evaluateVerificationFreshness(rule, productContext) {
|
|
323
|
+
const governedFeatures = productContext.featureInputs.filter((feature) => feature.governed);
|
|
324
|
+
const ignored = {
|
|
325
|
+
blueprint: productContext.featureInputs.filter((feature) => feature.artifactType === 'blueprint').map((feature) => feature.id),
|
|
326
|
+
nonImplemented: productContext.featureInputs
|
|
327
|
+
.filter((feature) => feature.artifactType === 'feature' && !feature.governed)
|
|
328
|
+
.map((feature) => feature.id),
|
|
329
|
+
};
|
|
330
|
+
const total = governedFeatures.length;
|
|
331
|
+
if (total === 0) {
|
|
332
|
+
return buildRuleResult(rule, 'warn', 50, [
|
|
333
|
+
'当前没有纳入治理的已实现增量 spec,verification 新鲜度无法计算。',
|
|
334
|
+
], { totalFeatures: 0, ignored });
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const fresh = [];
|
|
338
|
+
const stale = [];
|
|
339
|
+
const missing = [];
|
|
340
|
+
const failed = [];
|
|
341
|
+
|
|
342
|
+
for (const feature of governedFeatures) {
|
|
343
|
+
if (!feature.verificationPath || !feature.verificationStat) {
|
|
344
|
+
missing.push(feature.id);
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const verificationStatus = parseVerificationStatus(feature.verificationContent);
|
|
349
|
+
const isFresh = !feature.specStat || feature.verificationStat.mtimeMs >= feature.specStat.mtimeMs;
|
|
350
|
+
if (verificationStatus === 'FAIL') {
|
|
351
|
+
failed.push(feature.id);
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if (isFresh) {
|
|
355
|
+
fresh.push(feature.id);
|
|
356
|
+
} else {
|
|
357
|
+
stale.push(feature.id);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
const coverageRatio = fresh.length / total;
|
|
362
|
+
const warnCoverageRatio = Number(rule.thresholds?.warnCoverageRatio ?? 0.8);
|
|
363
|
+
if (fresh.length === total && failed.length === 0) {
|
|
364
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
365
|
+
`全部 ${total} 个纳入治理的已实现增量 spec 都有新鲜的 verification 报告。`,
|
|
366
|
+
], { totalFeatures: total, fresh, stale, missing, failed, coverageRatio, ignored });
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (coverageRatio >= warnCoverageRatio && failed.length === 0) {
|
|
370
|
+
return buildRuleResult(rule, 'warn', Math.round(60 + (coverageRatio * 20)), [
|
|
371
|
+
`verification 覆盖率为 ${formatPercent(coverageRatio)},仍有 ${missing.length + stale.length} 个已实现增量 spec 未通过新鲜度要求。`,
|
|
372
|
+
], { totalFeatures: total, fresh, stale, missing, failed, coverageRatio, ignored });
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return buildRuleResult(rule, 'fail', Math.round(coverageRatio * 40), [
|
|
376
|
+
`verification 覆盖率仅 ${formatPercent(coverageRatio)},缺失 ${missing.length} 个、过期 ${stale.length} 个、失败 ${failed.length} 个已实现增量 spec。`,
|
|
377
|
+
], { totalFeatures: total, fresh, stale, missing, failed, coverageRatio, ignored });
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function evaluateDocsCoverage(rule, productContext) {
|
|
381
|
+
const report = productContext.qualityReport;
|
|
382
|
+
if (!report?.payload) {
|
|
383
|
+
return buildRuleResult(rule, 'warn', 50, [
|
|
384
|
+
'缺少 quality-report.json,暂时无法复用文档质量门的 required docs 统计。',
|
|
385
|
+
], { qualityReportPath: report?.path ?? null });
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
const totalRequired = Number(report.payload.stats?.totalRequiredDocs ?? report.payload.requiredDocs?.length ?? 0);
|
|
389
|
+
const covered = Number(report.payload.stats?.coveredRequiredDocs ?? 0);
|
|
390
|
+
const coverageRatio = totalRequired > 0 ? covered / totalRequired : 0;
|
|
391
|
+
const passCoverageRatio = Number(rule.thresholds?.passCoverageRatio ?? 1);
|
|
392
|
+
const warnCoverageRatio = Number(rule.thresholds?.warnCoverageRatio ?? 0.75);
|
|
393
|
+
|
|
394
|
+
if (coverageRatio >= passCoverageRatio) {
|
|
395
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
396
|
+
`Required docs 覆盖 ${covered}/${totalRequired}。`,
|
|
397
|
+
], { qualityReportPath: report.path, coveredRequiredDocs: covered, totalRequiredDocs: totalRequired, coverageRatio });
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (coverageRatio >= warnCoverageRatio) {
|
|
401
|
+
return buildRuleResult(rule, 'warn', Math.round(coverageRatio * 100), [
|
|
402
|
+
`Required docs 覆盖 ${covered}/${totalRequired},仍有缺口需要补齐。`,
|
|
403
|
+
], { qualityReportPath: report.path, coveredRequiredDocs: covered, totalRequiredDocs: totalRequired, coverageRatio });
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return buildRuleResult(rule, 'fail', Math.round(coverageRatio * 100), [
|
|
407
|
+
`Required docs 覆盖仅 ${covered}/${totalRequired},文档面仍存在明显缺口。`,
|
|
408
|
+
], { qualityReportPath: report.path, coveredRequiredDocs: covered, totalRequiredDocs: totalRequired, coverageRatio });
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function evaluateDocsConflicts(rule, productContext) {
|
|
412
|
+
const report = productContext.qualityReport;
|
|
413
|
+
if (!report?.payload) {
|
|
414
|
+
return buildRuleResult(rule, 'warn', 50, [
|
|
415
|
+
'缺少 quality-report.json,冲突治理暂时只能降级为人工检查。',
|
|
416
|
+
], { qualityReportPath: report?.path ?? null });
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const conflicts = Array.isArray(report.payload.conflicts) ? report.payload.conflicts : [];
|
|
420
|
+
const high = conflicts.filter((conflict) => conflict.severity === 'high').length;
|
|
421
|
+
const medium = conflicts.filter((conflict) => conflict.severity === 'medium').length;
|
|
422
|
+
const low = conflicts.filter((conflict) => conflict.severity === 'low').length;
|
|
423
|
+
|
|
424
|
+
if (high === 0 && medium === 0 && low === 0) {
|
|
425
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
426
|
+
'quality-report 未检测到显式文档冲突。',
|
|
427
|
+
], { qualityReportPath: report.path, totalConflicts: 0, high, medium, low });
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (high > 0) {
|
|
431
|
+
return buildRuleResult(rule, 'fail', Math.max(10, 100 - (high * 35) - (medium * 15) - (low * 8)), [
|
|
432
|
+
`存在 ${high} 条高严重级别冲突,需要先清理事实不一致项。`,
|
|
433
|
+
], { qualityReportPath: report.path, totalConflicts: conflicts.length, high, medium, low });
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return buildRuleResult(rule, 'warn', Math.max(35, 100 - (medium * 15) - (low * 8)), [
|
|
437
|
+
`存在 ${conflicts.length} 条文档冲突(medium=${medium}, low=${low})。`,
|
|
438
|
+
], { qualityReportPath: report.path, totalConflicts: conflicts.length, high, medium, low });
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function evaluateBranchHygiene(rule, productContext) {
|
|
442
|
+
const checks = {
|
|
443
|
+
hasRemote: Boolean(productContext.repoMeta.remote),
|
|
444
|
+
hasDefaultBranch: Boolean(productContext.repoMeta.defaultBranch),
|
|
445
|
+
hasPolicyFile: productContext.branchPolicy.hasPolicyFile,
|
|
446
|
+
agentsDocumented: productContext.branchPolicy.agentsDocumented,
|
|
447
|
+
claudeDocumented: productContext.branchPolicy.claudeDocumented,
|
|
448
|
+
};
|
|
449
|
+
const failedChecks = Object.entries(checks).filter(([, passed]) => !passed).map(([key]) => key);
|
|
450
|
+
|
|
451
|
+
if (failedChecks.length === 0) {
|
|
452
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
453
|
+
'默认分支、远端和分支同步约定都已显式声明。',
|
|
454
|
+
], checks);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
if (checks.hasPolicyFile && (checks.agentsDocumented || checks.claudeDocumented)) {
|
|
458
|
+
return buildRuleResult(rule, 'warn', 70, [
|
|
459
|
+
`分支治理基础存在,但仍缺少 ${failedChecks.join(', ')}。`,
|
|
460
|
+
], { ...checks, failedChecks });
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
return buildRuleResult(rule, 'fail', 20, [
|
|
464
|
+
`分支治理信息不完整,缺少 ${failedChecks.join(', ')}。`,
|
|
465
|
+
], { ...checks, failedChecks });
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function evaluateWorkflowReadiness(rule, productContext) {
|
|
469
|
+
const workflowRefs = Array.isArray(productContext.entity.workflowRefs) ? productContext.entity.workflowRefs : [];
|
|
470
|
+
if (productContext.productId === 'spec-driver') {
|
|
471
|
+
const workflowIds = new Set(Array.isArray(productContext.workflowIndex?.workflows)
|
|
472
|
+
? productContext.workflowIndex.workflows.map((workflow) => workflow.id)
|
|
473
|
+
: []);
|
|
474
|
+
const missing = workflowRefs.filter((ref) => !workflowIds.has(ref));
|
|
475
|
+
const goldenPathCount = Array.isArray(productContext.workflowIndex?.goldenPaths)
|
|
476
|
+
? productContext.workflowIndex.goldenPaths.length
|
|
477
|
+
: 0;
|
|
478
|
+
if (missing.length === 0 && goldenPathCount > 0) {
|
|
479
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
480
|
+
`workflow registry 覆盖了全部 ${workflowRefs.length} 个 workflowRefs,并提供 ${goldenPathCount} 条 golden paths。`,
|
|
481
|
+
], { workflowRefs, missing, goldenPathCount });
|
|
482
|
+
}
|
|
483
|
+
if (missing.length === 0) {
|
|
484
|
+
return buildRuleResult(rule, 'warn', 70, [
|
|
485
|
+
'workflow definitions 存在,但 golden paths 仍不完整。',
|
|
486
|
+
], { workflowRefs, missing, goldenPathCount });
|
|
487
|
+
}
|
|
488
|
+
return buildRuleResult(rule, 'fail', 25, [
|
|
489
|
+
`workflow registry 缺少 ${missing.length} 个 workflowRefs: ${missing.join(', ')}`,
|
|
490
|
+
], { workflowRefs, missing, goldenPathCount });
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
const currentSpecAvailable = Array.isArray(productContext.entity.docs)
|
|
494
|
+
? productContext.entity.docs.some((doc) => doc.id === 'current-spec' && doc.available)
|
|
495
|
+
: false;
|
|
496
|
+
if (workflowRefs.length > 0 && currentSpecAvailable) {
|
|
497
|
+
return buildRuleResult(rule, 'pass', 100, [
|
|
498
|
+
`产品公开了 ${workflowRefs.length} 个入口引用,且 current-spec 可作为消费入口。`,
|
|
499
|
+
], { workflowRefs, currentSpecAvailable });
|
|
500
|
+
}
|
|
501
|
+
if (workflowRefs.length > 0 || currentSpecAvailable) {
|
|
502
|
+
return buildRuleResult(rule, 'warn', 65, [
|
|
503
|
+
'产品已有部分 workflow / 入口事实,但入口与文档绑定还不完整。',
|
|
504
|
+
], { workflowRefs, currentSpecAvailable });
|
|
505
|
+
}
|
|
506
|
+
return buildRuleResult(rule, 'fail', 20, [
|
|
507
|
+
'产品既缺少 workflowRefs,也缺少 current-spec 入口,消费路径不明确。',
|
|
508
|
+
], { workflowRefs, currentSpecAvailable });
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
function buildRuleResult(rule, status, score, summary, evidence, warnings = []) {
|
|
512
|
+
return {
|
|
513
|
+
id: rule.id,
|
|
514
|
+
title: rule.title,
|
|
515
|
+
evaluator: rule.evaluator,
|
|
516
|
+
weight: rule.weight,
|
|
517
|
+
status,
|
|
518
|
+
score,
|
|
519
|
+
summary,
|
|
520
|
+
evidence,
|
|
521
|
+
warnings,
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
function calculateOverallScore(ruleResults) {
|
|
526
|
+
const totalWeight = ruleResults.reduce((sum, rule) => sum + rule.weight, 0);
|
|
527
|
+
if (totalWeight === 0) {
|
|
528
|
+
return 0;
|
|
529
|
+
}
|
|
530
|
+
const weighted = ruleResults.reduce((sum, rule) => sum + (rule.score * rule.weight), 0);
|
|
531
|
+
return Math.round(weighted / totalWeight);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function determineScorecardStatus(ruleResults) {
|
|
535
|
+
if (ruleResults.some((rule) => rule.status === 'fail')) {
|
|
536
|
+
return 'fail';
|
|
537
|
+
}
|
|
538
|
+
if (ruleResults.some((rule) => rule.status === 'warn')) {
|
|
539
|
+
return 'warn';
|
|
540
|
+
}
|
|
541
|
+
return 'pass';
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
function buildScorecardSummary(ruleResults, productContext, score, status) {
|
|
545
|
+
const failCount = ruleResults.filter((rule) => rule.status === 'fail').length;
|
|
546
|
+
const warnCount = ruleResults.filter((rule) => rule.status === 'warn').length;
|
|
547
|
+
return [
|
|
548
|
+
`${productContext.entity.name ?? slugToTitle(productContext.productId)} 当前治理评分为 ${score}/100,整体状态 ${status.toUpperCase()}.`,
|
|
549
|
+
failCount > 0
|
|
550
|
+
? `存在 ${failCount} 条 fail 级规则,需要优先处理。`
|
|
551
|
+
: '没有 fail 级规则。',
|
|
552
|
+
warnCount > 0
|
|
553
|
+
? `另有 ${warnCount} 条 warn 级规则,建议在下一次 sync / release 前收口。`
|
|
554
|
+
: '全部规则均已达到 pass 基线。',
|
|
555
|
+
];
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
function patchEntityScorecard(entityPath, report, projectRoot, productId) {
|
|
559
|
+
patchYamlArtifact(entityPath, (entity) => {
|
|
560
|
+
entity.quality = isObject(entity.quality) ? entity.quality : {};
|
|
561
|
+
entity.quality.scorecard = {
|
|
562
|
+
path: toRelativePosix(projectRoot, getProductScorecardReportJsonPath(projectRoot, productId)),
|
|
563
|
+
status: report.status,
|
|
564
|
+
score: report.score,
|
|
565
|
+
generatedAt: report.generatedAt,
|
|
566
|
+
};
|
|
567
|
+
const sourceRefs = Array.isArray(entity.sourceRefs) ? entity.sourceRefs : [];
|
|
568
|
+
if (!sourceRefs.some((source) => source.kind === 'scorecard-report')) {
|
|
569
|
+
sourceRefs.push({
|
|
570
|
+
kind: 'scorecard-report',
|
|
571
|
+
path: toRelativePosix(projectRoot, getProductScorecardReportJsonPath(projectRoot, productId)),
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
entity.sourceRefs = sourceRefs;
|
|
575
|
+
return entity;
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
function patchCatalogIndex(projectRoot, productSummaries) {
|
|
580
|
+
const scorecardById = new Map(productSummaries.map((product) => [product.id, product]));
|
|
581
|
+
patchProductCatalogIndex(projectRoot, (product) => {
|
|
582
|
+
const summary = scorecardById.get(product.id);
|
|
583
|
+
if (!summary) {
|
|
584
|
+
return product;
|
|
585
|
+
}
|
|
586
|
+
return {
|
|
587
|
+
...product,
|
|
588
|
+
scorecardStatus: summary.status,
|
|
589
|
+
scorecardScore: summary.score,
|
|
590
|
+
};
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function readWorkflowIndex(projectRoot) {
|
|
595
|
+
const candidates = [
|
|
596
|
+
getProductWorkflowIndexJsonPath(projectRoot, 'spec-driver'),
|
|
597
|
+
getLegacyProductWorkflowIndexJsonPath(projectRoot, 'spec-driver'),
|
|
598
|
+
];
|
|
599
|
+
for (const indexPath of candidates) {
|
|
600
|
+
const payload = readJsonArtifact(indexPath);
|
|
601
|
+
if (payload) {
|
|
602
|
+
return payload;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function readQualityReport(projectRoot, productId, entity) {
|
|
609
|
+
const explicitPath = entity?.quality?.report?.path;
|
|
610
|
+
const candidates = [
|
|
611
|
+
explicitPath ? path.join(projectRoot, explicitPath) : null,
|
|
612
|
+
getProductQualityReportJsonPath(projectRoot, productId),
|
|
613
|
+
getLegacyProductQualityReportJsonPath(projectRoot, productId),
|
|
614
|
+
path.join(projectRoot, 'specs', 'quality-report.json'),
|
|
615
|
+
].filter(Boolean);
|
|
616
|
+
|
|
617
|
+
for (const candidate of candidates) {
|
|
618
|
+
if (fs.existsSync(candidate)) {
|
|
619
|
+
const payload = readJsonArtifact(candidate);
|
|
620
|
+
return {
|
|
621
|
+
path: toRelativePosix(projectRoot, candidate),
|
|
622
|
+
payload,
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
return null;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
export function collectFeatureInputs(projectRoot, specs) {
|
|
631
|
+
return specs.map((entry) => {
|
|
632
|
+
const id = typeof entry === 'string' ? entry : entry.id;
|
|
633
|
+
const featureDir = path.join(projectRoot, 'specs', id);
|
|
634
|
+
const specPath = path.join(featureDir, 'spec.md');
|
|
635
|
+
const blueprintPath = path.join(featureDir, 'blueprint.md');
|
|
636
|
+
const artifactPath = fs.existsSync(specPath)
|
|
637
|
+
? specPath
|
|
638
|
+
: (fs.existsSync(blueprintPath) ? blueprintPath : null);
|
|
639
|
+
const verificationPath = path.join(featureDir, 'verification', 'verification-report.md');
|
|
640
|
+
const artifactContent = artifactPath ? fs.readFileSync(artifactPath, 'utf-8') : null;
|
|
641
|
+
const artifactType = fs.existsSync(specPath)
|
|
642
|
+
? 'feature'
|
|
643
|
+
: (fs.existsSync(blueprintPath) ? 'blueprint' : 'missing');
|
|
644
|
+
const status = parseFeatureArtifactStatus(artifactContent);
|
|
645
|
+
const governed = artifactType === 'feature' && /implemented/i.test(status ?? '');
|
|
646
|
+
return {
|
|
647
|
+
id,
|
|
648
|
+
featureDir,
|
|
649
|
+
specPath,
|
|
650
|
+
specStat: safeStat(specPath),
|
|
651
|
+
blueprintPath: fs.existsSync(blueprintPath) ? blueprintPath : null,
|
|
652
|
+
artifactType,
|
|
653
|
+
artifactStatus: status,
|
|
654
|
+
governed,
|
|
655
|
+
verificationPath: fs.existsSync(verificationPath) ? verificationPath : null,
|
|
656
|
+
verificationStat: safeStat(verificationPath),
|
|
657
|
+
verificationContent: fs.existsSync(verificationPath) ? fs.readFileSync(verificationPath, 'utf-8') : null,
|
|
658
|
+
};
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export function safeStat(filePath) {
|
|
663
|
+
try {
|
|
664
|
+
return fs.statSync(filePath);
|
|
665
|
+
} catch {
|
|
666
|
+
return null;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export function parseVerificationStatus(content) {
|
|
671
|
+
if (!content) {
|
|
672
|
+
return 'MISSING';
|
|
673
|
+
}
|
|
674
|
+
const match = content.match(/(?:^[-*]\s*Status:|^\*\*状态\*\*:|^\*\*Status\*\*:|^Status:)\s*(PASS|WARN|FAIL|PARTIAL|N\/A)/im);
|
|
675
|
+
return match ? match[1].toUpperCase() : 'UNKNOWN';
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export function parseFeatureArtifactStatus(content) {
|
|
679
|
+
if (!content) {
|
|
680
|
+
return null;
|
|
681
|
+
}
|
|
682
|
+
const match = content.match(/^\*\*(?:状态|Status)\*\*:\s*(.+)$/im);
|
|
683
|
+
return match ? match[1].trim() : null;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
export function detectRepoMetadata(projectRoot) {
|
|
687
|
+
let remote = null;
|
|
688
|
+
let defaultBranch = null;
|
|
689
|
+
|
|
690
|
+
try {
|
|
691
|
+
remote = execFileSync('git', ['config', '--get', 'remote.origin.url'], {
|
|
692
|
+
cwd: projectRoot,
|
|
693
|
+
encoding: 'utf-8',
|
|
694
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
695
|
+
}).trim() || null;
|
|
696
|
+
} catch {
|
|
697
|
+
remote = null;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
try {
|
|
701
|
+
defaultBranch = execFileSync('git', ['symbolic-ref', 'refs/remotes/origin/HEAD'], {
|
|
702
|
+
cwd: projectRoot,
|
|
703
|
+
encoding: 'utf-8',
|
|
704
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
705
|
+
}).trim().split('/').pop() || null;
|
|
706
|
+
} catch {
|
|
707
|
+
defaultBranch = null;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
return { remote, defaultBranch };
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export function detectBranchPolicy(projectRoot) {
|
|
714
|
+
const policyFile = path.join(projectRoot, 'docs', 'shared', 'agent-branch-sync-policy.md');
|
|
715
|
+
const agentsFile = path.join(projectRoot, 'AGENTS.md');
|
|
716
|
+
const claudeFile = path.join(projectRoot, 'CLAUDE.md');
|
|
717
|
+
const policyContent = fs.existsSync(policyFile) ? fs.readFileSync(policyFile, 'utf-8') : '';
|
|
718
|
+
const agentsContent = fs.existsSync(agentsFile) ? fs.readFileSync(agentsFile, 'utf-8') : '';
|
|
719
|
+
const claudeContent = fs.existsSync(claudeFile) ? fs.readFileSync(claudeFile, 'utf-8') : '';
|
|
720
|
+
|
|
721
|
+
return {
|
|
722
|
+
hasPolicyFile: policyContent.includes('git rebase master'),
|
|
723
|
+
agentsDocumented: agentsContent.includes('BEGIN SHARED SECTION: branch-sync-policy'),
|
|
724
|
+
claudeDocumented: claudeContent.includes('BEGIN SHARED SECTION: branch-sync-policy'),
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export function renderScorecardMarkdown(report) {
|
|
729
|
+
const header = [
|
|
730
|
+
`# ${report.productName} Scorecard Report`,
|
|
731
|
+
'',
|
|
732
|
+
`> **Product**: ${report.productId}`,
|
|
733
|
+
`> **Ruleset**: ${report.rulesetTitle} (${report.rulesetId})`,
|
|
734
|
+
`> **Generated**: ${report.generatedAt}`,
|
|
735
|
+
`> **Status**: ${report.status.toUpperCase()}`,
|
|
736
|
+
`> **Score**: ${report.score}/100`,
|
|
737
|
+
'',
|
|
738
|
+
'## Summary',
|
|
739
|
+
'',
|
|
740
|
+
...report.summary.map((line) => `- ${line}`),
|
|
741
|
+
'',
|
|
742
|
+
'## Rule Breakdown',
|
|
743
|
+
'',
|
|
744
|
+
'| Rule | Status | Score | Weight | Key Evidence |',
|
|
745
|
+
'| --- | --- | --- | --- | --- |',
|
|
746
|
+
...report.rules.map((rule) => {
|
|
747
|
+
const evidence = summarizeEvidence(rule.evidence);
|
|
748
|
+
return `| ${rule.title} | ${rule.status.toUpperCase()} | ${rule.score} | ${rule.weight} | ${escapeMarkdownTableCell(evidence)} |`;
|
|
749
|
+
}),
|
|
750
|
+
'',
|
|
751
|
+
'## Rule Details',
|
|
752
|
+
'',
|
|
753
|
+
];
|
|
754
|
+
|
|
755
|
+
const sections = report.rules.flatMap((rule) => ([
|
|
756
|
+
`### ${rule.title}`,
|
|
757
|
+
'',
|
|
758
|
+
`- Evaluator: \`${rule.evaluator}\``,
|
|
759
|
+
`- Status: ${rule.status.toUpperCase()}`,
|
|
760
|
+
`- Score: ${rule.score} / 100`,
|
|
761
|
+
`- Weight: ${rule.weight}`,
|
|
762
|
+
...rule.summary.map((line) => `- ${line}`),
|
|
763
|
+
'',
|
|
764
|
+
'```json',
|
|
765
|
+
JSON.stringify(rule.evidence, null, 2),
|
|
766
|
+
'```',
|
|
767
|
+
'',
|
|
768
|
+
]));
|
|
769
|
+
|
|
770
|
+
appendWarningsSection(sections, report.warnings);
|
|
771
|
+
|
|
772
|
+
return [...header, ...sections].join('\n');
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export function summarizeEvidence(evidence) {
|
|
776
|
+
if (!isObject(evidence)) {
|
|
777
|
+
return '[无]';
|
|
778
|
+
}
|
|
779
|
+
const pairs = Object.entries(evidence)
|
|
780
|
+
.filter(([, value]) => value !== undefined && value !== null && value !== '')
|
|
781
|
+
.slice(0, 3)
|
|
782
|
+
.map(([key, value]) => `${key}=${Array.isArray(value) ? value.length : value}`);
|
|
783
|
+
return pairs.length > 0 ? pairs.join(', ') : '[无]';
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export function relativeProductPath(filePath, projectRoot) {
|
|
787
|
+
return filePath ? toPosix(path.relative(projectRoot, filePath)) : null;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export function maxTime(values) {
|
|
791
|
+
return values.reduce((max, value) => value > max ? value : max, 0);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export function daysBetween(older, newer) {
|
|
795
|
+
return Math.round((newer - older) / (1000 * 60 * 60 * 24));
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export function formatPercent(value) {
|
|
799
|
+
return `${Math.round(value * 100)}%`;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export function listYamlFiles(dirPath) {
|
|
803
|
+
if (!fs.existsSync(dirPath)) {
|
|
804
|
+
return [];
|
|
805
|
+
}
|
|
806
|
+
return fs.readdirSync(dirPath)
|
|
807
|
+
.filter((fileName) => fileName.endsWith('.yaml') || fileName.endsWith('.yml'))
|
|
808
|
+
.map((fileName) => path.join(dirPath, fileName))
|
|
809
|
+
.sort((left, right) => left.localeCompare(right));
|
|
810
|
+
}
|