@libar-dev/architect 1.0.0-pre.3
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/CHANGELOG.md +50 -0
- package/LICENSE +25 -0
- package/LICENSE-MCP +62 -0
- package/README.md +147 -0
- package/dist/api/arch-queries.d.ts +95 -0
- package/dist/api/arch-queries.d.ts.map +1 -0
- package/dist/api/arch-queries.js +310 -0
- package/dist/api/arch-queries.js.map +1 -0
- package/dist/api/context-assembler.d.ts +124 -0
- package/dist/api/context-assembler.d.ts.map +1 -0
- package/dist/api/context-assembler.js +472 -0
- package/dist/api/context-assembler.js.map +1 -0
- package/dist/api/context-formatter.d.ts +26 -0
- package/dist/api/context-formatter.d.ts.map +1 -0
- package/dist/api/context-formatter.js +183 -0
- package/dist/api/context-formatter.js.map +1 -0
- package/dist/api/coverage-analyzer.d.ts +38 -0
- package/dist/api/coverage-analyzer.d.ts.map +1 -0
- package/dist/api/coverage-analyzer.js +117 -0
- package/dist/api/coverage-analyzer.js.map +1 -0
- package/dist/api/fuzzy-match.d.ts +75 -0
- package/dist/api/fuzzy-match.d.ts.map +1 -0
- package/dist/api/fuzzy-match.js +150 -0
- package/dist/api/fuzzy-match.js.map +1 -0
- package/dist/api/handoff-generator.d.ts +45 -0
- package/dist/api/handoff-generator.d.ts.map +1 -0
- package/dist/api/handoff-generator.js +139 -0
- package/dist/api/handoff-generator.js.map +1 -0
- package/dist/api/index.d.ts +61 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +54 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/pattern-helpers.d.ts +51 -0
- package/dist/api/pattern-helpers.d.ts.map +1 -0
- package/dist/api/pattern-helpers.js +84 -0
- package/dist/api/pattern-helpers.js.map +1 -0
- package/dist/api/process-state.d.ts +224 -0
- package/dist/api/process-state.d.ts.map +1 -0
- package/dist/api/process-state.js +308 -0
- package/dist/api/process-state.js.map +1 -0
- package/dist/api/rules-query.d.ts +60 -0
- package/dist/api/rules-query.d.ts.map +1 -0
- package/dist/api/rules-query.js +154 -0
- package/dist/api/rules-query.js.map +1 -0
- package/dist/api/scope-validator.d.ts +56 -0
- package/dist/api/scope-validator.d.ts.map +1 -0
- package/dist/api/scope-validator.js +293 -0
- package/dist/api/scope-validator.js.map +1 -0
- package/dist/api/stub-resolver.d.ts +117 -0
- package/dist/api/stub-resolver.d.ts.map +1 -0
- package/dist/api/stub-resolver.js +154 -0
- package/dist/api/stub-resolver.js.map +1 -0
- package/dist/api/summarize.d.ts +75 -0
- package/dist/api/summarize.d.ts.map +1 -0
- package/dist/api/summarize.js +97 -0
- package/dist/api/summarize.js.map +1 -0
- package/dist/api/types.d.ts +221 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +57 -0
- package/dist/api/types.js.map +1 -0
- package/dist/cache/file-cache.d.ts +72 -0
- package/dist/cache/file-cache.d.ts.map +1 -0
- package/dist/cache/file-cache.js +80 -0
- package/dist/cache/file-cache.js.map +1 -0
- package/dist/cache/index.d.ts +5 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +5 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cli/cli-schema.d.ts +83 -0
- package/dist/cli/cli-schema.d.ts.map +1 -0
- package/dist/cli/cli-schema.js +505 -0
- package/dist/cli/cli-schema.js.map +1 -0
- package/dist/cli/dataset-cache.d.ts +66 -0
- package/dist/cli/dataset-cache.d.ts.map +1 -0
- package/dist/cli/dataset-cache.js +179 -0
- package/dist/cli/dataset-cache.js.map +1 -0
- package/dist/cli/error-handler.d.ts +84 -0
- package/dist/cli/error-handler.d.ts.map +1 -0
- package/dist/cli/error-handler.js +197 -0
- package/dist/cli/error-handler.js.map +1 -0
- package/dist/cli/generate-docs.d.ts +30 -0
- package/dist/cli/generate-docs.d.ts.map +1 -0
- package/dist/cli/generate-docs.js +370 -0
- package/dist/cli/generate-docs.js.map +1 -0
- package/dist/cli/lint-patterns.d.ts +57 -0
- package/dist/cli/lint-patterns.d.ts.map +1 -0
- package/dist/cli/lint-patterns.js +257 -0
- package/dist/cli/lint-patterns.js.map +1 -0
- package/dist/cli/lint-process.d.ts +54 -0
- package/dist/cli/lint-process.d.ts.map +1 -0
- package/dist/cli/lint-process.js +319 -0
- package/dist/cli/lint-process.js.map +1 -0
- package/dist/cli/lint-steps.d.ts +32 -0
- package/dist/cli/lint-steps.d.ts.map +1 -0
- package/dist/cli/lint-steps.js +172 -0
- package/dist/cli/lint-steps.js.map +1 -0
- package/dist/cli/mcp-server.d.ts +22 -0
- package/dist/cli/mcp-server.d.ts.map +1 -0
- package/dist/cli/mcp-server.js +57 -0
- package/dist/cli/mcp-server.js.map +1 -0
- package/dist/cli/output-pipeline.d.ts +130 -0
- package/dist/cli/output-pipeline.d.ts.map +1 -0
- package/dist/cli/output-pipeline.js +234 -0
- package/dist/cli/output-pipeline.js.map +1 -0
- package/dist/cli/process-api.d.ts +37 -0
- package/dist/cli/process-api.d.ts.map +1 -0
- package/dist/cli/process-api.js +1550 -0
- package/dist/cli/process-api.js.map +1 -0
- package/dist/cli/repl.d.ts +38 -0
- package/dist/cli/repl.d.ts.map +1 -0
- package/dist/cli/repl.js +239 -0
- package/dist/cli/repl.js.map +1 -0
- package/dist/cli/validate-patterns.d.ts +115 -0
- package/dist/cli/validate-patterns.d.ts.map +1 -0
- package/dist/cli/validate-patterns.js +707 -0
- package/dist/cli/validate-patterns.js.map +1 -0
- package/dist/cli/version.d.ts +35 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +64 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/config/config-loader.d.ts +167 -0
- package/dist/config/config-loader.d.ts.map +1 -0
- package/dist/config/config-loader.js +294 -0
- package/dist/config/config-loader.js.map +1 -0
- package/dist/config/defaults.d.ts +92 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +103 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/define-config.d.ts +37 -0
- package/dist/config/define-config.d.ts.map +1 -0
- package/dist/config/define-config.js +38 -0
- package/dist/config/define-config.js.map +1 -0
- package/dist/config/factory.d.ts +79 -0
- package/dist/config/factory.d.ts.map +1 -0
- package/dist/config/factory.js +116 -0
- package/dist/config/factory.js.map +1 -0
- package/dist/config/index.d.ts +45 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +48 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/merge-sources.d.ts +47 -0
- package/dist/config/merge-sources.d.ts.map +1 -0
- package/dist/config/merge-sources.js +61 -0
- package/dist/config/merge-sources.js.map +1 -0
- package/dist/config/presets.d.ts +115 -0
- package/dist/config/presets.d.ts.map +1 -0
- package/dist/config/presets.js +119 -0
- package/dist/config/presets.js.map +1 -0
- package/dist/config/project-config-schema.d.ts +192 -0
- package/dist/config/project-config-schema.d.ts.map +1 -0
- package/dist/config/project-config-schema.js +231 -0
- package/dist/config/project-config-schema.js.map +1 -0
- package/dist/config/project-config.d.ts +229 -0
- package/dist/config/project-config.d.ts.map +1 -0
- package/dist/config/project-config.js +37 -0
- package/dist/config/project-config.js.map +1 -0
- package/dist/config/regex-builders.d.ts +49 -0
- package/dist/config/regex-builders.d.ts.map +1 -0
- package/dist/config/regex-builders.js +85 -0
- package/dist/config/regex-builders.js.map +1 -0
- package/dist/config/resolve-config.d.ts +65 -0
- package/dist/config/resolve-config.d.ts.map +1 -0
- package/dist/config/resolve-config.js +150 -0
- package/dist/config/resolve-config.js.map +1 -0
- package/dist/config/types.d.ts +81 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +22 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/workflow-loader.d.ts +90 -0
- package/dist/config/workflow-loader.d.ts.map +1 -0
- package/dist/config/workflow-loader.js +167 -0
- package/dist/config/workflow-loader.js.map +1 -0
- package/dist/extractor/doc-extractor.d.ts +233 -0
- package/dist/extractor/doc-extractor.d.ts.map +1 -0
- package/dist/extractor/doc-extractor.js +481 -0
- package/dist/extractor/doc-extractor.js.map +1 -0
- package/dist/extractor/dual-source-extractor.d.ts +161 -0
- package/dist/extractor/dual-source-extractor.d.ts.map +1 -0
- package/dist/extractor/dual-source-extractor.js +407 -0
- package/dist/extractor/dual-source-extractor.js.map +1 -0
- package/dist/extractor/gherkin-extractor.d.ts +170 -0
- package/dist/extractor/gherkin-extractor.d.ts.map +1 -0
- package/dist/extractor/gherkin-extractor.js +543 -0
- package/dist/extractor/gherkin-extractor.js.map +1 -0
- package/dist/extractor/index.d.ts +7 -0
- package/dist/extractor/index.d.ts.map +1 -0
- package/dist/extractor/index.js +11 -0
- package/dist/extractor/index.js.map +1 -0
- package/dist/extractor/layer-inference.d.ts +66 -0
- package/dist/extractor/layer-inference.d.ts.map +1 -0
- package/dist/extractor/layer-inference.js +93 -0
- package/dist/extractor/layer-inference.js.map +1 -0
- package/dist/extractor/shape-extractor.d.ts +79 -0
- package/dist/extractor/shape-extractor.d.ts.map +1 -0
- package/dist/extractor/shape-extractor.js +966 -0
- package/dist/extractor/shape-extractor.js.map +1 -0
- package/dist/generators/built-in/cli-recipe-generator.d.ts +30 -0
- package/dist/generators/built-in/cli-recipe-generator.d.ts.map +1 -0
- package/dist/generators/built-in/cli-recipe-generator.js +155 -0
- package/dist/generators/built-in/cli-recipe-generator.js.map +1 -0
- package/dist/generators/built-in/codec-generators.d.ts +29 -0
- package/dist/generators/built-in/codec-generators.d.ts.map +1 -0
- package/dist/generators/built-in/codec-generators.js +195 -0
- package/dist/generators/built-in/codec-generators.js.map +1 -0
- package/dist/generators/built-in/decision-doc-generator.d.ts +204 -0
- package/dist/generators/built-in/decision-doc-generator.d.ts.map +1 -0
- package/dist/generators/built-in/decision-doc-generator.js +654 -0
- package/dist/generators/built-in/decision-doc-generator.js.map +1 -0
- package/dist/generators/built-in/design-review-generator.d.ts +26 -0
- package/dist/generators/built-in/design-review-generator.d.ts.map +1 -0
- package/dist/generators/built-in/design-review-generator.js +94 -0
- package/dist/generators/built-in/design-review-generator.js.map +1 -0
- package/dist/generators/built-in/index.d.ts +22 -0
- package/dist/generators/built-in/index.d.ts.map +1 -0
- package/dist/generators/built-in/index.js +23 -0
- package/dist/generators/built-in/index.js.map +1 -0
- package/dist/generators/built-in/process-api-reference-generator.d.ts +18 -0
- package/dist/generators/built-in/process-api-reference-generator.d.ts.map +1 -0
- package/dist/generators/built-in/process-api-reference-generator.js +85 -0
- package/dist/generators/built-in/process-api-reference-generator.js.map +1 -0
- package/dist/generators/built-in/reference-generators.d.ts +51 -0
- package/dist/generators/built-in/reference-generators.d.ts.map +1 -0
- package/dist/generators/built-in/reference-generators.js +320 -0
- package/dist/generators/built-in/reference-generators.js.map +1 -0
- package/dist/generators/codec-based.d.ts +63 -0
- package/dist/generators/codec-based.d.ts.map +1 -0
- package/dist/generators/codec-based.js +88 -0
- package/dist/generators/codec-based.js.map +1 -0
- package/dist/generators/content-deduplicator.d.ts +114 -0
- package/dist/generators/content-deduplicator.d.ts.map +1 -0
- package/dist/generators/content-deduplicator.js +356 -0
- package/dist/generators/content-deduplicator.js.map +1 -0
- package/dist/generators/index.d.ts +50 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +54 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/generators/orchestrator.d.ts +265 -0
- package/dist/generators/orchestrator.d.ts.map +1 -0
- package/dist/generators/orchestrator.js +570 -0
- package/dist/generators/orchestrator.js.map +1 -0
- package/dist/generators/pipeline/build-pipeline.d.ts +131 -0
- package/dist/generators/pipeline/build-pipeline.d.ts.map +1 -0
- package/dist/generators/pipeline/build-pipeline.js +248 -0
- package/dist/generators/pipeline/build-pipeline.js.map +1 -0
- package/dist/generators/pipeline/context-inference.d.ts +55 -0
- package/dist/generators/pipeline/context-inference.d.ts.map +1 -0
- package/dist/generators/pipeline/context-inference.js +76 -0
- package/dist/generators/pipeline/context-inference.js.map +1 -0
- package/dist/generators/pipeline/index.d.ts +27 -0
- package/dist/generators/pipeline/index.d.ts.map +1 -0
- package/dist/generators/pipeline/index.js +34 -0
- package/dist/generators/pipeline/index.js.map +1 -0
- package/dist/generators/pipeline/merge-patterns.d.ts +33 -0
- package/dist/generators/pipeline/merge-patterns.d.ts.map +1 -0
- package/dist/generators/pipeline/merge-patterns.js +50 -0
- package/dist/generators/pipeline/merge-patterns.js.map +1 -0
- package/dist/generators/pipeline/relationship-resolver.d.ts +47 -0
- package/dist/generators/pipeline/relationship-resolver.d.ts.map +1 -0
- package/dist/generators/pipeline/relationship-resolver.js +132 -0
- package/dist/generators/pipeline/relationship-resolver.js.map +1 -0
- package/dist/generators/pipeline/sequence-utils.d.ts +49 -0
- package/dist/generators/pipeline/sequence-utils.d.ts.map +1 -0
- package/dist/generators/pipeline/sequence-utils.js +235 -0
- package/dist/generators/pipeline/sequence-utils.js.map +1 -0
- package/dist/generators/pipeline/transform-dataset.d.ts +82 -0
- package/dist/generators/pipeline/transform-dataset.d.ts.map +1 -0
- package/dist/generators/pipeline/transform-dataset.js +355 -0
- package/dist/generators/pipeline/transform-dataset.js.map +1 -0
- package/dist/generators/pipeline/transform-types.d.ts +96 -0
- package/dist/generators/pipeline/transform-types.d.ts.map +1 -0
- package/dist/generators/pipeline/transform-types.js +18 -0
- package/dist/generators/pipeline/transform-types.js.map +1 -0
- package/dist/generators/registry.d.ts +64 -0
- package/dist/generators/registry.d.ts.map +1 -0
- package/dist/generators/registry.js +77 -0
- package/dist/generators/registry.js.map +1 -0
- package/dist/generators/source-mapper.d.ts +143 -0
- package/dist/generators/source-mapper.d.ts.map +1 -0
- package/dist/generators/source-mapper.js +602 -0
- package/dist/generators/source-mapper.js.map +1 -0
- package/dist/generators/source-mapping-validator.d.ts +118 -0
- package/dist/generators/source-mapping-validator.d.ts.map +1 -0
- package/dist/generators/source-mapping-validator.js +334 -0
- package/dist/generators/source-mapping-validator.js.map +1 -0
- package/dist/generators/types.d.ts +104 -0
- package/dist/generators/types.d.ts.map +1 -0
- package/dist/generators/types.js +5 -0
- package/dist/generators/types.js.map +1 -0
- package/dist/generators/warning-collector.d.ts +144 -0
- package/dist/generators/warning-collector.d.ts.map +1 -0
- package/dist/generators/warning-collector.js +166 -0
- package/dist/generators/warning-collector.js.map +1 -0
- package/dist/git/branch-diff.d.ts +44 -0
- package/dist/git/branch-diff.d.ts.map +1 -0
- package/dist/git/branch-diff.js +57 -0
- package/dist/git/branch-diff.js.map +1 -0
- package/dist/git/helpers.d.ts +46 -0
- package/dist/git/helpers.d.ts.map +1 -0
- package/dist/git/helpers.js +67 -0
- package/dist/git/helpers.js.map +1 -0
- package/dist/git/index.d.ts +18 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +18 -0
- package/dist/git/index.js.map +1 -0
- package/dist/git/name-status.d.ts +32 -0
- package/dist/git/name-status.d.ts.map +1 -0
- package/dist/git/name-status.js +66 -0
- package/dist/git/name-status.js.map +1 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +122 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/engine.d.ts +113 -0
- package/dist/lint/engine.d.ts.map +1 -0
- package/dist/lint/engine.js +228 -0
- package/dist/lint/engine.js.map +1 -0
- package/dist/lint/index.d.ts +26 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +24 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/lint/process-guard/decider.d.ts +166 -0
- package/dist/lint/process-guard/decider.d.ts.map +1 -0
- package/dist/lint/process-guard/decider.js +412 -0
- package/dist/lint/process-guard/decider.js.map +1 -0
- package/dist/lint/process-guard/derive-state.d.ts +96 -0
- package/dist/lint/process-guard/derive-state.d.ts.map +1 -0
- package/dist/lint/process-guard/derive-state.js +368 -0
- package/dist/lint/process-guard/derive-state.js.map +1 -0
- package/dist/lint/process-guard/detect-changes.d.ts +109 -0
- package/dist/lint/process-guard/detect-changes.d.ts.map +1 -0
- package/dist/lint/process-guard/detect-changes.js +487 -0
- package/dist/lint/process-guard/detect-changes.js.map +1 -0
- package/dist/lint/process-guard/index.d.ts +35 -0
- package/dist/lint/process-guard/index.d.ts.map +1 -0
- package/dist/lint/process-guard/index.js +39 -0
- package/dist/lint/process-guard/index.js.map +1 -0
- package/dist/lint/process-guard/types.d.ts +255 -0
- package/dist/lint/process-guard/types.d.ts.map +1 -0
- package/dist/lint/process-guard/types.js +31 -0
- package/dist/lint/process-guard/types.js.map +1 -0
- package/dist/lint/rules.d.ts +147 -0
- package/dist/lint/rules.d.ts.map +1 -0
- package/dist/lint/rules.js +289 -0
- package/dist/lint/rules.js.map +1 -0
- package/dist/lint/steps/cross-checks.d.ts +66 -0
- package/dist/lint/steps/cross-checks.d.ts.map +1 -0
- package/dist/lint/steps/cross-checks.js +290 -0
- package/dist/lint/steps/cross-checks.js.map +1 -0
- package/dist/lint/steps/feature-checks.d.ts +78 -0
- package/dist/lint/steps/feature-checks.d.ts.map +1 -0
- package/dist/lint/steps/feature-checks.js +279 -0
- package/dist/lint/steps/feature-checks.js.map +1 -0
- package/dist/lint/steps/index.d.ts +22 -0
- package/dist/lint/steps/index.d.ts.map +1 -0
- package/dist/lint/steps/index.js +26 -0
- package/dist/lint/steps/index.js.map +1 -0
- package/dist/lint/steps/pair-resolver.d.ts +29 -0
- package/dist/lint/steps/pair-resolver.d.ts.map +1 -0
- package/dist/lint/steps/pair-resolver.js +76 -0
- package/dist/lint/steps/pair-resolver.js.map +1 -0
- package/dist/lint/steps/runner.d.ts +28 -0
- package/dist/lint/steps/runner.d.ts.map +1 -0
- package/dist/lint/steps/runner.js +143 -0
- package/dist/lint/steps/runner.js.map +1 -0
- package/dist/lint/steps/step-checks.d.ts +41 -0
- package/dist/lint/steps/step-checks.d.ts.map +1 -0
- package/dist/lint/steps/step-checks.js +164 -0
- package/dist/lint/steps/step-checks.js.map +1 -0
- package/dist/lint/steps/types.d.ts +95 -0
- package/dist/lint/steps/types.d.ts.map +1 -0
- package/dist/lint/steps/types.js +79 -0
- package/dist/lint/steps/types.js.map +1 -0
- package/dist/lint/steps/utils.d.ts +22 -0
- package/dist/lint/steps/utils.d.ts.map +1 -0
- package/dist/lint/steps/utils.js +57 -0
- package/dist/lint/steps/utils.js.map +1 -0
- package/dist/mcp/file-watcher.d.ts +24 -0
- package/dist/mcp/file-watcher.d.ts.map +1 -0
- package/dist/mcp/file-watcher.js +75 -0
- package/dist/mcp/file-watcher.js.map +1 -0
- package/dist/mcp/index.d.ts +19 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +21 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/pipeline-session.d.ts +33 -0
- package/dist/mcp/pipeline-session.d.ts.map +1 -0
- package/dist/mcp/pipeline-session.js +149 -0
- package/dist/mcp/pipeline-session.js.map +1 -0
- package/dist/mcp/server.d.ts +28 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +197 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +4 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +525 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/renderable/codecs/adr.d.ts +4730 -0
- package/dist/renderable/codecs/adr.d.ts.map +1 -0
- package/dist/renderable/codecs/adr.js +590 -0
- package/dist/renderable/codecs/adr.js.map +1 -0
- package/dist/renderable/codecs/architecture.d.ts +4760 -0
- package/dist/renderable/codecs/architecture.d.ts.map +1 -0
- package/dist/renderable/codecs/architecture.js +524 -0
- package/dist/renderable/codecs/architecture.js.map +1 -0
- package/dist/renderable/codecs/business-rules.d.ts +4777 -0
- package/dist/renderable/codecs/business-rules.d.ts.map +1 -0
- package/dist/renderable/codecs/business-rules.js +648 -0
- package/dist/renderable/codecs/business-rules.js.map +1 -0
- package/dist/renderable/codecs/claude-module.d.ts +4710 -0
- package/dist/renderable/codecs/claude-module.d.ts.map +1 -0
- package/dist/renderable/codecs/claude-module.js +214 -0
- package/dist/renderable/codecs/claude-module.js.map +1 -0
- package/dist/renderable/codecs/composite.d.ts +84 -0
- package/dist/renderable/codecs/composite.d.ts.map +1 -0
- package/dist/renderable/codecs/composite.js +124 -0
- package/dist/renderable/codecs/composite.js.map +1 -0
- package/dist/renderable/codecs/convention-extractor.d.ts +105 -0
- package/dist/renderable/codecs/convention-extractor.d.ts.map +1 -0
- package/dist/renderable/codecs/convention-extractor.js +353 -0
- package/dist/renderable/codecs/convention-extractor.js.map +1 -0
- package/dist/renderable/codecs/decision-doc.d.ts +308 -0
- package/dist/renderable/codecs/decision-doc.d.ts.map +1 -0
- package/dist/renderable/codecs/decision-doc.js +485 -0
- package/dist/renderable/codecs/decision-doc.js.map +1 -0
- package/dist/renderable/codecs/design-review.d.ts +55 -0
- package/dist/renderable/codecs/design-review.d.ts.map +1 -0
- package/dist/renderable/codecs/design-review.js +532 -0
- package/dist/renderable/codecs/design-review.js.map +1 -0
- package/dist/renderable/codecs/diagram-utils.d.ts +62 -0
- package/dist/renderable/codecs/diagram-utils.d.ts.map +1 -0
- package/dist/renderable/codecs/diagram-utils.js +70 -0
- package/dist/renderable/codecs/diagram-utils.js.map +1 -0
- package/dist/renderable/codecs/helpers.d.ts +553 -0
- package/dist/renderable/codecs/helpers.d.ts.map +1 -0
- package/dist/renderable/codecs/helpers.js +913 -0
- package/dist/renderable/codecs/helpers.js.map +1 -0
- package/dist/renderable/codecs/index-codec.d.ts +4714 -0
- package/dist/renderable/codecs/index-codec.d.ts.map +1 -0
- package/dist/renderable/codecs/index-codec.js +250 -0
- package/dist/renderable/codecs/index-codec.js.map +1 -0
- package/dist/renderable/codecs/index.d.ts +46 -0
- package/dist/renderable/codecs/index.d.ts.map +1 -0
- package/dist/renderable/codecs/index.js +70 -0
- package/dist/renderable/codecs/index.js.map +1 -0
- package/dist/renderable/codecs/patterns.d.ts +4757 -0
- package/dist/renderable/codecs/patterns.d.ts.map +1 -0
- package/dist/renderable/codecs/patterns.js +462 -0
- package/dist/renderable/codecs/patterns.js.map +1 -0
- package/dist/renderable/codecs/planning.d.ts +14055 -0
- package/dist/renderable/codecs/planning.d.ts.map +1 -0
- package/dist/renderable/codecs/planning.js +449 -0
- package/dist/renderable/codecs/planning.js.map +1 -0
- package/dist/renderable/codecs/pr-changes.d.ts +4742 -0
- package/dist/renderable/codecs/pr-changes.d.ts.map +1 -0
- package/dist/renderable/codecs/pr-changes.js +425 -0
- package/dist/renderable/codecs/pr-changes.js.map +1 -0
- package/dist/renderable/codecs/reference.d.ts +215 -0
- package/dist/renderable/codecs/reference.d.ts.map +1 -0
- package/dist/renderable/codecs/reference.js +1578 -0
- package/dist/renderable/codecs/reference.js.map +1 -0
- package/dist/renderable/codecs/reporting.d.ts +14026 -0
- package/dist/renderable/codecs/reporting.d.ts.map +1 -0
- package/dist/renderable/codecs/reporting.js +365 -0
- package/dist/renderable/codecs/reporting.js.map +1 -0
- package/dist/renderable/codecs/requirements.d.ts +4743 -0
- package/dist/renderable/codecs/requirements.d.ts.map +1 -0
- package/dist/renderable/codecs/requirements.js +428 -0
- package/dist/renderable/codecs/requirements.js.map +1 -0
- package/dist/renderable/codecs/session.d.ts +9410 -0
- package/dist/renderable/codecs/session.d.ts.map +1 -0
- package/dist/renderable/codecs/session.js +848 -0
- package/dist/renderable/codecs/session.js.map +1 -0
- package/dist/renderable/codecs/shape-matcher.d.ts +54 -0
- package/dist/renderable/codecs/shape-matcher.d.ts.map +1 -0
- package/dist/renderable/codecs/shape-matcher.js +106 -0
- package/dist/renderable/codecs/shape-matcher.js.map +1 -0
- package/dist/renderable/codecs/shared-schema.d.ts +44 -0
- package/dist/renderable/codecs/shared-schema.d.ts.map +1 -0
- package/dist/renderable/codecs/shared-schema.js +43 -0
- package/dist/renderable/codecs/shared-schema.js.map +1 -0
- package/dist/renderable/codecs/taxonomy.d.ts +4733 -0
- package/dist/renderable/codecs/taxonomy.d.ts.map +1 -0
- package/dist/renderable/codecs/taxonomy.js +570 -0
- package/dist/renderable/codecs/taxonomy.js.map +1 -0
- package/dist/renderable/codecs/timeline.d.ts +14094 -0
- package/dist/renderable/codecs/timeline.d.ts.map +1 -0
- package/dist/renderable/codecs/timeline.js +906 -0
- package/dist/renderable/codecs/timeline.js.map +1 -0
- package/dist/renderable/codecs/types/base.d.ts +81 -0
- package/dist/renderable/codecs/types/base.d.ts.map +1 -0
- package/dist/renderable/codecs/types/base.js +56 -0
- package/dist/renderable/codecs/types/base.js.map +1 -0
- package/dist/renderable/codecs/types/index.d.ts +5 -0
- package/dist/renderable/codecs/types/index.d.ts.map +1 -0
- package/dist/renderable/codecs/types/index.js +5 -0
- package/dist/renderable/codecs/types/index.js.map +1 -0
- package/dist/renderable/codecs/validation-rules.d.ts +4773 -0
- package/dist/renderable/codecs/validation-rules.d.ts.map +1 -0
- package/dist/renderable/codecs/validation-rules.js +537 -0
- package/dist/renderable/codecs/validation-rules.js.map +1 -0
- package/dist/renderable/generate.d.ts +338 -0
- package/dist/renderable/generate.d.ts.map +1 -0
- package/dist/renderable/generate.js +437 -0
- package/dist/renderable/generate.js.map +1 -0
- package/dist/renderable/index.d.ts +36 -0
- package/dist/renderable/index.d.ts.map +1 -0
- package/dist/renderable/index.js +58 -0
- package/dist/renderable/index.js.map +1 -0
- package/dist/renderable/load-preamble.d.ts +56 -0
- package/dist/renderable/load-preamble.d.ts.map +1 -0
- package/dist/renderable/load-preamble.js +298 -0
- package/dist/renderable/load-preamble.js.map +1 -0
- package/dist/renderable/render.d.ts +61 -0
- package/dist/renderable/render.d.ts.map +1 -0
- package/dist/renderable/render.js +346 -0
- package/dist/renderable/render.js.map +1 -0
- package/dist/renderable/schema.d.ts +194 -0
- package/dist/renderable/schema.d.ts.map +1 -0
- package/dist/renderable/schema.js +197 -0
- package/dist/renderable/schema.js.map +1 -0
- package/dist/renderable/utils.d.ts +146 -0
- package/dist/renderable/utils.d.ts.map +1 -0
- package/dist/renderable/utils.js +362 -0
- package/dist/renderable/utils.js.map +1 -0
- package/dist/scanner/ast-parser.d.ts +75 -0
- package/dist/scanner/ast-parser.d.ts.map +1 -0
- package/dist/scanner/ast-parser.js +835 -0
- package/dist/scanner/ast-parser.js.map +1 -0
- package/dist/scanner/gherkin-ast-parser.d.ts +166 -0
- package/dist/scanner/gherkin-ast-parser.d.ts.map +1 -0
- package/dist/scanner/gherkin-ast-parser.js +507 -0
- package/dist/scanner/gherkin-ast-parser.js.map +1 -0
- package/dist/scanner/gherkin-scanner.d.ts +106 -0
- package/dist/scanner/gherkin-scanner.d.ts.map +1 -0
- package/dist/scanner/gherkin-scanner.js +149 -0
- package/dist/scanner/gherkin-scanner.js.map +1 -0
- package/dist/scanner/index.d.ts +85 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +102 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/pattern-scanner.d.ts +83 -0
- package/dist/scanner/pattern-scanner.d.ts.map +1 -0
- package/dist/scanner/pattern-scanner.js +110 -0
- package/dist/scanner/pattern-scanner.js.map +1 -0
- package/dist/taxonomy/categories.d.ts +47 -0
- package/dist/taxonomy/categories.d.ts.map +1 -0
- package/dist/taxonomy/categories.js +175 -0
- package/dist/taxonomy/categories.js.map +1 -0
- package/dist/taxonomy/claude-section-values.d.ts +12 -0
- package/dist/taxonomy/claude-section-values.d.ts.map +1 -0
- package/dist/taxonomy/claude-section-values.js +17 -0
- package/dist/taxonomy/claude-section-values.js.map +1 -0
- package/dist/taxonomy/conventions.d.ts +13 -0
- package/dist/taxonomy/conventions.d.ts.map +1 -0
- package/dist/taxonomy/conventions.js +27 -0
- package/dist/taxonomy/conventions.js.map +1 -0
- package/dist/taxonomy/deliverable-status.d.ts +99 -0
- package/dist/taxonomy/deliverable-status.d.ts.map +1 -0
- package/dist/taxonomy/deliverable-status.js +131 -0
- package/dist/taxonomy/deliverable-status.js.map +1 -0
- package/dist/taxonomy/format-types.d.ts +17 -0
- package/dist/taxonomy/format-types.d.ts.map +1 -0
- package/dist/taxonomy/format-types.js +23 -0
- package/dist/taxonomy/format-types.js.map +1 -0
- package/dist/taxonomy/generator-options.d.ts +67 -0
- package/dist/taxonomy/generator-options.d.ts.map +1 -0
- package/dist/taxonomy/generator-options.js +75 -0
- package/dist/taxonomy/generator-options.js.map +1 -0
- package/dist/taxonomy/hierarchy-levels.d.ts +23 -0
- package/dist/taxonomy/hierarchy-levels.d.ts.map +1 -0
- package/dist/taxonomy/hierarchy-levels.js +22 -0
- package/dist/taxonomy/hierarchy-levels.js.map +1 -0
- package/dist/taxonomy/index.d.ts +35 -0
- package/dist/taxonomy/index.d.ts.map +1 -0
- package/dist/taxonomy/index.js +56 -0
- package/dist/taxonomy/index.js.map +1 -0
- package/dist/taxonomy/layer-types.d.ts +22 -0
- package/dist/taxonomy/layer-types.d.ts.map +1 -0
- package/dist/taxonomy/layer-types.js +28 -0
- package/dist/taxonomy/layer-types.js.map +1 -0
- package/dist/taxonomy/normalized-status.d.ts +99 -0
- package/dist/taxonomy/normalized-status.d.ts.map +1 -0
- package/dist/taxonomy/normalized-status.js +113 -0
- package/dist/taxonomy/normalized-status.js.map +1 -0
- package/dist/taxonomy/registry-builder.d.ts +104 -0
- package/dist/taxonomy/registry-builder.d.ts.map +1 -0
- package/dist/taxonomy/registry-builder.js +561 -0
- package/dist/taxonomy/registry-builder.js.map +1 -0
- package/dist/taxonomy/risk-levels.d.ts +16 -0
- package/dist/taxonomy/risk-levels.d.ts.map +1 -0
- package/dist/taxonomy/risk-levels.js +15 -0
- package/dist/taxonomy/risk-levels.js.map +1 -0
- package/dist/taxonomy/severity-types.d.ts +6 -0
- package/dist/taxonomy/severity-types.d.ts.map +1 -0
- package/dist/taxonomy/severity-types.js +5 -0
- package/dist/taxonomy/severity-types.js.map +1 -0
- package/dist/taxonomy/status-values.d.ts +39 -0
- package/dist/taxonomy/status-values.d.ts.map +1 -0
- package/dist/taxonomy/status-values.js +42 -0
- package/dist/taxonomy/status-values.js.map +1 -0
- package/dist/types/branded.d.ts +89 -0
- package/dist/types/branded.d.ts.map +1 -0
- package/dist/types/branded.js +57 -0
- package/dist/types/branded.js.map +1 -0
- package/dist/types/errors.d.ts +342 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +251 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +41 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/result.d.ts +78 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/result.js +78 -0
- package/dist/types/result.js.map +1 -0
- package/dist/utils/collection-utils.d.ts +49 -0
- package/dist/utils/collection-utils.d.ts.map +1 -0
- package/dist/utils/collection-utils.js +58 -0
- package/dist/utils/collection-utils.js.map +1 -0
- package/dist/utils/id-utils.d.ts +46 -0
- package/dist/utils/id-utils.d.ts.map +1 -0
- package/dist/utils/id-utils.js +51 -0
- package/dist/utils/id-utils.js.map +1 -0
- package/dist/utils/index.d.ts +21 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +21 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/string-utils.d.ts +150 -0
- package/dist/utils/string-utils.d.ts.map +1 -0
- package/dist/utils/string-utils.js +281 -0
- package/dist/utils/string-utils.js.map +1 -0
- package/dist/validation/anti-patterns.d.ts +134 -0
- package/dist/validation/anti-patterns.d.ts.map +1 -0
- package/dist/validation/anti-patterns.js +307 -0
- package/dist/validation/anti-patterns.js.map +1 -0
- package/dist/validation/dod-validator.d.ts +94 -0
- package/dist/validation/dod-validator.d.ts.map +1 -0
- package/dist/validation/dod-validator.js +198 -0
- package/dist/validation/dod-validator.js.map +1 -0
- package/dist/validation/fsm/index.d.ts +59 -0
- package/dist/validation/fsm/index.d.ts.map +1 -0
- package/dist/validation/fsm/index.js +64 -0
- package/dist/validation/fsm/index.js.map +1 -0
- package/dist/validation/fsm/states.d.ts +93 -0
- package/dist/validation/fsm/states.d.ts.map +1 -0
- package/dist/validation/fsm/states.js +98 -0
- package/dist/validation/fsm/states.js.map +1 -0
- package/dist/validation/fsm/transitions.d.ts +100 -0
- package/dist/validation/fsm/transitions.d.ts.map +1 -0
- package/dist/validation/fsm/transitions.js +122 -0
- package/dist/validation/fsm/transitions.js.map +1 -0
- package/dist/validation/fsm/validator.d.ts +163 -0
- package/dist/validation/fsm/validator.d.ts.map +1 -0
- package/dist/validation/fsm/validator.js +205 -0
- package/dist/validation/fsm/validator.js.map +1 -0
- package/dist/validation/index.d.ts +23 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +25 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/types.d.ts +136 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +56 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation-schemas/codec-utils.d.ts +188 -0
- package/dist/validation-schemas/codec-utils.d.ts.map +1 -0
- package/dist/validation-schemas/codec-utils.js +258 -0
- package/dist/validation-schemas/codec-utils.js.map +1 -0
- package/dist/validation-schemas/config.d.ts +99 -0
- package/dist/validation-schemas/config.d.ts.map +1 -0
- package/dist/validation-schemas/config.js +178 -0
- package/dist/validation-schemas/config.js.map +1 -0
- package/dist/validation-schemas/doc-directive.d.ts +195 -0
- package/dist/validation-schemas/doc-directive.d.ts.map +1 -0
- package/dist/validation-schemas/doc-directive.js +239 -0
- package/dist/validation-schemas/doc-directive.js.map +1 -0
- package/dist/validation-schemas/dual-source.d.ts +167 -0
- package/dist/validation-schemas/dual-source.d.ts.map +1 -0
- package/dist/validation-schemas/dual-source.js +168 -0
- package/dist/validation-schemas/dual-source.js.map +1 -0
- package/dist/validation-schemas/export-info.d.ts +53 -0
- package/dist/validation-schemas/export-info.d.ts.map +1 -0
- package/dist/validation-schemas/export-info.js +101 -0
- package/dist/validation-schemas/export-info.js.map +1 -0
- package/dist/validation-schemas/extracted-pattern.d.ts +351 -0
- package/dist/validation-schemas/extracted-pattern.d.ts.map +1 -0
- package/dist/validation-schemas/extracted-pattern.js +459 -0
- package/dist/validation-schemas/extracted-pattern.js.map +1 -0
- package/dist/validation-schemas/extracted-shape.d.ts +200 -0
- package/dist/validation-schemas/extracted-shape.d.ts.map +1 -0
- package/dist/validation-schemas/extracted-shape.js +182 -0
- package/dist/validation-schemas/extracted-shape.js.map +1 -0
- package/dist/validation-schemas/feature.d.ts +554 -0
- package/dist/validation-schemas/feature.d.ts.map +1 -0
- package/dist/validation-schemas/feature.js +262 -0
- package/dist/validation-schemas/feature.js.map +1 -0
- package/dist/validation-schemas/index.d.ts +15 -0
- package/dist/validation-schemas/index.d.ts.map +1 -0
- package/dist/validation-schemas/index.js +32 -0
- package/dist/validation-schemas/index.js.map +1 -0
- package/dist/validation-schemas/lint.d.ts +46 -0
- package/dist/validation-schemas/lint.d.ts.map +1 -0
- package/dist/validation-schemas/lint.js +45 -0
- package/dist/validation-schemas/lint.js.map +1 -0
- package/dist/validation-schemas/master-dataset.d.ts +8299 -0
- package/dist/validation-schemas/master-dataset.d.ts.map +1 -0
- package/dist/validation-schemas/master-dataset.js +275 -0
- package/dist/validation-schemas/master-dataset.js.map +1 -0
- package/dist/validation-schemas/output-schemas.d.ts +183 -0
- package/dist/validation-schemas/output-schemas.d.ts.map +1 -0
- package/dist/validation-schemas/output-schemas.js +149 -0
- package/dist/validation-schemas/output-schemas.js.map +1 -0
- package/dist/validation-schemas/scenario-ref.d.ts +80 -0
- package/dist/validation-schemas/scenario-ref.d.ts.map +1 -0
- package/dist/validation-schemas/scenario-ref.js +73 -0
- package/dist/validation-schemas/scenario-ref.js.map +1 -0
- package/dist/validation-schemas/tag-registry.d.ts +210 -0
- package/dist/validation-schemas/tag-registry.d.ts.map +1 -0
- package/dist/validation-schemas/tag-registry.js +248 -0
- package/dist/validation-schemas/tag-registry.js.map +1 -0
- package/dist/validation-schemas/workflow-config.d.ts +125 -0
- package/dist/validation-schemas/workflow-config.d.ts.map +1 -0
- package/dist/validation-schemas/workflow-config.js +138 -0
- package/dist/validation-schemas/workflow-config.js.map +1 -0
- package/docs/ANNOTATION-GUIDE.md +271 -0
- package/docs/ARCHITECTURE.md +1636 -0
- package/docs/CONFIGURATION.md +337 -0
- package/docs/DOCS-GAP-ANALYSIS.md +811 -0
- package/docs/GHERKIN-PATTERNS.md +366 -0
- package/docs/INDEX.md +345 -0
- package/docs/MCP-SETUP.md +140 -0
- package/docs/METHODOLOGY.md +240 -0
- package/docs/PROCESS-API.md +65 -0
- package/docs/PROCESS-GUARD.md +341 -0
- package/docs/SESSION-GUIDES.md +391 -0
- package/docs/TAXONOMY.md +106 -0
- package/docs/VALIDATION.md +418 -0
- package/docs-live/ARCHITECTURE.md +362 -0
- package/docs-live/BUSINESS-RULES.md +24 -0
- package/docs-live/CHANGELOG-GENERATED.md +375 -0
- package/docs-live/DECISIONS.md +78 -0
- package/docs-live/INDEX.md +231 -0
- package/docs-live/PRODUCT-AREAS.md +255 -0
- package/docs-live/TAXONOMY.md +202 -0
- package/docs-live/VALIDATION-RULES.md +119 -0
- package/docs-live/_claude-md/annotation/annotation-overview.md +26 -0
- package/docs-live/_claude-md/annotation/annotation-reference.md +213 -0
- package/docs-live/_claude-md/architecture/architecture-codecs.md +160 -0
- package/docs-live/_claude-md/architecture/architecture-types.md +32 -0
- package/docs-live/_claude-md/architecture/reference-sample.md +162 -0
- package/docs-live/_claude-md/authoring/gherkin-authoring-guide.md +245 -0
- package/docs-live/_claude-md/configuration/configuration-guide.md +216 -0
- package/docs-live/_claude-md/configuration/configuration-overview.md +37 -0
- package/docs-live/_claude-md/core-types/core-types-overview.md +20 -0
- package/docs-live/_claude-md/data-api/data-api-overview.md +39 -0
- package/docs-live/_claude-md/generation/generation-overview.md +30 -0
- package/docs-live/_claude-md/process/process-overview.md +127 -0
- package/docs-live/_claude-md/validation/process-guard.md +185 -0
- package/docs-live/_claude-md/validation/validation-overview.md +37 -0
- package/docs-live/_claude-md/validation/validation-tools-guide.md +242 -0
- package/docs-live/_claude-md/workflow/session-workflow-guide.md +141 -0
- package/docs-live/business-rules/annotation.md +1462 -0
- package/docs-live/business-rules/configuration.md +465 -0
- package/docs-live/business-rules/core-types.md +531 -0
- package/docs-live/business-rules/data-api.md +1403 -0
- package/docs-live/business-rules/generation.md +4726 -0
- package/docs-live/business-rules/process.md +122 -0
- package/docs-live/business-rules/validation.md +998 -0
- package/docs-live/decisions/adr-001-taxonomy-canonical-values.md +197 -0
- package/docs-live/decisions/adr-002-gherkin-only-testing.md +57 -0
- package/docs-live/decisions/adr-003-source-first-pattern-architecture.md +147 -0
- package/docs-live/decisions/adr-004-session-workflow-commands.md +137 -0
- package/docs-live/decisions/adr-005-codec-based-markdown-rendering.md +150 -0
- package/docs-live/decisions/adr-006-single-read-model-architecture.md +136 -0
- package/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md +489 -0
- package/docs-live/product-areas/ANNOTATION.md +591 -0
- package/docs-live/product-areas/CONFIGURATION.md +1048 -0
- package/docs-live/product-areas/CORE-TYPES.md +221 -0
- package/docs-live/product-areas/DATA-API.md +850 -0
- package/docs-live/product-areas/GENERATION.md +1200 -0
- package/docs-live/product-areas/PROCESS.md +351 -0
- package/docs-live/product-areas/VALIDATION.md +1135 -0
- package/docs-live/reference/ANNOTATION-REFERENCE.md +232 -0
- package/docs-live/reference/ARCHITECTURE-CODECS.md +675 -0
- package/docs-live/reference/ARCHITECTURE-TYPES.md +436 -0
- package/docs-live/reference/CONFIGURATION-GUIDE.md +235 -0
- package/docs-live/reference/GHERKIN-AUTHORING-GUIDE.md +270 -0
- package/docs-live/reference/PROCESS-API-RECIPES.md +476 -0
- package/docs-live/reference/PROCESS-API-REFERENCE.md +63 -0
- package/docs-live/reference/PROCESS-GUARD-REFERENCE.md +258 -0
- package/docs-live/reference/REFERENCE-SAMPLE.md +1135 -0
- package/docs-live/reference/SESSION-WORKFLOW-GUIDE.md +384 -0
- package/docs-live/reference/VALIDATION-TOOLS-GUIDE.md +263 -0
- package/docs-live/taxonomy/categories.md +33 -0
- package/docs-live/taxonomy/format-types.md +67 -0
- package/docs-live/taxonomy/metadata-tags.md +693 -0
- package/docs-live/validation/error-catalog.md +78 -0
- package/docs-live/validation/fsm-transitions.md +50 -0
- package/docs-live/validation/protection-levels.md +51 -0
- package/package.json +233 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @architect
|
|
4
|
+
* @architect-cli
|
|
5
|
+
* @architect-pattern ValidatePatternsCLI
|
|
6
|
+
* @architect-status completed
|
|
7
|
+
* @architect-uses PatternScanner, GherkinScanner, DocExtractor, GherkinExtractor, MasterDataset, CodecUtils
|
|
8
|
+
* @architect-extract-shapes ValidateCLIConfig, ValidationIssue, ValidationSummary
|
|
9
|
+
*
|
|
10
|
+
* ## ValidatePatternsCLI - Cross-Source Pattern Validator
|
|
11
|
+
*
|
|
12
|
+
* Cross-validates TypeScript patterns vs Gherkin feature files.
|
|
13
|
+
* Ensures consistency between code annotations and feature specifications.
|
|
14
|
+
*
|
|
15
|
+
* ### Exit Codes
|
|
16
|
+
*
|
|
17
|
+
* - `0` - No errors
|
|
18
|
+
* - `1` - Errors found
|
|
19
|
+
* - `2` - Warnings found (with --strict)
|
|
20
|
+
*
|
|
21
|
+
* ### When to Use
|
|
22
|
+
*
|
|
23
|
+
* - Pre-commit validation to ensure code and feature files stay in sync
|
|
24
|
+
* - CI pipeline to catch documentation drift early
|
|
25
|
+
* - Strict mode (`--strict`) for production readiness checks
|
|
26
|
+
*/
|
|
27
|
+
// ─── Error Convention ───────────────────────────────────────────────────
|
|
28
|
+
// CLI modules use throw/catch + process.exit(). Pipeline modules use Result<T,E>.
|
|
29
|
+
// See src/cli/error-handler.ts for the unified handler.
|
|
30
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
31
|
+
import { printVersionAndExit } from './version.js';
|
|
32
|
+
import { handleCliError } from './error-handler.js';
|
|
33
|
+
import { getPatternName } from '../api/pattern-helpers.js';
|
|
34
|
+
import { scanPatterns } from '../scanner/index.js';
|
|
35
|
+
import { scanGherkinFiles } from '../scanner/gherkin-scanner.js';
|
|
36
|
+
import { loadConfig, applyProjectSourceDefaults, formatConfigError, } from '../config/config-loader.js';
|
|
37
|
+
import { buildMasterDataset } from '../generators/pipeline/index.js';
|
|
38
|
+
import { ScannerConfigSchema, createJsonOutputCodec, ValidationSummaryOutputSchema, } from '../validation-schemas/index.js';
|
|
39
|
+
import { normalizeStatus, isPatternComplete } from '../taxonomy/index.js';
|
|
40
|
+
import { validateDoD, formatDoDSummary, detectAntiPatterns, formatAntiPatternReport, toValidationIssues, DEFAULT_THRESHOLDS, } from '../validation/index.js';
|
|
41
|
+
/**
|
|
42
|
+
* Codec for serializing validation summary to JSON
|
|
43
|
+
*/
|
|
44
|
+
const ValidationSummaryCodec = createJsonOutputCodec(ValidationSummaryOutputSchema);
|
|
45
|
+
/**
|
|
46
|
+
* Parse command line arguments
|
|
47
|
+
*/
|
|
48
|
+
export function parseArgs(argv = process.argv.slice(2)) {
|
|
49
|
+
const config = {
|
|
50
|
+
input: [],
|
|
51
|
+
features: [],
|
|
52
|
+
exclude: [],
|
|
53
|
+
baseDir: process.cwd(),
|
|
54
|
+
strict: false,
|
|
55
|
+
format: 'pretty',
|
|
56
|
+
help: false,
|
|
57
|
+
dod: false,
|
|
58
|
+
phases: [],
|
|
59
|
+
antiPatterns: false,
|
|
60
|
+
scenarioBloatThreshold: DEFAULT_THRESHOLDS.scenarioBloatThreshold,
|
|
61
|
+
megaFeatureLineThreshold: DEFAULT_THRESHOLDS.megaFeatureLineThreshold,
|
|
62
|
+
magicCommentThreshold: DEFAULT_THRESHOLDS.magicCommentThreshold,
|
|
63
|
+
version: false,
|
|
64
|
+
verbose: false,
|
|
65
|
+
};
|
|
66
|
+
for (let i = 0; i < argv.length; i++) {
|
|
67
|
+
const arg = argv[i];
|
|
68
|
+
if (arg === '--help' || arg === '-h') {
|
|
69
|
+
config.help = true;
|
|
70
|
+
}
|
|
71
|
+
else if (arg === '--input' || arg === '-i') {
|
|
72
|
+
const nextArg = argv[++i];
|
|
73
|
+
if (!nextArg) {
|
|
74
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
75
|
+
}
|
|
76
|
+
config.input.push(nextArg);
|
|
77
|
+
}
|
|
78
|
+
else if (arg === '--features' || arg === '-F') {
|
|
79
|
+
const nextArg = argv[++i];
|
|
80
|
+
if (!nextArg) {
|
|
81
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
82
|
+
}
|
|
83
|
+
config.features.push(nextArg);
|
|
84
|
+
}
|
|
85
|
+
else if (arg === '--exclude' || arg === '-e') {
|
|
86
|
+
const nextArg = argv[++i];
|
|
87
|
+
if (!nextArg) {
|
|
88
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
89
|
+
}
|
|
90
|
+
config.exclude.push(nextArg);
|
|
91
|
+
}
|
|
92
|
+
else if (arg === '--base-dir' || arg === '-b') {
|
|
93
|
+
const nextArg = argv[++i];
|
|
94
|
+
if (!nextArg) {
|
|
95
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
96
|
+
}
|
|
97
|
+
config.baseDir = nextArg;
|
|
98
|
+
}
|
|
99
|
+
else if (arg === '--strict') {
|
|
100
|
+
config.strict = true;
|
|
101
|
+
}
|
|
102
|
+
else if (arg === '--format' || arg === '-f') {
|
|
103
|
+
const nextArg = argv[++i];
|
|
104
|
+
if (!nextArg) {
|
|
105
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
106
|
+
}
|
|
107
|
+
if (nextArg !== 'pretty' && nextArg !== 'json') {
|
|
108
|
+
throw new Error(`Invalid format: ${nextArg}. Use "pretty" or "json"`);
|
|
109
|
+
}
|
|
110
|
+
config.format = nextArg;
|
|
111
|
+
}
|
|
112
|
+
else if (arg === '--dod') {
|
|
113
|
+
config.dod = true;
|
|
114
|
+
}
|
|
115
|
+
else if (arg === '--phase') {
|
|
116
|
+
const nextArg = argv[++i];
|
|
117
|
+
if (!nextArg) {
|
|
118
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
119
|
+
}
|
|
120
|
+
const phaseNum = parseInt(nextArg, 10);
|
|
121
|
+
if (isNaN(phaseNum) || phaseNum < 1) {
|
|
122
|
+
throw new Error(`Invalid phase number: ${nextArg}. Must be a positive integer.`);
|
|
123
|
+
}
|
|
124
|
+
config.phases.push(phaseNum);
|
|
125
|
+
}
|
|
126
|
+
else if (arg === '--anti-patterns') {
|
|
127
|
+
config.antiPatterns = true;
|
|
128
|
+
}
|
|
129
|
+
else if (arg === '--scenario-threshold') {
|
|
130
|
+
const nextArg = argv[++i];
|
|
131
|
+
if (!nextArg) {
|
|
132
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
133
|
+
}
|
|
134
|
+
const threshold = parseInt(nextArg, 10);
|
|
135
|
+
if (isNaN(threshold) || threshold < 1) {
|
|
136
|
+
throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`);
|
|
137
|
+
}
|
|
138
|
+
config.scenarioBloatThreshold = threshold;
|
|
139
|
+
}
|
|
140
|
+
else if (arg === '--mega-feature-threshold') {
|
|
141
|
+
const nextArg = argv[++i];
|
|
142
|
+
if (!nextArg) {
|
|
143
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
144
|
+
}
|
|
145
|
+
const threshold = parseInt(nextArg, 10);
|
|
146
|
+
if (isNaN(threshold) || threshold < 1) {
|
|
147
|
+
throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`);
|
|
148
|
+
}
|
|
149
|
+
config.megaFeatureLineThreshold = threshold;
|
|
150
|
+
}
|
|
151
|
+
else if (arg === '--magic-comment-threshold') {
|
|
152
|
+
const nextArg = argv[++i];
|
|
153
|
+
if (!nextArg) {
|
|
154
|
+
throw new Error(`Missing value for ${arg} flag`);
|
|
155
|
+
}
|
|
156
|
+
const threshold = parseInt(nextArg, 10);
|
|
157
|
+
if (isNaN(threshold) || threshold < 1) {
|
|
158
|
+
throw new Error(`Invalid threshold: ${nextArg}. Must be a positive integer.`);
|
|
159
|
+
}
|
|
160
|
+
config.magicCommentThreshold = threshold;
|
|
161
|
+
}
|
|
162
|
+
else if (arg === '--version' || arg === '-v') {
|
|
163
|
+
config.version = true;
|
|
164
|
+
}
|
|
165
|
+
else if (arg === '--verbose') {
|
|
166
|
+
config.verbose = true;
|
|
167
|
+
}
|
|
168
|
+
else if (arg?.startsWith('-') === true) {
|
|
169
|
+
console.warn(`Warning: Unknown flag '${arg}' ignored`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return config;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Print usage information
|
|
176
|
+
*/
|
|
177
|
+
export function printHelp() {
|
|
178
|
+
console.log(`
|
|
179
|
+
architect-validate - Cross-validate TypeScript patterns vs Gherkin features
|
|
180
|
+
|
|
181
|
+
Usage:
|
|
182
|
+
architect-validate [options]
|
|
183
|
+
|
|
184
|
+
Options:
|
|
185
|
+
-i, --input <pattern> Glob pattern for TypeScript files (repeatable; falls back to config)
|
|
186
|
+
-F, --features <pattern> Glob pattern for Gherkin feature files (repeatable; falls back to config)
|
|
187
|
+
-e, --exclude <pattern> Glob pattern to exclude (repeatable)
|
|
188
|
+
-b, --base-dir <dir> Base directory for paths (default: cwd)
|
|
189
|
+
--strict Treat warnings as errors (exit 2 on warnings)
|
|
190
|
+
--verbose Show info-level messages (hidden by default)
|
|
191
|
+
-f, --format <type> Output format: "pretty" (default) or "json"
|
|
192
|
+
-h, --help Show this help message
|
|
193
|
+
-v, --version Show version number
|
|
194
|
+
|
|
195
|
+
DoD Validation:
|
|
196
|
+
--dod Enable Definition of Done validation
|
|
197
|
+
--phase <N> Validate specific phase (repeatable, default: all completed)
|
|
198
|
+
|
|
199
|
+
Anti-Pattern Detection:
|
|
200
|
+
--anti-patterns Enable anti-pattern detection
|
|
201
|
+
--scenario-threshold <N> Max scenarios per feature (default: 30)
|
|
202
|
+
--mega-feature-threshold <N> Max lines per feature (default: 750)
|
|
203
|
+
--magic-comment-threshold <N> Max magic comments (default: 5)
|
|
204
|
+
|
|
205
|
+
Exit Codes:
|
|
206
|
+
0 No issues found
|
|
207
|
+
1 Errors found
|
|
208
|
+
2 Warnings found (with --strict)
|
|
209
|
+
|
|
210
|
+
Cross-Source Validation Checks:
|
|
211
|
+
error phase-mismatch Phase number differs between sources
|
|
212
|
+
error status-mismatch Status differs between sources
|
|
213
|
+
warning missing-pattern-in-gherkin Pattern in TypeScript has no matching feature
|
|
214
|
+
warning missing-deliverables Completed phase has no deliverables defined
|
|
215
|
+
warning deliverable-missing-fields Deliverable missing required fields
|
|
216
|
+
info missing-pattern-in-ts Pattern in Gherkin has no matching TypeScript
|
|
217
|
+
info unmatched-dependency Dependency references non-existent pattern
|
|
218
|
+
|
|
219
|
+
DoD Validation Checks (--dod):
|
|
220
|
+
error incomplete-deliverables Completed phase has incomplete deliverables
|
|
221
|
+
error missing-acceptance-criteria Completed phase has no @acceptance-criteria scenarios
|
|
222
|
+
|
|
223
|
+
Anti-Pattern Detection (--anti-patterns):
|
|
224
|
+
error tag-duplication Dependencies in features (should be code-only)
|
|
225
|
+
error process-in-code Process metadata in code (should be features-only)
|
|
226
|
+
warning magic-comments Too many generator hints in features
|
|
227
|
+
warning scenario-bloat Too many scenarios per feature
|
|
228
|
+
warning mega-feature Feature file too large
|
|
229
|
+
|
|
230
|
+
Examples:
|
|
231
|
+
# Cross-source validation
|
|
232
|
+
architect-validate -i "src/**/*.ts" -F "tests/features/**/*.feature"
|
|
233
|
+
|
|
234
|
+
# DoD validation for all completed phases
|
|
235
|
+
architect-validate -i "src/**/*.ts" -F "features/**/*.feature" --dod
|
|
236
|
+
|
|
237
|
+
# DoD validation for specific phase
|
|
238
|
+
architect-validate -i "src/**/*.ts" -F "features/**/*.feature" --dod --phase 14
|
|
239
|
+
|
|
240
|
+
# Anti-pattern detection
|
|
241
|
+
architect-validate -i "src/**/*.ts" -F "features/**/*.feature" --anti-patterns
|
|
242
|
+
|
|
243
|
+
# Full validation (cross-source + DoD + anti-patterns)
|
|
244
|
+
architect-validate -i "src/**/*.ts" -F "features/**/*.feature" --dod --anti-patterns --strict
|
|
245
|
+
|
|
246
|
+
# JSON output for tooling
|
|
247
|
+
architect-validate -i "src/**/*.ts" -F "features/**/*.feature" --format json
|
|
248
|
+
`);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Check if a TS pattern has a cross-source match via implements relationships.
|
|
252
|
+
*
|
|
253
|
+
* DD-3 Phase 2: For TS patterns not matched by name, check:
|
|
254
|
+
* 1. If any Gherkin pattern implements this TS pattern (implementedBy)
|
|
255
|
+
* 2. If this TS pattern implements a Gherkin pattern (implementsPatterns)
|
|
256
|
+
*/
|
|
257
|
+
function hasImplementsMatch(tsPattern, tsName, gherkinByName, dataset) {
|
|
258
|
+
// Check if a Gherkin pattern implements this TS pattern
|
|
259
|
+
if ((dataset.relationshipIndex?.[tsName]?.implementedBy.length ?? 0) > 0) {
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
// Check if this TS pattern implements a Gherkin pattern
|
|
263
|
+
const implements_ = tsPattern.implementsPatterns ?? [];
|
|
264
|
+
for (const implName of implements_) {
|
|
265
|
+
if (gherkinByName.has(implName.toLowerCase())) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Check if a Gherkin pattern has a cross-source match via implements relationships.
|
|
273
|
+
*
|
|
274
|
+
* Symmetric counterpart to hasImplementsMatch for the Gherkin→TS direction:
|
|
275
|
+
* 1. If a TS pattern implements this Gherkin pattern (implementedBy)
|
|
276
|
+
* 2. If this Gherkin pattern implements a TS pattern (implementsPatterns)
|
|
277
|
+
*/
|
|
278
|
+
function hasGherkinImplementsMatch(gherkinPattern, tsByName, dataset) {
|
|
279
|
+
const name = getPatternName(gherkinPattern);
|
|
280
|
+
// Check reverse: a TS pattern implements this Gherkin pattern
|
|
281
|
+
if (dataset.relationshipIndex?.[name]?.implementedBy.some((ref) => tsByName.has(ref.name.toLowerCase())) === true) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
// Check forward: this Gherkin pattern implements a TS pattern
|
|
285
|
+
const implements_ = gherkinPattern.implementsPatterns ?? [];
|
|
286
|
+
for (const implName of implements_) {
|
|
287
|
+
if (tsByName.has(implName.toLowerCase())) {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Validate cross-source consistency using the MasterDataset read model.
|
|
295
|
+
*
|
|
296
|
+
* Compares TypeScript patterns against Gherkin patterns to find:
|
|
297
|
+
* - Missing patterns in either source (with implements-aware resolution)
|
|
298
|
+
* - Phase number mismatches
|
|
299
|
+
* - Status mismatches (after normalization)
|
|
300
|
+
* - Missing deliverables for completed phases
|
|
301
|
+
* - Invalid dependencies
|
|
302
|
+
*
|
|
303
|
+
* DD-2: Consumes RuntimeMasterDataset instead of raw scanner/extractor output.
|
|
304
|
+
* DD-3: Two-phase matching — name-based first, then relationshipIndex fallback.
|
|
305
|
+
*
|
|
306
|
+
* @param dataset - The pre-computed MasterDataset read model
|
|
307
|
+
* @returns Validation summary with issues and statistics
|
|
308
|
+
*/
|
|
309
|
+
export function validatePatterns(dataset) {
|
|
310
|
+
const issues = [];
|
|
311
|
+
const tsPatterns = dataset.bySource.typescript;
|
|
312
|
+
const gherkinPatterns = dataset.bySource.gherkin;
|
|
313
|
+
// Phase 1: Build name-based maps for efficient lookups
|
|
314
|
+
const tsByName = new Map();
|
|
315
|
+
const gherkinByName = new Map();
|
|
316
|
+
for (const p of tsPatterns) {
|
|
317
|
+
tsByName.set(getPatternName(p).toLowerCase(), p);
|
|
318
|
+
}
|
|
319
|
+
for (const p of gherkinPatterns) {
|
|
320
|
+
gherkinByName.set(getPatternName(p).toLowerCase(), p);
|
|
321
|
+
}
|
|
322
|
+
let matched = 0;
|
|
323
|
+
let missingInGherkinCount = 0;
|
|
324
|
+
// Check TypeScript patterns against Gherkin
|
|
325
|
+
for (const tsPattern of tsPatterns) {
|
|
326
|
+
const tsName = getPatternName(tsPattern).toLowerCase();
|
|
327
|
+
let gherkinMatch = gherkinByName.get(tsName);
|
|
328
|
+
// If the Gherkin pattern explicitly implements a DIFFERENT pattern, it's not
|
|
329
|
+
// a true name match — it's a naming collision. The Gherkin pattern belongs to
|
|
330
|
+
// whichever pattern it declares in @architect-implements.
|
|
331
|
+
if (gherkinMatch !== undefined) {
|
|
332
|
+
const gherkinImpl = gherkinMatch.implementsPatterns ?? [];
|
|
333
|
+
if (gherkinImpl.length > 0 && !gherkinImpl.some((n) => n.toLowerCase() === tsName)) {
|
|
334
|
+
gherkinMatch = undefined;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (!gherkinMatch) {
|
|
338
|
+
// Phase 2: Check implements relationships before reporting
|
|
339
|
+
if (hasImplementsMatch(tsPattern, getPatternName(tsPattern), gherkinByName, dataset)) {
|
|
340
|
+
matched++;
|
|
341
|
+
}
|
|
342
|
+
else if (tsPattern.phase !== undefined) {
|
|
343
|
+
// Only report for roadmap patterns (those with phase numbers)
|
|
344
|
+
const name = getPatternName(tsPattern);
|
|
345
|
+
missingInGherkinCount++;
|
|
346
|
+
issues.push({
|
|
347
|
+
severity: 'warning',
|
|
348
|
+
message: `Pattern "${name}" in TypeScript has no matching Gherkin feature`,
|
|
349
|
+
source: 'cross-source',
|
|
350
|
+
pattern: name,
|
|
351
|
+
file: tsPattern.source.file,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
matched++;
|
|
357
|
+
// Check phase consistency
|
|
358
|
+
if (tsPattern.phase !== undefined && gherkinMatch.phase !== undefined) {
|
|
359
|
+
if (tsPattern.phase !== gherkinMatch.phase) {
|
|
360
|
+
const name = getPatternName(tsPattern);
|
|
361
|
+
issues.push({
|
|
362
|
+
severity: 'error',
|
|
363
|
+
message: `Phase mismatch for "${name}": TypeScript=${tsPattern.phase}, Gherkin=${gherkinMatch.phase}`,
|
|
364
|
+
source: 'cross-source',
|
|
365
|
+
pattern: name,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
// Check status consistency
|
|
370
|
+
if (tsPattern.status && gherkinMatch.status) {
|
|
371
|
+
const tsStatus = normalizeStatus(tsPattern.status);
|
|
372
|
+
const gherkinStatus = normalizeStatus(gherkinMatch.status);
|
|
373
|
+
if (tsStatus !== gherkinStatus) {
|
|
374
|
+
const name = getPatternName(tsPattern);
|
|
375
|
+
// Include both raw and normalized values for clarity when they differ textually
|
|
376
|
+
const rawDiffers = tsPattern.status.toLowerCase() !== gherkinMatch.status.toLowerCase();
|
|
377
|
+
const message = rawDiffers
|
|
378
|
+
? `Status mismatch for "${name}": TypeScript="${tsPattern.status}" (→${tsStatus}), Gherkin="${gherkinMatch.status}" (→${gherkinStatus})`
|
|
379
|
+
: `Status mismatch for "${name}": TypeScript=${tsStatus}, Gherkin=${gherkinStatus}`;
|
|
380
|
+
issues.push({
|
|
381
|
+
severity: 'error',
|
|
382
|
+
message,
|
|
383
|
+
source: 'cross-source',
|
|
384
|
+
pattern: name,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
// Check Gherkin patterns against TypeScript
|
|
391
|
+
let missingInTsCount = 0;
|
|
392
|
+
for (const gherkinPattern of gherkinPatterns) {
|
|
393
|
+
const gherkinName = getPatternName(gherkinPattern).toLowerCase();
|
|
394
|
+
let tsMatch = tsByName.get(gherkinName);
|
|
395
|
+
// Symmetric collision guard: if the TS pattern implements a DIFFERENT Gherkin
|
|
396
|
+
// pattern, it's a naming collision, not a true match.
|
|
397
|
+
if (tsMatch !== undefined) {
|
|
398
|
+
const tsImpl = tsMatch.implementsPatterns ?? [];
|
|
399
|
+
if (tsImpl.length > 0 && !tsImpl.some((n) => n.toLowerCase() === gherkinName)) {
|
|
400
|
+
tsMatch = undefined;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
if (!tsMatch) {
|
|
404
|
+
// Two-phase implements resolution (symmetric with TS→Gherkin direction)
|
|
405
|
+
if (!hasGherkinImplementsMatch(gherkinPattern, tsByName, dataset)) {
|
|
406
|
+
const name = getPatternName(gherkinPattern);
|
|
407
|
+
missingInTsCount++;
|
|
408
|
+
issues.push({
|
|
409
|
+
severity: 'info',
|
|
410
|
+
message: `Pattern "${name}" in Gherkin has no matching TypeScript pattern`,
|
|
411
|
+
source: 'cross-source',
|
|
412
|
+
pattern: name,
|
|
413
|
+
file: gherkinPattern.source.file,
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
// Check deliverables for completed roadmap patterns (those with phase numbers).
|
|
419
|
+
// Test features and ADRs are completed but don't participate in the deliverables workflow.
|
|
420
|
+
for (const gherkinPattern of gherkinPatterns) {
|
|
421
|
+
if (isPatternComplete(gherkinPattern.status) && gherkinPattern.phase !== undefined) {
|
|
422
|
+
const deliverables = gherkinPattern.deliverables ?? [];
|
|
423
|
+
const name = getPatternName(gherkinPattern);
|
|
424
|
+
if (deliverables.length === 0) {
|
|
425
|
+
issues.push({
|
|
426
|
+
severity: 'warning',
|
|
427
|
+
message: `Completed pattern "${name}" has no deliverables defined`,
|
|
428
|
+
source: 'gherkin',
|
|
429
|
+
pattern: name,
|
|
430
|
+
file: gherkinPattern.source.file,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
// Validate deliverable fields
|
|
435
|
+
for (const d of deliverables) {
|
|
436
|
+
if (!d.name || d.name.trim() === '') {
|
|
437
|
+
issues.push({
|
|
438
|
+
severity: 'warning',
|
|
439
|
+
message: `Deliverable in "${name}" missing name`,
|
|
440
|
+
source: 'gherkin',
|
|
441
|
+
pattern: name,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
// Check dependencies exist
|
|
449
|
+
const allPatternNames = new Set([...tsByName.keys(), ...gherkinByName.keys()]);
|
|
450
|
+
for (const pattern of tsPatterns) {
|
|
451
|
+
const deps = pattern.dependsOn ?? [];
|
|
452
|
+
for (const dep of deps) {
|
|
453
|
+
if (!allPatternNames.has(dep.toLowerCase())) {
|
|
454
|
+
const name = getPatternName(pattern);
|
|
455
|
+
issues.push({
|
|
456
|
+
severity: 'info',
|
|
457
|
+
message: `Pattern "${name}" depends on "${dep}" which does not exist`,
|
|
458
|
+
source: 'typescript',
|
|
459
|
+
pattern: name,
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return {
|
|
465
|
+
issues,
|
|
466
|
+
stats: {
|
|
467
|
+
typescriptPatterns: tsPatterns.length,
|
|
468
|
+
gherkinPatterns: gherkinPatterns.length,
|
|
469
|
+
matched,
|
|
470
|
+
missingInGherkin: missingInGherkinCount,
|
|
471
|
+
missingInTypeScript: missingInTsCount,
|
|
472
|
+
},
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Format summary for pretty output
|
|
477
|
+
*/
|
|
478
|
+
function formatPretty(summary, verbose = false) {
|
|
479
|
+
const lines = [];
|
|
480
|
+
lines.push('Pattern Validation Summary');
|
|
481
|
+
lines.push('==========================');
|
|
482
|
+
lines.push('');
|
|
483
|
+
// Stats
|
|
484
|
+
lines.push(`TypeScript patterns: ${summary.stats.typescriptPatterns}`);
|
|
485
|
+
lines.push(`Gherkin patterns: ${summary.stats.gherkinPatterns}`);
|
|
486
|
+
lines.push(`Matched: ${summary.stats.matched}`);
|
|
487
|
+
lines.push('');
|
|
488
|
+
// Group issues by severity
|
|
489
|
+
const errors = summary.issues.filter((i) => i.severity === 'error');
|
|
490
|
+
const warnings = summary.issues.filter((i) => i.severity === 'warning');
|
|
491
|
+
const infos = summary.issues.filter((i) => i.severity === 'info');
|
|
492
|
+
if (errors.length > 0) {
|
|
493
|
+
lines.push(`Errors (${errors.length}):`);
|
|
494
|
+
for (const issue of errors) {
|
|
495
|
+
lines.push(` [ERROR] ${issue.message}`);
|
|
496
|
+
if (issue.file) {
|
|
497
|
+
lines.push(` at ${issue.file}`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
lines.push('');
|
|
501
|
+
}
|
|
502
|
+
if (warnings.length > 0) {
|
|
503
|
+
lines.push(`Warnings (${warnings.length}):`);
|
|
504
|
+
for (const issue of warnings) {
|
|
505
|
+
lines.push(` [WARN] ${issue.message}`);
|
|
506
|
+
if (issue.file) {
|
|
507
|
+
lines.push(` at ${issue.file}`);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
lines.push('');
|
|
511
|
+
}
|
|
512
|
+
if (infos.length > 0 && verbose) {
|
|
513
|
+
lines.push(`Info (${infos.length}):`);
|
|
514
|
+
for (const issue of infos) {
|
|
515
|
+
lines.push(` [INFO] ${issue.message}`);
|
|
516
|
+
if (issue.file) {
|
|
517
|
+
lines.push(` at ${issue.file}`);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
lines.push('');
|
|
521
|
+
}
|
|
522
|
+
// Summary line
|
|
523
|
+
if (errors.length === 0 && warnings.length === 0) {
|
|
524
|
+
lines.push('All validations passed.');
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
lines.push(`Found ${errors.length} error(s), ${warnings.length} warning(s), ${infos.length} info message(s).`);
|
|
528
|
+
}
|
|
529
|
+
return lines.join('\n');
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Format summary as JSON
|
|
533
|
+
*
|
|
534
|
+
* Uses ValidationSummaryCodec for type-safe serialization.
|
|
535
|
+
*
|
|
536
|
+
* @throws Error if serialization fails (should never happen with valid data)
|
|
537
|
+
*/
|
|
538
|
+
function formatJson(summary) {
|
|
539
|
+
const result = ValidationSummaryCodec.serialize(summary);
|
|
540
|
+
if (!result.ok) {
|
|
541
|
+
throw new Error(`Validation summary serialization failed: ${result.error.message}`);
|
|
542
|
+
}
|
|
543
|
+
return result.value;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Main CLI function
|
|
547
|
+
*/
|
|
548
|
+
async function main() {
|
|
549
|
+
const config = parseArgs();
|
|
550
|
+
if (config.version) {
|
|
551
|
+
printVersionAndExit('architect-validate');
|
|
552
|
+
}
|
|
553
|
+
if (config.help) {
|
|
554
|
+
printHelp();
|
|
555
|
+
process.exit(0);
|
|
556
|
+
}
|
|
557
|
+
// Apply config-based defaults if CLI flags not provided
|
|
558
|
+
const configApplied = await applyProjectSourceDefaults(config);
|
|
559
|
+
if (!configApplied && config.input.length === 0) {
|
|
560
|
+
console.error(' (No architect.config.ts or architect.config.js found; provide -i/--input flags)');
|
|
561
|
+
}
|
|
562
|
+
// Validate that we have sources (from CLI or config)
|
|
563
|
+
if (config.input.length === 0) {
|
|
564
|
+
console.error('Error: No TypeScript sources specified.');
|
|
565
|
+
console.error('Provide -i/--input flags or configure sources in architect.config.ts or architect.config.js');
|
|
566
|
+
process.exit(1);
|
|
567
|
+
}
|
|
568
|
+
if (config.features.length === 0) {
|
|
569
|
+
console.error('Error: No feature files specified.');
|
|
570
|
+
console.error('Provide -F/--features flags or configure sources in architect.config.ts or architect.config.js');
|
|
571
|
+
process.exit(1);
|
|
572
|
+
}
|
|
573
|
+
try {
|
|
574
|
+
// Load configuration (discovers architect.config.ts or architect.config.js)
|
|
575
|
+
const configResult = await loadConfig(config.baseDir);
|
|
576
|
+
if (!configResult.ok) {
|
|
577
|
+
console.error(formatConfigError(configResult.error));
|
|
578
|
+
process.exit(1);
|
|
579
|
+
}
|
|
580
|
+
const { instance: dpInstance, isDefault, path: configPath } = configResult.value;
|
|
581
|
+
const registry = dpInstance.registry;
|
|
582
|
+
const configSource = !isDefault && configPath ? configPath : '(default libar-generic preset)';
|
|
583
|
+
if (config.format === 'pretty') {
|
|
584
|
+
console.log('Validating patterns...');
|
|
585
|
+
console.log(` Config: ${configSource}`);
|
|
586
|
+
console.log(` Base directory: ${config.baseDir}`);
|
|
587
|
+
console.log(` TypeScript patterns: ${config.input.join(', ')}`);
|
|
588
|
+
console.log(` Gherkin patterns: ${config.features.join(', ')}`);
|
|
589
|
+
console.log('');
|
|
590
|
+
}
|
|
591
|
+
// Build MasterDataset via shared pipeline factory (DD-7)
|
|
592
|
+
const pipelineResult = await buildMasterDataset({
|
|
593
|
+
input: config.input,
|
|
594
|
+
features: config.features,
|
|
595
|
+
baseDir: config.baseDir,
|
|
596
|
+
mergeConflictStrategy: 'concatenate',
|
|
597
|
+
...(config.exclude.length > 0 ? { exclude: config.exclude } : {}),
|
|
598
|
+
});
|
|
599
|
+
if (!pipelineResult.ok) {
|
|
600
|
+
throw new Error(`Pipeline error [${pipelineResult.error.step}]: ${pipelineResult.error.message}`);
|
|
601
|
+
}
|
|
602
|
+
const { dataset, warnings: pipelineWarnings } = pipelineResult.value;
|
|
603
|
+
if (config.format === 'pretty') {
|
|
604
|
+
for (const w of pipelineWarnings) {
|
|
605
|
+
console.warn(`⚠️ ${w.message}`);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
// Raw scans for stage-1 consumers (DoD validation, anti-pattern detection)
|
|
609
|
+
// These correctly use scanned file data, not the MasterDataset — see DD-7
|
|
610
|
+
const scannerConfig = ScannerConfigSchema.parse({
|
|
611
|
+
patterns: config.input,
|
|
612
|
+
exclude: config.exclude.length > 0 ? config.exclude : undefined,
|
|
613
|
+
baseDir: config.baseDir,
|
|
614
|
+
});
|
|
615
|
+
const scanResult = await scanPatterns(scannerConfig, registry);
|
|
616
|
+
if (!scanResult.ok) {
|
|
617
|
+
throw new Error('Unexpected scan failure');
|
|
618
|
+
}
|
|
619
|
+
const gherkinScanResult = await scanGherkinFiles({
|
|
620
|
+
patterns: config.features,
|
|
621
|
+
baseDir: config.baseDir,
|
|
622
|
+
});
|
|
623
|
+
if (!gherkinScanResult.ok) {
|
|
624
|
+
throw new Error('Unexpected Gherkin scan failure');
|
|
625
|
+
}
|
|
626
|
+
// Warn if no patterns found (common misconfiguration)
|
|
627
|
+
if (dataset.bySource.typescript.length === 0) {
|
|
628
|
+
console.warn('⚠️ Warning: No TypeScript patterns found. Check your --input patterns.');
|
|
629
|
+
}
|
|
630
|
+
if (dataset.bySource.gherkin.length === 0) {
|
|
631
|
+
console.warn('⚠️ Warning: No Gherkin patterns found. Check your --features patterns.');
|
|
632
|
+
}
|
|
633
|
+
// Run cross-source validation against the read model (DD-2)
|
|
634
|
+
const summary = validatePatterns(dataset);
|
|
635
|
+
// Output cross-source results
|
|
636
|
+
if (config.format === 'pretty') {
|
|
637
|
+
console.log(formatPretty(summary, config.verbose));
|
|
638
|
+
}
|
|
639
|
+
// Run DoD validation if enabled
|
|
640
|
+
let dodHasErrors = false;
|
|
641
|
+
if (config.dod) {
|
|
642
|
+
const dodSummary = validateDoD(gherkinScanResult.value.files, config.phases);
|
|
643
|
+
if (config.format === 'pretty') {
|
|
644
|
+
console.log(formatDoDSummary(dodSummary));
|
|
645
|
+
}
|
|
646
|
+
// Add DoD failures to issues
|
|
647
|
+
for (const result of dodSummary.results) {
|
|
648
|
+
if (!result.isDoDMet) {
|
|
649
|
+
dodHasErrors = true;
|
|
650
|
+
for (const msg of result.messages) {
|
|
651
|
+
if (!msg.startsWith('DoD met')) {
|
|
652
|
+
summary.issues.push({
|
|
653
|
+
severity: 'error',
|
|
654
|
+
message: `[DoD] Phase ${result.phase} (${result.patternName}): ${msg}`,
|
|
655
|
+
source: 'gherkin',
|
|
656
|
+
pattern: result.patternName,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
// Run anti-pattern detection if enabled
|
|
664
|
+
let antiPatternHasErrors = false;
|
|
665
|
+
if (config.antiPatterns) {
|
|
666
|
+
const thresholds = {
|
|
667
|
+
scenarioBloatThreshold: config.scenarioBloatThreshold,
|
|
668
|
+
megaFeatureLineThreshold: config.megaFeatureLineThreshold,
|
|
669
|
+
magicCommentThreshold: config.magicCommentThreshold,
|
|
670
|
+
};
|
|
671
|
+
const violations = detectAntiPatterns(scanResult.value.files, gherkinScanResult.value.files, {
|
|
672
|
+
thresholds,
|
|
673
|
+
});
|
|
674
|
+
if (config.format === 'pretty') {
|
|
675
|
+
console.log(formatAntiPatternReport(violations));
|
|
676
|
+
}
|
|
677
|
+
// Add anti-pattern violations to issues
|
|
678
|
+
const antiPatternIssues = toValidationIssues(violations);
|
|
679
|
+
summary.issues.push(...antiPatternIssues);
|
|
680
|
+
antiPatternHasErrors = violations.some((v) => v.severity === 'error');
|
|
681
|
+
}
|
|
682
|
+
// Output JSON if requested (all results combined)
|
|
683
|
+
if (config.format === 'json') {
|
|
684
|
+
console.log(formatJson(summary));
|
|
685
|
+
}
|
|
686
|
+
// Determine exit code based on all validation results
|
|
687
|
+
const hasErrors = summary.issues.some((i) => i.severity === 'error') || dodHasErrors || antiPatternHasErrors;
|
|
688
|
+
const hasWarnings = summary.issues.some((i) => i.severity === 'warning');
|
|
689
|
+
if (hasErrors) {
|
|
690
|
+
process.exit(1);
|
|
691
|
+
}
|
|
692
|
+
else if (hasWarnings && config.strict) {
|
|
693
|
+
process.exit(2);
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
process.exit(0);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
catch (error) {
|
|
700
|
+
handleCliError(error, 1);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
// Entry point — catch ensures parseArgs errors reach the unified handler
|
|
704
|
+
void main().catch((error) => {
|
|
705
|
+
handleCliError(error, 1);
|
|
706
|
+
});
|
|
707
|
+
//# sourceMappingURL=validate-patterns.js.map
|