@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,1135 @@
|
|
|
1
|
+
# Validation Overview
|
|
2
|
+
|
|
3
|
+
**Purpose:** Validation product area overview
|
|
4
|
+
**Detail Level:** Full reference
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**How is the workflow enforced?** Validation is the enforcement boundary — it ensures that every change to annotated source files respects the delivery lifecycle rules defined by the FSM, protection levels, and scope constraints. The system operates in three layers: the FSM validator checks status transitions against a 4-state directed graph, the Process Guard orchestrates commit-time validation using a Decider pattern (state derived from annotations, not stored separately), and the lint engine provides pluggable rule execution with pretty and JSON output. Anti-pattern detection enforces dual-source ownership boundaries — `@architect-uses` belongs on TypeScript, `@architect-depends-on` belongs on Gherkin — preventing cross-domain tag confusion that causes documentation drift. Definition of Done validation ensures completed patterns have all deliverables marked done and at least one acceptance-criteria scenario.
|
|
9
|
+
|
|
10
|
+
## Key Invariants
|
|
11
|
+
|
|
12
|
+
- Protection levels: `roadmap`/`deferred` = none (fully editable), `active` = scope-locked (no new deliverables), `completed` = hard-locked (requires `@architect-unlock-reason`)
|
|
13
|
+
- Valid FSM transitions: Only roadmap→active, roadmap→deferred, active→completed, active→roadmap, deferred→roadmap. Completed is terminal
|
|
14
|
+
- Decider pattern: All validation is (state, changes, options) → result. State is derived from annotations, not maintained separately
|
|
15
|
+
- Dual-source ownership: Anti-pattern detection enforces tag boundaries — `uses` on TypeScript (runtime deps), `depends-on`/`quarter`/`team` on Gherkin (planning metadata). Violations are flagged before they cause documentation drift
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
- [Key Invariants](#key-invariants)
|
|
22
|
+
- [Validation & Lint Boundary](#validation-lint-boundary)
|
|
23
|
+
- [Enforcement Pipeline](#enforcement-pipeline)
|
|
24
|
+
- [API Types](#api-types)
|
|
25
|
+
- [Business Rules](#business-rules)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Validation & Lint Boundary
|
|
30
|
+
|
|
31
|
+
Scoped architecture diagram showing component relationships:
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
C4Context
|
|
35
|
+
title Validation & Lint Boundary
|
|
36
|
+
Boundary(lint, "Lint") {
|
|
37
|
+
System(LintRules, "LintRules")
|
|
38
|
+
System(LintEngine, "LintEngine")
|
|
39
|
+
System(ProcessGuardDecider, "ProcessGuardDecider")
|
|
40
|
+
}
|
|
41
|
+
Boundary(validation, "Validation") {
|
|
42
|
+
System(DoDValidator, "DoDValidator")
|
|
43
|
+
System(AntiPatternDetector, "AntiPatternDetector")
|
|
44
|
+
System(FSMValidator, "FSMValidator")
|
|
45
|
+
System(FSMTransitions, "FSMTransitions")
|
|
46
|
+
System(FSMStates, "FSMStates")
|
|
47
|
+
}
|
|
48
|
+
System_Ext(DoDValidationTypes, "DoDValidationTypes")
|
|
49
|
+
System_Ext(CodecUtils, "CodecUtils")
|
|
50
|
+
System_Ext(DualSourceExtractor, "DualSourceExtractor")
|
|
51
|
+
System_Ext(DetectChanges, "DetectChanges")
|
|
52
|
+
System_Ext(DeriveProcessState, "DeriveProcessState")
|
|
53
|
+
System_Ext(ProcessGuardLinter, "ProcessGuardLinter")
|
|
54
|
+
System_Ext(PhaseStateMachineValidation, "PhaseStateMachineValidation")
|
|
55
|
+
System_Ext(PatternRelationshipModel, "PatternRelationshipModel")
|
|
56
|
+
Rel(DoDValidator, DoDValidationTypes, "uses")
|
|
57
|
+
Rel(DoDValidator, DualSourceExtractor, "uses")
|
|
58
|
+
Rel(AntiPatternDetector, DoDValidationTypes, "uses")
|
|
59
|
+
Rel(LintRules, PatternRelationshipModel, "implements")
|
|
60
|
+
Rel(LintEngine, LintRules, "uses")
|
|
61
|
+
Rel(LintEngine, CodecUtils, "uses")
|
|
62
|
+
Rel(FSMValidator, FSMTransitions, "uses")
|
|
63
|
+
Rel(FSMValidator, FSMStates, "uses")
|
|
64
|
+
Rel(FSMValidator, PhaseStateMachineValidation, "implements")
|
|
65
|
+
Rel(FSMTransitions, PhaseStateMachineValidation, "implements")
|
|
66
|
+
Rel(FSMStates, PhaseStateMachineValidation, "implements")
|
|
67
|
+
Rel(ProcessGuardDecider, FSMValidator, "uses")
|
|
68
|
+
Rel(ProcessGuardDecider, DeriveProcessState, "uses")
|
|
69
|
+
Rel(ProcessGuardDecider, DetectChanges, "uses")
|
|
70
|
+
Rel(ProcessGuardDecider, ProcessGuardLinter, "implements")
|
|
71
|
+
Rel(DetectChanges, DeriveProcessState, "uses")
|
|
72
|
+
Rel(DetectChanges, ProcessGuardLinter, "implements")
|
|
73
|
+
Rel(DeriveProcessState, FSMValidator, "uses")
|
|
74
|
+
Rel(DeriveProcessState, ProcessGuardLinter, "implements")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Enforcement Pipeline
|
|
80
|
+
|
|
81
|
+
Scoped architecture diagram showing component relationships:
|
|
82
|
+
|
|
83
|
+
```mermaid
|
|
84
|
+
graph LR
|
|
85
|
+
subgraph lint["Lint"]
|
|
86
|
+
LintRules("LintRules")
|
|
87
|
+
LintEngine("LintEngine")
|
|
88
|
+
ProcessGuardDecider("ProcessGuardDecider")
|
|
89
|
+
end
|
|
90
|
+
subgraph validation["Validation"]
|
|
91
|
+
DoDValidator("DoDValidator")
|
|
92
|
+
AntiPatternDetector("AntiPatternDetector")
|
|
93
|
+
FSMValidator("FSMValidator")
|
|
94
|
+
FSMTransitions[/"FSMTransitions"/]
|
|
95
|
+
FSMStates[/"FSMStates"/]
|
|
96
|
+
end
|
|
97
|
+
subgraph related["Related"]
|
|
98
|
+
DoDValidationTypes["DoDValidationTypes"]:::neighbor
|
|
99
|
+
CodecUtils["CodecUtils"]:::neighbor
|
|
100
|
+
DualSourceExtractor["DualSourceExtractor"]:::neighbor
|
|
101
|
+
DetectChanges["DetectChanges"]:::neighbor
|
|
102
|
+
DeriveProcessState["DeriveProcessState"]:::neighbor
|
|
103
|
+
ProcessGuardLinter["ProcessGuardLinter"]:::neighbor
|
|
104
|
+
PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor
|
|
105
|
+
PatternRelationshipModel["PatternRelationshipModel"]:::neighbor
|
|
106
|
+
end
|
|
107
|
+
DoDValidator -->|uses| DoDValidationTypes
|
|
108
|
+
DoDValidator -->|uses| DualSourceExtractor
|
|
109
|
+
AntiPatternDetector -->|uses| DoDValidationTypes
|
|
110
|
+
LintRules ..->|implements| PatternRelationshipModel
|
|
111
|
+
LintEngine -->|uses| LintRules
|
|
112
|
+
LintEngine -->|uses| CodecUtils
|
|
113
|
+
FSMValidator -->|uses| FSMTransitions
|
|
114
|
+
FSMValidator -->|uses| FSMStates
|
|
115
|
+
FSMValidator ..->|implements| PhaseStateMachineValidation
|
|
116
|
+
FSMTransitions ..->|implements| PhaseStateMachineValidation
|
|
117
|
+
FSMStates ..->|implements| PhaseStateMachineValidation
|
|
118
|
+
ProcessGuardDecider -->|uses| FSMValidator
|
|
119
|
+
ProcessGuardDecider -->|uses| DeriveProcessState
|
|
120
|
+
ProcessGuardDecider -->|uses| DetectChanges
|
|
121
|
+
ProcessGuardDecider ..->|implements| ProcessGuardLinter
|
|
122
|
+
DetectChanges -->|uses| DeriveProcessState
|
|
123
|
+
DetectChanges ..->|implements| ProcessGuardLinter
|
|
124
|
+
DeriveProcessState -->|uses| FSMValidator
|
|
125
|
+
DeriveProcessState ..->|implements| ProcessGuardLinter
|
|
126
|
+
classDef neighbor stroke-dasharray: 5 5
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## API Types
|
|
132
|
+
|
|
133
|
+
### AntiPatternDetectionOptions (interface)
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
/**
|
|
137
|
+
* Configuration options for anti-pattern detection
|
|
138
|
+
*/
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
interface AntiPatternDetectionOptions extends WithTagRegistry {
|
|
143
|
+
/** Thresholds for warning triggers */
|
|
144
|
+
readonly thresholds?: Partial<AntiPatternThresholds>;
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
| Property | Description |
|
|
149
|
+
| ---------- | ------------------------------- |
|
|
150
|
+
| thresholds | Thresholds for warning triggers |
|
|
151
|
+
|
|
152
|
+
### LintRule (interface)
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
/**
|
|
156
|
+
* A lint rule that checks a parsed directive
|
|
157
|
+
*/
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
interface LintRule {
|
|
162
|
+
/** Unique rule ID */
|
|
163
|
+
readonly id: string;
|
|
164
|
+
/** Default severity level */
|
|
165
|
+
readonly severity: LintSeverity;
|
|
166
|
+
/** Human-readable rule description */
|
|
167
|
+
readonly description: string;
|
|
168
|
+
/**
|
|
169
|
+
* Check function that returns violation(s) or null if rule passes
|
|
170
|
+
*
|
|
171
|
+
* @param directive - Parsed directive to check
|
|
172
|
+
* @param file - Source file path
|
|
173
|
+
* @param line - Line number in source
|
|
174
|
+
* @param context - Optional context with pattern registry for relationship validation
|
|
175
|
+
* @returns Violation(s) if rule fails, null if passes. Array for rules that can detect multiple issues.
|
|
176
|
+
*/
|
|
177
|
+
check: (
|
|
178
|
+
directive: DocDirective,
|
|
179
|
+
file: string,
|
|
180
|
+
line: number,
|
|
181
|
+
context?: LintContext
|
|
182
|
+
) => LintViolation | LintViolation[] | null;
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
| Property | Description |
|
|
187
|
+
| ----------- | --------------------------------------------------------------- |
|
|
188
|
+
| id | Unique rule ID |
|
|
189
|
+
| severity | Default severity level |
|
|
190
|
+
| description | Human-readable rule description |
|
|
191
|
+
| check | Check function that returns violation(s) or null if rule passes |
|
|
192
|
+
|
|
193
|
+
### LintContext (interface)
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
/**
|
|
197
|
+
* Context for lint rules that need access to the full pattern registry.
|
|
198
|
+
* Used for "strict mode" validation where relationships are checked
|
|
199
|
+
* against known patterns.
|
|
200
|
+
*/
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
```typescript
|
|
204
|
+
interface LintContext {
|
|
205
|
+
/** Set of known pattern names for relationship validation */
|
|
206
|
+
readonly knownPatterns: ReadonlySet<string>;
|
|
207
|
+
/** Tag registry for prefix-aware error messages (optional) */
|
|
208
|
+
readonly registry?: TagRegistry;
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
| Property | Description |
|
|
213
|
+
| ------------- | ------------------------------------------------------- |
|
|
214
|
+
| knownPatterns | Set of known pattern names for relationship validation |
|
|
215
|
+
| registry | Tag registry for prefix-aware error messages (optional) |
|
|
216
|
+
|
|
217
|
+
### ProtectionLevel (type)
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
/**
|
|
221
|
+
* Protection level types for FSM states
|
|
222
|
+
*
|
|
223
|
+
* - `none`: Fully editable, no restrictions
|
|
224
|
+
* - `scope`: Scope-locked, prevents adding new deliverables
|
|
225
|
+
* - `hard`: Hard-locked, requires explicit unlock-reason annotation
|
|
226
|
+
*/
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
type ProtectionLevel = 'none' | 'scope' | 'hard';
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### isDeliverableComplete (function)
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
/**
|
|
237
|
+
* Check if a deliverable has "complete" status.
|
|
238
|
+
*
|
|
239
|
+
* This checks for the literal 'complete' status value only.
|
|
240
|
+
* For DoD validation (which also accepts 'n/a' and 'superseded'),
|
|
241
|
+
* see isDeliverableStatusTerminal().
|
|
242
|
+
*
|
|
243
|
+
* @param deliverable - The deliverable to check
|
|
244
|
+
* @returns True if the deliverable status is 'complete'
|
|
245
|
+
*/
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
function isDeliverableComplete(deliverable: Deliverable): boolean;
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Description |
|
|
253
|
+
| ----------- | ---- | ------------------------ |
|
|
254
|
+
| deliverable | | The deliverable to check |
|
|
255
|
+
|
|
256
|
+
**Returns:** True if the deliverable status is 'complete'
|
|
257
|
+
|
|
258
|
+
### hasAcceptanceCriteria (function)
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
/**
|
|
262
|
+
* Check if a feature has @acceptance-criteria scenarios
|
|
263
|
+
*
|
|
264
|
+
* Scans scenarios for the @acceptance-criteria tag, which indicates
|
|
265
|
+
* BDD-driven acceptance tests.
|
|
266
|
+
*
|
|
267
|
+
* @param feature - The scanned feature file to check
|
|
268
|
+
* @returns True if at least one @acceptance-criteria scenario exists
|
|
269
|
+
*/
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
function hasAcceptanceCriteria(feature: ScannedGherkinFile): boolean;
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
| Parameter | Type | Description |
|
|
277
|
+
| --------- | ---- | --------------------------------- |
|
|
278
|
+
| feature | | The scanned feature file to check |
|
|
279
|
+
|
|
280
|
+
**Returns:** True if at least one @acceptance-criteria scenario exists
|
|
281
|
+
|
|
282
|
+
### extractAcceptanceCriteriaScenarios (function)
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
/**
|
|
286
|
+
* Extract acceptance criteria scenario names from a feature
|
|
287
|
+
*
|
|
288
|
+
* @param feature - The scanned feature file
|
|
289
|
+
* @returns Array of scenario names with @acceptance-criteria tag
|
|
290
|
+
*/
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
function extractAcceptanceCriteriaScenarios(feature: ScannedGherkinFile): readonly string[];
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
| Parameter | Type | Description |
|
|
298
|
+
| --------- | ---- | ------------------------ |
|
|
299
|
+
| feature | | The scanned feature file |
|
|
300
|
+
|
|
301
|
+
**Returns:** Array of scenario names with @acceptance-criteria tag
|
|
302
|
+
|
|
303
|
+
### validateDoDForPhase (function)
|
|
304
|
+
|
|
305
|
+
```typescript
|
|
306
|
+
/**
|
|
307
|
+
* Validate DoD for a single phase/pattern
|
|
308
|
+
*
|
|
309
|
+
* Checks:
|
|
310
|
+
* 1. All deliverables must be in a terminal state (complete, n/a, superseded)
|
|
311
|
+
* 2. At least one @acceptance-criteria scenario exists
|
|
312
|
+
*
|
|
313
|
+
* @param patternName - Name of the pattern being validated
|
|
314
|
+
* @param phase - Phase number being validated
|
|
315
|
+
* @param feature - The scanned feature file with deliverables and scenarios
|
|
316
|
+
* @returns DoD validation result
|
|
317
|
+
*/
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
```typescript
|
|
321
|
+
function validateDoDForPhase(
|
|
322
|
+
patternName: string,
|
|
323
|
+
phase: number,
|
|
324
|
+
feature: ScannedGherkinFile
|
|
325
|
+
): DoDValidationResult;
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
| Parameter | Type | Description |
|
|
329
|
+
| ----------- | ---- | -------------------------------------------------------- |
|
|
330
|
+
| patternName | | Name of the pattern being validated |
|
|
331
|
+
| phase | | Phase number being validated |
|
|
332
|
+
| feature | | The scanned feature file with deliverables and scenarios |
|
|
333
|
+
|
|
334
|
+
**Returns:** DoD validation result
|
|
335
|
+
|
|
336
|
+
### validateDoD (function)
|
|
337
|
+
|
|
338
|
+
````typescript
|
|
339
|
+
/**
|
|
340
|
+
* Validate DoD across multiple phases
|
|
341
|
+
*
|
|
342
|
+
* Filters to completed phases and validates each against DoD criteria.
|
|
343
|
+
* Optionally filter to specific phases using phaseFilter.
|
|
344
|
+
*
|
|
345
|
+
* @param features - Array of scanned feature files
|
|
346
|
+
* @param phaseFilter - Optional array of phase numbers to validate (validates all if empty)
|
|
347
|
+
* @returns Aggregate DoD validation summary
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```typescript
|
|
351
|
+
* // Validate all completed phases
|
|
352
|
+
* const summary = validateDoD(features);
|
|
353
|
+
*
|
|
354
|
+
* // Validate specific phase
|
|
355
|
+
* const summary = validateDoD(features, [14]);
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
````
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
function validateDoD(
|
|
362
|
+
features: readonly ScannedGherkinFile[],
|
|
363
|
+
phaseFilter: readonly number[] = []
|
|
364
|
+
): DoDValidationSummary;
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
| Parameter | Type | Description |
|
|
368
|
+
| ----------- | ---- | -------------------------------------------------------------------- |
|
|
369
|
+
| features | | Array of scanned feature files |
|
|
370
|
+
| phaseFilter | | Optional array of phase numbers to validate (validates all if empty) |
|
|
371
|
+
|
|
372
|
+
**Returns:** Aggregate DoD validation summary
|
|
373
|
+
|
|
374
|
+
### formatDoDSummary (function)
|
|
375
|
+
|
|
376
|
+
```typescript
|
|
377
|
+
/**
|
|
378
|
+
* Format DoD validation summary for console output
|
|
379
|
+
*
|
|
380
|
+
* @param summary - DoD validation summary to format
|
|
381
|
+
* @returns Multi-line string for pretty printing
|
|
382
|
+
*/
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
function formatDoDSummary(summary: DoDValidationSummary): string;
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
| Parameter | Type | Description |
|
|
390
|
+
| --------- | ---- | -------------------------------- |
|
|
391
|
+
| summary | | DoD validation summary to format |
|
|
392
|
+
|
|
393
|
+
**Returns:** Multi-line string for pretty printing
|
|
394
|
+
|
|
395
|
+
### detectAntiPatterns (function)
|
|
396
|
+
|
|
397
|
+
````typescript
|
|
398
|
+
/**
|
|
399
|
+
* Detect all anti-patterns
|
|
400
|
+
*
|
|
401
|
+
* Runs all anti-pattern detectors and returns combined violations.
|
|
402
|
+
*
|
|
403
|
+
* @param scannedFiles - Array of scanned TypeScript files
|
|
404
|
+
* @param features - Array of scanned feature files
|
|
405
|
+
* @param options - Optional configuration (registry for prefix, thresholds)
|
|
406
|
+
* @returns Array of all detected anti-pattern violations
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* ```typescript
|
|
410
|
+
* // With default prefix (@architect-)
|
|
411
|
+
* const violations = detectAntiPatterns(tsFiles, featureFiles);
|
|
412
|
+
*
|
|
413
|
+
* // With custom prefix
|
|
414
|
+
* const registry = createDefaultTagRegistry();
|
|
415
|
+
* registry.tagPrefix = "@architect-";
|
|
416
|
+
* const customViolations = detectAntiPatterns(tsFiles, featureFiles, { registry });
|
|
417
|
+
*
|
|
418
|
+
* for (const v of violations) {
|
|
419
|
+
* console.log(`[${v.severity.toUpperCase()}] ${v.id}: ${v.message}`);
|
|
420
|
+
* }
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
````
|
|
424
|
+
|
|
425
|
+
```typescript
|
|
426
|
+
function detectAntiPatterns(
|
|
427
|
+
scannedFiles: readonly ScannedFile[],
|
|
428
|
+
features: readonly ScannedGherkinFile[],
|
|
429
|
+
options: AntiPatternDetectionOptions = {}
|
|
430
|
+
): AntiPatternViolation[];
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
| Parameter | Type | Description |
|
|
434
|
+
| ------------ | ---- | -------------------------------------------------------- |
|
|
435
|
+
| scannedFiles | | Array of scanned TypeScript files |
|
|
436
|
+
| features | | Array of scanned feature files |
|
|
437
|
+
| options | | Optional configuration (registry for prefix, thresholds) |
|
|
438
|
+
|
|
439
|
+
**Returns:** Array of all detected anti-pattern violations
|
|
440
|
+
|
|
441
|
+
### detectProcessInCode (function)
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
/**
|
|
445
|
+
* Detect process metadata in code anti-pattern
|
|
446
|
+
*
|
|
447
|
+
* Finds process tracking annotations (e.g., @architect-quarter, @architect-team, etc.)
|
|
448
|
+
* in TypeScript files. Process metadata belongs in feature files.
|
|
449
|
+
*
|
|
450
|
+
* @param scannedFiles - Array of scanned TypeScript files
|
|
451
|
+
* @param registry - Optional tag registry for prefix-aware detection (defaults to @architect-)
|
|
452
|
+
* @returns Array of anti-pattern violations
|
|
453
|
+
*/
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
function detectProcessInCode(
|
|
458
|
+
scannedFiles: readonly ScannedFile[],
|
|
459
|
+
registry?: TagRegistry
|
|
460
|
+
): AntiPatternViolation[];
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
| Parameter | Type | Description |
|
|
464
|
+
| ------------ | ---- | -------------------------------------------------------------------------- |
|
|
465
|
+
| scannedFiles | | Array of scanned TypeScript files |
|
|
466
|
+
| registry | | Optional tag registry for prefix-aware detection (defaults to @architect-) |
|
|
467
|
+
|
|
468
|
+
**Returns:** Array of anti-pattern violations
|
|
469
|
+
|
|
470
|
+
### detectMagicComments (function)
|
|
471
|
+
|
|
472
|
+
```typescript
|
|
473
|
+
/**
|
|
474
|
+
* Detect magic comments anti-pattern
|
|
475
|
+
*
|
|
476
|
+
* Finds generator hints like "# GENERATOR:", "# PARSER:" in feature files.
|
|
477
|
+
* These create tight coupling between features and generators.
|
|
478
|
+
*
|
|
479
|
+
* @param features - Array of scanned feature files
|
|
480
|
+
* @param threshold - Maximum magic comments before warning (default: 5)
|
|
481
|
+
* @returns Array of anti-pattern violations
|
|
482
|
+
*/
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
```typescript
|
|
486
|
+
function detectMagicComments(
|
|
487
|
+
features: readonly ScannedGherkinFile[],
|
|
488
|
+
threshold: number = DEFAULT_THRESHOLDS.magicCommentThreshold
|
|
489
|
+
): AntiPatternViolation[];
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
| Parameter | Type | Description |
|
|
493
|
+
| --------- | ---- | -------------------------------------------------- |
|
|
494
|
+
| features | | Array of scanned feature files |
|
|
495
|
+
| threshold | | Maximum magic comments before warning (default: 5) |
|
|
496
|
+
|
|
497
|
+
**Returns:** Array of anti-pattern violations
|
|
498
|
+
|
|
499
|
+
### detectScenarioBloat (function)
|
|
500
|
+
|
|
501
|
+
```typescript
|
|
502
|
+
/**
|
|
503
|
+
* Detect scenario bloat anti-pattern
|
|
504
|
+
*
|
|
505
|
+
* Finds feature files with too many scenarios, which indicates poor
|
|
506
|
+
* organization and slows test suites.
|
|
507
|
+
*
|
|
508
|
+
* @param features - Array of scanned feature files
|
|
509
|
+
* @param threshold - Maximum scenarios before warning (default: 20)
|
|
510
|
+
* @returns Array of anti-pattern violations
|
|
511
|
+
*/
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
```typescript
|
|
515
|
+
function detectScenarioBloat(
|
|
516
|
+
features: readonly ScannedGherkinFile[],
|
|
517
|
+
threshold: number = DEFAULT_THRESHOLDS.scenarioBloatThreshold
|
|
518
|
+
): AntiPatternViolation[];
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
| Parameter | Type | Description |
|
|
522
|
+
| --------- | ---- | ---------------------------------------------- |
|
|
523
|
+
| features | | Array of scanned feature files |
|
|
524
|
+
| threshold | | Maximum scenarios before warning (default: 20) |
|
|
525
|
+
|
|
526
|
+
**Returns:** Array of anti-pattern violations
|
|
527
|
+
|
|
528
|
+
### detectMegaFeature (function)
|
|
529
|
+
|
|
530
|
+
```typescript
|
|
531
|
+
/**
|
|
532
|
+
* Detect mega-feature anti-pattern
|
|
533
|
+
*
|
|
534
|
+
* Finds feature files that are too large, which makes them hard to
|
|
535
|
+
* maintain and review.
|
|
536
|
+
*
|
|
537
|
+
* @param features - Array of scanned feature files
|
|
538
|
+
* @param threshold - Maximum lines before warning (default: 500)
|
|
539
|
+
* @returns Array of anti-pattern violations
|
|
540
|
+
*/
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
```typescript
|
|
544
|
+
function detectMegaFeature(
|
|
545
|
+
features: readonly ScannedGherkinFile[],
|
|
546
|
+
threshold: number = DEFAULT_THRESHOLDS.megaFeatureLineThreshold
|
|
547
|
+
): AntiPatternViolation[];
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
| Parameter | Type | Description |
|
|
551
|
+
| --------- | ---- | ------------------------------------------- |
|
|
552
|
+
| features | | Array of scanned feature files |
|
|
553
|
+
| threshold | | Maximum lines before warning (default: 500) |
|
|
554
|
+
|
|
555
|
+
**Returns:** Array of anti-pattern violations
|
|
556
|
+
|
|
557
|
+
### formatAntiPatternReport (function)
|
|
558
|
+
|
|
559
|
+
```typescript
|
|
560
|
+
/**
|
|
561
|
+
* Format anti-pattern violations for console output
|
|
562
|
+
*
|
|
563
|
+
* @param violations - Array of violations to format
|
|
564
|
+
* @returns Multi-line string for pretty printing
|
|
565
|
+
*/
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
```typescript
|
|
569
|
+
function formatAntiPatternReport(violations: AntiPatternViolation[]): string;
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
| Parameter | Type | Description |
|
|
573
|
+
| ---------- | ---- | ----------------------------- |
|
|
574
|
+
| violations | | Array of violations to format |
|
|
575
|
+
|
|
576
|
+
**Returns:** Multi-line string for pretty printing
|
|
577
|
+
|
|
578
|
+
### toValidationIssues (function)
|
|
579
|
+
|
|
580
|
+
```typescript
|
|
581
|
+
/**
|
|
582
|
+
* Convert anti-pattern violations to ValidationIssue format
|
|
583
|
+
*
|
|
584
|
+
* For integration with the existing validate-patterns CLI.
|
|
585
|
+
*/
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
```typescript
|
|
589
|
+
function toValidationIssues(violations: readonly AntiPatternViolation[]): Array<{
|
|
590
|
+
severity: 'error' | 'warning' | 'info';
|
|
591
|
+
message: string;
|
|
592
|
+
source: 'typescript' | 'gherkin' | 'cross-source';
|
|
593
|
+
pattern?: string;
|
|
594
|
+
file?: string;
|
|
595
|
+
}>;
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
### filterRulesBySeverity (function)
|
|
599
|
+
|
|
600
|
+
```typescript
|
|
601
|
+
/**
|
|
602
|
+
* Get rules filtered by minimum severity
|
|
603
|
+
*
|
|
604
|
+
* @param rules - Rules to filter
|
|
605
|
+
* @param minSeverity - Minimum severity to include
|
|
606
|
+
* @returns Filtered rules
|
|
607
|
+
*/
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
```typescript
|
|
611
|
+
function filterRulesBySeverity(rules: readonly LintRule[], minSeverity: LintSeverity): LintRule[];
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
| Parameter | Type | Description |
|
|
615
|
+
| ----------- | ---- | --------------------------- |
|
|
616
|
+
| rules | | Rules to filter |
|
|
617
|
+
| minSeverity | | Minimum severity to include |
|
|
618
|
+
|
|
619
|
+
**Returns:** Filtered rules
|
|
620
|
+
|
|
621
|
+
### isValidTransition (function)
|
|
622
|
+
|
|
623
|
+
````typescript
|
|
624
|
+
/**
|
|
625
|
+
* Check if a transition between two states is valid
|
|
626
|
+
*
|
|
627
|
+
* @param from - Current status
|
|
628
|
+
* @param to - Target status
|
|
629
|
+
* @returns true if the transition is allowed
|
|
630
|
+
*
|
|
631
|
+
* @example
|
|
632
|
+
* ```typescript
|
|
633
|
+
* isValidTransition("roadmap", "active"); // → true
|
|
634
|
+
* isValidTransition("roadmap", "completed"); // → false (must go through active)
|
|
635
|
+
* isValidTransition("completed", "active"); // → false (terminal state)
|
|
636
|
+
* ```
|
|
637
|
+
*/
|
|
638
|
+
````
|
|
639
|
+
|
|
640
|
+
```typescript
|
|
641
|
+
function isValidTransition(from: ProcessStatusValue, to: ProcessStatusValue): boolean;
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
| Parameter | Type | Description |
|
|
645
|
+
| --------- | ---- | -------------- |
|
|
646
|
+
| from | | Current status |
|
|
647
|
+
| to | | Target status |
|
|
648
|
+
|
|
649
|
+
**Returns:** true if the transition is allowed
|
|
650
|
+
|
|
651
|
+
### getValidTransitionsFrom (function)
|
|
652
|
+
|
|
653
|
+
````typescript
|
|
654
|
+
/**
|
|
655
|
+
* Get all valid transitions from a given state
|
|
656
|
+
*
|
|
657
|
+
* @param status - Current status
|
|
658
|
+
* @returns Array of valid target states (empty for terminal states)
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```typescript
|
|
662
|
+
* getValidTransitionsFrom("roadmap"); // → ["active", "deferred", "roadmap"]
|
|
663
|
+
* getValidTransitionsFrom("completed"); // → []
|
|
664
|
+
* ```
|
|
665
|
+
*/
|
|
666
|
+
````
|
|
667
|
+
|
|
668
|
+
```typescript
|
|
669
|
+
function getValidTransitionsFrom(status: ProcessStatusValue): readonly ProcessStatusValue[];
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
| Parameter | Type | Description |
|
|
673
|
+
| --------- | ---- | -------------- |
|
|
674
|
+
| status | | Current status |
|
|
675
|
+
|
|
676
|
+
**Returns:** Array of valid target states (empty for terminal states)
|
|
677
|
+
|
|
678
|
+
### getTransitionErrorMessage (function)
|
|
679
|
+
|
|
680
|
+
````typescript
|
|
681
|
+
/**
|
|
682
|
+
* Get a human-readable description of why a transition is invalid
|
|
683
|
+
*
|
|
684
|
+
* @param from - Current status
|
|
685
|
+
* @param to - Attempted target status
|
|
686
|
+
* @param options - Optional message options with registry for prefix
|
|
687
|
+
* @returns Error message describing the violation
|
|
688
|
+
*
|
|
689
|
+
* @example
|
|
690
|
+
* ```typescript
|
|
691
|
+
* getTransitionErrorMessage("roadmap", "completed");
|
|
692
|
+
* // → "Cannot transition from 'roadmap' to 'completed'. Must go through 'active' first."
|
|
693
|
+
*
|
|
694
|
+
* getTransitionErrorMessage("completed", "active");
|
|
695
|
+
* // → "Cannot transition from 'completed' (terminal state). Use unlock-reason tag to modify."
|
|
696
|
+
* ```
|
|
697
|
+
*/
|
|
698
|
+
````
|
|
699
|
+
|
|
700
|
+
```typescript
|
|
701
|
+
function getTransitionErrorMessage(
|
|
702
|
+
from: ProcessStatusValue,
|
|
703
|
+
to: ProcessStatusValue,
|
|
704
|
+
options?: TransitionMessageOptions
|
|
705
|
+
): string;
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
| Parameter | Type | Description |
|
|
709
|
+
| --------- | ---- | ------------------------------------------------- |
|
|
710
|
+
| from | | Current status |
|
|
711
|
+
| to | | Attempted target status |
|
|
712
|
+
| options | | Optional message options with registry for prefix |
|
|
713
|
+
|
|
714
|
+
**Returns:** Error message describing the violation
|
|
715
|
+
|
|
716
|
+
### getProtectionLevel (function)
|
|
717
|
+
|
|
718
|
+
````typescript
|
|
719
|
+
/**
|
|
720
|
+
* Get the protection level for a status
|
|
721
|
+
*
|
|
722
|
+
* @param status - Process status value
|
|
723
|
+
* @returns Protection level for the status
|
|
724
|
+
*
|
|
725
|
+
* @example
|
|
726
|
+
* ```typescript
|
|
727
|
+
* getProtectionLevel("active"); // → "scope"
|
|
728
|
+
* getProtectionLevel("completed"); // → "hard"
|
|
729
|
+
* ```
|
|
730
|
+
*/
|
|
731
|
+
````
|
|
732
|
+
|
|
733
|
+
```typescript
|
|
734
|
+
function getProtectionLevel(status: ProcessStatusValue): ProtectionLevel;
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
| Parameter | Type | Description |
|
|
738
|
+
| --------- | ---- | -------------------- |
|
|
739
|
+
| status | | Process status value |
|
|
740
|
+
|
|
741
|
+
**Returns:** Protection level for the status
|
|
742
|
+
|
|
743
|
+
### isTerminalState (function)
|
|
744
|
+
|
|
745
|
+
````typescript
|
|
746
|
+
/**
|
|
747
|
+
* Check if a status is a terminal state (cannot transition out)
|
|
748
|
+
*
|
|
749
|
+
* Terminal states require explicit unlock to modify.
|
|
750
|
+
*
|
|
751
|
+
* @param status - Process status value
|
|
752
|
+
* @returns true if the status is terminal
|
|
753
|
+
*
|
|
754
|
+
* @example
|
|
755
|
+
* ```typescript
|
|
756
|
+
* isTerminalState("completed"); // → true
|
|
757
|
+
* isTerminalState("active"); // → false
|
|
758
|
+
* ```
|
|
759
|
+
*/
|
|
760
|
+
````
|
|
761
|
+
|
|
762
|
+
```typescript
|
|
763
|
+
function isTerminalState(status: ProcessStatusValue): boolean;
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
| Parameter | Type | Description |
|
|
767
|
+
| --------- | ---- | -------------------- |
|
|
768
|
+
| status | | Process status value |
|
|
769
|
+
|
|
770
|
+
**Returns:** true if the status is terminal
|
|
771
|
+
|
|
772
|
+
### isFullyEditable (function)
|
|
773
|
+
|
|
774
|
+
```typescript
|
|
775
|
+
/**
|
|
776
|
+
* Check if a status is fully editable (no protection)
|
|
777
|
+
*
|
|
778
|
+
* @param status - Process status value
|
|
779
|
+
* @returns true if the status has no protection
|
|
780
|
+
*/
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
```typescript
|
|
784
|
+
function isFullyEditable(status: ProcessStatusValue): boolean;
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
| Parameter | Type | Description |
|
|
788
|
+
| --------- | ---- | -------------------- |
|
|
789
|
+
| status | | Process status value |
|
|
790
|
+
|
|
791
|
+
**Returns:** true if the status has no protection
|
|
792
|
+
|
|
793
|
+
### isScopeLocked (function)
|
|
794
|
+
|
|
795
|
+
```typescript
|
|
796
|
+
/**
|
|
797
|
+
* Check if a status is scope-locked
|
|
798
|
+
*
|
|
799
|
+
* @param status - Process status value
|
|
800
|
+
* @returns true if the status prevents scope changes
|
|
801
|
+
*/
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
```typescript
|
|
805
|
+
function isScopeLocked(status: ProcessStatusValue): boolean;
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
| Parameter | Type | Description |
|
|
809
|
+
| --------- | ---- | -------------------- |
|
|
810
|
+
| status | | Process status value |
|
|
811
|
+
|
|
812
|
+
**Returns:** true if the status prevents scope changes
|
|
813
|
+
|
|
814
|
+
### validateChanges (function)
|
|
815
|
+
|
|
816
|
+
````typescript
|
|
817
|
+
/**
|
|
818
|
+
* Validate changes against process rules.
|
|
819
|
+
*
|
|
820
|
+
* Pure function following the Decider pattern:
|
|
821
|
+
* - Takes all inputs explicitly (no hidden state)
|
|
822
|
+
* - Returns result without side effects
|
|
823
|
+
* - Emits events for observability
|
|
824
|
+
*
|
|
825
|
+
* @param input - Complete input including state, changes, and options
|
|
826
|
+
* @returns DeciderOutput with validation result and events
|
|
827
|
+
*
|
|
828
|
+
* @example
|
|
829
|
+
* ```typescript
|
|
830
|
+
* const output = validateChanges({
|
|
831
|
+
* state: processState,
|
|
832
|
+
* changes: changeDetection,
|
|
833
|
+
* options: { strict: false, ignoreSession: false },
|
|
834
|
+
* });
|
|
835
|
+
*
|
|
836
|
+
* if (!output.result.valid) {
|
|
837
|
+
* console.log('Violations:', output.result.violations);
|
|
838
|
+
* }
|
|
839
|
+
* ```
|
|
840
|
+
*/
|
|
841
|
+
````
|
|
842
|
+
|
|
843
|
+
```typescript
|
|
844
|
+
function validateChanges(input: DeciderInput): DeciderOutput;
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
| Parameter | Type | Description |
|
|
848
|
+
| --------- | ---- | ---------------------------------------------------- |
|
|
849
|
+
| input | | Complete input including state, changes, and options |
|
|
850
|
+
|
|
851
|
+
**Returns:** DeciderOutput with validation result and events
|
|
852
|
+
|
|
853
|
+
### defaultRules (const)
|
|
854
|
+
|
|
855
|
+
```typescript
|
|
856
|
+
/**
|
|
857
|
+
* All default lint rules
|
|
858
|
+
*
|
|
859
|
+
* Order matters for output - errors first, then warnings, then info.
|
|
860
|
+
*/
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
```typescript
|
|
864
|
+
const defaultRules: readonly LintRule[];
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
### severityOrder (const)
|
|
868
|
+
|
|
869
|
+
```typescript
|
|
870
|
+
/**
|
|
871
|
+
* Severity ordering for sorting and filtering
|
|
872
|
+
* Exported for use by lint engine to avoid duplication
|
|
873
|
+
*/
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
```typescript
|
|
877
|
+
const severityOrder: Record<LintSeverity, number>;
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
### missingPatternName (const)
|
|
881
|
+
|
|
882
|
+
```typescript
|
|
883
|
+
/**
|
|
884
|
+
* Rule: missing-pattern-name
|
|
885
|
+
*
|
|
886
|
+
* Patterns must have an explicit name via the pattern tag.
|
|
887
|
+
* Without a name, the pattern can't be referenced in relationships
|
|
888
|
+
* or indexed properly.
|
|
889
|
+
*/
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
```typescript
|
|
893
|
+
const missingPatternName: LintRule;
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
### missingStatus (const)
|
|
897
|
+
|
|
898
|
+
```typescript
|
|
899
|
+
/**
|
|
900
|
+
* Rule: missing-status
|
|
901
|
+
*
|
|
902
|
+
* Patterns should have an explicit status (completed, active, roadmap, deferred).
|
|
903
|
+
* This helps readers understand if the pattern is ready for use.
|
|
904
|
+
*/
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
```typescript
|
|
908
|
+
const missingStatus: LintRule;
|
|
909
|
+
```
|
|
910
|
+
|
|
911
|
+
---
|
|
912
|
+
|
|
913
|
+
## Business Rules
|
|
914
|
+
|
|
915
|
+
23 patterns, 103 rules with invariants (103 total)
|
|
916
|
+
|
|
917
|
+
### Anti Pattern Detector Testing
|
|
918
|
+
|
|
919
|
+
| Rule | Invariant | Rationale |
|
|
920
|
+
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
921
|
+
| Process metadata should not appear in TypeScript code | Process metadata tags (@architect-status, @architect-phase, etc.) must only appear in Gherkin feature files, never in TypeScript source code. | TypeScript owns runtime behavior while Gherkin owns delivery process metadata — mixing them creates dual-source conflicts and validation ambiguity. |
|
|
922
|
+
| Generator hints should not appear in feature files | Feature files must not contain generator magic comments beyond a configurable threshold. | Generator hints are implementation details that belong in TypeScript — excessive magic comments in specs indicate leaking implementation concerns into business requirements. |
|
|
923
|
+
| Feature files should not have excessive scenarios | A single feature file must not exceed the configured maximum scenario count. | Oversized feature files indicate missing decomposition — they become hard to maintain and slow to execute. |
|
|
924
|
+
| Feature files should not exceed size thresholds | A single feature file must not exceed the configured maximum line count. | Excessively large files indicate a feature that should be split into focused, independently testable specifications. |
|
|
925
|
+
| All anti-patterns can be detected in one pass | The anti-pattern detector must evaluate all registered rules in a single scan pass over the source files. | Single-pass detection ensures consistent results and avoids O(n\*m) performance degradation with multiple file traversals. |
|
|
926
|
+
| Violations can be formatted for console output | Anti-pattern violations must be renderable as grouped, human-readable console output. | Developers need actionable feedback at commit time — ungrouped or unformatted violations are hard to triage and fix. |
|
|
927
|
+
|
|
928
|
+
### Codec Utils Validation
|
|
929
|
+
|
|
930
|
+
| Rule | Invariant | Rationale |
|
|
931
|
+
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
932
|
+
| createJsonInputCodec parses and validates JSON strings | createJsonInputCodec returns an ok Result when the input is valid JSON that conforms to the provided Zod schema, and an err Result with a descriptive CodecError otherwise. | Combining JSON parsing and schema validation into a single operation eliminates the class of bugs where parsed-but-invalid data leaks into the application. |
|
|
933
|
+
| formatCodecError formats errors for display | formatCodecError always returns a non-empty string that includes the operation type and message, and appends validation errors when present. | Consistent error formatting across all codec consumers avoids duplicated formatting logic and ensures error messages always contain enough context for debugging. |
|
|
934
|
+
|
|
935
|
+
### Config Schema Validation
|
|
936
|
+
|
|
937
|
+
| Rule | Invariant | Rationale |
|
|
938
|
+
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
939
|
+
| ScannerConfigSchema validates scanner configuration | Scanner configuration must contain at least one valid glob pattern with no parent directory traversal, and baseDir must resolve to an absolute path. | Malformed or malicious glob patterns could scan outside project boundaries, exposing sensitive files. |
|
|
940
|
+
| GeneratorConfigSchema validates generator configuration | Generator configuration must use a .json registry file and an output directory that does not escape the project root via parent traversal. | Non-JSON registry files could introduce parsing vulnerabilities, and unrestricted output paths could overwrite files outside the project. |
|
|
941
|
+
| isScannerConfig type guard narrows unknown values | isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir. | Without a reliable type guard, callers cannot safely narrow unknown config objects and risk accessing properties on incompatible types at runtime. |
|
|
942
|
+
| isGeneratorConfig type guard narrows unknown values | isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath. | Without a reliable type guard, callers cannot safely narrow unknown config objects and risk passing malformed generator configs that bypass schema validation. |
|
|
943
|
+
|
|
944
|
+
### Detect Changes Testing
|
|
945
|
+
|
|
946
|
+
| Rule | Invariant | Rationale |
|
|
947
|
+
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
948
|
+
| Status changes are detected as modifications not additions | When a deliverable's status value changes between versions, the change detector must classify it as a modification, not an addition or removal. | Correct change classification drives scope-creep detection — misclassifying a status change as an addition would trigger false scope-creep violations on active specs. |
|
|
949
|
+
| New deliverables are detected as additions | Deliverables present in the new version but absent in the old version must be classified as additions. | Addition detection powers the scope-creep rule — new deliverables added to active specs must be flagged as violations. |
|
|
950
|
+
| Removed deliverables are detected as removals | Deliverables present in the old version but absent in the new version must be classified as removals. | Removal detection enables the deliverable-removed warning — silently dropping deliverables could hide incomplete work. |
|
|
951
|
+
| Mixed changes are correctly categorized | When a single diff contains additions, removals, and modifications simultaneously, each change must be independently categorized. | Real-world commits often contain mixed changes — incorrect categorization of any single change cascades into wrong validation decisions. |
|
|
952
|
+
| Non-deliverable tables are ignored | Changes to non-deliverable tables (e.g., ScenarioOutline Examples tables) must not be detected as deliverable changes. | Feature files contain many table structures — only the Background deliverables table is semantically relevant to process guard validation. |
|
|
953
|
+
|
|
954
|
+
### DoD Validator Testing
|
|
955
|
+
|
|
956
|
+
| Rule | Invariant | Rationale |
|
|
957
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
958
|
+
| Deliverable completion uses canonical status taxonomy | Deliverable completion status must be determined exclusively using the 6 canonical values from the deliverable status taxonomy. | Freeform status strings bypass schema validation and produce inconsistent completion tracking across the monorepo. |
|
|
959
|
+
| Acceptance criteria must be tagged with @acceptance-criteria | Every completed pattern must have at least one scenario tagged with @acceptance-criteria in its feature file. | Without explicit acceptance criteria tags, there is no machine-verifiable proof that the delivered work meets its requirements. |
|
|
960
|
+
| Acceptance criteria scenarios can be extracted by name | The validator must be able to extract scenario names from @acceptance-criteria-tagged scenarios for reporting. | Extracted names appear in traceability reports and DoD summaries, providing an audit trail from requirement to verification. |
|
|
961
|
+
| DoD requires all deliverables complete and AC present | A pattern passes Definition of Done only when ALL deliverables have complete status AND at least one @acceptance-criteria scenario exists. | Partial completion or missing acceptance criteria means the pattern is not verified — marking it complete would bypass quality gates. |
|
|
962
|
+
| DoD can be validated across multiple completed phases | DoD validation must evaluate all completed phases independently and report per-phase pass/fail results. | Multi-phase patterns need granular validation — a single aggregate result would hide which specific phase failed its Definition of Done. |
|
|
963
|
+
| Summary can be formatted for console output | DoD validation results must be renderable as structured console output showing phase-level pass/fail details. | Developers need immediate, actionable feedback during pre-commit validation — raw data structures are not human-readable. |
|
|
964
|
+
|
|
965
|
+
### FSM Validator Testing
|
|
966
|
+
|
|
967
|
+
| Rule | Invariant | Rationale |
|
|
968
|
+
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
969
|
+
| Status values must be valid PDR-005 FSM states | Every pattern status value must be one of the states defined in the PDR-005 finite state machine (roadmap, active, completed, deferred). | Invalid status values bypass FSM transition validation and produce undefined behavior in process guard enforcement. |
|
|
970
|
+
| Status transitions must follow FSM rules | Every status change must follow a valid edge in the PDR-005 state machine graph — no skipping states or invalid paths. | The FSM encodes the delivery workflow contract — invalid transitions indicate process violations that could corrupt delivery tracking. |
|
|
971
|
+
| Completed patterns should have proper metadata | Patterns in completed status must carry completion date and actual effort metadata to pass validation without warnings. | Completion metadata enables retrospective analysis and effort estimation — missing metadata degrades project planning accuracy over time. |
|
|
972
|
+
| Protection levels match FSM state definitions | Each FSM state must map to exactly one protection level (none, scope-locked, or hard-locked) as defined in PDR-005. | Protection levels enforce edit constraints per state — mismatched protection would allow prohibited modifications to active or completed specs. |
|
|
973
|
+
| Combined validation provides complete results | The FSM validator must return a combined result including status validity, transition validity, metadata warnings, and protection level in a single call. | Callers need a complete validation picture — requiring multiple separate calls risks partial validation and inconsistent error reporting. |
|
|
974
|
+
|
|
975
|
+
### Lint Engine Testing
|
|
976
|
+
|
|
977
|
+
| Rule | Invariant | Rationale |
|
|
978
|
+
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
979
|
+
| Single directive linting validates annotations against rules | Every directive is checked against all provided rules and violations include source location. | Skipping rules or omitting source locations makes violations unactionable, as developers cannot locate or understand the issue. |
|
|
980
|
+
| Multi-file batch linting aggregates results across files | All files and directives are scanned, violations are collected per file, and severity counts are accurate. | Missing files or inaccurate severity counts cause silent rule violations in CI and undermine trust in the linting pipeline. |
|
|
981
|
+
| Failure detection respects strict mode for severity escalation | Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure. | Without correct severity-to-exit-code mapping, CI pipelines either miss real errors or block on informational messages, eroding developer trust in the linter. |
|
|
982
|
+
| Violation sorting orders by severity then by line number | Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array. | Unsorted output forces developers to manually scan for critical errors among lower-severity noise, and mutating the original array would break callers that hold a reference to it. |
|
|
983
|
+
| Pretty formatting produces human-readable output with severity counts | Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations. | Incomplete formatting (missing file paths or line numbers) prevents developers from navigating directly to violations, and noisy output in quiet mode defeats its purpose. |
|
|
984
|
+
| JSON formatting produces machine-readable output with full details | JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message. | Machine consumers (CI pipelines, IDE integrations) depend on valid JSON with complete fields; missing or malformed output breaks automated tooling downstream. |
|
|
985
|
+
|
|
986
|
+
### Linter Validation Testing
|
|
987
|
+
|
|
988
|
+
| Rule | Invariant | Rationale |
|
|
989
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
990
|
+
| Pattern cannot implement itself (circular reference) | A pattern's implements tag must reference a different pattern than its own pattern tag. | Self-implementing patterns create circular references that break the sub-pattern hierarchy. |
|
|
991
|
+
| Relationship targets should exist (strict mode) | Every relationship target must reference a pattern that exists in the known pattern registry when strict mode is enabled. | Dangling references to non-existent patterns produce broken dependency graphs and misleading documentation. |
|
|
992
|
+
| Bidirectional traceability links should be consistent | Every forward traceability link (executable-specs, roadmap-spec) must have a corresponding back-link in the target file. | Asymmetric links mean one side of the traceability chain is invisible, defeating the purpose of bidirectional tracing. |
|
|
993
|
+
| Parent references must be valid | A pattern's parent reference must point to an existing epic pattern in the registry. | Dangling parent references break the epic-to-pattern hierarchy, causing patterns to appear orphaned in roadmap views and losing rollup visibility. |
|
|
994
|
+
|
|
995
|
+
### Lint Rule Advanced Testing
|
|
996
|
+
|
|
997
|
+
| Rule | Invariant | Rationale |
|
|
998
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
999
|
+
| Descriptions must not repeat the pattern name | A description that merely echoes the pattern name adds no value and must be rejected. | Tautological descriptions waste reader attention and indicate missing documentation effort. |
|
|
1000
|
+
| Default rules collection is complete and well-ordered | The default rules collection must contain all defined rules with unique IDs, ordered by severity (errors first). | A complete, ordered collection ensures no rule is silently dropped and severity-based filtering works correctly. |
|
|
1001
|
+
| Rules can be filtered by minimum severity | Filtering by severity must return only rules at or above the specified level. | CI pipelines need to control which violations block merges vs. which are advisory. |
|
|
1002
|
+
|
|
1003
|
+
### Lint Rule Individual Testing
|
|
1004
|
+
|
|
1005
|
+
| Rule | Invariant | Rationale |
|
|
1006
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
1007
|
+
| Files must declare an explicit pattern name | Every annotated file must have a non-empty patternName to be identifiable in the registry. | Without a pattern name, the file cannot be tracked, linked, or referenced in generated documentation. |
|
|
1008
|
+
| Files should declare a lifecycle status | Every annotated file should have a status tag to track its position in the delivery lifecycle. | Missing status prevents FSM validation and roadmap tracking. |
|
|
1009
|
+
| Files must use canonical FSM status values | Annotated files may use only the canonical PDR-005 FSM statuses: roadmap, active, completed, deferred. | Legacy aliases hide process drift and break a single-source-of-truth workflow model. |
|
|
1010
|
+
| Files should document when to use the pattern | Annotated files should include whenToUse guidance so consumers know when to apply the pattern. | Without usage guidance, patterns become undiscoverable despite being documented. |
|
|
1011
|
+
| Files should declare relationship tags | Annotated files should declare uses or usedBy relationships to enable dependency tracking and architecture diagrams. | Isolated patterns without relationships produce diagrams with no edges and prevent dependency analysis. |
|
|
1012
|
+
|
|
1013
|
+
### Phase Numbering Conventions
|
|
1014
|
+
|
|
1015
|
+
| Rule | Invariant | Rationale |
|
|
1016
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1017
|
+
| Phase numbers must be unique within a release | No two specs within the same release version may share the same phase number. | Duplicate phase numbers create ambiguous ordering, causing unpredictable generation output and incorrect roadmap sequencing. |
|
|
1018
|
+
| Phase number gaps are detected | Large gaps in the phase number sequence must produce warnings during validation. | Undetected gaps signal accidentally skipped or orphaned specs, leading to misleading roadmap progress and hidden incomplete work. |
|
|
1019
|
+
| CLI suggests next available phase number | The suggested phase number must not conflict with any existing phase in the target release. | Without automated suggestion, authors manually guess the next number, frequently picking duplicates that are only caught later at validation time. |
|
|
1020
|
+
|
|
1021
|
+
### Phase State Machine Validation
|
|
1022
|
+
|
|
1023
|
+
| Rule | Invariant | Rationale |
|
|
1024
|
+
| --------------------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1025
|
+
| Valid status values are enforced | Phase status must be one of the four canonical values: roadmap, active, completed, or deferred. | Freeform status strings bypass FSM transition enforcement and produce undefined behavior in downstream generators and validators. |
|
|
1026
|
+
| Status transitions follow state machine rules | Every status transition must follow a permitted edge in the FSM transition matrix. | Skipping states (e.g., roadmap to completed) breaks scope-lock enforcement and allows incomplete deliverables to reach terminal status. |
|
|
1027
|
+
| Terminal states require completion metadata | Phases reaching completed status must carry a completion date and actual effort tag. | Without completion metadata, effort variance tracking and timeline reporting produce gaps that undermine delivery process visibility. |
|
|
1028
|
+
|
|
1029
|
+
### Process Guard Linter
|
|
1030
|
+
|
|
1031
|
+
| Rule | Invariant | Rationale |
|
|
1032
|
+
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1033
|
+
| Protection levels determine modification restrictions | Every file's modification restrictions are determined solely by its `@architect-status` tag, with `completed` requiring an explicit unlock reason for any change. | Without status-derived protection, completed and approved work can be silently overwritten by bulk edits or accidental modifications. |
|
|
1034
|
+
| Session definition files scope what can be modified | When an active session exists, only specs explicitly listed in the session definition may be modified without warning, and excluded specs cannot be modified at all. | Without session scoping, bulk operations and context switches cause unintended modifications to specs outside the current work focus. |
|
|
1035
|
+
| Status transitions follow PDR-005 FSM | Every status change must follow a valid edge in the PDR-005 finite state machine; no transition may skip intermediate states. | Skipping states (e.g., `roadmap` directly to `completed`) bypasses scope-locking and review gates, allowing incomplete work to be marked as done. |
|
|
1036
|
+
| Active specs cannot add new deliverables | The deliverables table of an `active` spec is immutable with respect to new rows; only existing deliverable statuses may change. | Adding deliverables after work has begun constitutes scope creep, undermining effort estimates and blocking completion. |
|
|
1037
|
+
| CLI provides flexible validation modes | The CLI must support both pre-commit (staged-only) and CI (all-files) validation modes with deterministic exit codes reflecting violation severity. | Without flexible modes, teams cannot integrate process guard into both local developer workflows and CI pipelines with appropriate strictness levels. |
|
|
1038
|
+
| Integrates with existing lint infrastructure | Process guard output format and exit code semantics must be consistent with the existing `lint-patterns` tool. | Inconsistent output formats force consumers to maintain separate parsers, and inconsistent exit codes break combined lint pipelines. |
|
|
1039
|
+
| New tags support process guard functionality | Session and protection tags must be registered in the TypeScript taxonomy with defined formats before use in feature files. | Unregistered tags bypass schema validation and are silently ignored by the scanner, causing process guard rules to fail without diagnostics. |
|
|
1040
|
+
|
|
1041
|
+
### Process Guard Testing
|
|
1042
|
+
|
|
1043
|
+
| Rule | Invariant | Rationale |
|
|
1044
|
+
| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
1045
|
+
| Completed files require unlock-reason to modify | A completed spec file cannot be modified unless it carries an @architect-unlock-reason tag. | Completed work represents validated, shipped functionality — accidental modification risks regression. |
|
|
1046
|
+
| Status transitions must follow PDR-005 FSM | Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap. | The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation). |
|
|
1047
|
+
| Active specs cannot add new deliverables | A spec in active status cannot have deliverables added that were not present when it entered active. | Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments. |
|
|
1048
|
+
| Files outside active session scope trigger warnings | Files modified outside the active session's declared scope produce a session-scope warning. | Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible. |
|
|
1049
|
+
| Explicitly excluded files trigger errors | Files explicitly excluded from a session cannot be modified, producing a session-excluded error. | Exclusion is stronger than scope — it marks files that must NOT be touched during this session. |
|
|
1050
|
+
| Multiple rules validate independently | Each validation rule evaluates independently — a single file can produce violations from multiple rules. | Independent evaluation ensures no rule masks another, giving complete diagnostic output. |
|
|
1051
|
+
|
|
1052
|
+
### Release Association Rules
|
|
1053
|
+
|
|
1054
|
+
| Rule | Invariant | Rationale |
|
|
1055
|
+
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1056
|
+
| Spec files must not contain release columns | Spec file DataTables must never include a Release column; release metadata belongs exclusively in phase files. | Mixing release metadata into specs couples planning artifacts to release timing, violating the separation defined by PDR-003. |
|
|
1057
|
+
| TypeScript phase files must have required annotations | Every TypeScript phase file must include @architect-pattern, @architect-phase, and @architect-status annotations. | Missing required annotations cause phase files to be invisible to the scanner, producing incomplete roadmap projections and broken cross-references. |
|
|
1058
|
+
| Release version follows semantic versioning | All release version identifiers must conform to the `vX.Y.Z` semantic versioning format. | Non-semver version strings break downstream tooling that relies on version ordering and comparison for release planning. |
|
|
1059
|
+
|
|
1060
|
+
### Status Aware Eslint Suppression
|
|
1061
|
+
|
|
1062
|
+
| Rule | Invariant | Rationale |
|
|
1063
|
+
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1064
|
+
| File status determines unused-vars enforcement | Files with `@architect-status roadmap` or `deferred` have relaxed unused-vars rules. Files with `active`, `completed`, or no status have strict enforcement. | Design artifacts (roadmap stubs) define API shapes that are intentionally unused until implementation. Relaxing rules for these files prevents false positives while ensuring implemented code (active/completed) remains strictly checked. |
|
|
1065
|
+
| Reuses deriveProcessState for status extraction | Status extraction logic must be shared with Process Guard Linter. No duplicate parsing or status-to-protection mapping. | DRY principle - the Process Guard already has battle-tested status extraction from JSDoc comments. Duplicating this logic creates maintenance burden and potential inconsistencies between tools. |
|
|
1066
|
+
| ESLint Processor filters messages based on status | The processor uses ESLint's postprocess hook to filter or downgrade messages. Source code is never modified. No eslint-disable comments are injected. | ESLint processors can inspect and filter linting messages after rules run. This approach: - Requires no source code modification - Works with any ESLint rule (not just no-unused-vars) - Can be extended to other status-based behaviors |
|
|
1067
|
+
| CLI can generate static ESLint ignore list | Running `pnpm lint:process --eslint-ignores` outputs a list of files that should have relaxed linting, suitable for inclusion in eslint.config.js. | For CI environments or users preferring static configuration, a generated list provides an alternative to runtime processing. The list can be regenerated whenever status annotations change. |
|
|
1068
|
+
| Replaces directory-based ESLint exclusions | After implementation, the directory-based exclusions in eslint.config.js (lines 30-57) are removed. All suppression is driven by @architect-status annotations. | Directory-based exclusions are tech debt: - They don't account for file lifecycle (roadmap -> completed) - They require manual updates when new roadmap directories are added - They persist even after files are implemented |
|
|
1069
|
+
| Rule relaxation is configurable | The set of rules relaxed for roadmap/deferred files is configurable, defaulting to `@typescript-eslint/no-unused-vars`. | Different projects may want to relax different rules for design artifacts. The default covers the common case (unused exports in API stubs). |
|
|
1070
|
+
|
|
1071
|
+
### Status Transition Detection Testing
|
|
1072
|
+
|
|
1073
|
+
| Rule | Invariant | Rationale |
|
|
1074
|
+
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1075
|
+
| Status transitions are detected from file-level tags | Status transitions must be detected by comparing @architect-status tags at the file level between the old and new versions of a file. | File-level tags are the canonical source of pattern status — detecting transitions from tags ensures consistency with the FSM validator. |
|
|
1076
|
+
| Status tags inside docstrings are ignored | Status tags appearing inside Gherkin docstring blocks (between triple-quote delimiters) must not be treated as real status declarations. | Docstrings often contain example code or documentation showing status tags — parsing these as real would cause phantom status transitions. |
|
|
1077
|
+
| First valid status tag outside docstrings is used | When multiple status tags appear outside docstrings, only the first one determines the file's status. | A single canonical status per file prevents ambiguity — using the first tag matches Gherkin convention where file-level tags appear at the top. |
|
|
1078
|
+
| Line numbers are tracked from hunk headers | Detected status transitions must include the line number where the status tag appears, derived from git diff hunk headers. | Line numbers enable precise error reporting — developers need to know exactly where in the file the transition was detected. |
|
|
1079
|
+
| Generated documentation directories are excluded | Files in generated documentation directories (docs-generated/, docs-living/) must be excluded from status transition detection. | Generated files are projections of source files — detecting transitions in them would produce duplicate violations and false positives. |
|
|
1080
|
+
|
|
1081
|
+
### Step Lint Extended Rules
|
|
1082
|
+
|
|
1083
|
+
| Rule | Invariant | Rationale |
|
|
1084
|
+
| -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1085
|
+
| Hash in step text is detected | A hash character in the middle of a Gherkin step line can be interpreted as a comment by some parsers, silently truncating the step text. This differs from hash-in-description (which catches hash inside description pseudo-code-blocks). | We encountered this exact trap while writing the lint-steps test suite. Step text like "Given a file with # inside" was silently truncated to "Given a file with". |
|
|
1086
|
+
| Gherkin keywords in description text are detected | A Feature or Rule description line that starts with Given, When, Then, And, or But breaks the Gherkin parser because it interprets the line as a step definition rather than description text. | This is documented in vitest-cucumber quirks but has no static detection. Authors writing natural language descriptions accidentally start sentences with these keywords. |
|
|
1087
|
+
| Scenario Outline steps with quoted values are detected | When a feature file has a Scenario Outline and its steps use quoted values instead of angle-bracket placeholders, this indicates the author may be using the Scenario pattern (function params) instead of the ScenarioOutline pattern (variables object). This is the feature-file side of the Two-Pattern Problem. | The existing scenario-outline-function-params rule catches the step-file side. This rule catches the feature-file side where quoted values in Scenario Outline steps suggest the author expects Cucumber expression matching rather than variable substitution. |
|
|
1088
|
+
| Repeated step patterns in the same scenario are detected | Registering the same step pattern twice in one Scenario block causes vitest-cucumber to overwrite the first registration. Only the last callback runs, causing silent test failures where assertions appear to pass but the setup was wrong. | This happens when authors copy-paste step definitions within a scenario and forget to change the pattern. The failure is silent — tests pass but with wrong assertions. |
|
|
1089
|
+
|
|
1090
|
+
### Step Lint Vitest Cucumber
|
|
1091
|
+
|
|
1092
|
+
| Rule | Invariant | Rationale |
|
|
1093
|
+
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1094
|
+
| Hash comments inside description pseudo-code-blocks are detected | A # at the start of a line inside a """ block within a Feature or Rule description terminates the description context, because the Gherkin parser treats # as a comment even inside descriptions. The """ delimiters in descriptions are NOT real DocStrings. | This is the most confusing Gherkin parser trap. Authors embed code examples using """ and expect # comments to be protected. The resulting parse error gives no hint about the actual cause. |
|
|
1095
|
+
| Duplicate And steps in the same scenario are detected | Multiple And steps with identical text in the same scenario cause vitest-cucumber step matching failures. The fix is to consolidate into a single step with a DataTable. | Duplicate step text silently overwrites step registrations, causing the second And to match the first handler and produce wrong or undefined behavior at runtime. |
|
|
1096
|
+
| Dollar sign in step text is detected | The $ character in step text causes matching issues in vitest-cucumber's expression parser. | The dollar sign is interpreted as a special character in expression parsing, causing steps to silently fail to match and producing confusing StepAbleUnknowStepError messages. |
|
|
1097
|
+
| Regex step patterns are detected | vitest-cucumber only supports string patterns with {string} and {int}. Regex patterns throw StepAbleStepExpressionError. | Regex patterns are a common Cucumber.js habit that compiles without error but throws at runtime in vitest-cucumber, wasting debugging time. |
|
|
1098
|
+
| Unsupported phrase type is detected | vitest-cucumber does not support {phrase}. Use {string} with quoted values in the feature file. | The {phrase} type is valid in standard Cucumber but unsupported in vitest-cucumber, causing silent parameter capture failures that are difficult to trace. |
|
|
1099
|
+
| ScenarioOutline function params are detected | ScenarioOutline step callbacks must use the variables object, not function params. Using (\_ctx, value: string) means value will be undefined at runtime. | This is the most common vitest-cucumber trap. Function params compile and even type-check, but the values are always undefined at runtime because ScenarioOutline injects data through the variables object, not positional arguments. |
|
|
1100
|
+
| Missing And destructuring is detected | If a feature file has And steps, the step definition must destructure And from the scenario callback. | Without destructuring And, vitest-cucumber cannot bind And steps and throws StepAbleUnknowStepError at runtime with no indication that a missing destructure is the cause. |
|
|
1101
|
+
| Missing Rule wrapper is detected | If a feature file has Rule: blocks, the step definition must destructure Rule from describeFeature. | Without the Rule() wrapper, scenarios inside Rule: blocks are invisible to vitest-cucumber and silently never execute, giving a false green test suite. |
|
|
1102
|
+
| Feature-to-step pairing resolves both loadFeature patterns | Step files use two loadFeature patterns: simple string paths and resolve(\_\_dirname, relative) paths. Both must be paired. | Unpaired feature files cannot be cross-checked for compatibility issues, leaving ScenarioOutline param misuse and missing destructures undetected. |
|
|
1103
|
+
|
|
1104
|
+
### Streaming Git Diff
|
|
1105
|
+
|
|
1106
|
+
| Rule | Invariant | Rationale |
|
|
1107
|
+
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
1108
|
+
| Git commands stream output instead of buffering | Git diff output must be consumed as a stream with constant memory usage, never buffered entirely in memory. | Buffering full diff output causes ENOBUFS crashes on large repositories where diff size exceeds Node.js buffer limits. |
|
|
1109
|
+
| Diff content is parsed as it streams | Status transitions and deliverable changes must be extracted incrementally as each file section completes, not after the entire diff is collected. | Batch-processing the full diff reintroduces the memory bottleneck that streaming is designed to eliminate. |
|
|
1110
|
+
| Streaming errors are handled gracefully | Stream failures and malformed diff lines must return Result errors or be skipped without throwing exceptions. | Unhandled stream errors crash the CLI process, preventing any validation output from reaching the user. |
|
|
1111
|
+
|
|
1112
|
+
### Tag Registry Schemas Validation
|
|
1113
|
+
|
|
1114
|
+
| Rule | Invariant | Rationale |
|
|
1115
|
+
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1116
|
+
| createDefaultTagRegistry produces a valid registry from taxonomy source | createDefaultTagRegistry always returns a TagRegistry that passes TagRegistrySchema validation, with non-empty categories, metadataTags, and aggregationTags arrays. | The default registry is the foundation for all pattern extraction. An invalid or empty default registry would silently break extraction for every consumer. |
|
|
1117
|
+
| mergeTagRegistries deep-merges registries by tag | mergeTagRegistries merges categories, metadataTags, and aggregationTags by their tag field, with override entries replacing base entries of the same tag and new entries being appended. Scalar fields (version, tagPrefix, fileOptInTag, formatOptions) are fully replaced when provided. | Consumers need to customize the taxonomy without losing default definitions. Tag-based merging prevents accidental duplication while allowing targeted overrides. |
|
|
1118
|
+
|
|
1119
|
+
### Validator Read Model Consolidation
|
|
1120
|
+
|
|
1121
|
+
| Rule | Invariant | Rationale |
|
|
1122
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1123
|
+
| Validator queries the read model for cross-source matching | Pattern identity resolution — including implements relationships in both directions — uses `MasterDataset.relationshipIndex` rather than ad-hoc name-equality maps built from raw scanner output. | The MasterDataset computes implementedBy reverse lookups in transform-dataset.ts (second pass, lines 488-546). The validator's current name-equality Map cannot resolve ShapeExtractor -> ShapeExtraction or DecisionDocGeneratorTesting -> DecisionDocGenerator because these are implements relationships, not name matches. |
|
|
1124
|
+
| No lossy local types in the validator | The validator operates on `ExtractedPattern` from the MasterDataset, not a consumer-local DTO that discards fields. | GherkinPatternInfo keeps only name, phase, status, file, and deliverables — discarding uses, dependsOn, implementsPatterns, include, productArea, rules, and 20+ other fields. When the validator needs relationship data, it cannot access it through the lossy type. |
|
|
1125
|
+
| Utility patterns without specs are not false positives | Internal utility patterns that have a `@architect-phase` but will never have a Gherkin spec should not carry phase metadata. Phase tags signal roadmap participation. | Five utility patterns (ContentDeduplicator, FileCache, WarningCollector, SourceMappingValidator, SourceMapper) have phase tags from the phase when they were built. They are infrastructure, not roadmap features. The validator correctly reports missing Gherkin for patterns with phases — the fix is removing the phase tag, not suppressing the warning. |
|
|
1126
|
+
|
|
1127
|
+
### Workflow Config Schemas Validation
|
|
1128
|
+
|
|
1129
|
+
| Rule | Invariant | Rationale |
|
|
1130
|
+
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1131
|
+
| WorkflowConfigSchema validates workflow configurations | WorkflowConfigSchema accepts objects with a name, semver version, at least one status, and at least one phase, and rejects objects missing any required field or with invalid semver format. | Workflow configurations drive FSM validation and phase-based document routing. Malformed configs would cause silent downstream failures in process guard and documentation generation. |
|
|
1132
|
+
| createLoadedWorkflow builds efficient lookup maps | createLoadedWorkflow produces a LoadedWorkflow whose statusMap and phaseMap contain all statuses and phases from the config, keyed by lowercase name for case-insensitive lookup. | O(1) status and phase lookup eliminates repeated linear scans during validation and rendering, where each pattern may reference multiple statuses. |
|
|
1133
|
+
| isWorkflowConfig type guard validates at runtime | isWorkflowConfig returns true only for values that conform to WorkflowConfigSchema and false for all other values including null, undefined, primitives, and partial objects. | Runtime type guards enable safe narrowing in dynamic contexts (config loading, API responses) where TypeScript compile-time types are unavailable. |
|
|
1134
|
+
|
|
1135
|
+
---
|