@zigrivers/scaffold 2.1.0

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 (657) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +477 -0
  3. package/dist/cli/commands/adopt.d.ts +12 -0
  4. package/dist/cli/commands/adopt.d.ts.map +1 -0
  5. package/dist/cli/commands/adopt.js +107 -0
  6. package/dist/cli/commands/adopt.js.map +1 -0
  7. package/dist/cli/commands/adopt.test.d.ts +2 -0
  8. package/dist/cli/commands/adopt.test.d.ts.map +1 -0
  9. package/dist/cli/commands/adopt.test.js +277 -0
  10. package/dist/cli/commands/adopt.test.js.map +1 -0
  11. package/dist/cli/commands/build.d.ts +12 -0
  12. package/dist/cli/commands/build.d.ts.map +1 -0
  13. package/dist/cli/commands/build.js +105 -0
  14. package/dist/cli/commands/build.js.map +1 -0
  15. package/dist/cli/commands/build.test.d.ts +2 -0
  16. package/dist/cli/commands/build.test.d.ts.map +1 -0
  17. package/dist/cli/commands/build.test.js +272 -0
  18. package/dist/cli/commands/build.test.js.map +1 -0
  19. package/dist/cli/commands/dashboard.d.ts +14 -0
  20. package/dist/cli/commands/dashboard.d.ts.map +1 -0
  21. package/dist/cli/commands/dashboard.js +102 -0
  22. package/dist/cli/commands/dashboard.js.map +1 -0
  23. package/dist/cli/commands/dashboard.test.d.ts +2 -0
  24. package/dist/cli/commands/dashboard.test.d.ts.map +1 -0
  25. package/dist/cli/commands/dashboard.test.js +142 -0
  26. package/dist/cli/commands/dashboard.test.js.map +1 -0
  27. package/dist/cli/commands/decisions.d.ts +13 -0
  28. package/dist/cli/commands/decisions.d.ts.map +1 -0
  29. package/dist/cli/commands/decisions.js +62 -0
  30. package/dist/cli/commands/decisions.js.map +1 -0
  31. package/dist/cli/commands/decisions.test.d.ts +2 -0
  32. package/dist/cli/commands/decisions.test.d.ts.map +1 -0
  33. package/dist/cli/commands/decisions.test.js +154 -0
  34. package/dist/cli/commands/decisions.test.js.map +1 -0
  35. package/dist/cli/commands/info.d.ts +12 -0
  36. package/dist/cli/commands/info.d.ts.map +1 -0
  37. package/dist/cli/commands/info.js +110 -0
  38. package/dist/cli/commands/info.js.map +1 -0
  39. package/dist/cli/commands/info.test.d.ts +2 -0
  40. package/dist/cli/commands/info.test.d.ts.map +1 -0
  41. package/dist/cli/commands/info.test.js +392 -0
  42. package/dist/cli/commands/info.test.js.map +1 -0
  43. package/dist/cli/commands/init.d.ts +13 -0
  44. package/dist/cli/commands/init.d.ts.map +1 -0
  45. package/dist/cli/commands/init.js +46 -0
  46. package/dist/cli/commands/init.js.map +1 -0
  47. package/dist/cli/commands/init.test.d.ts +2 -0
  48. package/dist/cli/commands/init.test.d.ts.map +1 -0
  49. package/dist/cli/commands/init.test.js +156 -0
  50. package/dist/cli/commands/init.test.js.map +1 -0
  51. package/dist/cli/commands/knowledge.d.ts +4 -0
  52. package/dist/cli/commands/knowledge.d.ts.map +1 -0
  53. package/dist/cli/commands/knowledge.js +346 -0
  54. package/dist/cli/commands/knowledge.js.map +1 -0
  55. package/dist/cli/commands/knowledge.test.d.ts +2 -0
  56. package/dist/cli/commands/knowledge.test.d.ts.map +1 -0
  57. package/dist/cli/commands/knowledge.test.js +293 -0
  58. package/dist/cli/commands/knowledge.test.js.map +1 -0
  59. package/dist/cli/commands/list.d.ts +12 -0
  60. package/dist/cli/commands/list.d.ts.map +1 -0
  61. package/dist/cli/commands/list.js +73 -0
  62. package/dist/cli/commands/list.js.map +1 -0
  63. package/dist/cli/commands/list.test.d.ts +2 -0
  64. package/dist/cli/commands/list.test.d.ts.map +1 -0
  65. package/dist/cli/commands/list.test.js +166 -0
  66. package/dist/cli/commands/list.test.js.map +1 -0
  67. package/dist/cli/commands/next.d.ts +12 -0
  68. package/dist/cli/commands/next.d.ts.map +1 -0
  69. package/dist/cli/commands/next.js +75 -0
  70. package/dist/cli/commands/next.js.map +1 -0
  71. package/dist/cli/commands/next.test.d.ts +2 -0
  72. package/dist/cli/commands/next.test.d.ts.map +1 -0
  73. package/dist/cli/commands/next.test.js +236 -0
  74. package/dist/cli/commands/next.test.js.map +1 -0
  75. package/dist/cli/commands/reset.d.ts +13 -0
  76. package/dist/cli/commands/reset.d.ts.map +1 -0
  77. package/dist/cli/commands/reset.js +105 -0
  78. package/dist/cli/commands/reset.js.map +1 -0
  79. package/dist/cli/commands/reset.test.d.ts +2 -0
  80. package/dist/cli/commands/reset.test.d.ts.map +1 -0
  81. package/dist/cli/commands/reset.test.js +211 -0
  82. package/dist/cli/commands/reset.test.js.map +1 -0
  83. package/dist/cli/commands/run.d.ts +14 -0
  84. package/dist/cli/commands/run.d.ts.map +1 -0
  85. package/dist/cli/commands/run.js +379 -0
  86. package/dist/cli/commands/run.js.map +1 -0
  87. package/dist/cli/commands/run.test.d.ts +2 -0
  88. package/dist/cli/commands/run.test.d.ts.map +1 -0
  89. package/dist/cli/commands/run.test.js +535 -0
  90. package/dist/cli/commands/run.test.js.map +1 -0
  91. package/dist/cli/commands/skip.d.ts +13 -0
  92. package/dist/cli/commands/skip.d.ts.map +1 -0
  93. package/dist/cli/commands/skip.js +123 -0
  94. package/dist/cli/commands/skip.js.map +1 -0
  95. package/dist/cli/commands/skip.test.d.ts +2 -0
  96. package/dist/cli/commands/skip.test.d.ts.map +1 -0
  97. package/dist/cli/commands/skip.test.js +339 -0
  98. package/dist/cli/commands/skip.test.js.map +1 -0
  99. package/dist/cli/commands/status.d.ts +12 -0
  100. package/dist/cli/commands/status.d.ts.map +1 -0
  101. package/dist/cli/commands/status.js +79 -0
  102. package/dist/cli/commands/status.js.map +1 -0
  103. package/dist/cli/commands/status.test.d.ts +2 -0
  104. package/dist/cli/commands/status.test.d.ts.map +1 -0
  105. package/dist/cli/commands/status.test.js +245 -0
  106. package/dist/cli/commands/status.test.js.map +1 -0
  107. package/dist/cli/commands/update.d.ts +11 -0
  108. package/dist/cli/commands/update.d.ts.map +1 -0
  109. package/dist/cli/commands/update.js +159 -0
  110. package/dist/cli/commands/update.js.map +1 -0
  111. package/dist/cli/commands/update.test.d.ts +2 -0
  112. package/dist/cli/commands/update.test.d.ts.map +1 -0
  113. package/dist/cli/commands/update.test.js +140 -0
  114. package/dist/cli/commands/update.test.js.map +1 -0
  115. package/dist/cli/commands/validate.d.ts +12 -0
  116. package/dist/cli/commands/validate.d.ts.map +1 -0
  117. package/dist/cli/commands/validate.js +65 -0
  118. package/dist/cli/commands/validate.js.map +1 -0
  119. package/dist/cli/commands/validate.test.d.ts +2 -0
  120. package/dist/cli/commands/validate.test.d.ts.map +1 -0
  121. package/dist/cli/commands/validate.test.js +159 -0
  122. package/dist/cli/commands/validate.test.js.map +1 -0
  123. package/dist/cli/commands/version.d.ts +13 -0
  124. package/dist/cli/commands/version.d.ts.map +1 -0
  125. package/dist/cli/commands/version.js +89 -0
  126. package/dist/cli/commands/version.js.map +1 -0
  127. package/dist/cli/commands/version.test.d.ts +2 -0
  128. package/dist/cli/commands/version.test.d.ts.map +1 -0
  129. package/dist/cli/commands/version.test.js +63 -0
  130. package/dist/cli/commands/version.test.js.map +1 -0
  131. package/dist/cli/index.d.ts +4 -0
  132. package/dist/cli/index.d.ts.map +1 -0
  133. package/dist/cli/index.js +72 -0
  134. package/dist/cli/index.js.map +1 -0
  135. package/dist/cli/index.test.d.ts +2 -0
  136. package/dist/cli/index.test.d.ts.map +1 -0
  137. package/dist/cli/index.test.js +8 -0
  138. package/dist/cli/index.test.js.map +1 -0
  139. package/dist/cli/middleware/output-mode.d.ts +21 -0
  140. package/dist/cli/middleware/output-mode.d.ts.map +1 -0
  141. package/dist/cli/middleware/output-mode.js +27 -0
  142. package/dist/cli/middleware/output-mode.js.map +1 -0
  143. package/dist/cli/middleware/output-mode.test.d.ts +2 -0
  144. package/dist/cli/middleware/output-mode.test.d.ts.map +1 -0
  145. package/dist/cli/middleware/output-mode.test.js +41 -0
  146. package/dist/cli/middleware/output-mode.test.js.map +1 -0
  147. package/dist/cli/middleware/project-root.d.ts +21 -0
  148. package/dist/cli/middleware/project-root.d.ts.map +1 -0
  149. package/dist/cli/middleware/project-root.js +54 -0
  150. package/dist/cli/middleware/project-root.js.map +1 -0
  151. package/dist/cli/middleware/project-root.test.d.ts +2 -0
  152. package/dist/cli/middleware/project-root.test.d.ts.map +1 -0
  153. package/dist/cli/middleware/project-root.test.js +112 -0
  154. package/dist/cli/middleware/project-root.test.js.map +1 -0
  155. package/dist/cli/output/auto.d.ts +18 -0
  156. package/dist/cli/output/auto.d.ts.map +1 -0
  157. package/dist/cli/output/auto.js +43 -0
  158. package/dist/cli/output/auto.js.map +1 -0
  159. package/dist/cli/output/context.d.ts +19 -0
  160. package/dist/cli/output/context.d.ts.map +1 -0
  161. package/dist/cli/output/context.js +15 -0
  162. package/dist/cli/output/context.js.map +1 -0
  163. package/dist/cli/output/context.test.d.ts +2 -0
  164. package/dist/cli/output/context.test.d.ts.map +1 -0
  165. package/dist/cli/output/context.test.js +335 -0
  166. package/dist/cli/output/context.test.js.map +1 -0
  167. package/dist/cli/output/error-display.d.ts +31 -0
  168. package/dist/cli/output/error-display.d.ts.map +1 -0
  169. package/dist/cli/output/error-display.js +79 -0
  170. package/dist/cli/output/error-display.js.map +1 -0
  171. package/dist/cli/output/error-display.test.d.ts +2 -0
  172. package/dist/cli/output/error-display.test.d.ts.map +1 -0
  173. package/dist/cli/output/error-display.test.js +230 -0
  174. package/dist/cli/output/error-display.test.js.map +1 -0
  175. package/dist/cli/output/interactive.d.ts +22 -0
  176. package/dist/cli/output/interactive.d.ts.map +1 -0
  177. package/dist/cli/output/interactive.js +126 -0
  178. package/dist/cli/output/interactive.js.map +1 -0
  179. package/dist/cli/output/json.d.ts +17 -0
  180. package/dist/cli/output/json.d.ts.map +1 -0
  181. package/dist/cli/output/json.js +62 -0
  182. package/dist/cli/output/json.js.map +1 -0
  183. package/dist/cli/types.d.ts +11 -0
  184. package/dist/cli/types.d.ts.map +1 -0
  185. package/dist/cli/types.js +2 -0
  186. package/dist/cli/types.js.map +1 -0
  187. package/dist/config/loader.d.ts +22 -0
  188. package/dist/config/loader.d.ts.map +1 -0
  189. package/dist/config/loader.js +159 -0
  190. package/dist/config/loader.js.map +1 -0
  191. package/dist/config/loader.test.d.ts +2 -0
  192. package/dist/config/loader.test.d.ts.map +1 -0
  193. package/dist/config/loader.test.js +226 -0
  194. package/dist/config/loader.test.js.map +1 -0
  195. package/dist/config/migration.d.ts +15 -0
  196. package/dist/config/migration.d.ts.map +1 -0
  197. package/dist/config/migration.js +39 -0
  198. package/dist/config/migration.js.map +1 -0
  199. package/dist/config/migration.test.d.ts +2 -0
  200. package/dist/config/migration.test.d.ts.map +1 -0
  201. package/dist/config/migration.test.js +44 -0
  202. package/dist/config/migration.test.js.map +1 -0
  203. package/dist/config/schema.d.ts +121 -0
  204. package/dist/config/schema.d.ts.map +1 -0
  205. package/dist/config/schema.js +22 -0
  206. package/dist/config/schema.js.map +1 -0
  207. package/dist/config/schema.test.d.ts +2 -0
  208. package/dist/config/schema.test.d.ts.map +1 -0
  209. package/dist/config/schema.test.js +126 -0
  210. package/dist/config/schema.test.js.map +1 -0
  211. package/dist/core/adapters/adapter.d.ts +64 -0
  212. package/dist/core/adapters/adapter.d.ts.map +1 -0
  213. package/dist/core/adapters/adapter.js +25 -0
  214. package/dist/core/adapters/adapter.js.map +1 -0
  215. package/dist/core/adapters/adapter.test.d.ts +2 -0
  216. package/dist/core/adapters/adapter.test.d.ts.map +1 -0
  217. package/dist/core/adapters/adapter.test.js +175 -0
  218. package/dist/core/adapters/adapter.test.js.map +1 -0
  219. package/dist/core/adapters/claude-code.d.ts +9 -0
  220. package/dist/core/adapters/claude-code.d.ts.map +1 -0
  221. package/dist/core/adapters/claude-code.js +34 -0
  222. package/dist/core/adapters/claude-code.js.map +1 -0
  223. package/dist/core/adapters/claude-code.test.d.ts +2 -0
  224. package/dist/core/adapters/claude-code.test.d.ts.map +1 -0
  225. package/dist/core/adapters/claude-code.test.js +100 -0
  226. package/dist/core/adapters/claude-code.test.js.map +1 -0
  227. package/dist/core/adapters/codex.d.ts +10 -0
  228. package/dist/core/adapters/codex.d.ts.map +1 -0
  229. package/dist/core/adapters/codex.js +61 -0
  230. package/dist/core/adapters/codex.js.map +1 -0
  231. package/dist/core/adapters/codex.test.d.ts +2 -0
  232. package/dist/core/adapters/codex.test.d.ts.map +1 -0
  233. package/dist/core/adapters/codex.test.js +122 -0
  234. package/dist/core/adapters/codex.test.js.map +1 -0
  235. package/dist/core/adapters/universal.d.ts +10 -0
  236. package/dist/core/adapters/universal.d.ts.map +1 -0
  237. package/dist/core/adapters/universal.js +45 -0
  238. package/dist/core/adapters/universal.js.map +1 -0
  239. package/dist/core/adapters/universal.test.d.ts +2 -0
  240. package/dist/core/adapters/universal.test.d.ts.map +1 -0
  241. package/dist/core/adapters/universal.test.js +121 -0
  242. package/dist/core/adapters/universal.test.js.map +1 -0
  243. package/dist/core/assembly/context-gatherer.d.ts +17 -0
  244. package/dist/core/assembly/context-gatherer.d.ts.map +1 -0
  245. package/dist/core/assembly/context-gatherer.js +49 -0
  246. package/dist/core/assembly/context-gatherer.js.map +1 -0
  247. package/dist/core/assembly/context-gatherer.test.d.ts +2 -0
  248. package/dist/core/assembly/context-gatherer.test.d.ts.map +1 -0
  249. package/dist/core/assembly/context-gatherer.test.js +252 -0
  250. package/dist/core/assembly/context-gatherer.test.js.map +1 -0
  251. package/dist/core/assembly/depth-resolver.d.ts +11 -0
  252. package/dist/core/assembly/depth-resolver.d.ts.map +1 -0
  253. package/dist/core/assembly/depth-resolver.js +23 -0
  254. package/dist/core/assembly/depth-resolver.js.map +1 -0
  255. package/dist/core/assembly/depth-resolver.test.d.ts +2 -0
  256. package/dist/core/assembly/depth-resolver.test.d.ts.map +1 -0
  257. package/dist/core/assembly/depth-resolver.test.js +100 -0
  258. package/dist/core/assembly/depth-resolver.test.js.map +1 -0
  259. package/dist/core/assembly/engine.d.ts +22 -0
  260. package/dist/core/assembly/engine.d.ts.map +1 -0
  261. package/dist/core/assembly/engine.js +215 -0
  262. package/dist/core/assembly/engine.js.map +1 -0
  263. package/dist/core/assembly/engine.test.d.ts +2 -0
  264. package/dist/core/assembly/engine.test.d.ts.map +1 -0
  265. package/dist/core/assembly/engine.test.js +462 -0
  266. package/dist/core/assembly/engine.test.js.map +1 -0
  267. package/dist/core/assembly/instruction-loader.d.ts +16 -0
  268. package/dist/core/assembly/instruction-loader.d.ts.map +1 -0
  269. package/dist/core/assembly/instruction-loader.js +40 -0
  270. package/dist/core/assembly/instruction-loader.js.map +1 -0
  271. package/dist/core/assembly/instruction-loader.test.d.ts +2 -0
  272. package/dist/core/assembly/instruction-loader.test.d.ts.map +1 -0
  273. package/dist/core/assembly/instruction-loader.test.js +109 -0
  274. package/dist/core/assembly/instruction-loader.test.js.map +1 -0
  275. package/dist/core/assembly/knowledge-loader.d.ts +34 -0
  276. package/dist/core/assembly/knowledge-loader.d.ts.map +1 -0
  277. package/dist/core/assembly/knowledge-loader.js +204 -0
  278. package/dist/core/assembly/knowledge-loader.js.map +1 -0
  279. package/dist/core/assembly/knowledge-loader.test.d.ts +2 -0
  280. package/dist/core/assembly/knowledge-loader.test.d.ts.map +1 -0
  281. package/dist/core/assembly/knowledge-loader.test.js +205 -0
  282. package/dist/core/assembly/knowledge-loader.test.js.map +1 -0
  283. package/dist/core/assembly/meta-prompt-loader.d.ts +13 -0
  284. package/dist/core/assembly/meta-prompt-loader.d.ts.map +1 -0
  285. package/dist/core/assembly/meta-prompt-loader.js +91 -0
  286. package/dist/core/assembly/meta-prompt-loader.js.map +1 -0
  287. package/dist/core/assembly/meta-prompt-loader.test.d.ts +2 -0
  288. package/dist/core/assembly/meta-prompt-loader.test.d.ts.map +1 -0
  289. package/dist/core/assembly/meta-prompt-loader.test.js +232 -0
  290. package/dist/core/assembly/meta-prompt-loader.test.js.map +1 -0
  291. package/dist/core/assembly/methodology-change.d.ts +27 -0
  292. package/dist/core/assembly/methodology-change.d.ts.map +1 -0
  293. package/dist/core/assembly/methodology-change.js +41 -0
  294. package/dist/core/assembly/methodology-change.js.map +1 -0
  295. package/dist/core/assembly/methodology-change.test.d.ts +2 -0
  296. package/dist/core/assembly/methodology-change.test.d.ts.map +1 -0
  297. package/dist/core/assembly/methodology-change.test.js +145 -0
  298. package/dist/core/assembly/methodology-change.test.js.map +1 -0
  299. package/dist/core/assembly/methodology-resolver.d.ts +11 -0
  300. package/dist/core/assembly/methodology-resolver.d.ts.map +1 -0
  301. package/dist/core/assembly/methodology-resolver.js +19 -0
  302. package/dist/core/assembly/methodology-resolver.js.map +1 -0
  303. package/dist/core/assembly/methodology-resolver.test.d.ts +2 -0
  304. package/dist/core/assembly/methodology-resolver.test.d.ts.map +1 -0
  305. package/dist/core/assembly/methodology-resolver.test.js +87 -0
  306. package/dist/core/assembly/methodology-resolver.test.js.map +1 -0
  307. package/dist/core/assembly/preset-loader.d.ts +26 -0
  308. package/dist/core/assembly/preset-loader.d.ts.map +1 -0
  309. package/dist/core/assembly/preset-loader.js +146 -0
  310. package/dist/core/assembly/preset-loader.js.map +1 -0
  311. package/dist/core/assembly/preset-loader.test.d.ts +2 -0
  312. package/dist/core/assembly/preset-loader.test.d.ts.map +1 -0
  313. package/dist/core/assembly/preset-loader.test.js +107 -0
  314. package/dist/core/assembly/preset-loader.test.js.map +1 -0
  315. package/dist/core/assembly/update-mode.d.ts +25 -0
  316. package/dist/core/assembly/update-mode.d.ts.map +1 -0
  317. package/dist/core/assembly/update-mode.js +70 -0
  318. package/dist/core/assembly/update-mode.js.map +1 -0
  319. package/dist/core/assembly/update-mode.test.d.ts +2 -0
  320. package/dist/core/assembly/update-mode.test.d.ts.map +1 -0
  321. package/dist/core/assembly/update-mode.test.js +235 -0
  322. package/dist/core/assembly/update-mode.test.js.map +1 -0
  323. package/dist/core/dependency/dependency.d.ts +20 -0
  324. package/dist/core/dependency/dependency.d.ts.map +1 -0
  325. package/dist/core/dependency/dependency.js +104 -0
  326. package/dist/core/dependency/dependency.js.map +1 -0
  327. package/dist/core/dependency/dependency.test.d.ts +2 -0
  328. package/dist/core/dependency/dependency.test.d.ts.map +1 -0
  329. package/dist/core/dependency/dependency.test.js +166 -0
  330. package/dist/core/dependency/dependency.test.js.map +1 -0
  331. package/dist/core/dependency/eligibility.d.ts +17 -0
  332. package/dist/core/dependency/eligibility.d.ts.map +1 -0
  333. package/dist/core/dependency/eligibility.js +60 -0
  334. package/dist/core/dependency/eligibility.js.map +1 -0
  335. package/dist/core/dependency/eligibility.test.d.ts +2 -0
  336. package/dist/core/dependency/eligibility.test.d.ts.map +1 -0
  337. package/dist/core/dependency/eligibility.test.js +198 -0
  338. package/dist/core/dependency/eligibility.test.js.map +1 -0
  339. package/dist/core/dependency/graph.d.ts +12 -0
  340. package/dist/core/dependency/graph.d.ts.map +1 -0
  341. package/dist/core/dependency/graph.js +34 -0
  342. package/dist/core/dependency/graph.js.map +1 -0
  343. package/dist/core/knowledge/knowledge-update-assembler.d.ts +24 -0
  344. package/dist/core/knowledge/knowledge-update-assembler.d.ts.map +1 -0
  345. package/dist/core/knowledge/knowledge-update-assembler.js +46 -0
  346. package/dist/core/knowledge/knowledge-update-assembler.js.map +1 -0
  347. package/dist/core/knowledge/knowledge-update-assembler.test.d.ts +2 -0
  348. package/dist/core/knowledge/knowledge-update-assembler.test.d.ts.map +1 -0
  349. package/dist/core/knowledge/knowledge-update-assembler.test.js +93 -0
  350. package/dist/core/knowledge/knowledge-update-assembler.test.js.map +1 -0
  351. package/dist/core/knowledge/knowledge-update-template.md +55 -0
  352. package/dist/dashboard/generator.d.ts +37 -0
  353. package/dist/dashboard/generator.d.ts.map +1 -0
  354. package/dist/dashboard/generator.js +42 -0
  355. package/dist/dashboard/generator.js.map +1 -0
  356. package/dist/dashboard/generator.test.d.ts +2 -0
  357. package/dist/dashboard/generator.test.d.ts.map +1 -0
  358. package/dist/dashboard/generator.test.js +186 -0
  359. package/dist/dashboard/generator.test.js.map +1 -0
  360. package/dist/dashboard/template.d.ts +4 -0
  361. package/dist/dashboard/template.d.ts.map +1 -0
  362. package/dist/dashboard/template.js +190 -0
  363. package/dist/dashboard/template.js.map +1 -0
  364. package/dist/e2e/commands.test.d.ts +9 -0
  365. package/dist/e2e/commands.test.d.ts.map +1 -0
  366. package/dist/e2e/commands.test.js +499 -0
  367. package/dist/e2e/commands.test.js.map +1 -0
  368. package/dist/e2e/init.test.d.ts +10 -0
  369. package/dist/e2e/init.test.d.ts.map +1 -0
  370. package/dist/e2e/init.test.js +180 -0
  371. package/dist/e2e/init.test.js.map +1 -0
  372. package/dist/e2e/knowledge.test.d.ts +2 -0
  373. package/dist/e2e/knowledge.test.d.ts.map +1 -0
  374. package/dist/e2e/knowledge.test.js +103 -0
  375. package/dist/e2e/knowledge.test.js.map +1 -0
  376. package/dist/e2e/pipeline.test.d.ts +8 -0
  377. package/dist/e2e/pipeline.test.d.ts.map +1 -0
  378. package/dist/e2e/pipeline.test.js +295 -0
  379. package/dist/e2e/pipeline.test.js.map +1 -0
  380. package/dist/index.d.ts +3 -0
  381. package/dist/index.d.ts.map +1 -0
  382. package/dist/index.js +7 -0
  383. package/dist/index.js.map +1 -0
  384. package/dist/project/adopt.d.ts +28 -0
  385. package/dist/project/adopt.d.ts.map +1 -0
  386. package/dist/project/adopt.js +49 -0
  387. package/dist/project/adopt.js.map +1 -0
  388. package/dist/project/adopt.test.d.ts +2 -0
  389. package/dist/project/adopt.test.d.ts.map +1 -0
  390. package/dist/project/adopt.test.js +220 -0
  391. package/dist/project/adopt.test.js.map +1 -0
  392. package/dist/project/claude-md.d.ts +33 -0
  393. package/dist/project/claude-md.d.ts.map +1 -0
  394. package/dist/project/claude-md.js +112 -0
  395. package/dist/project/claude-md.js.map +1 -0
  396. package/dist/project/claude-md.test.d.ts +2 -0
  397. package/dist/project/claude-md.test.d.ts.map +1 -0
  398. package/dist/project/claude-md.test.js +151 -0
  399. package/dist/project/claude-md.test.js.map +1 -0
  400. package/dist/project/detector.d.ts +7 -0
  401. package/dist/project/detector.d.ts.map +1 -0
  402. package/dist/project/detector.js +78 -0
  403. package/dist/project/detector.js.map +1 -0
  404. package/dist/project/detector.test.d.ts +2 -0
  405. package/dist/project/detector.test.d.ts.map +1 -0
  406. package/dist/project/detector.test.js +137 -0
  407. package/dist/project/detector.test.js.map +1 -0
  408. package/dist/project/frontmatter.d.ts +17 -0
  409. package/dist/project/frontmatter.d.ts.map +1 -0
  410. package/dist/project/frontmatter.js +236 -0
  411. package/dist/project/frontmatter.js.map +1 -0
  412. package/dist/project/frontmatter.test.d.ts +2 -0
  413. package/dist/project/frontmatter.test.d.ts.map +1 -0
  414. package/dist/project/frontmatter.test.js +218 -0
  415. package/dist/project/frontmatter.test.js.map +1 -0
  416. package/dist/project/signals.d.ts +12 -0
  417. package/dist/project/signals.d.ts.map +1 -0
  418. package/dist/project/signals.js +2 -0
  419. package/dist/project/signals.js.map +1 -0
  420. package/dist/state/completion.d.ts +22 -0
  421. package/dist/state/completion.d.ts.map +1 -0
  422. package/dist/state/completion.js +82 -0
  423. package/dist/state/completion.js.map +1 -0
  424. package/dist/state/completion.test.d.ts +2 -0
  425. package/dist/state/completion.test.d.ts.map +1 -0
  426. package/dist/state/completion.test.js +246 -0
  427. package/dist/state/completion.test.js.map +1 -0
  428. package/dist/state/decision-logger.d.ts +16 -0
  429. package/dist/state/decision-logger.d.ts.map +1 -0
  430. package/dist/state/decision-logger.js +80 -0
  431. package/dist/state/decision-logger.js.map +1 -0
  432. package/dist/state/decision-logger.test.d.ts +2 -0
  433. package/dist/state/decision-logger.test.d.ts.map +1 -0
  434. package/dist/state/decision-logger.test.js +182 -0
  435. package/dist/state/decision-logger.test.js.map +1 -0
  436. package/dist/state/lock-manager.d.ts +18 -0
  437. package/dist/state/lock-manager.d.ts.map +1 -0
  438. package/dist/state/lock-manager.js +134 -0
  439. package/dist/state/lock-manager.js.map +1 -0
  440. package/dist/state/lock-manager.test.d.ts +2 -0
  441. package/dist/state/lock-manager.test.d.ts.map +1 -0
  442. package/dist/state/lock-manager.test.js +190 -0
  443. package/dist/state/lock-manager.test.js.map +1 -0
  444. package/dist/state/state-manager.d.ts +37 -0
  445. package/dist/state/state-manager.d.ts.map +1 -0
  446. package/dist/state/state-manager.js +125 -0
  447. package/dist/state/state-manager.js.map +1 -0
  448. package/dist/state/state-manager.test.d.ts +2 -0
  449. package/dist/state/state-manager.test.d.ts.map +1 -0
  450. package/dist/state/state-manager.test.js +240 -0
  451. package/dist/state/state-manager.test.js.map +1 -0
  452. package/dist/types/adapter.d.ts +24 -0
  453. package/dist/types/adapter.d.ts.map +1 -0
  454. package/dist/types/adapter.js +2 -0
  455. package/dist/types/adapter.js.map +1 -0
  456. package/dist/types/assembly.d.ts +89 -0
  457. package/dist/types/assembly.d.ts.map +1 -0
  458. package/dist/types/assembly.js +2 -0
  459. package/dist/types/assembly.js.map +1 -0
  460. package/dist/types/claude-md.d.ts +11 -0
  461. package/dist/types/claude-md.d.ts.map +1 -0
  462. package/dist/types/claude-md.js +2 -0
  463. package/dist/types/claude-md.js.map +1 -0
  464. package/dist/types/cli.d.ts +15 -0
  465. package/dist/types/cli.d.ts.map +1 -0
  466. package/dist/types/cli.js +2 -0
  467. package/dist/types/cli.js.map +1 -0
  468. package/dist/types/config.d.ts +40 -0
  469. package/dist/types/config.d.ts.map +1 -0
  470. package/dist/types/config.js +2 -0
  471. package/dist/types/config.js.map +1 -0
  472. package/dist/types/decision.d.ts +14 -0
  473. package/dist/types/decision.d.ts.map +1 -0
  474. package/dist/types/decision.js +2 -0
  475. package/dist/types/decision.js.map +1 -0
  476. package/dist/types/dependency.d.ts +12 -0
  477. package/dist/types/dependency.d.ts.map +1 -0
  478. package/dist/types/dependency.js +2 -0
  479. package/dist/types/dependency.js.map +1 -0
  480. package/dist/types/enums.d.ts +23 -0
  481. package/dist/types/enums.d.ts.map +1 -0
  482. package/dist/types/enums.js +11 -0
  483. package/dist/types/enums.js.map +1 -0
  484. package/dist/types/enums.test.d.ts +2 -0
  485. package/dist/types/enums.test.d.ts.map +1 -0
  486. package/dist/types/enums.test.js +13 -0
  487. package/dist/types/enums.test.js.map +1 -0
  488. package/dist/types/errors.d.ts +24 -0
  489. package/dist/types/errors.d.ts.map +1 -0
  490. package/dist/types/errors.js +2 -0
  491. package/dist/types/errors.js.map +1 -0
  492. package/dist/types/frontmatter.d.ts +43 -0
  493. package/dist/types/frontmatter.d.ts.map +1 -0
  494. package/dist/types/frontmatter.js +2 -0
  495. package/dist/types/frontmatter.js.map +1 -0
  496. package/dist/types/index.d.ts +14 -0
  497. package/dist/types/index.d.ts.map +1 -0
  498. package/dist/types/index.js +14 -0
  499. package/dist/types/index.js.map +1 -0
  500. package/dist/types/lock.d.ts +10 -0
  501. package/dist/types/lock.d.ts.map +1 -0
  502. package/dist/types/lock.js +2 -0
  503. package/dist/types/lock.js.map +1 -0
  504. package/dist/types/state.d.ts +49 -0
  505. package/dist/types/state.d.ts.map +1 -0
  506. package/dist/types/state.js +2 -0
  507. package/dist/types/state.js.map +1 -0
  508. package/dist/types/wizard.d.ts +14 -0
  509. package/dist/types/wizard.d.ts.map +1 -0
  510. package/dist/types/wizard.js +2 -0
  511. package/dist/types/wizard.js.map +1 -0
  512. package/dist/utils/errors.d.ts +42 -0
  513. package/dist/utils/errors.d.ts.map +1 -0
  514. package/dist/utils/errors.js +232 -0
  515. package/dist/utils/errors.js.map +1 -0
  516. package/dist/utils/errors.test.d.ts +2 -0
  517. package/dist/utils/errors.test.d.ts.map +1 -0
  518. package/dist/utils/errors.test.js +91 -0
  519. package/dist/utils/errors.test.js.map +1 -0
  520. package/dist/utils/fs.d.ts +11 -0
  521. package/dist/utils/fs.d.ts.map +1 -0
  522. package/dist/utils/fs.js +20 -0
  523. package/dist/utils/fs.js.map +1 -0
  524. package/dist/utils/fs.test.d.ts +2 -0
  525. package/dist/utils/fs.test.d.ts.map +1 -0
  526. package/dist/utils/fs.test.js +93 -0
  527. package/dist/utils/fs.test.js.map +1 -0
  528. package/dist/utils/index.d.ts +4 -0
  529. package/dist/utils/index.d.ts.map +1 -0
  530. package/dist/utils/index.js +4 -0
  531. package/dist/utils/index.js.map +1 -0
  532. package/dist/utils/levenshtein.d.ts +11 -0
  533. package/dist/utils/levenshtein.d.ts.map +1 -0
  534. package/dist/utils/levenshtein.js +37 -0
  535. package/dist/utils/levenshtein.js.map +1 -0
  536. package/dist/utils/levenshtein.test.d.ts +2 -0
  537. package/dist/utils/levenshtein.test.d.ts.map +1 -0
  538. package/dist/utils/levenshtein.test.js +34 -0
  539. package/dist/utils/levenshtein.test.js.map +1 -0
  540. package/dist/validation/config-validator.d.ts +10 -0
  541. package/dist/validation/config-validator.d.ts.map +1 -0
  542. package/dist/validation/config-validator.js +11 -0
  543. package/dist/validation/config-validator.js.map +1 -0
  544. package/dist/validation/dependency-validator.d.ts +10 -0
  545. package/dist/validation/dependency-validator.d.ts.map +1 -0
  546. package/dist/validation/dependency-validator.js +34 -0
  547. package/dist/validation/dependency-validator.js.map +1 -0
  548. package/dist/validation/frontmatter-validator.d.ts +12 -0
  549. package/dist/validation/frontmatter-validator.d.ts.map +1 -0
  550. package/dist/validation/frontmatter-validator.js +50 -0
  551. package/dist/validation/frontmatter-validator.js.map +1 -0
  552. package/dist/validation/index.d.ts +19 -0
  553. package/dist/validation/index.d.ts.map +1 -0
  554. package/dist/validation/index.js +64 -0
  555. package/dist/validation/index.js.map +1 -0
  556. package/dist/validation/index.test.d.ts +2 -0
  557. package/dist/validation/index.test.d.ts.map +1 -0
  558. package/dist/validation/index.test.js +241 -0
  559. package/dist/validation/index.test.js.map +1 -0
  560. package/dist/validation/state-validator.d.ts +15 -0
  561. package/dist/validation/state-validator.d.ts.map +1 -0
  562. package/dist/validation/state-validator.js +104 -0
  563. package/dist/validation/state-validator.js.map +1 -0
  564. package/dist/wizard/questions.d.ts +18 -0
  565. package/dist/wizard/questions.d.ts.map +1 -0
  566. package/dist/wizard/questions.js +46 -0
  567. package/dist/wizard/questions.js.map +1 -0
  568. package/dist/wizard/suggestion.d.ts +10 -0
  569. package/dist/wizard/suggestion.d.ts.map +1 -0
  570. package/dist/wizard/suggestion.js +17 -0
  571. package/dist/wizard/suggestion.js.map +1 -0
  572. package/dist/wizard/wizard.d.ts +19 -0
  573. package/dist/wizard/wizard.d.ts.map +1 -0
  574. package/dist/wizard/wizard.js +104 -0
  575. package/dist/wizard/wizard.js.map +1 -0
  576. package/dist/wizard/wizard.test.d.ts +2 -0
  577. package/dist/wizard/wizard.test.d.ts.map +1 -0
  578. package/dist/wizard/wizard.test.js +167 -0
  579. package/dist/wizard/wizard.test.js.map +1 -0
  580. package/knowledge/core/adr-craft.md +281 -0
  581. package/knowledge/core/api-design.md +501 -0
  582. package/knowledge/core/database-design.md +380 -0
  583. package/knowledge/core/domain-modeling.md +317 -0
  584. package/knowledge/core/operations-runbook.md +513 -0
  585. package/knowledge/core/security-review.md +523 -0
  586. package/knowledge/core/system-architecture.md +402 -0
  587. package/knowledge/core/task-decomposition.md +372 -0
  588. package/knowledge/core/testing-strategy.md +409 -0
  589. package/knowledge/core/user-stories.md +337 -0
  590. package/knowledge/core/user-story-innovation.md +171 -0
  591. package/knowledge/core/ux-specification.md +380 -0
  592. package/knowledge/finalization/apply-fixes-and-freeze.md +93 -0
  593. package/knowledge/finalization/developer-onboarding.md +376 -0
  594. package/knowledge/finalization/implementation-playbook.md +404 -0
  595. package/knowledge/product/gap-analysis.md +305 -0
  596. package/knowledge/product/prd-craft.md +324 -0
  597. package/knowledge/product/prd-innovation.md +204 -0
  598. package/knowledge/review/review-adr.md +203 -0
  599. package/knowledge/review/review-api-contracts.md +233 -0
  600. package/knowledge/review/review-database-schema.md +229 -0
  601. package/knowledge/review/review-domain-modeling.md +288 -0
  602. package/knowledge/review/review-implementation-tasks.md +202 -0
  603. package/knowledge/review/review-methodology.md +215 -0
  604. package/knowledge/review/review-operations.md +212 -0
  605. package/knowledge/review/review-prd.md +235 -0
  606. package/knowledge/review/review-security.md +213 -0
  607. package/knowledge/review/review-system-architecture.md +296 -0
  608. package/knowledge/review/review-testing-strategy.md +176 -0
  609. package/knowledge/review/review-user-stories.md +172 -0
  610. package/knowledge/review/review-ux-spec.md +208 -0
  611. package/knowledge/validation/critical-path-analysis.md +203 -0
  612. package/knowledge/validation/cross-phase-consistency.md +181 -0
  613. package/knowledge/validation/decision-completeness.md +218 -0
  614. package/knowledge/validation/dependency-validation.md +233 -0
  615. package/knowledge/validation/implementability-review.md +252 -0
  616. package/knowledge/validation/scope-management.md +223 -0
  617. package/knowledge/validation/traceability.md +198 -0
  618. package/methodology/custom-defaults.yml +43 -0
  619. package/methodology/deep.yml +42 -0
  620. package/methodology/mvp.yml +42 -0
  621. package/package.json +58 -0
  622. package/pipeline/architecture/review-architecture.md +44 -0
  623. package/pipeline/architecture/system-architecture.md +45 -0
  624. package/pipeline/decisions/adrs.md +45 -0
  625. package/pipeline/decisions/review-adrs.md +39 -0
  626. package/pipeline/finalization/apply-fixes-and-freeze.md +39 -0
  627. package/pipeline/finalization/developer-onboarding-guide.md +36 -0
  628. package/pipeline/finalization/implementation-playbook.md +45 -0
  629. package/pipeline/modeling/domain-modeling.md +57 -0
  630. package/pipeline/modeling/review-domain-modeling.md +41 -0
  631. package/pipeline/planning/implementation-tasks.md +57 -0
  632. package/pipeline/planning/review-tasks.md +38 -0
  633. package/pipeline/pre/create-prd.md +45 -0
  634. package/pipeline/pre/innovate-prd.md +47 -0
  635. package/pipeline/pre/innovate-user-stories.md +47 -0
  636. package/pipeline/pre/review-prd.md +44 -0
  637. package/pipeline/pre/review-user-stories.md +43 -0
  638. package/pipeline/pre/user-stories.md +48 -0
  639. package/pipeline/quality/operations.md +42 -0
  640. package/pipeline/quality/review-operations.md +37 -0
  641. package/pipeline/quality/review-security.md +40 -0
  642. package/pipeline/quality/review-testing.md +39 -0
  643. package/pipeline/quality/security.md +44 -0
  644. package/pipeline/quality/testing-strategy.md +42 -0
  645. package/pipeline/specification/api-contracts.md +44 -0
  646. package/pipeline/specification/database-schema.md +41 -0
  647. package/pipeline/specification/review-api.md +40 -0
  648. package/pipeline/specification/review-database.md +39 -0
  649. package/pipeline/specification/review-ux.md +38 -0
  650. package/pipeline/specification/ux-spec.md +43 -0
  651. package/pipeline/validation/critical-path-walkthrough.md +37 -0
  652. package/pipeline/validation/cross-phase-consistency.md +35 -0
  653. package/pipeline/validation/decision-completeness.md +36 -0
  654. package/pipeline/validation/dependency-graph-validation.md +36 -0
  655. package/pipeline/validation/implementability-dry-run.md +36 -0
  656. package/pipeline/validation/scope-creep-check.md +38 -0
  657. package/pipeline/validation/traceability-matrix.md +36 -0
