@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
@@ -5,16 +5,16 @@
5
5
 
6
6
  ---
7
7
 
8
- **How does code become docs?** The generation pipeline transforms annotated source code into markdown documents through a four-stage architecture: Scanner discovers files, Extractor produces `ExtractedPattern` objects, Transformer builds MasterDataset with pre-computed views, and Codecs render to markdown via RenderableDocument IR. Nine specialized codecs handle reference docs, planning, session, reporting, timeline, ADRs, business rules, taxonomy, and composite output — each supporting three detail levels (detailed, standard, summary). The Orchestrator runs generators in registration order, producing both detailed `docs-live/` references and compact `_claude-md/` summaries.
8
+ **How does code become docs?** The generation pipeline transforms annotated source code into markdown documents through a four-stage architecture: Scanner discovers files, Extractor produces `ExtractedPattern` objects, Transformer builds PatternGraph with pre-computed views, and Codecs render to markdown via RenderableDocument IR. Nine specialized codecs handle reference docs, planning, session, reporting, timeline, ADRs, business rules, taxonomy, and composite output — each supporting three detail levels (detailed, standard, summary). The Orchestrator runs generators in registration order, producing both detailed `docs-live/` references and compact `_claude-md/` summaries.
9
9
 
10
10
  ### Pipeline Stages
11
11
 
12
- | Stage | Module | Responsibility |
13
- | ----------- | -------------------------- | --------------------------------------------------------------- |
14
- | Scanner | `src/scanner/` | File discovery, AST parsing, opt-in via `@architect` |
15
- | Extractor | `src/extractor/` | Pattern extraction from TypeScript JSDoc and Gherkin tags |
16
- | Transformer | `src/generators/pipeline/` | MasterDataset with pre-computed views for O(1) access (ADR-006) |
17
- | Codec | `src/renderable/` | Pure functions: MasterDataset → RenderableDocument → Markdown |
12
+ | Stage | Module | Responsibility |
13
+ | ----------- | -------------------------- | -------------------------------------------------------------- |
14
+ | Scanner | `src/scanner/` | File discovery, AST parsing, opt-in via `@architect` |
15
+ | Extractor | `src/extractor/` | Pattern extraction from TypeScript JSDoc and Gherkin tags |
16
+ | Transformer | `src/generators/pipeline/` | PatternGraph with pre-computed views for O(1) access (ADR-006) |
17
+ | Codec | `src/renderable/` | Pure functions: PatternGraph → RenderableDocument → Markdown |
18
18
 
19
19
  ### Codec Inventory
20
20
 
@@ -33,7 +33,7 @@
33
33
  ## Key Invariants
34
34
 
35
35
  - Codec purity: Every codec is a pure function (dataset in, document out). No side effects, no filesystem access. Same input always produces same output
36
- - Single read model (ADR-006): All codecs consume MasterDataset. No codec reads raw scanner/extractor output. Anti-patterns: Parallel Pipeline, Lossy Local Type, Re-derived Relationship
36
+ - Single read model (ADR-006): All codecs consume PatternGraph. No codec reads raw scanner/extractor output. Anti-patterns: Parallel Pipeline, Lossy Local Type, Re-derived Relationship
37
37
  - Progressive disclosure: Every document renders at three detail levels (detailed, standard, summary) from the same codec. Summary feeds `_claude-md/` modules; detailed feeds `docs-live/reference/`
38
38
  - Config-driven generation: A single `ReferenceDocConfig` produces a complete document. Content sources compose in fixed order: conventions, diagrams, shapes, behaviors
39
39
  - RenderableDocument IR: Codecs express intent ("this is a table"), the renderer handles syntax ("pipe-delimited markdown"). Switching output format requires only a new renderer
@@ -59,20 +59,20 @@ Scoped architecture diagram showing component relationships:
59
59
  ```mermaid
60
60
  graph TB
61
61
  subgraph generator["Generator"]
62
- SourceMapper[/"SourceMapper"/]
63
- Documentation_Generation_Orchestrator("Documentation Generation Orchestrator")
64
62
  GitModule["GitModule"]
65
63
  GitHelpers["GitHelpers"]
66
64
  GitBranchDiff["GitBranchDiff"]
65
+ SourceMapper[/"SourceMapper"/]
66
+ Documentation_Generation_Orchestrator("Documentation Generation Orchestrator")
67
+ DesignReviewGenerator("DesignReviewGenerator")
68
+ DecisionDocGenerator("DecisionDocGenerator")
69
+ CliReferenceGenerator["CliReferenceGenerator"]
70
+ CliRecipeGenerator["CliRecipeGenerator"]
67
71
  TransformTypes["TransformTypes"]
68
72
  TransformDataset("TransformDataset")
69
73
  SequenceTransformUtils("SequenceTransformUtils")
70
74
  RelationshipResolver("RelationshipResolver")
71
75
  ContextInferenceImpl["ContextInferenceImpl"]
72
- ProcessApiReferenceGenerator["ProcessApiReferenceGenerator"]
73
- DesignReviewGenerator("DesignReviewGenerator")
74
- DecisionDocGenerator("DecisionDocGenerator")
75
- CliRecipeGenerator["CliRecipeGenerator"]
76
76
  end
77
77
  subgraph renderer["Renderer"]
78
78
  loadPreambleFromMarkdown___Shared_Markdown_to_SectionBlock_Parser["loadPreambleFromMarkdown — Shared Markdown-to-SectionBlock Parser"]
@@ -84,48 +84,48 @@ graph TB
84
84
  ArchitectureCodec[("ArchitectureCodec")]
85
85
  end
86
86
  subgraph related["Related"]
87
- MasterDataset["MasterDataset"]:::neighbor
87
+ PatternGraph["PatternGraph"]:::neighbor
88
88
  Pattern_Scanner["Pattern Scanner"]:::neighbor
89
89
  GherkinASTParser["GherkinASTParser"]:::neighbor
90
90
  ShapeExtractor["ShapeExtractor"]:::neighbor
91
91
  PatternHelpers["PatternHelpers"]:::neighbor
92
92
  ReferenceDocShowcase["ReferenceDocShowcase"]:::neighbor
93
- ProcessApiHybridGeneration["ProcessApiHybridGeneration"]:::neighbor
94
93
  ProceduralGuideCodec["ProceduralGuideCodec"]:::neighbor
95
94
  PatternRelationshipModel["PatternRelationshipModel"]:::neighbor
96
95
  DesignReviewGeneration["DesignReviewGeneration"]:::neighbor
96
+ CliReferenceGeneration["CliReferenceGeneration"]:::neighbor
97
97
  CliRecipeCodec["CliRecipeCodec"]:::neighbor
98
98
  ContextInference["ContextInference"]:::neighbor
99
99
  end
100
100
  loadPreambleFromMarkdown___Shared_Markdown_to_SectionBlock_Parser ..->|implements| ProceduralGuideCodec
101
+ GitModule -->|uses| GitBranchDiff
102
+ GitModule -->|uses| GitHelpers
101
103
  SourceMapper -.->|depends on| DecisionDocCodec
102
104
  SourceMapper -.->|depends on| ShapeExtractor
103
105
  SourceMapper -.->|depends on| GherkinASTParser
104
106
  Documentation_Generation_Orchestrator -->|uses| Pattern_Scanner
105
- GitModule -->|uses| GitBranchDiff
106
- GitModule -->|uses| GitHelpers
107
107
  PatternsCodec ..->|implements| PatternRelationshipModel
108
- DesignReviewCodec -->|uses| MasterDataset
108
+ DesignReviewCodec -->|uses| PatternGraph
109
109
  DesignReviewCodec -->|uses| MermaidDiagramUtils
110
110
  DesignReviewCodec ..->|implements| DesignReviewGeneration
111
111
  CompositeCodec ..->|implements| ReferenceDocShowcase
112
- ArchitectureCodec -->|uses| MasterDataset
113
- TransformTypes -->|uses| MasterDataset
114
- TransformDataset -->|uses| MasterDataset
115
- TransformDataset ..->|implements| PatternRelationshipModel
116
- SequenceTransformUtils -->|uses| MasterDataset
117
- SequenceTransformUtils ..->|implements| DesignReviewGeneration
118
- RelationshipResolver -->|uses| PatternHelpers
119
- ContextInferenceImpl ..->|implements| ContextInference
120
- ProcessApiReferenceGenerator ..->|implements| ProcessApiHybridGeneration
112
+ ArchitectureCodec -->|uses| PatternGraph
121
113
  DesignReviewGenerator -->|uses| DesignReviewCodec
122
- DesignReviewGenerator -->|uses| MasterDataset
114
+ DesignReviewGenerator -->|uses| PatternGraph
123
115
  DesignReviewGenerator ..->|implements| DesignReviewGeneration
124
116
  DecisionDocGenerator -.->|depends on| DecisionDocCodec
125
117
  DecisionDocGenerator -.->|depends on| SourceMapper
118
+ CliReferenceGenerator ..->|implements| CliReferenceGeneration
126
119
  CliRecipeGenerator ..->|implements| CliRecipeCodec
120
+ TransformTypes -->|uses| PatternGraph
121
+ TransformDataset -->|uses| PatternGraph
122
+ TransformDataset ..->|implements| PatternRelationshipModel
123
+ SequenceTransformUtils -->|uses| PatternGraph
124
+ SequenceTransformUtils ..->|implements| DesignReviewGeneration
125
+ RelationshipResolver -->|uses| PatternHelpers
126
+ ContextInferenceImpl ..->|implements| ContextInference
127
127
  DesignReviewGeneration -.->|depends on| MermaidDiagramUtils
128
- CliRecipeCodec -.->|depends on| ProcessApiHybridGeneration
128
+ CliRecipeCodec -.->|depends on| CliReferenceGeneration
129
129
  classDef neighbor stroke-dasharray: 5 5
130
130
  ```
131
131
 
@@ -133,13 +133,13 @@ graph TB
133
133
 
134
134
  ## API Types
135
135
 
136
- ### RuntimeMasterDataset (interface)
136
+ ### RuntimePatternGraph (interface)
137
137
 
138
138
  ```typescript
139
139
  /**
140
- * Runtime MasterDataset with optional workflow
140
+ * Runtime PatternGraph with optional workflow
141
141
  *
142
- * Extends the Zod-compatible MasterDataset with workflow reference.
142
+ * Extends the Zod-compatible PatternGraph with workflow reference.
143
143
  * LoadedWorkflow contains Maps which aren't JSON-serializable,
144
144
  * so it's kept separate from the Zod schema.
145
145
  *
@@ -147,7 +147,7 @@ graph TB
147
147
  ```
148
148
 
149
149
  ```typescript
150
- interface RuntimeMasterDataset extends MasterDataset {
150
+ interface RuntimePatternGraph extends PatternGraph {
151
151
  /** Optional workflow configuration (not serializable) */
152
152
  readonly workflow?: LoadedWorkflow;
153
153
  }
@@ -256,11 +256,11 @@ type CollapsibleBlock = {
256
256
  };
257
257
  ```
258
258
 
259
- ### transformToMasterDataset (function)
259
+ ### transformToPatternGraph (function)
260
260
 
261
261
  ```typescript
262
262
  /**
263
- * Transform raw extracted data into a MasterDataset with all pre-computed views.
263
+ * Transform raw extracted data into a PatternGraph with all pre-computed views.
264
264
  *
265
265
  * This is a ONE-PASS transformation that computes:
266
266
  * - Status-based groupings (completed/active/planned)
@@ -272,46 +272,46 @@ type CollapsibleBlock = {
272
272
  * - Optional relationship index
273
273
  *
274
274
  * Convenience wrapper that returns just the dataset.
275
- * Use `transformToMasterDatasetWithValidation` to get validation summary.
275
+ * Use `transformToPatternGraphWithValidation` to get validation summary.
276
276
  *
277
277
  * @param raw - Raw dataset with patterns, registry, and optional workflow
278
- * @returns MasterDataset with all pre-computed views
278
+ * @returns PatternGraph with all pre-computed views
279
279
  */
280
280
  ```
281
281
 
282
282
  ```typescript
283
- function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
283
+ function transformToPatternGraph(raw: RawDataset): RuntimePatternGraph;
284
284
  ```
285
285
 
286
286
  | Parameter | Type | Description |
287
287
  | --------- | ---- | ---------------------------------------------------------- |
288
288
  | raw | | Raw dataset with patterns, registry, and optional workflow |
289
289
 
290
- **Returns:** MasterDataset with all pre-computed views
290
+ **Returns:** PatternGraph with all pre-computed views
291
291
 
292
292
  ---
293
293
 
294
294
  ## Business Rules
295
295
 
296
- 92 patterns, 441 rules with invariants (442 total)
296
+ 93 patterns, 451 rules with invariants (452 total)
297
297
 
298
298
  ### ADR 005 Codec Based Markdown Rendering
299
299
 
