@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.
Files changed (760) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +5 -5
  3. package/dist/api/arch-queries.d.ts.map +1 -1
  4. package/dist/api/context-assembler.d.ts.map +1 -1
  5. package/dist/api/handoff-generator.d.ts.map +1 -1
  6. package/dist/api/index.d.ts +8 -8
  7. package/dist/api/index.d.ts.map +1 -1
  8. package/dist/api/index.js +7 -7
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/api/{process-state.d.ts → pattern-graph-api.d.ts} +15 -15
  11. package/dist/api/pattern-graph-api.d.ts.map +1 -0
  12. package/dist/api/{process-state.js → pattern-graph-api.js} +13 -13
  13. package/dist/api/pattern-graph-api.js.map +1 -0
  14. package/dist/api/rules-query.d.ts +6 -6
  15. package/dist/api/rules-query.d.ts.map +1 -1
  16. package/dist/api/rules-query.js +4 -4
  17. package/dist/api/rules-query.js.map +1 -1
  18. package/dist/api/scope-validator.d.ts.map +1 -1
  19. package/dist/api/types.d.ts +8 -8
  20. package/dist/api/types.d.ts.map +1 -1
  21. package/dist/api/types.js +5 -5
  22. package/dist/cli/cli-schema.d.ts +3 -4
  23. package/dist/cli/cli-schema.d.ts.map +1 -1
  24. package/dist/cli/cli-schema.js +13 -14
  25. package/dist/cli/cli-schema.js.map +1 -1
  26. package/dist/cli/output-pipeline.d.ts.map +1 -1
  27. package/dist/cli/pattern-graph-cli.d.ts.map +1 -0
  28. package/dist/cli/validate-patterns.d.ts.map +1 -1
  29. package/dist/generators/built-in/cli-recipe-generator.d.ts +3 -4
  30. package/dist/generators/built-in/cli-recipe-generator.d.ts.map +1 -1
  31. package/dist/generators/built-in/cli-recipe-generator.js +6 -7
  32. package/dist/generators/built-in/cli-recipe-generator.js.map +1 -1
  33. package/dist/generators/built-in/cli-reference-generator.d.ts +18 -0
  34. package/dist/generators/built-in/cli-reference-generator.d.ts.map +1 -0
  35. package/dist/generators/built-in/{process-api-reference-generator.js → cli-reference-generator.js} +13 -13
  36. package/dist/generators/built-in/cli-reference-generator.js.map +1 -0
  37. package/dist/generators/built-in/codec-generators.js +12 -12
  38. package/dist/generators/built-in/codec-generators.js.map +1 -1
  39. package/dist/generators/built-in/design-review-generator.d.ts.map +1 -1
  40. package/dist/generators/built-in/reference-generators.d.ts.map +1 -1
  41. package/dist/generators/codec-based.d.ts.map +1 -1
  42. package/dist/generators/index.d.ts.map +1 -1
  43. package/dist/generators/orchestrator.d.ts.map +1 -1
  44. package/dist/generators/pipeline/build-pipeline.d.ts +17 -14
  45. package/dist/generators/pipeline/build-pipeline.d.ts.map +1 -1
  46. package/dist/generators/pipeline/build-pipeline.js +27 -21
  47. package/dist/generators/pipeline/build-pipeline.js.map +1 -1
  48. package/dist/generators/pipeline/index.d.ts.map +1 -1
  49. package/dist/generators/types.d.ts.map +1 -1
  50. package/dist/mcp/pipeline-session.d.ts.map +1 -1
  51. package/dist/renderable/codecs/index-codec.d.ts.map +1 -1
  52. package/dist/renderable/codecs/index-codec.js +54 -28
  53. package/dist/renderable/codecs/index-codec.js.map +1 -1
  54. package/docs/ANNOTATION-GUIDE.md +5 -5
  55. package/docs/ARCHITECTURE.md +79 -79
  56. package/docs/{PROCESS-API.md → CLI.md} +6 -6
  57. package/docs/CONFIGURATION.md +2 -2
  58. package/docs/DOCS-GAP-ANALYSIS.md +65 -65
  59. package/docs/INDEX.md +34 -34
  60. package/docs/MCP-SETUP.md +3 -3
  61. package/docs/METHODOLOGY.md +1 -1
  62. package/docs/SESSION-GUIDES.md +3 -3
  63. package/docs/VALIDATION.md +4 -4
  64. package/docs-live/ARCHITECTURE.md +48 -42
  65. package/docs-live/BUSINESS-RULES.md +3 -3
  66. package/docs-live/CHANGELOG-GENERATED.md +109 -103
  67. package/docs-live/INDEX.md +21 -21
  68. package/docs-live/PRODUCT-AREAS.md +7 -7
  69. package/docs-live/TAXONOMY.md +3 -5
  70. package/docs-live/_claude-md/annotation/annotation-overview.md +1 -1
  71. package/docs-live/_claude-md/annotation/annotation-reference.md +5 -5
  72. package/docs-live/_claude-md/architecture/architecture-types.md +4 -4
  73. package/docs-live/_claude-md/architecture/reference-sample.md +2 -2
  74. package/docs-live/_claude-md/data-api/data-api-overview.md +2 -2
  75. package/docs-live/_claude-md/generation/generation-overview.md +15 -15
  76. package/docs-live/_claude-md/process/process-overview.md +1 -1
  77. package/docs-live/_claude-md/validation/validation-overview.md +1 -1
  78. package/docs-live/business-rules/annotation.md +1 -2
  79. package/docs-live/business-rules/configuration.md +1 -1
  80. package/docs-live/business-rules/data-api.md +149 -136
  81. package/docs-live/business-rules/generation.md +172 -20
  82. package/docs-live/decisions/adr-003-source-first-pattern-architecture.md +1 -1
  83. package/docs-live/decisions/adr-005-codec-based-markdown-rendering.md +5 -5
  84. package/docs-live/decisions/adr-006-single-read-model-architecture.md +24 -24
  85. package/docs-live/product-areas/ANNOTATION.md +19 -9
  86. package/docs-live/product-areas/CONFIGURATION.md +39 -19
  87. package/docs-live/product-areas/DATA-API.md +155 -151
  88. package/docs-live/product-areas/GENERATION.md +159 -144
  89. package/docs-live/product-areas/PROCESS.md +4 -4
  90. package/docs-live/product-areas/VALIDATION.md +35 -20
  91. package/docs-live/reference/ANNOTATION-REFERENCE.md +5 -5
  92. package/docs-live/reference/ARCHITECTURE-CODECS.md +11 -11
  93. package/docs-live/reference/ARCHITECTURE-TYPES.md +28 -25
  94. package/docs-live/reference/{PROCESS-API-RECIPES.md → CLI-RECIPES.md} +11 -11
  95. package/docs-live/reference/{PROCESS-API-REFERENCE.md → CLI-REFERENCE.md} +2 -2
  96. package/docs-live/reference/REFERENCE-SAMPLE.md +56 -56
  97. package/docs-live/reference/SESSION-WORKFLOW-GUIDE.md +3 -3
  98. package/docs-live/taxonomy/format-types.md +2 -2
  99. package/docs-live/taxonomy/metadata-tags.md +1 -23
  100. package/package.json +7 -7
  101. package/dist/api/arch-queries.d.ts +0 -95
  102. package/dist/api/arch-queries.js +0 -310
  103. package/dist/api/arch-queries.js.map +0 -1
  104. package/dist/api/context-assembler.d.ts +0 -124
  105. package/dist/api/context-assembler.js +0 -472
  106. package/dist/api/context-assembler.js.map +0 -1
  107. package/dist/api/context-formatter.d.ts +0 -26
  108. package/dist/api/context-formatter.js +0 -183
  109. package/dist/api/context-formatter.js.map +0 -1
  110. package/dist/api/coverage-analyzer.d.ts +0 -38
  111. package/dist/api/coverage-analyzer.d.ts.map +0 -1
  112. package/dist/api/coverage-analyzer.js +0 -117
  113. package/dist/api/coverage-analyzer.js.map +0 -1
  114. package/dist/api/fuzzy-match.d.ts +0 -75
  115. package/dist/api/fuzzy-match.d.ts.map +0 -1
  116. package/dist/api/fuzzy-match.js +0 -150
  117. package/dist/api/fuzzy-match.js.map +0 -1
  118. package/dist/api/handoff-generator.d.ts +0 -45
  119. package/dist/api/handoff-generator.js +0 -139
  120. package/dist/api/handoff-generator.js.map +0 -1
  121. package/dist/api/pattern-helpers.d.ts +0 -51
  122. package/dist/api/pattern-helpers.d.ts.map +0 -1
  123. package/dist/api/pattern-helpers.js +0 -84
  124. package/dist/api/pattern-helpers.js.map +0 -1
  125. package/dist/api/process-state.d.ts.map +0 -1
  126. package/dist/api/process-state.js.map +0 -1
  127. package/dist/api/scope-validator.d.ts +0 -56
  128. package/dist/api/scope-validator.js +0 -293
  129. package/dist/api/scope-validator.js.map +0 -1
  130. package/dist/api/stub-resolver.d.ts +0 -117
  131. package/dist/api/stub-resolver.d.ts.map +0 -1
  132. package/dist/api/stub-resolver.js +0 -154
  133. package/dist/api/stub-resolver.js.map +0 -1
  134. package/dist/api/summarize.d.ts +0 -75
  135. package/dist/api/summarize.d.ts.map +0 -1
  136. package/dist/api/summarize.js +0 -97
  137. package/dist/api/summarize.js.map +0 -1
  138. package/dist/cache/file-cache.d.ts +0 -72
  139. package/dist/cache/file-cache.d.ts.map +0 -1
  140. package/dist/cache/file-cache.js +0 -80
  141. package/dist/cache/file-cache.js.map +0 -1
  142. package/dist/cache/index.d.ts +0 -5
  143. package/dist/cache/index.d.ts.map +0 -1
  144. package/dist/cache/index.js +0 -5
  145. package/dist/cache/index.js.map +0 -1
  146. package/dist/cli/dataset-cache.d.ts +0 -66
  147. package/dist/cli/dataset-cache.js +0 -179
  148. package/dist/cli/dataset-cache.js.map +0 -1
  149. package/dist/cli/error-handler.d.ts +0 -84
  150. package/dist/cli/error-handler.d.ts.map +0 -1
  151. package/dist/cli/error-handler.js +0 -197
  152. package/dist/cli/error-handler.js.map +0 -1
  153. package/dist/cli/generate-docs.d.ts +0 -30
  154. package/dist/cli/generate-docs.js +0 -370
  155. package/dist/cli/generate-docs.js.map +0 -1
  156. package/dist/cli/lint-patterns.d.ts +0 -57
  157. package/dist/cli/lint-patterns.d.ts.map +0 -1
  158. package/dist/cli/lint-patterns.js +0 -257
  159. package/dist/cli/lint-patterns.js.map +0 -1
  160. package/dist/cli/lint-process.d.ts +0 -54
  161. package/dist/cli/lint-process.d.ts.map +0 -1
  162. package/dist/cli/lint-process.js +0 -319
  163. package/dist/cli/lint-process.js.map +0 -1
  164. package/dist/cli/lint-steps.d.ts +0 -32
  165. package/dist/cli/lint-steps.d.ts.map +0 -1
  166. package/dist/cli/lint-steps.js +0 -172
  167. package/dist/cli/lint-steps.js.map +0 -1
  168. package/dist/cli/mcp-server.d.ts +0 -22
  169. package/dist/cli/mcp-server.js +0 -57
  170. package/dist/cli/mcp-server.js.map +0 -1
  171. package/dist/cli/output-pipeline.d.ts +0 -130
  172. package/dist/cli/output-pipeline.js +0 -234
  173. package/dist/cli/output-pipeline.js.map +0 -1
  174. package/dist/cli/process-api.d.ts +0 -37
  175. package/dist/cli/process-api.d.ts.map +0 -1
  176. package/dist/cli/process-api.js +0 -1550
  177. package/dist/cli/process-api.js.map +0 -1
  178. package/dist/cli/repl.d.ts +0 -38
  179. package/dist/cli/repl.js +0 -239
  180. package/dist/cli/repl.js.map +0 -1
  181. package/dist/cli/validate-patterns.d.ts +0 -115
  182. package/dist/cli/validate-patterns.js +0 -707
  183. package/dist/cli/validate-patterns.js.map +0 -1
  184. package/dist/cli/version.d.ts +0 -35
  185. package/dist/cli/version.d.ts.map +0 -1
  186. package/dist/cli/version.js +0 -64
  187. package/dist/cli/version.js.map +0 -1
  188. package/dist/config/config-loader.d.ts +0 -167
  189. package/dist/config/config-loader.d.ts.map +0 -1
  190. package/dist/config/config-loader.js +0 -294
  191. package/dist/config/config-loader.js.map +0 -1
  192. package/dist/config/defaults.d.ts +0 -92
  193. package/dist/config/defaults.d.ts.map +0 -1
  194. package/dist/config/defaults.js +0 -103
  195. package/dist/config/defaults.js.map +0 -1
  196. package/dist/config/define-config.d.ts +0 -37
  197. package/dist/config/define-config.d.ts.map +0 -1
  198. package/dist/config/define-config.js +0 -38
  199. package/dist/config/define-config.js.map +0 -1
  200. package/dist/config/factory.d.ts +0 -79
  201. package/dist/config/factory.d.ts.map +0 -1
  202. package/dist/config/factory.js +0 -116
  203. package/dist/config/factory.js.map +0 -1
  204. package/dist/config/index.d.ts +0 -45
  205. package/dist/config/index.d.ts.map +0 -1
  206. package/dist/config/index.js +0 -48
  207. package/dist/config/index.js.map +0 -1
  208. package/dist/config/merge-sources.d.ts +0 -47
  209. package/dist/config/merge-sources.d.ts.map +0 -1
  210. package/dist/config/merge-sources.js +0 -61
  211. package/dist/config/merge-sources.js.map +0 -1
  212. package/dist/config/presets.d.ts +0 -115
  213. package/dist/config/presets.d.ts.map +0 -1
  214. package/dist/config/presets.js +0 -119
  215. package/dist/config/presets.js.map +0 -1
  216. package/dist/config/project-config-schema.d.ts +0 -192
  217. package/dist/config/project-config-schema.d.ts.map +0 -1
  218. package/dist/config/project-config-schema.js +0 -231
  219. package/dist/config/project-config-schema.js.map +0 -1
  220. package/dist/config/project-config.d.ts +0 -229
  221. package/dist/config/project-config.d.ts.map +0 -1
  222. package/dist/config/project-config.js +0 -37
  223. package/dist/config/project-config.js.map +0 -1
  224. package/dist/config/regex-builders.d.ts +0 -49
  225. package/dist/config/regex-builders.d.ts.map +0 -1
  226. package/dist/config/regex-builders.js +0 -85
  227. package/dist/config/regex-builders.js.map +0 -1
  228. package/dist/config/resolve-config.d.ts +0 -65
  229. package/dist/config/resolve-config.d.ts.map +0 -1
  230. package/dist/config/resolve-config.js +0 -150
  231. package/dist/config/resolve-config.js.map +0 -1
  232. package/dist/config/types.d.ts +0 -81
  233. package/dist/config/types.d.ts.map +0 -1
  234. package/dist/config/types.js +0 -22
  235. package/dist/config/types.js.map +0 -1
  236. package/dist/config/workflow-loader.d.ts +0 -90
  237. package/dist/config/workflow-loader.d.ts.map +0 -1
  238. package/dist/config/workflow-loader.js +0 -167
  239. package/dist/config/workflow-loader.js.map +0 -1
  240. package/dist/extractor/doc-extractor.d.ts +0 -233
  241. package/dist/extractor/doc-extractor.d.ts.map +0 -1
  242. package/dist/extractor/doc-extractor.js +0 -481
  243. package/dist/extractor/doc-extractor.js.map +0 -1
  244. package/dist/extractor/dual-source-extractor.d.ts +0 -161
  245. package/dist/extractor/dual-source-extractor.d.ts.map +0 -1
  246. package/dist/extractor/dual-source-extractor.js +0 -407
  247. package/dist/extractor/dual-source-extractor.js.map +0 -1
  248. package/dist/extractor/gherkin-extractor.d.ts +0 -170
  249. package/dist/extractor/gherkin-extractor.d.ts.map +0 -1
  250. package/dist/extractor/gherkin-extractor.js +0 -543
  251. package/dist/extractor/gherkin-extractor.js.map +0 -1
  252. package/dist/extractor/index.d.ts +0 -7
  253. package/dist/extractor/index.d.ts.map +0 -1
  254. package/dist/extractor/index.js +0 -11
  255. package/dist/extractor/index.js.map +0 -1
  256. package/dist/extractor/layer-inference.d.ts +0 -66
  257. package/dist/extractor/layer-inference.d.ts.map +0 -1
  258. package/dist/extractor/layer-inference.js +0 -93
  259. package/dist/extractor/layer-inference.js.map +0 -1
  260. package/dist/extractor/shape-extractor.d.ts +0 -79
  261. package/dist/extractor/shape-extractor.d.ts.map +0 -1
  262. package/dist/extractor/shape-extractor.js +0 -966
  263. package/dist/extractor/shape-extractor.js.map +0 -1
  264. package/dist/generators/built-in/codec-generators.d.ts +0 -29
  265. package/dist/generators/built-in/decision-doc-generator.d.ts +0 -204
  266. package/dist/generators/built-in/decision-doc-generator.js +0 -654
  267. package/dist/generators/built-in/decision-doc-generator.js.map +0 -1
  268. package/dist/generators/built-in/design-review-generator.d.ts +0 -26
  269. package/dist/generators/built-in/design-review-generator.js +0 -94
  270. package/dist/generators/built-in/design-review-generator.js.map +0 -1
  271. package/dist/generators/built-in/index.d.ts +0 -22
  272. package/dist/generators/built-in/index.js +0 -23
  273. package/dist/generators/built-in/index.js.map +0 -1
  274. package/dist/generators/built-in/process-api-reference-generator.d.ts +0 -18
  275. package/dist/generators/built-in/process-api-reference-generator.d.ts.map +0 -1
  276. package/dist/generators/built-in/process-api-reference-generator.js.map +0 -1
  277. package/dist/generators/built-in/reference-generators.d.ts +0 -51
  278. package/dist/generators/built-in/reference-generators.js +0 -320
  279. package/dist/generators/built-in/reference-generators.js.map +0 -1
  280. package/dist/generators/codec-based.d.ts +0 -63
  281. package/dist/generators/codec-based.js +0 -88
  282. package/dist/generators/codec-based.js.map +0 -1
  283. package/dist/generators/content-deduplicator.d.ts +0 -114
  284. package/dist/generators/content-deduplicator.d.ts.map +0 -1
  285. package/dist/generators/content-deduplicator.js +0 -356
  286. package/dist/generators/content-deduplicator.js.map +0 -1
  287. package/dist/generators/index.d.ts +0 -50
  288. package/dist/generators/index.js +0 -54
  289. package/dist/generators/index.js.map +0 -1
  290. package/dist/generators/orchestrator.d.ts +0 -265
  291. package/dist/generators/orchestrator.js +0 -570
  292. package/dist/generators/orchestrator.js.map +0 -1
  293. package/dist/generators/pipeline/context-inference.d.ts +0 -55
  294. package/dist/generators/pipeline/context-inference.d.ts.map +0 -1
  295. package/dist/generators/pipeline/context-inference.js +0 -76
  296. package/dist/generators/pipeline/context-inference.js.map +0 -1
  297. package/dist/generators/pipeline/index.d.ts +0 -27
  298. package/dist/generators/pipeline/index.js +0 -34
  299. package/dist/generators/pipeline/index.js.map +0 -1
  300. package/dist/generators/pipeline/merge-patterns.d.ts +0 -33
  301. package/dist/generators/pipeline/merge-patterns.d.ts.map +0 -1
  302. package/dist/generators/pipeline/merge-patterns.js +0 -50
  303. package/dist/generators/pipeline/merge-patterns.js.map +0 -1
  304. package/dist/generators/pipeline/relationship-resolver.d.ts +0 -47
  305. package/dist/generators/pipeline/relationship-resolver.d.ts.map +0 -1
  306. package/dist/generators/pipeline/relationship-resolver.js +0 -132
  307. package/dist/generators/pipeline/relationship-resolver.js.map +0 -1
  308. package/dist/generators/pipeline/sequence-utils.d.ts +0 -49
  309. package/dist/generators/pipeline/sequence-utils.d.ts.map +0 -1
  310. package/dist/generators/pipeline/sequence-utils.js +0 -235
  311. package/dist/generators/pipeline/sequence-utils.js.map +0 -1
  312. package/dist/generators/pipeline/transform-dataset.d.ts +0 -82
  313. package/dist/generators/pipeline/transform-dataset.d.ts.map +0 -1
  314. package/dist/generators/pipeline/transform-dataset.js +0 -355
  315. package/dist/generators/pipeline/transform-dataset.js.map +0 -1
  316. package/dist/generators/pipeline/transform-types.d.ts +0 -96
  317. package/dist/generators/pipeline/transform-types.d.ts.map +0 -1
  318. package/dist/generators/pipeline/transform-types.js +0 -18
  319. package/dist/generators/pipeline/transform-types.js.map +0 -1
  320. package/dist/generators/registry.d.ts +0 -64
  321. package/dist/generators/registry.js +0 -77
  322. package/dist/generators/registry.js.map +0 -1
  323. package/dist/generators/source-mapper.d.ts +0 -143
  324. package/dist/generators/source-mapper.d.ts.map +0 -1
  325. package/dist/generators/source-mapper.js +0 -602
  326. package/dist/generators/source-mapper.js.map +0 -1
  327. package/dist/generators/source-mapping-validator.d.ts +0 -118
  328. package/dist/generators/source-mapping-validator.d.ts.map +0 -1
  329. package/dist/generators/source-mapping-validator.js +0 -334
  330. package/dist/generators/source-mapping-validator.js.map +0 -1
  331. package/dist/generators/types.d.ts +0 -104
  332. package/dist/generators/types.js +0 -5
  333. package/dist/generators/types.js.map +0 -1
  334. package/dist/generators/warning-collector.d.ts +0 -144
  335. package/dist/generators/warning-collector.d.ts.map +0 -1
  336. package/dist/generators/warning-collector.js +0 -166
  337. package/dist/generators/warning-collector.js.map +0 -1
  338. package/dist/git/branch-diff.d.ts +0 -44
  339. package/dist/git/branch-diff.d.ts.map +0 -1
  340. package/dist/git/branch-diff.js +0 -57
  341. package/dist/git/branch-diff.js.map +0 -1
  342. package/dist/git/helpers.d.ts +0 -46
  343. package/dist/git/helpers.d.ts.map +0 -1
  344. package/dist/git/helpers.js +0 -67
  345. package/dist/git/helpers.js.map +0 -1
  346. package/dist/git/index.d.ts +0 -18
  347. package/dist/git/index.d.ts.map +0 -1
  348. package/dist/git/index.js +0 -18
  349. package/dist/git/index.js.map +0 -1
  350. package/dist/git/name-status.d.ts +0 -32
  351. package/dist/git/name-status.d.ts.map +0 -1
  352. package/dist/git/name-status.js +0 -66
  353. package/dist/git/name-status.js.map +0 -1
  354. package/dist/index.d.ts +0 -107
  355. package/dist/index.js +0 -122
  356. package/dist/index.js.map +0 -1
  357. package/dist/lint/engine.d.ts +0 -113
  358. package/dist/lint/engine.d.ts.map +0 -1
  359. package/dist/lint/engine.js +0 -228
  360. package/dist/lint/engine.js.map +0 -1
  361. package/dist/lint/index.d.ts +0 -26
  362. package/dist/lint/index.d.ts.map +0 -1
  363. package/dist/lint/index.js +0 -24
  364. package/dist/lint/index.js.map +0 -1
  365. package/dist/lint/process-guard/decider.d.ts +0 -166
  366. package/dist/lint/process-guard/decider.d.ts.map +0 -1
  367. package/dist/lint/process-guard/decider.js +0 -412
  368. package/dist/lint/process-guard/decider.js.map +0 -1
  369. package/dist/lint/process-guard/derive-state.d.ts +0 -96
  370. package/dist/lint/process-guard/derive-state.d.ts.map +0 -1
  371. package/dist/lint/process-guard/derive-state.js +0 -368
  372. package/dist/lint/process-guard/derive-state.js.map +0 -1
  373. package/dist/lint/process-guard/detect-changes.d.ts +0 -109
  374. package/dist/lint/process-guard/detect-changes.d.ts.map +0 -1
  375. package/dist/lint/process-guard/detect-changes.js +0 -487
  376. package/dist/lint/process-guard/detect-changes.js.map +0 -1
  377. package/dist/lint/process-guard/index.d.ts +0 -35
  378. package/dist/lint/process-guard/index.d.ts.map +0 -1
  379. package/dist/lint/process-guard/index.js +0 -39
  380. package/dist/lint/process-guard/index.js.map +0 -1
  381. package/dist/lint/process-guard/types.d.ts +0 -255
  382. package/dist/lint/process-guard/types.d.ts.map +0 -1
  383. package/dist/lint/process-guard/types.js +0 -31
  384. package/dist/lint/process-guard/types.js.map +0 -1
  385. package/dist/lint/rules.d.ts +0 -147
  386. package/dist/lint/rules.d.ts.map +0 -1
  387. package/dist/lint/rules.js +0 -289
  388. package/dist/lint/rules.js.map +0 -1
  389. package/dist/lint/steps/cross-checks.d.ts +0 -66
  390. package/dist/lint/steps/cross-checks.d.ts.map +0 -1
  391. package/dist/lint/steps/cross-checks.js +0 -290
  392. package/dist/lint/steps/cross-checks.js.map +0 -1
  393. package/dist/lint/steps/feature-checks.d.ts +0 -78
  394. package/dist/lint/steps/feature-checks.d.ts.map +0 -1
  395. package/dist/lint/steps/feature-checks.js +0 -279
  396. package/dist/lint/steps/feature-checks.js.map +0 -1
  397. package/dist/lint/steps/index.d.ts +0 -22
  398. package/dist/lint/steps/index.d.ts.map +0 -1
  399. package/dist/lint/steps/index.js +0 -26
  400. package/dist/lint/steps/index.js.map +0 -1
  401. package/dist/lint/steps/pair-resolver.d.ts +0 -29
  402. package/dist/lint/steps/pair-resolver.d.ts.map +0 -1
  403. package/dist/lint/steps/pair-resolver.js +0 -76
  404. package/dist/lint/steps/pair-resolver.js.map +0 -1
  405. package/dist/lint/steps/runner.d.ts +0 -28
  406. package/dist/lint/steps/runner.d.ts.map +0 -1
  407. package/dist/lint/steps/runner.js +0 -143
  408. package/dist/lint/steps/runner.js.map +0 -1
  409. package/dist/lint/steps/step-checks.d.ts +0 -41
  410. package/dist/lint/steps/step-checks.d.ts.map +0 -1
  411. package/dist/lint/steps/step-checks.js +0 -164
  412. package/dist/lint/steps/step-checks.js.map +0 -1
  413. package/dist/lint/steps/types.d.ts +0 -95
  414. package/dist/lint/steps/types.d.ts.map +0 -1
  415. package/dist/lint/steps/types.js +0 -79
  416. package/dist/lint/steps/types.js.map +0 -1
  417. package/dist/lint/steps/utils.d.ts +0 -22
  418. package/dist/lint/steps/utils.d.ts.map +0 -1
  419. package/dist/lint/steps/utils.js +0 -57
  420. package/dist/lint/steps/utils.js.map +0 -1
  421. package/dist/mcp/file-watcher.d.ts +0 -24
  422. package/dist/mcp/file-watcher.js +0 -75
  423. package/dist/mcp/file-watcher.js.map +0 -1
  424. package/dist/mcp/index.d.ts +0 -19
  425. package/dist/mcp/index.js +0 -21
  426. package/dist/mcp/index.js.map +0 -1
  427. package/dist/mcp/pipeline-session.d.ts +0 -33
  428. package/dist/mcp/pipeline-session.js +0 -149
  429. package/dist/mcp/pipeline-session.js.map +0 -1
  430. package/dist/mcp/server.d.ts +0 -28
  431. package/dist/mcp/server.js +0 -197
  432. package/dist/mcp/server.js.map +0 -1
  433. package/dist/mcp/tool-registry.d.ts +0 -4
  434. package/dist/mcp/tool-registry.js +0 -525
  435. package/dist/mcp/tool-registry.js.map +0 -1
  436. package/dist/renderable/codecs/adr.d.ts +0 -4730
  437. package/dist/renderable/codecs/adr.d.ts.map +0 -1
  438. package/dist/renderable/codecs/adr.js +0 -590
  439. package/dist/renderable/codecs/adr.js.map +0 -1
  440. package/dist/renderable/codecs/architecture.d.ts +0 -4760
  441. package/dist/renderable/codecs/architecture.d.ts.map +0 -1
  442. package/dist/renderable/codecs/architecture.js +0 -524
  443. package/dist/renderable/codecs/architecture.js.map +0 -1
  444. package/dist/renderable/codecs/business-rules.d.ts +0 -4777
  445. package/dist/renderable/codecs/business-rules.d.ts.map +0 -1
  446. package/dist/renderable/codecs/business-rules.js +0 -648
  447. package/dist/renderable/codecs/business-rules.js.map +0 -1
  448. package/dist/renderable/codecs/claude-module.d.ts +0 -4710
  449. package/dist/renderable/codecs/claude-module.d.ts.map +0 -1
  450. package/dist/renderable/codecs/claude-module.js +0 -214
  451. package/dist/renderable/codecs/claude-module.js.map +0 -1
  452. package/dist/renderable/codecs/composite.d.ts +0 -84
  453. package/dist/renderable/codecs/composite.d.ts.map +0 -1
  454. package/dist/renderable/codecs/composite.js +0 -124
  455. package/dist/renderable/codecs/composite.js.map +0 -1
  456. package/dist/renderable/codecs/convention-extractor.d.ts +0 -105
  457. package/dist/renderable/codecs/convention-extractor.d.ts.map +0 -1
  458. package/dist/renderable/codecs/convention-extractor.js +0 -353
  459. package/dist/renderable/codecs/convention-extractor.js.map +0 -1
  460. package/dist/renderable/codecs/decision-doc.d.ts +0 -308
  461. package/dist/renderable/codecs/decision-doc.d.ts.map +0 -1
  462. package/dist/renderable/codecs/decision-doc.js +0 -485
  463. package/dist/renderable/codecs/decision-doc.js.map +0 -1
  464. package/dist/renderable/codecs/design-review.d.ts +0 -55
  465. package/dist/renderable/codecs/design-review.d.ts.map +0 -1
  466. package/dist/renderable/codecs/design-review.js +0 -532
  467. package/dist/renderable/codecs/design-review.js.map +0 -1
  468. package/dist/renderable/codecs/diagram-utils.d.ts +0 -62
  469. package/dist/renderable/codecs/diagram-utils.d.ts.map +0 -1
  470. package/dist/renderable/codecs/diagram-utils.js +0 -70
  471. package/dist/renderable/codecs/diagram-utils.js.map +0 -1
  472. package/dist/renderable/codecs/helpers.d.ts +0 -553
  473. package/dist/renderable/codecs/helpers.d.ts.map +0 -1
  474. package/dist/renderable/codecs/helpers.js +0 -913
  475. package/dist/renderable/codecs/helpers.js.map +0 -1
  476. package/dist/renderable/codecs/index-codec.d.ts +0 -4714
  477. package/dist/renderable/codecs/index.d.ts +0 -46
  478. package/dist/renderable/codecs/index.d.ts.map +0 -1
  479. package/dist/renderable/codecs/index.js +0 -70
  480. package/dist/renderable/codecs/index.js.map +0 -1
  481. package/dist/renderable/codecs/patterns.d.ts +0 -4757
  482. package/dist/renderable/codecs/patterns.d.ts.map +0 -1
  483. package/dist/renderable/codecs/patterns.js +0 -462
  484. package/dist/renderable/codecs/patterns.js.map +0 -1
  485. package/dist/renderable/codecs/planning.d.ts +0 -14055
  486. package/dist/renderable/codecs/planning.d.ts.map +0 -1
  487. package/dist/renderable/codecs/planning.js +0 -449
  488. package/dist/renderable/codecs/planning.js.map +0 -1
  489. package/dist/renderable/codecs/pr-changes.d.ts +0 -4742
  490. package/dist/renderable/codecs/pr-changes.d.ts.map +0 -1
  491. package/dist/renderable/codecs/pr-changes.js +0 -425
  492. package/dist/renderable/codecs/pr-changes.js.map +0 -1
  493. package/dist/renderable/codecs/reference.d.ts +0 -215
  494. package/dist/renderable/codecs/reference.d.ts.map +0 -1
  495. package/dist/renderable/codecs/reference.js +0 -1578
  496. package/dist/renderable/codecs/reference.js.map +0 -1
  497. package/dist/renderable/codecs/reporting.d.ts +0 -14026
  498. package/dist/renderable/codecs/reporting.d.ts.map +0 -1
  499. package/dist/renderable/codecs/reporting.js +0 -365
  500. package/dist/renderable/codecs/reporting.js.map +0 -1
  501. package/dist/renderable/codecs/requirements.d.ts +0 -4743
  502. package/dist/renderable/codecs/requirements.d.ts.map +0 -1
  503. package/dist/renderable/codecs/requirements.js +0 -428
  504. package/dist/renderable/codecs/requirements.js.map +0 -1
  505. package/dist/renderable/codecs/session.d.ts +0 -9410
  506. package/dist/renderable/codecs/session.d.ts.map +0 -1
  507. package/dist/renderable/codecs/session.js +0 -848
  508. package/dist/renderable/codecs/session.js.map +0 -1
  509. package/dist/renderable/codecs/shape-matcher.d.ts +0 -54
  510. package/dist/renderable/codecs/shape-matcher.d.ts.map +0 -1
  511. package/dist/renderable/codecs/shape-matcher.js +0 -106
  512. package/dist/renderable/codecs/shape-matcher.js.map +0 -1
  513. package/dist/renderable/codecs/shared-schema.d.ts +0 -44
  514. package/dist/renderable/codecs/shared-schema.d.ts.map +0 -1
  515. package/dist/renderable/codecs/shared-schema.js +0 -43
  516. package/dist/renderable/codecs/shared-schema.js.map +0 -1
  517. package/dist/renderable/codecs/taxonomy.d.ts +0 -4733
  518. package/dist/renderable/codecs/taxonomy.d.ts.map +0 -1
  519. package/dist/renderable/codecs/taxonomy.js +0 -570
  520. package/dist/renderable/codecs/taxonomy.js.map +0 -1
  521. package/dist/renderable/codecs/timeline.d.ts +0 -14094
  522. package/dist/renderable/codecs/timeline.d.ts.map +0 -1
  523. package/dist/renderable/codecs/timeline.js +0 -906
  524. package/dist/renderable/codecs/timeline.js.map +0 -1
  525. package/dist/renderable/codecs/types/base.d.ts +0 -81
  526. package/dist/renderable/codecs/types/base.d.ts.map +0 -1
  527. package/dist/renderable/codecs/types/base.js +0 -56
  528. package/dist/renderable/codecs/types/base.js.map +0 -1
  529. package/dist/renderable/codecs/types/index.d.ts +0 -5
  530. package/dist/renderable/codecs/types/index.d.ts.map +0 -1
  531. package/dist/renderable/codecs/types/index.js +0 -5
  532. package/dist/renderable/codecs/types/index.js.map +0 -1
  533. package/dist/renderable/codecs/validation-rules.d.ts +0 -4773
  534. package/dist/renderable/codecs/validation-rules.d.ts.map +0 -1
  535. package/dist/renderable/codecs/validation-rules.js +0 -537
  536. package/dist/renderable/codecs/validation-rules.js.map +0 -1
  537. package/dist/renderable/generate.d.ts +0 -338
  538. package/dist/renderable/generate.d.ts.map +0 -1
  539. package/dist/renderable/generate.js +0 -437
  540. package/dist/renderable/generate.js.map +0 -1
  541. package/dist/renderable/index.d.ts +0 -36
  542. package/dist/renderable/index.d.ts.map +0 -1
  543. package/dist/renderable/index.js +0 -58
  544. package/dist/renderable/index.js.map +0 -1
  545. package/dist/renderable/load-preamble.d.ts +0 -56
  546. package/dist/renderable/load-preamble.d.ts.map +0 -1
  547. package/dist/renderable/load-preamble.js +0 -298
  548. package/dist/renderable/load-preamble.js.map +0 -1
  549. package/dist/renderable/render.d.ts +0 -61
  550. package/dist/renderable/render.d.ts.map +0 -1
  551. package/dist/renderable/render.js +0 -346
  552. package/dist/renderable/render.js.map +0 -1
  553. package/dist/renderable/schema.d.ts +0 -194
  554. package/dist/renderable/schema.d.ts.map +0 -1
  555. package/dist/renderable/schema.js +0 -197
  556. package/dist/renderable/schema.js.map +0 -1
  557. package/dist/renderable/utils.d.ts +0 -146
  558. package/dist/renderable/utils.d.ts.map +0 -1
  559. package/dist/renderable/utils.js +0 -362
  560. package/dist/renderable/utils.js.map +0 -1
  561. package/dist/scanner/ast-parser.d.ts +0 -75
  562. package/dist/scanner/ast-parser.d.ts.map +0 -1
  563. package/dist/scanner/ast-parser.js +0 -835
  564. package/dist/scanner/ast-parser.js.map +0 -1
  565. package/dist/scanner/gherkin-ast-parser.d.ts +0 -166
  566. package/dist/scanner/gherkin-ast-parser.d.ts.map +0 -1
  567. package/dist/scanner/gherkin-ast-parser.js +0 -507
  568. package/dist/scanner/gherkin-ast-parser.js.map +0 -1
  569. package/dist/scanner/gherkin-scanner.d.ts +0 -106
  570. package/dist/scanner/gherkin-scanner.d.ts.map +0 -1
  571. package/dist/scanner/gherkin-scanner.js +0 -149
  572. package/dist/scanner/gherkin-scanner.js.map +0 -1
  573. package/dist/scanner/index.d.ts +0 -85
  574. package/dist/scanner/index.d.ts.map +0 -1
  575. package/dist/scanner/index.js +0 -102
  576. package/dist/scanner/index.js.map +0 -1
  577. package/dist/scanner/pattern-scanner.d.ts +0 -83
  578. package/dist/scanner/pattern-scanner.d.ts.map +0 -1
  579. package/dist/scanner/pattern-scanner.js +0 -110
  580. package/dist/scanner/pattern-scanner.js.map +0 -1
  581. package/dist/taxonomy/categories.d.ts +0 -47
  582. package/dist/taxonomy/categories.d.ts.map +0 -1
  583. package/dist/taxonomy/categories.js +0 -175
  584. package/dist/taxonomy/categories.js.map +0 -1
  585. package/dist/taxonomy/claude-section-values.d.ts +0 -12
  586. package/dist/taxonomy/claude-section-values.d.ts.map +0 -1
  587. package/dist/taxonomy/claude-section-values.js +0 -17
  588. package/dist/taxonomy/claude-section-values.js.map +0 -1
  589. package/dist/taxonomy/conventions.d.ts +0 -13
  590. package/dist/taxonomy/conventions.d.ts.map +0 -1
  591. package/dist/taxonomy/conventions.js +0 -27
  592. package/dist/taxonomy/conventions.js.map +0 -1
  593. package/dist/taxonomy/deliverable-status.d.ts +0 -99
  594. package/dist/taxonomy/deliverable-status.d.ts.map +0 -1
  595. package/dist/taxonomy/deliverable-status.js +0 -131
  596. package/dist/taxonomy/deliverable-status.js.map +0 -1
  597. package/dist/taxonomy/format-types.d.ts +0 -17
  598. package/dist/taxonomy/format-types.d.ts.map +0 -1
  599. package/dist/taxonomy/format-types.js +0 -23
  600. package/dist/taxonomy/format-types.js.map +0 -1
  601. package/dist/taxonomy/generator-options.d.ts +0 -67
  602. package/dist/taxonomy/generator-options.d.ts.map +0 -1
  603. package/dist/taxonomy/generator-options.js +0 -75
  604. package/dist/taxonomy/generator-options.js.map +0 -1
  605. package/dist/taxonomy/hierarchy-levels.d.ts +0 -23
  606. package/dist/taxonomy/hierarchy-levels.d.ts.map +0 -1
  607. package/dist/taxonomy/hierarchy-levels.js +0 -22
  608. package/dist/taxonomy/hierarchy-levels.js.map +0 -1
  609. package/dist/taxonomy/index.d.ts +0 -35
  610. package/dist/taxonomy/index.d.ts.map +0 -1
  611. package/dist/taxonomy/index.js +0 -56
  612. package/dist/taxonomy/index.js.map +0 -1
  613. package/dist/taxonomy/layer-types.d.ts +0 -22
  614. package/dist/taxonomy/layer-types.d.ts.map +0 -1
  615. package/dist/taxonomy/layer-types.js +0 -28
  616. package/dist/taxonomy/layer-types.js.map +0 -1
  617. package/dist/taxonomy/normalized-status.d.ts +0 -99
  618. package/dist/taxonomy/normalized-status.d.ts.map +0 -1
  619. package/dist/taxonomy/normalized-status.js +0 -113
  620. package/dist/taxonomy/normalized-status.js.map +0 -1
  621. package/dist/taxonomy/registry-builder.d.ts +0 -104
  622. package/dist/taxonomy/registry-builder.d.ts.map +0 -1
  623. package/dist/taxonomy/registry-builder.js +0 -561
  624. package/dist/taxonomy/registry-builder.js.map +0 -1
  625. package/dist/taxonomy/risk-levels.d.ts +0 -16
  626. package/dist/taxonomy/risk-levels.d.ts.map +0 -1
  627. package/dist/taxonomy/risk-levels.js +0 -15
  628. package/dist/taxonomy/risk-levels.js.map +0 -1
  629. package/dist/taxonomy/severity-types.d.ts +0 -6
  630. package/dist/taxonomy/severity-types.d.ts.map +0 -1
  631. package/dist/taxonomy/severity-types.js +0 -5
  632. package/dist/taxonomy/severity-types.js.map +0 -1
  633. package/dist/taxonomy/status-values.d.ts +0 -39
  634. package/dist/taxonomy/status-values.d.ts.map +0 -1
  635. package/dist/taxonomy/status-values.js +0 -42
  636. package/dist/taxonomy/status-values.js.map +0 -1
  637. package/dist/types/branded.d.ts +0 -89
  638. package/dist/types/branded.d.ts.map +0 -1
  639. package/dist/types/branded.js +0 -57
  640. package/dist/types/branded.js.map +0 -1
  641. package/dist/types/errors.d.ts +0 -342
  642. package/dist/types/errors.d.ts.map +0 -1
  643. package/dist/types/errors.js +0 -251
  644. package/dist/types/errors.js.map +0 -1
  645. package/dist/types/index.d.ts +0 -41
  646. package/dist/types/index.d.ts.map +0 -1
  647. package/dist/types/index.js +0 -5
  648. package/dist/types/index.js.map +0 -1
  649. package/dist/types/result.d.ts +0 -78
  650. package/dist/types/result.d.ts.map +0 -1
  651. package/dist/types/result.js +0 -78
  652. package/dist/types/result.js.map +0 -1
  653. package/dist/utils/collection-utils.d.ts +0 -49
  654. package/dist/utils/collection-utils.d.ts.map +0 -1
  655. package/dist/utils/collection-utils.js +0 -58
  656. package/dist/utils/collection-utils.js.map +0 -1
  657. package/dist/utils/id-utils.d.ts +0 -46
  658. package/dist/utils/id-utils.d.ts.map +0 -1
  659. package/dist/utils/id-utils.js +0 -51
  660. package/dist/utils/id-utils.js.map +0 -1
  661. package/dist/utils/index.d.ts +0 -21
  662. package/dist/utils/index.d.ts.map +0 -1
  663. package/dist/utils/index.js +0 -21
  664. package/dist/utils/index.js.map +0 -1
  665. package/dist/utils/string-utils.d.ts +0 -150
  666. package/dist/utils/string-utils.d.ts.map +0 -1
  667. package/dist/utils/string-utils.js +0 -281
  668. package/dist/utils/string-utils.js.map +0 -1
  669. package/dist/validation/anti-patterns.d.ts +0 -134
  670. package/dist/validation/anti-patterns.d.ts.map +0 -1
  671. package/dist/validation/anti-patterns.js +0 -307
  672. package/dist/validation/anti-patterns.js.map +0 -1
  673. package/dist/validation/dod-validator.d.ts +0 -94
  674. package/dist/validation/dod-validator.d.ts.map +0 -1
  675. package/dist/validation/dod-validator.js +0 -198
  676. package/dist/validation/dod-validator.js.map +0 -1
  677. package/dist/validation/fsm/index.d.ts +0 -59
  678. package/dist/validation/fsm/index.d.ts.map +0 -1
  679. package/dist/validation/fsm/index.js +0 -64
  680. package/dist/validation/fsm/index.js.map +0 -1
  681. package/dist/validation/fsm/states.d.ts +0 -93
  682. package/dist/validation/fsm/states.d.ts.map +0 -1
  683. package/dist/validation/fsm/states.js +0 -98
  684. package/dist/validation/fsm/states.js.map +0 -1
  685. package/dist/validation/fsm/transitions.d.ts +0 -100
  686. package/dist/validation/fsm/transitions.d.ts.map +0 -1
  687. package/dist/validation/fsm/transitions.js +0 -122
  688. package/dist/validation/fsm/transitions.js.map +0 -1
  689. package/dist/validation/fsm/validator.d.ts +0 -163
  690. package/dist/validation/fsm/validator.d.ts.map +0 -1
  691. package/dist/validation/fsm/validator.js +0 -205
  692. package/dist/validation/fsm/validator.js.map +0 -1
  693. package/dist/validation/index.d.ts +0 -23
  694. package/dist/validation/index.d.ts.map +0 -1
  695. package/dist/validation/index.js +0 -25
  696. package/dist/validation/index.js.map +0 -1
  697. package/dist/validation/types.d.ts +0 -136
  698. package/dist/validation/types.d.ts.map +0 -1
  699. package/dist/validation/types.js +0 -56
  700. package/dist/validation/types.js.map +0 -1
  701. package/dist/validation-schemas/codec-utils.d.ts +0 -188
  702. package/dist/validation-schemas/codec-utils.d.ts.map +0 -1
  703. package/dist/validation-schemas/codec-utils.js +0 -258
  704. package/dist/validation-schemas/codec-utils.js.map +0 -1
  705. package/dist/validation-schemas/config.d.ts +0 -99
  706. package/dist/validation-schemas/config.d.ts.map +0 -1
  707. package/dist/validation-schemas/config.js +0 -178
  708. package/dist/validation-schemas/config.js.map +0 -1
  709. package/dist/validation-schemas/doc-directive.d.ts +0 -195
  710. package/dist/validation-schemas/doc-directive.d.ts.map +0 -1
  711. package/dist/validation-schemas/doc-directive.js +0 -239
  712. package/dist/validation-schemas/doc-directive.js.map +0 -1
  713. package/dist/validation-schemas/dual-source.d.ts +0 -167
  714. package/dist/validation-schemas/dual-source.d.ts.map +0 -1
  715. package/dist/validation-schemas/dual-source.js +0 -168
  716. package/dist/validation-schemas/dual-source.js.map +0 -1
  717. package/dist/validation-schemas/export-info.d.ts +0 -53
  718. package/dist/validation-schemas/export-info.d.ts.map +0 -1
  719. package/dist/validation-schemas/export-info.js +0 -101
  720. package/dist/validation-schemas/export-info.js.map +0 -1
  721. package/dist/validation-schemas/extracted-pattern.d.ts +0 -351
  722. package/dist/validation-schemas/extracted-pattern.d.ts.map +0 -1
  723. package/dist/validation-schemas/extracted-pattern.js +0 -459
  724. package/dist/validation-schemas/extracted-pattern.js.map +0 -1
  725. package/dist/validation-schemas/extracted-shape.d.ts +0 -200
  726. package/dist/validation-schemas/extracted-shape.d.ts.map +0 -1
  727. package/dist/validation-schemas/extracted-shape.js +0 -182
  728. package/dist/validation-schemas/extracted-shape.js.map +0 -1
  729. package/dist/validation-schemas/feature.d.ts +0 -554
  730. package/dist/validation-schemas/feature.d.ts.map +0 -1
  731. package/dist/validation-schemas/feature.js +0 -262
  732. package/dist/validation-schemas/feature.js.map +0 -1
  733. package/dist/validation-schemas/index.d.ts +0 -15
  734. package/dist/validation-schemas/index.d.ts.map +0 -1
  735. package/dist/validation-schemas/index.js +0 -32
  736. package/dist/validation-schemas/index.js.map +0 -1
  737. package/dist/validation-schemas/lint.d.ts +0 -46
  738. package/dist/validation-schemas/lint.d.ts.map +0 -1
  739. package/dist/validation-schemas/lint.js +0 -45
  740. package/dist/validation-schemas/lint.js.map +0 -1
  741. package/dist/validation-schemas/master-dataset.d.ts +0 -8299
  742. package/dist/validation-schemas/master-dataset.d.ts.map +0 -1
  743. package/dist/validation-schemas/master-dataset.js +0 -275
  744. package/dist/validation-schemas/master-dataset.js.map +0 -1
  745. package/dist/validation-schemas/output-schemas.d.ts +0 -183
  746. package/dist/validation-schemas/output-schemas.d.ts.map +0 -1
  747. package/dist/validation-schemas/output-schemas.js +0 -149
  748. package/dist/validation-schemas/output-schemas.js.map +0 -1
  749. package/dist/validation-schemas/scenario-ref.d.ts +0 -80
  750. package/dist/validation-schemas/scenario-ref.d.ts.map +0 -1
  751. package/dist/validation-schemas/scenario-ref.js +0 -73
  752. package/dist/validation-schemas/scenario-ref.js.map +0 -1
  753. package/dist/validation-schemas/tag-registry.d.ts +0 -210
  754. package/dist/validation-schemas/tag-registry.d.ts.map +0 -1
  755. package/dist/validation-schemas/tag-registry.js +0 -248
  756. package/dist/validation-schemas/tag-registry.js.map +0 -1
  757. package/dist/validation-schemas/workflow-config.d.ts +0 -125
  758. package/dist/validation-schemas/workflow-config.d.ts.map +0 -1
  759. package/dist/validation-schemas/workflow-config.js +0 -138
  760. 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:** `buildMasterDataset()` is the shared factory for Steps 1-8 of the architecture pipeline and returns `Result<PipelineResult, PipelineError>` without process-level side effects.
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 `transformToMasterDataset` with validation summary.
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: `process-api`, `validate-patterns`, and the
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 MasterDataset without rewriting scan/extract/merge flow
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
- MasterDataset[/"MasterDataset"/]
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
- ProcessAPICLIImpl("ProcessAPICLIImpl")
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| ProcessStateAPI
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| ProcessStateAPI
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| ProcessStateAPI
128
+ ReplMode -->|uses| PatternGraphAPI
129
129
  ReplMode ..->|implements| DataAPICLIErgonomics