@@ -0,0 +1,252 @@
1
+ ---
2
+ name: implementability-review
3
+ description: Dry-running specs as an implementing agent to catch ambiguity and missing detail
4
+ topics: [validation, implementability, ambiguity, agent-readiness, dry-run]
5
+ ---
6
+
7
+ # Implementability Review
8
+
9
+ An implementability review reads every specification as if you were an AI agent about to implement it. For each task, the question is: "Do I have everything I need to start coding right now?" Every question you would need to ask is a gap. Every ambiguity you would need to resolve is a defect. This is the most practical validation — it tests whether the specs actually work for their intended consumer.
10
+
11
+ ## The Implementing Agent Perspective
12
+
13
+ AI agents implementing tasks have specific constraints that make implementability review different from a human code review:
14
+
15
+ 1. **No institutional memory.** The agent knows only what the specifications say. If a convention is "obvious" to the team but not documented, the agent will not follow it.
16
+ 2. **No ability to ask clarifying questions in real-time.** The agent will either guess or stop. Both are bad.
17
+ 3. **Literal interpretation.** If the spec says "handle errors appropriately," the agent has no shared understanding of what "appropriately" means for this project.
18
+ 4. **Context window limits.** The agent may not have all specifications loaded simultaneously. Each task needs enough context to be self-contained or must explicitly reference what to read.
19
+ 5. **No ability to "look at what others did."** Unless the codebase already has examples, the agent cannot infer patterns from existing code.
20
+
21
+ ## What to Check
22
+
23
+ ### 1. Task-Level Completeness
24
+
25
+ For each implementation task, verify:
26
+
27
+ **Inputs are specified:**
28
+ - What files or modules does this task modify or create?
29
+ - What existing code does it depend on?
30
+ - What specifications should the implementer read?
31
+
32
+ **Expected output is clear:**
33
+ - What is the concrete deliverable? (files created, functions implemented, tests passing)
34
+ - How will success be measured?
35
+
36
+ **Scope is bounded:**
37
+ - Is it clear where this task starts and stops?
38
+ - Are there ambiguous boundaries with adjacent tasks?
39
+
40
+ **Dependencies are explicit:**
41
+ - What tasks must be completed before this one can start?
42
+ - What will this task produce that other tasks need?
43
+
44
+ ### 2. Ambiguity Detection
45
+
46
+ Ambiguity is any specification statement that a reasonable implementer could interpret in more than one way.
47
+
48
+ **Common ambiguity patterns:**
49
+
50
+ **Vague adjectives and adverbs:**
51
+ - "The system should be fast" — How fast? Specify latency targets.
52
+ - "Properly validate input" — What validation rules? Which inputs?
53
+ - "Handle errors gracefully" — What does graceful mean? Show error message? Retry? Log and continue?
54
+ - "Securely store passwords" — Which algorithm? What salt length? What cost factor?
55
+
56
+ **Missing specifics:**
57
+ - "Paginate the results" — Page size? Cursor-based or offset-based? Default sort order?
58
+ - "Send a notification" — Via what channel? Email? Push? In-app? What is the message content?
59
+ - "Log the event" — What log level? What fields? What format? Where does it go?
60
+
61
+ **Implicit behavior:**
62
+ - "When the user is not authenticated, redirect to login" — What about API calls? Return 401 or redirect?
63
+ - "Support multiple languages" — Which languages? How are translations managed? What is the fallback?
64
+ - "Cache the results" — For how long? What invalidates the cache? What cache store?
65
+
66
+ **Detection technique:** For each specification statement, ask:
67
+ 1. Could two different developers implement this differently and both believe they followed the spec?
68
+ 2. If yes, the statement is ambiguous.
69
+
70
+ ### 3. Error Case Coverage
71
+
72
+ Error handling is where implementability most often breaks down. For each operation:
73
+
74
+ **Input validation errors:**
75
+ - What happens when required fields are missing?
76
+ - What happens when field values are out of range?
77
+ - What happens when field types are wrong (string instead of number)?
78
+ - What are the specific validation rules and error messages?
79
+
80
+ **Business logic errors:**
81
+ - What happens when a domain invariant would be violated?
82
+ - What happens when a referenced entity does not exist?
83
+ - What happens when the operation is not allowed in the current state?
84
+
85
+ **Infrastructure errors:**
86
+ - What happens when the database is unavailable?
87
+ - What happens when an external service times out?
88
+ - What happens when the disk is full?
89
+
90
+ **Concurrency errors:**
91
+ - What happens when two users modify the same entity simultaneously?
92
+ - What happens when a task is claimed by two agents at the same time?
93
+ - Is optimistic or pessimistic locking specified?
94
+
95
+ **For each error scenario, the spec should define:**
96
+ - The error response format (status code, error body structure)
97
+ - Whether the operation should be retried
98
+ - What the user sees (if user-facing)
99
+ - Whether the error should be logged and at what level
100
+ - Whether an alert should be triggered
101
+
102
+ ### 4. Data Shape Precision
103
+
104
+ For every data structure that crosses a boundary (API request/response, database row, event payload, component props):
105
+
106
+ **Type precision:**
107
+ - Are types specified? (`string` is not enough — is it an email? A UUID? Free text with a max length?)
108
+ - Are optional fields marked? (What is the default when omitted?)
109
+ - Are nullable fields distinguished from optional fields?
110
+ - Are enum values listed exhaustively?
111
+
112
+ **Relationship precision:**
113
+ - Are foreign key relationships clear? (Does the task know which table to join?)
114
+ - Are nested objects or arrays specified? (What is the shape of items in the array?)
115
+ - Are circular references addressed? (How deep does serialization go?)
116
+
117
+ **Format precision:**
118
+ - Date format (ISO 8601? Unix timestamp? Local timezone?)
119
+ - Money format (cents as integer? Decimal string? Object with amount and currency?)
120
+ - ID format (auto-increment integer? UUID v4? ULID? CUID?)
121
+
122
+ ### 5. Pattern and Convention Specification
123
+
124
+ For each task, the implementer needs to know what patterns to follow:
125
+
126
+ **Code organization:**
127
+ - Where do new files go? (Directory structure, naming conventions)
128
+ - What is the module/component pattern? (One class per file? Barrel exports? Index files?)
129
+
130
+ **Error handling pattern:**
131
+ - Do errors propagate as exceptions or as return values?
132
+ - Is there a custom error class hierarchy?
133
+ - Where is error mapping done (at the boundary or in the domain)?
134
+
135
+ **Testing pattern:**
136
+ - What test file naming convention? (`*.test.ts`, `*.spec.ts`, `__tests__/`)
137
+ - What test structure? (describe/it? test()? Separate unit and integration directories?)
138
+ - What mocking approach? (Jest mocks? Dependency injection? Test doubles?)
139
+
140
+ **Logging pattern:**
141
+ - What logger? (console, winston, pino, structured JSON?)
142
+ - What log levels for what events?
143
+ - What contextual fields to include?
144
+
145
+ If these patterns are not in the specification, each agent will invent their own, producing an inconsistent codebase.
146
+
147
+ ## How to Perform the Review
148
+
149
+ ### Role-Play Method
150
+
151
+ For each task in the implementation tasks document:
152
+
153
+ 1. **Read only what the task says to read.** Do not bring in knowledge from other tasks or general experience. The agent will only have what it is told to read.
154
+ 2. **Attempt to write pseudocode.** Try to outline the implementation based solely on the specification.
155
+ 3. **Record every point where you would need to ask a question.** Each question is a gap.
156
+ 4. **Record every point where you would need to make an assumption.** Each assumption should either be confirmed in the spec or documented as a finding.
157
+ 5. **Record every point where you would need to look at existing code for reference.** If the existing code does not yet exist (greenfield), this is a gap.
158
+
159
+ ### Checklist Per Task
160
+
161
+ ```
162
+ Task: [Task ID and title]
163
+
164
+ Information Check:
165
+ - [ ] What to build is clear (not just what area to work in)
166
+ - [ ] Where to put the code is specified (directory, file naming)
167
+ - [ ] What patterns to follow are referenced or documented
168
+ - [ ] Dependencies on other tasks are listed
169
+ - [ ] What "done" looks like is defined (test criteria, acceptance criteria)
170
+
171
+ Ambiguity Check:
172
+ - [ ] No vague adjectives (fast, secure, robust, scalable, appropriate)
173
+ - [ ] No missing specifics (pagination details, error formats, cache TTL)
174
+ - [ ] No implicit behavior (authentication, authorization, logging)
175
+
176
+ Error Case Check:
177
+ - [ ] Input validation errors defined
178
+ - [ ] Business logic errors defined
179
+ - [ ] Infrastructure failure behavior defined
180
+ - [ ] Concurrency behavior defined
181
+
182
+ Data Shape Check:
183
+ - [ ] All data structures have explicit types
184
+ - [ ] Optional and nullable fields distinguished
185
+ - [ ] Enum values listed
186
+ - [ ] Formats specified (dates, money, IDs)
187
+ ```
188
+
189
+ ## Output Format
190
+
191
+ ### Per-Task Findings
192
+
193
+ ```markdown
194
+ ## Task T-015: Implement Order Creation Endpoint
195
+
196
+ **Implementability Score:** 3/5 (Partially implementable — key gaps exist)
197
+
198
+ ### Gaps Found
199
+
200
+ 1. **AMBIGUITY** — Error response format not specified
201
+ - Spec says "return appropriate error" but does not define the error response body structure.
202
+ - Impact: Agent will invent an error format that may be inconsistent with other endpoints.
203
+ - Fix: Add error response schema to API contracts.
204
+
205
+ 2. **MISSING** — Inventory check behavior undefined
206
+ - Spec says "validate inventory" but does not define what happens when inventory is insufficient.
207
+ - Questions: Partial order allowed? Wait-list? Immediate rejection?
208
+ - Fix: Add inventory insufficiency handling to the order creation flow in API contracts.
209
+
210
+ 3. **VAGUE** — "Log the order creation event"
211
+ - What logger? What log level? What fields? What format?
212
+ - Fix: Reference logging conventions in the implementation playbook.
213
+ ```
214
+
215
+ ### Summary Table
216
+
217
+ ```markdown
218
+ | Task | Score | Gaps | Critical | Assessment |
219
+ |------|-------|------|----------|------------|
220
+ | T-012 | 5/5 | 0 | 0 | Ready to implement |
221
+ | T-013 | 4/5 | 2 | 0 | Minor clarifications needed |
222
+ | T-015 | 3/5 | 4 | 1 | Error handling gaps |
223
+ | T-020 | 2/5 | 6 | 3 | Significant rework needed |
224
+ ```
225
+
226
+ ### Scoring Guide
227
+
228
+ - **5/5** — Task is fully implementable. No questions, no assumptions needed.
229
+ - **4/5** — Task is mostly implementable. Minor clarifications needed but an agent could make reasonable assumptions.
230
+ - **3/5** — Task is partially implementable. Some gaps that could lead to incorrect implementation.
231
+ - **2/5** — Task has significant gaps. Agent would need to guess about core behavior.
232
+ - **1/5** — Task is not implementable. Fundamental information is missing.
233
+
234
+ Target: All tasks should score 4/5 or higher before implementation begins.
235
+
236
+ ## Common Findings by Category
237
+
238
+ ### Most Frequently Missing
239
+
240
+ 1. Error response formats (almost always under-specified)
241
+ 2. Logging conventions (almost never specified)
242
+ 3. Input validation rules (specified for happy path, missing for edge cases)
243
+ 4. Concurrency handling (rarely addressed in specs)
244
+ 5. Empty state behavior (what happens when there is no data)
245
+
246
+ ### Most Impactful When Missing
247
+
248
+ 1. Authentication/authorization boundaries (who can call what)
249
+ 2. Data migration and seeding (how does initial data get in)
250
+ 3. Environment configuration (what env vars, what defaults)
251
+ 4. External service integration details (API keys, rate limits, retry policies)
252
+ 5. State machine transitions (valid state changes and their guards)
@@ -0,0 +1,223 @@
1
+ ---
2
+ name: scope-management
3
+ description: Detecting scope creep and ensuring specs stay aligned to PRD boundaries
4
+ topics: [validation, scope, creep, prd-alignment, gold-plating]
5
+ ---
6
+
7
+ # Scope Management
8
+
9
+ Scope management validation compares every specification artifact against the PRD to ensure that the documented system matches what was actually requested. Features that cannot be traced to a PRD requirement are scope creep. Requirements that grew during documentation are scope inflation. Extra polish on non-critical features is gold-plating. This validation catches all three.
10
+
11
+ ## Why Scope Grows
12
+
13
+ Scope grows during the documentation pipeline for understandable reasons — but each growth increases implementation effort, risk, and timeline. Common causes:
14
+
15
+ 1. **Engineering enthusiasm** — Domain modeling reveals interesting patterns, and the team designs for future needs that are not in the PRD.
16
+ 2. **Defensive architecture** — "We should add this abstraction now because it will be hard to add later." Maybe, but if it is not in the PRD, it is scope creep.
17
+ 3. **Completeness bias** — "Every API should have full CRUD" even when the PRD only calls for Create and Read.
18
+ 4. **Platform assumptions** — "All modern apps need real-time notifications" even when the PRD does not mention them.
19
+ 5. **Review-driven growth** — During review phases, reviewers identify gaps that are real but beyond the PRD scope. These gaps are valid observations but should be deferred, not added.
20
+ 6. **Implicit requirements** — "Obviously we need admin tooling" or "of course there is a settings page" — unless the PRD says so, these are not requirements.
21
+
22
+ ## What to Check
23
+
24
+ ### 1. Feature-to-PRD Tracing
25
+
26
+ For every feature, endpoint, screen, or capability in the specifications, verify it traces to a specific PRD requirement.
27
+
28
+ **Process:**
29
+ 1. Build a list of every concrete capability in the specifications:
30
+ - Every API endpoint
31
+ - Every database table
32
+ - Every UI screen or component
33
+ - Every background job or scheduled task
34
+ - Every integration with an external service
35
+ 2. For each capability, find the PRD requirement that justifies it.
36
+ 3. Classify each capability:
37
+ - **Traced** — Maps directly to a PRD requirement.
38
+ - **Supporting** — Does not map to a PRD requirement directly but is necessary infrastructure for a traced capability (e.g., database connection pooling supports all data features).
39
+ - **Creep** — Cannot be traced to any PRD requirement and is not necessary infrastructure.
40
+
41
+ **What findings look like:**
42
+ - "API endpoint `GET /analytics/reports` has no corresponding PRD requirement. The PRD mentions displaying basic stats on the dashboard but does not mention a reports feature."
43
+ - "The `AuditLog` table is not traceable to any PRD requirement. While audit logging is good practice, it is not a v1 requirement."
44
+ - "The UX spec includes an 'Admin Dashboard' with user management, role assignment, and system monitoring. The PRD mentions only a basic admin interface for content moderation."
45
+
46
+ ### 2. Requirement Scope Inflation
47
+
48
+ A requirement starts small in the PRD and grows during documentation. The PRD says "users can search products" — by the time it reaches the API contracts, there is full-text search with faceted filtering, auto-suggest, and search analytics.
49
+
50
+ **Process:**
51
+ 1. For each PRD requirement, compare its original scope (as stated in the PRD) with its implementation scope (as described in later artifacts).
52
+ 2. Look for:
53
+ - Features that are more detailed than the requirement called for.
54
+ - Additional sub-features not mentioned in the requirement.
55
+ - Higher quality targets than the requirement specified.
56
+ - More platforms or device types than the requirement addressed.
57
+
58
+ **Detection heuristics:**
59
+ - Count the API endpoints per PRD feature. A single feature with 10+ endpoints may indicate inflation.
60
+ - Count the database tables per domain entity. An entity with 5+ tables may indicate over-engineering.
61
+ - Compare the PRD's feature description word count to the architecture's implementation description. If the implementation is 10x longer, scope may have inflated.
62
+ - Check for features that only appear after the architecture step that were not in the domain modeling step or the PRD.
63
+
64
+ **What findings look like:**
65
+ - "PRD says 'users can update their profile.' Architecture specifies profile versioning with history, diff view, and rollback capability. This exceeds the PRD requirement."
66
+ - "PRD says 'send email notifications for important events.' Implementation tasks include: email templates engine, unsubscribe management, bounce handling, email analytics, and A/B testing. Only the first two are justified by the PRD."
67
+
68
+ ### 3. Gold-Plating Detection
69
+
70
+ Gold-plating is adding extra polish, features, or capabilities beyond what is needed. Unlike scope creep (adding new features), gold-plating over-engineers existing features.
71
+
72
+ **Indicators of gold-plating:**
73
+ - **Over-abstraction** — Generic plugin systems when only one plugin type exists. Configurable everything when the configuration will never change. Abstract factory patterns when there is only one concrete class.
74
+ - **Premature optimization** — Caching layers for data that is accessed once per session. Database sharding for an application that will have 100 users. CDN configuration for an internal tool.
75
+ - **Excessive error handling** — Circuit breakers and retry policies for services that have 99.99% uptime. Graceful degradation for features that can simply show an error.
76
+ - **Over-documentation** — API endpoints with 50+ response examples. Database schemas with migration scripts for every possible future change.
77
+ - **UI polish beyond requirements** — Animations, micro-interactions, and visual effects for an internal business tool. Dark mode when the PRD does not mention it.
78
+
79
+ **Detection technique:**
80
+ For each specification element, ask: "If I removed this, would any PRD requirement be unmet?" If the answer is no, it is gold-plating.
81
+
82
+ ### 4. Deferred Scope Leaking In
83
+
84
+ The PRD explicitly defers certain features ("out of scope for v1," "future enhancement"). Verify none of these deferred items appear in the specifications.
85
+
86
+ **Process:**
87
+ 1. Extract all explicitly deferred items from the PRD.
88
+ 2. Search all specification artifacts for any reference to deferred items.
89
+ 3. Check for partial implementations — infrastructure for a deferred feature that is "already done" but not needed yet.
90
+
91
+ **What findings look like:**
92
+ - "PRD defers multi-language support to v2, but the database schema has a `locale` column on every content table and the API contracts accept `Accept-Language` headers."
93
+ - "PRD defers mobile app to v2, but the architecture includes a 'Mobile API Gateway' component and the API contracts include mobile-specific endpoints."
94
+
95
+ ### 5. NFR Scope Alignment
96
+
97
+ Non-functional requirements are especially prone to scope creep because they can always be "better."
98
+
99
+ **Process:**
100
+ 1. For each NFR in the PRD, check whether the implementation scope matches the specified target:
101
+ - If PRD says "p95 under 500ms," does the architecture target 100ms?
102
+ - If PRD says "WCAG AA," does the UX spec target WCAG AAA?
103
+ - If PRD says "99.9% uptime," does the operations runbook design for 99.99%?
104
+ 2. Over-specifying NFRs is gold-plating. The implementation effort difference between 99.9% and 99.99% uptime is enormous.
105
+
106
+ ## How to Structure the Audit
107
+
108
+ ### Pass 1: PRD Boundary Extraction
109
+
110
+ Build a definitive list of what is in scope and what is out:
111
+
112
+ ```markdown
113
+ ## In Scope (from PRD)
114
+ 1. User registration and authentication
115
+ 2. Product catalog with search
116
+ 3. Shopping cart
117
+ 4. Checkout with Stripe payment
118
+ 5. Order history
119
+ 6. Basic admin: content moderation
120
+
121
+ ## Explicitly Out of Scope (from PRD)
122
+ 1. Multi-language support (v2)
123
+ 2. Mobile native app (v2)
124
+ 3. Marketplace (third-party sellers) (v2)
125
+ 4. Social features (reviews, ratings) (v2)
126
+ 5. Advanced analytics and reporting (v2)
127
+
128
+ ## NFR Targets (from PRD)
129
+ - Performance: p95 < 500ms for page loads
130
+ - Availability: 99.9% uptime
131
+ - Security: OWASP Top 10 compliance
132
+ - Accessibility: WCAG AA
133
+ - Scale: Support 10,000 concurrent users
134
+ ```
135
+
136
+ ### Pass 2: Artifact Scanning
137
+
138
+ For each specification artifact, list every capability and trace it:
139
+
140
+ ```markdown
141
+ | Capability | Artifact | PRD Requirement | Classification |
142
+ |------------|----------|-----------------|----------------|
143
+ | POST /auth/register | API contracts | User registration | Traced |
144
+ | POST /auth/login | API contracts | User authentication | Traced |
145
+ | GET /auth/sessions | API contracts | — | Creep (session management not in PRD) |
146
+ | users table | Schema | User registration | Traced |
147
+ | user_sessions table | Schema | — | Creep (paired with sessions endpoint) |
148
+ | SearchService with Elasticsearch | Architecture | Product search | Inflation (PRD says search, not full-text search engine) |
149
+ | Notification Service | Architecture | — | Creep |
150
+ | Admin Analytics Dashboard | UX spec | — | Creep (PRD says basic moderation only) |
151
+ ```
152
+
153
+ ### Pass 3: Impact Assessment
154
+
155
+ For each scope finding, assess the impact of keeping vs removing it:
156
+
157
+ ```markdown
158
+ ## Finding: Notification Service
159
+
160
+ **Classification:** Scope creep
161
+ **Effort to implement:** ~3 tasks, ~2 days
162
+ **Impact of keeping:** Adds complexity to architecture, requires email service integration, adds operational burden
163
+ **Impact of removing:** Users would not receive email notifications for order updates — but the PRD does not require this
164
+ **Recommendation:** Defer to v2. Remove from architecture and implementation tasks.
165
+ ```
166
+
167
+ ## Output Format
168
+
169
+ ### Scope Audit Summary
170
+
171
+ ```markdown
172
+ ## Scope Audit Results
173
+
174
+ **Total capabilities identified:** 85
175
+ **Traced to PRD:** 62 (73%)
176
+ **Supporting infrastructure:** 15 (18%)
177
+ **Scope creep:** 5 (6%)
178
+ **Gold-plating:** 3 (4%)
179
+
180
+ ### Scope Creep Items
181
+ 1. Notification Service — recommend defer
182
+ 2. Admin Analytics Dashboard — recommend defer
183
+ 3. User session management API — recommend simplify
184
+ 4. Export to PDF — recommend remove (explicitly deferred in PRD)
185
+ 5. Multi-language database support — recommend remove (explicitly deferred in PRD)
186
+
187
+ ### Gold-Plating Items
188
+ 1. Full-text search with Elasticsearch — PRD says "search," recommend PostgreSQL full-text search
189
+ 2. WCAG AAA compliance — PRD says AA, recommend AA
190
+ 3. 99.99% uptime architecture — PRD says 99.9%, recommend simplifying HA setup
191
+
192
+ ### Scope Inflation Items
193
+ 1. User profile: versioning and rollback added beyond PRD requirement
194
+ 2. Email notifications: template engine, unsubscribe management, analytics added
195
+ 3. Search: faceted filtering, auto-suggest, search analytics added
196
+
197
+ ### Estimated Effort Savings if Scope is Tightened
198
+ - Removing creep: ~8 tasks, ~5 days estimated
199
+ - Fixing gold-plating: ~4 tasks, ~3 days estimated
200
+ - Reducing inflation: ~6 tasks, ~4 days estimated
201
+ - **Total: ~18 tasks, ~12 days estimated savings**
202
+ ```
203
+
204
+ ## Decision Framework
205
+
206
+ Not all scope additions are bad. Some are genuinely necessary even if not in the PRD. Use this framework:
207
+
208
+ | Question | If Yes | If No |
209
+ |----------|--------|-------|
210
+ | Is it required for a PRD feature to work? | Keep (supporting infrastructure) | Continue evaluation |
211
+ | Does the PRD explicitly defer it? | Remove | Continue evaluation |
212
+ | Would a user notice its absence? | Consider keeping, but flag for PRD update | Remove |
213
+ | Does it significantly increase implementation effort? | Remove unless critical | May keep if low effort |
214
+ | Does it add operational complexity? | Remove unless critical | May keep if simple |
215
+
216
+ When in doubt, defer. It is always easier to add a feature later than to remove one that has been built.
217
+
218
+ ## When to Run Scope Validation
219
+
220
+ - After all documentation phases are complete, before the implementation tasks step.
221
+ - After the implementation tasks step, before implementation begins.
222
+ - When the task list feels "too big" — scope validation often reveals why.
223
+ - When stakeholders ask "why is this taking so long?" — scope validation quantifies the answer.
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: traceability
3
+ description: Building traceability matrices from requirements through architecture to implementation tasks
4
+ topics: [validation, traceability, requirements, coverage]
5
+ ---
6
+
7
+ # Traceability
8
+
9
+ Traceability validation ensures that every requirement flows from its origin in the PRD through domain modeling, architecture decisions, system design, and into implementable tasks. A complete traceability matrix is the strongest evidence that nothing has been lost or invented during the documentation pipeline.
10
+
11
+ ## What a Traceability Matrix Is
12
+
13
+ A traceability matrix is a table where each row represents a requirement and each column represents a pipeline artifact. A complete row means the requirement is fully traced from origin to implementation. A missing cell means a gap — either the requirement was not addressed at that phase, or it was addressed but the connection is not explicit.
14
+
15
+ ### The Columns
16
+
17
+ | Column | Source Artifact | What to Extract |
18
+ |--------|----------------|-----------------|
19
+ | **Requirement** | PRD | Feature descriptions, user needs, NFRs, constraints |
20
+ | **Domain Concept** | Domain Model | Which entities, aggregates, events, or invariants relate to this requirement |
21
+ | **Decision** | ADRs | Which architectural decisions were made to support this requirement |
22
+ | **Architecture** | System Architecture | Which components, modules, or services implement this requirement |
23
+ | **Data** | Database Schema | Which tables, columns, or indexes support this requirement |
24
+ | **API** | API Contracts | Which endpoints or operations expose this requirement |
25
+ | **UX** | UX Specification | Which screens, flows, or components deliver this requirement to users |
26
+ | **Task** | Implementation Tasks | Which tasks implement this requirement |
27
+ | **Test** | Testing Strategy | Which test cases verify this requirement |
28
+
29
+ Not every requirement needs every column. A backend NFR like "p95 latency under 200ms" will not have a UX column. A database requirement will not have a UX column. The matrix should indicate "N/A" for legitimately inapplicable cells versus blank for gaps.
30
+
31
+ ## How to Build the Matrix
32
+
33
+ ### Step 1: Extract Requirements from PRD
34
+
35
+ Read the PRD and extract every discrete requirement. Include:
36
+
37
+ - **Functional requirements** — Features, user stories, acceptance criteria.
38
+ - **Non-functional requirements** — Performance, security, scalability, accessibility, availability.
39
+ - **Constraints** — Technology mandates, timeline, budget, regulatory.
40
+ - **Deferred items** — Requirements explicitly marked as out of scope or deferred. Track these too — they should NOT appear in downstream artifacts.
41
+
42
+ Give each requirement a unique identifier (e.g., `REQ-001`). If the PRD does not number them, assign them during extraction.
43
+
44
+ ### Step 2: Trace Each Requirement Forward
45
+
46
+ For each requirement, search downstream artifacts for references:
47
+
48
+ 1. **Domain Model:** Which domain concepts address this requirement? Look for entities that model the data, events that represent state changes, invariants that enforce rules.
49
+
50
+ 2. **ADRs:** Which decisions were driven by this requirement? Technology choices, pattern selections, trade-off resolutions.
51
+
52
+ 3. **Architecture:** Which component or module is responsible? Where does this requirement live in the system structure?
53
+
54
+ 4. **Database Schema:** Which tables store the data? Which indexes support the queries? Which constraints enforce the rules?
55
+
56
+ 5. **API Contracts:** Which endpoints expose the functionality? Which request/response shapes carry the data?
57
+
58
+ 6. **UX Spec:** Which screens display the information? Which user flows exercise the feature? Which form inputs capture the data?
59
+
60
+ 7. **Tasks:** Which implementation tasks build this feature? Are all layers covered (backend, frontend, infrastructure)?
61
+
62
+ 8. **Tests:** Which test cases verify the requirement works correctly? Are edge cases covered?
63
+
64
+ ### Step 3: Identify Gaps
65
+
66
+ After building the matrix, scan for:
67
+
68
+ - **Empty cells (not N/A)** — A requirement that reaches architecture but has no tasks is a gap. A requirement with tasks but no tests is a gap.
69
+ - **Orphaned artifacts** — Artifacts that trace to no requirement. These may indicate scope creep (see scope-management knowledge base) or missing PRD entries.
70
+ - **Thin traces** — A requirement that has only one task and one test for a complex feature. The trace exists but is insufficient.
71
+ - **Deferred items appearing downstream** — Requirements marked as deferred in the PRD but implemented in architecture or tasks.
72
+
73
+ ### Step 4: Handle Missing Cells
74
+
75
+ For each gap, determine the appropriate action:
76
+
77
+ | Gap Type | Likely Action |
78
+ |----------|---------------|
79
+ | Requirement has no domain concept | Add to domain model or confirm it is a cross-cutting concern |
80
+ | Requirement has no ADR | Verify no decision was needed, or create an ADR |
81
+ | Requirement has no architecture component | Add component or map to existing component |
82
+ | Requirement has no schema support | Add schema elements (if requirement involves data persistence) |
83
+ | Requirement has no API endpoint | Add endpoint (if requirement involves external interface) |
84
+ | Requirement has no UX | Add UX elements (if requirement is user-facing) |
85
+ | Requirement has no tasks | Create tasks to implement it |
86
+ | Requirement has no tests | Add test cases |
87
+ | Artifact has no requirement | Flag as potential scope creep or identify missing PRD requirement |
88
+
89
+ ## Matrix Format
90
+
91
+ ### Compact Format (for overview)
92
+
93
+ ```markdown
94
+ | Req ID | Requirement | Domain | ADR | Arch | DB | API | UX | Task | Test |
95
+ |--------|-------------|--------|-----|------|----|-----|----|------|------|
96
+ | REQ-001 | User registration | User entity | ADR-003 | AuthService | users | POST /auth/register | SignUp flow | T-012 | TS-001 |
97
+ | REQ-002 | Password reset | User.resetToken | ADR-003 | AuthService | users.reset_token | POST /auth/reset | Reset flow | T-015 | TS-002 |
98
+ | REQ-003 | p95 < 200ms | — | ADR-008 | CDN + caching | indexes | — | — | T-050 | TS-040 |
99
+ | REQ-004 | (deferred) Export PDF | — | — | — | — | — | — | — | — |
100
+ ```
101
+
102
+ ### Detailed Format (for gap investigation)
103
+
104
+ ```markdown
105
+ ## REQ-001: User Registration
106
+
107
+ **PRD Source:** Section 3.1, "Users must be able to create accounts with email and password"
108
+
109
+ **Domain Model Trace:**
110
+ - Entity: `User` (email, passwordHash, createdAt)
111
+ - Invariant: email must be unique
112
+ - Event: `UserRegistered`
113
+
114
+ **ADR Trace:**
115
+ - ADR-003: Use bcrypt for password hashing (cost factor 12)
116
+
117
+ **Architecture Trace:**
118
+ - Component: `AuthService` handles registration
119
+ - Data Flow: Client → API Gateway → AuthService → UserRepository → Database
120
+
121
+ **Schema Trace:**
122
+ - Table: `users` (id, email, password_hash, created_at)
123
+ - Index: `idx_users_email` UNIQUE
124
+ - Constraint: NOT NULL on email, password_hash
125
+
126
+ **API Trace:**
127
+ - POST /auth/register — request: {email, password}, response: {user, token}
128
+ - Error: 409 Conflict if email exists
129
+
130
+ **UX Trace:**
131
+ - Screen: SignUp (email input, password input, confirm password, submit)
132
+ - Flow: SignUp → Email Verification → Dashboard
133
+ - Validation: client-side email format, password strength
134
+
135
+ **Task Trace:**
136
+ - T-012: Implement user registration endpoint
137
+ - T-013: Build sign-up form component
138
+ - T-014: Add email verification flow
139
+
140
+ **Test Trace:**
141
+ - TS-001: Unit test — registration with valid data
142
+ - TS-002: Unit test — duplicate email rejection
143
+ - TS-003: Integration test — full registration flow
144
+ - TS-004: E2E test — sign up from UI
145
+ ```
146
+
147
+ ## Traceability for Non-Functional Requirements
148
+
149
+ NFRs require special tracing because they often cut across multiple components rather than mapping cleanly to a single feature.
150
+
151
+ ### Performance Requirements
152
+
153
+ Trace through: ADR (caching strategy, database choice) → Architecture (caching layers, CDN, connection pooling) → Schema (indexes, query optimization) → API (pagination, rate limiting) → Testing (load tests, benchmarks).
154
+
155
+ ### Security Requirements
156
+
157
+ Trace through: ADR (auth strategy, encryption) → Architecture (security boundaries, auth service) → Schema (encrypted columns, audit tables) → API (auth headers, CORS, rate limits) → Testing (penetration tests, auth tests) → UX (CSRF tokens, secure forms).
158
+
159
+ ### Accessibility Requirements
160
+
161
+ Trace through: ADR (WCAG level target) → UX (ARIA labels, keyboard navigation, screen reader support, color contrast) → Testing (accessibility audits, screen reader tests).
162
+
163
+ ## Common Issues Found During Traceability
164
+
165
+ 1. **The "orphan feature" pattern** — Tasks exist for features that are not in the PRD. Often introduced during architecture when engineers think of improvements. Must be either added to PRD (with stakeholder approval) or removed from tasks.
166
+
167
+ 2. **The "assumed infrastructure" pattern** — Architecture assumes infrastructure (Redis, message queue, CDN) that has no ADR, no tasks, and no operational runbook entry. The requirement is implicit.
168
+
169
+ 3. **The "tested but not specified" pattern** — Test cases exist for behaviors that are not documented in any specification. Often indicates tacit knowledge that should be made explicit.
170
+
171
+ 4. **The "specified but not tested" pattern** — Requirements with full implementation traces but no test coverage. Especially common for error cases and NFRs.
172
+
173
+ 5. **The "split requirement" pattern** — A single PRD requirement maps to tasks across multiple phases that are not linked to each other. If one task is cut, the feature is half-built.
174
+
175
+ ## Bidirectional Tracing
176
+
177
+ The matrix should be walkable in both directions:
178
+
179
+ - **Forward (requirement → implementation):** Start from a PRD requirement, verify it has complete downstream coverage.
180
+ - **Backward (implementation → requirement):** Start from a task or test, verify it traces back to a PRD requirement.
181
+
182
+ Backward tracing catches scope creep — artifacts that exist without a requirement justification. Forward tracing catches gaps — requirements without implementation.
183
+
184
+ ## Tooling Considerations
185
+
186
+ For the pipeline context, the traceability matrix is a markdown document. Key practices:
187
+
188
+ - Use consistent identifiers (REQ-001, ADR-003, T-012) so traces are searchable.
189
+ - Cross-reference identifiers rather than duplicating content.
190
+ - Update the matrix when any artifact changes — it is a living document until docs are frozen.
191
+ - During validation, the matrix is the primary output. During finalization, it should be complete.
192
+
193
+ ## When to Use Traceability Validation
194
+
195
+ - After all pipeline phases are complete, before finalization.
196
+ - When a significant change is made to any artifact (re-run affected rows).
197
+ - When stakeholders ask "is feature X covered?" — the matrix answers immediately.
198
+ - When prioritizing cuts — the matrix shows what is affected if a requirement is deferred.