@libar-dev/architect 1.0.0-pre.3 → 1.0.0-pre.5
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 +1 -1
- package/README.md +5 -5
- package/dist/api/arch-queries.d.ts.map +1 -1
- package/dist/api/context-assembler.d.ts.map +1 -1
- package/dist/api/handoff-generator.d.ts.map +1 -1
- package/dist/api/index.d.ts +8 -8
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +7 -7
- package/dist/api/index.js.map +1 -1
- package/dist/api/{process-state.d.ts → pattern-graph-api.d.ts} +15 -15
- package/dist/api/pattern-graph-api.d.ts.map +1 -0
- package/dist/api/{process-state.js → pattern-graph-api.js} +13 -13
- package/dist/api/pattern-graph-api.js.map +1 -0
- package/dist/api/rules-query.d.ts +6 -6
- package/dist/api/rules-query.d.ts.map +1 -1
- package/dist/api/rules-query.js +4 -4
- package/dist/api/rules-query.js.map +1 -1
- package/dist/api/scope-validator.d.ts.map +1 -1
- package/dist/api/types.d.ts +8 -8
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js +5 -5
- package/dist/cli/cli-schema.d.ts +3 -4
- package/dist/cli/cli-schema.d.ts.map +1 -1
- package/dist/cli/cli-schema.js +13 -14
- package/dist/cli/cli-schema.js.map +1 -1
- package/dist/cli/output-pipeline.d.ts.map +1 -1
- package/dist/cli/pattern-graph-cli.d.ts.map +1 -0
- package/dist/cli/validate-patterns.d.ts.map +1 -1
- package/dist/generators/built-in/cli-recipe-generator.d.ts +3 -4
- package/dist/generators/built-in/cli-recipe-generator.d.ts.map +1 -1
- package/dist/generators/built-in/cli-recipe-generator.js +6 -7
- package/dist/generators/built-in/cli-recipe-generator.js.map +1 -1
- package/dist/generators/built-in/cli-reference-generator.d.ts +18 -0
- package/dist/generators/built-in/cli-reference-generator.d.ts.map +1 -0
- package/dist/generators/built-in/{process-api-reference-generator.js → cli-reference-generator.js} +13 -13
- package/dist/generators/built-in/cli-reference-generator.js.map +1 -0
- package/dist/generators/built-in/codec-generators.js +12 -12
- package/dist/generators/built-in/codec-generators.js.map +1 -1
- package/dist/generators/built-in/design-review-generator.d.ts.map +1 -1
- package/dist/generators/built-in/reference-generators.d.ts.map +1 -1
- package/dist/generators/codec-based.d.ts.map +1 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/orchestrator.d.ts.map +1 -1
- package/dist/generators/pipeline/build-pipeline.d.ts +17 -14
- package/dist/generators/pipeline/build-pipeline.d.ts.map +1 -1
- package/dist/generators/pipeline/build-pipeline.js +27 -21
- package/dist/generators/pipeline/build-pipeline.js.map +1 -1
- package/dist/generators/pipeline/index.d.ts.map +1 -1
- package/dist/generators/types.d.ts.map +1 -1
- package/dist/mcp/pipeline-session.d.ts.map +1 -1
- package/dist/renderable/codecs/index-codec.d.ts.map +1 -1
- package/dist/renderable/codecs/index-codec.js +54 -28
- package/dist/renderable/codecs/index-codec.js.map +1 -1
- package/docs/ANNOTATION-GUIDE.md +5 -5
- package/docs/ARCHITECTURE.md +79 -79
- package/docs/{PROCESS-API.md → CLI.md} +6 -6
- package/docs/CONFIGURATION.md +2 -2
- package/docs/DOCS-GAP-ANALYSIS.md +65 -65
- package/docs/INDEX.md +34 -34
- package/docs/MCP-SETUP.md +3 -3
- package/docs/METHODOLOGY.md +1 -1
- package/docs/SESSION-GUIDES.md +3 -3
- package/docs/VALIDATION.md +4 -4
- package/docs-live/ARCHITECTURE.md +48 -42
- package/docs-live/BUSINESS-RULES.md +3 -3
- package/docs-live/CHANGELOG-GENERATED.md +109 -103
- package/docs-live/INDEX.md +21 -21
- package/docs-live/PRODUCT-AREAS.md +7 -7
- package/docs-live/TAXONOMY.md +3 -5
- package/docs-live/_claude-md/annotation/annotation-overview.md +1 -1
- package/docs-live/_claude-md/annotation/annotation-reference.md +5 -5
- package/docs-live/_claude-md/architecture/architecture-types.md +4 -4
- package/docs-live/_claude-md/architecture/reference-sample.md +2 -2
- package/docs-live/_claude-md/data-api/data-api-overview.md +2 -2
- package/docs-live/_claude-md/generation/generation-overview.md +15 -15
- package/docs-live/_claude-md/process/process-overview.md +1 -1
- package/docs-live/_claude-md/validation/validation-overview.md +1 -1
- package/docs-live/business-rules/annotation.md +1 -2
- package/docs-live/business-rules/configuration.md +1 -1
- package/docs-live/business-rules/data-api.md +149 -136
- package/docs-live/business-rules/generation.md +172 -20
- package/docs-live/decisions/adr-003-source-first-pattern-architecture.md +1 -1
- package/docs-live/decisions/adr-005-codec-based-markdown-rendering.md +5 -5
- package/docs-live/decisions/adr-006-single-read-model-architecture.md +24 -24
- package/docs-live/product-areas/ANNOTATION.md +19 -9
- package/docs-live/product-areas/CONFIGURATION.md +39 -19
- package/docs-live/product-areas/DATA-API.md +155 -151
- package/docs-live/product-areas/GENERATION.md +159 -144
- package/docs-live/product-areas/PROCESS.md +4 -4
- package/docs-live/product-areas/VALIDATION.md +35 -20
- package/docs-live/reference/ANNOTATION-REFERENCE.md +5 -5
- package/docs-live/reference/ARCHITECTURE-CODECS.md +11 -11
- package/docs-live/reference/ARCHITECTURE-TYPES.md +28 -25
- package/docs-live/reference/{PROCESS-API-RECIPES.md → CLI-RECIPES.md} +11 -11
- package/docs-live/reference/{PROCESS-API-REFERENCE.md → CLI-REFERENCE.md} +2 -2
- package/docs-live/reference/REFERENCE-SAMPLE.md +56 -56
- package/docs-live/reference/SESSION-WORKFLOW-GUIDE.md +3 -3
- package/docs-live/taxonomy/format-types.md +2 -2
- package/docs-live/taxonomy/metadata-tags.md +1 -23
- package/package.json +7 -7
- package/dist/api/arch-queries.d.ts +0 -95
- package/dist/api/arch-queries.js +0 -310
- package/dist/api/arch-queries.js.map +0 -1
- package/dist/api/context-assembler.d.ts +0 -124
- package/dist/api/context-assembler.js +0 -472
- package/dist/api/context-assembler.js.map +0 -1
- package/dist/api/context-formatter.d.ts +0 -26
- package/dist/api/context-formatter.js +0 -183
- package/dist/api/context-formatter.js.map +0 -1
- package/dist/api/coverage-analyzer.d.ts +0 -38
- package/dist/api/coverage-analyzer.d.ts.map +0 -1
- package/dist/api/coverage-analyzer.js +0 -117
- package/dist/api/coverage-analyzer.js.map +0 -1
- package/dist/api/fuzzy-match.d.ts +0 -75
- package/dist/api/fuzzy-match.d.ts.map +0 -1
- package/dist/api/fuzzy-match.js +0 -150
- package/dist/api/fuzzy-match.js.map +0 -1
- package/dist/api/handoff-generator.d.ts +0 -45
- package/dist/api/handoff-generator.js +0 -139
- package/dist/api/handoff-generator.js.map +0 -1
- package/dist/api/pattern-helpers.d.ts +0 -51
- package/dist/api/pattern-helpers.d.ts.map +0 -1
- package/dist/api/pattern-helpers.js +0 -84
- package/dist/api/pattern-helpers.js.map +0 -1
- package/dist/api/process-state.d.ts.map +0 -1
- package/dist/api/process-state.js.map +0 -1
- package/dist/api/scope-validator.d.ts +0 -56
- package/dist/api/scope-validator.js +0 -293
- package/dist/api/scope-validator.js.map +0 -1
- package/dist/api/stub-resolver.d.ts +0 -117
- package/dist/api/stub-resolver.d.ts.map +0 -1
- package/dist/api/stub-resolver.js +0 -154
- package/dist/api/stub-resolver.js.map +0 -1
- package/dist/api/summarize.d.ts +0 -75
- package/dist/api/summarize.d.ts.map +0 -1
- package/dist/api/summarize.js +0 -97
- package/dist/api/summarize.js.map +0 -1
- package/dist/cache/file-cache.d.ts +0 -72
- package/dist/cache/file-cache.d.ts.map +0 -1
- package/dist/cache/file-cache.js +0 -80
- package/dist/cache/file-cache.js.map +0 -1
- package/dist/cache/index.d.ts +0 -5
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/index.js +0 -5
- package/dist/cache/index.js.map +0 -1
- package/dist/cli/dataset-cache.d.ts +0 -66
- package/dist/cli/dataset-cache.js +0 -179
- package/dist/cli/dataset-cache.js.map +0 -1
- package/dist/cli/error-handler.d.ts +0 -84
- package/dist/cli/error-handler.d.ts.map +0 -1
- package/dist/cli/error-handler.js +0 -197
- package/dist/cli/error-handler.js.map +0 -1
- package/dist/cli/generate-docs.d.ts +0 -30
- package/dist/cli/generate-docs.js +0 -370
- package/dist/cli/generate-docs.js.map +0 -1
- package/dist/cli/lint-patterns.d.ts +0 -57
- package/dist/cli/lint-patterns.d.ts.map +0 -1
- package/dist/cli/lint-patterns.js +0 -257
- package/dist/cli/lint-patterns.js.map +0 -1
- package/dist/cli/lint-process.d.ts +0 -54
- package/dist/cli/lint-process.d.ts.map +0 -1
- package/dist/cli/lint-process.js +0 -319
- package/dist/cli/lint-process.js.map +0 -1
- package/dist/cli/lint-steps.d.ts +0 -32
- package/dist/cli/lint-steps.d.ts.map +0 -1
- package/dist/cli/lint-steps.js +0 -172
- package/dist/cli/lint-steps.js.map +0 -1
- package/dist/cli/mcp-server.d.ts +0 -22
- package/dist/cli/mcp-server.js +0 -57
- package/dist/cli/mcp-server.js.map +0 -1
- package/dist/cli/output-pipeline.d.ts +0 -130
- package/dist/cli/output-pipeline.js +0 -234
- package/dist/cli/output-pipeline.js.map +0 -1
- package/dist/cli/process-api.d.ts +0 -37
- package/dist/cli/process-api.d.ts.map +0 -1
- package/dist/cli/process-api.js +0 -1550
- package/dist/cli/process-api.js.map +0 -1
- package/dist/cli/repl.d.ts +0 -38
- package/dist/cli/repl.js +0 -239
- package/dist/cli/repl.js.map +0 -1
- package/dist/cli/validate-patterns.d.ts +0 -115
- package/dist/cli/validate-patterns.js +0 -707
- package/dist/cli/validate-patterns.js.map +0 -1
- package/dist/cli/version.d.ts +0 -35
- package/dist/cli/version.d.ts.map +0 -1
- package/dist/cli/version.js +0 -64
- package/dist/cli/version.js.map +0 -1
- package/dist/config/config-loader.d.ts +0 -167
- package/dist/config/config-loader.d.ts.map +0 -1
- package/dist/config/config-loader.js +0 -294
- package/dist/config/config-loader.js.map +0 -1
- package/dist/config/defaults.d.ts +0 -92
- package/dist/config/defaults.d.ts.map +0 -1
- package/dist/config/defaults.js +0 -103
- package/dist/config/defaults.js.map +0 -1
- package/dist/config/define-config.d.ts +0 -37
- package/dist/config/define-config.d.ts.map +0 -1
- package/dist/config/define-config.js +0 -38
- package/dist/config/define-config.js.map +0 -1
- package/dist/config/factory.d.ts +0 -79
- package/dist/config/factory.d.ts.map +0 -1
- package/dist/config/factory.js +0 -116
- package/dist/config/factory.js.map +0 -1
- package/dist/config/index.d.ts +0 -45
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -48
- package/dist/config/index.js.map +0 -1
- package/dist/config/merge-sources.d.ts +0 -47
- package/dist/config/merge-sources.d.ts.map +0 -1
- package/dist/config/merge-sources.js +0 -61
- package/dist/config/merge-sources.js.map +0 -1
- package/dist/config/presets.d.ts +0 -115
- package/dist/config/presets.d.ts.map +0 -1
- package/dist/config/presets.js +0 -119
- package/dist/config/presets.js.map +0 -1
- package/dist/config/project-config-schema.d.ts +0 -192
- package/dist/config/project-config-schema.d.ts.map +0 -1
- package/dist/config/project-config-schema.js +0 -231
- package/dist/config/project-config-schema.js.map +0 -1
- package/dist/config/project-config.d.ts +0 -229
- package/dist/config/project-config.d.ts.map +0 -1
- package/dist/config/project-config.js +0 -37
- package/dist/config/project-config.js.map +0 -1
- package/dist/config/regex-builders.d.ts +0 -49
- package/dist/config/regex-builders.d.ts.map +0 -1
- package/dist/config/regex-builders.js +0 -85
- package/dist/config/regex-builders.js.map +0 -1
- package/dist/config/resolve-config.d.ts +0 -65
- package/dist/config/resolve-config.d.ts.map +0 -1
- package/dist/config/resolve-config.js +0 -150
- package/dist/config/resolve-config.js.map +0 -1
- package/dist/config/types.d.ts +0 -81
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js +0 -22
- package/dist/config/types.js.map +0 -1
- package/dist/config/workflow-loader.d.ts +0 -90
- package/dist/config/workflow-loader.d.ts.map +0 -1
- package/dist/config/workflow-loader.js +0 -167
- package/dist/config/workflow-loader.js.map +0 -1
- package/dist/extractor/doc-extractor.d.ts +0 -233
- package/dist/extractor/doc-extractor.d.ts.map +0 -1
- package/dist/extractor/doc-extractor.js +0 -481
- package/dist/extractor/doc-extractor.js.map +0 -1
- package/dist/extractor/dual-source-extractor.d.ts +0 -161
- package/dist/extractor/dual-source-extractor.d.ts.map +0 -1
- package/dist/extractor/dual-source-extractor.js +0 -407
- package/dist/extractor/dual-source-extractor.js.map +0 -1
- package/dist/extractor/gherkin-extractor.d.ts +0 -170
- package/dist/extractor/gherkin-extractor.d.ts.map +0 -1
- package/dist/extractor/gherkin-extractor.js +0 -543
- package/dist/extractor/gherkin-extractor.js.map +0 -1
- package/dist/extractor/index.d.ts +0 -7
- package/dist/extractor/index.d.ts.map +0 -1
- package/dist/extractor/index.js +0 -11
- package/dist/extractor/index.js.map +0 -1
- package/dist/extractor/layer-inference.d.ts +0 -66
- package/dist/extractor/layer-inference.d.ts.map +0 -1
- package/dist/extractor/layer-inference.js +0 -93
- package/dist/extractor/layer-inference.js.map +0 -1
- package/dist/extractor/shape-extractor.d.ts +0 -79
- package/dist/extractor/shape-extractor.d.ts.map +0 -1
- package/dist/extractor/shape-extractor.js +0 -966
- package/dist/extractor/shape-extractor.js.map +0 -1
- package/dist/generators/built-in/codec-generators.d.ts +0 -29
- package/dist/generators/built-in/decision-doc-generator.d.ts +0 -204
- package/dist/generators/built-in/decision-doc-generator.js +0 -654
- package/dist/generators/built-in/decision-doc-generator.js.map +0 -1
- package/dist/generators/built-in/design-review-generator.d.ts +0 -26
- package/dist/generators/built-in/design-review-generator.js +0 -94
- package/dist/generators/built-in/design-review-generator.js.map +0 -1
- package/dist/generators/built-in/index.d.ts +0 -22
- package/dist/generators/built-in/index.js +0 -23
- package/dist/generators/built-in/index.js.map +0 -1
- package/dist/generators/built-in/process-api-reference-generator.d.ts +0 -18
- package/dist/generators/built-in/process-api-reference-generator.d.ts.map +0 -1
- package/dist/generators/built-in/process-api-reference-generator.js.map +0 -1
- package/dist/generators/built-in/reference-generators.d.ts +0 -51
- package/dist/generators/built-in/reference-generators.js +0 -320
- package/dist/generators/built-in/reference-generators.js.map +0 -1
- package/dist/generators/codec-based.d.ts +0 -63
- package/dist/generators/codec-based.js +0 -88
- package/dist/generators/codec-based.js.map +0 -1
- package/dist/generators/content-deduplicator.d.ts +0 -114
- package/dist/generators/content-deduplicator.d.ts.map +0 -1
- package/dist/generators/content-deduplicator.js +0 -356
- package/dist/generators/content-deduplicator.js.map +0 -1
- package/dist/generators/index.d.ts +0 -50
- package/dist/generators/index.js +0 -54
- package/dist/generators/index.js.map +0 -1
- package/dist/generators/orchestrator.d.ts +0 -265
- package/dist/generators/orchestrator.js +0 -570
- package/dist/generators/orchestrator.js.map +0 -1
- package/dist/generators/pipeline/context-inference.d.ts +0 -55
- package/dist/generators/pipeline/context-inference.d.ts.map +0 -1
- package/dist/generators/pipeline/context-inference.js +0 -76
- package/dist/generators/pipeline/context-inference.js.map +0 -1
- package/dist/generators/pipeline/index.d.ts +0 -27
- package/dist/generators/pipeline/index.js +0 -34
- package/dist/generators/pipeline/index.js.map +0 -1
- package/dist/generators/pipeline/merge-patterns.d.ts +0 -33
- package/dist/generators/pipeline/merge-patterns.d.ts.map +0 -1
- package/dist/generators/pipeline/merge-patterns.js +0 -50
- package/dist/generators/pipeline/merge-patterns.js.map +0 -1
- package/dist/generators/pipeline/relationship-resolver.d.ts +0 -47
- package/dist/generators/pipeline/relationship-resolver.d.ts.map +0 -1
- package/dist/generators/pipeline/relationship-resolver.js +0 -132
- package/dist/generators/pipeline/relationship-resolver.js.map +0 -1
- package/dist/generators/pipeline/sequence-utils.d.ts +0 -49
- package/dist/generators/pipeline/sequence-utils.d.ts.map +0 -1
- package/dist/generators/pipeline/sequence-utils.js +0 -235
- package/dist/generators/pipeline/sequence-utils.js.map +0 -1
- package/dist/generators/pipeline/transform-dataset.d.ts +0 -82
- package/dist/generators/pipeline/transform-dataset.d.ts.map +0 -1
- package/dist/generators/pipeline/transform-dataset.js +0 -355
- package/dist/generators/pipeline/transform-dataset.js.map +0 -1
- package/dist/generators/pipeline/transform-types.d.ts +0 -96
- package/dist/generators/pipeline/transform-types.d.ts.map +0 -1
- package/dist/generators/pipeline/transform-types.js +0 -18
- package/dist/generators/pipeline/transform-types.js.map +0 -1
- package/dist/generators/registry.d.ts +0 -64
- package/dist/generators/registry.js +0 -77
- package/dist/generators/registry.js.map +0 -1
- package/dist/generators/source-mapper.d.ts +0 -143
- package/dist/generators/source-mapper.d.ts.map +0 -1
- package/dist/generators/source-mapper.js +0 -602
- package/dist/generators/source-mapper.js.map +0 -1
- package/dist/generators/source-mapping-validator.d.ts +0 -118
- package/dist/generators/source-mapping-validator.d.ts.map +0 -1
- package/dist/generators/source-mapping-validator.js +0 -334
- package/dist/generators/source-mapping-validator.js.map +0 -1
- package/dist/generators/types.d.ts +0 -104
- package/dist/generators/types.js +0 -5
- package/dist/generators/types.js.map +0 -1
- package/dist/generators/warning-collector.d.ts +0 -144
- package/dist/generators/warning-collector.d.ts.map +0 -1
- package/dist/generators/warning-collector.js +0 -166
- package/dist/generators/warning-collector.js.map +0 -1
- package/dist/git/branch-diff.d.ts +0 -44
- package/dist/git/branch-diff.d.ts.map +0 -1
- package/dist/git/branch-diff.js +0 -57
- package/dist/git/branch-diff.js.map +0 -1
- package/dist/git/helpers.d.ts +0 -46
- package/dist/git/helpers.d.ts.map +0 -1
- package/dist/git/helpers.js +0 -67
- package/dist/git/helpers.js.map +0 -1
- package/dist/git/index.d.ts +0 -18
- package/dist/git/index.d.ts.map +0 -1
- package/dist/git/index.js +0 -18
- package/dist/git/index.js.map +0 -1
- package/dist/git/name-status.d.ts +0 -32
- package/dist/git/name-status.d.ts.map +0 -1
- package/dist/git/name-status.js +0 -66
- package/dist/git/name-status.js.map +0 -1
- package/dist/index.d.ts +0 -107
- package/dist/index.js +0 -122
- package/dist/index.js.map +0 -1
- package/dist/lint/engine.d.ts +0 -113
- package/dist/lint/engine.d.ts.map +0 -1
- package/dist/lint/engine.js +0 -228
- package/dist/lint/engine.js.map +0 -1
- package/dist/lint/index.d.ts +0 -26
- package/dist/lint/index.d.ts.map +0 -1
- package/dist/lint/index.js +0 -24
- package/dist/lint/index.js.map +0 -1
- package/dist/lint/process-guard/decider.d.ts +0 -166
- package/dist/lint/process-guard/decider.d.ts.map +0 -1
- package/dist/lint/process-guard/decider.js +0 -412
- package/dist/lint/process-guard/decider.js.map +0 -1
- package/dist/lint/process-guard/derive-state.d.ts +0 -96
- package/dist/lint/process-guard/derive-state.d.ts.map +0 -1
- package/dist/lint/process-guard/derive-state.js +0 -368
- package/dist/lint/process-guard/derive-state.js.map +0 -1
- package/dist/lint/process-guard/detect-changes.d.ts +0 -109
- package/dist/lint/process-guard/detect-changes.d.ts.map +0 -1
- package/dist/lint/process-guard/detect-changes.js +0 -487
- package/dist/lint/process-guard/detect-changes.js.map +0 -1
- package/dist/lint/process-guard/index.d.ts +0 -35
- package/dist/lint/process-guard/index.d.ts.map +0 -1
- package/dist/lint/process-guard/index.js +0 -39
- package/dist/lint/process-guard/index.js.map +0 -1
- package/dist/lint/process-guard/types.d.ts +0 -255
- package/dist/lint/process-guard/types.d.ts.map +0 -1
- package/dist/lint/process-guard/types.js +0 -31
- package/dist/lint/process-guard/types.js.map +0 -1
- package/dist/lint/rules.d.ts +0 -147
- package/dist/lint/rules.d.ts.map +0 -1
- package/dist/lint/rules.js +0 -289
- package/dist/lint/rules.js.map +0 -1
- package/dist/lint/steps/cross-checks.d.ts +0 -66
- package/dist/lint/steps/cross-checks.d.ts.map +0 -1
- package/dist/lint/steps/cross-checks.js +0 -290
- package/dist/lint/steps/cross-checks.js.map +0 -1
- package/dist/lint/steps/feature-checks.d.ts +0 -78
- package/dist/lint/steps/feature-checks.d.ts.map +0 -1
- package/dist/lint/steps/feature-checks.js +0 -279
- package/dist/lint/steps/feature-checks.js.map +0 -1
- package/dist/lint/steps/index.d.ts +0 -22
- package/dist/lint/steps/index.d.ts.map +0 -1
- package/dist/lint/steps/index.js +0 -26
- package/dist/lint/steps/index.js.map +0 -1
- package/dist/lint/steps/pair-resolver.d.ts +0 -29
- package/dist/lint/steps/pair-resolver.d.ts.map +0 -1
- package/dist/lint/steps/pair-resolver.js +0 -76
- package/dist/lint/steps/pair-resolver.js.map +0 -1
- package/dist/lint/steps/runner.d.ts +0 -28
- package/dist/lint/steps/runner.d.ts.map +0 -1
- package/dist/lint/steps/runner.js +0 -143
- package/dist/lint/steps/runner.js.map +0 -1
- package/dist/lint/steps/step-checks.d.ts +0 -41
- package/dist/lint/steps/step-checks.d.ts.map +0 -1
- package/dist/lint/steps/step-checks.js +0 -164
- package/dist/lint/steps/step-checks.js.map +0 -1
- package/dist/lint/steps/types.d.ts +0 -95
- package/dist/lint/steps/types.d.ts.map +0 -1
- package/dist/lint/steps/types.js +0 -79
- package/dist/lint/steps/types.js.map +0 -1
- package/dist/lint/steps/utils.d.ts +0 -22
- package/dist/lint/steps/utils.d.ts.map +0 -1
- package/dist/lint/steps/utils.js +0 -57
- package/dist/lint/steps/utils.js.map +0 -1
- package/dist/mcp/file-watcher.d.ts +0 -24
- package/dist/mcp/file-watcher.js +0 -75
- package/dist/mcp/file-watcher.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -19
- package/dist/mcp/index.js +0 -21
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/pipeline-session.d.ts +0 -33
- package/dist/mcp/pipeline-session.js +0 -149
- package/dist/mcp/pipeline-session.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -28
- package/dist/mcp/server.js +0 -197
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/tool-registry.d.ts +0 -4
- package/dist/mcp/tool-registry.js +0 -525
- package/dist/mcp/tool-registry.js.map +0 -1
- package/dist/renderable/codecs/adr.d.ts +0 -4730
- package/dist/renderable/codecs/adr.d.ts.map +0 -1
- package/dist/renderable/codecs/adr.js +0 -590
- package/dist/renderable/codecs/adr.js.map +0 -1
- package/dist/renderable/codecs/architecture.d.ts +0 -4760
- package/dist/renderable/codecs/architecture.d.ts.map +0 -1
- package/dist/renderable/codecs/architecture.js +0 -524
- package/dist/renderable/codecs/architecture.js.map +0 -1
- package/dist/renderable/codecs/business-rules.d.ts +0 -4777
- package/dist/renderable/codecs/business-rules.d.ts.map +0 -1
- package/dist/renderable/codecs/business-rules.js +0 -648
- package/dist/renderable/codecs/business-rules.js.map +0 -1
- package/dist/renderable/codecs/claude-module.d.ts +0 -4710
- package/dist/renderable/codecs/claude-module.d.ts.map +0 -1
- package/dist/renderable/codecs/claude-module.js +0 -214
- package/dist/renderable/codecs/claude-module.js.map +0 -1
- package/dist/renderable/codecs/composite.d.ts +0 -84
- package/dist/renderable/codecs/composite.d.ts.map +0 -1
- package/dist/renderable/codecs/composite.js +0 -124
- package/dist/renderable/codecs/composite.js.map +0 -1
- package/dist/renderable/codecs/convention-extractor.d.ts +0 -105
- package/dist/renderable/codecs/convention-extractor.d.ts.map +0 -1
- package/dist/renderable/codecs/convention-extractor.js +0 -353
- package/dist/renderable/codecs/convention-extractor.js.map +0 -1
- package/dist/renderable/codecs/decision-doc.d.ts +0 -308
- package/dist/renderable/codecs/decision-doc.d.ts.map +0 -1
- package/dist/renderable/codecs/decision-doc.js +0 -485
- package/dist/renderable/codecs/decision-doc.js.map +0 -1
- package/dist/renderable/codecs/design-review.d.ts +0 -55
- package/dist/renderable/codecs/design-review.d.ts.map +0 -1
- package/dist/renderable/codecs/design-review.js +0 -532
- package/dist/renderable/codecs/design-review.js.map +0 -1
- package/dist/renderable/codecs/diagram-utils.d.ts +0 -62
- package/dist/renderable/codecs/diagram-utils.d.ts.map +0 -1
- package/dist/renderable/codecs/diagram-utils.js +0 -70
- package/dist/renderable/codecs/diagram-utils.js.map +0 -1
- package/dist/renderable/codecs/helpers.d.ts +0 -553
- package/dist/renderable/codecs/helpers.d.ts.map +0 -1
- package/dist/renderable/codecs/helpers.js +0 -913
- package/dist/renderable/codecs/helpers.js.map +0 -1
- package/dist/renderable/codecs/index-codec.d.ts +0 -4714
- package/dist/renderable/codecs/index.d.ts +0 -46
- package/dist/renderable/codecs/index.d.ts.map +0 -1
- package/dist/renderable/codecs/index.js +0 -70
- package/dist/renderable/codecs/index.js.map +0 -1
- package/dist/renderable/codecs/patterns.d.ts +0 -4757
- package/dist/renderable/codecs/patterns.d.ts.map +0 -1
- package/dist/renderable/codecs/patterns.js +0 -462
- package/dist/renderable/codecs/patterns.js.map +0 -1
- package/dist/renderable/codecs/planning.d.ts +0 -14055
- package/dist/renderable/codecs/planning.d.ts.map +0 -1
- package/dist/renderable/codecs/planning.js +0 -449
- package/dist/renderable/codecs/planning.js.map +0 -1
- package/dist/renderable/codecs/pr-changes.d.ts +0 -4742
- package/dist/renderable/codecs/pr-changes.d.ts.map +0 -1
- package/dist/renderable/codecs/pr-changes.js +0 -425
- package/dist/renderable/codecs/pr-changes.js.map +0 -1
- package/dist/renderable/codecs/reference.d.ts +0 -215
- package/dist/renderable/codecs/reference.d.ts.map +0 -1
- package/dist/renderable/codecs/reference.js +0 -1578
- package/dist/renderable/codecs/reference.js.map +0 -1
- package/dist/renderable/codecs/reporting.d.ts +0 -14026
- package/dist/renderable/codecs/reporting.d.ts.map +0 -1
- package/dist/renderable/codecs/reporting.js +0 -365
- package/dist/renderable/codecs/reporting.js.map +0 -1
- package/dist/renderable/codecs/requirements.d.ts +0 -4743
- package/dist/renderable/codecs/requirements.d.ts.map +0 -1
- package/dist/renderable/codecs/requirements.js +0 -428
- package/dist/renderable/codecs/requirements.js.map +0 -1
- package/dist/renderable/codecs/session.d.ts +0 -9410
- package/dist/renderable/codecs/session.d.ts.map +0 -1
- package/dist/renderable/codecs/session.js +0 -848
- package/dist/renderable/codecs/session.js.map +0 -1
- package/dist/renderable/codecs/shape-matcher.d.ts +0 -54
- package/dist/renderable/codecs/shape-matcher.d.ts.map +0 -1
- package/dist/renderable/codecs/shape-matcher.js +0 -106
- package/dist/renderable/codecs/shape-matcher.js.map +0 -1
- package/dist/renderable/codecs/shared-schema.d.ts +0 -44
- package/dist/renderable/codecs/shared-schema.d.ts.map +0 -1
- package/dist/renderable/codecs/shared-schema.js +0 -43
- package/dist/renderable/codecs/shared-schema.js.map +0 -1
- package/dist/renderable/codecs/taxonomy.d.ts +0 -4733
- package/dist/renderable/codecs/taxonomy.d.ts.map +0 -1
- package/dist/renderable/codecs/taxonomy.js +0 -570
- package/dist/renderable/codecs/taxonomy.js.map +0 -1
- package/dist/renderable/codecs/timeline.d.ts +0 -14094
- package/dist/renderable/codecs/timeline.d.ts.map +0 -1
- package/dist/renderable/codecs/timeline.js +0 -906
- package/dist/renderable/codecs/timeline.js.map +0 -1
- package/dist/renderable/codecs/types/base.d.ts +0 -81
- package/dist/renderable/codecs/types/base.d.ts.map +0 -1
- package/dist/renderable/codecs/types/base.js +0 -56
- package/dist/renderable/codecs/types/base.js.map +0 -1
- package/dist/renderable/codecs/types/index.d.ts +0 -5
- package/dist/renderable/codecs/types/index.d.ts.map +0 -1
- package/dist/renderable/codecs/types/index.js +0 -5
- package/dist/renderable/codecs/types/index.js.map +0 -1
- package/dist/renderable/codecs/validation-rules.d.ts +0 -4773
- package/dist/renderable/codecs/validation-rules.d.ts.map +0 -1
- package/dist/renderable/codecs/validation-rules.js +0 -537
- package/dist/renderable/codecs/validation-rules.js.map +0 -1
- package/dist/renderable/generate.d.ts +0 -338
- package/dist/renderable/generate.d.ts.map +0 -1
- package/dist/renderable/generate.js +0 -437
- package/dist/renderable/generate.js.map +0 -1
- package/dist/renderable/index.d.ts +0 -36
- package/dist/renderable/index.d.ts.map +0 -1
- package/dist/renderable/index.js +0 -58
- package/dist/renderable/index.js.map +0 -1
- package/dist/renderable/load-preamble.d.ts +0 -56
- package/dist/renderable/load-preamble.d.ts.map +0 -1
- package/dist/renderable/load-preamble.js +0 -298
- package/dist/renderable/load-preamble.js.map +0 -1
- package/dist/renderable/render.d.ts +0 -61
- package/dist/renderable/render.d.ts.map +0 -1
- package/dist/renderable/render.js +0 -346
- package/dist/renderable/render.js.map +0 -1
- package/dist/renderable/schema.d.ts +0 -194
- package/dist/renderable/schema.d.ts.map +0 -1
- package/dist/renderable/schema.js +0 -197
- package/dist/renderable/schema.js.map +0 -1
- package/dist/renderable/utils.d.ts +0 -146
- package/dist/renderable/utils.d.ts.map +0 -1
- package/dist/renderable/utils.js +0 -362
- package/dist/renderable/utils.js.map +0 -1
- package/dist/scanner/ast-parser.d.ts +0 -75
- package/dist/scanner/ast-parser.d.ts.map +0 -1
- package/dist/scanner/ast-parser.js +0 -835
- package/dist/scanner/ast-parser.js.map +0 -1
- package/dist/scanner/gherkin-ast-parser.d.ts +0 -166
- package/dist/scanner/gherkin-ast-parser.d.ts.map +0 -1
- package/dist/scanner/gherkin-ast-parser.js +0 -507
- package/dist/scanner/gherkin-ast-parser.js.map +0 -1
- package/dist/scanner/gherkin-scanner.d.ts +0 -106
- package/dist/scanner/gherkin-scanner.d.ts.map +0 -1
- package/dist/scanner/gherkin-scanner.js +0 -149
- package/dist/scanner/gherkin-scanner.js.map +0 -1
- package/dist/scanner/index.d.ts +0 -85
- package/dist/scanner/index.d.ts.map +0 -1
- package/dist/scanner/index.js +0 -102
- package/dist/scanner/index.js.map +0 -1
- package/dist/scanner/pattern-scanner.d.ts +0 -83
- package/dist/scanner/pattern-scanner.d.ts.map +0 -1
- package/dist/scanner/pattern-scanner.js +0 -110
- package/dist/scanner/pattern-scanner.js.map +0 -1
- package/dist/taxonomy/categories.d.ts +0 -47
- package/dist/taxonomy/categories.d.ts.map +0 -1
- package/dist/taxonomy/categories.js +0 -175
- package/dist/taxonomy/categories.js.map +0 -1
- package/dist/taxonomy/claude-section-values.d.ts +0 -12
- package/dist/taxonomy/claude-section-values.d.ts.map +0 -1
- package/dist/taxonomy/claude-section-values.js +0 -17
- package/dist/taxonomy/claude-section-values.js.map +0 -1
- package/dist/taxonomy/conventions.d.ts +0 -13
- package/dist/taxonomy/conventions.d.ts.map +0 -1
- package/dist/taxonomy/conventions.js +0 -27
- package/dist/taxonomy/conventions.js.map +0 -1
- package/dist/taxonomy/deliverable-status.d.ts +0 -99
- package/dist/taxonomy/deliverable-status.d.ts.map +0 -1
- package/dist/taxonomy/deliverable-status.js +0 -131
- package/dist/taxonomy/deliverable-status.js.map +0 -1
- package/dist/taxonomy/format-types.d.ts +0 -17
- package/dist/taxonomy/format-types.d.ts.map +0 -1
- package/dist/taxonomy/format-types.js +0 -23
- package/dist/taxonomy/format-types.js.map +0 -1
- package/dist/taxonomy/generator-options.d.ts +0 -67
- package/dist/taxonomy/generator-options.d.ts.map +0 -1
- package/dist/taxonomy/generator-options.js +0 -75
- package/dist/taxonomy/generator-options.js.map +0 -1
- package/dist/taxonomy/hierarchy-levels.d.ts +0 -23
- package/dist/taxonomy/hierarchy-levels.d.ts.map +0 -1
- package/dist/taxonomy/hierarchy-levels.js +0 -22
- package/dist/taxonomy/hierarchy-levels.js.map +0 -1
- package/dist/taxonomy/index.d.ts +0 -35
- package/dist/taxonomy/index.d.ts.map +0 -1
- package/dist/taxonomy/index.js +0 -56
- package/dist/taxonomy/index.js.map +0 -1
- package/dist/taxonomy/layer-types.d.ts +0 -22
- package/dist/taxonomy/layer-types.d.ts.map +0 -1
- package/dist/taxonomy/layer-types.js +0 -28
- package/dist/taxonomy/layer-types.js.map +0 -1
- package/dist/taxonomy/normalized-status.d.ts +0 -99
- package/dist/taxonomy/normalized-status.d.ts.map +0 -1
- package/dist/taxonomy/normalized-status.js +0 -113
- package/dist/taxonomy/normalized-status.js.map +0 -1
- package/dist/taxonomy/registry-builder.d.ts +0 -104
- package/dist/taxonomy/registry-builder.d.ts.map +0 -1
- package/dist/taxonomy/registry-builder.js +0 -561
- package/dist/taxonomy/registry-builder.js.map +0 -1
- package/dist/taxonomy/risk-levels.d.ts +0 -16
- package/dist/taxonomy/risk-levels.d.ts.map +0 -1
- package/dist/taxonomy/risk-levels.js +0 -15
- package/dist/taxonomy/risk-levels.js.map +0 -1
- package/dist/taxonomy/severity-types.d.ts +0 -6
- package/dist/taxonomy/severity-types.d.ts.map +0 -1
- package/dist/taxonomy/severity-types.js +0 -5
- package/dist/taxonomy/severity-types.js.map +0 -1
- package/dist/taxonomy/status-values.d.ts +0 -39
- package/dist/taxonomy/status-values.d.ts.map +0 -1
- package/dist/taxonomy/status-values.js +0 -42
- package/dist/taxonomy/status-values.js.map +0 -1
- package/dist/types/branded.d.ts +0 -89
- package/dist/types/branded.d.ts.map +0 -1
- package/dist/types/branded.js +0 -57
- package/dist/types/branded.js.map +0 -1
- package/dist/types/errors.d.ts +0 -342
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/errors.js +0 -251
- package/dist/types/errors.js.map +0 -1
- package/dist/types/index.d.ts +0 -41
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -5
- package/dist/types/index.js.map +0 -1
- package/dist/types/result.d.ts +0 -78
- package/dist/types/result.d.ts.map +0 -1
- package/dist/types/result.js +0 -78
- package/dist/types/result.js.map +0 -1
- package/dist/utils/collection-utils.d.ts +0 -49
- package/dist/utils/collection-utils.d.ts.map +0 -1
- package/dist/utils/collection-utils.js +0 -58
- package/dist/utils/collection-utils.js.map +0 -1
- package/dist/utils/id-utils.d.ts +0 -46
- package/dist/utils/id-utils.d.ts.map +0 -1
- package/dist/utils/id-utils.js +0 -51
- package/dist/utils/id-utils.js.map +0 -1
- package/dist/utils/index.d.ts +0 -21
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -21
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/string-utils.d.ts +0 -150
- package/dist/utils/string-utils.d.ts.map +0 -1
- package/dist/utils/string-utils.js +0 -281
- package/dist/utils/string-utils.js.map +0 -1
- package/dist/validation/anti-patterns.d.ts +0 -134
- package/dist/validation/anti-patterns.d.ts.map +0 -1
- package/dist/validation/anti-patterns.js +0 -307
- package/dist/validation/anti-patterns.js.map +0 -1
- package/dist/validation/dod-validator.d.ts +0 -94
- package/dist/validation/dod-validator.d.ts.map +0 -1
- package/dist/validation/dod-validator.js +0 -198
- package/dist/validation/dod-validator.js.map +0 -1
- package/dist/validation/fsm/index.d.ts +0 -59
- package/dist/validation/fsm/index.d.ts.map +0 -1
- package/dist/validation/fsm/index.js +0 -64
- package/dist/validation/fsm/index.js.map +0 -1
- package/dist/validation/fsm/states.d.ts +0 -93
- package/dist/validation/fsm/states.d.ts.map +0 -1
- package/dist/validation/fsm/states.js +0 -98
- package/dist/validation/fsm/states.js.map +0 -1
- package/dist/validation/fsm/transitions.d.ts +0 -100
- package/dist/validation/fsm/transitions.d.ts.map +0 -1
- package/dist/validation/fsm/transitions.js +0 -122
- package/dist/validation/fsm/transitions.js.map +0 -1
- package/dist/validation/fsm/validator.d.ts +0 -163
- package/dist/validation/fsm/validator.d.ts.map +0 -1
- package/dist/validation/fsm/validator.js +0 -205
- package/dist/validation/fsm/validator.js.map +0 -1
- package/dist/validation/index.d.ts +0 -23
- package/dist/validation/index.d.ts.map +0 -1
- package/dist/validation/index.js +0 -25
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/types.d.ts +0 -136
- package/dist/validation/types.d.ts.map +0 -1
- package/dist/validation/types.js +0 -56
- package/dist/validation/types.js.map +0 -1
- package/dist/validation-schemas/codec-utils.d.ts +0 -188
- package/dist/validation-schemas/codec-utils.d.ts.map +0 -1
- package/dist/validation-schemas/codec-utils.js +0 -258
- package/dist/validation-schemas/codec-utils.js.map +0 -1
- package/dist/validation-schemas/config.d.ts +0 -99
- package/dist/validation-schemas/config.d.ts.map +0 -1
- package/dist/validation-schemas/config.js +0 -178
- package/dist/validation-schemas/config.js.map +0 -1
- package/dist/validation-schemas/doc-directive.d.ts +0 -195
- package/dist/validation-schemas/doc-directive.d.ts.map +0 -1
- package/dist/validation-schemas/doc-directive.js +0 -239
- package/dist/validation-schemas/doc-directive.js.map +0 -1
- package/dist/validation-schemas/dual-source.d.ts +0 -167
- package/dist/validation-schemas/dual-source.d.ts.map +0 -1
- package/dist/validation-schemas/dual-source.js +0 -168
- package/dist/validation-schemas/dual-source.js.map +0 -1
- package/dist/validation-schemas/export-info.d.ts +0 -53
- package/dist/validation-schemas/export-info.d.ts.map +0 -1
- package/dist/validation-schemas/export-info.js +0 -101
- package/dist/validation-schemas/export-info.js.map +0 -1
- package/dist/validation-schemas/extracted-pattern.d.ts +0 -351
- package/dist/validation-schemas/extracted-pattern.d.ts.map +0 -1
- package/dist/validation-schemas/extracted-pattern.js +0 -459
- package/dist/validation-schemas/extracted-pattern.js.map +0 -1
- package/dist/validation-schemas/extracted-shape.d.ts +0 -200
- package/dist/validation-schemas/extracted-shape.d.ts.map +0 -1
- package/dist/validation-schemas/extracted-shape.js +0 -182
- package/dist/validation-schemas/extracted-shape.js.map +0 -1
- package/dist/validation-schemas/feature.d.ts +0 -554
- package/dist/validation-schemas/feature.d.ts.map +0 -1
- package/dist/validation-schemas/feature.js +0 -262
- package/dist/validation-schemas/feature.js.map +0 -1
- package/dist/validation-schemas/index.d.ts +0 -15
- package/dist/validation-schemas/index.d.ts.map +0 -1
- package/dist/validation-schemas/index.js +0 -32
- package/dist/validation-schemas/index.js.map +0 -1
- package/dist/validation-schemas/lint.d.ts +0 -46
- package/dist/validation-schemas/lint.d.ts.map +0 -1
- package/dist/validation-schemas/lint.js +0 -45
- package/dist/validation-schemas/lint.js.map +0 -1
- package/dist/validation-schemas/master-dataset.d.ts +0 -8299
- package/dist/validation-schemas/master-dataset.d.ts.map +0 -1
- package/dist/validation-schemas/master-dataset.js +0 -275
- package/dist/validation-schemas/master-dataset.js.map +0 -1
- package/dist/validation-schemas/output-schemas.d.ts +0 -183
- package/dist/validation-schemas/output-schemas.d.ts.map +0 -1
- package/dist/validation-schemas/output-schemas.js +0 -149
- package/dist/validation-schemas/output-schemas.js.map +0 -1
- package/dist/validation-schemas/scenario-ref.d.ts +0 -80
- package/dist/validation-schemas/scenario-ref.d.ts.map +0 -1
- package/dist/validation-schemas/scenario-ref.js +0 -73
- package/dist/validation-schemas/scenario-ref.js.map +0 -1
- package/dist/validation-schemas/tag-registry.d.ts +0 -210
- package/dist/validation-schemas/tag-registry.d.ts.map +0 -1
- package/dist/validation-schemas/tag-registry.js +0 -248
- package/dist/validation-schemas/tag-registry.js.map +0 -1
- package/dist/validation-schemas/workflow-config.d.ts +0 -125
- package/dist/validation-schemas/workflow-config.d.ts.map +0 -1
- package/dist/validation-schemas/workflow-config.js +0 -138
- package/dist/validation-schemas/workflow-config.js.map +0 -1
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
## Shared Pipeline Factory Responsibilities
|
|
31
31
|
|
|
32
|
-
**Invariant:** `
|
|
32
|
+
**Invariant:** `buildPatternGraph()` is the shared factory for Steps 1-8 of the architecture pipeline and returns `Result<PipelineResult, PipelineError>` without process-level side effects.
|
|
33
33
|
|
|
34
34
|
**Rationale:** Centralizing scan/extract/merge/transform flow prevents divergence between CLI consumers and preserves a single ADR-006 read-model path.
|
|
35
35
|
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
|
|
40
40
|
The factory owns: configuration load, TypeScript scan + extraction, Gherkin scan +
|
|
41
41
|
extraction, merge conflict handling, hierarchy child derivation, workflow load,
|
|
42
|
-
and `
|
|
42
|
+
and `transformToPatternGraph` with validation summary.
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
46
|
## Consumer Architecture and PipelineOptions Differentiation
|
|
47
47
|
|
|
48
|
-
Three consumers share this factory: `
|
|
48
|
+
Three consumers share this factory: `pattern-graph-cli`, `validate-patterns`, and the
|
|
49
49
|
generation orchestrator. `PipelineOptions` differentiates behavior by
|
|
50
50
|
`mergeConflictStrategy` (`fatal` vs `concatenate`), `includeValidation` toggles,
|
|
51
51
|
and `failOnScanErrors` policy without forking pipeline logic.
|
|
52
52
|
|
|
53
53
|
### When to Use
|
|
54
54
|
|
|
55
|
-
- Any consumer needs a
|
|
55
|
+
- Any consumer needs a PatternGraph without rewriting scan/extract/merge flow
|
|
56
56
|
- CLI consumers require differentiated conflict strategy and validation behavior
|
|
57
57
|
- Orchestrator needs a shared steps 1-8 implementation before codec/file execution
|
|
58
58
|
|
|
@@ -65,7 +65,7 @@ Scoped architecture diagram showing component relationships:
|
|
|
65
65
|
```mermaid
|
|
66
66
|
graph TB
|
|
67
67
|
subgraph api["Api"]
|
|
68
|
-
|
|
68
|
+
PatternGraph[/"PatternGraph"/]
|
|
69
69
|
MCPToolRegistry("MCPToolRegistry")
|
|
70
70
|
MCPServerImpl("MCPServerImpl")
|
|
71
71
|
MCPPipelineSession("MCPPipelineSession")
|
|
@@ -73,8 +73,8 @@ graph TB
|
|
|
73
73
|
MCPFileWatcher[/"MCPFileWatcher"/]
|
|
74
74
|
PatternSummarizerImpl("PatternSummarizerImpl")
|
|
75
75
|
ScopeValidatorImpl("ScopeValidatorImpl")
|
|
76
|
-
ProcessStateAPI("ProcessStateAPI")
|
|
77
76
|
PatternHelpers["PatternHelpers"]
|
|
77
|
+
PatternGraphAPI("PatternGraphAPI")
|
|
78
78
|
HandoffGeneratorImpl("HandoffGeneratorImpl")
|
|
79
79
|
FuzzyMatcherImpl("FuzzyMatcherImpl")
|
|
80
80
|
CoverageAnalyzerImpl("CoverageAnalyzerImpl")
|
|
@@ -84,7 +84,7 @@ graph TB
|
|
|
84
84
|
end
|
|
85
85
|
subgraph cli["Cli"]
|
|
86
86
|
ReplMode("ReplMode")
|
|
87
|
-
|
|
87
|
+
PatternGraphCLIImpl("PatternGraphCLIImpl")
|
|
88
88
|
OutputPipelineImpl("OutputPipelineImpl")
|
|
89
89
|
MCPServerBin[/"MCPServerBin"/]
|
|
90
90
|
DatasetCache[/"DatasetCache"/]
|
|
@@ -98,17 +98,17 @@ graph TB
|
|
|
98
98
|
RulesQueryModule["RulesQueryModule"]:::neighbor
|
|
99
99
|
FSMValidator["FSMValidator"]:::neighbor
|
|
100
100
|
PipelineFactory["PipelineFactory"]:::neighbor
|
|
101
|
-
ProcessStateAPICLI["ProcessStateAPICLI"]:::neighbor
|
|
102
|
-
ProcessApiHybridGeneration["ProcessApiHybridGeneration"]:::neighbor
|
|
103
101
|
PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor
|
|
102
|
+
PatternGraphAPICLI["PatternGraphAPICLI"]:::neighbor
|
|
104
103
|
MCPServerIntegration["MCPServerIntegration"]:::neighbor
|
|
105
104
|
DataAPIDesignSessionSupport["DataAPIDesignSessionSupport"]:::neighbor
|
|
106
105
|
DataAPIOutputShaping["DataAPIOutputShaping"]:::neighbor
|
|
107
106
|
DataAPIContextAssembly["DataAPIContextAssembly"]:::neighbor
|
|
108
107
|
DataAPICLIErgonomics["DataAPICLIErgonomics"]:::neighbor
|
|
109
108
|
DataAPIArchitectureQueries["DataAPIArchitectureQueries"]:::neighbor
|
|
109
|
+
CliReferenceGeneration["CliReferenceGeneration"]:::neighbor
|
|
110
110
|
end
|
|
111
|
-
MCPToolRegistry -->|uses|
|
|
111
|
+
MCPToolRegistry -->|uses| PatternGraphAPI
|
|
112
112
|
MCPToolRegistry -->|uses| MCPPipelineSession
|
|
113
113
|
MCPToolRegistry ..->|implements| MCPServerIntegration
|
|
114
114
|
MCPServerImpl -->|uses| MCPPipelineSession
|
|
@@ -116,7 +116,7 @@ graph TB
|
|
|
116
116
|
MCPServerImpl -->|uses| MCPFileWatcher
|
|
117
117
|
MCPServerImpl ..->|implements| MCPServerIntegration
|
|
118
118
|
MCPPipelineSession -->|uses| PipelineFactory
|
|
119
|
-
MCPPipelineSession -->|uses|
|
|
119
|
+
MCPPipelineSession -->|uses| PatternGraphAPI
|
|
120
120
|
MCPPipelineSession -->|uses| ConfigLoader
|
|
121
121
|
MCPPipelineSession ..->|implements| MCPServerIntegration
|
|
122
122
|
MCPModule -->|uses| MCPServerImpl
|
|
@@ -125,16 +125,16 @@ graph TB
|
|
|
125
125
|
MCPModule -->|uses| MCPToolRegistry
|
|
126
126
|
MCPFileWatcher ..->|implements| MCPServerIntegration
|
|
127
127
|
ReplMode -->|uses| PipelineFactory
|
|
128
|
-
ReplMode -->|uses|
|
|
128
|
+
ReplMode -->|uses| PatternGraphAPI
|
|
129
129
|
ReplMode ..->|implements| DataAPICLIErgonomics
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
PatternGraphCLIImpl -->|uses| PatternGraphAPI
|
|
131
|
+
PatternGraphCLIImpl -->|uses| PatternGraph
|
|
132
|
+
PatternGraphCLIImpl -->|uses| PipelineFactory
|
|
133
|
+
PatternGraphCLIImpl -->|uses| RulesQueryModule
|
|
134
|
+
PatternGraphCLIImpl -->|uses| PatternSummarizerImpl
|
|
135
|
+
PatternGraphCLIImpl -->|uses| FuzzyMatcherImpl
|
|
136
|
+
PatternGraphCLIImpl -->|uses| OutputPipelineImpl
|
|
137
|
+
PatternGraphCLIImpl ..->|implements| PatternGraphAPICLI
|
|
138
138
|
OutputPipelineImpl -->|uses| PatternSummarizerImpl
|
|
139
139
|
OutputPipelineImpl ..->|implements| DataAPIOutputShaping
|
|
140
140
|
MCPServerBin -->|uses| MCPServerImpl
|
|
@@ -142,39 +142,39 @@ graph TB
|
|
|
142
142
|
DatasetCache -->|uses| PipelineFactory
|
|
143
143
|
DatasetCache -->|uses| WorkflowConfigSchema
|
|
144
144
|
DatasetCache ..->|implements| DataAPICLIErgonomics
|
|
145
|
-
CLISchema ..->|implements|
|
|
146
|
-
PatternSummarizerImpl -->|uses|
|
|
145
|
+
CLISchema ..->|implements| CliReferenceGeneration
|
|
146
|
+
PatternSummarizerImpl -->|uses| PatternGraphAPI
|
|
147
147
|
PatternSummarizerImpl ..->|implements| DataAPIOutputShaping
|
|
148
|
-
ScopeValidatorImpl -->|uses|
|
|
149
|
-
ScopeValidatorImpl -->|uses|
|
|
148
|
+
ScopeValidatorImpl -->|uses| PatternGraphAPI
|
|
149
|
+
ScopeValidatorImpl -->|uses| PatternGraph
|
|
150
150
|
ScopeValidatorImpl -->|uses| StubResolverImpl
|
|
151
151
|
ScopeValidatorImpl ..->|implements| DataAPIDesignSessionSupport
|
|
152
|
-
ProcessStateAPI -->|uses| MasterDataset
|
|
153
|
-
ProcessStateAPI -->|uses| FSMValidator
|
|
154
|
-
ProcessStateAPI ..->|implements| PhaseStateMachineValidation
|
|
155
152
|
PatternHelpers ..->|implements| DataAPIOutputShaping
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
PatternGraphAPI -->|uses| PatternGraph
|
|
154
|
+
PatternGraphAPI -->|uses| FSMValidator
|
|
155
|
+
PatternGraphAPI ..->|implements| PhaseStateMachineValidation
|
|
156
|
+
HandoffGeneratorImpl -->|uses| PatternGraphAPI
|
|
157
|
+
HandoffGeneratorImpl -->|uses| PatternGraph
|
|
158
158
|
HandoffGeneratorImpl -->|uses| ContextFormatterImpl
|
|
159
159
|
HandoffGeneratorImpl ..->|implements| DataAPIDesignSessionSupport
|
|
160
160
|
FuzzyMatcherImpl ..->|implements| DataAPIOutputShaping
|
|
161
161
|
CoverageAnalyzerImpl -->|uses| Pattern_Scanner
|
|
162
|
-
CoverageAnalyzerImpl -->|uses|
|
|
162
|
+
CoverageAnalyzerImpl -->|uses| PatternGraph
|
|
163
163
|
CoverageAnalyzerImpl ..->|implements| DataAPIArchitectureQueries
|
|
164
164
|
ContextFormatterImpl -->|uses| ContextAssemblerImpl
|
|
165
165
|
ContextFormatterImpl ..->|implements| DataAPIContextAssembly
|
|
166
|
-
ContextAssemblerImpl -->|uses|
|
|
167
|
-
ContextAssemblerImpl -->|uses|
|
|
166
|
+
ContextAssemblerImpl -->|uses| PatternGraphAPI
|
|
167
|
+
ContextAssemblerImpl -->|uses| PatternGraph
|
|
168
168
|
ContextAssemblerImpl -->|uses| PatternSummarizerImpl
|
|
169
169
|
ContextAssemblerImpl -->|uses| FuzzyMatcherImpl
|
|
170
170
|
ContextAssemblerImpl -->|uses| StubResolverImpl
|
|
171
171
|
ContextAssemblerImpl ..->|implements| DataAPIContextAssembly
|
|
172
|
-
ArchQueriesImpl -->|uses|
|
|
173
|
-
ArchQueriesImpl -->|uses|
|
|
172
|
+
ArchQueriesImpl -->|uses| PatternGraphAPI
|
|
173
|
+
ArchQueriesImpl -->|uses| PatternGraph
|
|
174
174
|
ArchQueriesImpl ..->|implements| DataAPIArchitectureQueries
|
|
175
|
-
StubResolverImpl -->|uses|
|
|
175
|
+
StubResolverImpl -->|uses| PatternGraphAPI
|
|
176
176
|
FSMValidator ..->|implements| PhaseStateMachineValidation
|
|
177
|
-
PipelineFactory -->|uses|
|
|
177
|
+
PipelineFactory -->|uses| PatternGraph
|
|
178
178
|
MCPServerIntegration -.->|depends on| DataAPICLIErgonomics
|
|
179
179
|
DataAPIDesignSessionSupport -.->|depends on| DataAPIContextAssembly
|
|
180
180
|
DataAPIContextAssembly -.->|depends on| DataAPIOutputShaping
|
|
@@ -190,7 +190,7 @@ graph TB
|
|
|
190
190
|
|
|
191
191
|
```typescript
|
|
192
192
|
/**
|
|
193
|
-
* Options for building a
|
|
193
|
+
* Options for building a PatternGraph via the shared pipeline.
|
|
194
194
|
*
|
|
195
195
|
* DD-1: Factory lives at src/generators/pipeline/build-pipeline.ts.
|
|
196
196
|
* DD-2: mergeConflictStrategy controls per-consumer conflict handling.
|
|
@@ -213,13 +213,16 @@ interface PipelineOptions {
|
|
|
213
213
|
readonly includeValidation?: boolean;
|
|
214
214
|
/** DD-5: When true, return error on individual scan failures (default false). */
|
|
215
215
|
readonly failOnScanErrors?: boolean;
|
|
216
|
+
/** Pre-loaded tag registry. When provided, skips internal config load (Step 1). */
|
|
217
|
+
readonly tagRegistry?: TagRegistry;
|
|
216
218
|
}
|
|
217
219
|
```
|
|
218
220
|
|
|
219
|
-
| Property | Description
|
|
220
|
-
| ----------------- |
|
|
221
|
-
| includeValidation | DD-3: When false, skip validation pass (default true).
|
|
222
|
-
| failOnScanErrors | DD-5: When true, return error on individual scan failures (default false).
|
|
221
|
+
| Property | Description |
|
|
222
|
+
| ----------------- | ---------------------------------------------------------------------------- |
|
|
223
|
+
| includeValidation | DD-3: When false, skip validation pass (default true). |
|
|
224
|
+
| failOnScanErrors | DD-5: When true, return error on individual scan failures (default false). |
|
|
225
|
+
| tagRegistry | Pre-loaded tag registry. When provided, skips internal config load (Step 1). |
|
|
223
226
|
|
|
224
227
|
### PipelineResult (interface)
|
|
225
228
|
|
|
@@ -232,18 +235,18 @@ interface PipelineOptions {
|
|
|
232
235
|
|
|
233
236
|
```typescript
|
|
234
237
|
interface PipelineResult {
|
|
235
|
-
readonly dataset:
|
|
238
|
+
readonly dataset: RuntimePatternGraph;
|
|
236
239
|
readonly validation: ValidationSummary;
|
|
237
240
|
readonly warnings: readonly PipelineWarning[];
|
|
238
241
|
readonly scanMetadata: ScanMetadata;
|
|
239
242
|
}
|
|
240
243
|
```
|
|
241
244
|
|
|
242
|
-
###
|
|
245
|
+
### PatternGraphSchema (const)
|
|
243
246
|
|
|
244
247
|
```typescript
|
|
245
248
|
/**
|
|
246
|
-
*
|
|
249
|
+
* PatternGraph - Unified view of all extracted patterns
|
|
247
250
|
*
|
|
248
251
|
* Contains raw patterns plus pre-computed views and statistics.
|
|
249
252
|
* This is the primary data structure passed to generators and sections.
|
|
@@ -252,7 +255,7 @@ interface PipelineResult {
|
|
|
252
255
|
```
|
|
253
256
|
|
|
254
257
|
```typescript
|
|
255
|
-
|
|
258
|
+
PatternGraphSchema = z.object({
|
|
256
259
|
// ─────────────────────────────────────────────────────────────────────────
|
|
257
260
|
// Raw Data
|
|
258
261
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -284,7 +287,7 @@ MasterDatasetSchema = z.object({
|
|
|
284
287
|
byCategory: z.record(z.string(), z.array(ExtractedPatternSchema)),
|
|
285
288
|
|
|
286
289
|
/** Patterns grouped by source type */
|
|
287
|
-
|
|
290
|
+
bySourceType: SourceViewsSchema,
|
|
288
291
|
|
|
289
292
|
/** Patterns grouped by product area (for O(1) product area lookups) */
|
|
290
293
|
byProductArea: z.record(z.string(), z.array(ExtractedPatternSchema)),
|
|
@@ -509,7 +512,7 @@ ArchIndexSchema = z.object({
|
|
|
509
512
|
|
|
510
513
|
## Business Rules
|
|
511
514
|
|
|
512
|
-
38 patterns,
|
|
515
|
+
38 patterns, 147 rules with invariants (147 total)
|
|
513
516
|
|
|
514
517
|
### Arch Queries Test
|
|
515
518
|
|
|
@@ -547,17 +550,17 @@ ArchIndexSchema = z.object({
|
|
|
547
550
|
|
|
548
551
|
### Data API CLI Ergonomics
|
|
549
552
|
|
|
550
|
-
| Rule
|
|
551
|
-
|
|
|
552
|
-
|
|
|
553
|
-
| REPL mode keeps pipeline loaded for interactive multi-query sessions
|
|
554
|
-
| Per-subcommand help and diagnostic modes aid discoverability
|
|
553
|
+
| Rule | Invariant | Rationale |
|
|
554
|
+
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
555
|
+
| PatternGraph is cached between invocations with file-change invalidation | Cache is automatically invalidated when any source file (TypeScript or Gherkin) has a modification time newer than the cache. | The pipeline (scan -> extract -> transform) runs fresh on every invocation (~2-5 seconds). Most queries during a session don't need fresh data -- the source files haven't changed between queries. Caching the PatternGraph to a temp file with file-modification-time invalidation makes subsequent queries instant while ensuring staleness is impossible. |
|
|
556
|
+
| REPL mode keeps pipeline loaded for interactive multi-query sessions | REPL mode loads the pipeline once and accepts multiple queries on stdin, with optional tab completion for pattern names and subcommands. | Design sessions often involve 10-20 exploratory queries in sequence (check status, look up pattern, check deps, look up another pattern). REPL mode eliminates per-query pipeline overhead entirely. |
|
|
557
|
+
| Per-subcommand help and diagnostic modes aid discoverability | Every subcommand supports `--help` with usage, flags, and examples. Dry-run shows pipeline scope without executing. | AI agents read `--help` output to discover available commands and flags. Without per-subcommand help, agents must read external documentation. Dry-run mode helps diagnose "why no patterns found?" issues by showing what would be scanned. |
|
|
555
558
|
|
|
556
559
|
### Data API Context Assembly
|
|
557
560
|
|
|
558
561
|
| Rule | Invariant | Rationale |
|
|
559
562
|
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
560
|
-
| Context command assembles curated context for a single pattern | Given a pattern name, `context` returns everything needed to start working on that pattern: metadata, file locations, dependency status, and architecture position -- in ~1.5KB of structured text. | This is the core value proposition. The command crosses five gaps simultaneously: it assembles data from multiple
|
|
563
|
+
| Context command assembles curated context for a single pattern | Given a pattern name, `context` returns everything needed to start working on that pattern: metadata, file locations, dependency status, and architecture position -- in ~1.5KB of structured text. | This is the core value proposition. The command crosses five gaps simultaneously: it assembles data from multiple PatternGraph indexes, shapes it compactly, resolves file paths from pattern names, discovers stubs by convention, and tailors output by session type. |
|
|
561
564
|
| Files command returns only file paths organized by relevance | `files` returns the most token-efficient output possible -- just file paths that Claude Code can read directly. | Most context tokens are spent reading actual files, not metadata. The `files` command tells Claude Code _which_ files to read, organized by importance. Claude Code then reads what it needs. This is more efficient than `context` when the agent already knows the pattern and just needs the file list. |
|
|
562
565
|
| Dep-tree command shows recursive dependency chain with status | The dependency tree walks both `dependsOn`/`enables` (planning) and `uses`/`usedBy` (implementation) relationships with configurable depth. | Before starting work on a pattern, agents need to know the full dependency chain: what must be complete first, what this unblocks, and where the current pattern sits in the sequence. A tree visualization with status markers makes blocking relationships immediately visible. |
|
|
563
566
|
| Context command supports multiple patterns with merged output | Multi-pattern context deduplicates shared dependencies and highlights overlap between patterns. | Design sessions often span multiple related patterns (e.g., reviewing DS-2 through DS-5 together). Separate `context` calls would duplicate shared dependencies. Merged context shows the union of all dependencies with overlap analysis. |
|
|
@@ -584,19 +587,19 @@ ArchIndexSchema = z.object({
|
|
|
584
587
|
|
|
585
588
|
| Rule | Invariant | Rationale |
|
|
586
589
|
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
587
|
-
|
|
|
590
|
+
| PatternGraphAPI is accessible as an MCP server for Claude Code | The MCP server exposes all PatternGraphAPI methods as MCP tools with typed input/output schemas. The pipeline is loaded once on server start and refreshed on source file changes. | MCP is Claude Code's native tool integration protocol. An MCP server eliminates the CLI subprocess overhead (2-5s per query) and enables Claude Code to call process queries as naturally as it calls other tools. Stateful operation means the pipeline loads once and serves many queries. |
|
|
588
591
|
| Process state can be auto-generated as CLAUDE.md context sections | Generated CLAUDE.md sections are additive layers that provide pattern metadata, relationships, and reading lists for specific scopes. | CLAUDE.md is the primary mechanism for providing persistent context to Claude Code sessions. Auto-generating CLAUDE.md sections from process state ensures the context is always fresh and consistent with the source annotations. This applies the "code-first documentation" principle to AI context itself. |
|
|
589
592
|
| Cross-package views show dependencies spanning multiple packages | Cross-package queries aggregate patterns from multiple input sources and resolve cross-package relationships. | In the monorepo, patterns in `platform-core` are used by patterns in `platform-bc`, which are used by the example app. Understanding these cross-package dependencies is essential for release planning and impact analysis. Currently each package must be queried independently with separate input globs. |
|
|
590
593
|
| Process validation integrates with git hooks and file watching | Pre-commit hooks validate annotation consistency. Watch mode re-generates docs on source changes. | Git hooks catch annotation errors at commit time (e.g., new `uses` reference to non-existent pattern, invalid `arch-role` value, stub `@target` to non-existent directory). Watch mode enables live documentation regeneration during implementation sessions. |
|
|
591
594
|
|
|
592
595
|
### Data API Relationship Graph
|
|
593
596
|
|
|
594
|
-
| Rule | Invariant | Rationale
|
|
595
|
-
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
596
|
-
| Graph command traverses relationships recursively with configurable depth | Graph traversal walks both planning relationships (`dependsOn`, `enables`) and implementation relationships (`uses`, `usedBy`) with cycle detection to prevent infinite loops. | Flat lookups show direct connections. Recursive traversal shows the full picture: transitive dependencies, indirect consumers, and the complete chain from root to leaf. Depth limiting prevents overwhelming output on deeply connected graphs.
|
|
597
|
-
| Impact analysis shows transitive dependents of a pattern | Impact analysis answers "if I change X, what else is affected?" by walking `usedBy` + `enables` recursively. | Before modifying a completed pattern (which requires unlock), understanding the blast radius prevents unintended breakage. Impact analysis is the reverse of dependency traversal -- it looks forward, not backward.
|
|
598
|
-
| Path finding discovers relationship chains between two patterns | Path finding returns the shortest chain of relationships connecting two patterns, or indicates no path exists. Traversal considers all relationship types (uses, usedBy, dependsOn, enables). | Understanding how two seemingly unrelated patterns connect helps agents assess indirect dependencies before making changes. When pattern A and pattern D are connected through B and C, modifying A requires understanding that chain.
|
|
599
|
-
| Graph health commands detect broken references and isolated patterns | Dangling references (pattern names in `uses`/`dependsOn` that don't match any pattern definition) are detectable. Orphan patterns (no relationships at all) are identifiable. | The
|
|
597
|
+
| Rule | Invariant | Rationale |
|
|
598
|
+
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
599
|
+
| Graph command traverses relationships recursively with configurable depth | Graph traversal walks both planning relationships (`dependsOn`, `enables`) and implementation relationships (`uses`, `usedBy`) with cycle detection to prevent infinite loops. | Flat lookups show direct connections. Recursive traversal shows the full picture: transitive dependencies, indirect consumers, and the complete chain from root to leaf. Depth limiting prevents overwhelming output on deeply connected graphs. |
|
|
600
|
+
| Impact analysis shows transitive dependents of a pattern | Impact analysis answers "if I change X, what else is affected?" by walking `usedBy` + `enables` recursively. | Before modifying a completed pattern (which requires unlock), understanding the blast radius prevents unintended breakage. Impact analysis is the reverse of dependency traversal -- it looks forward, not backward. |
|
|
601
|
+
| Path finding discovers relationship chains between two patterns | Path finding returns the shortest chain of relationships connecting two patterns, or indicates no path exists. Traversal considers all relationship types (uses, usedBy, dependsOn, enables). | Understanding how two seemingly unrelated patterns connect helps agents assess indirect dependencies before making changes. When pattern A and pattern D are connected through B and C, modifying A requires understanding that chain. |
|
|
602
|
+
| Graph health commands detect broken references and isolated patterns | Dangling references (pattern names in `uses`/`dependsOn` that don't match any pattern definition) are detectable. Orphan patterns (no relationships at all) are identifiable. | The PatternGraph transformer already computes dangling references during Pass 3 (relationship resolution) but does not expose them via the API. Orphan patterns indicate missing annotations. Both are data quality signals that improve over time with attention. |
|
|
600
603
|
|
|
601
604
|
### Data API Stub Integration
|
|
602
605
|
|
|
@@ -644,25 +647,26 @@ ArchIndexSchema = z.object({
|
|
|
644
647
|
|
|
645
648
|
### Lint Process Cli
|
|
646
649
|
|
|
647
|
-
| Rule | Invariant
|
|
648
|
-
| ------------------------------------------ |
|
|
649
|
-
| CLI displays help and version information | The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments.
|
|
650
|
-
| CLI requires git repository for validation | The lint-process CLI must fail with a clear error when run outside a git repository in both staged and all modes.
|
|
651
|
-
| CLI validates file mode input | In file mode, the CLI must require at least one file path via positional argument or --file flag, and fail with a clear error when none is provided.
|
|
652
|
-
| CLI handles no changes gracefully | When no relevant changes are detected (empty diff), the CLI must exit successfully with a zero exit code.
|
|
653
|
-
| CLI supports multiple output formats | The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default.
|
|
654
|
-
| CLI supports debug options | The --show-state flag must display the derived process state (FSM states, protection levels, deliverables) without affecting validation behavior.
|
|
655
|
-
| CLI warns about unknown flags | Unrecognized CLI flags must produce a warning message but allow execution to continue.
|
|
650
|
+
| Rule | Invariant | Rationale |
|
|
651
|
+
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
652
|
+
| CLI displays help and version information | The --help/-h and --version/-v flags must produce usage/version output and exit successfully without requiring other arguments. | Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. |
|
|
653
|
+
| CLI requires git repository for validation | The lint-process CLI must fail with a clear error when run outside a git repository in both staged and all modes. | Process guard validation depends on git diff for change detection — running without git produces undefined behavior rather than useful validation results. |
|
|
654
|
+
| CLI validates file mode input | In file mode, the CLI must require at least one file path via positional argument or --file flag, and fail with a clear error when none is provided. | File mode is for targeted validation of specific files — accepting zero files would silently produce a "no violations" result that falsely implies the files are valid. |
|
|
655
|
+
| CLI handles no changes gracefully | When no relevant changes are detected (empty diff), the CLI must exit successfully with a zero exit code. | No changes means no violations are possible — failing on empty diffs would break CI pipelines on commits that only modify non-spec files. |
|
|
656
|
+
| CLI supports multiple output formats | The CLI must support JSON and pretty (human-readable) output formats, with pretty as the default. | Pretty format serves interactive pre-commit use while JSON format enables CI/CD pipeline integration and automated violation processing. |
|
|
657
|
+
| CLI supports debug options | The --show-state flag must display the derived process state (FSM states, protection levels, deliverables) without affecting validation behavior. | Process guard decisions are derived from complex state — exposing the intermediate state helps developers understand why a specific validation passed or failed. |
|
|
658
|
+
| CLI warns about unknown flags | Unrecognized CLI flags must produce a warning message but allow execution to continue. | Process validation is critical-path at commit time — hard-failing on a typo in an optional flag would block commits unnecessarily when the core validation would succeed. |
|
|
659
|
+
| CLI honors config-defined feature scope | Process guard must derive state and diff transitions from the configured feature globs, including `tests/features/**/*.feature`, while ignoring non-feature files that only contain annotation-like text. | Rebrand cleanup imports completed artifacts under multiple feature roots — using hardcoded feature locations misses valid unlock reasons and creates false positives from docs or helper files. |
|
|
656
660
|
|
|
657
661
|
### MCP Server Integration
|
|
658
662
|
|
|
659
|
-
| Rule | Invariant
|
|
660
|
-
| ----------------------------------------------------------------------- |
|
|
661
|
-
| MCP server starts via stdio transport and manages its own lifecycle | The MCP server communicates over stdio using JSON-RPC. It builds the pipeline once during initialization, then enters a request-response loop. No non-MCP output is written to stdout (no console.log, no pnpm banners).
|
|
662
|
-
|
|
|
663
|
-
|
|
|
664
|
-
| Source file changes trigger automatic dataset rebuild with debouncing | When --watch is enabled, changes to source files trigger an automatic pipeline rebuild. Multiple rapid changes are debounced into a single rebuild (default 500ms window).
|
|
665
|
-
| MCP server is configurable via standard client configuration | The server works with .mcp.json (Claude Code), claude_desktop_config.json (Claude Desktop), and any MCP client. It accepts --input, --features, --base-dir args, auto-detects architect.config.ts, and reports the package version accurately through the CLI.
|
|
663
|
+
| Rule | Invariant | Rationale |
|
|
664
|
+
| ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
665
|
+
| MCP server starts via stdio transport and manages its own lifecycle | The MCP server communicates over stdio using JSON-RPC. It builds the pipeline once during initialization, then enters a request-response loop. No non-MCP output is written to stdout (no console.log, no pnpm banners). | MCP defines stdio as the standard transport for local tool servers. Claude Code spawns the process and communicates over stdin/stdout pipes. Any extraneous stdout output corrupts the JSON-RPC stream. Loading the pipeline during initialization ensures the first tool call is fast. |
|
|
666
|
+
| PatternGraphAPI methods and CLI subcommands are registered as MCP tools | Every CLI subcommand is registered as an MCP tool with a JSON Schema describing its input parameters. Tool names use snake*case with a "architect*" prefix to avoid collisions with other MCP servers. | MCP tools are the unit of interaction. Each tool needs a name, description (for LLM tool selection), and JSON Schema for input validation. The "architect\_" prefix prevents collisions in multi-server setups. |
|
|
667
|
+
| PatternGraph is loaded once and reused across all tool invocations | The pipeline runs exactly once during server initialization. All subsequent tool calls read from in-memory PatternGraph. A manual rebuild can be triggered via a "architect_rebuild" tool, and overlapping rebuild requests coalesce so the final in-memory session reflects the newest completed build. | The pipeline costs 2-5 seconds. Running it per tool call negates MCP benefits. Pre-computed views provide O(1) access ideal for a query server. |
|
|
668
|
+
| Source file changes trigger automatic dataset rebuild with debouncing | When --watch is enabled, changes to source files trigger an automatic pipeline rebuild. Multiple rapid changes are debounced into a single rebuild (default 500ms window). | During implementation sessions, source files change frequently. Without auto-rebuild, agents must manually call architect_rebuild. Debouncing prevents redundant rebuilds during rapid-fire saves. |
|
|
669
|
+
| MCP server is configurable via standard client configuration | The server works with .mcp.json (Claude Code), claude_desktop_config.json (Claude Desktop), and any MCP client. It accepts --input, --features, --base-dir args, auto-detects architect.config.ts, and reports the package version accurately through the CLI. | MCP clients discover servers through configuration files. The server must work with sensible defaults (config auto-detection) while supporting explicit overrides for monorepo setups. |
|
|
666
670
|
|
|
667
671
|
### Output Pipeline Tests
|
|
668
672
|
|
|
@@ -673,72 +677,74 @@ ArchIndexSchema = z.object({
|
|
|
673
677
|
| List filters compose via AND logic | Multiple list filters (status, category) must compose via AND logic, with pagination (limit/offset) applied after filtering and empty results for out-of-range offsets. | AND composition is the intuitive default for filters — "status=active AND category=core" should narrow results, not widen them via OR logic. |
|
|
674
678
|
| Empty stripping removes noise | Null and empty values must be stripped from output objects to reduce noise in API responses. | Empty fields in pattern summaries create visual clutter and waste tokens in AI context windows — stripping them keeps output focused on meaningful data. |
|
|
675
679
|
|
|
676
|
-
### Pattern
|
|
680
|
+
### Pattern Graph API CLI
|
|
677
681
|
|
|
678
|
-
| Rule
|
|
679
|
-
|
|
|
680
|
-
|
|
|
681
|
-
|
|
|
682
|
-
|
|
|
683
|
-
|
|
|
682
|
+
| Rule | Invariant | Rationale |
|
|
683
|
+
| ----------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
684
|
+
| CLI supports status-based pattern queries | Every PatternGraphAPI status query method is accessible via CLI. | The most common planning question is "what's the current state?" Status queries (active, roadmap, completed) answer this directly without reading docs. Without CLI access, Claude Code must regenerate markdown and parse unstructured text. |
|
|
685
|
+
| CLI supports phase-based queries | Patterns can be filtered by phase number. | Phase 18 (Event Durability) is the current focus per roadmap priorities. Quick phase queries help assess progress and remaining work within a phase. Phase-based planning is the primary organization method for roadmap work. |
|
|
686
|
+
| CLI provides progress summary queries | Overall and per-phase progress is queryable in a single command. | Planning sessions need quick answers to "where are we?" without reading the full PATTERNS.md generated file. Progress metrics drive prioritization and help identify where to focus effort. |
|
|
687
|
+
| CLI supports multiple output formats | JSON output is parseable by AI agents without transformation. | Claude Code can parse JSON directly. Text format is for human reading. JSON format enables scripting and integration with other tools. The primary use case is AI agent parsing where structured output reduces context and errors. |
|
|
688
|
+
| CLI supports individual pattern lookup | Any pattern can be queried by name with full details. | During implementation, Claude Code needs to check specific pattern status, deliverables, and dependencies without reading the full spec file. Pattern lookup is essential for focused implementation work. |
|
|
689
|
+
| CLI provides discoverable help | All flags are documented via --help with examples. | Claude Code can read --help output to understand available queries without needing external documentation. Self-documenting CLIs reduce the need for Claude Code to read additional context files. |
|
|
684
690
|
|
|
685
|
-
### Pattern
|
|
691
|
+
### Pattern Graph API Relationship Queries
|
|
686
692
|
|
|
687
|
-
| Rule
|
|
688
|
-
|
|
|
689
|
-
|
|
|
690
|
-
|
|
|
693
|
+
| Rule | Invariant | Rationale |
|
|
694
|
+
| ------------------------------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
695
|
+
| API provides implementation relationship queries | Every pattern with `implementedBy` entries is discoverable via the API. | Claude Code needs to navigate from abstract patterns to concrete code. Without this, exploration requires manual grep + file reading, wasting context tokens. |
|
|
696
|
+
| API provides inheritance hierarchy queries | Pattern inheritance chains are fully navigable in both directions. | Patterns form specialization hierarchies (e.g., ReactiveProjections extends ProjectionCategories). Claude Code needs to understand what specializes a base pattern and what a specialized pattern inherits from. |
|
|
697
|
+
| API provides combined relationship views | All relationship types are accessible through a unified interface. | Claude Code often needs the complete picture: dependencies AND implementations AND inheritance. A single call reduces round-trips and context switching. |
|
|
698
|
+
| API supports bidirectional traceability queries | Navigation from spec to code and code to spec is symmetric. | Traceability is bidirectional by definition. If a spec links to code, the code should link back to the spec. The API should surface broken links. |
|
|
691
699
|
|
|
692
|
-
###
|
|
700
|
+
### Pattern Graph API Testing
|
|
693
701
|
|
|
694
|
-
| Rule
|
|
695
|
-
|
|
|
696
|
-
|
|
|
697
|
-
|
|
|
698
|
-
|
|
|
699
|
-
|
|
|
700
|
-
|
|
|
701
|
-
| DD-6 - Both positional and flag forms for scope type | scope-validate must accept scope type as both a positional argument and a --type flag. | Supporting only one form creates inconsistency with CLI conventions and forces users to remember which form each subcommand uses. |
|
|
702
|
-
| DD-7 - Co-located formatter functions | Each module must export both its data builder and text formatter as co-located functions. | Splitting builder and formatter across files increases coupling surface and makes it harder to trace data flow through the module. |
|
|
702
|
+
| Rule | Invariant | Rationale |
|
|
703
|
+
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
704
|
+
| Status queries return correct patterns | Status queries must correctly filter by both normalized status (planned = roadmap + deferred) and FSM status (exact match). | The two-domain status convention requires separate query methods — mixing them produces incorrect filtered results. |
|
|
705
|
+
| Phase queries return correct phase data | Phase queries must return only patterns in the requested phase, with accurate progress counts and completion percentage. | Phase-level queries power the roadmap and session planning views — incorrect counts cascade into wrong progress percentages. |
|
|
706
|
+
| FSM queries expose transition validation | FSM queries must validate transitions against the PDR-005 state machine and expose protection levels per status. | Programmatic FSM access enables tooling to enforce delivery process rules without reimplementing the state machine. |
|
|
707
|
+
| Pattern queries find and retrieve pattern data | Pattern lookup must be case-insensitive by name, and category queries must return only patterns with the requested category. | Case-insensitive search reduces friction in CLI and AI agent usage where exact casing is often unknown. |
|
|
708
|
+
| Timeline queries group patterns by time | Quarter queries must correctly filter by quarter string, and recently completed must be sorted by date descending with limit. | Timeline grouping enables quarterly reporting and session context — recent completions show delivery momentum. |
|
|
703
709
|
|
|
704
|
-
###
|
|
710
|
+
### Pattern Graph Cli Cache
|
|
705
711
|
|
|
706
|
-
| Rule
|
|
707
|
-
|
|
|
708
|
-
|
|
|
712
|
+
| Rule | Invariant | Rationale |
|
|
713
|
+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
714
|
+
| PatternGraph is cached between invocations | When source files have not changed between CLI invocations, the second invocation must use the cached PatternGraph and report cache.hit as true alongside pipeline timing metadata. | The pipeline rebuild costs 2-5 seconds per invocation. Caching eliminates this cost for repeated queries against unchanged sources, which is the common case during interactive AI sessions. |
|
|
709
715
|
|
|
710
|
-
###
|
|
716
|
+
### Pattern Graph Cli Core
|
|
711
717
|
|
|
712
718
|
| Rule | Invariant | Rationale |
|
|
713
719
|
| ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
714
720
|
| CLI displays help and version information | The CLI must always provide discoverable usage and version information via standard flags. | Without accessible help and version output, users cannot self-serve CLI usage or report issues with a specific version. |
|
|
715
721
|
| CLI requires input flag for subcommands | Every data-querying subcommand must receive either an explicit `--input` glob or a project config that provides source globs. | Without an input source, the pipeline has no files to scan and would produce empty or misleading results instead of a clear error, but project config auto-detection should remove that boilerplate when the repo is configured. |
|
|
716
|
-
| CLI status subcommand shows delivery state | The status subcommand must return structured JSON containing delivery progress derived from the
|
|
722
|
+
| CLI status subcommand shows delivery state | The status subcommand must return structured JSON containing delivery progress derived from the PatternGraph. | Consumers depend on machine-readable status output for scripting and CI integration; unstructured output breaks downstream automation. |
|
|
717
723
|
| CLI query subcommand executes API methods | The query subcommand must dispatch to any public Data API method by name and pass positional arguments through. | The CLI is the primary interface for ad-hoc queries; failing to resolve a valid method name or its arguments silently drops the user's request. |
|
|
718
724
|
| CLI pattern subcommand shows pattern detail | The pattern subcommand must return the full JSON detail for an exact pattern name match, or a clear error if not found. | Pattern lookup is the primary debugging tool for annotation issues; ambiguous or silent failures waste investigation time. |
|
|
719
|
-
| CLI arch subcommand queries architecture | The arch subcommand must expose role, bounded context, and layer queries over the
|
|
725
|
+
| CLI arch subcommand queries architecture | The arch subcommand must expose role, bounded context, and layer queries over the PatternGraph's architecture metadata. | Architecture queries replace manual exploration of annotated sources; missing or incorrect results lead to wrong structural assumptions during design sessions. |
|
|
720
726
|
| CLI shows errors for missing subcommand arguments | Subcommands that require arguments must reject invocations with missing arguments and display usage guidance. | Silent acceptance of incomplete input would produce confusing pipeline errors instead of actionable feedback at the CLI boundary. |
|
|
721
727
|
| CLI handles argument edge cases | The CLI must gracefully handle non-standard argument forms including numeric coercion and the `--` pnpm separator. | Real-world invocations via pnpm pass `--` separators and numeric strings; mishandling these causes silent data loss or crashes in automated workflows. |
|
|
722
728
|
|
|
723
|
-
###
|
|
729
|
+
### Pattern Graph Cli Dry Run
|
|
724
730
|
|
|
725
731
|
| Rule | Invariant | Rationale |
|
|
726
732
|
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
727
733
|
| Dry-run shows pipeline scope without processing | The --dry-run flag must display file counts, config status, and cache status without executing the pipeline. Output must contain the DRY RUN marker and must not contain a JSON success envelope. | Dry-run enables users to verify their input patterns resolve to expected files before committing to the 2-5s pipeline cost, which is especially valuable when debugging glob patterns or config auto-detection. |
|
|
728
734
|
|
|
729
|
-
###
|
|
735
|
+
### Pattern Graph Cli Help
|
|
730
736
|
|
|
731
737
|
| Rule | Invariant | Rationale |
|
|
732
738
|
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
733
739
|
| Per-subcommand help shows usage and flags | Running any subcommand with --help must display usage information specific to that subcommand, including applicable flags and examples. Unknown subcommands must fall back to a descriptive message. | Per-subcommand help replaces the need to scroll through full --help output and provides contextual guidance for subcommand-specific flags like --session. |
|
|
734
740
|
|
|
735
|
-
###
|
|
741
|
+
### Pattern Graph Cli Metadata
|
|
736
742
|
|
|
737
743
|
| Rule | Invariant | Rationale |
|
|
738
744
|
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
739
745
|
| Response metadata includes validation summary | Every JSON response envelope must include a metadata.validation object with danglingReferenceCount, malformedPatternCount, unknownStatusCount, and warningCount fields, plus a numeric pipelineMs timing. | Consumers use validation counts to detect annotation quality degradation without running a separate validation pass. Pipeline timing enables performance regression detection in CI. |
|
|
740
746
|
|
|
741
|
-
###
|
|
747
|
+
### Pattern Graph Cli Modifiers And Rules
|
|
742
748
|
|
|
743
749
|
| Rule | Invariant | Rationale |
|
|
744
750
|
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -746,14 +752,22 @@ ArchIndexSchema = z.object({
|
|
|
746
752
|
| CLI arch health subcommands detect graph quality issues | Health subcommands (dangling, orphans, blocking) operate on the relationship index, not the architecture index, and return results without requiring arch annotations. | Graph quality issues (broken references, isolated patterns, blocked dependencies) are relationship-level concerns that should be queryable even when no architecture metadata exists. |
|
|
747
753
|
| CLI rules subcommand queries business rules and invariants | The rules subcommand returns structured business rules extracted from Gherkin Rule: blocks, grouped by product area and phase, with parsed invariant and rationale annotations. | Live business rule queries replace static generated markdown, enabling on-demand filtering by product area, pattern, and invariant presence. |
|
|
748
754
|
|
|
749
|
-
###
|
|
755
|
+
### Pattern Graph Cli Reference Tests
|
|
756
|
+
|
|
757
|
+
| Rule | Invariant | Rationale |
|
|
758
|
+
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
|
759
|
+
| Generated reference file contains all three table sections | CLI-REFERENCE.md contains Global Options, Output Modifiers, and List Filters tables generated from the CLI schema. | |
|
|
760
|
+
| CLI schema stays in sync with parser | Every flag recognized by parseArgs() has a corresponding entry in the CLI schema. A missing schema entry means the sync test fails. | |
|
|
761
|
+
| showHelp output reflects CLI schema | The help text rendered by showHelp() includes all options from the CLI schema, formatted for terminal display. | |
|
|
762
|
+
|
|
763
|
+
### Pattern Graph Cli Repl
|
|
750
764
|
|
|
751
765
|
| Rule | Invariant | Rationale |
|
|
752
766
|
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
753
767
|
| REPL mode accepts multiple queries on a single pipeline load | REPL mode loads the pipeline once and accepts multiple queries on stdin, eliminating per-query pipeline overhead. | Design sessions involve 10-20 exploratory queries in sequence. REPL mode eliminates per-query pipeline overhead entirely. |
|
|
754
768
|
| REPL reload rebuilds the pipeline from fresh sources | The reload command rebuilds the pipeline from fresh sources and subsequent queries use the new dataset. | During implementation sessions, source files change frequently. Reload allows refreshing without restarting the REPL. |
|
|
755
769
|
|
|
756
|
-
###
|
|
770
|
+
### Pattern Graph Cli Subcommands
|
|
757
771
|
|
|
758
772
|
| Rule | Invariant | Rationale |
|
|
759
773
|
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
@@ -764,53 +778,43 @@ ArchIndexSchema = z.object({
|
|
|
764
778
|
| CLI extended arch subcommands query architecture relationships | Extended arch subcommands (neighborhood, compare, coverage) must return valid JSON reflecting the actual architecture relationships present in the scanned sources. | Architecture queries drive design-session decisions; stale or structurally invalid output leads to incorrect dependency analysis and missed coupling between bounded contexts. |
|
|
765
779
|
| CLI unannotated subcommand finds files without annotations | The unannotated subcommand must return valid JSON listing every TypeScript file that lacks the `@architect` opt-in marker. | Files missing the opt-in marker are invisible to the scanner; without this subcommand, unannotated files silently drop out of generated documentation and validation. |
|
|
766
780
|
|
|
767
|
-
###
|
|
781
|
+
### Pattern Graph Layered Extraction
|
|
768
782
|
|
|
769
|
-
| Rule | Invariant
|
|
770
|
-
| ----------------------------------------------------------------- |
|
|
771
|
-
| CLI file contains only routing, no domain logic | `
|
|
772
|
-
| Pipeline factory is shared across CLI consumers | The scan-extract-transform sequence is defined once in `src/generators/pipeline/build-pipeline.ts`. CLI consumers that need a
|
|
773
|
-
| Domain logic lives in API modules | Query logic that operates on
|
|
774
|
-
| Pipeline factory returns Result for consumer-owned error handling | The factory returns `Result<PipelineResult, PipelineError>` rather than throwing or calling `process.exit()`. Each consumer maps the error to its own strategy:
|
|
775
|
-
| End-to-end verification confirms behavioral equivalence | After extraction, all CLI commands produce identical output to pre-refactor behavior with zero build, test, lint, and validation errors.
|
|
783
|
+
| Rule | Invariant | Rationale |
|
|
784
|
+
| ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
785
|
+
| CLI file contains only routing, no domain logic | `pattern-graph-cli.ts` parses arguments, calls the pipeline factory for the PatternGraph, routes subcommands to API modules, and formats output. It does not build Maps, filter patterns, group data, or resolve relationships. Thin view projections (3-5 line `.map()` calls over pre-computed archIndex views) are acceptable as formatting. | Domain logic in the CLI file is only accessible via the command line. Extracting it to `src/api/` makes it programmatically testable, reusable by future consumers (MCP server, watch mode), and aligned with the feature-consumption layer defined in ADR-006. |
|
|
786
|
+
| Pipeline factory is shared across CLI consumers | The scan-extract-transform sequence is defined once in `src/generators/pipeline/build-pipeline.ts`. CLI consumers that need a PatternGraph call the factory rather than wiring the pipeline independently. The factory accepts `mergeConflictStrategy` to handle behavioral differences between consumers. | Three consumers (pattern-graph-cli, validate-patterns, orchestrator) independently wire the same 8-step sequence: loadConfig, scanPatterns, extractPatterns, scanGherkinFiles, extractPatternsFromGherkin, mergePatterns, computeHierarchyChildren, transformToPatternGraph. The only semantic difference is merge-conflict handling (fatal vs concatenate). This is a Parallel Pipeline anti-pattern per ADR-006. |
|
|
787
|
+
| Domain logic lives in API modules | Query logic that operates on PatternGraph lives in `src/api/` modules. The `rules-query.ts` module provides business rules querying with the same grouping logic that was inline in handleRules: filter by product area and pattern, group by area -> phase -> feature -> rules, parse annotations, compute totals. | `handleRules` is 184 lines with 5 Map/Set constructions, codec-layer imports (`parseBusinessRuleAnnotations`, `deduplicateScenarioNames`), and a complex 3-level grouping algorithm. This is the last significant inline domain logic in pattern-graph-cli.ts. Moving it to `src/api/` follows the same pattern as the 12 existing API modules (context-assembler, arch-queries, scope-validator, etc.). |
|
|
788
|
+
| Pipeline factory returns Result for consumer-owned error handling | The factory returns `Result<PipelineResult, PipelineError>` rather than throwing or calling `process.exit()`. Each consumer maps the error to its own strategy: pattern-graph-cli.ts calls `process.exit(1)`, validate-patterns.ts throws, and orchestrator.ts (future) returns `Result.err()`. | The current `buildPipeline()` in pattern-graph-cli.ts calls `process.exit(1)` on errors, making it non-reusable. The factory must work across consumers with different error handling models. The Result monad is the project's established pattern for this (see `src/types/result.ts`). |
|
|
789
|
+
| End-to-end verification confirms behavioral equivalence | After extraction, all CLI commands produce identical output to pre-refactor behavior with zero build, test, lint, and validation errors. | The refactor must not change observable behavior. Full CLI verification confirms the extraction is a pure refactor. |
|
|
776
790
|
|
|
777
|
-
###
|
|
778
|
-
|
|
779
|
-
| Rule | Invariant | Rationale |
|
|
780
|
-
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------- |
|
|
781
|
-
| Generated reference file contains all three table sections | PROCESS-API-REFERENCE.md contains Global Options, Output Modifiers, and List Filters tables generated from the CLI schema. | |
|
|
782
|
-
| CLI schema stays in sync with parser | Every flag recognized by parseArgs() has a corresponding entry in the CLI schema. A missing schema entry means the sync test fails. | |
|
|
783
|
-
| showHelp output reflects CLI schema | The help text rendered by showHelp() includes all options from the CLI schema, formatted for terminal display. | |
|
|
784
|
-
|
|
785
|
-
### Process State API CLI
|
|
791
|
+
### Pattern Helpers Tests
|
|
786
792
|
|
|
787
|
-
| Rule
|
|
788
|
-
|
|
|
789
|
-
|
|
|
790
|
-
|
|
|
791
|
-
|
|
|
792
|
-
|
|
|
793
|
-
| CLI supports individual pattern lookup | Any pattern can be queried by name with full details. | During implementation, Claude Code needs to check specific pattern status, deliverables, and dependencies without reading the full spec file. Pattern lookup is essential for focused implementation work. |
|
|
794
|
-
| CLI provides discoverable help | All flags are documented via --help with examples. | Claude Code can read --help output to understand available queries without needing external documentation. Self-documenting CLIs reduce the need for Claude Code to read additional context files. |
|
|
793
|
+
| Rule | Invariant | Rationale |
|
|
794
|
+
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
795
|
+
| getPatternName uses patternName tag when available | getPatternName must return the patternName tag value when set, falling back to the pattern's name field when the tag is absent. | The patternName tag allows human-friendly display names — without the fallback, patterns missing the tag would display as undefined. |
|
|
796
|
+
| findPatternByName performs case-insensitive matching | findPatternByName must match pattern names case-insensitively, returning undefined when no match exists. | Case-insensitive matching prevents frustrating "not found" errors when developers type "processguard" instead of "ProcessGuard" — both clearly refer to the same pattern. |
|
|
797
|
+
| getRelationships looks up with case-insensitive fallback | getRelationships must first try exact key lookup in the relationship index, then fall back to case-insensitive matching, returning undefined when no match exists. | Exact-first with case-insensitive fallback balances performance (O(1) exact lookup) with usability (tolerates case mismatches in cross-references). |
|
|
798
|
+
| suggestPattern provides fuzzy suggestions | suggestPattern must return fuzzy match suggestions for close pattern names, returning empty results when no close match exists. | Fuzzy suggestions power "did you mean?" UX in the CLI — without them, typos produce unhelpful "pattern not found" messages. |
|
|
795
799
|
|
|
796
|
-
###
|
|
800
|
+
### Pattern Summarize Tests
|
|
797
801
|
|
|
798
|
-
| Rule
|
|
799
|
-
|
|
|
800
|
-
|
|
|
801
|
-
|
|
|
802
|
-
| API provides combined relationship views | All relationship types are accessible through a unified interface. | Claude Code often needs the complete picture: dependencies AND implementations AND inheritance. A single call reduces round-trips and context switching. |
|
|
803
|
-
| API supports bidirectional traceability queries | Navigation from spec to code and code to spec is symmetric. | Traceability is bidirectional by definition. If a spec links to code, the code should link back to the spec. The API should surface broken links. |
|
|
802
|
+
| Rule | Invariant | Rationale |
|
|
803
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
804
|
+
| summarizePattern projects to compact summary | summarizePattern must project a full pattern object to a compact summary containing exactly 6 fields, using the patternName tag over the name field when available and omitting undefined optional fields. | Compact summaries reduce token usage by 80-90% compared to full patterns — they provide enough context for navigation without overwhelming AI context windows. |
|
|
805
|
+
| summarizePatterns batch processes arrays | summarizePatterns must batch-process an array of patterns, returning a correctly-sized array of compact summaries. | Batch processing avoids N individual function calls — the API frequently needs to summarize all patterns matching a query in a single operation. |
|
|
804
806
|
|
|
805
|
-
###
|
|
807
|
+
### PDR 001 Session Workflow Commands
|
|
806
808
|
|
|
807
|
-
| Rule
|
|
808
|
-
|
|
|
809
|
-
|
|
|
810
|
-
|
|
|
811
|
-
|
|
|
812
|
-
|
|
|
813
|
-
|
|
|
809
|
+
| Rule | Invariant | Rationale |
|
|
810
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
811
|
+
| DD-1 - Text output with section markers | scope-validate and handoff must return plain text with === SECTION === markers, never JSON. | Inconsistent output formats force consumers to detect and branch on format type, breaking the dual output path contract. |
|
|
812
|
+
| DD-2 - Git integration is opt-in via --git flag | Domain logic must never invoke shell commands or depend on git directly. | Shell dependencies in domain logic make functions untestable without git fixtures and break deterministic behavior. |
|
|
813
|
+
| DD-3 - Session type inferred from FSM status | Every FSM status must map to exactly one default session type, overridable by an explicit --session flag. | Ambiguous or missing inference forces users to always specify --session manually, defeating the ergonomic benefit of status-based defaults. |
|
|
814
|
+
| DD-4 - Severity levels match Process Guard model | Scope validation must use exactly three severity levels (PASS, BLOCKED, WARN) consistent with Process Guard. | Divergent severity models cause confusion when the same violation appears in both systems with different severity classifications. |
|
|
815
|
+
| DD-5 - Current date only for handoff | Handoff must always use the current system date with no override mechanism. | A --date flag enables backdating handoff timestamps, which breaks audit trail integrity for multi-session work. |
|
|
816
|
+
| DD-6 - Both positional and flag forms for scope type | scope-validate must accept scope type as both a positional argument and a --type flag. | Supporting only one form creates inconsistency with CLI conventions and forces users to remember which form each subcommand uses. |
|
|
817
|
+
| DD-7 - Co-located formatter functions | Each module must export both its data builder and text formatter as co-located functions. | Splitting builder and formatter across files increases coupling surface and makes it harder to trace data flow through the module. |
|
|
814
818
|
|
|
815
819
|
### Scope Validator Tests
|
|
816
820
|
|