130
- ProcessAPICLIImpl -->|uses| ProcessStateAPI
131
- ProcessAPICLIImpl -->|uses| MasterDataset
132
- ProcessAPICLIImpl -->|uses| PipelineFactory
133
- ProcessAPICLIImpl -->|uses| RulesQueryModule
134
- ProcessAPICLIImpl -->|uses| PatternSummarizerImpl
135
- ProcessAPICLIImpl -->|uses| FuzzyMatcherImpl
136
- ProcessAPICLIImpl -->|uses| OutputPipelineImpl
137
- ProcessAPICLIImpl ..->|implements| ProcessStateAPICLI
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| ProcessApiHybridGeneration
146
- PatternSummarizerImpl -->|uses| ProcessStateAPI
145
+ CLISchema ..->|implements| CliReferenceGeneration
146
+ PatternSummarizerImpl -->|uses| PatternGraphAPI
147
147
  PatternSummarizerImpl ..->|implements| DataAPIOutputShaping
148
- ScopeValidatorImpl -->|uses| ProcessStateAPI
149
- ScopeValidatorImpl -->|uses| MasterDataset
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
- HandoffGeneratorImpl -->|uses| ProcessStateAPI
157
- HandoffGeneratorImpl -->|uses| MasterDataset
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| MasterDataset
162
+ CoverageAnalyzerImpl -->|uses| PatternGraph
163
163
  CoverageAnalyzerImpl ..->|implements| DataAPIArchitectureQueries