300
- | Rule | Invariant | Rationale |
301
- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
302
- | Codecs implement a decode-only contract | Every codec is a pure function that accepts a MasterDataset and returns a RenderableDocument. Codecs do not perform side effects, do not write files, and do not access the filesystem. The codec contract is decode-only because the transformation is one-directional: structured data becomes a document, never the reverse. | Pure functions are deterministic and trivially testable. For the same MasterDataset, a codec always produces the same RenderableDocument. This makes snapshot testing reliable and enables codec output comparison across versions. |
303
- | RenderableDocument is a typed intermediate representation | RenderableDocument contains a title, an ordered array of SectionBlock elements, and an optional record of additional files. Each SectionBlock is a discriminated union: heading, paragraph, table, code, list, separator, or metaRow. The renderer consumes this IR without needing to know which codec produced it. | A typed IR decouples codecs from rendering. Codecs express intent ("this is a table with these rows") and the renderer handles syntax ("pipe-delimited markdown with separator row"). This means switching output format (e.g., HTML instead of markdown) requires only a new renderer, not changes to every codec. |
304
- | CompositeCodec assembles documents from child codecs | CompositeCodec accepts an array of child codecs and produces a single RenderableDocument by concatenating their sections. Child codec order determines section order in the output. Separators are inserted between children by default. | Reference documents combine content from multiple domains (patterns, conventions, shapes, diagrams). Rather than building a monolithic codec that knows about all content types, CompositeCodec lets each domain own its codec and composes them declaratively. |
305
- | ADR content comes from both Feature description and Rule prefixes | ADR structured content (Context, Decision, Consequences) can appear in two locations within a feature file. Both sources must be rendered. Silently dropping either source causes content loss. | Early ADRs used name prefixes like "Context - ..." and "Decision - ..." on Rule blocks to structure content. Later ADRs placed Context, Decision, and Consequences as bold-annotated prose in the Feature description, reserving Rule: blocks for invariants and design rules. Both conventions are valid. The ADR codec must handle both because the codebase contains ADRs authored in each style. The Feature description lives in pattern.directive.description. If the codec only renders Rules (via partitionRulesByPrefix), then Feature description content is silently dropped -- no error, no warning. This caused confusion across two repos where ADR content appeared in the feature file but was missing from generated docs. The fix renders pattern.directive.description in buildSingleAdrDocument between the Overview metadata table and the partitioned Rules section, using renderFeatureDescription() which walks content linearly and handles prose, tables, and DocStrings with correct interleaving. |
306
- | The markdown renderer is codec-agnostic | The renderer accepts any RenderableDocument regardless of which codec produced it. Rendering depends only on block types, not on document origin. This enables testing codecs and renderers independently. | If the renderer knew about specific codecs, adding a new codec would require renderer changes. By operating purely on the SectionBlock discriminated union, the renderer is closed for modification but open for extension via new block types. |
300
+ | Rule | Invariant | Rationale |
301
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
302
+ | Codecs implement a decode-only contract | Every codec is a pure function that accepts a PatternGraph and returns a RenderableDocument. Codecs do not perform side effects, do not write files, and do not access the filesystem. The codec contract is decode-only because the transformation is one-directional: structured data becomes a document, never the reverse. | Pure functions are deterministic and trivially testable. For the same PatternGraph, a codec always produces the same RenderableDocument. This makes snapshot testing reliable and enables codec output comparison across versions. |
303
+ | RenderableDocument is a typed intermediate representation | RenderableDocument contains a title, an ordered array of SectionBlock elements, and an optional record of additional files. Each SectionBlock is a discriminated union: heading, paragraph, table, code, list, separator, or metaRow. The renderer consumes this IR without needing to know which codec produced it. | A typed IR decouples codecs from rendering. Codecs express intent ("this is a table with these rows") and the renderer handles syntax ("pipe-delimited markdown with separator row"). This means switching output format (e.g., HTML instead of markdown) requires only a new renderer, not changes to every codec. |
304
+ | CompositeCodec assembles documents from child codecs | CompositeCodec accepts an array of child codecs and produces a single RenderableDocument by concatenating their sections. Child codec order determines section order in the output. Separators are inserted between children by default. | Reference documents combine content from multiple domains (patterns, conventions, shapes, diagrams). Rather than building a monolithic codec that knows about all content types, CompositeCodec lets each domain own its codec and composes them declaratively. |
305
+ | ADR content comes from both Feature description and Rule prefixes | ADR structured content (Context, Decision, Consequences) can appear in two locations within a feature file. Both sources must be rendered. Silently dropping either source causes content loss. | Early ADRs used name prefixes like "Context - ..." and "Decision - ..." on Rule blocks to structure content. Later ADRs placed Context, Decision, and Consequences as bold-annotated prose in the Feature description, reserving Rule: blocks for invariants and design rules. Both conventions are valid. The ADR codec must handle both because the codebase contains ADRs authored in each style. The Feature description lives in pattern.directive.description. If the codec only renders Rules (via partitionRulesByPrefix), then Feature description content is silently dropped -- no error, no warning. This caused confusion across two repos where ADR content appeared in the feature file but was missing from generated docs. The fix renders pattern.directive.description in buildSingleAdrDocument between the Overview metadata table and the partitioned Rules section, using renderFeatureDescription() which walks content linearly and handles prose, tables, and DocStrings with correct interleaving. |
306
+ | The markdown renderer is codec-agnostic | The renderer accepts any RenderableDocument regardless of which codec produced it. Rendering depends only on block types, not on document origin. This enables testing codecs and renderers independently. | If the renderer knew about specific codecs, adding a new codec would require renderer changes. By operating purely on the SectionBlock discriminated union, the renderer is closed for modification but open for extension via new block types. |
307
307
 
308
308
  ### ADR 006 Single Read Model Architecture
309
309
 
310
310
  | Rule | Invariant | Rationale |
311
311
  | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
312
- | All feature consumers query the read model, not raw state | Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the MasterDataset. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the MasterDataset. | Bypassing the read model forces consumers to re-derive data that the MasterDataset already computes, creating duplicate logic and divergent behavior when the pipeline evolves. |
313
- | No lossy local types | Consumers do not define local DTOs that duplicate and discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. | Lossy local types silently drop fields that later become needed, causing bugs that only surface when new MasterDataset capabilities are added and the local type lacks them. |
314
- | Relationship resolution is computed once | Forward relationships (uses, dependsOn, implementsPatterns) and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToMasterDataset()`. No consumer re-derives these from raw pattern arrays or scanned file tags. | Re-deriving relationships in consumers duplicates the resolution logic and risks inconsistency when different consumers implement subtly different traversal or filtering rules. |
312
+ | All feature consumers query the read model, not raw state | Code that needs pattern relationships, status groupings, cross-source resolution, or dependency information consumes the PatternGraph. Direct scanner/extractor imports are permitted only in pipeline orchestration code that builds the PatternGraph. | Bypassing the read model forces consumers to re-derive data that the PatternGraph already computes, creating duplicate logic and divergent behavior when the pipeline evolves. |
313
+ | No lossy local types | Consumers do not define local DTOs that duplicate and discard fields from ExtractedPattern. If a consumer needs a subset, the type system provides the projection — not a hand-written extraction function that becomes a barrier between the consumer and canonical data. | Lossy local types silently drop fields that later become needed, causing bugs that only surface when new PatternGraph capabilities are added and the local type lacks them. |
314
+ | Relationship resolution is computed once | Forward relationships (uses, dependsOn, implementsPatterns) and reverse lookups (usedBy, implementedBy, extendedBy) are computed in `transformToPatternGraph()`. No consumer re-derives these from raw pattern arrays or scanned file tags. | Re-deriving relationships in consumers duplicates the resolution logic and risks inconsistency when different consumers implement subtly different traversal or filtering rules. |
315
315
  | Three named anti-patterns | These are recognized violations, serving as review criteria for new code and refactoring targets for existing code. | Without named anti-patterns, violations appear as one-off style issues rather than systematic architectural drift, making them harder to detect and communicate in code review. |
316
316
 
317
317
  ### Arch Generator Registration
@@ -343,37 +343,37 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
343
343
 
344
344
  ### Architecture Diagram Core
345
345
 
346
- | Rule | Invariant | Rationale |
347
- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
348
- | Architecture tags exist in the tag registry | Three architecture-specific tags (`arch-role`, `arch-context`, `arch-layer`) must exist in the tag registry with correct format and enum values. | Architecture diagram generation requires metadata to classify source files into diagram components. Standard tag infrastructure enables consistent extraction via the existing AST parser. |
349
- | AST parser extracts architecture tags from TypeScript | The AST parser must extract `arch-role`, `arch-context`, and `arch-layer` tags from TypeScript JSDoc comments into DocDirective objects. | Source code annotations are the single source of truth for architectural metadata. Parser must extract them alongside existing pattern metadata. |
350
- | MasterDataset builds archIndex during transformation | The `transformToMasterDataset` function must build an `archIndex` that groups patterns by role, context, and layer for efficient diagram generation. | Single-pass extraction during dataset transformation avoids expensive re-traversal. Index structure enables O(1) lookup by each dimension. |
351
- | Component diagrams group patterns by bounded context | Component diagrams must render patterns as nodes grouped into bounded context subgraphs, with relationship arrows using UML-inspired styles. | Component diagrams visualize system architecture showing how bounded contexts isolate components. Subgraphs enforce visual separation. |
346
+ | Rule | Invariant | Rationale |
347
+ | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
348
+ | Architecture tags exist in the tag registry | Three architecture-specific tags (`arch-role`, `arch-context`, `arch-layer`) must exist in the tag registry with correct format and enum values. | Architecture diagram generation requires metadata to classify source files into diagram components. Standard tag infrastructure enables consistent extraction via the existing AST parser. |
349
+ | AST parser extracts architecture tags from TypeScript | The AST parser must extract `arch-role`, `arch-context`, and `arch-layer` tags from TypeScript JSDoc comments into DocDirective objects. | Source code annotations are the single source of truth for architectural metadata. Parser must extract them alongside existing pattern metadata. |
350
+ | PatternGraph builds archIndex during transformation | The `transformToPatternGraph` function must build an `archIndex` that groups patterns by role, context, and layer for efficient diagram generation. | Single-pass extraction during dataset transformation avoids expensive re-traversal. Index structure enables O(1) lookup by each dimension. |
351
+ | Component diagrams group patterns by bounded context | Component diagrams must render patterns as nodes grouped into bounded context subgraphs, with relationship arrows using UML-inspired styles. | Component diagrams visualize system architecture showing how bounded contexts isolate components. Subgraphs enforce visual separation. |
352
352
 
353
353
  ### Architecture Doc Refactoring
354
354
 
355
- | Rule | Invariant | Rationale |
356
- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
357
- | Convention-tagged JSDoc produces machine-extractable codec documentation | Every codec source file annotated with `@architect-convention<br> codec-registry` must have structured JSDoc following the machine-extractable format. The convention extractor splits multi-codec files by `## Heading` into separate convention rules, each rendered as its own section in the generated reference document. | DD-1: Convention tag approach over dedicated codec. Rather than creating a new "codec inventory" codec that enumerates codecs from source, the existing convention-tag mechanism is reused. Each codec file's JSDoc is treated as convention rules tagged with `codec-registry`. This avoids new codec infrastructure and leverages the proven convention extractor path. The reference codec already handles 4-layer composition, so convention tags slot into the existing Layer 1 (conventions) position. |
358
- | Machine-extractable JSDoc format follows structured heading convention | DD-2: Multi-codec JSDoc splitting uses one `## Heading` per codec per file. Each heading block contains structured fields in a fixed order: `**Purpose:**` one-liner, `**Output Files:**` file paths, options table with Type/Default/Description columns, `**When to Use:**` bullet list, and `**Factory Pattern:**` code example. Fields are optional -- codecs without options omit the table, codecs without factory patterns omit the code block. | The convention extractor uses `## ` heading regex to split descriptions into rules. Without this structure, a file like `session.ts` (3 codecs) would produce a single undifferentiated blob. The heading text becomes the convention rule title in the generated reference. The fixed field order ensures consistent rendering across all 20+ codec entries. |
359
- | Heading match in convention extractor handles whitespace correctly | The convention extractor's heading parser uses `matchEnd` (the character position after the full regex match) rather than `indexOf('\n',<br> heading.index)` to calculate where content starts after a heading. This prevents the `\s*` prefix in the heading regex from consuming leading newlines, which would cause `heading.index` to point to those newlines instead of the heading text. | Discovered during Phase 2 implementation. The heading regex `/^\s*##\s+(.+)$/gm` matches headings with optional leading whitespace. When a heading has leading newlines, `heading.index` points to the first newline (part of the `\s*` match), not the `##` character. Using `indexOf('\n', heading.index)` then finds the newline BEFORE the heading, producing content that includes the heading text itself. The fix uses the regex match's end position directly. |
360
- | Section disposition follows content-type routing | DD-3: Each ARCHITECTURE.md section is routed based on content type. Three routing strategies apply: (1) product area absorption -- sections describing a specific pipeline stage move to the corresponding product area document where they get live diagrams and relationship graphs; (2) generated shapes -- sections documenting TypeScript interfaces move to generated shape reference docs; (3) generated diagrams -- ASCII/text data flow diagrams are replaced by live Mermaid diagrams generated from architecture annotations. | The routing heuristic is: if a generated equivalent already exists, replace with pointer; if content is convention-taggable in source files, tag and generate; if editorial content that cannot be expressed as annotations, retain. This ensures each section lands in the location with the best maintenance model for its content type. |
361
- | Product area absorption validates content coverage before pointer replacement | DD-4: Product area absorption replaces ARCHITECTURE.md sections with pointers only when the target product area document already covers the equivalent content. Three sections route to product areas: Configuration Architecture (L70-139) to CONFIGURATION.md, Source Systems (L585-692) to ANNOTATION.md, and Workflow Integration (L959-1068) to PROCESS.md. Annotation format examples from Source Systems merge into the Four-Stage Pipeline retained section rather than being lost. Workflow API code examples are dropped -- Claude reads source files directly. | Product area documents are generated from annotated source code and already contain live diagrams, relationship graphs, and API types. Absorbing manual Architecture sections into these generated docs eliminates drift while preserving the content in a maintained location. The key test is: does the product area doc cover the same technical facts? If yes, the manual section becomes a 4-line pointer. |
362
- | MasterDataset shapes generate a dedicated ARCHITECTURE-TYPES reference document | DD-6: A new ReferenceDocConfig produces ARCHITECTURE-TYPES.md using shapeSelectors with group master-dataset to extract MasterDataset schema types, RuntimeMasterDataset, RawDataset, PipelineOptions, and PipelineResult. Source files tagged with @architect-shape master-dataset and @architect-include master-dataset contribute shapes to the reference doc. The Unified Transformation section (L345-478) is replaced with a condensed narrative (~15 lines) and pointer to ARCHITECTURE-TYPES.md. | The MasterDataset is the central data structure -- the sole read model per ADR-006. It deserves dedicated reference doc treatment alongside ARCHITECTURE-CODECS.md. Shape extraction from TypeScript declarations provides exact type signatures that stay in sync with code, unlike the manual schema table in ARCHITECTURE.md. |
363
- | Pipeline architecture convention content replaces ASCII data flow diagrams | DD-7: The Data Flow Diagrams section (L774-957) contains 4 ASCII diagrams totaling ~183 lines. These are replaced using a hybrid approach: convention tag pipeline-architecture (already registered, currently unused) on orchestrator.ts and build-pipeline.ts produces prose descriptions of pipeline steps and consumer architecture. A new master-dataset-views hardcoded diagram source generates a Mermaid fan-out diagram showing dataset view relationships. DD-8: Both convention content and diagram source are configured on the ARCHITECTURE-TYPES.md ReferenceDocConfig, keeping all architecture reference content in one generated document. | ASCII diagrams cannot be generated from code annotations. The hybrid approach maximizes generated coverage: convention-tagged JSDoc captures the narrative (pipeline steps, ADR-006 consumer pattern) while the hardcoded diagram source produces visual Mermaid output. Using the already-registered pipeline-architecture convention tag avoids new taxonomy entries. |
364
- | Usefulness-driven editorial trimming targets Claude as primary consumer | DD-9: ARCHITECTURE.md serves Claude (primary audience) and human developers (secondary). Content retained must answer architectural "why" and "how things connect" questions. Content available via source file reads or generated reference documents is removed. Post-decomposition target: ~320 lines (~75% reduction from 1,287 lines). Sections dropped entirely: Programmatic Usage (L1070-1125) and Extending the System (L1127-1194) -- Claude reads source files directly and infers extension patterns from existing codec implementations. DD-5: Key Design Patterns section (L693-772) trimmed from ~80 to ~15 lines: Result Monad becomes a pointer to CORE-TYPES.md, Schema-First Validation becomes a 3-line summary with source pointer, Tag Registry becomes a 4-line summary with source pointer. | Claude has direct access to source files and generated reference docs. Duplicating this content in ARCHITECTURE.md wastes context window tokens. The remaining editorial sections (Executive Summary, Four-Stage Pipeline, Codec Architecture, Progressive Disclosure) provide the mental model and architectural "why" that cannot be inferred from code alone. |
355
+ | Rule | Invariant | Rationale |
356
+ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
357
+ | Convention-tagged JSDoc produces machine-extractable codec documentation | Every codec source file annotated with `@architect-convention<br> codec-registry` must have structured JSDoc following the machine-extractable format. The convention extractor splits multi-codec files by `## Heading` into separate convention rules, each rendered as its own section in the generated reference document. | DD-1: Convention tag approach over dedicated codec. Rather than creating a new "codec inventory" codec that enumerates codecs from source, the existing convention-tag mechanism is reused. Each codec file's JSDoc is treated as convention rules tagged with `codec-registry`. This avoids new codec infrastructure and leverages the proven convention extractor path. The reference codec already handles 4-layer composition, so convention tags slot into the existing Layer 1 (conventions) position. |
358
+ | Machine-extractable JSDoc format follows structured heading convention | DD-2: Multi-codec JSDoc splitting uses one `## Heading` per codec per file. Each heading block contains structured fields in a fixed order: `**Purpose:**` one-liner, `**Output Files:**` file paths, options table with Type/Default/Description columns, `**When to Use:**` bullet list, and `**Factory Pattern:**` code example. Fields are optional -- codecs without options omit the table, codecs without factory patterns omit the code block. | The convention extractor uses `## ` heading regex to split descriptions into rules. Without this structure, a file like `session.ts` (3 codecs) would produce a single undifferentiated blob. The heading text becomes the convention rule title in the generated reference. The fixed field order ensures consistent rendering across all 20+ codec entries. |
359
+ | Heading match in convention extractor handles whitespace correctly | The convention extractor's heading parser uses `matchEnd` (the character position after the full regex match) rather than `indexOf('\n',<br> heading.index)` to calculate where content starts after a heading. This prevents the `\s*` prefix in the heading regex from consuming leading newlines, which would cause `heading.index` to point to those newlines instead of the heading text. | Discovered during Phase 2 implementation. The heading regex `/^\s*##\s+(.+)$/gm` matches headings with optional leading whitespace. When a heading has leading newlines, `heading.index` points to the first newline (part of the `\s*` match), not the `##` character. Using `indexOf('\n', heading.index)` then finds the newline BEFORE the heading, producing content that includes the heading text itself. The fix uses the regex match's end position directly. |
360
+ | Section disposition follows content-type routing | DD-3: Each ARCHITECTURE.md section is routed based on content type. Three routing strategies apply: (1) product area absorption -- sections describing a specific pipeline stage move to the corresponding product area document where they get live diagrams and relationship graphs; (2) generated shapes -- sections documenting TypeScript interfaces move to generated shape reference docs; (3) generated diagrams -- ASCII/text data flow diagrams are replaced by live Mermaid diagrams generated from architecture annotations. | The routing heuristic is: if a generated equivalent already exists, replace with pointer; if content is convention-taggable in source files, tag and generate; if editorial content that cannot be expressed as annotations, retain. This ensures each section lands in the location with the best maintenance model for its content type. |
361
+ | Product area absorption validates content coverage before pointer replacement | DD-4: Product area absorption replaces ARCHITECTURE.md sections with pointers only when the target product area document already covers the equivalent content. Three sections route to product areas: Configuration Architecture (L70-139) to CONFIGURATION.md, Source Systems (L585-692) to ANNOTATION.md, and Workflow Integration (L959-1068) to PROCESS.md. Annotation format examples from Source Systems merge into the Four-Stage Pipeline retained section rather than being lost. Workflow API code examples are dropped -- Claude reads source files directly. | Product area documents are generated from annotated source code and already contain live diagrams, relationship graphs, and API types. Absorbing manual Architecture sections into these generated docs eliminates drift while preserving the content in a maintained location. The key test is: does the product area doc cover the same technical facts? If yes, the manual section becomes a 4-line pointer. |
362
+ | PatternGraph shapes generate a dedicated ARCHITECTURE-TYPES reference document | DD-6: A new ReferenceDocConfig produces ARCHITECTURE-TYPES.md using shapeSelectors with group pattern-graph to extract PatternGraph schema types, RuntimePatternGraph, RawDataset, PipelineOptions, and PipelineResult. Source files tagged with @architect-shape pattern-graph contribute shapes to the reference doc. The Unified Transformation section (L345-478) is replaced with a condensed narrative (~15 lines) and pointer to ARCHITECTURE-TYPES.md. | The PatternGraph is the central data structure -- the sole read model per ADR-006. It deserves dedicated reference doc treatment alongside ARCHITECTURE-CODECS.md. Shape extraction from TypeScript declarations provides exact type signatures that stay in sync with code, unlike the manual schema table in ARCHITECTURE.md. |
363
+ | Pipeline architecture convention content replaces ASCII data flow diagrams | DD-7: The Data Flow Diagrams section (L774-957) contains 4 ASCII diagrams totaling ~183 lines. These are replaced using a hybrid approach: convention tag pipeline-architecture (already registered, currently unused) on orchestrator.ts and build-pipeline.ts produces prose descriptions of pipeline steps and consumer architecture. A new pattern-graph-views hardcoded diagram source generates a Mermaid fan-out diagram showing dataset view relationships. DD-8: Both convention content and diagram source are configured on the ARCHITECTURE-TYPES.md ReferenceDocConfig, keeping all architecture reference content in one generated document. | ASCII diagrams cannot be generated from code annotations. The hybrid approach maximizes generated coverage: convention-tagged JSDoc captures the narrative (pipeline steps, ADR-006 consumer pattern) while the hardcoded diagram source produces visual Mermaid output. Using the already-registered pipeline-architecture convention tag avoids new taxonomy entries. |
364
+ | Usefulness-driven editorial trimming targets Claude as primary consumer | DD-9: ARCHITECTURE.md serves Claude (primary audience) and human developers (secondary). Content retained must answer architectural "why" and "how things connect" questions. Content available via source file reads or generated reference documents is removed. Post-decomposition target: ~320 lines (~75% reduction from 1,287 lines). Sections dropped entirely: Programmatic Usage (L1070-1125) and Extending the System (L1127-1194) -- Claude reads source files directly and infers extension patterns from existing codec implementations. DD-5: Key Design Patterns section (L693-772) trimmed from ~80 to ~15 lines: Result Monad becomes a pointer to CORE-TYPES.md, Schema-First Validation becomes a 3-line summary with source pointer, Tag Registry becomes a 4-line summary with source pointer. | Claude has direct access to source files and generated reference docs. Duplicating this content in ARCHITECTURE.md wastes context window tokens. The remaining editorial sections (Executive Summary, Four-Stage Pipeline, Codec Architecture, Progressive Disclosure) provide the mental model and architectural "why" that cannot be inferred from code alone. |
365
365
 
