@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,1048 @@
|
|
|
1
|
+
# Configuration Overview
|
|
2
|
+
|
|
3
|
+
**Purpose:** Configuration product area overview
|
|
4
|
+
**Detail Level:** Full reference
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**How do I configure the tool?** Configuration is the entry boundary — it transforms a user-authored `architect.config.ts` file into a fully resolved `ArchitectInstance` that powers the entire pipeline. The flow is: `defineConfig()` provides type-safe authoring (Vite convention, zero validation), `ConfigLoader` discovers and loads the file, `ProjectConfigSchema` validates via Zod, `ConfigResolver` applies defaults and merges stubs into sources, and `ArchitectFactory` builds the final instance with `TagRegistry` and `RegexBuilders`. Two presets define escalating taxonomy complexity — from 3 categories (`libar-generic`) to 21 (`ddd-es-cqrs`). `SourceMerger` computes per-generator source overrides, enabling generators like changelog to pull from different feature sets than the base config.
|
|
9
|
+
|
|
10
|
+
## Key Invariants
|
|
11
|
+
|
|
12
|
+
- Preset-based taxonomy: `libar-generic` (3 categories, `@architect-`) and `ddd-es-cqrs` (21 categories, full DDD). Presets replace base categories entirely — they define prefix, categories, and metadata tags as a unit
|
|
13
|
+
- Resolution pipeline: defineConfig() → ConfigLoader → ProjectConfigSchema (Zod) → ConfigResolver → ArchitectFactory → ArchitectInstance. Each stage has a single responsibility
|
|
14
|
+
- Stubs merged at resolution time: Stub directory globs are appended to typescript sources, making stubs transparent to the downstream pipeline
|
|
15
|
+
- Source override composition: SourceMerger applies per-generator overrides (`replaceFeatures`, `additionalFeatures`, `additionalInput`) to base sources. Exclude is always inherited from base
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
- [Key Invariants](#key-invariants)
|
|
22
|
+
- [Configuration Loading Boundary](#configuration-loading-boundary)
|
|
23
|
+
- [Configuration Resolution Pipeline](#configuration-resolution-pipeline)
|
|
24
|
+
- [API Types](#api-types)
|
|
25
|
+
- [Business Rules](#business-rules)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Configuration Loading Boundary
|
|
30
|
+
|
|
31
|
+
Scoped architecture diagram showing component relationships:
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
C4Context
|
|
35
|
+
title Configuration Loading Boundary
|
|
36
|
+
Boundary(config, "Config") {
|
|
37
|
+
System(WorkflowLoader, "WorkflowLoader")
|
|
38
|
+
System(ConfigurationTypes, "ConfigurationTypes")
|
|
39
|
+
System(ConfigResolver, "ConfigResolver")
|
|
40
|
+
System(RegexBuilders, "RegexBuilders")
|
|
41
|
+
System(ProjectConfigTypes, "ProjectConfigTypes")
|
|
42
|
+
System(ProjectConfigSchema, "ProjectConfigSchema")
|
|
43
|
+
System(ConfigurationPresets, "ConfigurationPresets")
|
|
44
|
+
System(SourceMerger, "SourceMerger")
|
|
45
|
+
System(ArchitectFactory, "ArchitectFactory")
|
|
46
|
+
System(DefineConfig, "DefineConfig")
|
|
47
|
+
System(ConfigurationDefaults, "ConfigurationDefaults")
|
|
48
|
+
System(ConfigLoader, "ConfigLoader")
|
|
49
|
+
}
|
|
50
|
+
System_Ext(WorkflowConfigSchema, "WorkflowConfigSchema")
|
|
51
|
+
System_Ext(CodecUtils, "CodecUtils")
|
|
52
|
+
Rel(WorkflowLoader, WorkflowConfigSchema, "uses")
|
|
53
|
+
Rel(WorkflowLoader, CodecUtils, "uses")
|
|
54
|
+
Rel(ConfigResolver, ProjectConfigTypes, "uses")
|
|
55
|
+
Rel(ConfigResolver, ArchitectFactory, "uses")
|
|
56
|
+
Rel(ConfigResolver, ConfigurationDefaults, "uses")
|
|
57
|
+
Rel(RegexBuilders, ConfigurationTypes, "uses")
|
|
58
|
+
Rel(ProjectConfigTypes, ConfigurationTypes, "uses")
|
|
59
|
+
Rel(ProjectConfigTypes, ConfigurationPresets, "uses")
|
|
60
|
+
Rel(ProjectConfigSchema, ProjectConfigTypes, "uses")
|
|
61
|
+
Rel(ConfigurationPresets, ConfigurationTypes, "uses")
|
|
62
|
+
Rel(SourceMerger, ProjectConfigTypes, "uses")
|
|
63
|
+
Rel(ArchitectFactory, ConfigurationTypes, "uses")
|
|
64
|
+
Rel(ArchitectFactory, ConfigurationPresets, "uses")
|
|
65
|
+
Rel(ArchitectFactory, RegexBuilders, "uses")
|
|
66
|
+
Rel(DefineConfig, ProjectConfigTypes, "uses")
|
|
67
|
+
Rel(ConfigLoader, ArchitectFactory, "uses")
|
|
68
|
+
Rel(ConfigLoader, ConfigurationTypes, "uses")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Configuration Resolution Pipeline
|
|
74
|
+
|
|
75
|
+
Scoped architecture diagram showing component relationships:
|
|
76
|
+
|
|
77
|
+
```mermaid
|
|
78
|
+
graph LR
|
|
79
|
+
subgraph config["Config"]
|
|
80
|
+
WorkflowLoader[/"WorkflowLoader"/]
|
|
81
|
+
ConfigurationTypes["ConfigurationTypes"]
|
|
82
|
+
ConfigResolver("ConfigResolver")
|
|
83
|
+
RegexBuilders[/"RegexBuilders"/]
|
|
84
|
+
ProjectConfigTypes["ProjectConfigTypes"]
|
|
85
|
+
ProjectConfigSchema[/"ProjectConfigSchema"/]
|
|
86
|
+
ConfigurationPresets["ConfigurationPresets"]
|
|
87
|
+
SourceMerger("SourceMerger")
|
|
88
|
+
ArchitectFactory("ArchitectFactory")
|
|
89
|
+
DefineConfig[/"DefineConfig"/]
|
|
90
|
+
ConfigurationDefaults["ConfigurationDefaults"]
|
|
91
|
+
ConfigLoader[/"ConfigLoader"/]
|
|
92
|
+
end
|
|
93
|
+
subgraph related["Related"]
|
|
94
|
+
WorkflowConfigSchema["WorkflowConfigSchema"]:::neighbor
|
|
95
|
+
CodecUtils["CodecUtils"]:::neighbor
|
|
96
|
+
end
|
|
97
|
+
WorkflowLoader -->|uses| WorkflowConfigSchema
|
|
98
|
+
WorkflowLoader -->|uses| CodecUtils
|
|
99
|
+
ConfigResolver -->|uses| ProjectConfigTypes
|
|
100
|
+
ConfigResolver -->|uses| ArchitectFactory
|
|
101
|
+
ConfigResolver -->|uses| ConfigurationDefaults
|
|
102
|
+
RegexBuilders -->|uses| ConfigurationTypes
|
|
103
|
+
ProjectConfigTypes -->|uses| ConfigurationTypes
|
|
104
|
+
ProjectConfigTypes -->|uses| ConfigurationPresets
|
|
105
|
+
ProjectConfigSchema -->|uses| ProjectConfigTypes
|
|
106
|
+
ConfigurationPresets -->|uses| ConfigurationTypes
|
|
107
|
+
SourceMerger -->|uses| ProjectConfigTypes
|
|
108
|
+
ArchitectFactory -->|uses| ConfigurationTypes
|
|
109
|
+
ArchitectFactory -->|uses| ConfigurationPresets
|
|
110
|
+
ArchitectFactory -->|uses| RegexBuilders
|
|
111
|
+
DefineConfig -->|uses| ProjectConfigTypes
|
|
112
|
+
ConfigLoader -->|uses| ArchitectFactory
|
|
113
|
+
ConfigLoader -->|uses| ConfigurationTypes
|
|
114
|
+
classDef neighbor stroke-dasharray: 5 5
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## API Types
|
|
120
|
+
|
|
121
|
+
### ArchitectConfig (interface)
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
/**
|
|
125
|
+
* Configuration for creating an Architect instance.
|
|
126
|
+
* Uses generics to preserve literal types from presets.
|
|
127
|
+
*/
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
````typescript
|
|
131
|
+
interface ArchitectConfig {
|
|
132
|
+
/** Tag prefix for directives (e.g., "@architect-") */
|
|
133
|
+
readonly tagPrefix: string;
|
|
134
|
+
/** File-level opt-in tag (e.g., "@architect") */
|
|
135
|
+
readonly fileOptInTag: string;
|
|
136
|
+
/** Category definitions for pattern classification */
|
|
137
|
+
readonly categories: readonly CategoryDefinition[];
|
|
138
|
+
/** Optional metadata tag definitions */
|
|
139
|
+
readonly metadataTags?: readonly MetadataTagDefinitionForRegistry[];
|
|
140
|
+
/**
|
|
141
|
+
* Optional context inference rules for auto-inferring bounded context from file paths.
|
|
142
|
+
*
|
|
143
|
+
* When provided, these rules are merged with the default rules. User-provided rules
|
|
144
|
+
* take precedence over defaults (applied first in the rule list).
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* contextInferenceRules: [
|
|
149
|
+
* { pattern: 'packages/orders/**', context: 'orders' },
|
|
150
|
+
* { pattern: 'packages/inventory/**', context: 'inventory' },
|
|
151
|
+
* ]
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
readonly contextInferenceRules?: readonly ContextInferenceRule[];
|
|
155
|
+
}
|
|
156
|
+
````
|
|
157
|
+
|
|
158
|
+
| Property | Description |
|
|
159
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
160
|
+
| tagPrefix | Tag prefix for directives (e.g., "@architect-") |
|
|
161
|
+
| fileOptInTag | File-level opt-in tag (e.g., "@architect") |
|
|
162
|
+
| categories | Category definitions for pattern classification |
|
|
163
|
+
| metadataTags | Optional metadata tag definitions |
|
|
164
|
+
| contextInferenceRules | Optional context inference rules for auto-inferring bounded context from file paths. When provided, these rules are merged with the default rules. User-provided rules take precedence over defaults (applied first in the rule list). `typescript contextInferenceRules: [ { pattern: 'packages/orders/**', context: 'orders' }, { pattern: 'packages/inventory/**', context: 'inventory' }, ] ` |
|
|
165
|
+
|
|
166
|
+
### ArchitectInstance (interface)
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
/**
|
|
170
|
+
* Instance returned by createArchitect with configured registry
|
|
171
|
+
*/
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
interface ArchitectInstance {
|
|
176
|
+
/** The fully configured tag registry */
|
|
177
|
+
readonly registry: TagRegistry;
|
|
178
|
+
/** Regex builders for tag detection */
|
|
179
|
+
readonly regexBuilders: RegexBuilders;
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
| Property | Description |
|
|
184
|
+
| ------------- | --------------------------------- |
|
|
185
|
+
| registry | The fully configured tag registry |
|
|
186
|
+
| regexBuilders | Regex builders for tag detection |
|
|
187
|
+
|
|
188
|
+
### RegexBuilders (interface)
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
/**
|
|
192
|
+
* Regex builders for tag detection
|
|
193
|
+
*
|
|
194
|
+
* Provides type-safe regex operations for detecting and normalizing tags
|
|
195
|
+
* based on the configured tag prefix.
|
|
196
|
+
*/
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
interface RegexBuilders {
|
|
201
|
+
/** Pattern to match file-level opt-in (e.g., /** @architect *\/) */
|
|
202
|
+
readonly fileOptInPattern: RegExp;
|
|
203
|
+
/** Pattern to match directives (e.g., @architect-pattern, @architect-status) */
|
|
204
|
+
readonly directivePattern: RegExp;
|
|
205
|
+
/** Check if content has the file-level opt-in marker */
|
|
206
|
+
hasFileOptIn(content: string): boolean;
|
|
207
|
+
/** Check if content has any doc directives */
|
|
208
|
+
hasDocDirectives(content: string): boolean;
|
|
209
|
+
/** Normalize a tag by removing @ and prefix (e.g., "@architect-pattern" -> "pattern") */
|
|
210
|
+
normalizeTag(tag: string): string;
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
| Property | Description |
|
|
215
|
+
| ---------------- | ------------------------------------------------------------------------- |
|
|
216
|
+
| fileOptInPattern | Pattern to match file-level opt-in (e.g., /\*_ @architect _\/) |
|
|
217
|
+
| directivePattern | Pattern to match directives (e.g., @architect-pattern, @architect-status) |
|
|
218
|
+
|
|
219
|
+
### ArchitectProjectConfig (interface)
|
|
220
|
+
|
|
221
|
+
````typescript
|
|
222
|
+
/**
|
|
223
|
+
* Unified project configuration for Architect.
|
|
224
|
+
*
|
|
225
|
+
* This is the shape users provide in `architect.config.ts` or `architect.config.js`.
|
|
226
|
+
* `defineConfig()` is an identity function providing type safety.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* import { defineConfig } from '@libar-dev/architect/config';
|
|
231
|
+
*
|
|
232
|
+
* export default defineConfig({
|
|
233
|
+
* preset: 'ddd-es-cqrs',
|
|
234
|
+
* sources: {
|
|
235
|
+
* typescript: ['packages/* /src/** /*.ts'],
|
|
236
|
+
* features: ['architect/specs/** /*.feature'],
|
|
237
|
+
* stubs: ['architect/stubs/** /*.ts'],
|
|
238
|
+
* },
|
|
239
|
+
* output: { directory: 'docs-living', overwrite: true },
|
|
240
|
+
* });
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
````
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
interface ArchitectProjectConfig {
|
|
247
|
+
// --- Taxonomy ---
|
|
248
|
+
|
|
249
|
+
/** Use a preset taxonomy configuration */
|
|
250
|
+
readonly preset?: PresetName;
|
|
251
|
+
|
|
252
|
+
/** Custom tag prefix (overrides preset, e.g., '@architect-') */
|
|
253
|
+
readonly tagPrefix?: string;
|
|
254
|
+
|
|
255
|
+
/** Custom file opt-in tag (overrides preset, e.g., '@architect') */
|
|
256
|
+
readonly fileOptInTag?: string;
|
|
257
|
+
|
|
258
|
+
/** Custom categories (replaces preset categories entirely) */
|
|
259
|
+
readonly categories?: ArchitectConfig['categories'];
|
|
260
|
+
|
|
261
|
+
// --- Sources ---
|
|
262
|
+
|
|
263
|
+
/** Source file glob configuration */
|
|
264
|
+
readonly sources?: SourcesConfig;
|
|
265
|
+
|
|
266
|
+
// --- Output ---
|
|
267
|
+
|
|
268
|
+
/** Output configuration for generated docs */
|
|
269
|
+
readonly output?: OutputConfig;
|
|
270
|
+
|
|
271
|
+
// --- Generators ---
|
|
272
|
+
|
|
273
|
+
/** Default generator names to run when CLI doesn't specify --generators */
|
|
274
|
+
readonly generators?: readonly string[];
|
|
275
|
+
|
|
276
|
+
/** Per-generator source and output overrides */
|
|
277
|
+
readonly generatorOverrides?: Readonly<Record<string, GeneratorSourceOverride>>;
|
|
278
|
+
|
|
279
|
+
// --- Advanced ---
|
|
280
|
+
|
|
281
|
+
/** Rules for auto-inferring bounded context from file paths */
|
|
282
|
+
readonly contextInferenceRules?: readonly ContextInferenceRule[];
|
|
283
|
+
|
|
284
|
+
/** Path to custom workflow config JSON (relative to config file) */
|
|
285
|
+
readonly workflowPath?: string;
|
|
286
|
+
|
|
287
|
+
// --- Codec Options ---
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Per-codec options for fine-tuning document generation.
|
|
291
|
+
* Keys match codec names (e.g., 'business-rules', 'patterns').
|
|
292
|
+
* Passed through to codec factories at generation time.
|
|
293
|
+
*/
|
|
294
|
+
readonly codecOptions?: CodecOptions;
|
|
295
|
+
|
|
296
|
+
// --- Reference Documents ---
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Reference document configurations for convention-based doc generation.
|
|
300
|
+
* Each config defines one reference document's content composition via
|
|
301
|
+
* convention tags, shape selectors, behavior categories, and diagram scopes.
|
|
302
|
+
*
|
|
303
|
+
* When not specified, no reference generators are registered.
|
|
304
|
+
* Import `LIBAR_REFERENCE_CONFIGS` from the generators module
|
|
305
|
+
* to use the built-in set.
|
|
306
|
+
*/
|
|
307
|
+
readonly referenceDocConfigs?: readonly ReferenceDocConfig[];
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
| Property | Description |
|
|
312
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
313
|
+
| preset | Use a preset taxonomy configuration |
|
|
314
|
+
| tagPrefix | Custom tag prefix (overrides preset, e.g., '@architect-') |
|
|
315
|
+
| fileOptInTag | Custom file opt-in tag (overrides preset, e.g., '@architect') |
|
|
316
|
+
| categories | Custom categories (replaces preset categories entirely) |
|
|
317
|
+
| sources | Source file glob configuration |
|
|
318
|
+
| output | Output configuration for generated docs |
|
|
319
|
+
| generators | Default generator names to run when CLI doesn't specify --generators |
|
|
320
|
+
| generatorOverrides | Per-generator source and output overrides |
|
|
321
|
+
| contextInferenceRules | Rules for auto-inferring bounded context from file paths |
|
|
322
|
+
| workflowPath | Path to custom workflow config JSON (relative to config file) |
|
|
323
|
+
| codecOptions | Per-codec options for fine-tuning document generation. Keys match codec names (e.g., 'business-rules', 'patterns'). Passed through to codec factories at generation time. |
|
|
324
|
+
| referenceDocConfigs | Reference document configurations for convention-based doc generation. Each config defines one reference document's content composition via convention tags, shape selectors, behavior categories, and diagram scopes. When not specified, no reference generators are registered. Import `LIBAR_REFERENCE_CONFIGS` from the generators module to use the built-in set. |
|
|
325
|
+
|
|
326
|
+
### SourcesConfig (interface)
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
/**
|
|
330
|
+
* Source glob configuration for the project.
|
|
331
|
+
* Centralizes what previously lived in CLI --input/--features flags.
|
|
332
|
+
*/
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
interface SourcesConfig {
|
|
337
|
+
/** Glob patterns for TypeScript source files (replaces --input) */
|
|
338
|
+
readonly typescript: readonly string[];
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Glob patterns for Gherkin feature files (replaces --features).
|
|
342
|
+
* Includes both `.feature` and `.feature.md` files.
|
|
343
|
+
*/
|
|
344
|
+
readonly features?: readonly string[];
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Glob patterns for design stub files.
|
|
348
|
+
* Stubs are TypeScript files that live outside `src/` (e.g., `architect/stubs/`).
|
|
349
|
+
* Merged into TypeScript sources at resolution time.
|
|
350
|
+
*/
|
|
351
|
+
readonly stubs?: readonly string[];
|
|
352
|
+
|
|
353
|
+
/** Glob patterns to exclude from all scanning */
|
|
354
|
+
readonly exclude?: readonly string[];
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
| Property | Description |
|
|
359
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
360
|
+
| typescript | Glob patterns for TypeScript source files (replaces --input) |
|
|
361
|
+
| features | Glob patterns for Gherkin feature files (replaces --features). Includes both `.feature` and `.feature.md` files. |
|
|
362
|
+
| stubs | Glob patterns for design stub files. Stubs are TypeScript files that live outside `src/` (e.g., `architect/stubs/`). Merged into TypeScript sources at resolution time. |
|
|
363
|
+
| exclude | Glob patterns to exclude from all scanning |
|
|
364
|
+
|
|
365
|
+
### OutputConfig (interface)
|
|
366
|
+
|
|
367
|
+
```typescript
|
|
368
|
+
/**
|
|
369
|
+
* Output configuration for generated documentation.
|
|
370
|
+
*/
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
interface OutputConfig {
|
|
375
|
+
/** Output directory for generated docs (default: 'docs/architecture') */
|
|
376
|
+
readonly directory?: string;
|
|
377
|
+
/** Overwrite existing files (default: false) */
|
|
378
|
+
readonly overwrite?: boolean;
|
|
379
|
+
}
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
| Property | Description |
|
|
383
|
+
| --------- | ------------------------------------------------------------------ |
|
|
384
|
+
| directory | Output directory for generated docs (default: 'docs/architecture') |
|
|
385
|
+
| overwrite | Overwrite existing files (default: false) |
|
|
386
|
+
|
|
387
|
+
### GeneratorSourceOverride (interface)
|
|
388
|
+
|
|
389
|
+
```typescript
|
|
390
|
+
/**
|
|
391
|
+
* Generator-specific source overrides.
|
|
392
|
+
*
|
|
393
|
+
* Some generators need different sources than the base config.
|
|
394
|
+
* For example, `changelog` needs `decisions/*.feature` and `releases/*.feature`
|
|
395
|
+
* in addition to the base feature set.
|
|
396
|
+
*
|
|
397
|
+
* ### Override Semantics
|
|
398
|
+
*
|
|
399
|
+
* - `additionalFeatures` / `additionalInput`: Appended to base sources
|
|
400
|
+
* - `replaceFeatures`: Used INSTEAD of base features (for generators needing a different set)
|
|
401
|
+
* - `outputDirectory`: Override the base output directory for this generator
|
|
402
|
+
*
|
|
403
|
+
* ### Mutual Exclusivity
|
|
404
|
+
*
|
|
405
|
+
* `replaceFeatures` and `additionalFeatures` are mutually exclusive when both are
|
|
406
|
+
* non-empty. This constraint is enforced at runtime by the Zod `.refine()` in
|
|
407
|
+
* {@link GeneratorSourceOverrideSchema} (in `project-config-schema.ts`).
|
|
408
|
+
*
|
|
409
|
+
* The TypeScript type intentionally permits both fields to coexist because
|
|
410
|
+
* `mergeSourcesForGenerator()` treats an empty `replaceFeatures: []` as "no replace",
|
|
411
|
+
* falling through to `additionalFeatures`. Encoding this length-dependent semantics
|
|
412
|
+
* via `never` would reject valid runtime states.
|
|
413
|
+
*/
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
```typescript
|
|
417
|
+
interface GeneratorSourceOverride {
|
|
418
|
+
/** Additional feature file globs appended to base features */
|
|
419
|
+
readonly additionalFeatures?: readonly string[];
|
|
420
|
+
/** Additional TypeScript globs appended to base TypeScript sources */
|
|
421
|
+
readonly additionalInput?: readonly string[];
|
|
422
|
+
/**
|
|
423
|
+
* Feature globs used INSTEAD of base features.
|
|
424
|
+
* Mutually exclusive with non-empty `additionalFeatures`.
|
|
425
|
+
* @see GeneratorSourceOverrideSchema for runtime validation
|
|
426
|
+
*/
|
|
427
|
+
readonly replaceFeatures?: readonly string[];
|
|
428
|
+
/** Override output directory for this generator */
|
|
429
|
+
readonly outputDirectory?: string;
|
|
430
|
+
}
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
| Property | Description |
|
|
434
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
435
|
+
| additionalFeatures | Additional feature file globs appended to base features |
|
|
436
|
+
| additionalInput | Additional TypeScript globs appended to base TypeScript sources |
|
|
437
|
+
| replaceFeatures | Feature globs used INSTEAD of base features. Mutually exclusive with non-empty `additionalFeatures`. |
|
|
438
|
+
| outputDirectory | Override output directory for this generator |
|
|
439
|
+
|
|
440
|
+
### ResolvedProjectConfig (interface)
|
|
441
|
+
|
|
442
|
+
```typescript
|
|
443
|
+
/**
|
|
444
|
+
* Fully resolved project configuration with all defaults applied.
|
|
445
|
+
*/
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
```typescript
|
|
449
|
+
interface ResolvedProjectConfig {
|
|
450
|
+
/** Resolved source globs (stubs merged, defaults applied) */
|
|
451
|
+
readonly sources: ResolvedSourcesConfig;
|
|
452
|
+
/** Resolved output config with all defaults */
|
|
453
|
+
readonly output: Readonly<Required<OutputConfig>>;
|
|
454
|
+
/** Default generator names */
|
|
455
|
+
readonly generators: readonly string[];
|
|
456
|
+
/** Per-generator source overrides */
|
|
457
|
+
readonly generatorOverrides: Readonly<Record<string, GeneratorSourceOverride>>;
|
|
458
|
+
/** Context inference rules (user rules prepended to defaults) */
|
|
459
|
+
readonly contextInferenceRules: readonly ContextInferenceRule[];
|
|
460
|
+
/** Workflow config path (null if not specified) */
|
|
461
|
+
readonly workflowPath: string | null;
|
|
462
|
+
/** Per-codec options for document generation (empty if none) */
|
|
463
|
+
readonly codecOptions?: CodecOptions;
|
|
464
|
+
/** Reference document configurations (empty array if none) */
|
|
465
|
+
readonly referenceDocConfigs: readonly ReferenceDocConfig[];
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
| Property | Description |
|
|
470
|
+
| --------------------- | ---------------------------------------------------------- |
|
|
471
|
+
| sources | Resolved source globs (stubs merged, defaults applied) |
|
|
472
|
+
| output | Resolved output config with all defaults |
|
|
473
|
+
| generators | Default generator names |
|
|
474
|
+
| generatorOverrides | Per-generator source overrides |
|
|
475
|
+
| contextInferenceRules | Context inference rules (user rules prepended to defaults) |
|
|
476
|
+
| workflowPath | Workflow config path (null if not specified) |
|
|
477
|
+
| codecOptions | Per-codec options for document generation (empty if none) |
|
|
478
|
+
| referenceDocConfigs | Reference document configurations (empty array if none) |
|
|
479
|
+
|
|
480
|
+
### ResolvedSourcesConfig (interface)
|
|
481
|
+
|
|
482
|
+
```typescript
|
|
483
|
+
/**
|
|
484
|
+
* Resolved sources config where all optional fields have been applied with defaults.
|
|
485
|
+
*/
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
```typescript
|
|
489
|
+
interface ResolvedSourcesConfig {
|
|
490
|
+
/** TypeScript source globs (includes merged stubs) */
|
|
491
|
+
readonly typescript: readonly string[];
|
|
492
|
+
/** Gherkin feature file globs */
|
|
493
|
+
readonly features: readonly string[];
|
|
494
|
+
/** Glob patterns to exclude from scanning */
|
|
495
|
+
readonly exclude: readonly string[];
|
|
496
|
+
}
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
| Property | Description |
|
|
500
|
+
| ---------- | ----------------------------------------------- |
|
|
501
|
+
| typescript | TypeScript source globs (includes merged stubs) |
|
|
502
|
+
| features | Gherkin feature file globs |
|
|
503
|
+
| exclude | Glob patterns to exclude from scanning |
|
|
504
|
+
|
|
505
|
+
### CreateArchitectOptions (interface)
|
|
506
|
+
|
|
507
|
+
```typescript
|
|
508
|
+
/**
|
|
509
|
+
* Options for creating an Architect instance
|
|
510
|
+
*/
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
```typescript
|
|
514
|
+
interface CreateArchitectOptions {
|
|
515
|
+
/** Use a preset configuration */
|
|
516
|
+
preset?: PresetName;
|
|
517
|
+
/** Custom tag prefix (overrides preset) */
|
|
518
|
+
tagPrefix?: string;
|
|
519
|
+
/** Custom file opt-in tag (overrides preset) */
|
|
520
|
+
fileOptInTag?: string;
|
|
521
|
+
/** Custom categories (replaces preset categories entirely) */
|
|
522
|
+
categories?: ArchitectConfig['categories'];
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
| Property | Description |
|
|
527
|
+
| ------------ | ------------------------------------------------------- |
|
|
528
|
+
| preset | Use a preset configuration |
|
|
529
|
+
| tagPrefix | Custom tag prefix (overrides preset) |
|
|
530
|
+
| fileOptInTag | Custom file opt-in tag (overrides preset) |
|
|
531
|
+
| categories | Custom categories (replaces preset categories entirely) |
|
|
532
|
+
|
|
533
|
+
### ConfigDiscoveryResult (interface)
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
/**
|
|
537
|
+
* Result of config file discovery
|
|
538
|
+
*/
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
```typescript
|
|
542
|
+
interface ConfigDiscoveryResult {
|
|
543
|
+
/** Whether a config file was found */
|
|
544
|
+
found: boolean;
|
|
545
|
+
/** Absolute path to the config file (if found) */
|
|
546
|
+
path?: string;
|
|
547
|
+
/** The loaded configuration instance */
|
|
548
|
+
instance: ArchitectInstance;
|
|
549
|
+
/** Whether the default configuration was used */
|
|
550
|
+
isDefault: boolean;
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
| Property | Description |
|
|
555
|
+
| --------- | ------------------------------------------- |
|
|
556
|
+
| found | Whether a config file was found |
|
|
557
|
+
| path | Absolute path to the config file (if found) |
|
|
558
|
+
| instance | The loaded configuration instance |
|
|
559
|
+
| isDefault | Whether the default configuration was used |
|
|
560
|
+
|
|
561
|
+
### ConfigLoadError (interface)
|
|
562
|
+
|
|
563
|
+
```typescript
|
|
564
|
+
/**
|
|
565
|
+
* Error during config loading
|
|
566
|
+
*/
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
interface ConfigLoadError {
|
|
571
|
+
/** Discriminant for error type identification */
|
|
572
|
+
type: 'config-load-error';
|
|
573
|
+
/** Absolute path to the config file that failed to load */
|
|
574
|
+
path: string;
|
|
575
|
+
/** Human-readable error description */
|
|
576
|
+
message: string;
|
|
577
|
+
/** The underlying error that caused the failure (if any) */
|
|
578
|
+
cause?: Error | undefined;
|
|
579
|
+
}
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
| Property | Description |
|
|
583
|
+
| -------- | ----------------------------------------------------- |
|
|
584
|
+
| type | Discriminant for error type identification |
|
|
585
|
+
| path | Absolute path to the config file that failed to load |
|
|
586
|
+
| message | Human-readable error description |
|
|
587
|
+
| cause | The underlying error that caused the failure (if any) |
|
|
588
|
+
|
|
589
|
+
### ResolvedConfig (type)
|
|
590
|
+
|
|
591
|
+
```typescript
|
|
592
|
+
/**
|
|
593
|
+
* Fully resolved configuration combining the taxonomy instance
|
|
594
|
+
* and the project-level config.
|
|
595
|
+
*
|
|
596
|
+
* This is the primary type consumed by the orchestrator and CLIs.
|
|
597
|
+
*
|
|
598
|
+
* Discriminated union on `isDefault`:
|
|
599
|
+
* - `isDefault: true` means no config file was found; `configPath` is `undefined`.
|
|
600
|
+
* - `isDefault: false` means a config file was loaded; `configPath` is a `string`.
|
|
601
|
+
*/
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
```typescript
|
|
605
|
+
type ResolvedConfig =
|
|
606
|
+
| {
|
|
607
|
+
/** The taxonomy instance (registry + regexBuilders) */
|
|
608
|
+
readonly instance: ArchitectInstance;
|
|
609
|
+
/** The resolved project config with defaults applied */
|
|
610
|
+
readonly project: ResolvedProjectConfig;
|
|
611
|
+
/** Config was generated from defaults (no config file found) */
|
|
612
|
+
readonly isDefault: true;
|
|
613
|
+
/** No config file path when using defaults */
|
|
614
|
+
readonly configPath?: undefined;
|
|
615
|
+
}
|
|
616
|
+
| {
|
|
617
|
+
/** The taxonomy instance (registry + regexBuilders) */
|
|
618
|
+
readonly instance: ArchitectInstance;
|
|
619
|
+
/** The resolved project config with defaults applied */
|
|
620
|
+
readonly project: ResolvedProjectConfig;
|
|
621
|
+
/** Config was loaded from a file */
|
|
622
|
+
readonly isDefault: false;
|
|
623
|
+
/** Path to the config file that was loaded */
|
|
624
|
+
readonly configPath: string;
|
|
625
|
+
};
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### PresetName (type)
|
|
629
|
+
|
|
630
|
+
```typescript
|
|
631
|
+
/**
|
|
632
|
+
* Available preset names
|
|
633
|
+
*/
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
```typescript
|
|
637
|
+
type PresetName = 'libar-generic' | 'ddd-es-cqrs';
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
### ConfigLoadResult (type)
|
|
641
|
+
|
|
642
|
+
```typescript
|
|
643
|
+
/**
|
|
644
|
+
* Result type for config loading (discriminated union)
|
|
645
|
+
*/
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
```typescript
|
|
649
|
+
type ConfigLoadResult =
|
|
650
|
+
| {
|
|
651
|
+
/** Indicates successful config resolution */
|
|
652
|
+
ok: true;
|
|
653
|
+
/** The discovery result containing configuration instance */
|
|
654
|
+
value: ConfigDiscoveryResult;
|
|
655
|
+
}
|
|
656
|
+
| {
|
|
657
|
+
/** Indicates config loading failure */
|
|
658
|
+
ok: false;
|
|
659
|
+
/** Error details for the failed load */
|
|
660
|
+
error: ConfigLoadError;
|
|
661
|
+
};
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### createRegexBuilders (function)
|
|
665
|
+
|
|
666
|
+
````typescript
|
|
667
|
+
/**
|
|
668
|
+
* Creates type-safe regex builders for a given tag prefix configuration.
|
|
669
|
+
* These are used throughout the scanner and validation pipeline.
|
|
670
|
+
*
|
|
671
|
+
* @param tagPrefix - The tag prefix (e.g., "@architect-")
|
|
672
|
+
* @param fileOptInTag - The file opt-in tag (e.g., "@architect")
|
|
673
|
+
* @returns RegexBuilders instance with pattern matching methods
|
|
674
|
+
*
|
|
675
|
+
* @example
|
|
676
|
+
* ```typescript
|
|
677
|
+
* const builders = createRegexBuilders("@architect-", "@architect");
|
|
678
|
+
*
|
|
679
|
+
* // Check for file opt-in
|
|
680
|
+
* if (builders.hasFileOptIn(sourceCode)) {
|
|
681
|
+
* console.log("File has @architect marker");
|
|
682
|
+
* }
|
|
683
|
+
*
|
|
684
|
+
* // Normalize a tag
|
|
685
|
+
* const normalized = builders.normalizeTag("@architect-pattern");
|
|
686
|
+
* // Returns: "pattern"
|
|
687
|
+
* ```
|
|
688
|
+
*/
|
|
689
|
+
````
|
|
690
|
+
|
|
691
|
+
```typescript
|
|
692
|
+
function createRegexBuilders(tagPrefix: string, fileOptInTag: string): RegexBuilders;
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
| Parameter | Type | Description |
|
|
696
|
+
| ------------ | ---- | ---------------------------------------- |
|
|
697
|
+
| tagPrefix | | The tag prefix (e.g., "@architect-") |
|
|
698
|
+
| fileOptInTag | | The file opt-in tag (e.g., "@architect") |
|
|
699
|
+
|
|
700
|
+
**Returns:** RegexBuilders instance with pattern matching methods
|
|
701
|
+
|
|
702
|
+
### createArchitect (function)
|
|
703
|
+
|
|
704
|
+
````typescript
|
|
705
|
+
/**
|
|
706
|
+
* Creates a configured Architect instance.
|
|
707
|
+
*
|
|
708
|
+
* Configuration resolution order:
|
|
709
|
+
* 1. Start with preset (or libar-generic default)
|
|
710
|
+
* 2. Preset categories REPLACE base taxonomy categories (not merged)
|
|
711
|
+
* 3. Apply explicit overrides (tagPrefix, fileOptInTag, categories)
|
|
712
|
+
* 4. Create regex builders from final configuration
|
|
713
|
+
*
|
|
714
|
+
* Note: Presets define complete category sets. The libar-generic preset
|
|
715
|
+
* has 3 categories (core, api, infra), while ddd-es-cqrs has 21.
|
|
716
|
+
* Categories from the preset replace base categories entirely.
|
|
717
|
+
*
|
|
718
|
+
* @param options - Configuration options
|
|
719
|
+
* @returns Configured Architect instance
|
|
720
|
+
*
|
|
721
|
+
* @example
|
|
722
|
+
* ```typescript
|
|
723
|
+
* // Use the default preset
|
|
724
|
+
* const dp = createArchitect();
|
|
725
|
+
* ```
|
|
726
|
+
*
|
|
727
|
+
* @example
|
|
728
|
+
* ```typescript
|
|
729
|
+
* // Custom prefix with DDD taxonomy
|
|
730
|
+
* const dp = createArchitect({
|
|
731
|
+
* preset: "ddd-es-cqrs",
|
|
732
|
+
* tagPrefix: "@my-project-",
|
|
733
|
+
* fileOptInTag: "@my-project"
|
|
734
|
+
* });
|
|
735
|
+
* ```
|
|
736
|
+
*
|
|
737
|
+
* @example
|
|
738
|
+
* ```typescript
|
|
739
|
+
* // Default (libar-generic preset with 3 categories)
|
|
740
|
+
* const dp = createArchitect();
|
|
741
|
+
* ```
|
|
742
|
+
*/
|
|
743
|
+
````
|
|
744
|
+
|
|
745
|
+
```typescript
|
|
746
|
+
function createArchitect(options: CreateArchitectOptions = {}): ArchitectInstance;
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
| Parameter | Type | Description |
|
|
750
|
+
| --------- | ---- | --------------------- |
|
|
751
|
+
| options | | Configuration options |
|
|
752
|
+
|
|
753
|
+
**Returns:** Configured Architect instance
|
|
754
|
+
|
|
755
|
+
### findConfigFile (function)
|
|
756
|
+
|
|
757
|
+
```typescript
|
|
758
|
+
/**
|
|
759
|
+
* Find config file by walking up from startDir
|
|
760
|
+
*
|
|
761
|
+
* @param startDir - Directory to start searching from
|
|
762
|
+
* @returns Path to config file or null if not found
|
|
763
|
+
*/
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
```typescript
|
|
767
|
+
async function findConfigFile(startDir: string): Promise<string | null>;
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
| Parameter | Type | Description |
|
|
771
|
+
| --------- | ---- | --------------------------------- |
|
|
772
|
+
| startDir | | Directory to start searching from |
|
|
773
|
+
|
|
774
|
+
**Returns:** Path to config file or null if not found
|
|
775
|
+
|
|
776
|
+
### loadConfig (function)
|
|
777
|
+
|
|
778
|
+
````typescript
|
|
779
|
+
/**
|
|
780
|
+
* Load configuration from file or use defaults.
|
|
781
|
+
*
|
|
782
|
+
* Delegates to {@link loadProjectConfig} for file discovery and parsing,
|
|
783
|
+
* then maps the result to the {@link ConfigDiscoveryResult} shape.
|
|
784
|
+
*
|
|
785
|
+
* @param baseDir - Directory to start searching from (usually cwd or project root)
|
|
786
|
+
* @returns Result with loaded configuration or error
|
|
787
|
+
*
|
|
788
|
+
* @example
|
|
789
|
+
* ```typescript
|
|
790
|
+
* // In CLI tool
|
|
791
|
+
* const result = await loadConfig(process.cwd());
|
|
792
|
+
* if (!result.ok) {
|
|
793
|
+
* console.error(result.error.message);
|
|
794
|
+
* process.exit(1);
|
|
795
|
+
* }
|
|
796
|
+
*
|
|
797
|
+
* const { instance, isDefault, path } = result.value;
|
|
798
|
+
* if (!isDefault) {
|
|
799
|
+
* console.log(`Using config from: ${path}`);
|
|
800
|
+
* }
|
|
801
|
+
*
|
|
802
|
+
* // Use instance.registry for scanning/extracting
|
|
803
|
+
* ```
|
|
804
|
+
*/
|
|
805
|
+
````
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
async function loadConfig(baseDir: string): Promise<ConfigLoadResult>;
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
| Parameter | Type | Description |
|
|
812
|
+
| --------- | ---- | --------------------------------------------------------------- |
|
|
813
|
+
| baseDir | | Directory to start searching from (usually cwd or project root) |
|
|
814
|
+
|
|
815
|
+
**Returns:** Result with loaded configuration or error
|
|
816
|
+
|
|
817
|
+
### formatConfigError (function)
|
|
818
|
+
|
|
819
|
+
```typescript
|
|
820
|
+
/**
|
|
821
|
+
* Format config load error for console display
|
|
822
|
+
*
|
|
823
|
+
* @param error - Config load error
|
|
824
|
+
* @returns Formatted error message
|
|
825
|
+
*/
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
```typescript
|
|
829
|
+
function formatConfigError(error: ConfigLoadError): string;
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
| Parameter | Type | Description |
|
|
833
|
+
| --------- | ---- | ----------------- |
|
|
834
|
+
| error | | Config load error |
|
|
835
|
+
|
|
836
|
+
**Returns:** Formatted error message
|
|
837
|
+
|
|
838
|
+
### LIBAR_GENERIC_PRESET (const)
|
|
839
|
+
|
|
840
|
+
````typescript
|
|
841
|
+
/**
|
|
842
|
+
* Default libar-generic preset with @architect- prefix.
|
|
843
|
+
*
|
|
844
|
+
* This is the universal default preset for both `createArchitect()` and
|
|
845
|
+
* `loadConfig()` fallback.
|
|
846
|
+
*
|
|
847
|
+
* Suitable for:
|
|
848
|
+
* - Most projects (default choice)
|
|
849
|
+
* - Projects already using @architect- tags
|
|
850
|
+
* - Package-level configuration with a compact three-category taxonomy
|
|
851
|
+
* - Gradual adoption without tag migration
|
|
852
|
+
*
|
|
853
|
+
* @example
|
|
854
|
+
* ```typescript
|
|
855
|
+
* import { createArchitect } from '@libar-dev/architect';
|
|
856
|
+
*
|
|
857
|
+
* // Default preset (libar-generic):
|
|
858
|
+
* const dp = createArchitect();
|
|
859
|
+
* // Uses @architect-, @architect-pattern, @architect-status, etc.
|
|
860
|
+
* // With 3 category tags: @architect-core, @architect-api, @architect-infra
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
````
|
|
864
|
+
|
|
865
|
+
```typescript
|
|
866
|
+
LIBAR_GENERIC_PRESET = {
|
|
867
|
+
tagPrefix: DEFAULT_TAG_PREFIX,
|
|
868
|
+
fileOptInTag: DEFAULT_FILE_OPT_IN_TAG,
|
|
869
|
+
categories: [
|
|
870
|
+
{
|
|
871
|
+
tag: 'core',
|
|
872
|
+
domain: 'Core',
|
|
873
|
+
priority: 1,
|
|
874
|
+
description: 'Core patterns',
|
|
875
|
+
aliases: [],
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
tag: 'api',
|
|
879
|
+
domain: 'API',
|
|
880
|
+
priority: 2,
|
|
881
|
+
description: 'Public APIs',
|
|
882
|
+
aliases: [],
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
tag: 'infra',
|
|
886
|
+
domain: 'Infrastructure',
|
|
887
|
+
priority: 3,
|
|
888
|
+
description: 'Infrastructure',
|
|
889
|
+
aliases: ['infrastructure'],
|
|
890
|
+
},
|
|
891
|
+
] as const satisfies readonly CategoryDefinition[],
|
|
892
|
+
} as const satisfies ArchitectConfig;
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
### DDD_ES_CQRS_PRESET (const)
|
|
896
|
+
|
|
897
|
+
````typescript
|
|
898
|
+
/**
|
|
899
|
+
* Full DDD/ES/CQRS preset (current @libar-dev taxonomy).
|
|
900
|
+
*
|
|
901
|
+
* Complete 21-category taxonomy with @architect- prefix. Suitable for:
|
|
902
|
+
* - DDD architectures
|
|
903
|
+
* - Event sourcing projects
|
|
904
|
+
* - CQRS implementations
|
|
905
|
+
* - Full roadmap/phase tracking
|
|
906
|
+
*
|
|
907
|
+
* @example
|
|
908
|
+
* ```typescript
|
|
909
|
+
* import { createArchitect, DDD_ES_CQRS_PRESET } from '@libar-dev/architect';
|
|
910
|
+
*
|
|
911
|
+
* const dp = createArchitect({ preset: "ddd-es-cqrs" });
|
|
912
|
+
* ```
|
|
913
|
+
*/
|
|
914
|
+
````
|
|
915
|
+
|
|
916
|
+
```typescript
|
|
917
|
+
DDD_ES_CQRS_PRESET = {
|
|
918
|
+
tagPrefix: DEFAULT_TAG_PREFIX,
|
|
919
|
+
fileOptInTag: DEFAULT_FILE_OPT_IN_TAG,
|
|
920
|
+
categories: CATEGORIES,
|
|
921
|
+
metadataTags: buildRegistry().metadataTags,
|
|
922
|
+
} as const satisfies ArchitectConfig;
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
### PRESETS (const)
|
|
926
|
+
|
|
927
|
+
````typescript
|
|
928
|
+
/**
|
|
929
|
+
* Preset lookup map
|
|
930
|
+
*
|
|
931
|
+
* @example
|
|
932
|
+
* ```typescript
|
|
933
|
+
* import { PRESETS, type PresetName } from '@libar-dev/architect';
|
|
934
|
+
*
|
|
935
|
+
* function getPreset(name: PresetName) {
|
|
936
|
+
* return PRESETS[name];
|
|
937
|
+
* }
|
|
938
|
+
* ```
|
|
939
|
+
*/
|
|
940
|
+
````
|
|
941
|
+
|
|
942
|
+
```typescript
|
|
943
|
+
const PRESETS: Record<PresetName, ArchitectConfig>;
|
|
944
|
+
```
|
|
945
|
+
|
|
946
|
+
---
|
|
947
|
+
|
|
948
|
+
## Business Rules
|
|
949
|
+
|
|
950
|
+
10 patterns, 46 rules with invariants (46 total)
|
|
951
|
+
|
|
952
|
+
### Config Based Workflow Definition
|
|
953
|
+
|
|
954
|
+
| Rule | Invariant | Rationale |
|
|
955
|
+
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
956
|
+
| Default workflow is built from an inline constant | `loadDefaultWorkflow()` returns a `LoadedWorkflow` without file system access. It cannot fail. The default workflow constant uses only canonical status values from `src/taxonomy/status-values.ts`. | The file-based loading path (`catalogue/workflows/`) has been dead code since monorepo extraction. Both callers (orchestrator, process-api) already handle the failure gracefully, proving the system works without it. Making the function synchronous and infallible removes the try-catch ceremony and the warning noise. |
|
|
957
|
+
| Custom workflow files still work via --workflow flag | `loadWorkflowFromPath()` remains available for projects that need custom workflow definitions. The `--workflow <file>` CLI flag and `workflowPath` config field continue to work. | The inline default replaces file-based _default_ loading, not file-based _custom_ loading. Projects may define custom phases or additional statuses via JSON files. |
|
|
958
|
+
| FSM validation and Process Guard are not affected | The FSM transition matrix, protection levels, and Process Guard rules remain hardcoded in `src/validation/fsm/` and `src/lint/process-guard/`. They do not read from `LoadedWorkflow`. | FSM and workflow are separate concerns. FSM enforces status transitions (4-state model from PDR-005). Workflow defines phase structure (6-phase USDP). The workflow JSON declared `transitionsTo` on its statuses, but no code ever read those values — the FSM uses its own `VALID_TRANSITIONS` constant. This separation is correct and intentional. Blast radius analysis confirmed zero workflow imports in: - src/validation/fsm/ (4 files) - src/lint/process-guard/ (5 files) - src/taxonomy/ (all files) |
|
|
959
|
+
| Workflow as a configurable preset field is deferred | The inline default workflow constant is the only workflow source until preset integration is implemented. No preset or project config field exposes workflow customization. | Coupling workflow into the preset/config system before the inline fix ships would widen the blast radius and risk type regressions across all config consumers. |
|
|
960
|
+
|
|
961
|
+
### Config Loader Testing
|
|
962
|
+
|
|
963
|
+
| Rule | Invariant | Rationale |
|
|
964
|
+
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
965
|
+
| Config files are discovered by walking up directories | The config loader must search for configuration files starting from the current directory and walking up parent directories until a match is found or the filesystem root is reached. | Projects may run CLI commands from subdirectories — upward traversal ensures the nearest config file is always found regardless of working directory. |
|
|
966
|
+
| Config discovery stops at repo root | Directory traversal must stop at repository root markers (e.g., .git directory) and not search beyond them. | Searching beyond the repo root could find unrelated config files from parent projects, producing confusing cross-project behavior. |
|
|
967
|
+
| Config is loaded and validated | Loaded config files must have a valid default export matching the expected configuration schema, with appropriate error messages for invalid formats. | Invalid configurations produce cryptic downstream errors — early validation with clear messages prevents debugging wasted on malformed config. |
|
|
968
|
+
| Config errors are formatted for display | Configuration loading errors must be formatted as human-readable messages including the file path and specific error description. | Raw error objects are not actionable — developers need the config file path and a clear description to diagnose and fix configuration issues. |
|
|
969
|
+
|
|
970
|
+
### Config Resolution
|
|
971
|
+
|
|
972
|
+
| Rule | Invariant | Rationale |
|
|
973
|
+
| ------------------------------------------ | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
974
|
+
| Default config provides sensible fallbacks | A config created without user input must have isDefault=true and empty source collections. | Downstream consumers need a safe starting point when no config file exists. |
|
|
975
|
+
| Preset creates correct taxonomy instance | Each preset must produce a taxonomy with the correct number of categories and tag prefix. | Presets are the primary user-facing configuration — wrong category counts break downstream scanning. |
|
|
976
|
+
| Stubs are merged into typescript sources | Stub glob patterns must appear in resolved typescript sources alongside original globs. | Stubs extend the scanner's source set without requiring users to manually list them. |
|
|
977
|
+
| Output defaults are applied | Missing output configuration must resolve to "docs/architecture" with overwrite=false. | Consistent defaults prevent accidental overwrites and establish a predictable output location. |
|
|
978
|
+
| Generator defaults are applied | A config with no generators specified must default to the "patterns" generator. | Patterns is the most commonly needed output — defaulting to it reduces boilerplate. |
|
|
979
|
+
| Context inference rules are prepended | User-defined inference rules must appear before built-in defaults in the resolved array. | Prepending gives user rules priority during context matching without losing defaults. |
|
|
980
|
+
| Config path is carried from options | The configPath from resolution options must be preserved unchanged in resolved config. | Downstream tools need the original config file location for error reporting and relative path resolution. |
|
|
981
|
+
|
|
982
|
+
### Configuration API
|
|
983
|
+
|
|
984
|
+
| Rule | Invariant | Rationale |
|
|
985
|
+
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
986
|
+
| Factory creates configured instances with correct defaults | The configuration factory must produce a fully initialized instance for any supported preset, with the libar-generic preset as the default when no arguments are provided. | A sensible default preset eliminates boilerplate for the common case while still supporting specialized presets (ddd-es-cqrs) for advanced monorepo configurations. |
|
|
987
|
+
| Custom prefix configuration works correctly | Custom tag prefix and file opt-in tag overrides must be applied to the configuration instance, replacing the preset defaults. | Consuming projects may use different annotation prefixes — custom prefixes enable the toolkit to work with any tag convention without forking presets. |
|
|
988
|
+
| Preset categories replace base categories entirely | When a preset defines its own category set, it must fully replace (not merge with) the base categories. | Category sets are curated per-preset — merging would include irrelevant categories (e.g., DDD categories in a generic project) that pollute taxonomy reports. |
|
|
989
|
+
| Regex builders use configured prefix | All regex builders (hasFileOptIn, hasDocDirectives, normalizeTag) must use the configured tag prefix, not a hardcoded one. | Regex patterns that ignore the configured prefix would miss annotations in projects using custom prefixes, silently skipping source files. |
|
|
990
|
+
|
|
991
|
+
### Define Config Testing
|
|
992
|
+
|
|
993
|
+
| Rule | Invariant | Rationale |
|
|
994
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
995
|
+
| defineConfig is an identity function | The defineConfig helper must return its input unchanged, serving only as a type annotation aid for IDE autocomplete. | defineConfig exists for TypeScript type inference in config files — any transformation would surprise users who expect their config object to pass through unmodified. |
|
|
996
|
+
| Schema validates correct configurations | Valid configuration objects (both minimal and fully-specified) must pass schema validation without errors. | The schema must accept all legitimate configuration shapes — rejecting valid configs would block users from using supported features. |
|
|
997
|
+
| Schema rejects invalid configurations | The configuration schema must reject invalid values including empty globs, directory traversal patterns, mutually exclusive options, invalid preset names, removed compatibility aliases, and unknown fields. | Schema validation is the first line of defense against misconfiguration — permissive validation lets invalid configs produce confusing downstream errors. |
|
|
998
|
+
| Type guard validates config format | The isProjectConfig type guard must correctly identify valid project configs. | Config loading relies on type detection to apply the correct parsing path. |
|
|
999
|
+
|
|
1000
|
+
### Monorepo Support
|
|
1001
|
+
|
|
1002
|
+
| Rule | Invariant | Rationale |
|
|
1003
|
+
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1004
|
+
| Config supports workspace-aware package definitions | When a packages field is present in the config, each entry maps a package name to its source globs. The top-level sources field becomes optional. Packages without their own feature or stub globs inherit those values from the corresponding top-level feature and stub settings. Repos without packages work exactly as before (backward compatible). | The consumer monorepo has no config file because the system only supports flat glob arrays. Adding packages enables a single config file to replace duplicated globs across 15+ scripts. |
|
|
1005
|
+
| Extracted patterns carry package provenance from glob matching | When packages config is active, every ExtractedPattern has an optional package field set from the matching glob. If no packages config exists, the field is undefined. First match wins on overlapping globs. | Package provenance must be derived automatically from config, not from manual annotation. This ensures zero additional developer effort. |
|
|
1006
|
+
| CLI commands accept a package filter that composes with existing filters | The --package flag filters patterns to those from a specific package. It composes with --status, --phase, --category via logical AND. | In a 600-file monorepo, unscoped queries return too many results. Package-scoped filtering lets developers focus on a single workspace member. |
|
|
1007
|
+
| Cross-package dependencies are visible as a package-level graph | The cross-package subcommand aggregates pattern-level relationships into package-level edges, showing source package, target package, and the patterns forming the dependency. Intra-package dependencies are excluded. | Understanding cross-package dependencies is essential for release planning and impact analysis. The relationship data already exists in relationshipIndex -- this adds package-level aggregation. |
|
|
1008
|
+
| Coverage analysis reports annotation completeness per package | When packages config is active, arch coverage reports per-package annotation counts alongside the aggregate total. | Different packages have different annotation maturity. Per-package breakdown lets teams track their own progress and identify which packages need the most work. |
|
|
1009
|
+
|
|
1010
|
+
### Preset System
|
|
1011
|
+
|
|
1012
|
+
| Rule | Invariant | Rationale |
|
|
1013
|
+
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
|
|
1014
|
+
| Libar generic preset provides minimal taxonomy with libar prefix | The libar-generic preset must provide exactly 3 categories with @architect- prefix. | This package uses @architect- prefix to avoid collisions with consumer projects' annotations. |
|
|
1015
|
+
| DDD-ES-CQRS preset provides full taxonomy | The DDD preset must provide all 21 categories spanning DDD, ES, CQRS, and infrastructure domains. | DDD architectures require fine-grained categorization to distinguish bounded contexts, aggregates, and projections. |
|
|
1016
|
+
| Presets can be accessed by name | All preset instances must be accessible via the PRESETS map using their canonical string key. | Programmatic access enables config files to reference presets by name instead of importing instances. |
|
|
1017
|
+
| PresetName type is exported from public entrypoints | The `PresetName` type must remain available from both package entrypoints so downstream configs and helper functions can reference preset keys without reaching into internal files. | Removing a documented type export is a breaking API change even when runtime behavior is unchanged. |
|
|
1018
|
+
|
|
1019
|
+
### Project Config Loader
|
|
1020
|
+
|
|
1021
|
+
| Rule | Invariant | Rationale |
|
|
1022
|
+
| --------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
1023
|
+
| Missing config returns defaults | When no config file exists, loadProjectConfig must return a default resolved config with isDefault=true. | Graceful fallback enables zero-config usage — new projects work without requiring config file creation. |
|
|
1024
|
+
| New-style config is loaded and resolved | A file exporting defineConfig must be loaded, validated, and resolved with correct preset categories. | defineConfig is the primary config format — correct loading is the critical path for all documentation generation. |
|
|
1025
|
+
| Invalid configs produce clear errors | Config files without a default export or with invalid data must produce descriptive error messages. | Actionable error messages reduce debugging time — users need to know what to fix, not just that something failed. |
|
|
1026
|
+
|
|
1027
|
+
### Setup Command
|
|
1028
|
+
|
|
1029
|
+
| Rule | Invariant | Rationale |
|
|
1030
|
+
| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1031
|
+
| Init detects existing project context before making changes | The init command reads the target directory for package.json, tsconfig.json, architect.config.ts (or .js), and monorepo markers before prompting or generating any files. Detection results determine which steps are skipped. | Blindly generating files overwrites user configuration and breaks working setups. Context detection enables safe adoption into existing projects by skipping steps that are already complete. |
|
|
1032
|
+
| Interactive prompts configure preset and source paths with smart defaults | The init command prompts for preset selection from the two available presets (libar-generic, ddd-es-cqrs) with descriptions, and for source glob paths with defaults inferred from project structure. The --yes flag skips non-destructive selection prompts and uses defaults. Destructive overwrites require an explicit --force flag; otherwise init exits without modifying existing files. | New users do not know which preset to choose or what glob patterns to use. Smart defaults reduce decisions to confirmations. The --yes flag enables scripted adoption in CI. |
|
|
1033
|
+
| Generated config file uses defineConfig with correct imports | The generated architect.config.ts (or .js) imports defineConfig from the correct path, uses the selected preset, and includes configured source globs. An existing config file is never overwritten without confirmation. | The config file is the most important artifact. An incorrect import path or malformed glob causes every subsequent command to fail. The overwrite guard prevents destroying custom configuration. |
|
|
1034
|
+
| Npm scripts are injected using bin command names | Injected scripts reference bin names (process-api, generate-docs) resolved via node_modules/.bin, not dist paths. Existing scripts are preserved. The package.json "type" field is preserved. ESM migration is an explicit opt-in via --esm flag. | The tutorial uses long fragile dist paths. Bin commands are the stable public API. Setting type:module ensures ESM imports work for the config. |
|
|
1035
|
+
| Directory structure and example annotation enable immediate first run | The init command creates directories for configured source globs and generates one example annotated TypeScript file with the minimum annotation set (opt-in marker, pattern tag, status, category, description). | Empty source globs produce a confusing "0 patterns" result. An example file proves the pipeline works and teaches annotation syntax by example. |
|
|
1036
|
+
| Init validates the complete setup by running the pipeline | After all files are generated, init runs process-api overview and reports whether the pipeline detected the example pattern. Success prints a summary and next steps. Failure prints diagnostic information. | Generating files without verification produces false confidence. Running the pipeline as the final step proves config, globs, directories, and the example annotation all work together. |
|
|
1037
|
+
|
|
1038
|
+
### Source Merging
|
|
1039
|
+
|
|
1040
|
+
| Rule | Invariant | Rationale |
|
|
1041
|
+
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1042
|
+
| No override returns base unchanged | When no source overrides are provided, the merged result must be identical to the base source configuration. | The merge function must be safe to call unconditionally — returning modified results without overrides would corrupt default source paths. |
|
|
1043
|
+
| Feature overrides control feature source selection | additionalFeatures must append to base feature sources while replaceFeatures must completely replace them, and these two options are mutually exclusive. | Projects need both additive and replacement strategies — additive for extending (monorepo packages), replacement for narrowing (focused generation runs). |
|
|
1044
|
+
| TypeScript source overrides append additional input | additionalInput must append to (not replace) the base TypeScript source paths. | TypeScript sources are always additive — the base sources contain core patterns that must always be included alongside project-specific additions. |
|
|
1045
|
+
| Combined overrides apply together | Feature overrides and TypeScript overrides must compose independently when both are provided simultaneously. | Real configs often specify both feature and TypeScript overrides — they must not interfere with each other or produce order-dependent results. |
|
|
1046
|
+
| Exclude is always inherited from base | The exclude patterns must always come from the base configuration, never from overrides. | Exclude patterns are a safety mechanism — allowing overrides to modify excludes could accidentally include sensitive or generated files in the scan. |
|
|
1047
|
+
|
|
1048
|
+
---
|