164
164
  ContextFormatterImpl -->|uses| ContextAssemblerImpl
165
165
  ContextFormatterImpl ..->|implements| DataAPIContextAssembly
166
- ContextAssemblerImpl -->|uses| ProcessStateAPI
167
- ContextAssemblerImpl -->|uses| MasterDataset
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| ProcessStateAPI
173
- ArchQueriesImpl -->|uses| MasterDataset
172
+ ArchQueriesImpl -->|uses| PatternGraphAPI
173
+ ArchQueriesImpl -->|uses| PatternGraph
174
174
  ArchQueriesImpl ..->|implements| DataAPIArchitectureQueries
175
- StubResolverImpl -->|uses| ProcessStateAPI
175
+ StubResolverImpl -->|uses| PatternGraphAPI
176
176
  FSMValidator ..->|implements| PhaseStateMachineValidation
177
- PipelineFactory -->|uses| MasterDataset
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 MasterDataset via the shared pipeline.
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: RuntimeMasterDataset;
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
- ### MasterDatasetSchema (const)
245
+ ### PatternGraphSchema (const)
243
246
 
244
247
  ```typescript
245
248
  /**
246
- * Master Dataset - Unified view of all extracted patterns
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
- MasterDatasetSchema = z.object({
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
- bySource: SourceViewsSchema,
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, 146 rules with invariants (146 total)
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 | Invariant | Rationale |
551
- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
552
- | MasterDataset 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 MasterDataset to a temp file with file-modification-time invalidation makes subsequent queries instant while ensuring staleness is impossible. |
553
- | 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. |
554
- | 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. |
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 MasterDataset indexes, shapes it compactly, resolves file paths from pattern names, discovers stubs by convention, and tailors output by session type. |
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
- | ProcessStateAPI is accessible as an MCP server for Claude Code | The MCP server exposes all ProcessStateAPI 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. |
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 MasterDataset 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. |
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 | Rationale |
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. | Help and version are universal CLI conventions — both short and long flag forms must work for discoverability and scripting compatibility. |
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. | Process guard validation depends on git diff for change detection — running without git produces undefined behavior rather than useful validation results. |
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. | 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. |
652
- | 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. |
653
- | 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. |
654
- | 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. |
655
- | 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. |
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 | Rationale |
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). | 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. |
662
- | ProcessStateAPI 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. |
663
- | MasterDataset 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 MasterDataset. 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. |
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). | During implementation sessions, source files change frequently. Without auto-rebuild, agents must manually call architect_rebuild. Debouncing prevents redundant rebuilds during rapid-fire saves. |
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. | MCP clients discover servers through configuration files. The server must work with sensible defaults (config auto-detection) while supporting explicit overrides for monorepo setups. |
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 Helpers Tests
680
+ ### Pattern Graph API CLI
677
681
 
678
- | Rule | Invariant | Rationale |
679
- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
680
- | 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. |
681
- | 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. |
682
- | 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). |
683
- | 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. |
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 Summarize Tests
691
+ ### Pattern Graph API Relationship Queries
686
692
 
687
- | Rule | Invariant | Rationale |
688
- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
689
- | 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. |
690
- | 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. |
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
- ### PDR 001 Session Workflow Commands
700
+ ### Pattern Graph API Testing
693
701
 
694
- | Rule | Invariant | Rationale |
695
- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
696
- | 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. |
697
- | 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. |
698
- | 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. |
699
- | 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. |
700
- | 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. |
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
- ### Process Api Cli Cache
710
+ ### Pattern Graph Cli Cache
705
711
 
706
- | Rule | Invariant | Rationale |
707
- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
708
- | MasterDataset is cached between invocations | When source files have not changed between CLI invocations, the second invocation must use the cached MasterDataset and report cache.hit as true with reduced pipelineMs. | 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. |
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
- ### Process Api Cli Core
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 MasterDataset. | Consumers depend on machine-readable status output for scripting and CI integration; unstructured output breaks downstream automation. |
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 MasterDataset's architecture metadata. | Architecture queries replace manual exploration of annotated sources; missing or incorrect results lead to wrong structural assumptions during design sessions. |
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
- ### Process Api Cli Dry Run
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
- ### Process Api Cli Help
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
- ### Process Api Cli Metadata
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
- ### Process Api Cli Modifiers And Rules
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
- ### Process Api Cli Repl
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
- ### Process Api Cli Subcommands
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
- ### Process API Layered Extraction
781
+ ### Pattern Graph Layered Extraction
768
782
 
769
- | Rule | Invariant | Rationale |
770
- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
771
- | CLI file contains only routing, no domain logic | `process-api.ts` parses arguments, calls the pipeline factory for the MasterDataset, 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. |
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 MasterDataset call the factory rather than wiring the pipeline independently. The factory accepts `mergeConflictStrategy` to handle behavioral differences between consumers. | Three consumers (process-api, validate-patterns, orchestrator) independently wire the same 8-step sequence: loadConfig, scanPatterns, extractPatterns, scanGherkinFiles, extractPatternsFromGherkin, mergePatterns, computeHierarchyChildren, transformToMasterDataset. The only semantic difference is merge-conflict handling (fatal vs concatenate). This is a Parallel Pipeline anti-pattern per ADR-006. |
773
- | Domain logic lives in API modules | Query logic that operates on MasterDataset 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 process-api.ts. Moving it to `src/api/` follows the same pattern as the 12 existing API modules (context-assembler, arch-queries, scope-validator, etc.). |
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: process-api.ts calls `process.exit(1)`, validate-patterns.ts throws, and orchestrator.ts (future) returns `Result.err()`. | The current `buildPipeline()` in process-api.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`). |
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. | The refactor must not change observable behavior. Full CLI verification confirms the extraction is a pure refactor. |
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
- ### Process Api Reference Tests
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 | Invariant | Rationale |
788
- | ----------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
789
- | CLI supports status-based pattern queries | Every ProcessStateAPI 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. |
790
- | 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. |
791
- | 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. |
792
- | 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. |
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
- ### Process State API Relationship Queries
800
+ ### Pattern Summarize Tests
797
801
 
798
- | Rule | Invariant | Rationale |
799
- | ------------------------------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
800
- | 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. |
801
- | 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. |
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
- ### Process State API Testing
807
+ ### PDR 001 Session Workflow Commands
806
808
 
807
- | Rule | Invariant | Rationale |
808
- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
809
- | 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. |
810
- | 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. |
811
- | 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. |
812
- | 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. |
813
- | 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. |
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