366
366
  ### Architecture Doc Refactoring Testing
367
367
 
368
- | Rule | Invariant | Rationale |
369
- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
370
- | Product area sections coexist with generated documents | Each architecture section in docs/ARCHITECTURE.md has a corresponding generated document in docs-live/product-areas/ covering equivalent content from annotated sources. | Manual and generated docs must coexist during the transition period. Generated docs prove that annotated sources produce equivalent coverage before manual sections are deprecated. |
371
- | Four-Stage Pipeline section retains annotation format examples | The Four-Stage Pipeline section contains annotation format examples (e.g., @architect-shape, extract-shapes) and appears before the Source Systems section in document order. | Annotation format examples in the pipeline section demonstrate the source-first architecture. Their ordering establishes the conceptual flow: pipeline stages first, then the source systems that feed them. |
372
- | Convention extraction produces ARCHITECTURE-CODECS reference document | The ARCHITECTURE-CODECS.md reference document is generated from convention-tagged JSDoc in codec source files and contains structured sections for each codec with output file references. | Codec documentation must stay synchronized with source code. Convention extraction from JSDoc ensures the reference document reflects actual codec implementations rather than manually maintained descriptions that drift. |
373
- | Full sections coexist with generated equivalents in docs-live | Major sections of ARCHITECTURE.md (Unified Transformation, Data Flow Diagrams, Quick Reference) are retained alongside their generated equivalents in docs-live/reference/. | Generated reference documents (ARCHITECTURE-TYPES.md, ARCHITECTURE-CODECS.md) provide exhaustive type and codec listings, but the manual sections offer architectural narrative and design rationale that generated docs cannot yet replicate. |
374
- | MasterDataset shapes appear in ARCHITECTURE-TYPES reference | The ARCHITECTURE-TYPES.md reference document contains core MasterDataset types (MasterDataset, RuntimeMasterDataset, RawDataset) and pipeline types (PipelineOptions, PipelineResult) extracted from shape annotations. | Type shapes are the structural backbone of the pipeline. Generating their documentation from annotations ensures the reference always matches the actual TypeScript interfaces, eliminating manual drift. |
375
- | Pipeline architecture convention appears in generated reference | Source files in the pipeline layer (orchestrator.ts, build-pipeline.ts) carry the pipeline-architecture convention tag, enabling convention extraction into the ARCHITECTURE-TYPES reference document. | Convention tags on pipeline source files are the mechanism that feeds content into generated reference docs. Without these tags, the architecture reference would have no source material to extract. |
376
- | Full ARCHITECTURE.md retains all sections with substantial content | ARCHITECTURE.md retains all major sections (Programmatic Usage, Extending the System, Key Design Patterns) with substantial content and remains under 1700 lines as a comprehensive reference. | These sections contain editorial content (usage examples, extension guides, design pattern explanations) that cannot be generated from annotations. They remain manual until procedural guide codecs can replicate their depth. |
368
+ | Rule | Invariant | Rationale |
369
+ | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
370
+ | Product area sections coexist with generated documents | Each architecture section in docs/ARCHITECTURE.md has a corresponding generated document in docs-live/product-areas/ covering equivalent content from annotated sources. | Manual and generated docs must coexist during the transition period. Generated docs prove that annotated sources produce equivalent coverage before manual sections are deprecated. |
371
+ | Four-Stage Pipeline section retains annotation format examples | The Four-Stage Pipeline section contains annotation format examples (e.g., @architect-shape, extract-shapes) and appears before the Source Systems section in document order. | Annotation format examples in the pipeline section demonstrate the source-first architecture. Their ordering establishes the conceptual flow: pipeline stages first, then the source systems that feed them. |
372
+ | Convention extraction produces ARCHITECTURE-CODECS reference document | The ARCHITECTURE-CODECS.md reference document is generated from convention-tagged JSDoc in codec source files and contains structured sections for each codec with output file references. | Codec documentation must stay synchronized with source code. Convention extraction from JSDoc ensures the reference document reflects actual codec implementations rather than manually maintained descriptions that drift. |
373
+ | Full sections coexist with generated equivalents in docs-live | Major sections of ARCHITECTURE.md (Unified Transformation, Data Flow Diagrams, Quick Reference) are retained alongside their generated equivalents in docs-live/reference/. | Generated reference documents (ARCHITECTURE-TYPES.md, ARCHITECTURE-CODECS.md) provide exhaustive type and codec listings, but the manual sections offer architectural narrative and design rationale that generated docs cannot yet replicate. |
374
+ | PatternGraph shapes appear in ARCHITECTURE-TYPES reference | The ARCHITECTURE-TYPES.md reference document contains core PatternGraph types (PatternGraph, RuntimePatternGraph, RawDataset) and pipeline types (PipelineOptions, PipelineResult) extracted from shape annotations. | Type shapes are the structural backbone of the pipeline. Generating their documentation from annotations ensures the reference always matches the actual TypeScript interfaces, eliminating manual drift. |
375
+ | Pipeline architecture convention appears in generated reference | Source files in the pipeline layer (orchestrator.ts, build-pipeline.ts) carry the pipeline-architecture convention tag, enabling convention extraction into the ARCHITECTURE-TYPES reference document. | Convention tags on pipeline source files are the mechanism that feeds content into generated reference docs. Without these tags, the architecture reference would have no source material to extract. |
376
+ | Full ARCHITECTURE.md retains all sections with substantial content | ARCHITECTURE.md retains all major sections (Programmatic Usage, Extending the System, Key Design Patterns) with substantial content and remains under 1700 lines as a comprehensive reference. | These sections contain editorial content (usage examples, extension guides, design pattern explanations) that cannot be generated from annotations. They remain manual until procedural guide codecs can replicate their depth. |
377
377
 
378
378
  ### Arch Tag Extraction
379
379
 
@@ -427,19 +427,27 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
427
427
 
428
428
  ### Cli Recipe Codec
429
429
 
