@libar-dev/architect 1.0.0-pre.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (800) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/LICENSE +25 -0
  3. package/LICENSE-MCP +62 -0
  4. package/README.md +147 -0
  5. package/dist/api/arch-queries.d.ts +95 -0
  6. package/dist/api/arch-queries.d.ts.map +1 -0
  7. package/dist/api/arch-queries.js +310 -0
  8. package/dist/api/arch-queries.js.map +1 -0
  9. package/dist/api/context-assembler.d.ts +124 -0
  10. package/dist/api/context-assembler.d.ts.map +1 -0
  11. package/dist/api/context-assembler.js +472 -0
  12. package/dist/api/context-assembler.js.map +1 -0
  13. package/dist/api/context-formatter.d.ts +26 -0
  14. package/dist/api/context-formatter.d.ts.map +1 -0
  15. package/dist/api/context-formatter.js +183 -0
  16. package/dist/api/context-formatter.js.map +1 -0
  17. package/dist/api/coverage-analyzer.d.ts +38 -0
  18. package/dist/api/coverage-analyzer.d.ts.map +1 -0
  19. package/dist/api/coverage-analyzer.js +117 -0
  20. package/dist/api/coverage-analyzer.js.map +1 -0
  21. package/dist/api/fuzzy-match.d.ts +75 -0
  22. package/dist/api/fuzzy-match.d.ts.map +1 -0
  23. package/dist/api/fuzzy-match.js +150 -0
  24. package/dist/api/fuzzy-match.js.map +1 -0
  25. package/dist/api/handoff-generator.d.ts +45 -0
  26. package/dist/api/handoff-generator.d.ts.map +1 -0
  27. package/dist/api/handoff-generator.js +139 -0
  28. package/dist/api/handoff-generator.js.map +1 -0
  29. package/dist/api/index.d.ts +61 -0
  30. package/dist/api/index.d.ts.map +1 -0
  31. package/dist/api/index.js +54 -0
  32. package/dist/api/index.js.map +1 -0
  33. package/dist/api/pattern-helpers.d.ts +51 -0
  34. package/dist/api/pattern-helpers.d.ts.map +1 -0
  35. package/dist/api/pattern-helpers.js +84 -0
  36. package/dist/api/pattern-helpers.js.map +1 -0
  37. package/dist/api/process-state.d.ts +224 -0
  38. package/dist/api/process-state.d.ts.map +1 -0
  39. package/dist/api/process-state.js +308 -0
  40. package/dist/api/process-state.js.map +1 -0
  41. package/dist/api/rules-query.d.ts +60 -0
  42. package/dist/api/rules-query.d.ts.map +1 -0
  43. package/dist/api/rules-query.js +154 -0
  44. package/dist/api/rules-query.js.map +1 -0
  45. package/dist/api/scope-validator.d.ts +56 -0
  46. package/dist/api/scope-validator.d.ts.map +1 -0
  47. package/dist/api/scope-validator.js +293 -0
  48. package/dist/api/scope-validator.js.map +1 -0
  49. package/dist/api/stub-resolver.d.ts +117 -0
  50. package/dist/api/stub-resolver.d.ts.map +1 -0
  51. package/dist/api/stub-resolver.js +154 -0
  52. package/dist/api/stub-resolver.js.map +1 -0
  53. package/dist/api/summarize.d.ts +75 -0
  54. package/dist/api/summarize.d.ts.map +1 -0
  55. package/dist/api/summarize.js +97 -0
  56. package/dist/api/summarize.js.map +1 -0
  57. package/dist/api/types.d.ts +221 -0
  58. package/dist/api/types.d.ts.map +1 -0
  59. package/dist/api/types.js +57 -0
  60. package/dist/api/types.js.map +1 -0
  61. package/dist/cache/file-cache.d.ts +72 -0
  62. package/dist/cache/file-cache.d.ts.map +1 -0
  63. package/dist/cache/file-cache.js +80 -0
  64. package/dist/cache/file-cache.js.map +1 -0
  65. package/dist/cache/index.d.ts +5 -0
  66. package/dist/cache/index.d.ts.map +1 -0
  67. package/dist/cache/index.js +5 -0
  68. package/dist/cache/index.js.map +1 -0
  69. package/dist/cli/cli-schema.d.ts +83 -0
  70. package/dist/cli/cli-schema.d.ts.map +1 -0
  71. package/dist/cli/cli-schema.js +505 -0
  72. package/dist/cli/cli-schema.js.map +1 -0
  73. package/dist/cli/dataset-cache.d.ts +66 -0
  74. package/dist/cli/dataset-cache.d.ts.map +1 -0
  75. package/dist/cli/dataset-cache.js +179 -0
  76. package/dist/cli/dataset-cache.js.map +1 -0
  77. package/dist/cli/error-handler.d.ts +84 -0
  78. package/dist/cli/error-handler.d.ts.map +1 -0
  79. package/dist/cli/error-handler.js +197 -0
  80. package/dist/cli/error-handler.js.map +1 -0
  81. package/dist/cli/generate-docs.d.ts +30 -0
  82. package/dist/cli/generate-docs.d.ts.map +1 -0
  83. package/dist/cli/generate-docs.js +370 -0
  84. package/dist/cli/generate-docs.js.map +1 -0
  85. package/dist/cli/lint-patterns.d.ts +57 -0
  86. package/dist/cli/lint-patterns.d.ts.map +1 -0
  87. package/dist/cli/lint-patterns.js +257 -0
  88. package/dist/cli/lint-patterns.js.map +1 -0
  89. package/dist/cli/lint-process.d.ts +54 -0
  90. package/dist/cli/lint-process.d.ts.map +1 -0
  91. package/dist/cli/lint-process.js +319 -0
  92. package/dist/cli/lint-process.js.map +1 -0
  93. package/dist/cli/lint-steps.d.ts +32 -0
  94. package/dist/cli/lint-steps.d.ts.map +1 -0
  95. package/dist/cli/lint-steps.js +172 -0
  96. package/dist/cli/lint-steps.js.map +1 -0
  97. package/dist/cli/mcp-server.d.ts +22 -0
  98. package/dist/cli/mcp-server.d.ts.map +1 -0
  99. package/dist/cli/mcp-server.js +57 -0
  100. package/dist/cli/mcp-server.js.map +1 -0
  101. package/dist/cli/output-pipeline.d.ts +130 -0
  102. package/dist/cli/output-pipeline.d.ts.map +1 -0
  103. package/dist/cli/output-pipeline.js +234 -0
  104. package/dist/cli/output-pipeline.js.map +1 -0
  105. package/dist/cli/process-api.d.ts +37 -0
  106. package/dist/cli/process-api.d.ts.map +1 -0
  107. package/dist/cli/process-api.js +1550 -0
  108. package/dist/cli/process-api.js.map +1 -0
  109. package/dist/cli/repl.d.ts +38 -0
  110. package/dist/cli/repl.d.ts.map +1 -0
  111. package/dist/cli/repl.js +239 -0
  112. package/dist/cli/repl.js.map +1 -0
  113. package/dist/cli/validate-patterns.d.ts +115 -0
  114. package/dist/cli/validate-patterns.d.ts.map +1 -0
  115. package/dist/cli/validate-patterns.js +707 -0
  116. package/dist/cli/validate-patterns.js.map +1 -0
  117. package/dist/cli/version.d.ts +35 -0
  118. package/dist/cli/version.d.ts.map +1 -0
  119. package/dist/cli/version.js +64 -0
  120. package/dist/cli/version.js.map +1 -0
  121. package/dist/config/config-loader.d.ts +167 -0
  122. package/dist/config/config-loader.d.ts.map +1 -0
  123. package/dist/config/config-loader.js +294 -0
  124. package/dist/config/config-loader.js.map +1 -0
  125. package/dist/config/defaults.d.ts +92 -0
  126. package/dist/config/defaults.d.ts.map +1 -0
  127. package/dist/config/defaults.js +103 -0
  128. package/dist/config/defaults.js.map +1 -0
  129. package/dist/config/define-config.d.ts +37 -0
  130. package/dist/config/define-config.d.ts.map +1 -0
  131. package/dist/config/define-config.js +38 -0
  132. package/dist/config/define-config.js.map +1 -0
  133. package/dist/config/factory.d.ts +79 -0
  134. package/dist/config/factory.d.ts.map +1 -0
  135. package/dist/config/factory.js +116 -0
  136. package/dist/config/factory.js.map +1 -0
  137. package/dist/config/index.d.ts +45 -0
  138. package/dist/config/index.d.ts.map +1 -0
  139. package/dist/config/index.js +48 -0
  140. package/dist/config/index.js.map +1 -0
  141. package/dist/config/merge-sources.d.ts +47 -0
  142. package/dist/config/merge-sources.d.ts.map +1 -0
  143. package/dist/config/merge-sources.js +61 -0
  144. package/dist/config/merge-sources.js.map +1 -0
  145. package/dist/config/presets.d.ts +115 -0
  146. package/dist/config/presets.d.ts.map +1 -0
  147. package/dist/config/presets.js +119 -0
  148. package/dist/config/presets.js.map +1 -0
  149. package/dist/config/project-config-schema.d.ts +192 -0
  150. package/dist/config/project-config-schema.d.ts.map +1 -0
  151. package/dist/config/project-config-schema.js +231 -0
  152. package/dist/config/project-config-schema.js.map +1 -0
  153. package/dist/config/project-config.d.ts +229 -0
  154. package/dist/config/project-config.d.ts.map +1 -0
  155. package/dist/config/project-config.js +37 -0
  156. package/dist/config/project-config.js.map +1 -0
  157. package/dist/config/regex-builders.d.ts +49 -0
  158. package/dist/config/regex-builders.d.ts.map +1 -0
  159. package/dist/config/regex-builders.js +85 -0
  160. package/dist/config/regex-builders.js.map +1 -0
  161. package/dist/config/resolve-config.d.ts +65 -0
  162. package/dist/config/resolve-config.d.ts.map +1 -0
  163. package/dist/config/resolve-config.js +150 -0
  164. package/dist/config/resolve-config.js.map +1 -0
  165. package/dist/config/types.d.ts +81 -0
  166. package/dist/config/types.d.ts.map +1 -0
  167. package/dist/config/types.js +22 -0
  168. package/dist/config/types.js.map +1 -0
  169. package/dist/config/workflow-loader.d.ts +90 -0
  170. package/dist/config/workflow-loader.d.ts.map +1 -0
  171. package/dist/config/workflow-loader.js +167 -0
  172. package/dist/config/workflow-loader.js.map +1 -0
  173. package/dist/extractor/doc-extractor.d.ts +233 -0
  174. package/dist/extractor/doc-extractor.d.ts.map +1 -0
  175. package/dist/extractor/doc-extractor.js +481 -0
  176. package/dist/extractor/doc-extractor.js.map +1 -0
  177. package/dist/extractor/dual-source-extractor.d.ts +161 -0
  178. package/dist/extractor/dual-source-extractor.d.ts.map +1 -0
  179. package/dist/extractor/dual-source-extractor.js +407 -0
  180. package/dist/extractor/dual-source-extractor.js.map +1 -0
  181. package/dist/extractor/gherkin-extractor.d.ts +170 -0
  182. package/dist/extractor/gherkin-extractor.d.ts.map +1 -0
  183. package/dist/extractor/gherkin-extractor.js +543 -0
  184. package/dist/extractor/gherkin-extractor.js.map +1 -0
  185. package/dist/extractor/index.d.ts +7 -0
  186. package/dist/extractor/index.d.ts.map +1 -0
  187. package/dist/extractor/index.js +11 -0
  188. package/dist/extractor/index.js.map +1 -0
  189. package/dist/extractor/layer-inference.d.ts +66 -0
  190. package/dist/extractor/layer-inference.d.ts.map +1 -0
  191. package/dist/extractor/layer-inference.js +93 -0
  192. package/dist/extractor/layer-inference.js.map +1 -0
  193. package/dist/extractor/shape-extractor.d.ts +79 -0
  194. package/dist/extractor/shape-extractor.d.ts.map +1 -0
  195. package/dist/extractor/shape-extractor.js +966 -0
  196. package/dist/extractor/shape-extractor.js.map +1 -0
  197. package/dist/generators/built-in/cli-recipe-generator.d.ts +30 -0
  198. package/dist/generators/built-in/cli-recipe-generator.d.ts.map +1 -0
  199. package/dist/generators/built-in/cli-recipe-generator.js +155 -0
  200. package/dist/generators/built-in/cli-recipe-generator.js.map +1 -0
  201. package/dist/generators/built-in/codec-generators.d.ts +29 -0
  202. package/dist/generators/built-in/codec-generators.d.ts.map +1 -0
  203. package/dist/generators/built-in/codec-generators.js +195 -0
  204. package/dist/generators/built-in/codec-generators.js.map +1 -0
  205. package/dist/generators/built-in/decision-doc-generator.d.ts +204 -0
  206. package/dist/generators/built-in/decision-doc-generator.d.ts.map +1 -0
  207. package/dist/generators/built-in/decision-doc-generator.js +654 -0
  208. package/dist/generators/built-in/decision-doc-generator.js.map +1 -0
  209. package/dist/generators/built-in/design-review-generator.d.ts +26 -0
  210. package/dist/generators/built-in/design-review-generator.d.ts.map +1 -0
  211. package/dist/generators/built-in/design-review-generator.js +94 -0
  212. package/dist/generators/built-in/design-review-generator.js.map +1 -0
  213. package/dist/generators/built-in/index.d.ts +22 -0
  214. package/dist/generators/built-in/index.d.ts.map +1 -0
  215. package/dist/generators/built-in/index.js +23 -0
  216. package/dist/generators/built-in/index.js.map +1 -0
  217. package/dist/generators/built-in/process-api-reference-generator.d.ts +18 -0
  218. package/dist/generators/built-in/process-api-reference-generator.d.ts.map +1 -0
  219. package/dist/generators/built-in/process-api-reference-generator.js +85 -0
  220. package/dist/generators/built-in/process-api-reference-generator.js.map +1 -0
  221. package/dist/generators/built-in/reference-generators.d.ts +51 -0
  222. package/dist/generators/built-in/reference-generators.d.ts.map +1 -0
  223. package/dist/generators/built-in/reference-generators.js +320 -0
  224. package/dist/generators/built-in/reference-generators.js.map +1 -0
  225. package/dist/generators/codec-based.d.ts +63 -0
  226. package/dist/generators/codec-based.d.ts.map +1 -0
  227. package/dist/generators/codec-based.js +88 -0
  228. package/dist/generators/codec-based.js.map +1 -0
  229. package/dist/generators/content-deduplicator.d.ts +114 -0
  230. package/dist/generators/content-deduplicator.d.ts.map +1 -0
  231. package/dist/generators/content-deduplicator.js +356 -0
  232. package/dist/generators/content-deduplicator.js.map +1 -0
  233. package/dist/generators/index.d.ts +50 -0
  234. package/dist/generators/index.d.ts.map +1 -0
  235. package/dist/generators/index.js +54 -0
  236. package/dist/generators/index.js.map +1 -0
  237. package/dist/generators/orchestrator.d.ts +265 -0
  238. package/dist/generators/orchestrator.d.ts.map +1 -0
  239. package/dist/generators/orchestrator.js +570 -0
  240. package/dist/generators/orchestrator.js.map +1 -0
  241. package/dist/generators/pipeline/build-pipeline.d.ts +131 -0
  242. package/dist/generators/pipeline/build-pipeline.d.ts.map +1 -0
  243. package/dist/generators/pipeline/build-pipeline.js +248 -0
  244. package/dist/generators/pipeline/build-pipeline.js.map +1 -0
  245. package/dist/generators/pipeline/context-inference.d.ts +55 -0
  246. package/dist/generators/pipeline/context-inference.d.ts.map +1 -0
  247. package/dist/generators/pipeline/context-inference.js +76 -0
  248. package/dist/generators/pipeline/context-inference.js.map +1 -0
  249. package/dist/generators/pipeline/index.d.ts +27 -0
  250. package/dist/generators/pipeline/index.d.ts.map +1 -0
  251. package/dist/generators/pipeline/index.js +34 -0
  252. package/dist/generators/pipeline/index.js.map +1 -0
  253. package/dist/generators/pipeline/merge-patterns.d.ts +33 -0
  254. package/dist/generators/pipeline/merge-patterns.d.ts.map +1 -0
  255. package/dist/generators/pipeline/merge-patterns.js +50 -0
  256. package/dist/generators/pipeline/merge-patterns.js.map +1 -0
  257. package/dist/generators/pipeline/relationship-resolver.d.ts +47 -0
  258. package/dist/generators/pipeline/relationship-resolver.d.ts.map +1 -0
  259. package/dist/generators/pipeline/relationship-resolver.js +132 -0
  260. package/dist/generators/pipeline/relationship-resolver.js.map +1 -0
  261. package/dist/generators/pipeline/sequence-utils.d.ts +49 -0
  262. package/dist/generators/pipeline/sequence-utils.d.ts.map +1 -0
  263. package/dist/generators/pipeline/sequence-utils.js +235 -0
  264. package/dist/generators/pipeline/sequence-utils.js.map +1 -0
  265. package/dist/generators/pipeline/transform-dataset.d.ts +82 -0
  266. package/dist/generators/pipeline/transform-dataset.d.ts.map +1 -0
  267. package/dist/generators/pipeline/transform-dataset.js +355 -0
  268. package/dist/generators/pipeline/transform-dataset.js.map +1 -0
  269. package/dist/generators/pipeline/transform-types.d.ts +96 -0
  270. package/dist/generators/pipeline/transform-types.d.ts.map +1 -0
  271. package/dist/generators/pipeline/transform-types.js +18 -0
  272. package/dist/generators/pipeline/transform-types.js.map +1 -0
  273. package/dist/generators/registry.d.ts +64 -0
  274. package/dist/generators/registry.d.ts.map +1 -0
  275. package/dist/generators/registry.js +77 -0
  276. package/dist/generators/registry.js.map +1 -0
  277. package/dist/generators/source-mapper.d.ts +143 -0
  278. package/dist/generators/source-mapper.d.ts.map +1 -0
  279. package/dist/generators/source-mapper.js +602 -0
  280. package/dist/generators/source-mapper.js.map +1 -0
  281. package/dist/generators/source-mapping-validator.d.ts +118 -0
  282. package/dist/generators/source-mapping-validator.d.ts.map +1 -0
  283. package/dist/generators/source-mapping-validator.js +334 -0
  284. package/dist/generators/source-mapping-validator.js.map +1 -0
  285. package/dist/generators/types.d.ts +104 -0
  286. package/dist/generators/types.d.ts.map +1 -0
  287. package/dist/generators/types.js +5 -0
  288. package/dist/generators/types.js.map +1 -0
  289. package/dist/generators/warning-collector.d.ts +144 -0
  290. package/dist/generators/warning-collector.d.ts.map +1 -0
  291. package/dist/generators/warning-collector.js +166 -0
  292. package/dist/generators/warning-collector.js.map +1 -0
  293. package/dist/git/branch-diff.d.ts +44 -0
  294. package/dist/git/branch-diff.d.ts.map +1 -0
  295. package/dist/git/branch-diff.js +57 -0
  296. package/dist/git/branch-diff.js.map +1 -0
  297. package/dist/git/helpers.d.ts +46 -0
  298. package/dist/git/helpers.d.ts.map +1 -0
  299. package/dist/git/helpers.js +67 -0
  300. package/dist/git/helpers.js.map +1 -0
  301. package/dist/git/index.d.ts +18 -0
  302. package/dist/git/index.d.ts.map +1 -0
  303. package/dist/git/index.js +18 -0
  304. package/dist/git/index.js.map +1 -0
  305. package/dist/git/name-status.d.ts +32 -0
  306. package/dist/git/name-status.d.ts.map +1 -0
  307. package/dist/git/name-status.js +66 -0
  308. package/dist/git/name-status.js.map +1 -0
  309. package/dist/index.d.ts +107 -0
  310. package/dist/index.d.ts.map +1 -0
  311. package/dist/index.js +122 -0
  312. package/dist/index.js.map +1 -0
  313. package/dist/lint/engine.d.ts +113 -0
  314. package/dist/lint/engine.d.ts.map +1 -0
  315. package/dist/lint/engine.js +228 -0
  316. package/dist/lint/engine.js.map +1 -0
  317. package/dist/lint/index.d.ts +26 -0
  318. package/dist/lint/index.d.ts.map +1 -0
  319. package/dist/lint/index.js +24 -0
  320. package/dist/lint/index.js.map +1 -0
  321. package/dist/lint/process-guard/decider.d.ts +166 -0
  322. package/dist/lint/process-guard/decider.d.ts.map +1 -0
  323. package/dist/lint/process-guard/decider.js +412 -0
  324. package/dist/lint/process-guard/decider.js.map +1 -0
  325. package/dist/lint/process-guard/derive-state.d.ts +96 -0
  326. package/dist/lint/process-guard/derive-state.d.ts.map +1 -0
  327. package/dist/lint/process-guard/derive-state.js +368 -0
  328. package/dist/lint/process-guard/derive-state.js.map +1 -0
  329. package/dist/lint/process-guard/detect-changes.d.ts +109 -0
  330. package/dist/lint/process-guard/detect-changes.d.ts.map +1 -0
  331. package/dist/lint/process-guard/detect-changes.js +487 -0
  332. package/dist/lint/process-guard/detect-changes.js.map +1 -0
  333. package/dist/lint/process-guard/index.d.ts +35 -0
  334. package/dist/lint/process-guard/index.d.ts.map +1 -0
  335. package/dist/lint/process-guard/index.js +39 -0
  336. package/dist/lint/process-guard/index.js.map +1 -0
  337. package/dist/lint/process-guard/types.d.ts +255 -0
  338. package/dist/lint/process-guard/types.d.ts.map +1 -0
  339. package/dist/lint/process-guard/types.js +31 -0
  340. package/dist/lint/process-guard/types.js.map +1 -0
  341. package/dist/lint/rules.d.ts +147 -0
  342. package/dist/lint/rules.d.ts.map +1 -0
  343. package/dist/lint/rules.js +289 -0
  344. package/dist/lint/rules.js.map +1 -0
  345. package/dist/lint/steps/cross-checks.d.ts +66 -0
  346. package/dist/lint/steps/cross-checks.d.ts.map +1 -0
  347. package/dist/lint/steps/cross-checks.js +290 -0
  348. package/dist/lint/steps/cross-checks.js.map +1 -0
  349. package/dist/lint/steps/feature-checks.d.ts +78 -0
  350. package/dist/lint/steps/feature-checks.d.ts.map +1 -0
  351. package/dist/lint/steps/feature-checks.js +279 -0
  352. package/dist/lint/steps/feature-checks.js.map +1 -0
  353. package/dist/lint/steps/index.d.ts +22 -0
  354. package/dist/lint/steps/index.d.ts.map +1 -0
  355. package/dist/lint/steps/index.js +26 -0
  356. package/dist/lint/steps/index.js.map +1 -0
  357. package/dist/lint/steps/pair-resolver.d.ts +29 -0
  358. package/dist/lint/steps/pair-resolver.d.ts.map +1 -0
  359. package/dist/lint/steps/pair-resolver.js +76 -0
  360. package/dist/lint/steps/pair-resolver.js.map +1 -0
  361. package/dist/lint/steps/runner.d.ts +28 -0
  362. package/dist/lint/steps/runner.d.ts.map +1 -0
  363. package/dist/lint/steps/runner.js +143 -0
  364. package/dist/lint/steps/runner.js.map +1 -0
  365. package/dist/lint/steps/step-checks.d.ts +41 -0
  366. package/dist/lint/steps/step-checks.d.ts.map +1 -0
  367. package/dist/lint/steps/step-checks.js +164 -0
  368. package/dist/lint/steps/step-checks.js.map +1 -0
  369. package/dist/lint/steps/types.d.ts +95 -0
  370. package/dist/lint/steps/types.d.ts.map +1 -0
  371. package/dist/lint/steps/types.js +79 -0
  372. package/dist/lint/steps/types.js.map +1 -0
  373. package/dist/lint/steps/utils.d.ts +22 -0
  374. package/dist/lint/steps/utils.d.ts.map +1 -0
  375. package/dist/lint/steps/utils.js +57 -0
  376. package/dist/lint/steps/utils.js.map +1 -0
  377. package/dist/mcp/file-watcher.d.ts +24 -0
  378. package/dist/mcp/file-watcher.d.ts.map +1 -0
  379. package/dist/mcp/file-watcher.js +75 -0
  380. package/dist/mcp/file-watcher.js.map +1 -0
  381. package/dist/mcp/index.d.ts +19 -0
  382. package/dist/mcp/index.d.ts.map +1 -0
  383. package/dist/mcp/index.js +21 -0
  384. package/dist/mcp/index.js.map +1 -0
  385. package/dist/mcp/pipeline-session.d.ts +33 -0
  386. package/dist/mcp/pipeline-session.d.ts.map +1 -0
  387. package/dist/mcp/pipeline-session.js +149 -0
  388. package/dist/mcp/pipeline-session.js.map +1 -0
  389. package/dist/mcp/server.d.ts +28 -0
  390. package/dist/mcp/server.d.ts.map +1 -0
  391. package/dist/mcp/server.js +197 -0
  392. package/dist/mcp/server.js.map +1 -0
  393. package/dist/mcp/tool-registry.d.ts +4 -0
  394. package/dist/mcp/tool-registry.d.ts.map +1 -0
  395. package/dist/mcp/tool-registry.js +525 -0
  396. package/dist/mcp/tool-registry.js.map +1 -0
  397. package/dist/renderable/codecs/adr.d.ts +4730 -0
  398. package/dist/renderable/codecs/adr.d.ts.map +1 -0
  399. package/dist/renderable/codecs/adr.js +590 -0
  400. package/dist/renderable/codecs/adr.js.map +1 -0
  401. package/dist/renderable/codecs/architecture.d.ts +4760 -0
  402. package/dist/renderable/codecs/architecture.d.ts.map +1 -0
  403. package/dist/renderable/codecs/architecture.js +524 -0
  404. package/dist/renderable/codecs/architecture.js.map +1 -0
  405. package/dist/renderable/codecs/business-rules.d.ts +4777 -0
  406. package/dist/renderable/codecs/business-rules.d.ts.map +1 -0
  407. package/dist/renderable/codecs/business-rules.js +648 -0
  408. package/dist/renderable/codecs/business-rules.js.map +1 -0
  409. package/dist/renderable/codecs/claude-module.d.ts +4710 -0
  410. package/dist/renderable/codecs/claude-module.d.ts.map +1 -0
  411. package/dist/renderable/codecs/claude-module.js +214 -0
  412. package/dist/renderable/codecs/claude-module.js.map +1 -0
  413. package/dist/renderable/codecs/composite.d.ts +84 -0
  414. package/dist/renderable/codecs/composite.d.ts.map +1 -0
  415. package/dist/renderable/codecs/composite.js +124 -0
  416. package/dist/renderable/codecs/composite.js.map +1 -0
  417. package/dist/renderable/codecs/convention-extractor.d.ts +105 -0
  418. package/dist/renderable/codecs/convention-extractor.d.ts.map +1 -0
  419. package/dist/renderable/codecs/convention-extractor.js +353 -0
  420. package/dist/renderable/codecs/convention-extractor.js.map +1 -0
  421. package/dist/renderable/codecs/decision-doc.d.ts +308 -0
  422. package/dist/renderable/codecs/decision-doc.d.ts.map +1 -0
  423. package/dist/renderable/codecs/decision-doc.js +485 -0
  424. package/dist/renderable/codecs/decision-doc.js.map +1 -0
  425. package/dist/renderable/codecs/design-review.d.ts +55 -0
  426. package/dist/renderable/codecs/design-review.d.ts.map +1 -0
  427. package/dist/renderable/codecs/design-review.js +532 -0
  428. package/dist/renderable/codecs/design-review.js.map +1 -0
  429. package/dist/renderable/codecs/diagram-utils.d.ts +62 -0
  430. package/dist/renderable/codecs/diagram-utils.d.ts.map +1 -0
  431. package/dist/renderable/codecs/diagram-utils.js +70 -0
  432. package/dist/renderable/codecs/diagram-utils.js.map +1 -0
  433. package/dist/renderable/codecs/helpers.d.ts +553 -0
  434. package/dist/renderable/codecs/helpers.d.ts.map +1 -0
  435. package/dist/renderable/codecs/helpers.js +913 -0
  436. package/dist/renderable/codecs/helpers.js.map +1 -0
  437. package/dist/renderable/codecs/index-codec.d.ts +4714 -0
  438. package/dist/renderable/codecs/index-codec.d.ts.map +1 -0
  439. package/dist/renderable/codecs/index-codec.js +250 -0
  440. package/dist/renderable/codecs/index-codec.js.map +1 -0
  441. package/dist/renderable/codecs/index.d.ts +46 -0
  442. package/dist/renderable/codecs/index.d.ts.map +1 -0
  443. package/dist/renderable/codecs/index.js +70 -0
  444. package/dist/renderable/codecs/index.js.map +1 -0
  445. package/dist/renderable/codecs/patterns.d.ts +4757 -0
  446. package/dist/renderable/codecs/patterns.d.ts.map +1 -0
  447. package/dist/renderable/codecs/patterns.js +462 -0
  448. package/dist/renderable/codecs/patterns.js.map +1 -0
  449. package/dist/renderable/codecs/planning.d.ts +14055 -0
  450. package/dist/renderable/codecs/planning.d.ts.map +1 -0
  451. package/dist/renderable/codecs/planning.js +449 -0
  452. package/dist/renderable/codecs/planning.js.map +1 -0
  453. package/dist/renderable/codecs/pr-changes.d.ts +4742 -0
  454. package/dist/renderable/codecs/pr-changes.d.ts.map +1 -0
  455. package/dist/renderable/codecs/pr-changes.js +425 -0
  456. package/dist/renderable/codecs/pr-changes.js.map +1 -0
  457. package/dist/renderable/codecs/reference.d.ts +215 -0
  458. package/dist/renderable/codecs/reference.d.ts.map +1 -0
  459. package/dist/renderable/codecs/reference.js +1578 -0
  460. package/dist/renderable/codecs/reference.js.map +1 -0
  461. package/dist/renderable/codecs/reporting.d.ts +14026 -0
  462. package/dist/renderable/codecs/reporting.d.ts.map +1 -0
  463. package/dist/renderable/codecs/reporting.js +365 -0
  464. package/dist/renderable/codecs/reporting.js.map +1 -0
  465. package/dist/renderable/codecs/requirements.d.ts +4743 -0
  466. package/dist/renderable/codecs/requirements.d.ts.map +1 -0
  467. package/dist/renderable/codecs/requirements.js +428 -0
  468. package/dist/renderable/codecs/requirements.js.map +1 -0
  469. package/dist/renderable/codecs/session.d.ts +9410 -0
  470. package/dist/renderable/codecs/session.d.ts.map +1 -0
  471. package/dist/renderable/codecs/session.js +848 -0
  472. package/dist/renderable/codecs/session.js.map +1 -0
  473. package/dist/renderable/codecs/shape-matcher.d.ts +54 -0
  474. package/dist/renderable/codecs/shape-matcher.d.ts.map +1 -0
  475. package/dist/renderable/codecs/shape-matcher.js +106 -0
  476. package/dist/renderable/codecs/shape-matcher.js.map +1 -0
  477. package/dist/renderable/codecs/shared-schema.d.ts +44 -0
  478. package/dist/renderable/codecs/shared-schema.d.ts.map +1 -0
  479. package/dist/renderable/codecs/shared-schema.js +43 -0
  480. package/dist/renderable/codecs/shared-schema.js.map +1 -0
  481. package/dist/renderable/codecs/taxonomy.d.ts +4733 -0
  482. package/dist/renderable/codecs/taxonomy.d.ts.map +1 -0
  483. package/dist/renderable/codecs/taxonomy.js +570 -0
  484. package/dist/renderable/codecs/taxonomy.js.map +1 -0
  485. package/dist/renderable/codecs/timeline.d.ts +14094 -0
  486. package/dist/renderable/codecs/timeline.d.ts.map +1 -0
  487. package/dist/renderable/codecs/timeline.js +906 -0
  488. package/dist/renderable/codecs/timeline.js.map +1 -0
  489. package/dist/renderable/codecs/types/base.d.ts +81 -0
  490. package/dist/renderable/codecs/types/base.d.ts.map +1 -0
  491. package/dist/renderable/codecs/types/base.js +56 -0
  492. package/dist/renderable/codecs/types/base.js.map +1 -0
  493. package/dist/renderable/codecs/types/index.d.ts +5 -0
  494. package/dist/renderable/codecs/types/index.d.ts.map +1 -0
  495. package/dist/renderable/codecs/types/index.js +5 -0
  496. package/dist/renderable/codecs/types/index.js.map +1 -0
  497. package/dist/renderable/codecs/validation-rules.d.ts +4773 -0
  498. package/dist/renderable/codecs/validation-rules.d.ts.map +1 -0
  499. package/dist/renderable/codecs/validation-rules.js +537 -0
  500. package/dist/renderable/codecs/validation-rules.js.map +1 -0
  501. package/dist/renderable/generate.d.ts +338 -0
  502. package/dist/renderable/generate.d.ts.map +1 -0
  503. package/dist/renderable/generate.js +437 -0
  504. package/dist/renderable/generate.js.map +1 -0
  505. package/dist/renderable/index.d.ts +36 -0
  506. package/dist/renderable/index.d.ts.map +1 -0
  507. package/dist/renderable/index.js +58 -0
  508. package/dist/renderable/index.js.map +1 -0
  509. package/dist/renderable/load-preamble.d.ts +56 -0
  510. package/dist/renderable/load-preamble.d.ts.map +1 -0
  511. package/dist/renderable/load-preamble.js +298 -0
  512. package/dist/renderable/load-preamble.js.map +1 -0
  513. package/dist/renderable/render.d.ts +61 -0
  514. package/dist/renderable/render.d.ts.map +1 -0
  515. package/dist/renderable/render.js +346 -0
  516. package/dist/renderable/render.js.map +1 -0
  517. package/dist/renderable/schema.d.ts +194 -0
  518. package/dist/renderable/schema.d.ts.map +1 -0
  519. package/dist/renderable/schema.js +197 -0
  520. package/dist/renderable/schema.js.map +1 -0
  521. package/dist/renderable/utils.d.ts +146 -0
  522. package/dist/renderable/utils.d.ts.map +1 -0
  523. package/dist/renderable/utils.js +362 -0
  524. package/dist/renderable/utils.js.map +1 -0
  525. package/dist/scanner/ast-parser.d.ts +75 -0
  526. package/dist/scanner/ast-parser.d.ts.map +1 -0
  527. package/dist/scanner/ast-parser.js +835 -0
  528. package/dist/scanner/ast-parser.js.map +1 -0
  529. package/dist/scanner/gherkin-ast-parser.d.ts +166 -0
  530. package/dist/scanner/gherkin-ast-parser.d.ts.map +1 -0
  531. package/dist/scanner/gherkin-ast-parser.js +507 -0
  532. package/dist/scanner/gherkin-ast-parser.js.map +1 -0
  533. package/dist/scanner/gherkin-scanner.d.ts +106 -0
  534. package/dist/scanner/gherkin-scanner.d.ts.map +1 -0
  535. package/dist/scanner/gherkin-scanner.js +149 -0
  536. package/dist/scanner/gherkin-scanner.js.map +1 -0
  537. package/dist/scanner/index.d.ts +85 -0
  538. package/dist/scanner/index.d.ts.map +1 -0
  539. package/dist/scanner/index.js +102 -0
  540. package/dist/scanner/index.js.map +1 -0
  541. package/dist/scanner/pattern-scanner.d.ts +83 -0
  542. package/dist/scanner/pattern-scanner.d.ts.map +1 -0
  543. package/dist/scanner/pattern-scanner.js +110 -0
  544. package/dist/scanner/pattern-scanner.js.map +1 -0
  545. package/dist/taxonomy/categories.d.ts +47 -0
  546. package/dist/taxonomy/categories.d.ts.map +1 -0
  547. package/dist/taxonomy/categories.js +175 -0
  548. package/dist/taxonomy/categories.js.map +1 -0
  549. package/dist/taxonomy/claude-section-values.d.ts +12 -0
  550. package/dist/taxonomy/claude-section-values.d.ts.map +1 -0
  551. package/dist/taxonomy/claude-section-values.js +17 -0
  552. package/dist/taxonomy/claude-section-values.js.map +1 -0
  553. package/dist/taxonomy/conventions.d.ts +13 -0
  554. package/dist/taxonomy/conventions.d.ts.map +1 -0
  555. package/dist/taxonomy/conventions.js +27 -0
  556. package/dist/taxonomy/conventions.js.map +1 -0
  557. package/dist/taxonomy/deliverable-status.d.ts +99 -0
  558. package/dist/taxonomy/deliverable-status.d.ts.map +1 -0
  559. package/dist/taxonomy/deliverable-status.js +131 -0
  560. package/dist/taxonomy/deliverable-status.js.map +1 -0
  561. package/dist/taxonomy/format-types.d.ts +17 -0
  562. package/dist/taxonomy/format-types.d.ts.map +1 -0
  563. package/dist/taxonomy/format-types.js +23 -0
  564. package/dist/taxonomy/format-types.js.map +1 -0
  565. package/dist/taxonomy/generator-options.d.ts +67 -0
  566. package/dist/taxonomy/generator-options.d.ts.map +1 -0
  567. package/dist/taxonomy/generator-options.js +75 -0
  568. package/dist/taxonomy/generator-options.js.map +1 -0
  569. package/dist/taxonomy/hierarchy-levels.d.ts +23 -0
  570. package/dist/taxonomy/hierarchy-levels.d.ts.map +1 -0
  571. package/dist/taxonomy/hierarchy-levels.js +22 -0
  572. package/dist/taxonomy/hierarchy-levels.js.map +1 -0
  573. package/dist/taxonomy/index.d.ts +35 -0
  574. package/dist/taxonomy/index.d.ts.map +1 -0
  575. package/dist/taxonomy/index.js +56 -0
  576. package/dist/taxonomy/index.js.map +1 -0
  577. package/dist/taxonomy/layer-types.d.ts +22 -0
  578. package/dist/taxonomy/layer-types.d.ts.map +1 -0
  579. package/dist/taxonomy/layer-types.js +28 -0
  580. package/dist/taxonomy/layer-types.js.map +1 -0
  581. package/dist/taxonomy/normalized-status.d.ts +99 -0
  582. package/dist/taxonomy/normalized-status.d.ts.map +1 -0
  583. package/dist/taxonomy/normalized-status.js +113 -0
  584. package/dist/taxonomy/normalized-status.js.map +1 -0
  585. package/dist/taxonomy/registry-builder.d.ts +104 -0
  586. package/dist/taxonomy/registry-builder.d.ts.map +1 -0
  587. package/dist/taxonomy/registry-builder.js +561 -0
  588. package/dist/taxonomy/registry-builder.js.map +1 -0
  589. package/dist/taxonomy/risk-levels.d.ts +16 -0
  590. package/dist/taxonomy/risk-levels.d.ts.map +1 -0
  591. package/dist/taxonomy/risk-levels.js +15 -0
  592. package/dist/taxonomy/risk-levels.js.map +1 -0
  593. package/dist/taxonomy/severity-types.d.ts +6 -0
  594. package/dist/taxonomy/severity-types.d.ts.map +1 -0
  595. package/dist/taxonomy/severity-types.js +5 -0
  596. package/dist/taxonomy/severity-types.js.map +1 -0
  597. package/dist/taxonomy/status-values.d.ts +39 -0
  598. package/dist/taxonomy/status-values.d.ts.map +1 -0
  599. package/dist/taxonomy/status-values.js +42 -0
  600. package/dist/taxonomy/status-values.js.map +1 -0
  601. package/dist/types/branded.d.ts +89 -0
  602. package/dist/types/branded.d.ts.map +1 -0
  603. package/dist/types/branded.js +57 -0
  604. package/dist/types/branded.js.map +1 -0
  605. package/dist/types/errors.d.ts +342 -0
  606. package/dist/types/errors.d.ts.map +1 -0
  607. package/dist/types/errors.js +251 -0
  608. package/dist/types/errors.js.map +1 -0
  609. package/dist/types/index.d.ts +41 -0
  610. package/dist/types/index.d.ts.map +1 -0
  611. package/dist/types/index.js +5 -0
  612. package/dist/types/index.js.map +1 -0
  613. package/dist/types/result.d.ts +78 -0
  614. package/dist/types/result.d.ts.map +1 -0
  615. package/dist/types/result.js +78 -0
  616. package/dist/types/result.js.map +1 -0
  617. package/dist/utils/collection-utils.d.ts +49 -0
  618. package/dist/utils/collection-utils.d.ts.map +1 -0
  619. package/dist/utils/collection-utils.js +58 -0
  620. package/dist/utils/collection-utils.js.map +1 -0
  621. package/dist/utils/id-utils.d.ts +46 -0
  622. package/dist/utils/id-utils.d.ts.map +1 -0
  623. package/dist/utils/id-utils.js +51 -0
  624. package/dist/utils/id-utils.js.map +1 -0
  625. package/dist/utils/index.d.ts +21 -0
  626. package/dist/utils/index.d.ts.map +1 -0
  627. package/dist/utils/index.js +21 -0
  628. package/dist/utils/index.js.map +1 -0
  629. package/dist/utils/string-utils.d.ts +150 -0
  630. package/dist/utils/string-utils.d.ts.map +1 -0
  631. package/dist/utils/string-utils.js +281 -0
  632. package/dist/utils/string-utils.js.map +1 -0
  633. package/dist/validation/anti-patterns.d.ts +134 -0
  634. package/dist/validation/anti-patterns.d.ts.map +1 -0
  635. package/dist/validation/anti-patterns.js +307 -0
  636. package/dist/validation/anti-patterns.js.map +1 -0
  637. package/dist/validation/dod-validator.d.ts +94 -0
  638. package/dist/validation/dod-validator.d.ts.map +1 -0
  639. package/dist/validation/dod-validator.js +198 -0
  640. package/dist/validation/dod-validator.js.map +1 -0
  641. package/dist/validation/fsm/index.d.ts +59 -0
  642. package/dist/validation/fsm/index.d.ts.map +1 -0
  643. package/dist/validation/fsm/index.js +64 -0
  644. package/dist/validation/fsm/index.js.map +1 -0
  645. package/dist/validation/fsm/states.d.ts +93 -0
  646. package/dist/validation/fsm/states.d.ts.map +1 -0
  647. package/dist/validation/fsm/states.js +98 -0
  648. package/dist/validation/fsm/states.js.map +1 -0
  649. package/dist/validation/fsm/transitions.d.ts +100 -0
  650. package/dist/validation/fsm/transitions.d.ts.map +1 -0
  651. package/dist/validation/fsm/transitions.js +122 -0
  652. package/dist/validation/fsm/transitions.js.map +1 -0
  653. package/dist/validation/fsm/validator.d.ts +163 -0
  654. package/dist/validation/fsm/validator.d.ts.map +1 -0
  655. package/dist/validation/fsm/validator.js +205 -0
  656. package/dist/validation/fsm/validator.js.map +1 -0
  657. package/dist/validation/index.d.ts +23 -0
  658. package/dist/validation/index.d.ts.map +1 -0
  659. package/dist/validation/index.js +25 -0
  660. package/dist/validation/index.js.map +1 -0
  661. package/dist/validation/types.d.ts +136 -0
  662. package/dist/validation/types.d.ts.map +1 -0
  663. package/dist/validation/types.js +56 -0
  664. package/dist/validation/types.js.map +1 -0
  665. package/dist/validation-schemas/codec-utils.d.ts +188 -0
  666. package/dist/validation-schemas/codec-utils.d.ts.map +1 -0
  667. package/dist/validation-schemas/codec-utils.js +258 -0
  668. package/dist/validation-schemas/codec-utils.js.map +1 -0
  669. package/dist/validation-schemas/config.d.ts +99 -0
  670. package/dist/validation-schemas/config.d.ts.map +1 -0
  671. package/dist/validation-schemas/config.js +178 -0
  672. package/dist/validation-schemas/config.js.map +1 -0
  673. package/dist/validation-schemas/doc-directive.d.ts +195 -0
  674. package/dist/validation-schemas/doc-directive.d.ts.map +1 -0
  675. package/dist/validation-schemas/doc-directive.js +239 -0
  676. package/dist/validation-schemas/doc-directive.js.map +1 -0
  677. package/dist/validation-schemas/dual-source.d.ts +167 -0
  678. package/dist/validation-schemas/dual-source.d.ts.map +1 -0
  679. package/dist/validation-schemas/dual-source.js +168 -0
  680. package/dist/validation-schemas/dual-source.js.map +1 -0
  681. package/dist/validation-schemas/export-info.d.ts +53 -0
  682. package/dist/validation-schemas/export-info.d.ts.map +1 -0
  683. package/dist/validation-schemas/export-info.js +101 -0
  684. package/dist/validation-schemas/export-info.js.map +1 -0
  685. package/dist/validation-schemas/extracted-pattern.d.ts +351 -0
  686. package/dist/validation-schemas/extracted-pattern.d.ts.map +1 -0
  687. package/dist/validation-schemas/extracted-pattern.js +459 -0
  688. package/dist/validation-schemas/extracted-pattern.js.map +1 -0
  689. package/dist/validation-schemas/extracted-shape.d.ts +200 -0
  690. package/dist/validation-schemas/extracted-shape.d.ts.map +1 -0
  691. package/dist/validation-schemas/extracted-shape.js +182 -0
  692. package/dist/validation-schemas/extracted-shape.js.map +1 -0
  693. package/dist/validation-schemas/feature.d.ts +554 -0
  694. package/dist/validation-schemas/feature.d.ts.map +1 -0
  695. package/dist/validation-schemas/feature.js +262 -0
  696. package/dist/validation-schemas/feature.js.map +1 -0
  697. package/dist/validation-schemas/index.d.ts +15 -0
  698. package/dist/validation-schemas/index.d.ts.map +1 -0
  699. package/dist/validation-schemas/index.js +32 -0
  700. package/dist/validation-schemas/index.js.map +1 -0
  701. package/dist/validation-schemas/lint.d.ts +46 -0
  702. package/dist/validation-schemas/lint.d.ts.map +1 -0
  703. package/dist/validation-schemas/lint.js +45 -0
  704. package/dist/validation-schemas/lint.js.map +1 -0
  705. package/dist/validation-schemas/master-dataset.d.ts +8299 -0
  706. package/dist/validation-schemas/master-dataset.d.ts.map +1 -0
  707. package/dist/validation-schemas/master-dataset.js +275 -0
  708. package/dist/validation-schemas/master-dataset.js.map +1 -0
  709. package/dist/validation-schemas/output-schemas.d.ts +183 -0
  710. package/dist/validation-schemas/output-schemas.d.ts.map +1 -0
  711. package/dist/validation-schemas/output-schemas.js +149 -0
  712. package/dist/validation-schemas/output-schemas.js.map +1 -0
  713. package/dist/validation-schemas/scenario-ref.d.ts +80 -0
  714. package/dist/validation-schemas/scenario-ref.d.ts.map +1 -0
  715. package/dist/validation-schemas/scenario-ref.js +73 -0
  716. package/dist/validation-schemas/scenario-ref.js.map +1 -0
  717. package/dist/validation-schemas/tag-registry.d.ts +210 -0
  718. package/dist/validation-schemas/tag-registry.d.ts.map +1 -0
  719. package/dist/validation-schemas/tag-registry.js +248 -0
  720. package/dist/validation-schemas/tag-registry.js.map +1 -0
  721. package/dist/validation-schemas/workflow-config.d.ts +125 -0
  722. package/dist/validation-schemas/workflow-config.d.ts.map +1 -0
  723. package/dist/validation-schemas/workflow-config.js +138 -0
  724. package/dist/validation-schemas/workflow-config.js.map +1 -0
  725. package/docs/ANNOTATION-GUIDE.md +271 -0
  726. package/docs/ARCHITECTURE.md +1636 -0
  727. package/docs/CONFIGURATION.md +337 -0
  728. package/docs/DOCS-GAP-ANALYSIS.md +811 -0
  729. package/docs/GHERKIN-PATTERNS.md +366 -0
  730. package/docs/INDEX.md +345 -0
  731. package/docs/MCP-SETUP.md +140 -0
  732. package/docs/METHODOLOGY.md +240 -0
  733. package/docs/PROCESS-API.md +65 -0
  734. package/docs/PROCESS-GUARD.md +341 -0
  735. package/docs/SESSION-GUIDES.md +391 -0
  736. package/docs/TAXONOMY.md +106 -0
  737. package/docs/VALIDATION.md +418 -0
  738. package/docs-live/ARCHITECTURE.md +362 -0
  739. package/docs-live/BUSINESS-RULES.md +24 -0
  740. package/docs-live/CHANGELOG-GENERATED.md +375 -0
  741. package/docs-live/DECISIONS.md +78 -0
  742. package/docs-live/INDEX.md +231 -0
  743. package/docs-live/PRODUCT-AREAS.md +255 -0
  744. package/docs-live/TAXONOMY.md +202 -0
  745. package/docs-live/VALIDATION-RULES.md +119 -0
  746. package/docs-live/_claude-md/annotation/annotation-overview.md +26 -0
  747. package/docs-live/_claude-md/annotation/annotation-reference.md +213 -0
  748. package/docs-live/_claude-md/architecture/architecture-codecs.md +160 -0
  749. package/docs-live/_claude-md/architecture/architecture-types.md +32 -0
  750. package/docs-live/_claude-md/architecture/reference-sample.md +162 -0
  751. package/docs-live/_claude-md/authoring/gherkin-authoring-guide.md +245 -0
  752. package/docs-live/_claude-md/configuration/configuration-guide.md +216 -0
  753. package/docs-live/_claude-md/configuration/configuration-overview.md +37 -0
  754. package/docs-live/_claude-md/core-types/core-types-overview.md +20 -0
  755. package/docs-live/_claude-md/data-api/data-api-overview.md +39 -0
  756. package/docs-live/_claude-md/generation/generation-overview.md +30 -0
  757. package/docs-live/_claude-md/process/process-overview.md +127 -0
  758. package/docs-live/_claude-md/validation/process-guard.md +185 -0
  759. package/docs-live/_claude-md/validation/validation-overview.md +37 -0
  760. package/docs-live/_claude-md/validation/validation-tools-guide.md +242 -0
  761. package/docs-live/_claude-md/workflow/session-workflow-guide.md +141 -0
  762. package/docs-live/business-rules/annotation.md +1462 -0
  763. package/docs-live/business-rules/configuration.md +465 -0
  764. package/docs-live/business-rules/core-types.md +531 -0
  765. package/docs-live/business-rules/data-api.md +1403 -0
  766. package/docs-live/business-rules/generation.md +4726 -0
  767. package/docs-live/business-rules/process.md +122 -0
  768. package/docs-live/business-rules/validation.md +998 -0
  769. package/docs-live/decisions/adr-001-taxonomy-canonical-values.md +197 -0
  770. package/docs-live/decisions/adr-002-gherkin-only-testing.md +57 -0
  771. package/docs-live/decisions/adr-003-source-first-pattern-architecture.md +147 -0
  772. package/docs-live/decisions/adr-004-session-workflow-commands.md +137 -0
  773. package/docs-live/decisions/adr-005-codec-based-markdown-rendering.md +150 -0
  774. package/docs-live/decisions/adr-006-single-read-model-architecture.md +136 -0
  775. package/docs-live/decisions/adr-021-doc-generation-proof-of-concept.md +489 -0
  776. package/docs-live/product-areas/ANNOTATION.md +591 -0
  777. package/docs-live/product-areas/CONFIGURATION.md +1048 -0
  778. package/docs-live/product-areas/CORE-TYPES.md +221 -0
  779. package/docs-live/product-areas/DATA-API.md +850 -0
  780. package/docs-live/product-areas/GENERATION.md +1200 -0
  781. package/docs-live/product-areas/PROCESS.md +351 -0
  782. package/docs-live/product-areas/VALIDATION.md +1135 -0
  783. package/docs-live/reference/ANNOTATION-REFERENCE.md +232 -0
  784. package/docs-live/reference/ARCHITECTURE-CODECS.md +675 -0
  785. package/docs-live/reference/ARCHITECTURE-TYPES.md +436 -0
  786. package/docs-live/reference/CONFIGURATION-GUIDE.md +235 -0
  787. package/docs-live/reference/GHERKIN-AUTHORING-GUIDE.md +270 -0
  788. package/docs-live/reference/PROCESS-API-RECIPES.md +476 -0
  789. package/docs-live/reference/PROCESS-API-REFERENCE.md +63 -0
  790. package/docs-live/reference/PROCESS-GUARD-REFERENCE.md +258 -0
  791. package/docs-live/reference/REFERENCE-SAMPLE.md +1135 -0
  792. package/docs-live/reference/SESSION-WORKFLOW-GUIDE.md +384 -0
  793. package/docs-live/reference/VALIDATION-TOOLS-GUIDE.md +263 -0
  794. package/docs-live/taxonomy/categories.md +33 -0
  795. package/docs-live/taxonomy/format-types.md +67 -0
  796. package/docs-live/taxonomy/metadata-tags.md +693 -0
  797. package/docs-live/validation/error-catalog.md +78 -0
  798. package/docs-live/validation/fsm-transitions.md +50 -0
  799. package/docs-live/validation/protection-levels.md +51 -0
  800. package/package.json +233 -0
