@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,998 @@
1
+ # Validation Business Rules
2
+
3
+ **Purpose:** Business rules for the Validation product area
4
+
5
+ ---
6
+
7
+ **62 rules** from 14 features. 62 rules have explicit invariants.
8
+
9
+ ---
10
+
11
+ ## Uncategorized
12
+
13
+ ### Anti Pattern Detector
14
+
15
+ _- Dependencies in features (should be code-only) cause drift_
16
+
17
+ ---
18
+
19
+ #### Process metadata should not appear in TypeScript code
20
+
21
+ > **Invariant:** Process metadata tags (@architect-status, @architect-phase, etc.) must only appear in Gherkin feature files, never in TypeScript source code.
22
+ >
23
+ > **Rationale:** TypeScript owns runtime behavior while Gherkin owns delivery process metadata — mixing them creates dual-source conflicts and validation ambiguity.
24
+
25
+ **Verified by:**
26
+
27
+ - Code without process tags passes
28
+ - Feature-only process tags in code are flagged
29
+
30
+ ---
31
+
32
+ #### Generator hints should not appear in feature files
33
+
34
+ > **Invariant:** Feature files must not contain generator magic comments beyond a configurable threshold.
35
+ >
36
+ > **Rationale:** Generator hints are implementation details that belong in TypeScript — excessive magic comments in specs indicate leaking implementation concerns into business requirements.
37
+
38
+ **Verified by:**
39
+
40
+ - Feature without magic comments passes
41
+ - Features with excessive magic comments are flagged
42
+ - Magic comments within threshold pass
43
+
44
+ ---
45
+
46
+ #### Feature files should not have excessive scenarios
47
+
48
+ > **Invariant:** A single feature file must not exceed the configured maximum scenario count.
49
+ >
50
+ > **Rationale:** Oversized feature files indicate missing decomposition — they become hard to maintain and slow to execute.
51
+
52
+ **Verified by:**
53
+
54
+ - Feature with few scenarios passes
55
+ - Feature exceeding scenario threshold is flagged
56
+
57
+ ---
58
+
59
+ #### Feature files should not exceed size thresholds
60
+
61
+ > **Invariant:** A single feature file must not exceed the configured maximum line count.
62
+ >
63
+ > **Rationale:** Excessively large files indicate a feature that should be split into focused, independently testable specifications.
64
+
65
+ **Verified by:**
66
+
67
+ - Normal-sized feature passes
68
+ - Oversized feature is flagged
69
+
70
+ ---
71
+
72
+ #### All anti-patterns can be detected in one pass
73
+
74
+ > **Invariant:** The anti-pattern detector must evaluate all registered rules in a single scan pass over the source files.
75
+ >
76
+ > **Rationale:** Single-pass detection ensures consistent results and avoids O(n\*m) performance degradation with multiple file traversals.
77
+
78
+ **Verified by:**
79
+
80
+ - Combined detection finds process-in-code issues
81
+
82
+ ---
83
+
84
+ #### Violations can be formatted for console output
85
+
86
+ > **Invariant:** Anti-pattern violations must be renderable as grouped, human-readable console output.
87
+ >
88
+ > **Rationale:** Developers need actionable feedback at commit time — ungrouped or unformatted violations are hard to triage and fix.
89
+
90
+ **Verified by:**
91
+
92
+ - Empty violations produce clean report
93
+ - Violations are grouped by severity
94
+
95
+ _anti-patterns.feature_
96
+
97
+ ### Codec Utils Validation
98
+
99
+ _The codec utilities provide factory functions for creating type-safe JSON_
100
+
101
+ ---
102
+
103
+ #### createJsonInputCodec parses and validates JSON strings
104
+
105
+ > **Invariant:** createJsonInputCodec returns an ok Result when the input is valid JSON that conforms to the provided Zod schema, and an err Result with a descriptive CodecError otherwise.
106
+ >
107
+ > **Rationale:** Combining JSON parsing and schema validation into a single operation eliminates the class of bugs where parsed-but-invalid data leaks into the application.
108
+
109
+ **Verified by:**
110
+
111
+ - Input codec parses valid JSON matching schema
112
+ - Input codec rejects invalid JSON syntax
113
+ - Input codec rejects valid JSON that fails schema validation
114
+ - Input codec includes source in error when provided
115
+ - Input codec safeParse returns value for valid input
116
+ - Input codec safeParse returns undefined for invalid input
117
+
118
+ ---
119
+
120
+ #### formatCodecError formats errors for display
121
+
122
+ > **Invariant:** formatCodecError always returns a non-empty string that includes the operation type and message, and appends validation errors when present.
123
+ >
124
+ > **Rationale:** Consistent error formatting across all codec consumers avoids duplicated formatting logic and ensures error messages always contain enough context for debugging.
125
+
126
+ **Verified by:**
127
+
128
+ - formatCodecError formats error without validation details
129
+ - formatCodecError formats error with validation details
130
+
131
+ _codec-utils.feature_
132
+
133
+ ### Config Schema Validation
134
+
135
+ _Configuration schemas validate scanner and generator inputs with security_
136
+
137
+ ---
138
+
139
+ #### ScannerConfigSchema validates scanner configuration
140
+
141
+ > **Invariant:** Scanner configuration must contain at least one valid glob pattern with no parent directory traversal, and baseDir must resolve to an absolute path.
142
+ >
143
+ > **Rationale:** Malformed or malicious glob patterns could scan outside project boundaries, exposing sensitive files.
144
+
145
+ **Verified by:**
146
+
147
+ - ScannerConfigSchema validates correct configuration
148
+ - ScannerConfigSchema accepts multiple patterns
149
+ - ScannerConfigSchema rejects empty patterns array
150
+ - ScannerConfigSchema rejects parent traversal in patterns
151
+ - ScannerConfigSchema rejects hidden parent traversal
152
+ - ScannerConfigSchema normalizes baseDir to absolute path
153
+ - ScannerConfigSchema accepts optional exclude patterns
154
+
155
+ ---
156
+
157
+ #### GeneratorConfigSchema validates generator configuration
158
+
159
+ > **Invariant:** Generator configuration must use a .json registry file and an output directory that does not escape the project root via parent traversal.
160
+ >
161
+ > **Rationale:** Non-JSON registry files could introduce parsing vulnerabilities, and unrestricted output paths could overwrite files outside the project.
162
+
163
+ **Verified by:**
164
+
165
+ - GeneratorConfigSchema validates correct configuration
166
+ - GeneratorConfigSchema requires .json registry file
167
+ - GeneratorConfigSchema rejects outputDir with parent traversal
168
+ - GeneratorConfigSchema accepts relative output directory
169
+ - GeneratorConfigSchema defaults overwrite to false
170
+ - GeneratorConfigSchema defaults readmeOnly to false
171
+
172
+ ---
173
+
174
+ #### isScannerConfig type guard narrows unknown values
175
+
176
+ > **Invariant:** isScannerConfig returns true only for objects that have a non-empty patterns array and a string baseDir.
177
+ >
178
+ > **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk accessing properties on incompatible types at runtime.
179
+
180
+ **Verified by:**
181
+
182
+ - isScannerConfig returns true for valid config
183
+ - isScannerConfig returns false for invalid config
184
+ - isScannerConfig returns false for null
185
+ - isScannerConfig returns false for non-object
186
+
187
+ ---
188
+
189
+ #### isGeneratorConfig type guard narrows unknown values
190
+
191
+ > **Invariant:** isGeneratorConfig returns true only for objects that have a string outputDir and a .json registryPath.
192
+ >
193
+ > **Rationale:** Without a reliable type guard, callers cannot safely narrow unknown config objects and risk passing malformed generator configs that bypass schema validation.
194
+
195
+ **Verified by:**
196
+
197
+ - isGeneratorConfig returns true for valid config
198
+ - isGeneratorConfig returns false for invalid config
199
+ - isGeneratorConfig returns false for non-json registry
200
+
201
+ _config-schemas.feature_
202
+
203
+ ### Detect Changes
204
+
205
+ _Tests for the detectDeliverableChanges function that parses git diff output._
206
+
207
+ ---
208
+
209
+ #### Status changes are detected as modifications not additions
210
+
211
+ > **Invariant:** When a deliverable's status value changes between versions, the change detector must classify it as a modification, not an addition or removal.
212
+ >
213
+ > **Rationale:** Correct change classification drives scope-creep detection — misclassifying a status change as an addition would trigger false scope-creep violations on active specs.
214
+
215
+ **Verified by:**
216
+
217
+ - Single deliverable status change is detected as modification
218
+ - Multiple deliverable status changes are all modifications
219
+
220
+ ---
221
+
222
+ #### New deliverables are detected as additions
223
+
224
+ > **Invariant:** Deliverables present in the new version but absent in the old version must be classified as additions.
225
+ >
226
+ > **Rationale:** Addition detection powers the scope-creep rule — new deliverables added to active specs must be flagged as violations.
227
+
228
+ **Verified by:**
229
+
230
+ - New deliverable is detected as addition
231
+
232
+ ---
233
+
234
+ #### Removed deliverables are detected as removals
235
+
236
+ > **Invariant:** Deliverables present in the old version but absent in the new version must be classified as removals.
237
+ >
238
+ > **Rationale:** Removal detection enables the deliverable-removed warning — silently dropping deliverables could hide incomplete work.
239
+
240
+ **Verified by:**
241
+
242
+ - Removed deliverable is detected as removal
243
+
244
+ ---
245
+
246
+ #### Mixed changes are correctly categorized
247
+
248
+ > **Invariant:** When a single diff contains additions, removals, and modifications simultaneously, each change must be independently categorized.
249
+ >
250
+ > **Rationale:** Real-world commits often contain mixed changes — incorrect categorization of any single change cascades into wrong validation decisions.
251
+
252
+ **Verified by:**
253
+
254
+ - Mixed additions, removals, and modifications are handled correctly
255
+ - Mixed additions
256
+ - removals
257
+ - and modifications are handled correctly
258
+
259
+ ---
260
+
261
+ #### Non-deliverable tables are ignored
262
+
263
+ > **Invariant:** Changes to non-deliverable tables (e.g., ScenarioOutline Examples tables) must not be detected as deliverable changes.
264
+ >
265
+ > **Rationale:** Feature files contain many table structures — only the Background deliverables table is semantically relevant to process guard validation.
266
+
267
+ **Verified by:**
268
+
269
+ - Changes in Examples tables are not detected as deliverable changes
270
+
271
+ _detect-changes.feature_
272
+
273
+ ### DoD Validator
274
+
275
+ _- Phases marked "completed" without all deliverables done_
276
+
277
+ ---
278
+
279
+ #### Deliverable completion uses canonical status taxonomy
280
+
281
+ > **Invariant:** Deliverable completion status must be determined exclusively using the 6 canonical values from the deliverable status taxonomy.
282
+ >
283
+ > **Rationale:** Freeform status strings bypass schema validation and produce inconsistent completion tracking across the monorepo.
284
+
285
+ **Verified by:**
286
+
287
+ - Complete status is detected as complete
288
+ - Non-complete canonical statuses are correctly identified
289
+
290
+ ---
291
+
292
+ #### Acceptance criteria must be tagged with @acceptance-criteria
293
+
294
+ > **Invariant:** Every completed pattern must have at least one scenario tagged with @acceptance-criteria in its feature file.
295
+ >
296
+ > **Rationale:** Without explicit acceptance criteria tags, there is no machine-verifiable proof that the delivered work meets its requirements.
297
+
298
+ **Verified by:**
299
+
300
+ - Feature with @acceptance-criteria scenario passes
301
+ - Feature without @acceptance-criteria fails
302
+ - Tag matching is case-insensitive
303
+
304
+ ---
305
+
306
+ #### Acceptance criteria scenarios can be extracted by name
307
+
308
+ > **Invariant:** The validator must be able to extract scenario names from @acceptance-criteria-tagged scenarios for reporting.
309
+ >
310
+ > **Rationale:** Extracted names appear in traceability reports and DoD summaries, providing an audit trail from requirement to verification.
311
+
312
+ **Verified by:**
313
+
314
+ - Extract multiple AC scenario names
315
+ - No AC scenarios returns empty list
316
+
317
+ ---
318
+
319
+ #### DoD requires all deliverables complete and AC present
320
+
321
+ > **Invariant:** A pattern passes Definition of Done only when ALL deliverables have complete status AND at least one @acceptance-criteria scenario exists.
322
+ >
323
+ > **Rationale:** Partial completion or missing acceptance criteria means the pattern is not verified — marking it complete would bypass quality gates.
324
+
325
+ **Verified by:**
326
+
327
+ - Phase with all deliverables complete and AC passes
328
+ - Phase with incomplete deliverables fails
329
+ - Phase without acceptance criteria fails
330
+ - Phase without deliverables fails
331
+
332
+ ---
333
+
334
+ #### DoD can be validated across multiple completed phases
335
+
336
+ > **Invariant:** DoD validation must evaluate all completed phases independently and report per-phase pass/fail results.
337
+ >
338
+ > **Rationale:** Multi-phase patterns need granular validation — a single aggregate result would hide which specific phase failed its Definition of Done.
339
+
340
+ **Verified by:**
341
+
342
+ - All completed phases passing DoD
343
+ - Mixed pass/fail results
344
+ - Only completed phases are validated by default
345
+ - Filter to specific phases
346
+
347
+ ---
348
+
349
+ #### Summary can be formatted for console output
350
+
351
+ > **Invariant:** DoD validation results must be renderable as structured console output showing phase-level pass/fail details.
352
+ >
353
+ > **Rationale:** Developers need immediate, actionable feedback during pre-commit validation — raw data structures are not human-readable.
354
+
355
+ **Verified by:**
356
+
357
+ - Empty summary shows no completed phases message
358
+ - Summary with passed phases shows details
359
+ - Summary with failed phases shows details
360
+
361
+ _dod-validator.feature_
362
+
363
+ ### FSM Validator
364
+
365
+ _- Status values must conform to PDR-005 FSM states_
366
+
367
+ ---
368
+
369
+ #### Status values must be valid PDR-005 FSM states
370
+
371
+ > **Invariant:** Every pattern status value must be one of the states defined in the PDR-005 finite state machine (roadmap, active, completed, deferred).
372
+ >
373
+ > **Rationale:** Invalid status values bypass FSM transition validation and produce undefined behavior in process guard enforcement.
374
+
375
+ **Verified by:**
376
+
377
+ - Valid status values are accepted
378
+ - Invalid status values are rejected
379
+ - Terminal state returns warning
380
+
381
+ ---
382
+
383
+ #### Status transitions must follow FSM rules
384
+
385
+ > **Invariant:** Every status change must follow a valid edge in the PDR-005 state machine graph — no skipping states or invalid paths.
386
+ >
387
+ > **Rationale:** The FSM encodes the delivery workflow contract — invalid transitions indicate process violations that could corrupt delivery tracking.
388
+
389
+ **Verified by:**
390
+
391
+ - Valid transitions are accepted
392
+ - Invalid transitions are rejected with alternatives
393
+ - Terminal state has no valid transitions
394
+ - Invalid source status in transition
395
+ - Invalid target status in transition
396
+
397
+ ---
398
+
399
+ #### Completed patterns should have proper metadata
400
+
401
+ > **Invariant:** Patterns in completed status must carry completion date and actual effort metadata to pass validation without warnings.
402
+ >
403
+ > **Rationale:** Completion metadata enables retrospective analysis and effort estimation — missing metadata degrades project planning accuracy over time.
404
+
405
+ **Verified by:**
406
+
407
+ - Completed pattern with full metadata has no warnings
408
+ - Completed pattern without date shows warning
409
+ - Completed pattern with planned but no actual effort shows warning
410
+ - Non-completed pattern skips metadata validation
411
+
412
+ ---
413
+
414
+ #### Protection levels match FSM state definitions
415
+
416
+ > **Invariant:** Each FSM state must map to exactly one protection level (none, scope-locked, or hard-locked) as defined in PDR-005.
417
+ >
418
+ > **Rationale:** Protection levels enforce edit constraints per state — mismatched protection would allow prohibited modifications to active or completed specs.
419
+
420
+ **Verified by:**
421
+
422
+ - Roadmap status has no protection
423
+ - Active status has scope protection
424
+ - Completed status has hard protection
425
+ - Deferred status has no protection
426
+
427
+ ---
428
+
429
+ #### Combined validation provides complete results
430
+
431
+ > **Invariant:** The FSM validator must return a combined result including status validity, transition validity, metadata warnings, and protection level in a single call.
432
+ >
433
+ > **Rationale:** Callers need a complete validation picture — requiring multiple separate calls risks partial validation and inconsistent error reporting.
434
+
435
+ **Verified by:**
436
+
437
+ - Valid completed pattern returns combined results
438
+
439
+ _fsm-validator.feature_
440
+
441
+ ### Lint Engine
442
+
443
+ _The lint engine orchestrates rule execution, aggregates violations,_
444
+
445
+ ---
446
+
447
+ #### Single directive linting validates annotations against rules
448
+
449
+ > **Invariant:** Every directive is checked against all provided rules and violations include source location.
450
+ >
451
+ > **Rationale:** Skipping rules or omitting source locations makes violations unactionable, as developers cannot locate or understand the issue.
452
+
453
+ **Verified by:**
454
+
455
+ - Return empty array when all rules pass
456
+ - Return violations for failing rules
457
+ - Run all provided rules
458
+ - Include correct file and line in violations
459
+
460
+ ---
461
+
462
+ #### Multi-file batch linting aggregates results across files
463
+
464
+ > **Invariant:** All files and directives are scanned, violations are collected per file, and severity counts are accurate.
465
+ >
466
+ > **Rationale:** Missing files or inaccurate severity counts cause silent rule violations in CI and undermine trust in the linting pipeline.
467
+
468
+ **Verified by:**
469
+
470
+ - Return empty results for clean files
471
+ - Collect violations by file
472
+ - Count violations by severity
473
+ - Handle multiple directives per file
474
+
475
+ ---
476
+
477
+ #### Failure detection respects strict mode for severity escalation
478
+
479
+ > **Invariant:** Errors always indicate failure. Warnings only indicate failure in strict mode. Info never indicates failure.
480
+ >
481
+ > **Rationale:** Without correct severity-to-exit-code mapping, CI pipelines either miss real errors or block on informational messages, eroding developer trust in the linter.
482
+
483
+ **Verified by:**
484
+
485
+ - Return true when there are errors
486
+ - Return false for warnings only in non-strict mode
487
+ - Return true for warnings in strict mode
488
+ - Return false for info only
489
+ - Return false when no violations
490
+
491
+ ---
492
+
493
+ #### Violation sorting orders by severity then by line number
494
+
495
+ > **Invariant:** Sorted output places errors first, then warnings, then info, with stable line-number ordering within each severity. Sorting does not mutate the original array.
496
+ >
497
+ > **Rationale:** Unsorted output forces developers to manually scan for critical errors among lower-severity noise, and mutating the original array would break callers that hold a reference to it.
498
+
499
+ **Verified by:**
500
+
501
+ - Sort errors first then warnings then info
502
+ - Sort by line number within same severity
503
+ - Not mutate original array
504
+
505
+ ---
506
+
507
+ #### Pretty formatting produces human-readable output with severity counts
508
+
509
+ > **Invariant:** Pretty output includes file paths, line numbers, severity labels, rule IDs, and summary counts. Quiet mode suppresses non-error violations.
510
+ >
511
+ > **Rationale:** Incomplete formatting (missing file paths or line numbers) prevents developers from navigating directly to violations, and noisy output in quiet mode defeats its purpose.
512
+
513
+ **Verified by:**
514
+
515
+ - Show success message when no violations
516
+ - Format violations with file line severity and message
517
+ - Show summary line with counts
518
+ - Filter out warnings and info in quiet mode
519
+
520
+ ---
521
+
522
+ #### JSON formatting produces machine-readable output with full details
523
+
524
+ > **Invariant:** JSON output is valid, includes all summary fields, and preserves violation details including file, line, severity, rule, and message.
525
+ >
526
+ > **Rationale:** Machine consumers (CI pipelines, IDE integrations) depend on valid JSON with complete fields; missing or malformed output breaks automated tooling downstream.
527
+
528
+ **Verified by:**
529
+
530
+ - Return valid JSON
531
+ - Include all summary fields
532
+ - Include violation details
533
+
534
+ _lint-engine.feature_
535
+
536
+ ### Linter Validation
537
+
538
+ _Tests for lint rules that validate relationship integrity, detect conflicts,_
539
+
540
+ ---
541
+
542
+ #### Pattern cannot implement itself (circular reference)
543
+
544
+ > **Invariant:** A pattern's implements tag must reference a different pattern than its own pattern tag.
545
+ >
546
+ > **Rationale:** Self-implementing patterns create circular references that break the sub-pattern hierarchy.
547
+
548
+ **Verified by:**
549
+
550
+ - Pattern tag with implements tag causes error
551
+ - Implements without pattern tag is valid
552
+ - Implements without pattern tag is valid
553
+
554
+ A file cannot define a pattern that implements itself. This creates a
555
+ circular reference. Different patterns are allowed (sub-pattern hierarchy).
556
+
557
+ ---
558
+
559
+ #### Relationship targets should exist (strict mode)
560
+
561
+ > **Invariant:** Every relationship target must reference a pattern that exists in the known pattern registry when strict mode is enabled.
562
+ >
563
+ > **Rationale:** Dangling references to non-existent patterns produce broken dependency graphs and misleading documentation.
564
+
565
+ **Verified by:**
566
+
567
+ - Uses referencing non-existent pattern warns
568
+ - Implements referencing non-existent pattern warns
569
+ - Valid relationship target passes
570
+ - Valid relationship target passes
571
+
572
+ In strict mode
573
+
574
+ - all relationship targets are validated against known patterns.
575
+
576
+ ---
577
+
578
+ #### Bidirectional traceability links should be consistent
579
+
580
+ > **Invariant:** Every forward traceability link (executable-specs, roadmap-spec) must have a corresponding back-link in the target file.
581
+ >
582
+ > **Rationale:** Asymmetric links mean one side of the traceability chain is invisible, defeating the purpose of bidirectional tracing.
583
+
584
+ **Verified by:**
585
+
586
+ - Missing back-link detected
587
+ - Orphan executable spec detected
588
+
589
+ ---
590
+
591
+ #### Parent references must be valid
592
+
593
+ > **Invariant:** A pattern's parent reference must point to an existing epic pattern in the registry.
594
+ >
595
+ > **Rationale:** Dangling parent references break the epic-to-pattern hierarchy, causing patterns to appear orphaned in roadmap views and losing rollup visibility.
596
+
597
+ **Verified by:**
598
+
599
+ - Invalid parent reference detected
600
+ - Valid parent reference passes
601
+
602
+ _linter-validation.feature_
603
+
604
+ ### Lint Rule Advanced
605
+
606
+ _Complex lint rule logic and collection-level behavior._
607
+
608
+ ---
609
+
610
+ #### Descriptions must not repeat the pattern name
611
+
612
+ > **Invariant:** A description that merely echoes the pattern name adds no value and must be rejected.
613
+ >
614
+ > **Rationale:** Tautological descriptions waste reader attention and indicate missing documentation effort.
615
+
616
+ **Verified by:**
617
+
618
+ - Detect description that equals pattern name
619
+ - Detect description that is pattern name with punctuation
620
+ - Detect short description starting with pattern name
621
+ - Accept description with substantial content after name
622
+ - Accept meaningfully different description
623
+ - Ignore empty descriptions
624
+ - Ignore missing pattern name
625
+ - Skip headings when finding first line
626
+ - Skip "When to use" sections when finding first line
627
+
628
+ ---
629
+
630
+ #### Default rules collection is complete and well-ordered
631
+
632
+ > **Invariant:** The default rules collection must contain all defined rules with unique IDs, ordered by severity (errors first).
633
+ >
634
+ > **Rationale:** A complete, ordered collection ensures no rule is silently dropped and severity-based filtering works correctly.
635
+
636
+ **Verified by:**
637
+
638
+ - Default rules contains all 8 rules
639
+ - Default rules have unique IDs
640
+ - Default rules are ordered by severity
641
+ - Default rules include all named rules
642
+
643
+ ---
644
+
645
+ #### Rules can be filtered by minimum severity
646
+
647
+ > **Invariant:** Filtering by severity must return only rules at or above the specified level.
648
+ >
649
+ > **Rationale:** CI pipelines need to control which violations block merges vs. which are advisory.
650
+
651
+ **Verified by:**
652
+
653
+ - Filter returns all rules for info severity
654
+ - Filter excludes info rules for warning severity
655
+ - Filter returns only errors for error severity
656
+
657
+ _lint-rules-advanced.feature_
658
+
659
+ ### Lint Rule Individual
660
+
661
+ _Individual lint rules that check parsed directives for completeness._
662
+
663
+ ---
664
+
665
+ #### Files must declare an explicit pattern name
666
+
667
+ > **Invariant:** Every annotated file must have a non-empty patternName to be identifiable in the registry.
668
+ >
669
+ > **Rationale:** Without a pattern name, the file cannot be tracked, linked, or referenced in generated documentation.
670
+
671
+ **Verified by:**
672
+
673
+ - Detect missing pattern name
674
+ - Detect empty string pattern name
675
+ - Detect whitespace-only pattern name
676
+ - Accept valid pattern name
677
+ - Include file and line in violation
678
+
679
+ ---
680
+
681
+ #### Files should declare a lifecycle status
682
+
683
+ > **Invariant:** Every annotated file should have a status tag to track its position in the delivery lifecycle.
684
+ >
685
+ > **Rationale:** Missing status prevents FSM validation and roadmap tracking.
686
+
687
+ **Verified by:**
688
+
689
+ - Detect missing status
690
+ - Accept completed status
691
+ - Accept active status
692
+ - Accept roadmap status
693
+ - Accept deferred status
694
+
695
+ ---
696
+
697
+ #### Files must use canonical FSM status values
698
+
699
+ > **Invariant:** Annotated files may use only the canonical PDR-005 FSM statuses: roadmap, active, completed, deferred.
700
+ >
701
+ > **Rationale:** Legacy aliases hide process drift and break a single-source-of-truth workflow model.
702
+
703
+ **Verified by:**
704
+
705
+ - Reject planned status alias
706
+ - Reject in-progress status alias
707
+ - Reject implemented status alias
708
+ - Accept canonical deferred status
709
+
710
+ ---
711
+
712
+ #### Files should document when to use the pattern
713
+
714
+ > **Invariant:** Annotated files should include whenToUse guidance so consumers know when to apply the pattern.
715
+ >
716
+ > **Rationale:** Without usage guidance, patterns become undiscoverable despite being documented.
717
+
718
+ **Verified by:**
719
+
720
+ - Detect missing whenToUse
721
+ - Detect empty whenToUse array
722
+ - Accept whenToUse with content
723
+
724
+ ---
725
+
726
+ #### Files should declare relationship tags
727
+
728
+ > **Invariant:** Annotated files should declare uses or usedBy relationships to enable dependency tracking and architecture diagrams.
729
+ >
730
+ > **Rationale:** Isolated patterns without relationships produce diagrams with no edges and prevent dependency analysis.
731
+
732
+ **Verified by:**
733
+
734
+ - Detect missing relationship tags
735
+ - Detect empty uses array
736
+ - Accept uses with content
737
+ - Accept usedBy with content
738
+ - Accept both uses and usedBy
739
+
740
+ _lint-rules-individual.feature_
741
+
742
+ ### Process Guard
743
+
744
+ _- Completed specs modified without explicit unlock reason_
745
+
746
+ ---
747
+
748
+ #### Completed files require unlock-reason to modify
749
+
750
+ > **Invariant:** A completed spec file cannot be modified unless it carries an @architect-unlock-reason tag.
751
+ >
752
+ > **Rationale:** Completed work represents validated, shipped functionality — accidental modification risks regression.
753
+
754
+ **Verified by:**
755
+
756
+ - Completed file with unlock-reason passes validation
757
+ - Completed file without unlock-reason fails validation
758
+ - Protection levels and unlock requirement
759
+ - File transitioning to completed does not require unlock-reason
760
+
761
+ ---
762
+
763
+ #### Status transitions must follow PDR-005 FSM
764
+
765
+ > **Invariant:** Status changes must follow the directed graph: roadmap->active->completed, roadmap<->deferred, active->roadmap.
766
+ >
767
+ > **Rationale:** The FSM prevents skipping required stages (e.g., roadmap->completed bypasses implementation).
768
+
769
+ **Verified by:**
770
+
771
+ - Valid transitions pass validation
772
+ - Invalid transitions fail validation
773
+ - Existing file with unlock-reason bypasses FSM check
774
+
775
+ ---
776
+
777
+ #### Active specs cannot add new deliverables
778
+
779
+ > **Invariant:** A spec in active status cannot have deliverables added that were not present when it entered active.
780
+ >
781
+ > **Rationale:** Scope-locking active work prevents mid-sprint scope creep that derails delivery commitments.
782
+
783
+ **Verified by:**
784
+
785
+ - Active spec with no deliverable changes passes
786
+ - Active spec adding deliverable fails validation
787
+ - Roadmap spec can add deliverables freely
788
+ - Removing deliverable produces warning
789
+ - Deliverable status change does not trigger scope-creep
790
+ - Multiple deliverable status changes pass validation
791
+
792
+ ---
793
+
794
+ #### Files outside active session scope trigger warnings
795
+
796
+ > **Invariant:** Files modified outside the active session's declared scope produce a session-scope warning.
797
+ >
798
+ > **Rationale:** Session scoping keeps focus on planned work and makes accidental cross-cutting changes visible.
799
+
800
+ **Verified by:**
801
+
802
+ - File in session scope passes validation
803
+ - File outside session scope triggers warning
804
+ - No active session means all files in scope
805
+ - ignoreSession flag suppresses session warnings
806
+
807
+ ---
808
+
809
+ #### Explicitly excluded files trigger errors
810
+
811
+ > **Invariant:** Files explicitly excluded from a session cannot be modified, producing a session-excluded error.
812
+ >
813
+ > **Rationale:** Exclusion is stronger than scope — it marks files that must NOT be touched during this session.
814
+
815
+ **Verified by:**
816
+
817
+ - Excluded file triggers error
818
+ - Non-excluded file passes validation
819
+ - ignoreSession flag suppresses excluded errors
820
+
821
+ ---
822
+
823
+ #### Multiple rules validate independently
824
+
825
+ > **Invariant:** Each validation rule evaluates independently — a single file can produce violations from multiple rules.
826
+ >
827
+ > **Rationale:** Independent evaluation ensures no rule masks another, giving complete diagnostic output.
828
+
829
+ **Verified by:**
830
+
831
+ - Multiple violations from different rules
832
+ - Strict mode promotes warnings to errors
833
+ - Clean change produces empty violations
834
+
835
+ _process-guard.feature_
836
+
837
+ ### Status Transition Detection
838
+
839
+ _Tests for the detectStatusTransitions function that parses git diff output._
840
+
841
+ ---
842
+
843
+ #### Status transitions are detected from file-level tags
844
+
845
+ > **Invariant:** Status transitions must be detected by comparing @architect-status tags at the file level between the old and new versions of a file.
846
+ >
847
+ > **Rationale:** File-level tags are the canonical source of pattern status — detecting transitions from tags ensures consistency with the FSM validator.
848
+
849
+ **Verified by:**
850
+
851
+ - New file with status tag is detected as transition from roadmap
852
+ - Modified file with status change is detected
853
+ - No transition when status unchanged
854
+
855
+ ---
856
+
857
+ #### Status tags inside docstrings are ignored
858
+
859
+ > **Invariant:** Status tags appearing inside Gherkin docstring blocks (between triple-quote delimiters) must not be treated as real status declarations.
860
+ >
861
+ > **Rationale:** Docstrings often contain example code or documentation showing status tags — parsing these as real would cause phantom status transitions.
862
+
863
+ **Verified by:**
864
+
865
+ - Status tag inside docstring is not used for transition
866
+ - Multiple docstring status tags are all ignored
867
+ - Only docstring status tags results in no transition
868
+
869
+ ---
870
+
871
+ #### First valid status tag outside docstrings is used
872
+
873
+ > **Invariant:** When multiple status tags appear outside docstrings, only the first one determines the file's status.
874
+ >
875
+ > **Rationale:** A single canonical status per file prevents ambiguity — using the first tag matches Gherkin convention where file-level tags appear at the top.
876
+
877
+ **Verified by:**
878
+
879
+ - First file-level tag wins over subsequent tags
880
+
881
+ ---
882
+
883
+ #### Line numbers are tracked from hunk headers
884
+
885
+ > **Invariant:** Detected status transitions must include the line number where the status tag appears, derived from git diff hunk headers.
886
+ >
887
+ > **Rationale:** Line numbers enable precise error reporting — developers need to know exactly where in the file the transition was detected.
888
+
889
+ **Verified by:**
890
+
891
+ - Transition location includes correct line number
892
+
893
+ ---
894
+
895
+ #### Generated documentation directories are excluded
896
+
897
+ > **Invariant:** Files in generated documentation directories (docs-generated/, docs-living/) must be excluded from status transition detection.
898
+ >
899
+ > **Rationale:** Generated files are projections of source files — detecting transitions in them would produce duplicate violations and false positives.
900
+
901
+ **Verified by:**
902
+
903
+ - Status in docs-generated directory is ignored
904
+ - Status in docs-living directory is ignored
905
+
906
+ _status-transition-detection.feature_
907
+
908
+ ### Tag Registry Schemas Validation
909
+
910
+ _The tag registry configuration module provides schema-validated taxonomy_
911
+
912
+ ---
913
+
914
+ #### createDefaultTagRegistry produces a valid registry from taxonomy source
915
+
916
+ > **Invariant:** createDefaultTagRegistry always returns a TagRegistry that passes TagRegistrySchema validation, with non-empty categories, metadataTags, and aggregationTags arrays.
917
+ >
918
+ > **Rationale:** The default registry is the foundation for all pattern extraction. An invalid or empty default registry would silently break extraction for every consumer.
919
+
920
+ **Verified by:**
921
+
922
+ - Default registry passes schema validation
923
+ - Default registry has non-empty categories
924
+ - Default registry has non-empty metadata tags
925
+ - Default registry has expected tag prefix
926
+
927
+ ---
928
+
929
+ #### mergeTagRegistries deep-merges registries by tag
930
+
931
+ > **Invariant:** mergeTagRegistries merges categories, metadataTags, and aggregationTags by their tag field, with override entries replacing base entries of the same tag and new entries being appended. Scalar fields (version, tagPrefix, fileOptInTag, formatOptions) are fully replaced when provided.
932
+ >
933
+ > **Rationale:** Consumers need to customize the taxonomy without losing default definitions. Tag-based merging prevents accidental duplication while allowing targeted overrides.
934
+
935
+ **Verified by:**
936
+
937
+ - Merge overrides a category by tag
938
+ - Merge adds new categories from override
939
+ - Merge replaces scalar fields when provided
940
+ - Merge preserves base when override is empty
941
+
942
+ _tag-registry-schemas.feature_
943
+
944
+ ### Workflow Config Schemas Validation
945
+
946
+ _The workflow configuration module defines Zod schemas for validating_
947
+
948
+ ---
949
+
950
+ #### WorkflowConfigSchema validates workflow configurations
951
+
952
+ > **Invariant:** WorkflowConfigSchema accepts objects with a name, semver version, at least one status, and at least one phase, and rejects objects missing any required field or with invalid semver format.
953
+ >
954
+ > **Rationale:** Workflow configurations drive FSM validation and phase-based document routing. Malformed configs would cause silent downstream failures in process guard and documentation generation.
955
+
956
+ **Verified by:**
957
+
958
+ - Valid workflow config passes schema validation
959
+ - Config without name is rejected
960
+ - Config with invalid semver version is rejected
961
+ - Config without statuses is rejected
962
+ - Config without phases is rejected
963
+
964
+ ---
965
+
966
+ #### createLoadedWorkflow builds efficient lookup maps
967
+
968
+ > **Invariant:** createLoadedWorkflow produces a LoadedWorkflow whose statusMap and phaseMap contain all statuses and phases from the config, keyed by lowercase name for case-insensitive lookup.
969
+ >
970
+ > **Rationale:** O(1) status and phase lookup eliminates repeated linear scans during validation and rendering, where each pattern may reference multiple statuses.
971
+
972
+ **Verified by:**
973
+
974
+ - Loaded workflow has status lookup map
975
+ - Status lookup is case-insensitive
976
+ - Loaded workflow has phase lookup map
977
+ - Phase lookup is case-insensitive
978
+
979
+ ---
980
+
981
+ #### isWorkflowConfig type guard validates at runtime
982
+
983
+ > **Invariant:** isWorkflowConfig returns true only for values that conform to WorkflowConfigSchema and false for all other values including null, undefined, primitives, and partial objects.
984
+ >
985
+ > **Rationale:** Runtime type guards enable safe narrowing in dynamic contexts (config loading, API responses) where TypeScript compile-time types are unavailable.
986
+
987
+ **Verified by:**
988
+
989
+ - Type guard accepts valid workflow config
990
+ - Type guard rejects null
991
+ - Type guard rejects partial config
992
+ - Type guard rejects non-object
993
+
994
+ _workflow-config-schemas.feature_
995
+
996
+ ---
997
+
998
+ [← Back to Business Rules](../BUSINESS-RULES.md)