430
- | Rule | Invariant | Rationale |
431
- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
432
- | CLI recipes are a separate generator from reference tables | The `CliRecipeGenerator` is a standalone sibling to `ProcessApiReferenceGenerator`, not an extension of it. Both implement `DocumentGenerator`, both consume `CLI_SCHEMA` directly, and both produce independent `OutputFile[]` via the standard orchestrator write path. The recipe generator produces `docs-live/reference/PROCESS-API-RECIPES.md` while the reference generator produces `docs-live/reference/PROCESS-API-REFERENCE.md`. | Reference tables and recipe guides serve different audiences and change at different cadences. Reference tables change when CLI flags are added or removed. Recipes change when workflow recommendations evolve. Coupling them in one generator would force both to change together and make the generator responsible for two distinct content types. ProcessApiReferenceGenerator is already completed and tested (Phase 43) -- extending it risks regressions. Two small standalone generators are easier to test and maintain than one large one. |
433
- | Recipe content uses a structured schema extension | `CLI_SCHEMA` is extended with a `recipes` field containing `RecipeGroup[]`. Each `RecipeGroup` has a title, optional description, and an array of `RecipeExample` objects. Each `RecipeExample` has a title, a purpose description, an array of RecipeStep entries (each with a command string and optional comment), and an optional expected output block. The schema extension is additive -- existing `CLIOptionGroup` types are unchanged. | Recipes are multi-command sequences ("run these 3 commands in order") with explanatory context. They do not fit into `CLIOptionGroup` which models individual flags. A separate `RecipeGroup[]` keeps the schema type-safe and makes recipes independently testable. Static expected output strings in the schema are deterministic -- no build-time CLI execution needed. |
434
- | Narrative prose uses preamble mechanism | Editorial content that cannot be derived from the CLI schema -- specifically "Why Use This" motivational prose, the Quick Start example with output, and the session type decision tree -- uses a preamble mechanism in the generator configuration. Preamble content is manually authored in `architect.config.ts` as structured section data and appears before all generated recipe content in the output file. | The "Why Use This" section explains the value proposition of the Data API CLI with a comparison table (CLI vs reading markdown). This is editorial judgment, not derivable from command metadata. The Quick Start shows a specific 3-command workflow with example terminal output. The session decision tree maps cognitive states ("Starting to code?") to session types. None of these have a source annotation -- they are instructional content authored for human understanding. The preamble mechanism exists precisely for this (proven by DocsConsolidationStrategy Phase 2 preamble implementation). |
435
- | Generated recipe file complements manual PROCESS-API.md | After this pattern completes, `docs/PROCESS-API.md` is trimmed to a slim editorial introduction (~30 lines) containing the document title, a one-paragraph purpose statement, and links to both generated files: `docs-live/reference/PROCESS-API-REFERENCE.md` (option tables from Phase 43) and `docs-live/reference/PROCESS-API-RECIPES.md` (recipes and narratives from this pattern). The manual file retains the JSON Envelope, Exit Codes, and JSON Piping sections (~40 lines) which are operational reference unlikely to drift. All other prose sections are replaced by the generated recipe file. | Phase 43 established the hybrid pattern: keep editorial prose in the manual file, extract derivable content to generated files. This pattern extends the hybrid by recognizing that recipe content IS derivable from a structured schema. The ~460 lines of command descriptions, example output, and recipe blocks can be maintained as schema data rather than freeform markdown. What remains in the manual file (~70 lines total) is true operational reference (JSON envelope format, exit codes, piping tips) that changes rarely and has no schema source. |
436
- | Command narrative descriptions are sourced from schema metadata | Each command group in the generated recipe file includes a narrative description sourced from the CLI schema, not hardcoded in the generator. The existing `CLIOptionGroup.description` and `CLIOptionGroup.postNote` fields carry per-group narrative text. For command groups not currently in CLI_SCHEMA (Session Workflow Commands, Pattern Discovery, Architecture Queries, Metadata and Inventory), new `CommandGroup` entries are added to the schema with title, description, and per-command narrative metadata. | The manual PROCESS-API.md contains narrative descriptions for each command ("Highest-impact command. Pre-flight readiness check that prevents wasted sessions.") that are valuable developer context. Hardcoding these in the generator would create a second maintenance location. Placing them in CLI_SCHEMA co-locates command metadata (what the command does) with command definition (what flags it accepts), following the same single-source-of-truth principle that drove Phase 43. |
430
+ | Rule | Invariant | Rationale |
431
+ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
432
+ | CLI recipes are a separate generator from reference tables | The `CliRecipeGenerator` is a standalone sibling to `CliReferenceGenerator`, not an extension of it. Both implement `DocumentGenerator`, both consume `CLI_SCHEMA` directly, and both produce independent `OutputFile[]` via the standard orchestrator write path. The recipe generator produces `docs-live/reference/CLI-RECIPES.md` while the reference generator produces `docs-live/reference/CLI-REFERENCE.md`. | Reference tables and recipe guides serve different audiences and change at different cadences. Reference tables change when CLI flags are added or removed. Recipes change when workflow recommendations evolve. Coupling them in one generator would force both to change together and make the generator responsible for two distinct content types. CliReferenceGenerator is already completed and tested (Phase 43) -- extending it risks regressions. Two small standalone generators are easier to test and maintain than one large one. |
433
+ | Recipe content uses a structured schema extension | `CLI_SCHEMA` is extended with a `recipes` field containing `RecipeGroup[]`. Each `RecipeGroup` has a title, optional description, and an array of `RecipeExample` objects. Each `RecipeExample` has a title, a purpose description, an array of RecipeStep entries (each with a command string and optional comment), and an optional expected output block. The schema extension is additive -- existing `CLIOptionGroup` types are unchanged. | Recipes are multi-command sequences ("run these 3 commands in order") with explanatory context. They do not fit into `CLIOptionGroup` which models individual flags. A separate `RecipeGroup[]` keeps the schema type-safe and makes recipes independently testable. Static expected output strings in the schema are deterministic -- no build-time CLI execution needed. |
434
+ | Narrative prose uses preamble mechanism | Editorial content that cannot be derived from the CLI schema -- specifically "Why Use This" motivational prose, the Quick Start example with output, and the session type decision tree -- uses a preamble mechanism in the generator configuration. Preamble content is manually authored in `architect.config.ts` as structured section data and appears before all generated recipe content in the output file. | The "Why Use This" section explains the value proposition of the Data API CLI with a comparison table (CLI vs reading markdown). This is editorial judgment, not derivable from command metadata. The Quick Start shows a specific 3-command workflow with example terminal output. The session decision tree maps cognitive states ("Starting to code?") to session types. None of these have a source annotation -- they are instructional content authored for human understanding. The preamble mechanism exists precisely for this (proven by DocsConsolidationStrategy Phase 2 preamble implementation). |
435
+ | Generated recipe file complements manual CLI.md | After this pattern completes, `docs/CLI.md` is trimmed to a slim editorial introduction (~30 lines) containing the document title, a one-paragraph purpose statement, and links to both generated files: `docs-live/reference/CLI-REFERENCE.md` (option tables from Phase 43) and `docs-live/reference/CLI-RECIPES.md` (recipes and narratives from this pattern). The manual file retains the JSON Envelope, Exit Codes, and JSON Piping sections (~40 lines) which are operational reference unlikely to drift. All other prose sections are replaced by the generated recipe file. | Phase 43 established the hybrid pattern: keep editorial prose in the manual file, extract derivable content to generated files. This pattern extends the hybrid by recognizing that recipe content IS derivable from a structured schema. The ~460 lines of command descriptions, example output, and recipe blocks can be maintained as schema data rather than freeform markdown. What remains in the manual file (~70 lines total) is true operational reference (JSON envelope format, exit codes, piping tips) that changes rarely and has no schema source. |
436
+ | Command narrative descriptions are sourced from schema metadata | Each command group in the generated recipe file includes a narrative description sourced from the CLI schema, not hardcoded in the generator. The existing `CLIOptionGroup.description` and `CLIOptionGroup.postNote` fields carry per-group narrative text. For command groups not currently in CLI_SCHEMA (Session Workflow Commands, Pattern Discovery, Architecture Queries, Metadata and Inventory), new `CommandGroup` entries are added to the schema with title, description, and per-command narrative metadata. | The manual CLI.md contains narrative descriptions for each command ("Highest-impact command. Pre-flight readiness check that prevents wasted sessions.") that are valuable developer context. Hardcoding these in the generator would create a second maintenance location. Placing them in CLI_SCHEMA co-locates command metadata (what the command does) with command definition (what flags it accepts), following the same single-source-of-truth principle that drove Phase 43. |
437
+
438
+ ### Cli Reference Generation
439
+
440
+ | Rule | Invariant | Rationale |
441
+ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
442
+ | CLI schema is single source of truth for reference tables | A declarative CLI schema in `src/cli/cli-schema.ts` defines all global options, output modifiers, and list filters with their flags, descriptions, defaults, and value types. The three reference tables in `docs-live/reference/CLI-REFERENCE.md` are generated from this schema by a standalone `CliReferenceGenerator`. The schema also drives `showHelp()`. | CLI options are defined imperatively in `parseArgs()` (lines 132-265 of `src/cli/pattern-graph-cli.ts`) and `OutputModifiers`/`ListFilters` interfaces (lines 43-83 of `src/cli/output-pipeline.ts`). A declarative schema extracts this into a single structured definition that both documentation and help text consume. The existing `ReferenceDocConfig` system cannot be used because it sources from PatternGraph (annotation-derived data), not static constants (ADR-006). |
443
+ | Narrative prose sections remain manual | CLI.md sections covering "Why Use This", session type decision tree, workflow recipes, worked examples with expected output, and "Common Recipes" are not generated. They require editorial judgment and context that cannot be extracted from code annotations. The document's value comes from these sections — the generated reference tables are supporting material only. | Generated docs without prose context would be a bare options table — usable as reference but not as a learning resource. The hybrid approach gives both: accurate tables from code, readable narrative from editorial work. |
444
+ | Standalone generator respects ADR-006 single read model | The `CliReferenceGenerator` imports CLI schema data directly from `src/cli/cli-schema.ts`. It does NOT inject CLI data into PatternGraph or consume PatternGraph for table generation. It implements `DocumentGenerator` and returns `OutputFile[]` via the standard orchestrator write path. | ADR-006 establishes PatternGraph as the sole read model for annotation-sourced data. CLI schema is a static TypeScript constant, not extracted from annotations. Forcing it through PatternGraph would violate the "no parallel pipeline" anti-pattern. A standalone generator with its own data source is architecturally correct. |
437
445
 
438
446
  ### Codec Based Generator Testing
439
447
 
440
- | Rule | Invariant | Rationale |
441
- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
442
- | CodecBasedGenerator adapts codecs to generator interface | CodecBasedGenerator delegates document generation to the underlying codec and surfaces codec errors through the generator interface. | The adapter pattern enables codec-based rendering to integrate with the existing orchestrator without modifying either side. |
448
+ | Rule | Invariant | Rationale |
449
+ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
450
+ | CodecBasedGenerator adapts codecs to generator interface | CodecBasedGenerator delegates document generation to the underlying codec and surfaces codec errors through the generator interface. | The adapter pattern enables codec-based rendering to integrate with the existing orchestrator without modifying either side. PatternGraph is required in context — enforced by the TypeScript type system, not at runtime. |
443
451
 
444
452
  ### Codec Behavior Testing
445
453
 
@@ -564,18 +572,18 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
564
572
 
565
573
  ### Design Review Generation
566
574
 
567
- | Rule | Invariant | Rationale |
568
- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
569
- | SequenceIndex pre-computes ordered steps from rule-level tags | The MasterDataset sequenceIndex contains one entry per pattern that has the `architect-sequence-orchestrator` tag and at least one rule with the `architect-sequence-step` tag. Steps are sorted by stepNumber. Participants are deduplicated and ordered with orchestrator first. | Pre-computing in the transform pass avoids repeated parsing in the codec. ADR-006 mandates the MasterDataset as the sole read model. Downstream consumers (codec, process API) read structured data, not raw tags. |
570
- | DesignReviewCodec generates sequence diagrams from ordered steps | The sequence diagram contains participants derived from `@architect-sequence-module` tags, Note blocks from Rule names, call arrows from Input/Output markers, and alt blocks from `@architect-sequence-error` scenarios. Participant order follows step order with User and orchestrator first. | Sequence diagrams verify interaction ordering and error handling completeness. Auto-generation ensures diagrams stay synchronized with spec annotations. Manual diagrams drift within days of a spec edit. |
571
- | DesignReviewCodec generates component diagrams from data flow types | The component diagram groups modules into subgraphs by shared Input type, renders distinct Output types as hexagon nodes with field lists, and draws directed edges showing data flow through the orchestrator. No circular edges exist in the generated diagram. | Component diagrams verify unidirectional data flow and interface completeness. Type hexagon nodes make the central contracts visible, informing stub creation with exact field lists. |
572
- | Process API exposes sequence data via subcommand | The sequence subcommand with no args lists all patterns with sequence annotations. With a pattern name, it returns the full SequenceIndexEntry including steps, participants, and data flow types. | The Process API is the primary query interface for AI sessions. Exposing sequence data enables design review analysis without regenerating the full document or reading generated markdown. |
575
+ | Rule | Invariant | Rationale |
576
+ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
577
+ | SequenceIndex pre-computes ordered steps from rule-level tags | The PatternGraph sequenceIndex contains one entry per pattern that has the `architect-sequence-orchestrator` tag and at least one rule with the `architect-sequence-step` tag. Steps are sorted by stepNumber. Participants are deduplicated and ordered with orchestrator first. | Pre-computing in the transform pass avoids repeated parsing in the codec. ADR-006 mandates the PatternGraph as the sole read model. Downstream consumers (codec, process API) read structured data, not raw tags. |
578
+ | DesignReviewCodec generates sequence diagrams from ordered steps | The sequence diagram contains participants derived from `@architect-sequence-module` tags, Note blocks from Rule names, call arrows from Input/Output markers, and alt blocks from `@architect-sequence-error` scenarios. Participant order follows step order with User and orchestrator first. | Sequence diagrams verify interaction ordering and error handling completeness. Auto-generation ensures diagrams stay synchronized with spec annotations. Manual diagrams drift within days of a spec edit. |
579
+ | DesignReviewCodec generates component diagrams from data flow types | The component diagram groups modules into subgraphs by shared Input type, renders distinct Output types as hexagon nodes with field lists, and draws directed edges showing data flow through the orchestrator. No circular edges exist in the generated diagram. | Component diagrams verify unidirectional data flow and interface completeness. Type hexagon nodes make the central contracts visible, informing stub creation with exact field lists. |
580
+ | Process API exposes sequence data via subcommand | The sequence subcommand with no args lists all patterns with sequence annotations. With a pattern name, it returns the full SequenceIndexEntry including steps, participants, and data flow types. | The Process API is the primary query interface for AI sessions. Exposing sequence data enables design review analysis without regenerating the full document or reading generated markdown. |
573
581
 
574
582
  ### Design Review Generation Tests
575
583
 
576
584
  | Rule | Invariant | Rationale |