@@ -0,0 +1,1135 @@
1
+ # Reference Generation Sample
2
+
3
+ **Purpose:** Reference document: Reference Generation Sample
4
+ **Detail Level:** Full reference
5
+
6
+ ---
7
+
8
+ ## Product area canonical values
9
+
10
+ **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module.
11
+
12
+ **Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages.
13
+
14
+ | Value | Reader Question | Covers |
15
+ | ------------- | ----------------------------------- | ----------------------------------------------- |
16
+ | Annotation | How do I annotate code? | Scanning, extraction, tag parsing, dual-source |
17
+ | Configuration | How do I configure the tool? | Config loading, presets, resolution |
18
+ | Generation | How does code become docs? | Codecs, generators, rendering, diagrams |
19
+ | Validation | How is the workflow enforced? | FSM, DoD, anti-patterns, process guard, lint |
20
+ | DataAPI | How do I query process state? | Process state API, stubs, context assembly, CLI |
21
+ | CoreTypes | What foundational types exist? | Result monad, error factories, string utils |
22
+ | Process | How does the session workflow work? | Session lifecycle, handoffs, conventions |
23
+
24
+ **Verified by:** Canonical values are enforced
25
+
26
+ ---
27
+
28
+ ## ADR category canonical values
29
+
30
+ **Invariant:** The adr-category tag uses one of 4 values.
31
+
32
+ **Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable.
33
+
34
+ | Value | Purpose |
35
+ | ------------- | --------------------------------------------- |
36
+ | architecture | System structure, component design, data flow |
37
+ | process | Workflow, conventions, annotation rules |
38
+ | testing | Test strategy, verification approach |
39
+ | documentation | Documentation generation, content structure |
40
+
41
+ **Verified by:** Canonical values are enforced
42
+
43
+ ---
44
+
45
+ ## FSM status values and protection levels
46
+
47
+ **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time.
48
+
49
+ **Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity.
50
+
51
+ | Status | Protection | Can Add Deliverables | Allowed Actions |
52
+ | --------- | ------------ | -------------------- | ------------------------------- |
53
+ | roadmap | None | Yes | Full editing |
54
+ | active | Scope-locked | No | Edit existing deliverables only |
55
+ | completed | Hard-locked | No | Requires unlock-reason tag |
56
+ | deferred | None | Yes | Full editing |
57
+
58
+ **Verified by:** Canonical values are enforced
59
+
60
+ ---
61
+
62
+ ## Valid FSM transitions
63
+
64
+ **Invariant:** Only these transitions are valid. All others are rejected by Process Guard.
65
+
66
+ **Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance.
67
+
68
+ | From | To | Trigger |
69
+ | -------- | --------- | --------------------- |
70
+ | roadmap | active | Start work |
71
+ | roadmap | deferred | Postpone |
72
+ | active | completed | All deliverables done |
73
+ | active | roadmap | Blocked/regressed |
74
+ | deferred | roadmap | Resume planning |
75
+
76
+ **Verified by:** Canonical values are enforced
77
+
78
+ Completed is a terminal state. Modifications require
79
+ `@architect-unlock-reason` escape hatch.
80
+
81
+ ---
82
+
83
+ ## Tag format types
84
+
85
+ **Invariant:** Every tag has one of 6 format types that determines how its value is parsed.
86
+
87
+ **Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text.
88
+
89
+ | Format | Parsing | Example |
90
+ | ------------ | ------------------------------ | ----------------------------- |
91
+ | flag | Boolean presence, no value | @architect-core |
92
+ | value | Simple string | @architect-pattern MyPattern |
93
+ | enum | Constrained to predefined list | @architect-status completed |
94
+ | csv | Comma-separated values | @architect-uses A, B, C |
95
+ | number | Numeric value | @architect-phase 15 |
96
+ | quoted-value | Preserves spaces | @architect-brief:'Multi word' |
97
+
98
+ **Verified by:** Canonical values are enforced
99
+
100
+ ---
101
+
102
+ ## Source ownership
103
+
104
+ **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries.
105
+
106
+ **Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model.
107
+
108
+ | Tag | Correct Source | Wrong Source | Rationale |
109
+ | ---------- | -------------- | ------------- | ---------------------------------- |
110
+ | uses | TypeScript | Feature files | TS owns runtime dependencies |
111
+ | depends-on | Feature files | TypeScript | Gherkin owns planning dependencies |
112
+ | quarter | Feature files | TypeScript | Gherkin owns timeline metadata |
113
+ | team | Feature files | TypeScript | Gherkin owns ownership metadata |
114
+
115
+ **Verified by:** Canonical values are enforced
116
+
117
+ ---
118
+
119
+ ## Quarter format convention
120
+
121
+ **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically.
122
+
123
+ **Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering.
124
+
125
+ **Verified by:** Canonical values are enforced
126
+
127
+ ---
128
+
129
+ ## Canonical phase definitions (6-phase USDP standard)
130
+
131
+ **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation.
132
+
133
+ **Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible.
134
+
135
+ | Order | Phase | Purpose |
136
+ | ----- | ------------- | ---------------------------------------------- |
137
+ | 1 | Inception | Problem framing, scope definition |
138
+ | 2 | Elaboration | Design decisions, architecture exploration |
139
+ | 3 | Session | Planning and design session work |
140
+ | 4 | Construction | Implementation, testing, integration |
141
+ | 5 | Validation | Verification, acceptance criteria confirmation |
142
+ | 6 | Retrospective | Review, lessons learned, documentation |
143
+
144
+ **Verified by:** Canonical values are enforced
145
+
146
+ ---
147
+
148
+ ## Deliverable status canonical values
149
+
150
+ **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time.
151
+
152
+ **Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness.
153
+
154
+ | Value | Meaning |
155
+ | ----------- | -------------------- |
156
+ | complete | Work is done |
157
+ | in-progress | Work is ongoing |
158
+ | pending | Work has not started |
159
+ | deferred | Work postponed |
160
+ | superseded | Replaced by another |
161
+ | n/a | Not applicable |
162
+
163
+ **Verified by:** Canonical values are enforced
164
+
165
+ ---
166
+
167
+ ## Configuration Components
168
+
169
+ Scoped architecture diagram showing component relationships:
170
+
171
+ ```mermaid
172
+ graph TB
173
+ subgraph config["Config"]
174
+ ArchitectFactory("ArchitectFactory")
175
+ DefineConfig[/"DefineConfig"/]
176
+ end
177
+ ConfigBasedWorkflowDefinition["ConfigBasedWorkflowDefinition"]
178
+ ProcessGuardTesting["ProcessGuardTesting"]
179
+ subgraph related["Related"]
180
+ AntiPatternDetector["AntiPatternDetector"]:::neighbor
181
+ ConfigurationTypes["ConfigurationTypes"]:::neighbor
182
+ RegexBuilders["RegexBuilders"]:::neighbor
183
+ ProjectConfigTypes["ProjectConfigTypes"]:::neighbor
184
+ ConfigurationPresets["ConfigurationPresets"]:::neighbor
185
+ ProcessGuardLinter["ProcessGuardLinter"]:::neighbor
186
+ PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor
187
+ MvpWorkflowImplementation["MvpWorkflowImplementation"]:::neighbor
188
+ end
189
+ ArchitectFactory -->|uses| ConfigurationTypes
190
+ ArchitectFactory -->|uses| ConfigurationPresets
191
+ ArchitectFactory -->|uses| RegexBuilders
192
+ DefineConfig -->|uses| ProjectConfigTypes
193
+ ConfigBasedWorkflowDefinition -.->|depends on| MvpWorkflowImplementation
194
+ ProcessGuardTesting -.->|depends on| PhaseStateMachineValidation
195
+ ProcessGuardTesting -.->|depends on| AntiPatternDetector
196
+ ProcessGuardTesting ..->|implements| ProcessGuardLinter
197
+ RegexBuilders -->|uses| ConfigurationTypes
198
+ ProjectConfigTypes -->|uses| ConfigurationTypes
199
+ ProjectConfigTypes -->|uses| ConfigurationPresets
200
+ ConfigurationPresets -->|uses| ConfigurationTypes
201
+ classDef neighbor stroke-dasharray: 5 5
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Generation Pipeline
207
+
208
+ Temporal flow of the documentation generation pipeline:
209
+
210
+ ```mermaid
211
+ sequenceDiagram
212
+ participant CLI
213
+ participant Orchestrator
214
+ participant Scanner
215
+ participant Extractor
216
+ participant Transformer
217
+ participant Codec
218
+ participant Renderer
219
+ CLI ->> Orchestrator: generate(config)
220
+ Orchestrator ->> Scanner: scanPatterns(globs)
221
+ Scanner -->> Orchestrator: TypeScript ASTs
222
+ Orchestrator ->> Scanner: scanGherkinFiles(globs)
223
+ Scanner -->> Orchestrator: Gherkin documents
224
+ Orchestrator ->> Extractor: extractPatterns(files)
225
+ Extractor -->> Orchestrator: ExtractedPattern[]
226
+ Orchestrator ->> Extractor: extractFromGherkin(docs)
227
+ Extractor -->> Orchestrator: ExtractedPattern[]
228
+ Orchestrator ->> Orchestrator: mergePatterns(ts, gherkin)
229
+ Orchestrator ->> Transformer: transformToMasterDataset(patterns)
230
+ Transformer -->> Orchestrator: MasterDataset
231
+ Orchestrator ->> Codec: codec.decode(dataset)
232
+ Codec -->> Orchestrator: RenderableDocument
233
+ Orchestrator ->> Renderer: render(document)
234
+ Renderer -->> Orchestrator: markdown string
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Generator Class Model
240
+
241
+ Scoped architecture diagram showing component relationships:
242
+
243
+ ```mermaid
244
+ classDiagram
245
+ class GitModule {
246
+ +getChangedFilesList const
247
+ }
248
+ class GitHelpers {
249
+ }
250
+ class GitBranchDiff {
251
+ }
252
+ class SourceMapper {
253
+ <<infrastructure>>
254
+ }
255
+ class Documentation_Generation_Orchestrator {
256
+ <<service>>
257
+ }
258
+ class ProcessApiReferenceGenerator {
259
+ }
260
+ class DesignReviewGenerator {
261
+ <<service>>
262
+ }
263
+ class DecisionDocGenerator {
264
+ <<service>>
265
+ }
266
+ class CliRecipeGenerator {
267
+ }
268
+ class TransformTypes {
269
+ }
270
+ class TransformDataset {
271
+ <<service>>
272
+ }
273
+ class SequenceTransformUtils {
274
+ <<service>>
275
+ }
276
+ class RelationshipResolver {
277
+ <<service>>
278
+ }
279
+ class ContextInferenceImpl {
280
+ +ContextInferenceRule interface
281
+ }
282
+ class MasterDataset
283
+ class Pattern_Scanner
284
+ class GherkinASTParser
285
+ class ShapeExtractor
286
+ class PatternHelpers
287
+ class DesignReviewCodec
288
+ class DecisionDocCodec
289
+ class ProcessApiHybridGeneration
290
+ class PatternRelationshipModel
291
+ class DesignReviewGeneration
292
+ class CliRecipeCodec
293
+ class ContextInference
294
+ GitModule ..> GitBranchDiff : uses
295
+ GitModule ..> GitHelpers : uses
296
+ SourceMapper ..> DecisionDocCodec : depends on
297
+ SourceMapper ..> ShapeExtractor : depends on
298
+ SourceMapper ..> GherkinASTParser : depends on
299
+ Documentation_Generation_Orchestrator ..> Pattern_Scanner : uses
300
+ ProcessApiReferenceGenerator ..|> ProcessApiHybridGeneration : implements
301
+ DesignReviewGenerator ..> DesignReviewCodec : uses
302
+ DesignReviewGenerator ..> MasterDataset : uses
303
+ DesignReviewGenerator ..|> DesignReviewGeneration : implements
304
+ DecisionDocGenerator ..> DecisionDocCodec : depends on
305
+ DecisionDocGenerator ..> SourceMapper : depends on
306
+ CliRecipeGenerator ..|> CliRecipeCodec : implements
307
+ TransformTypes ..> MasterDataset : uses
308
+ TransformDataset ..> MasterDataset : uses
309
+ TransformDataset ..|> PatternRelationshipModel : implements
310
+ SequenceTransformUtils ..> MasterDataset : uses
311
+ SequenceTransformUtils ..|> DesignReviewGeneration : implements
312
+ RelationshipResolver ..> PatternHelpers : uses
313
+ ContextInferenceImpl ..|> ContextInference : implements
314
+ DesignReviewCodec ..> MasterDataset : uses
315
+ DesignReviewCodec ..|> DesignReviewGeneration : implements
316
+ CliRecipeCodec ..> ProcessApiHybridGeneration : depends on
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Delivery Lifecycle FSM
322
+
323
+ FSM lifecycle showing valid state transitions and protection levels:
324
+
325
+ ```mermaid
326
+ stateDiagram-v2
327
+ [*] --> roadmap
328
+ roadmap --> active : Start work
329
+ roadmap --> deferred : Postpone
330
+ roadmap --> roadmap : Stay in planning
331
+ active --> completed : All deliverables done
332
+ active --> roadmap : Blocked / regressed
333
+ completed --> [*]
334
+ deferred --> roadmap : Resume planning
335
+ note right of roadmap
336
+ Protection: none
337
+ end note
338
+ note right of active
339
+ Protection: scope-locked
340
+ end note
341
+ note right of completed
342
+ Protection: hard-locked
343
+ end note
344
+ note right of deferred
345
+ Protection: none
346
+ end note
347
+ ```
348
+
349
+ ---
350
+
351
+ ## Scanning & Extraction Boundary
352
+
353
+ Scoped architecture diagram showing component relationships:
354
+
355
+ ```mermaid
356
+ C4Context
357
+ title Scanning & Extraction Boundary
358
+ Boundary(extractor, "Extractor") {
359
+ System(GherkinExtractor, "GherkinExtractor")
360
+ System(DualSourceExtractor, "DualSourceExtractor")
361
+ System(Document_Extractor, "Document Extractor")
362
+ }
363
+ Boundary(scanner, "Scanner") {
364
+ System(Pattern_Scanner, "Pattern Scanner")
365
+ System(GherkinScanner, "GherkinScanner")
366
+ System(GherkinASTParser, "GherkinASTParser")
367
+ System(TypeScript_AST_Parser, "TypeScript AST Parser")
368
+ }
369
+ System_Ext(DocDirectiveSchema, "DocDirectiveSchema")
370
+ System_Ext(GherkinRulesSupport, "GherkinRulesSupport")
371
+ Rel(GherkinScanner, GherkinASTParser, "uses")
372
+ Rel(GherkinScanner, GherkinRulesSupport, "implements")
373
+ Rel(GherkinASTParser, GherkinRulesSupport, "implements")
374
+ Rel(TypeScript_AST_Parser, DocDirectiveSchema, "uses")
375
+ Rel(GherkinExtractor, GherkinASTParser, "uses")
376
+ Rel(GherkinExtractor, GherkinRulesSupport, "implements")
377
+ Rel(DualSourceExtractor, GherkinExtractor, "uses")
378
+ Rel(DualSourceExtractor, GherkinScanner, "uses")
379
+ Rel(Document_Extractor, Pattern_Scanner, "uses")
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Domain Layer Overview
385
+
386
+ Scoped architecture diagram showing component relationships:
387
+
388
+ ```mermaid
389
+ graph LR
390
+ subgraph api["Api"]
391
+ MasterDataset[/"MasterDataset"/]
392
+ PatternHelpers["PatternHelpers"]
393
+ ArchQueriesImpl("ArchQueriesImpl")
394
+ end
395
+ subgraph cli["Cli"]
396
+ CLISchema["CLISchema"]
397
+ end
398
+ subgraph config["Config"]
399
+ ConfigurationTypes["ConfigurationTypes"]
400
+ ProjectConfigTypes["ProjectConfigTypes"]
401
+ ConfigurationPresets["ConfigurationPresets"]
402
+ end
403
+ subgraph renderer["Renderer"]
404
+ loadPreambleFromMarkdown___Shared_Markdown_to_SectionBlock_Parser["loadPreambleFromMarkdown — Shared Markdown-to-SectionBlock Parser"]
405
+ end
406
+ subgraph taxonomy["Taxonomy"]
407
+ TagRegistryBuilder("TagRegistryBuilder")
408
+ end
409
+ subgraph validation["Validation"]
410
+ FSMTransitions[/"FSMTransitions"/]
411
+ FSMStates[/"FSMStates"/]
412
+ end
413
+ subgraph related["Related"]
414
+ ProcessStateAPI["ProcessStateAPI"]:::neighbor
415
+ TypeScriptTaxonomyImplementation["TypeScriptTaxonomyImplementation"]:::neighbor
416
+ ProcessApiHybridGeneration["ProcessApiHybridGeneration"]:::neighbor
417
+ ProceduralGuideCodec["ProceduralGuideCodec"]:::neighbor
418
+ PhaseStateMachineValidation["PhaseStateMachineValidation"]:::neighbor
419
+ DataAPIOutputShaping["DataAPIOutputShaping"]:::neighbor
420
+ DataAPIArchitectureQueries["DataAPIArchitectureQueries"]:::neighbor
421
+ end
422
+ TagRegistryBuilder ..->|implements| TypeScriptTaxonomyImplementation
423
+ loadPreambleFromMarkdown___Shared_Markdown_to_SectionBlock_Parser ..->|implements| ProceduralGuideCodec
424
+ CLISchema ..->|implements| ProcessApiHybridGeneration
425
+ ProjectConfigTypes -->|uses| ConfigurationTypes
426
+ ProjectConfigTypes -->|uses| ConfigurationPresets
427
+ ConfigurationPresets -->|uses| ConfigurationTypes
428
+ PatternHelpers ..->|implements| DataAPIOutputShaping
429
+ ArchQueriesImpl -->|uses| ProcessStateAPI
430
+ ArchQueriesImpl -->|uses| MasterDataset
431
+ ArchQueriesImpl ..->|implements| DataAPIArchitectureQueries
432
+ FSMTransitions ..->|implements| PhaseStateMachineValidation
433
+ FSMStates ..->|implements| PhaseStateMachineValidation
434
+ ProcessStateAPI -->|uses| MasterDataset
435
+ ProcessStateAPI ..->|implements| PhaseStateMachineValidation
436
+ DataAPIArchitectureQueries -.->|depends on| DataAPIOutputShaping
437
+ classDef neighbor stroke-dasharray: 5 5
438
+ ```
439
+
440
+ ---
441
+
442
+ ## API Types
443
+
444
+ ### normalizeStatus (function)
445
+
446
+ ````typescript
447
+ /**
448
+ * Normalize any status string to a display bucket
449
+ *
450
+ * Maps status values to three canonical display states:
451
+ * - "completed": completed
452
+ * - "active": active
453
+ * - "planned": roadmap, deferred, or any unknown value
454
+ *
455
+ * Per PDR-005: deferred items are treated as planned (not actively worked on)
456
+ *
457
+ * @param status - Raw status from pattern (case-insensitive)
458
+ * @returns "completed" | "active" | "planned"
459
+ *
460
+ * @example
461
+ * ```typescript
462
+ * normalizeStatus("completed") // → "completed"
463
+ * normalizeStatus("active") // → "active"
464
+ * normalizeStatus("roadmap") // → "planned"
465
+ * normalizeStatus("deferred") // → "planned"
466
+ * normalizeStatus("planned") // → "planned" (unknown input defaults to planned)
467
+ * normalizeStatus(undefined) // → "planned"
468
+ * ```
469
+ */
470
+ ````
471
+
472
+ ```typescript
473
+ function normalizeStatus(status: string | undefined): NormalizedStatus;
474
+ ```
475
+
476
+ | Parameter | Type | Description |
477
+ | --------- | ---- | ------------------------------------------ |
478
+ | status | | Raw status from pattern (case-insensitive) |
479
+
480
+ **Returns:** "completed" | "active" | "planned"
481
+
482
+ ### DELIVERABLE_STATUS_VALUES (const)
483
+
484
+ ```typescript
485
+ /**
486
+ * Canonical deliverable status values
487
+ *
488
+ * These are the ONLY accepted values for the Status column in
489
+ * Gherkin Background deliverable tables. Values are lowercased
490
+ * at extraction time before schema validation.
491
+ *
492
+ * - complete: Work is done
493
+ * - in-progress: Work is ongoing
494
+ * - pending: Work hasn't started
495
+ * - deferred: Work postponed
496
+ * - superseded: Replaced by another deliverable
497
+ * - n/a: Not applicable
498
+ *
499
+ */
500
+ ```
501
+
502
+ ```typescript
503
+ DELIVERABLE_STATUS_VALUES = [
504
+ 'complete',
505
+ 'in-progress',
506
+ 'pending',
507
+ 'deferred',
508
+ 'superseded',
509
+ 'n/a',
510
+ ] as const;
511
+ ```
512
+
513
+ ### CategoryDefinition (interface)
514
+
515
+ ```typescript
516
+ interface CategoryDefinition {
517
+ /** Category tag name without prefix (e.g., "core", "api", "ddd", "saga") */
518
+ readonly tag: string;
519
+ /** Human-readable domain name for display (e.g., "Strategic DDD", "Event Sourcing") */
520
+ readonly domain: string;
521
+ /** Display order priority - lower values appear first in sorted output */
522
+ readonly priority: number;
523
+ /** Brief description of the category's purpose and typical patterns */
524
+ readonly description: string;
525
+ /** Alternative tag names that map to this category (e.g., "es" for "event-sourcing") */
526
+ readonly aliases: readonly string[];
527
+ }
528
+ ```
529
+
530
+ | Property | Description |
531
+ | ----------- | --------------------------------------------------------------------------------- |
532
+ | tag | Category tag name without prefix (e.g., "core", "api", "ddd", "saga") |
533
+ | domain | Human-readable domain name for display (e.g., "Strategic DDD", "Event Sourcing") |
534
+ | priority | Display order priority - lower values appear first in sorted output |
535
+ | description | Brief description of the category's purpose and typical patterns |
536
+ | aliases | Alternative tag names that map to this category (e.g., "es" for "event-sourcing") |
537
+
538
+ ### SectionBlock (type)
539
+
540
+ ```typescript
541
+ type SectionBlock =
542
+ | HeadingBlock
543
+ | ParagraphBlock
544
+ | SeparatorBlock
545
+ | TableBlock
546
+ | ListBlock
547
+ | CodeBlock
548
+ | MermaidBlock
549
+ | CollapsibleBlock
550
+ | LinkOutBlock;
551
+ ```
552
+
553
+ ---
554
+
555
+ ## Behavior Specifications
556
+
557
+ ### ArchitectFactory
558
+
559
+ [View ArchitectFactory source](src/config/factory.ts)
560
+
561
+ ## Architect Factory
562
+
563
+ Main factory function for creating configured Architect instances.
564
+ Supports presets, custom configuration, and configuration overrides.
565
+
566
+ ### When to Use
567
+
568
+ - At application startup to create a configured instance
569
+ - When switching between different tag prefixes
570
+ - When customizing the taxonomy for a specific project
571
+
572
+ ### DefineConfig
573
+
574
+ [View DefineConfig source](src/config/define-config.ts)
575
+
576
+ ## Define Config
577
+
578
+ Identity function for type-safe project configuration.
579
+ Follows the Vite/Vitest `defineConfig()` convention:
580
+ returns the input unchanged, providing only TypeScript type checking.
581
+
582
+ Validation happens later at load time via Zod schema in `loadProjectConfig()`.
583
+
584
+ ### When to Use
585
+
586
+ - In `architect.config.ts` at project root to get type-safe configuration with autocompletion.
587
+
588
+ ### ConfigBasedWorkflowDefinition
589
+
590
+ [View ConfigBasedWorkflowDefinition source](architect/specs/config-based-workflow-definition.feature)
591
+
592
+ **Problem:**
593
+ Every `pnpm process:query` and `pnpm docs:*` invocation prints:
594
+ `Failed to load default workflow (6-phase-standard): Workflow file not found`
595
+
596
+ The `loadDefaultWorkflow()` function resolves to `catalogue/workflows/`
597
+ which does not exist. The directory was deleted during monorepo extraction.
598
+ The system already degrades gracefully (workflow = undefined), but the
599
+ warning is noise for both human CLI use and future hook consumers (HUD).
600
+
601
+ The old `6-phase-standard.json` conflated three concerns:
602
+
603
+ - Taxonomy vocabulary (status names) — already in `src/taxonomy/`
604
+ - FSM behavior (transitions) — already in `src/validation/fsm/`
605
+ - Workflow structure (phases) — orphaned, no proper home
606
+
607
+ **Solution:**
608
+ Inline the default workflow as a constant in `workflow-loader.ts`, built
609
+ from canonical taxonomy values. Make `loadDefaultWorkflow()` synchronous.
610
+ Preserve `loadWorkflowFromPath()` for custom `--workflow <file>` overrides.
611
+
612
+ The workflow definition uses only the 4 canonical statuses from ADR-001
613
+ (roadmap, active, completed, deferred) — not the stale 5-status set from
614
+ the deleted JSON (which included non-canonical `implemented` and `partial`).
615
+
616
+ Phase definitions (Inception, Elaboration, Session, Construction,
617
+ Validation, Retrospective) move from a missing JSON file to an inline
618
+ constant, making the default workflow always available without file I/O.
619
+
620
+ Design Decisions (DS-1, 2026-02-15):
621
+
622
+ | ID | Decision | Rationale |
623
+ | DD-1 | Inline constant in workflow-loader.ts, not preset integration | Minimal correct fix, zero type regression risk. Preset integration deferred. |
624
+ | DD-2 | Constant satisfies existing WorkflowConfig type | Reuse createLoadedWorkflow() from workflow-config.ts. No new types needed. |
625
+ | DD-3 | Remove dead code: getCatalogueWorkflowsPath, loadWorkflowConfig, DEFAULT_WORKFLOW_NAME | Dead since monorepo extraction. Public API break is safe (function always threw). |
626
+ | DD-4 | loadDefaultWorkflow() returns LoadedWorkflow synchronously | Infallible constant needs no async or error handling. |
627
+ | DD-5 | Amend ADR-001 with canonical phase definitions | Phase names are canonical values; fits existing governance in ADR-001. |
628
+
629
+ <details>
630
+ <summary>Default workflow is built from an inline constant (2 scenarios)</summary>
631
+
632
+ #### Default workflow is built from an inline constant
633
+
634
+ **Invariant:** `loadDefaultWorkflow()` returns a `LoadedWorkflow` without file system access. It cannot fail. The default workflow constant uses only canonical status values from `src/taxonomy/status-values.ts`.
635
+
636
+ **Rationale:** The file-based loading path (`catalogue/workflows/`) has been dead code since monorepo extraction. Both callers (orchestrator, process-api) already handle the failure gracefully, proving the system works without it. Making the function synchronous and infallible removes the try-catch ceremony and the warning noise.
637
+
638
+ **Verified by:**
639
+
640
+ - Default workflow loads without warning
641
+ - Workflow constant uses canonical statuses only
642
+ - Workflow constant uses canonical statuses only
643
+
644
+ Implementation approach:
645
+
646
+ </details>
647
+
648
+ <details>
649
+ <summary>Custom workflow files still work via --workflow flag (1 scenarios)</summary>
650
+
651
+ #### Custom workflow files still work via --workflow flag
652
+
653
+ **Invariant:** `loadWorkflowFromPath()` remains available for projects that need custom workflow definitions. The `--workflow <file>` CLI flag and `workflowPath` config field continue to work.
654
+
655
+ **Rationale:** The inline default replaces file-based _default_ loading, not file-based _custom_ loading. Projects may define custom phases or additional statuses via JSON files.
656
+
657
+ **Verified by:**
658
+
659
+ - Custom workflow file overrides default
660
+
661
+ </details>
662
+
663
+ <details>
664
+ <summary>FSM validation and Process Guard are not affected</summary>
665
+
666
+ #### FSM validation and Process Guard are not affected
667
+
668
+ **Invariant:** The FSM transition matrix, protection levels, and Process Guard rules remain hardcoded in `src/validation/fsm/` and `src/lint/process-guard/`. They do not read from `LoadedWorkflow`.
669
+
670
+ **Rationale:** FSM and workflow are separate concerns. FSM enforces status transitions (4-state model from PDR-005). Workflow defines phase structure (6-phase USDP). The workflow JSON declared `transitionsTo` on its statuses, but no code ever read those values — the FSM uses its own `VALID_TRANSITIONS` constant. This separation is correct and intentional. Blast radius analysis confirmed zero workflow imports in: - src/validation/fsm/ (4 files) - src/lint/process-guard/ (5 files) - src/taxonomy/ (all files)
671
+
672
+ </details>
673
+
674
+ <details>
675
+ <summary>Workflow as a configurable preset field is deferred</summary>
676
+
677
+ #### Workflow as a configurable preset field is deferred
678
+
679
+ **Invariant:** The inline default workflow constant is the only workflow source until preset integration is implemented. No preset or project config field exposes workflow customization.
680
+
681
+ **Rationale:** Coupling workflow into the preset/config system before the inline fix ships would widen the blast radius and risk type regressions across all config consumers.
682
+
683
+ **Verified by:**
684
+
685
+ - N/A - deferred until preset integration
686
+
687
+ Adding `workflow` as a field on `ArchitectConfig` (presets) and
688
+ `ArchitectProjectConfig` (project config) is a natural next step
689
+ but NOT required for the MVP fix.
690
+
691
+ The inline constant in `workflow-loader.ts` resolves the warning. Moving
692
+ workflow into the preset/config system enables:
693
+ - Different presets with different default phases (e.g.
694
+
695
+ - 3-phase libar-generic)
696
+ - Per-project phase customization in architect.config.ts
697
+ - Phase definitions appearing in generated documentation
698
+
699
+ See ideation artifact for design options:
700
+ architect/ideations/2026-02-15-workflow-config-and-fsm-extensibility.feature
701
+
702
+ </details>
703
+
704
+ ### ADR005CodecBasedMarkdownRendering
705
+
706
+ [View ADR005CodecBasedMarkdownRendering source](architect/decisions/adr-005-codec-based-markdown-rendering.feature)
707
+
708
+ **Context:**
709
+ The documentation generator needs to transform structured pattern data
710
+ (MasterDataset) into markdown files. The initial approach used direct
711
+ string concatenation in generator functions, mixing data selection,
712
+ formatting logic, and output assembly in a single pass. This made
713
+ generators hard to test, difficult to compose, and impossible to
714
+ render the same data in different formats (e.g., full docs vs compact
715
+ AI context).
716
+
717
+ **Decision:**
718
+ Adopt a codec architecture inspired by serialization codecs (encode/decode).
719
+ Each document type has a codec that decodes a MasterDataset into a
720
+ RenderableDocument — an intermediate representation of sections, headings,
721
+ tables, paragraphs, and code blocks. A separate renderer transforms the
722
+ RenderableDocument into markdown. This separates data selection (what to
723
+ include) from formatting (how it looks) from serialization (markdown syntax).
724
+
725
+ **Consequences:**
726
+ | Type | Impact |
727
+ | Positive | Codecs are pure functions: dataset in, document out -- trivially testable |
728
+ | Positive | RenderableDocument is an inspectable IR -- tests assert on structure, not strings |
729
+ | Positive | Composable via CompositeCodec -- reference docs assemble from child codecs |
730
+ | Positive | Same dataset can produce different outputs (full doc, compact doc, AI context) |
731
+ | Negative | Extra abstraction layer between data and output |
732
+ | Negative | RenderableDocument vocabulary must cover all needed output patterns |
733
+
734
+ **Benefits:**
735
+ | Benefit | Before (String Concat) | After (Codec) |
736
+ | Testability | Assert on markdown strings | Assert on typed section blocks |
737
+ | Composability | Copy-paste between generators | CompositeCodec assembles children |
738
+ | Format variants | Duplicate generator logic | Same codec, different renderer |
739
+ | Progressive disclosure | Manual heading management | Heading depth auto-calculated |
740
+
741
+ <details>
742
+ <summary>Codecs implement a decode-only contract (2 scenarios)</summary>
743
+
744
+ #### Codecs implement a decode-only contract
745
+
746
+ **Invariant:** 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.
747
+
748
+ **Rationale:** 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.
749
+
750
+ **Codec call signature:**
751
+
752
+ ```typescript
753
+ interface DocumentCodec {
754
+ decode(dataset: MasterDataset): RenderableDocument;
755
+ }
756
+ ```
757
+
758
+ **Verified by:**
759
+
760
+ - Codec produces deterministic output
761
+ - Codec has no side effects
762
+
763
+ </details>
764
+
765
+ <details>
766
+ <summary>RenderableDocument is a typed intermediate representation (2 scenarios)</summary>
767
+
768
+ #### RenderableDocument is a typed intermediate representation
769
+
770
+ **Invariant:** 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.
771
+
772
+ **Rationale:** 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.
773
+
774
+ **Section block types:**
775
+
776
+ **Verified by:**
777
+
778
+ - All block types render to markdown
779
+ - Unknown block type is rejected
780
+
781
+ </details>
782
+
783
+ <details>
784
+ <summary>CompositeCodec assembles documents from child codecs (2 scenarios)</summary>
785
+
786
+ #### CompositeCodec assembles documents from child codecs
787
+
788
+ **Invariant:** 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.
789
+
790
+ **Rationale:** 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.
791
+
792
+ **Composition example:**
793
+
794
+ ```typescript
795
+ const referenceDoc = CompositeCodec.create({
796
+ title: 'Architecture Reference',
797
+ codecs: [
798
+ behaviorCodec, // patterns with rules
799
+ conventionCodec, // decision records
800
+ shapeCodec, // type definitions
801
+ diagramCodec, // mermaid diagrams
802
+ ],
803
+ });
804
+ ```
805
+
806
+ **Verified by:**
807
+
808
+ - Child sections appear in codec array order
809
+ - Empty children are skipped without separators
810
+
811
+ </details>
812
+
813
+ <details>
814
+ <summary>ADR content comes from both Feature description and Rule prefixes (3 scenarios)</summary>
815
+
816
+ #### ADR content comes from both Feature description and Rule prefixes
817
+
818
+ **Invariant:** 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.
819
+
820
+ **Rationale:** 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.
821
+
822
+ **Verified by:**
823
+
824
+ - Feature description content is rendered
825
+ - Rule prefix content is rendered
826
+ - Both sources combine in single ADR
827
+
828
+ </details>
829
+
830
+ <details>
831
+ <summary>The markdown renderer is codec-agnostic (2 scenarios)</summary>
832
+
833
+ #### The markdown renderer is codec-agnostic
834
+
835
+ **Invariant:** 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.
836
+
837
+ **Rationale:** 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.
838
+
839
+ **Verified by:**
840
+
841
+ - Same renderer handles different codec outputs
842
+ - Renderer and codec are tested independently
843
+
844
+ </details>
845
+
846
+ ### ADR001TaxonomyCanonicalValues
847
+
848
+ [View ADR001TaxonomyCanonicalValues source](architect/decisions/adr-001-taxonomy-canonical-values.feature)
849
+
850
+ **Context:**
851
+ The annotation system requires well-defined canonical values for taxonomy
852
+ tags, FSM status lifecycle, and source ownership rules. Without canonical
853
+ values, organic growth produces drift (Generator vs Generators, Process
854
+ vs DeliveryProcess) and inconsistent grouping in generated documentation.
855
+
856
+ **Decision:**
857
+ Define canonical values for all taxonomy enums, FSM states with protection
858
+ levels, valid transitions, tag format types, and source ownership rules.
859
+ These are the durable constants of the delivery process.
860
+
861
+ **Consequences:**
862
+ | Type | Impact |
863
+ | Positive | Generated docs group into coherent sections |
864
+ | Positive | FSM enforcement has clear, auditable state definitions |
865
+ | Positive | Source ownership prevents cross-domain tag confusion |
866
+ | Negative | Migration effort for existing specs with non-canonical values |
867
+
868
+ <details>
869
+ <summary>Product area canonical values</summary>
870
+
871
+ #### Product area canonical values
872
+
873
+ **Invariant:** The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module.
874
+
875
+ **Rationale:** Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages.
876
+
877
+ **Verified by:**
878
+
879
+ - Canonical values are enforced
880
+
881
+ </details>
882
+
883
+ <details>
884
+ <summary>ADR category canonical values</summary>
885
+
886
+ #### ADR category canonical values
887
+
888
+ **Invariant:** The adr-category tag uses one of 4 values.
889
+
890
+ **Rationale:** Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable.
891
+
892
+ **Verified by:**
893
+
894
+ - Canonical values are enforced
895
+
896
+ </details>
897
+
898
+ <details>
899
+ <summary>FSM status values and protection levels</summary>
900
+
901
+ #### FSM status values and protection levels
902
+
903
+ **Invariant:** Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time.
904
+
905
+ **Rationale:** Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity.
906
+
907
+ **Verified by:**
908
+
909
+ - Canonical values are enforced
910
+
911
+ </details>
912
+
913
+ <details>
914
+ <summary>Valid FSM transitions</summary>
915
+
916
+ #### Valid FSM transitions
917
+
918
+ **Invariant:** Only these transitions are valid. All others are rejected by Process Guard.
919
+
920
+ **Rationale:** Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance.
921
+
922
+ **Verified by:**
923
+
924
+ - Canonical values are enforced
925
+
926
+ Completed is a terminal state. Modifications require
927
+ `@architect-unlock-reason` escape hatch.
928
+
929
+ </details>
930
+
931
+ <details>
932
+ <summary>Tag format types</summary>
933
+
934
+ #### Tag format types
935
+
936
+ **Invariant:** Every tag has one of 6 format types that determines how its value is parsed.
937
+
938
+ **Rationale:** Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text.
939
+
940
+ **Verified by:**
941
+
942
+ - Canonical values are enforced
943
+
944
+ </details>
945
+
946
+ <details>
947
+ <summary>Source ownership</summary>
948
+
949
+ #### Source ownership
950
+
951
+ **Invariant:** Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries.
952
+
953
+ **Rationale:** Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model.
954
+
955
+ **Verified by:**
956
+
957
+ - Canonical values are enforced
958
+
959
+ </details>
960
+
961
+ <details>
962
+ <summary>Quarter format convention</summary>
963
+
964
+ #### Quarter format convention
965
+
966
+ **Invariant:** The quarter tag uses `YYYY-QN` format (e.g., `2026-Q1`). ISO-year-first sorting works lexicographically.
967
+
968
+ **Rationale:** Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering.
969
+
970
+ **Verified by:**
971
+
972
+ - Canonical values are enforced
973
+
974
+ </details>
975
+
976
+ <details>
977
+ <summary>Canonical phase definitions (6-phase USDP standard)</summary>
978
+
979
+ #### Canonical phase definitions (6-phase USDP standard)
980
+
981
+ **Invariant:** The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation.
982
+
983
+ **Rationale:** Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible.
984
+
985
+ **Verified by:**
986
+
987
+ - Canonical values are enforced
988
+
989
+ </details>
990
+
991
+ <details>
992
+ <summary>Deliverable status canonical values (1 scenarios)</summary>
993
+
994
+ #### Deliverable status canonical values
995
+
996
+ **Invariant:** Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time.
997
+
998
+ **Rationale:** Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness.
999
+
1000
+ **Verified by:**
1001
+
1002
+ - Canonical values are enforced
1003
+
1004
+ </details>
1005
+
1006
+ ### ProcessGuardTesting
1007
+
1008
+ [View ProcessGuardTesting source](tests/features/validation/process-guard.feature)
1009
+
1010
+ Pure validation functions for enforcing delivery process rules per PDR-005.
1011
+ All validation follows the Decider pattern: (state, changes, options) => result.
1012
+
1013
+ **Problem:**
1014
+
1015
+ - Completed specs modified without explicit unlock reason
1016
+ - Invalid status transitions bypass FSM rules
1017
+ - Active specs expand scope unexpectedly with new deliverables
1018
+ - Changes occur outside session boundaries
1019
+
1020
+ **Solution:**
1021
+
1022
+ - checkProtectionLevel() enforces unlock-reason for completed (hard) files
1023
+ - checkStatusTransitions() validates transitions against FSM matrix
1024
+ - checkScopeCreep() prevents deliverable addition to active (scope) specs
1025
+ - checkSessionScope() warns about files outside session scope
1026
+ - checkSessionExcluded() errors on explicitly excluded files
1027
+
1028
+ <details>
1029
+ <summary>Completed files require unlock-reason to modify (4 scenarios)</summary>
1030
+
1031
+ #### Completed files require unlock-reason to modify
1032
+
1033
+ **Invariant:** A completed spec file cannot be modified unless it carries an @architect-unlock-reason tag.
1034
+
1035
+ **Rationale:** Completed work represents validated, shipped functionality — accidental modification risks regression.
1036
+
1037
+ **Verified by:**
1038
+
1039
+ - Completed file with unlock-reason passes validation
1040
+ - Completed file without unlock-reason fails validation
1041
+ - Protection levels and unlock requirement
1042
+ - File transitioning to completed does not require unlock-reason
1043
+
1044
+ </details>
1045
+
1046
+ <details>
1047
+ <summary>Status transitions must follow PDR-005 FSM (3 scenarios)</summary>
1048
+
1049
+ #### Status transitions must follow PDR-005 FSM
1050
+
1051
+ **Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap.
1052
+
1053
+ **Rationale:** The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation).
1054
+
1055
+ **Verified by:**
1056
+
1057
+ - Valid transitions pass validation
1058
+ - Invalid transitions fail validation
1059
+ - Existing file with unlock-reason bypasses FSM check
1060
+
1061
+ </details>
1062
+
1063
+ <details>
1064
+ <summary>Active specs cannot add new deliverables (6 scenarios)</summary>
1065
+
1066
+ #### Active specs cannot add new deliverables
1067
+
1068
+ **Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active.
1069
+
1070
+ **Rationale:** Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments.
1071
+
1072
+ **Verified by:**
1073
+
1074
+ - Active spec with no deliverable changes passes
1075
+ - Active spec adding deliverable fails validation
1076
+ - Roadmap spec can add deliverables freely
1077
+ - Removing deliverable produces warning
1078
+ - Deliverable status change does not trigger scope-creep
1079
+ - Multiple deliverable status changes pass validation
1080
+
1081
+ </details>
1082
+
1083
+ <details>
1084
+ <summary>Files outside active session scope trigger warnings (4 scenarios)</summary>
1085
+
1086
+ #### Files outside active session scope trigger warnings
1087
+
1088
+ **Invariant:** Files modified outside the active session's declared scope produce a session-scope warning.
1089
+
1090
+ **Rationale:** Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible.
1091
+
1092
+ **Verified by:**
1093
+
1094
+ - File in session scope passes validation
1095
+ - File outside session scope triggers warning
1096
+ - No active session means all files in scope
1097
+ - ignoreSession flag suppresses session warnings
1098
+
1099
+ </details>
1100
+
1101
+ <details>
1102
+ <summary>Explicitly excluded files trigger errors (3 scenarios)</summary>
1103
+
1104
+ #### Explicitly excluded files trigger errors
1105
+
1106
+ **Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error.
1107
+
1108
+ **Rationale:** Exclusion is stronger than scope — it marks files that must NOT be touched during this session.
1109
+
1110
+ **Verified by:**
1111
+
1112
+ - Excluded file triggers error
1113
+ - Non-excluded file passes validation
1114
+ - ignoreSession flag suppresses excluded errors
1115
+
1116
+ </details>
1117
+
1118
+ <details>
1119
+ <summary>Multiple rules validate independently (3 scenarios)</summary>
1120
+
1121
+ #### Multiple rules validate independently
1122
+
1123
+ **Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple rules.
1124
+
1125
+ **Rationale:** Independent evaluation ensures no rule masks another, giving complete diagnostic output.
1126
+
1127
+ **Verified by:**
1128
+
1129
+ - Multiple violations from different rules
1130
+ - Strict mode promotes warnings to errors
1131
+ - Clean change produces empty violations
1132
+
1133
+ </details>
1134
+
1135
+ ---