577
585
  | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
578
- | SequenceIndex pre-computes ordered steps from annotated rules | buildSequenceIndexEntry produces a SequenceIndexEntry with steps sorted by stepNumber, participants deduplicated with orchestrator first, and data flow types collected from Input/Output annotations. | Pre-computing in the transform pass avoids repeated parsing in the codec. ADR-006 mandates the MasterDataset as the sole read model. |
586
+ | SequenceIndex pre-computes ordered steps from annotated rules | buildSequenceIndexEntry produces a SequenceIndexEntry with steps sorted by stepNumber, participants deduplicated with orchestrator first, and data flow types collected from Input/Output annotations. | Pre-computing in the transform pass avoids repeated parsing in the codec. ADR-006 mandates the PatternGraph as the sole read model. |
579
587
  | Participants are deduplicated with orchestrator first | The participants array starts with the orchestrator, followed by module names in first-appearance step order, with no duplicates. | Sequence diagram participant declarations must be ordered and unique. The orchestrator is always the first participant as the entry point. |
580
588
  | Data flow types are extracted from Input and Output annotations | The dataFlowTypes array contains distinct type names parsed from Input and Output annotation strings using the "TypeName -- fields" format. | Data flow types are used by the component diagram to render hexagon nodes and by the type definitions table to show producers and consumers. |
581
589
  | DesignReviewCodec produces sequence diagram with correct participant count | The rendered sequence diagram participant list includes User plus all participants from the SequenceIndexEntry. The count equals 1 (User) plus the number of unique participants. | Correct participant count proves the codec reads SequenceIndex data correctly and maps it to Mermaid syntax. |
@@ -586,7 +594,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
586
594
  | Mermaid-sensitive text is escaped across rendered labels | Participant aliases, subgraph labels, type hexagon text, and edge labels escape Mermaid-sensitive characters such as quotes, pipes, and comment markers before rendering. | Design review diagrams are generated directly from annotations. Valid annotation text must not break Mermaid parsing when rendered into different label positions. |
587
595
  | Design questions table includes auto-computed metrics | The Design Questions section contains a table with auto-computed step count, type count, and error path count drawn from the SequenceIndexEntry data. | Auto-computed metrics reduce manual counting during design reviews and highlight coverage gaps (e.g., 0 error paths). |
588
596
  | Invalid sequence annotations are skipped with validation warnings | Patterns with ambiguous sequence-step numbering or empty sequence-module tags are excluded from sequenceIndex and reported through malformedPatterns. | Design reviews should never render misleading diagrams from malformed annotations. The transform pass is the correct place to validate and suppress bad sequence entries. |
589
- | Process API sequence lookup resolves pattern names case-insensitively | The sequence subcommand resolves pattern names with the same case-insensitive matching behavior as other pattern-oriented process-api queries. | Design review consumers should not need exact display-name casing when querying sequence data from the CLI. |
597
+ | Process API sequence lookup resolves pattern names case-insensitively | The sequence subcommand resolves pattern names with the same case-insensitive matching behavior as other pattern-oriented pattern-graph queries. | Design review consumers should not need exact display-name casing when querying sequence data from the CLI. |
590
598
 
591
599
  ### Design Review Generator Lifecycle Tests
592
600
 
@@ -613,7 +621,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
613
621
  | Convention tags are the primary consolidation mechanism | Each consolidation phase follows the same pattern: register a convention tag value in `src/taxonomy/conventions.ts`, annotate source files with `@architect-convention` tags using structured JSDoc, add a `ReferenceDocConfig` entry in `architect.config.ts`, and replace the manual doc section with a pointer to the generated reference document. | Convention-tagged annotations are the only sustainable way to keep docs in sync with implementation. The reference codec (`createReferenceCodec`) already handles the 4-layer composition so each phase only needs annotation work and config — no new codec infrastructure required. |
614
622
  | Preamble preserves editorial context in generated docs | `ReferenceDocConfig.preamble` accepts `readonly SectionBlock[]` that are prepended before all generated content. Preamble sections appear in both detailed and summary (claude-md) outputs, followed by a separator. A config without preamble produces no extra separator or empty sections. | Not all documentation content can be extracted from code annotations. Introductory prose, cross-cutting context, and reading guides require human authorship. The preamble provides a designated place for this content within the generated document structure, avoiding a separate hand-maintained file. |
615
623
  | Each consolidation phase is independently deliverable | Each phase can be implemented and validated independently. A phase is complete when: the manual doc section has been replaced with a pointer to the generated equivalent, `pnpm docs:all` produces the generated output without errors, and the generated content covers the replaced manual content. No phase requires another uncompleted phase to function. | Independent phases allow incremental consolidation without blocking on the full initiative. Each merged PR reduces manual maintenance immediately. Phase ordering in the plan is a suggested sequence (simplest first), not a dependency chain. |
616
- | Manual docs retain editorial and tutorial content | Documents containing philosophy (METHODOLOGY.md) remain fully manual with no generated equivalent (~238 lines). Documents that were originally manual but now have generated equivalents or have been restructured (SESSION-GUIDES.md, GHERKIN-PATTERNS.md, PROCESS-API.md) retain their editorial content as preamble within generated outputs. PUBLISHING.md was relocated to MAINTAINERS.md at the repository root. | The consolidation targets sections most likely to drift when code changes: reference tables, codec listings, validation rules, API types. Editorial content changes at a different cadence and requires human judgment to update. Forcing this into annotations would produce worse documentation. Documents that transitioned to hybrid generation preserve their editorial voice via preamble while keeping reference content in sync with source annotations. |
624
+ | Manual docs retain editorial and tutorial content | Documents containing philosophy (METHODOLOGY.md) remain fully manual with no generated equivalent (~238 lines). Documents that were originally manual but now have generated equivalents or have been restructured (SESSION-GUIDES.md, GHERKIN-PATTERNS.md, CLI.md) retain their editorial content as preamble within generated outputs. PUBLISHING.md was relocated to MAINTAINERS.md at the repository root. | The consolidation targets sections most likely to drift when code changes: reference tables, codec listings, validation rules, API types. Editorial content changes at a different cadence and requires human judgment to update. Forcing this into annotations would produce worse documentation. Documents that transitioned to hybrid generation preserve their editorial voice via preamble while keeping reference content in sync with source annotations. |
617
625
  | Audience alignment determines document location | Each document lives in the location matching its primary audience: `docs/` (deployed to libar.dev) for content that serves package users and developers; repo root for GitHub-visible metadata (CONTRIBUTING.md, SECURITY.md, MAINTAINERS.md); CLAUDE.md for AI session context. A document appearing in docs/ must be useful to a developer or user visiting the website — maintainer-only operational procedures (npm publishing workflow, GitHub Actions setup) belong at the repo root. | The audit found PUBLISHING.md (maintainer-only) in docs/ alongside user-facing guides. SESSION-GUIDES.md (AI session procedures) duplicates CLAUDE.md with 95% overlap. Audience mismatches increase website noise for users and create drift risk when the same content lives in two locations. |
618
626
 
619
627
  ### Docs Live Consolidation
@@ -631,12 +639,12 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
631
639
 
632
640
  ### Enhanced Index Generation
633
641
 
634
- | Rule | Invariant | Rationale |
635
- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
636
- | IndexCodec composes generated statistics with editorial navigation | The IndexCodec generates document listings and pattern statistics from MasterDataset pre-computed views (`byCategory`, `byPhase`, `byProductArea`, `byStatus`), while audience reading paths, the document roles matrix, and the quick finder table use the `ReferenceDocConfig.preamble` mechanism as manually authored `SectionBlock[]`. The codec does not hardcode document metadata -- all statistics are derived from the dataset at generation time. Editorial content changes at authorial cadence via config edits, not code changes. | Approximately 40% of INDEX.md content (product area lists, file inventories, pattern statistics, phase progress) is directly derivable from MasterDataset views and drifts when patterns change status or new patterns are added. The remaining 60% (audience paths, document roles, quick finder) requires human editorial judgment about which documents serve which readers. The preamble mechanism cleanly separates these two content types within a single generated output, as proven by CodecDrivenReferenceGeneration and DocsConsolidationStrategy Phase 2. |
637
- | Audience reading paths are first-class sections | Three audience profiles exist in the generated index: New User, Developer/AI, and Team Lead/CI. Each profile has a curated reading order that lists documents in recommended sequence with a one-line description of what each document provides for that audience. Reading paths appear prominently after the quick navigation table and before the auto-generated statistics sections. The reading paths are sourced from preamble, not derived from pattern metadata. | The manual INDEX.md reading orders are consistently cited as the most useful navigation aid by developers onboarding to the project. A flat alphabetical file listing (as in the current docs-live/INDEX.md) forces readers to guess which documents are relevant to their role. Audience-specific paths reduce time-to-relevance from minutes of scanning to seconds of following a curated sequence. This content is inherently editorial -- no annotation can express "read this third because it builds on concepts from document two." |
638
- | Index unifies manual and generated doc listings | The generated index covers both `docs/` (manual reference documents) and `docs-live/` (generated reference documents) in a single unified navigation structure. Documents are organized by topic or audience, not by source directory. The reader does not need to know whether a document is manually authored or auto-generated. Each document entry includes its title, a brief description, and its primary audience. The directory source (docs/ or docs-live/) appears only in the link path, not as a section heading or organizational axis. | The current documentation set splits across two directories for implementation reasons (manual vs generated), but this split is meaningless to readers. A developer looking for architecture documentation should find one entry, not separate entries under "Manual Docs" and "Generated Docs" sections. The unified listing follows the same principle as a library catalog -- books are organized by subject, not by whether they were hand-typeset or digitally printed. |
639
- | Document metadata drives auto-generated sections | Pattern counts per product area, phase progress summaries, and product area coverage percentages are derived from MasterDataset pre-computed views at generation time. The IndexCodec accesses `dataset.byProductArea` for area statistics, `dataset.byStatus` for status distribution, and `dataset.byPhase` for phase ordering. No statistics are hardcoded in the codec or config. When a pattern changes status or a new pattern is added, regenerating the index reflects the change without any manual update. | The manual INDEX.md has no statistics section because maintaining accurate counts manually is unsustainable across 196+ patterns. The MasterDataset pre-computed views provide O(1) access to grouped pattern data. Surfacing these statistics in the index gives readers an at-a-glance project health overview (how many patterns per area, what percentage are completed, which phases are active) that was previously only available via the Process Data API CLI. |
642
+ | Rule | Invariant | Rationale |
643
+ | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
644
+ | IndexCodec composes generated statistics with editorial navigation | The IndexCodec generates document listings and pattern statistics from PatternGraph pre-computed views (`byCategory`, `byPhase`, `byProductArea`, `byStatus`), while audience reading paths, the document roles matrix, and the quick finder table use the `ReferenceDocConfig.preamble` mechanism as manually authored `SectionBlock[]`. The codec does not hardcode document metadata -- all statistics are derived from the dataset at generation time. Editorial content changes at authorial cadence via config edits, not code changes. | Approximately 40% of INDEX.md content (product area lists, file inventories, pattern statistics, phase progress) is directly derivable from PatternGraph views and drifts when patterns change status or new patterns are added. The remaining 60% (audience paths, document roles, quick finder) requires human editorial judgment about which documents serve which readers. The preamble mechanism cleanly separates these two content types within a single generated output, as proven by CodecDrivenReferenceGeneration and DocsConsolidationStrategy Phase 2. |
645
+ | Audience reading paths are first-class sections | Three audience profiles exist in the generated index: New User, Developer/AI, and Team Lead/CI. Each profile has a curated reading order that lists documents in recommended sequence with a one-line description of what each document provides for that audience. Reading paths appear prominently after the quick navigation table and before the auto-generated statistics sections. The reading paths are sourced from preamble, not derived from pattern metadata. | The manual INDEX.md reading orders are consistently cited as the most useful navigation aid by developers onboarding to the project. A flat alphabetical file listing (as in the current docs-live/INDEX.md) forces readers to guess which documents are relevant to their role. Audience-specific paths reduce time-to-relevance from minutes of scanning to seconds of following a curated sequence. This content is inherently editorial -- no annotation can express "read this third because it builds on concepts from document two." |
646
+ | Index unifies manual and generated doc listings | The generated index covers both `docs/` (manual reference documents) and `docs-live/` (generated reference documents) in a single unified navigation structure. Documents are organized by topic or audience, not by source directory. The reader does not need to know whether a document is manually authored or auto-generated. Each document entry includes its title, a brief description, and its primary audience. The directory source (docs/ or docs-live/) appears only in the link path, not as a section heading or organizational axis. | The current documentation set splits across two directories for implementation reasons (manual vs generated), but this split is meaningless to readers. A developer looking for architecture documentation should find one entry, not separate entries under "Manual Docs" and "Generated Docs" sections. The unified listing follows the same principle as a library catalog -- books are organized by subject, not by whether they were hand-typeset or digitally printed. |
647
+ | Document metadata drives auto-generated sections | Pattern counts per product area, phase progress summaries, and product area coverage percentages are derived from PatternGraph pre-computed views at generation time. The IndexCodec accesses `dataset.byProductArea` for area statistics, `dataset.byStatus` for status distribution, and `dataset.byPhase` for phase ordering. No statistics are hardcoded in the codec or config. When a pattern changes status or a new pattern is added, regenerating the index reflects the change without any manual update. | The manual INDEX.md has no statistics section because maintaining accurate counts manually is unsustainable across 196+ patterns. The PatternGraph pre-computed views provide O(1) access to grouped pattern data. Surfacing these statistics in the index gives readers an at-a-glance project health overview (how many patterns per area, what percentage are completed, which phases are active) that was previously only available via the Process Data API CLI. |
640
648
 
641
649
  ### Error Guide Codec
642
650
 
@@ -663,7 +671,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
663
671
  | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
664
672
  | Behavior-specs renderer does not duplicate convention table content | When the reference codec renders a convention rule that contains a table, the table appears exactly once in the output: in the main convention section. The behavior-specs (expanded rule detail) section shows only the Invariant, Rationale, and Verified-by metadata — not the table body. A convention section with N tables produces exactly N table instances in the generated document, regardless of detail level. | DD-4: The current renderer re-includes the full convention table when rendering the expanded rule detail section. For REFERENCE-SAMPLE.md with 5 canonical value tables, this produces 500+ lines of exact duplication. Agents consuming this file waste context on content they already parsed. Human readers see the same table twice in the same scroll view. |
665
673
  | Compact \_claude-md/ files are self-sufficient for their product area | Each product area compact (`_claude-md/<area>/<area>-overview.md`) is self-sufficient as a standalone context file — an agent reading only the compact can answer: what does this area do, what are its key patterns, what are its invariants, and what files to read for details. Minimum target: 4 KB. The Generation compact is a specific gap: 1.4 KB for an area with 20+ codecs and the entire rendering pipeline. | DD-2: `_claude-md/` compacts are the Claude consumption contract. A 1.4 KB compact for the largest product area (233 KB) means agents have no usable summary context for Generation. They fall back to reading the full file or hallucinating based on names alone. The contract requires each compact to be a genuine summary, not a stub. |
666
- | ARCHITECTURE-TYPES.md leads with type definitions, not convention content | ARCHITECTURE-TYPES.md opens with the MasterDataset type definitions section before any pipeline-architecture convention content. An agent querying "what is MasterDataset" finds the type definition within the first 30 lines. The pipeline-architecture convention prose (orchestrator responsibilities, pipeline steps) follows the type definitions section. | The file is named ARCHITECTURE-TYPES — type definitions are the primary content. The pipeline-architecture convention content was added as a secondary layer. Current output opens with orchestrator prose, burying the type definitions that both Claude and human developers are most likely seeking. Section ordering in ReferenceDocConfig determines render order. |
674
+ | ARCHITECTURE-TYPES.md leads with type definitions, not convention content | ARCHITECTURE-TYPES.md opens with the PatternGraph type definitions section before any pipeline-architecture convention content. An agent querying "what is PatternGraph" finds the type definition within the first 30 lines. The pipeline-architecture convention prose (orchestrator responsibilities, pipeline steps) follows the type definitions section. | The file is named ARCHITECTURE-TYPES — type definitions are the primary content. The pipeline-architecture convention content was added as a secondary layer. Current output opens with orchestrator prose, burying the type definitions that both Claude and human developers are most likely seeking. Section ordering in ReferenceDocConfig determines render order. |
667
675
 
668
676
  ### Generated Doc Quality Tests
669
677
 
@@ -680,7 +688,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
680
688
  | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
681
689
  | Orchestrator coordinates full documentation generation pipeline | Orchestrator merges TypeScript and Gherkin patterns, handles conflicts, and produces requested document types. | Without centralized orchestration, consumers would wire pipelines independently, leading to inconsistent merging and silent data loss. |
682
690
  | Registry manages generator registration and retrieval | Registry prevents duplicate names, returns undefined for unknown generators, and lists available generators alphabetically. | Duplicate registrations would silently overwrite generators, causing unpredictable output depending on registration order. |
683
- | CodecBasedGenerator adapts codecs to generator interface | Generator delegates to underlying codec for transformation. Missing MasterDataset produces descriptive error. | If the adapter silently proceeds without a MasterDataset, codecs receive undefined input and produce corrupt or empty documents. |
691
+ | CodecBasedGenerator adapts codecs to generator interface | Generator delegates to underlying codec for transformation. Missing PatternGraph produces descriptive error. | If the adapter silently proceeds without a PatternGraph, codecs receive undefined input and produce corrupt or empty documents. |
684
692
  | Orchestrator supports PR changes generation options | PR changes can filter by git diff, changed files, or release version. | Without filtering, PR documentation would include all patterns in the dataset, making change review noisy and hiding actual modifications. |
685
693
 
686
694
  ### Generator Registry Testing
@@ -713,6 +721,21 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
713
721
  | All implementation links in a pattern are normalized | Every implementation link in a pattern document must have its path normalized, regardless of how many implementations exist. | A single un-normalized link in a multi-implementation pattern produces a broken reference that undermines trust in the entire generated document. |
714
722
  | normalizeImplPath strips known prefixes | normalizeImplPath removes only recognized repository prefixes from the start of a path and leaves all other path segments unchanged. | Over-stripping would corrupt legitimate path segments that happen to match a prefix name, producing silent broken links. |
715
723
 
724
+ ### Index Codec Testing
725
+
726
+ | Rule | Invariant | Rationale |
727
+ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
728
+ | Document metadata is correctly set | The index document must have the title "Documentation Index", a purpose string referencing @libar-dev/architect, and all sections enabled when using default options. | Document metadata drives navigation and table of contents generation — incorrect titles or missing purpose strings produce broken index pages in generated doc sites. |
729
+ | Package metadata section renders correctly | The Package Metadata section must always render a table with hardcoded fields: Package (@libar-dev/architect), Purpose, Patterns count derived from dataset, Product Areas count derived from dataset, and License (MIT). | Package metadata provides readers with an instant snapshot of the project — hardcoded fields ensure consistent branding while dataset-derived counts stay accurate. |
730
+ | Document inventory groups entries by topic | When documentEntries is non-empty and includeDocumentInventory is true, entries must be grouped by topic with one H3 sub-heading and one table per topic group. When entries are empty, no inventory section is rendered. | A flat list of all documents becomes unnavigable beyond a small count — topic grouping gives readers a structured entry point into the documentation set. |
731
+ | Product area statistics are computed from dataset | The Product Area Statistics table must list each product area alphabetically with Patterns, Completed, Active, Planned, and Progress columns, plus a bolded Total row aggregating all areas. The progress column must contain a visual progress bar and percentage. | Product area statistics give team leads a cross-cutting view of work distribution — alphabetical order and a total row enable fast scanning and aggregate assessment. |
732
+ | Phase progress summarizes pattern status | The Phase Progress section must render a summary paragraph with total, completed, active, and planned counts, a status distribution table with Status/Count/Percentage columns, and — when patterns have phase numbers — a "By Phase" sub-section with a per-phase breakdown table. | Phase progress is the primary indicator of delivery health — the summary paragraph provides instant context while the distribution table enables deeper analysis. |
733
+ | Regeneration footer contains commands | The Regeneration section must always be present (it is not optional), must contain the heading "Regeneration", and must include at least one code block with pnpm commands. | The regeneration footer ensures consumers always know how to rebuild the docs — it is unconditional so it cannot be accidentally omitted. |
734
+ | Section ordering follows layout contract | Sections must appear in this fixed order: Package Metadata, preamble (if any), Document Inventory (if any), Product Area Statistics, Phase Progress, Regeneration. Separators must appear after each non-final section group. This order is the layout contract for INDEX.md. | Consumers depend on a predictable INDEX.md structure for navigation links — reordering sections would break existing bookmarks and tool-generated cross-references. |
735
+ | Custom purpose text overrides default | When purposeText is set to a non-empty string, the document purpose must use that string instead of the auto-generated default. When purposeText is empty or omitted, the auto-generated purpose is used. | Consumers with different documentation sets need to customize the navigation purpose without post-processing the generated output. |
736
+ | Epilogue replaces regeneration footer | When epilogue sections are provided, they completely replace the built-in regeneration footer. When epilogue is empty, the regeneration footer is rendered as before. | Consumers may need a custom footer (e.g., links to CI, contribution guides) that has nothing to do with regeneration commands. |
737
+ | Package metadata overrides work | When packageMetadataOverrides provides a value for name, purpose, or license, that value replaces the corresponding default or projectMetadata value in the Package Metadata table. Unset override keys fall through to the default chain. | Consumers reusing the IndexCodec for different packages need to override individual metadata fields without providing a full projectMetadata object. |
738
+
716
739
  ### Layered Diagram Generation
717
740
 
718
741
  | Rule | Invariant | Rationale |
@@ -748,13 +771,13 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
748
771
 
749
772
  ### Orchestrator Pipeline Factory Migration
750
773
 
751
- | Rule | Invariant | Rationale |
752
- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
753
- | Orchestrator delegates pipeline to factory | `generateDocumentation()` calls `buildMasterDataset()` for the scan-extract-merge-transform sequence. It does not import from `scanner/` or `extractor/` for pipeline orchestration. Direct imports are permitted only for types used in GenerateResult (e.g., `ExtractedPattern`). | The orchestrator is the original host of the inline pipeline. After this migration, the pipeline factory is the sole definition of the 8-step sequence. Any future changes to pipeline steps (adding caching, parallel scanning, incremental extraction) happen in one place and all consumers benefit. |
754
- | mergePatterns lives in pipeline module | The `mergePatterns()` function lives in `src/generators/pipeline/merge-patterns.ts` as a pipeline step. It is not defined in consumer code (orchestrator or CLI files). | `mergePatterns` is step 5 of the 8-step pipeline. It was defined in orchestrator.ts for historical reasons (the orchestrator was the first pipeline host). Now that the pipeline factory exists, the function belongs alongside other pipeline steps (scan, extract, transform). The public API re-export in `generators/index.ts` preserves backward compatibility. |
755
- | Factory provides structured warnings for all consumers | `PipelineResult.warnings` contains typed warning objects with `type`, `message`, optional `count`, and optional `details` (file, line, column, message). Consumers that need granular diagnostics (orchestrator) use the full structure. Consumers that need simple messages (process-api) read `.message` only. | The orchestrator collects scan errors, skipped directives, extraction errors, and Gherkin parse errors as structured `GenerationWarning` objects. The factory must provide equivalent structure to eliminate the orchestrator's need to run the pipeline directly. The `PipelineWarning` type is structurally similar to `GenerationWarning` to minimize mapping complexity. |
756
- | Pipeline factory supports partial success mode | When `failOnScanErrors` is false, the factory captures scan errors and extraction errors as warnings and continues with successfully processed files. When true (default), the factory returns `Result.err` on the first scan failure. | The orchestrator treats scan errors as non-fatal warnings — documentation generation should succeed for all scannable files even if some files have syntax errors. The process-api treats scan errors as fatal because the query layer requires a complete dataset. The factory must support both strategies via configuration. |
757
- | End-to-end verification confirms behavioral equivalence | After migration, all CLI commands and doc generation produce identical output to pre-refactor behavior. | The migration must not change observable behavior for any consumer. Full verification confirms the factory migration is a pure refactor. |
774
+ | Rule | Invariant | Rationale |
775
+ | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
776
+ | Orchestrator delegates pipeline to factory | `generateDocumentation()` calls `buildPatternGraph()` for the scan-extract-merge-transform sequence. It does not import from `scanner/` or `extractor/` for pipeline orchestration. Direct imports are permitted only for types used in GenerateResult (e.g., `ExtractedPattern`). | The orchestrator is the original host of the inline pipeline. After this migration, the pipeline factory is the sole definition of the 8-step sequence. Any future changes to pipeline steps (adding caching, parallel scanning, incremental extraction) happen in one place and all consumers benefit. |
777
+ | mergePatterns lives in pipeline module | The `mergePatterns()` function lives in `src/generators/pipeline/merge-patterns.ts` as a pipeline step. It is not defined in consumer code (orchestrator or CLI files). | `mergePatterns` is step 5 of the 8-step pipeline. It was defined in orchestrator.ts for historical reasons (the orchestrator was the first pipeline host). Now that the pipeline factory exists, the function belongs alongside other pipeline steps (scan, extract, transform). The public API re-export in `generators/index.ts` preserves backward compatibility. |
778
+ | Factory provides structured warnings for all consumers | `PipelineResult.warnings` contains typed warning objects with `type`, `message`, optional `count`, and optional `details` (file, line, column, message). Consumers that need granular diagnostics (orchestrator) use the full structure. Consumers that need simple messages (pattern-graph-cli) read `.message` only. | The orchestrator collects scan errors, skipped directives, extraction errors, and Gherkin parse errors as structured `GenerationWarning` objects. The factory must provide equivalent structure to eliminate the orchestrator's need to run the pipeline directly. The `PipelineWarning` type is structurally similar to `GenerationWarning` to minimize mapping complexity. |
779
+ | Pipeline factory supports partial success mode | When `failOnScanErrors` is false, the factory captures scan errors and extraction errors as warnings and continues with successfully processed files. When true (default), the factory returns `Result.err` on the first scan failure. | The orchestrator treats scan errors as non-fatal warnings — documentation generation should succeed for all scannable files even if some files have syntax errors. The pattern-graph-cli treats scan errors as fatal because the query layer requires a complete dataset. The factory must support both strategies via configuration. |
780
+ | End-to-end verification confirms behavioral equivalence | After migration, all CLI commands and doc generation produce identical output to pre-refactor behavior. | The migration must not change observable behavior for any consumer. Full verification confirms the factory migration is a pure refactor. |
758
781
 
759
782
  ### Patterns Codec Testing
760
783
 
@@ -855,21 +878,13 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
855
878
 
856
879
  | Rule | Invariant | Rationale |
857
880
  | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
858
- | Procedural guides use a dual-source codec | The ProceduralGuideCodec composes auto-generated reference sections (from MasterDataset and taxonomy) with manually-authored procedural content (from preamble `SectionBlock[]`). Auto-generated content covers ~5% of the output (tag reference tables, pattern statistics, session type contract tables extracted from | |
881
+ | Procedural guides use a dual-source codec | The ProceduralGuideCodec composes auto-generated reference sections (from PatternGraph and taxonomy) with manually-authored procedural content (from preamble `SectionBlock[]`). Auto-generated content covers ~5% of the output (tag reference tables, pattern statistics, session type contract tables extracted from | |
859
882
  | blocks). The remaining ~95% is editorial preamble: checklists, decision trees, | | Gap analysis found that SESSION-GUIDES.md and ANNOTATION-GUIDE.md content is overwhelmingly procedural and editorial. Attempting to annotate checklists and walkthroughs as source code would produce worse documentation than hand-authoring. The dual-source pattern (proven by CodecDrivenReferenceGeneration, ErrorGuideCodec, and CliRecipeCodec) composes preamble editorial content with auto-generated reference sections. The codec's value is not in generating the procedural content but in providing a single output pipeline that keeps reference tables current while carrying editorial content in a consistent structure. |
860
- | Session workflow checklists derive from annotated Rule: blocks | The SessionGuidesModuleSource spec's Rule: blocks (Rules 3-8) are the canonical source for session workflow invariants. The ProceduralGuideCodec extracts structured tables from these Rule: blocks and renders them as developer-facing checklists at the detailed level. The same Rule: blocks produce compact invariant statements for `_claude-md/workflow/` modules at the summary level. Two audiences (public developers and AI sessions) are served from a single annotated source with different rendering detail levels. The codec does not duplicate or re-derive Rule: block content -- it reads from MasterDataset's behavior extraction views. | SessionGuidesModuleSource already captures session type contracts (Rule 3), planning constraints (Rule 4), design constraints (Rule 5), implementation execution order (Rule 6), FSM error reference (Rule 7), and handoff patterns (Rule 8) as structured tables within Rule: block descriptions. These tables contain the same information as the manual SESSION-GUIDES.md checklists, but in a machine-extractable format. Rendering these as developer-facing checklists eliminates the maintenance burden of keeping the manual file in sync with the spec, while the compact rendering for AI context was already delivered by Phase 39. |
883
+ | Session workflow checklists derive from annotated Rule: blocks | The SessionGuidesModuleSource spec's Rule: blocks (Rules 3-8) are the canonical source for session workflow invariants. The ProceduralGuideCodec extracts structured tables from these Rule: blocks and renders them as developer-facing checklists at the detailed level. The same Rule: blocks produce compact invariant statements for `_claude-md/workflow/` modules at the summary level. Two audiences (public developers and AI sessions) are served from a single annotated source with different rendering detail levels. The codec does not duplicate or re-derive Rule: block content -- it reads from PatternGraph's behavior extraction views. | SessionGuidesModuleSource already captures session type contracts (Rule 3), planning constraints (Rule 4), design constraints (Rule 5), implementation execution order (Rule 6), FSM error reference (Rule 7), and handoff patterns (Rule 8) as structured tables within Rule: block descriptions. These tables contain the same information as the manual SESSION-GUIDES.md checklists, but in a machine-extractable format. Rendering these as developer-facing checklists eliminates the maintenance burden of keeping the manual file in sync with the spec, while the compact rendering for AI context was already delivered by Phase 39. |
861
884
  | Annotation guide content remains separate from session guides | The ProceduralGuideCodec produces two separate generated files via two `ReferenceDocConfig` entries: one for session workflow guides (replacing SESSION-GUIDES.md) and one for annotation guides (replacing ANNOTATION-GUIDE.md). The session workflow guide targets workflow practitioners who need to know session type selection, execution order, and FSM error recovery. The annotation guide targets annotation authors who need to know opt-in markers, tag syntax, shape extraction modes, and verification steps. These audiences overlap but have distinct primary needs. The codec class is shared; the config entries and preamble content differ. | SESSION-GUIDES.md and ANNOTATION-GUIDE.md serve different audiences at different points in the development lifecycle. Merging them into a single guide would force annotation authors to navigate session workflow content and vice versa. The existing DocsConsolidationStrategy Phase 5 (Guide trimming) already treats them as separate documents. Using one codec class with two config entries follows the same pattern as `createReferenceCodec` producing multiple documents from different configs. |
862
885
  | Decision trees render as Mermaid flowcharts | Session type decision trees and annotation workflow decision trees render as Mermaid flowchart diagrams in the detailed output level. The session type decision tree replaces the ASCII art tree in SESSION-GUIDES.md with a Mermaid `graph TD` diagram that renders as an interactive flowchart on the Starlight website. Decision tree content is authored as fenced mermaid code blocks in the markdown source file, parsed into `MermaidBlock` entries by `loadPreambleFromMarkdown()` at config load time. At summary level, decision trees render as compact text tables instead of diagrams. | The manual SESSION-GUIDES.md uses an ASCII art tree for the session decision flow, which renders poorly on the website and cannot be interacted with. Mermaid flowcharts are already supported by the Starlight website (proven by product area docs with C4Context and graph LR diagrams). Converting decision trees to Mermaid provides visual clarity, click-through navigation, and consistent rendering across platforms. The content block type `mermaid` is already one of the 9 supported SectionBlock types (proven by ReferenceDocShowcase). |
863
886
  | Generated guide supersedes manual only at quality parity | The manual `docs/SESSION-GUIDES.md` is retained in the repository until the generated equivalent matches or exceeds its quality across all content dimensions: completeness (all checklists present), accuracy (all FSM states current), visual clarity (decision trees render correctly), and usability (verified by comparison audit). The SessionGuidesModuleSource invariant ("not deleted, shortened, or replaced with a redirect") is respected during the transition period. The quality comparison deliverable produces an explicit audit document recording which sections have parity and which gaps remain. Only after the audit confirms full parity is the manual file replaced with a pointer to the generated output. | SESSION-GUIDES.md is cited in the SessionGuidesModuleSource spec as "the authoritative public human reference" serving developers on libar.dev. Replacing it prematurely with a generated equivalent that lacks checklists, has formatting issues, or omits edge cases would degrade the developer experience. The quality-gated approach ensures the generated version earns its place as the replacement by demonstrating equivalent or better quality, not merely by existing. This is the same principle applied by DocsConsolidationStrategy: "Manual docs retain editorial and tutorial content" until generation quality is sufficient. |
864
887
 
865
- ### Process Api Hybrid Generation
866
-
867
- | Rule | Invariant | Rationale |
868
- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
869
- | CLI schema is single source of truth for reference tables | A declarative CLI schema in `src/cli/cli-schema.ts` defines all global options, output modifiers, and list filters with their flags, descriptions, defaults, and value types. The three reference tables in `docs-live/reference/PROCESS-API-REFERENCE.md` are generated from this schema by a standalone `ProcessApiReferenceGenerator`. The schema also drives `showHelp()`. | CLI options are defined imperatively in `parseArgs()` (lines 132-265 of `src/cli/process-api.ts`) and `OutputModifiers`/`ListFilters` interfaces (lines 43-83 of `src/cli/output-pipeline.ts`). A declarative schema extracts this into a single structured definition that both documentation and help text consume. The existing `ReferenceDocConfig` system cannot be used because it sources from MasterDataset (annotation-derived data), not static constants (ADR-006). |
870
- | Narrative prose sections remain manual | PROCESS-API.md sections covering "Why Use This", session type decision tree, workflow recipes, worked examples with expected output, and "Common Recipes" are not generated. They require editorial judgment and context that cannot be extracted from code annotations. The document's value comes from these sections — the generated reference tables are supporting material only. | Generated docs without prose context would be a bare options table — usable as reference but not as a learning resource. The hybrid approach gives both: accurate tables from code, readable narrative from editorial work. |
871
- | Standalone generator respects ADR-006 single read model | The `ProcessApiReferenceGenerator` imports CLI schema data directly from `src/cli/cli-schema.ts`. It does NOT inject CLI data into MasterDataset or consume MasterDataset for table generation. It implements `DocumentGenerator` and returns `OutputFile[]` via the standard orchestrator write path. | ADR-006 establishes MasterDataset as the sole read model for annotation-sourced data. CLI schema is a static TypeScript constant, not extracted from annotations. Forcing it through MasterDataset would violate the "no parallel pipeline" anti-pattern. A standalone generator with its own data source is architecturally correct. |
872
-
873
888
  ### Publishing Relocation
874
889
 
875
890
  | Rule | Invariant | Rationale |
@@ -916,7 +931,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
916
931
  | Rule | Invariant | Rationale |
917
932
  | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
918
933
  | Scoped diagrams are generated from diagramScopes config | Diagram content is determined exclusively by diagramScopes filters (archContext, include, archLayer, patterns), and filters compose via OR — a pattern matching any single filter appears in the diagram. | Without filter-driven scoping, diagrams would include all patterns regardless of relevance, producing unreadable visualizations that obscure architectural boundaries. |
919
- | Hardcoded diagram sources render deterministic output | Hardcoded diagram sources render without relationship-scoping input and emit stable, source-specific Mermaid content. | Domain diagrams such as pipeline and MasterDataset fan-out encode canonical architecture views that should not depend on ad-hoc test dataset shape. |
934
+ | Hardcoded diagram sources render deterministic output | Hardcoded diagram sources render without relationship-scoping input and emit stable, source-specific Mermaid content. | Domain diagrams such as pipeline and PatternGraph fan-out encode canonical architecture views that should not depend on ad-hoc test dataset shape. |
920
935
  | Multiple diagram scopes produce multiple mermaid blocks | Each entry in the diagramScopes array produces an independent Mermaid block with its own title and direction. | Product areas require multiple architectural views (e.g., system overview and data flow) from a single configuration. |
921
936
 
922
937
  ### Reference Codec Diagram Type Testing
@@ -933,7 +948,7 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
933
948
  | Deep behavior rendering replaces shallow truncation | At standard and detailed levels, behavior sections render full rule descriptions with parsed invariant, rationale, and verified-by content. At summary level, the 120-character truncation is preserved for compact output. Behavior rendering reuses parseBusinessRuleAnnotations from the convention extractor rather than reimplementing structured content parsing. | The current 120-character truncation discards invariants, rationale, and verified-by content that is already extracted and available in BusinessRule.description. Reference documents need the full rule content to serve as authoritative documentation. The convention extractor already parses this structured content via parseBusinessRuleAnnotations -- the behavior builder should delegate to the same function. |
934
949
  | Shape sections include JSDoc prose and property documentation | At standard level, shape code blocks are preceded by JSDoc prose when available. At detailed level, interface shapes additionally render a property documentation table. At summary level, only the type-kind table appears. Shapes without JSDoc render code blocks without preceding paragraph. | JSDoc on shapes contains design rationale and usage guidance that is already extracted by the shape extractor. Gating it behind detailed level wastes the data at the most common detail level (standard). The fix is a single condition change: reference.ts line 342 from detailLevel === 'detailed' to detailLevel !== 'summary'. |
935
950
  | Diagram scope supports archLayer filtering and multiple diagram types | DiagramScope gains optional archLayer and diagramType fields. The archLayer filter selects patterns by their architectural layer (domain, application, infrastructure) and composes with archContext and archView via OR logic, consistent with existing filter dimensions. The diagramType field controls Mermaid output format: graph (default), sequenceDiagram, stateDiagram-v2, C4Context, classDiagram. Each diagram type has its own node and edge syntax appropriate to the Mermaid specification. | Layer-based views are fundamental to layered architecture documentation -- a developer reviewing the domain layer wants only deciders and value objects, not infrastructure adapters. Multiple diagram types unlock event flow documentation (sequence), FSM visualization (state), architecture overview (C4), and type hierarchy views (class) that flowcharts cannot express naturally. |
936
- | Every renderable block type appears in the showcase document | The generated REFERENCE-SAMPLE.md at detailed level must contain at least one instance of each of the 9 block types: heading, paragraph, separator, table, list, code, mermaid, collapsible, link-out. At summary level, progressive disclosure blocks (collapsible, link-out) are omitted for compact output. | The sample document is the integration test for the reference codec. If any block type is missing, there is no automated verification that the codec can produce it. Coverage of all 9 types validates the full rendering pipeline from MasterDataset through codec through renderer. |
951
+ | Every renderable block type appears in the showcase document | The generated REFERENCE-SAMPLE.md at detailed level must contain at least one instance of each of the 9 block types: heading, paragraph, separator, table, list, code, mermaid, collapsible, link-out. At summary level, progressive disclosure blocks (collapsible, link-out) are omitted for compact output. | The sample document is the integration test for the reference codec. If any block type is missing, there is no automated verification that the codec can produce it. Coverage of all 9 types validates the full rendering pipeline from PatternGraph through codec through renderer. |
937
952
  | Edge labels and custom node shapes enrich diagram readability | Relationship edges in scoped diagrams display labels describing the relationship semantics (uses, dependsOn, implements, extends). Edge labels are enabled by default and can be disabled via a showEdgeLabels option for compact diagrams. Node shapes vary by archRole value -- services use rounded rectangles, bounded contexts use subgraphs, projections use cylinders, and sagas use hexagons. | Unlabeled edges are ambiguous -- a reader seeing a solid arrow cannot distinguish "uses" from "implements" without consulting an edge style legend. Custom node shapes leverage Mermaid's shape vocabulary to make archRole visually distinguishable without color reliance, improving accessibility. |
938
953
  | Extraction pipeline surfaces complete API documentation | ExportInfo.signature shows full function parameter types and return type instead of the placeholder value. JSDoc param, returns, and throws tags are extracted and stored on ExtractedShape. Property-level JSDoc preserves full multi-line content without first-line truncation. Auto-shape discovery mode extracts all exported types from files matching source-selector globs globs without requiring explicit extract-shapes annotations. | Function signatures are the most valuable API surface -- they show what a pattern exports without source navigation. The ExportInfo.signature field already exists in the schema but holds a lossy placeholder. The fix is approximately 15 lines in ast-parser.ts: threading sourceCode into extractFromDeclaration and slicing parameter ranges. Auto-shape discovery eliminates manual annotation burden for files that match source-selector globs. |
939
954
  | Infrastructure enables flexible document composition and AI-optimized output | CompositeCodec assembles reference documents from multiple codec outputs by concatenating RenderableDocument sections. The modular claude-md renderer produces token-efficient output using section markers optimized for LLM consumption. The Gherkin tag extractor uses TagRegistry metadata instead of hardcoded if/else branches, making new tag addition a zero-code-change operation. Convention content can be extracted from TypeScript JSDoc blocks containing structured Invariant/Rationale annotations, not only from Gherkin Rule blocks. | CompositeCodec enables referenceDocConfigs to include content from any codec, not just the current 4 sources. The modular claude-md renderer unifies two formatting paths (codec-based markdown vs hand-written markers in context-formatter.ts). Data-driven tag extraction cuts the maintenance burden of the 40-branch if/else in gherkin-ast-parser.ts roughly in half. TypeScript convention extraction enables self-documenting business rules in implementation files alongside their code. |
@@ -999,10 +1014,10 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
999
1014
 
1000
1015
  ### Requirements Adr Codec Testing
1001
1016
 
1002
- | Rule | Invariant | Rationale |
1003
- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1004
- | RequirementsDocumentCodec generates PRD-style documentation from patterns | RequirementsDocumentCodec transforms MasterDataset patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. | Flexible grouping lets stakeholders view requirements through their preferred lens (area, role, or phase), and detail files provide deep-dive context without bloating the summary document. |
1005
- | AdrDocumentCodec documents architecture decisions | AdrDocumentCodec transforms MasterDataset ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. | Architecture decisions lose value without status tracking and supersession chains; without them, teams act on outdated decisions and cannot trace why a previous approach was abandoned. |
1017
+ | Rule | Invariant | Rationale |
1018
+ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1019
+ | RequirementsDocumentCodec generates PRD-style documentation from patterns | RequirementsDocumentCodec transforms PatternGraph patterns into a PRD-style document with flexible grouping (product area, user role, or phase), optional detail file generation, and business value rendering. | Flexible grouping lets stakeholders view requirements through their preferred lens (area, role, or phase), and detail files provide deep-dive context without bloating the summary document. |
1020
+ | AdrDocumentCodec documents architecture decisions | AdrDocumentCodec transforms PatternGraph ADR patterns into an architecture decision record document with status tracking, category/phase/date grouping, supersession relationships, and optional detail file generation. | Architecture decisions lose value without status tracking and supersession chains; without them, teams act on outdated decisions and cannot trace why a previous approach was abandoned. |
1006
1021
 
1007
1022
  ### Rich Content Helpers Testing
1008
1023
 
@@ -1048,17 +1063,17 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
1048
1063
 
1049
1064
  ### Session Guides Module Source
1050
1065
 
1051
- | Rule | Invariant | Rationale |
1052
- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1053
- | SESSION-GUIDES.md is the authoritative public human reference | `docs/SESSION-GUIDES.md` exists and is not deleted, shortened, or replaced with a redirect. Its comprehensive checklists, CLI command examples, and session decision trees serve developers on libar.dev. | Session workflow guidance requires two formats for two audiences. Public developers need comprehensive checklists with full examples. AI sessions need compact invariants they can apply without reading 389 lines. |
1054
- | CLAUDE.md session workflow content is derived, not hand-authored | After Phase 39 generation deliverables complete, the "Session Workflows" section in CLAUDE.md contains no manually-authored content. It is composed from generated `_claude-md/workflow/` modules. | A hand-maintained CLAUDE.md session section creates two copies of session workflow guidance with no synchronization mechanism. Regeneration from annotated source eliminates drift. |
1055
- | Session type determines artifacts and FSM changes | Four session types exist, each with defined input, output, and FSM impact. Mixing outputs across session types (e.g., writing code in a planning session) violates session discipline. | Session type confusion causes wasted work — a design mistake discovered mid-implementation wastes the entire session. Clear contracts prevent scope bleeding between session types. |
1056
- | Planning sessions produce roadmap specs only | A planning session creates a roadmap spec with metadata, deliverables table, Rule: blocks with invariants, and scenarios. It must not produce implementation code, transition to active, or prompt for implementation readiness. | Planning is the cheapest session type — it produces .feature file edits, no compilation needed. Mixing implementation into planning defeats the cost advantage and introduces untested code without a locked scope. |
1057
- | Design sessions produce decisions and stubs only | A design session makes architectural decisions and creates code stubs with interfaces. It must not produce implementation code. Context gathering via the Process Data API must precede any explore agent usage. | Design sessions resolve ambiguity before implementation begins. Code stubs in architect/stubs/ live outside src/ to avoid TypeScript compilation and ESLint issues, making them zero-risk artifacts. |
1058
- | Implementation sessions follow FSM-enforced execution order | Implementation sessions must follow a strict 5-step execution order. Transition to active must happen before any code changes. Transition to completed must happen only when ALL deliverables are done. Skipping steps causes Process Guard rejection at commit time. | The execution order ensures FSM state accurately reflects work state at every point. Writing code before transitioning to active means Process Guard sees changes to a roadmap spec (no scope protection). Marking completed with incomplete work creates a hard-locked state that requires unlock-reason to fix. |
1059
- | FSM errors have documented fixes | Every Process Guard error code has a defined cause and fix. The error codes, causes, and fixes form a closed set — no undocumented error states exist. | Undocumented FSM errors cause session-blocking confusion. A lookup table from error code to fix eliminates guesswork and prevents workarounds that bypass process integrity. |
1060
- | Handoff captures session-end state for continuity | Multi-session work requires handoff documentation generated from the Process Data API. Handoff output always reflects actual annotation state, not manual notes. | Manual session notes drift from actual deliverable state. The handoff command derives state from annotations, ensuring the next session starts from ground truth rather than stale notes. |
1061
- | ClaudeModuleGeneration is the generation mechanism | Phase 39 depends on ClaudeModuleGeneration (Phase 25). Adding `@architect-claude-module` and `@architect-claude-section:workflow` tags to this spec will cause ClaudeModuleGeneration to produce `_claude-md/workflow/` output files. The hand-written `_claude-md/workflow/` files are deleted after successful verified generation. | The annotation work (Rule blocks in this spec) is immediately useful — queryable via `pnpm process:query -- rules`. Generation deliverables cannot complete until Phase 25 ships the ClaudeModuleCodec. This sequencing is intentional: the annotation investment has standalone value regardless of whether the codec exists yet. |
1066
+ | Rule | Invariant | Rationale |
1067
+ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1068
+ | SESSION-GUIDES.md is the authoritative public human reference | `docs/SESSION-GUIDES.md` exists and is not deleted, shortened, or replaced with a redirect. Its comprehensive checklists, CLI command examples, and session decision trees serve developers on libar.dev. | Session workflow guidance requires two formats for two audiences. Public developers need comprehensive checklists with full examples. AI sessions need compact invariants they can apply without reading 389 lines. |
1069
+ | CLAUDE.md session workflow content is derived, not hand-authored | After Phase 39 generation deliverables complete, the "Session Workflows" section in CLAUDE.md contains no manually-authored content. It is composed from generated `_claude-md/workflow/` modules. | A hand-maintained CLAUDE.md session section creates two copies of session workflow guidance with no synchronization mechanism. Regeneration from annotated source eliminates drift. |
1070
+ | Session type determines artifacts and FSM changes | Four session types exist, each with defined input, output, and FSM impact. Mixing outputs across session types (e.g., writing code in a planning session) violates session discipline. | Session type confusion causes wasted work — a design mistake discovered mid-implementation wastes the entire session. Clear contracts prevent scope bleeding between session types. |
1071
+ | Planning sessions produce roadmap specs only | A planning session creates a roadmap spec with metadata, deliverables table, Rule: blocks with invariants, and scenarios. It must not produce implementation code, transition to active, or prompt for implementation readiness. | Planning is the cheapest session type — it produces .feature file edits, no compilation needed. Mixing implementation into planning defeats the cost advantage and introduces untested code without a locked scope. |
1072
+ | Design sessions produce decisions and stubs only | A design session makes architectural decisions and creates code stubs with interfaces. It must not produce implementation code. Context gathering via the Process Data API must precede any explore agent usage. | Design sessions resolve ambiguity before implementation begins. Code stubs in architect/stubs/ live outside src/ to avoid TypeScript compilation and ESLint issues, making them zero-risk artifacts. |
1073
+ | Implementation sessions follow FSM-enforced execution order | Implementation sessions must follow a strict 5-step execution order. Transition to active must happen before any code changes. Transition to completed must happen only when ALL deliverables are done. Skipping steps causes Process Guard rejection at commit time. | The execution order ensures FSM state accurately reflects work state at every point. Writing code before transitioning to active means Process Guard sees changes to a roadmap spec (no scope protection). Marking completed with incomplete work creates a hard-locked state that requires unlock-reason to fix. |
1074
+ | FSM errors have documented fixes | Every Process Guard error code has a defined cause and fix. The error codes, causes, and fixes form a closed set — no undocumented error states exist. | Undocumented FSM errors cause session-blocking confusion. A lookup table from error code to fix eliminates guesswork and prevents workarounds that bypass process integrity. |
1075
+ | Handoff captures session-end state for continuity | Multi-session work requires handoff documentation generated from the Process Data API. Handoff output always reflects actual annotation state, not manual notes. | Manual session notes drift from actual deliverable state. The handoff command derives state from annotations, ensuring the next session starts from ground truth rather than stale notes. |
1076
+ | ClaudeModuleGeneration is the generation mechanism | Phase 39 depends on ClaudeModuleGeneration (Phase 25). Adding `@architect-claude-module` and `@architect-claude-section:workflow` tags to this spec will cause ClaudeModuleGeneration to produce `_claude-md/workflow/` output files. The hand-written `_claude-md/workflow/` files are deleted after successful verified generation. | The annotation work (Rule blocks in this spec) is immediately useful — queryable via `pnpm architect:query -- rules`. Generation deliverables cannot complete until Phase 25 ships the ClaudeModuleCodec. This sequencing is intentional: the annotation investment has standalone value regardless of whether the codec exists yet. |
1062
1077
 
1063
1078
  ### Shape Matcher Testing
1064
1079
 
@@ -1133,23 +1148,23 @@ function transformToMasterDataset(raw: RawDataset): RuntimeMasterDataset;
1133
1148
 
1134
1149
  ### Traceability Generator
1135
1150
 
1136
- | Rule | Invariant | Rationale |
1137
- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1138
- | Cross-references Verified by annotations against actual scenarios | Every `verifiedBy` string extracted from a Rule description is matched against scenario names in the MasterDataset. The traceability matrix shows each Rule with its verification status: verified (all references resolve), partially verified (some resolve), or unverified (none resolve or no annotation). | `parseBusinessRuleAnnotations()` already extracts `verifiedBy` arrays from Rule descriptions. Without cross-referencing against actual scenario names, the traceability report cannot distinguish between claimed and actual test coverage. A dangling reference (scenario name that does not exist) is worse than no annotation because it creates false confidence. |
1139
- | Detects orphan scenarios and unverified rules | Orphan scenarios (acceptance-criteria scenarios not referenced by any Rule's Verified by annotation) and unverified rules (Rules without a Verified by annotation or with zero matched scenarios) are listed in dedicated sections of the traceability output. | Coverage gaps indicate either missing traceability annotations or actual missing test coverage. Orphan scenarios may be valuable tests that lack traceability links, or dead tests that should be removed. Unverified rules are business constraints with no demonstrated test coverage. |
1140
- | Traceability output is wired into the docs pipeline | The TraceabilityCodec output is generated as part of `pnpm docs:all` via a `docs:traceability` npm script backed by a ReferenceDocConfig entry in `architect.config.ts`. The output file lands in `docs-live/TRACEABILITY.md`. | The TraceabilityCodec is registered in the CodecRegistry but not wired into `architect.config.ts` or `package.json`. Without config wiring, the codec is only usable programmatically or via tests. Adding it to the docs pipeline makes traceability output a first-class generated artifact alongside CHANGELOG.md, OVERVIEW.md, and other reporting codecs. |
1151
+ | Rule | Invariant | Rationale |
1152
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1153
+ | Cross-references Verified by annotations against actual scenarios | Every `verifiedBy` string extracted from a Rule description is matched against scenario names in the PatternGraph. The traceability matrix shows each Rule with its verification status: verified (all references resolve), partially verified (some resolve), or unverified (none resolve or no annotation). | `parseBusinessRuleAnnotations()` already extracts `verifiedBy` arrays from Rule descriptions. Without cross-referencing against actual scenario names, the traceability report cannot distinguish between claimed and actual test coverage. A dangling reference (scenario name that does not exist) is worse than no annotation because it creates false confidence. |
1154
+ | Detects orphan scenarios and unverified rules | Orphan scenarios (acceptance-criteria scenarios not referenced by any Rule's Verified by annotation) and unverified rules (Rules without a Verified by annotation or with zero matched scenarios) are listed in dedicated sections of the traceability output. | Coverage gaps indicate either missing traceability annotations or actual missing test coverage. Orphan scenarios may be valuable tests that lack traceability links, or dead tests that should be removed. Unverified rules are business constraints with no demonstrated test coverage. |
1155
+ | Traceability output is wired into the docs pipeline | The TraceabilityCodec output is generated as part of `pnpm docs:all` via a `docs:traceability` npm script backed by a ReferenceDocConfig entry in `architect.config.ts`. The output file lands in `docs-live/TRACEABILITY.md`. | The TraceabilityCodec is registered in the CodecRegistry but not wired into `architect.config.ts` or `package.json`. Without config wiring, the codec is only usable programmatically or via tests. Adding it to the docs pipeline makes traceability output a first-class generated artifact alongside CHANGELOG.md, OVERVIEW.md, and other reporting codecs. |
1141
1156
 
1142
1157
  ### Transform Dataset Testing
1143
1158
 
1144
1159
  | Rule | Invariant | Rationale |
1145
1160
  | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1146
- | Empty dataset produces valid zero-state views | An empty input produces a MasterDataset with all counts at zero and no groupings. | Generators must handle the zero-state gracefully; a missing or malformed empty dataset would cause null-reference errors across all rendering codecs. |
1161
+ | Empty dataset produces valid zero-state views | An empty input produces a PatternGraph with all counts at zero and no groupings. | Generators must handle the zero-state gracefully; a missing or malformed empty dataset would cause null-reference errors across all rendering codecs. |
1147
1162
  | Status and phase grouping creates navigable views | Patterns are grouped by canonical status and sorted by phase number, with per-phase status counts computed. | Generators need O(1) access to status-filtered and phase-ordered views without recomputing on each render pass. |
1148
1163
  | Quarter and category grouping organizes by timeline and domain | Patterns are grouped by quarter and category, with only patterns bearing the relevant metadata included in each view. | Timeline and domain views must exclude patterns without the relevant metadata to prevent misleading counts and empty groupings in generated documentation. |
1149
1164
  | Source grouping separates TypeScript and Gherkin origins | Patterns are partitioned by source file type, and patterns with phase metadata appear in the roadmap view. | Codecs that render TypeScript-specific or Gherkin-specific views depend on pre-partitioned sources; mixing sources would produce incorrect per-origin statistics and broken cross-references. |
1150
1165
  | Relationship index builds bidirectional dependency graph | The relationship index contains forward and reverse lookups, with reverse lookups merged and deduplicated against explicit annotations. | Bidirectional navigation is required for dependency tree queries without O(n) scans per lookup. |
1151
1166
  | Completion tracking computes project progress | Completion percentage is rounded to the nearest integer, and fully-completed requires all patterns in completed status with a non-zero total. | Inconsistent rounding or a false-positive fully-completed signal on an empty dataset would misrepresent project health in dashboards and generated progress reports. |
1152
- | Workflow integration conditionally includes delivery process data | The workflow is included in the MasterDataset only when provided, and phase names are resolved from the workflow configuration. | Projects without a delivery workflow must still produce valid datasets; unconditionally requiring workflow data would break standalone documentation generation. |
1167
+ | Workflow integration conditionally includes delivery process data | The workflow is included in the PatternGraph only when provided, and phase names are resolved from the workflow configuration. | Projects without a delivery workflow must still produce valid datasets; unconditionally requiring workflow data would break standalone documentation generation. |
1153
1168
 
1154
1169
  ### Universal Doc Generator Robustness
1155
1170