@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,235 @@
1
+ ---
2
+ name: review-prd
3
+ description: Failure modes and review passes specific to product requirements document artifacts
4
+ topics: [review, prd, requirements, completeness, clarity, nfr, constraints]
5
+ ---
6
+
7
+ # Review: Product Requirements Document
8
+
9
+ The PRD is the foundation of the entire pipeline. Every subsequent phase builds on it — user stories, domain models, architecture, implementation tasks. A gap or error here compounds through everything downstream. This review uses 8 passes targeting the specific ways PRD artifacts fail.
10
+
11
+ Follows the review process defined in `review-methodology.md`.
12
+
13
+ ---
14
+
15
+ ## Pass 1: Problem Statement Rigor
16
+
17
+ ### What to Check
18
+
19
+ - Is the problem specific, testable, grounded in observable reality?
20
+ - Has quantitative evidence where available?
21
+ - Doesn't prescribe solutions?
22
+ - Names a specific user group, not "users" or "everyone"?
23
+
24
+ ### Why This Matters
25
+
26
+ The problem statement anchors every decision in the pipeline. If it prescribes a solution instead of describing a pain point, the entire product is built to validate a predetermined answer rather than solve a real problem. Vague problem statements produce vague requirements, which produce vague stories, which produce implementations that technically work but don't solve anything. A problem statement that names "users" instead of a specific group gives no signal about whose needs to prioritize when trade-offs arise.
27
+
28
+ ### How to Check
29
+
30
+ 1. Read the problem statement in isolation — does it describe an observable user pain point?
31
+ 2. Check for solution language ("we need to build," "we should use," "modernize our stack") — these prescribe solutions, not problems
32
+ 3. Check for a named, specific user group — not "users," "everyone," or "stakeholders"
33
+ 4. Look for quantitative evidence (hours wasted, error rates, revenue lost, support tickets) — if none exists, flag it
34
+ 5. Verify the problem is testable — could you measure whether it's been solved?
35
+
36
+ ### What a Finding Looks Like
37
+
38
+ - P0: "Problem statement is 'We need to modernize our technology stack' — this prescribes a solution, not a problem. No user-facing pain point identified."
39
+ - P1: "Problem statement names 'small business owners' but provides no quantitative evidence of the pain. How many hours wasted? What error rate?"
40
+
41
+ ---
42
+
43
+ ## Pass 2: Persona & Stakeholder Coverage
44
+
45
+ ### What to Check
46
+
47
+ - Are personas goal-driven with constraints, current behavior, and success criteria?
48
+ - Every stakeholder group represented (end users, admins, support, integrators)?
49
+ - No "Everything User" anti-pattern (contradictory persona)?
50
+ - 2-4 meaningful personas (>6 suggests scope too broad, 1 suggests missing secondary users)?
51
+
52
+ ### Why This Matters
53
+
54
+ Personas become story actors. If a persona is just a role label ("Admin") with no goals, constraints, or context, stories attributed to that persona are ungrounded — the agent writing them has to invent motivations. Missing stakeholder groups mean entire user journeys have no stories. The "Everything User" anti-pattern (a single persona who is both a power user and a beginner, both technical and non-technical) makes prioritization impossible because every feature is equally important to the same persona.
55
+
56
+ ### How to Check
57
+
58
+ 1. List every persona defined in the PRD
59
+ 2. For each persona, check for: specific goals, constraints, current behavior, and success criteria
60
+ 3. Count personas — fewer than 2 usually means secondary users are missing; more than 6 usually means scope is too broad
61
+ 4. Check for contradictions within a single persona (wants simplicity AND power-user features)
62
+ 5. List stakeholder groups that interact with the system (end users, admins, support, integrators, billing) and verify each has a persona or is explicitly out of scope
63
+ 6. Check that persona descriptions include enough context to write stories — not just "Admin: manages the system"
64
+
65
+ ### What a Finding Looks Like
66
+
67
+ - P0: "PRD defines a single persona 'User' with no goals, constraints, or context. Cannot write stories — no actor to attribute them to."
68
+ - P1: "PRD describes end user and admin but no mention of support staff, who handle 200+ tickets/week per the problem statement."
69
+
70
+ ---
71
+
72
+ ## Pass 3: Feature Scoping Completeness
73
+
74
+ ### What to Check
75
+
76
+ - In-scope, out-of-scope, and deferred lists all present?
77
+ - Features specific enough to estimate (not "user management" or "analytics")?
78
+ - Prioritization applied (MoSCoW or equivalent)?
79
+ - No "requirements as solutions" (PRD says WHAT, not HOW)?
80
+
81
+ ### Why This Matters
82
+
83
+ Missing scope boundaries cause the most expensive downstream failures. Without an out-of-scope list, implementing agents may build features the product team never intended. Without a deferred list, features that should wait for v2 get built into v1, expanding scope and timeline. Vague feature descriptions ("user management") are impossible to decompose into stories — two different agents would build completely different things. Technical prescriptions ("use React and PostgreSQL") in the PRD constrain architecture before the architecture phase has run.
84
+
85
+ ### How to Check
86
+
87
+ 1. Verify three lists exist: in-scope, out-of-scope, and deferred
88
+ 2. For each in-scope feature, check specificity — could two different people reading this description agree on what to build?
89
+ 3. Check for prioritization (MoSCoW, P0-P3, or equivalent) — if all features are "must-have," prioritization hasn't happened
90
+ 4. Scan for technical prescriptions — the PRD should say WHAT the product does, not HOW it's built
91
+ 5. Check that feature descriptions describe user-facing behavior, not implementation details
92
+
93
+ ### What a Finding Looks Like
94
+
95
+ - P0: "No out-of-scope section exists. 'Product management' is listed as a feature with no further detail — could mean anything from a product catalog to a full PIM system."
96
+ - P1: "Feature 'notifications' doesn't specify channel (push? email? in-app? all three?) — two engineers would build different things."
97
+
98
+ ---
99
+
100
+ ## Pass 4: Success Criteria Measurability
101
+
102
+ ### What to Check
103
+
104
+ - Every criterion has a target value AND a measurement method?
105
+ - Criteria tied to the problem statement (not generic "revenue increases")?
106
+ - Types covered: user behavior, business metrics, technical metrics, adoption?
107
+
108
+ ### Why This Matters
109
+
110
+ Success criteria that can't be measured can't be verified. "Users are satisfied" is not a success criterion — it's a hope. Without target values, any movement in the right direction technically satisfies the criterion. Without measurement methods, the team can't verify success even if they achieve it. Criteria disconnected from the problem statement indicate the PRD has drifted from its original purpose.
111
+
112
+ ### How to Check
113
+
114
+ 1. List every success criterion in the PRD
115
+ 2. For each, check for a specific target value (a number, a percentage, a threshold)
116
+ 3. For each, check for a measurement method (how will this be measured? what tool or process?)
117
+ 4. Trace each criterion back to the problem statement — does it measure whether the problem is solved?
118
+ 5. Check coverage across types: user behavior metrics, business metrics, technical metrics, adoption metrics — if only one type is present, the others are likely missing
119
+ 6. Flag criteria that are generic ("increase user satisfaction") rather than specific ("reduce checkout abandonment from 72% to 45%")
120
+
121
+ ### What a Finding Looks Like
122
+
123
+ - P0: "Only success criterion is 'users are satisfied with the product' — no target value, no measurement method, not tied to problem statement."
124
+ - P1: "Success criterion 'checkout abandonment decreases' has no target value. Decrease from 72% to 71% would technically satisfy it."
125
+
126
+ ---
127
+
128
+ ## Pass 5: NFR Quantification
129
+
130
+ ### What to Check
131
+
132
+ - All NFR categories addressed: performance, scalability, availability, security, accessibility, data retention, i18n, browser/device support, monitoring?
133
+ - Quantified with numbers, not adjectives ("p95 under 200ms" not "fast")?
134
+ - Conditions specified (under what load, on what connection)?
135
+
136
+ ### Why This Matters
137
+
138
+ Missing or vague NFRs force implementing agents to make arbitrary decisions about performance, security, and reliability. "The system should be fast" means something different to every engineer. Without quantified targets and conditions, the architecture phase has no constraints to design against, and the testing phase has no thresholds to verify. NFR gaps discovered during implementation are orders of magnitude more expensive to fix than NFR gaps caught during PRD review.
139
+
140
+ ### How to Check
141
+
142
+ 1. Check each NFR category: performance, scalability, availability, security, accessibility, data retention, i18n, browser/device support, monitoring
143
+ 2. For each category present, verify quantification — numbers, not adjectives
144
+ 3. For performance NFRs, check for conditions: under what load? on what hardware? at what percentile?
145
+ 4. For availability NFRs, check for specifics: what's the target uptime? what's the maximum acceptable downtime window?
146
+ 5. For security NFRs, check for compliance standards (SOC 2, GDPR, PCI DSS) where applicable
147
+ 6. Flag any NFR category that's completely absent
148
+
149
+ ### What a Finding Looks Like
150
+
151
+ - P0: "No NFRs specified at all. Implementing agents will make arbitrary performance and security decisions."
152
+ - P1: "Performance requirement says 'the system should be fast' — no response time targets, no percentile, no load conditions."
153
+
154
+ ---
155
+
156
+ ## Pass 6: Constraint & Dependency Documentation
157
+
158
+ ### What to Check
159
+
160
+ - Technical, timeline, budget, team, and regulatory constraints present?
161
+ - Each constraint traceable to downstream architectural impact?
162
+ - External integrations identified with API limitations, costs, rate limits?
163
+
164
+ ### Why This Matters
165
+
166
+ Undocumented constraints surface as surprises during implementation. A Stripe integration without PCI DSS compliance noted will derail the architecture phase. A team constraint of 3 developers without connection to scope decisions means the plan may be unachievable. Regulatory constraints discovered late can require fundamental redesigns. Every constraint should be visible to downstream phases so they can design around it rather than into it.
167
+
168
+ ### How to Check
169
+
170
+ 1. Check each constraint category: technical, timeline, budget, team size/skills, regulatory/compliance
171
+ 2. For each constraint, trace the downstream impact — how does this affect architecture, implementation, or testing?
172
+ 3. List all external integrations mentioned in the PRD
173
+ 4. For each integration, check for: API limitations, costs, rate limits, authentication requirements, compliance requirements
174
+ 5. Flag constraints that are stated but not connected to decisions — "we have 3 developers" without scope implications
175
+
176
+ ### What a Finding Looks Like
177
+
178
+ - P1: "PRD mentions Stripe integration but doesn't note PCI DSS compliance requirement — this will surface as a surprise during architecture."
179
+ - P2: "Team constraint '3 developers' is stated but not connected to scope decisions — are all features achievable with this team size?"
180
+
181
+ ---
182
+
183
+ ## Pass 7: Error & Edge Case Coverage
184
+
185
+ ### What to Check
186
+
187
+ - Sad paths addressed for every feature with user input or external dependencies?
188
+ - Session expiry, network failure, concurrent access scenarios considered?
189
+ - Failure modes for third-party integrations documented?
190
+
191
+ ### Why This Matters
192
+
193
+ Happy-path-only PRDs produce happy-path-only implementations. When the PRD doesn't describe what happens when a payment fails, the implementing agent either guesses (producing inconsistent error handling) or ignores it (producing a broken user experience). Edge cases in user input, network conditions, and third-party integrations are where most production bugs live. Documenting them in the PRD ensures they flow into stories, acceptance criteria, and test cases.
194
+
195
+ ### How to Check
196
+
197
+ 1. For each feature involving user input, check: what happens with invalid input? empty input? malicious input?
198
+ 2. For each feature involving external dependencies, check: what happens when the dependency is unavailable? slow? returns unexpected data?
199
+ 3. Check for session-related scenarios: session expiry mid-action, concurrent access from multiple devices, browser back button during multi-step flows
200
+ 4. Check for data-related edge cases: duplicate submissions, race conditions, large data volumes
201
+ 5. For each third-party integration, check: failure modes documented? retry logic specified? fallback behavior defined?
202
+
203
+ ### What a Finding Looks Like
204
+
205
+ - P1: "Checkout flow describes the happy path but never addresses: payment failure, session expiry mid-checkout, network drop during payment processing."
206
+ - P2: "User profile edit doesn't address concurrent edit scenario — what if user edits on two devices simultaneously?"
207
+
208
+ ---
209
+
210
+ ## Pass 8: Downstream Readiness for User Stories
211
+
212
+ ### What to Check
213
+
214
+ - Can stories be written from this PRD without guesswork?
215
+ - Features specific enough to map to stories (one feature = one or more stories)?
216
+ - Personas specific enough to be story actors?
217
+ - Business rules explicit enough to become acceptance criteria?
218
+ - Error scenarios detailed enough to become negative test scenarios?
219
+
220
+ ### Why This Matters
221
+
222
+ The PRD's primary consumer is the user stories phase. If features are too vague to decompose into stories, the story-writing agent must invent requirements — and its inventions may not match the product team's intent. Personas that are just role labels can't be story actors. Business rules that are implied but not stated produce acceptance criteria that are guesses rather than specifications. This pass is the final gate before the PRD leaves the pre-pipeline and enters the main pipeline.
223
+
224
+ ### How to Check
225
+
226
+ 1. Select 3-5 representative features from different areas of the PRD
227
+ 2. For each, attempt to write a story title ("As a [persona], I want to [action] so that [benefit]") — if you can't fill in the blanks, the feature or persona is too vague
228
+ 3. For each, attempt to write 2-3 acceptance criteria from the PRD description alone — if you have to guess at business rules, they're not explicit enough
229
+ 4. Check that error scenarios in the PRD are detailed enough to become "Given [error condition], When [user action], Then [expected behavior]" acceptance criteria
230
+ 5. Verify that the mapping from features to stories would be roughly 1:N (one feature produces one or more stories) — if a feature maps to zero stories, it's too vague; if it maps to 20+, it should have been decomposed in the PRD
231
+
232
+ ### What a Finding Looks Like
233
+
234
+ - P0: "Feature 'user management' cannot be decomposed into stories — what operations? What user types? What permissions model?"
235
+ - P1: "Business rules for discount application are implied but not stated — story acceptance criteria will have to guess at validation logic."
@@ -0,0 +1,213 @@
1
+ ---
2
+ name: review-security
3
+ description: Failure modes and review passes specific to security review and documentation artifacts
4
+ topics: [review, security, owasp, auth, threat-modeling]
5
+ ---
6
+
7
+ # Review: Security
8
+
9
+ The security review document assesses the system's security posture across authentication, authorization, data protection, and vulnerability management. It must address the OWASP top 10 for the project's technology stack, align security boundaries with API contracts and architecture, and ensure secrets management and dependency auditing are actionable. This review uses 7 passes targeting the specific ways security reviewation fails.
10
+
11
+ Follows the review process defined in `review-methodology.md`.
12
+
13
+ ---
14
+
15
+ ## Pass 1: OWASP Coverage
16
+
17
+ ### What to Check
18
+
19
+ Each OWASP Top 10 category is addressed for this specific project. The assessment is project-specific (not generic), identifying which categories are relevant, what the project's exposure is, and what mitigations are in place or planned.
20
+
21
+ ### Why This Matters
22
+
23
+ The OWASP Top 10 represents the most common and impactful web application security risks. Skipping a category does not mean the risk does not exist — it means the risk is unassessed. Generic OWASP checklists that say "use parameterized queries" without connecting to the project's actual database layer provide false security confidence.
24
+
25
+ ### How to Check
26
+
27
+ 1. Verify all 10 OWASP categories are addressed (Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Vulnerable Components, Identity/Auth Failures, Data Integrity Failures, Logging Failures, SSRF)
28
+ 2. For each category, check that the assessment is project-specific: which components are affected? What is the attack surface?
29
+ 3. Verify that mitigations reference specific architecture components, not generic advice ("use an ORM" vs. "the OrderRepository uses Prisma with parameterized queries by default")
30
+ 4. Check for categories marked "not applicable" — is the rationale valid? (SSRF is not applicable only if the system never fetches external URLs)
31
+ 5. Verify that mitigations for high-risk categories (Broken Access Control, Injection) are detailed and actionable
32
+ 6. Check for OWASP categories beyond the Top 10 if the project has specific risk profiles (API security, mobile security, serverless security)
33
+
34
+ ### What a Finding Looks Like
35
+
36
+ - P0: "Injection category says 'mitigated by using an ORM' but the system also has raw SQL queries in the reporting module. The mitigation is incomplete."
37
+ - P0: "Broken Access Control category is marked 'mitigated' but the API contracts show several endpoints with no authorization specification (see API review Pass 3). The mitigation claim is unverified."
38
+ - P1: "Cryptographic Failures category says 'use HTTPS' but does not address data encryption at rest, password hashing algorithm, or token generation security."
39
+ - P2: "Security Misconfiguration category provides generic advice. Should reference the project's specific infrastructure (Docker, Kubernetes, cloud provider) and their configuration risks."
40
+
41
+ ---
42
+
43
+ ## Pass 2: Auth/AuthZ Boundary Alignment
44
+
45
+ ### What to Check
46
+
47
+ Security boundaries (who can access what) align with the API contract's authentication and authorization requirements and the architecture's component boundaries. No access control gaps exist between what the security review specifies and what the API contract enforces.
48
+
49
+ ### Why This Matters
50
+
51
+ Security boundaries that do not match API contracts mean either the API has endpoints with weaker access control than the security review intends, or the security review assumes protections that the API does not implement. Either way, the gap creates a vulnerability. This pass cross-references the security review with the API contract — it is a consistency check between two artifacts.
52
+
53
+ ### How to Check
54
+
55
+ 1. List every security boundary defined in the security review (user roles, permission levels, resource ownership rules, service-to-service trust)
56
+ 2. For each API endpoint, verify its auth/authz requirement aligns with the security review's boundary definition
57
+ 3. Check for endpoints that the security review does not cover — are they intentionally public or accidentally unprotected?
58
+ 4. Verify that resource-level authorization (user A cannot access user B's data) is specified in both documents consistently
59
+ 5. Check that service-to-service authentication matches: does the security review and the architecture agree on how services authenticate to each other?
60
+ 6. Verify that admin/elevated-privilege endpoints have additional protections specified in both documents
61
+
62
+ ### What a Finding Looks Like
63
+
64
+ - P0: "Security document defines role-based access with 'admin' and 'user' roles, but API contract endpoint DELETE /users/{id} has no authorization specification. Can a 'user' role delete other users?"
65
+ - P1: "Security document specifies 'users can only access their own orders' but API contract GET /orders does not mention user-scoping. The endpoint may return all orders regardless of the requesting user."
66
+ - P1: "Service-to-service communication is marked as 'internal, trusted' in the security review but the architecture shows services communicating over the public internet without mTLS."
67
+ - P2: "Security document and API contract both specify auth requirements, but they use different terminology ('role: admin' vs. 'permission: manage_users'). Align the language."
68
+
69
+ ---
70
+
71
+ ## Pass 3: Secrets Management
72
+
73
+ ### What to Check
74
+
75
+ No secrets are stored in code, version control, or plain-text configuration. A rotation strategy exists. Vault or secrets manager integration is specified.
76
+
77
+ ### Why This Matters
78
+
79
+ Secrets in code or version control are the most common source of security breaches. A single API key committed to a public repository can compromise an entire production system within hours (automated scanners harvest secrets from public repos). Secrets management is not optional — it is a prerequisite for any production system.
80
+
81
+ ### How to Check
82
+
83
+ 1. Verify that the security review explicitly states: no secrets in code or version control
84
+ 2. Check for a secrets management approach: environment variables, vault (HashiCorp Vault, AWS Secrets Manager, etc.), encrypted configuration
85
+ 3. Verify that secrets rotation strategy is documented: how often are secrets rotated? What is the process?
86
+ 4. Check for secrets categories: API keys, database credentials, JWT signing keys, encryption keys, service account tokens — is each category addressed?
87
+ 5. Verify that local development secrets handling is specified: do developers use a .env file? Is it gitignored? Is there a secrets template?
88
+ 6. Check for emergency rotation: what happens when a secret is suspected compromised? What is the process?
89
+ 7. Verify that CI/CD secrets are addressed: how does the deployment pipeline access production secrets?
90
+
91
+ ### What a Finding Looks Like
92
+
93
+ - P0: "No secrets management strategy exists. The security review does not address how secrets are stored, accessed, or rotated."
94
+ - P0: "Security document says 'secrets in environment variables' but does not specify how environment variables are populated in production. If they are in a plain-text config file on the server, that is not secrets management."
95
+ - P1: "Secrets rotation is mentioned as 'periodic' without specifying the rotation period or process. When the JWT signing key is rotated, what happens to existing tokens?"
96
+ - P2: "Local development uses a .env file but no .env.example template exists for new developers. They may create secrets with insecure defaults."
97
+
98
+ ---
99
+
100
+ ## Pass 4: Dependency Audit Coverage
101
+
102
+ ### What to Check
103
+
104
+ Known vulnerability scanning is integrated into the CI pipeline. The dependency audit strategy covers direct and transitive dependencies. A policy exists for responding to discovered vulnerabilities.
105
+
106
+ ### Why This Matters
107
+
108
+ Third-party dependencies are a major attack surface. A single vulnerable dependency (Log4Shell, for example) can compromise the entire system. Dependency auditing must be continuous (not one-time) and integrated into CI (not a manual process), because new vulnerabilities are discovered daily and dependencies change with every build.
109
+
110
+ ### How to Check
111
+
112
+ 1. Verify a dependency scanning tool is specified (npm audit, Snyk, Dependabot, Trivy, etc.)
113
+ 2. Check that scanning runs automatically in CI — not just available locally
114
+ 3. Verify that the scanning covers transitive dependencies (not just direct dependencies)
115
+ 4. Check for a vulnerability response policy: severity thresholds (block on critical/high, warn on medium), response time expectations (critical: 24h, high: 1 week), exception process
116
+ 5. Verify that container image scanning is included if the project uses containers
117
+ 6. Check for license compliance scanning if relevant (some licenses are incompatible with commercial use)
118
+ 7. Verify that the dependency audit covers all package ecosystems in the project (npm, pip, go modules, etc.)
119
+
120
+ ### What a Finding Looks Like
121
+
122
+ - P0: "No dependency scanning tool or process is specified. The project has 500+ npm dependencies and no way to detect known vulnerabilities."
123
+ - P1: "Dependency scanning runs locally with 'npm audit' but is not integrated into CI. Vulnerabilities discovered locally may not block deployments."
124
+ - P1: "Scanning covers npm dependencies but the project also has Python dependencies (for data processing) that are not scanned."
125
+ - P2: "Vulnerability response policy does not specify exception process. What if a critical vulnerability has no fix available? Is there a documented workaround/mitigation path?"
126
+
127
+ ---
128
+
129
+ ## Pass 5: Threat Model Scenarios
130
+
131
+ ### What to Check
132
+
133
+ Threats are identified for all trust boundaries in the system. The threat model uses a structured approach (STRIDE, PASTA, or similar) and covers realistic attack scenarios specific to this project.
134
+
135
+ ### Why This Matters
136
+
137
+ A threat model that says "attackers may try to compromise the system" is not a threat model — it is a statement of the obvious. Useful threat models identify specific trust boundaries (user-to-API, service-to-service, service-to-database), enumerate realistic threats at each boundary, and map them to mitigations. Without specific threat scenarios, security investments are based on intuition rather than risk analysis.
138
+
139
+ ### How to Check
140
+
141
+ 1. Verify a threat modeling methodology is stated (STRIDE, PASTA, attack trees, or custom)
142
+ 2. List all trust boundaries from the architecture: client-to-server, service-to-service, service-to-database, service-to-external-API
143
+ 3. For each trust boundary, verify threats are enumerated
144
+ 4. Check that threats are specific: "SQL injection via the search parameter on GET /products" not "injection attacks"
145
+ 5. Verify that each threat has a likelihood and impact assessment
146
+ 6. Check that mitigations are mapped to threats: which mitigation addresses which threat?
147
+ 7. Verify that residual risk is documented: threats with no mitigation or partial mitigation
148
+ 8. Check for insider threat scenarios: what if a developer, admin, or service account is compromised?
149
+
150
+ ### What a Finding Looks Like
151
+
152
+ - P0: "No threat model exists. The security review discusses mitigations but has not identified what threats those mitigations are defending against."
153
+ - P1: "Threat model covers client-to-server boundary but ignores service-to-service trust boundaries. Internal services communicate without authentication — an attacker who compromises one service has unrestricted access to all others."
154
+ - P1: "Threat model identifies threats but does not map them to mitigations. It is unclear whether identified threats are mitigated, partially mitigated, or accepted risks."
155
+ - P2: "Insider threat is not addressed. What happens if a developer's machine is compromised and their credentials are stolen?"
156
+
157
+ ---
158
+
159
+ ## Pass 6: Data Classification
160
+
161
+ ### What to Check
162
+
163
+ Data is categorized by sensitivity level. Handling requirements are specified for each category. Data flows map to classification levels.
164
+
165
+ ### Why This Matters
166
+
167
+ Not all data requires the same protection. Treating all data identically either under-protects sensitive data (PII, financial, health) or over-protects public data (wasting resources on encryption, access control, and audit logging for non-sensitive data). Data classification drives proportional security investment and ensures regulatory compliance (GDPR, HIPAA, PCI-DSS).
168
+
169
+ ### How to Check
170
+
171
+ 1. Verify that data classification levels are defined (e.g., public, internal, confidential, restricted)
172
+ 2. For each classification level, check that handling requirements are specified: encryption at rest, encryption in transit, access control, audit logging, retention, disposal
173
+ 3. Map domain entities to classification levels: which entities contain PII? Financial data? Health data?
174
+ 4. Verify that data flows respect classification: restricted data does not flow through unprotected channels
175
+ 5. Check for regulatory requirements: if the project handles PII (GDPR), payment data (PCI-DSS), or health data (HIPAA), are compliance requirements addressed?
176
+ 6. Verify that data classification covers derived data: aggregated analytics, logs that contain PII, backups that contain classified data
177
+ 7. Check for data residency requirements if the project operates across jurisdictions
178
+
179
+ ### What a Finding Looks Like
180
+
181
+ - P0: "No data classification exists. The system handles user email addresses, passwords, and payment information with no documented sensitivity levels or handling requirements."
182
+ - P1: "Data is classified but handling requirements are missing. User email is marked 'confidential' but no encryption-at-rest requirement is specified."
183
+ - P1: "Application logs contain user email addresses and IP addresses (PII) but logs are classified as 'internal' with no PII handling requirements."
184
+ - P2: "Data classification does not address backups. If backups contain 'restricted' data, backup storage must meet the same security requirements."
185
+
186
+ ---
187
+
188
+ ## Pass 7: Input Validation
189
+
190
+ ### What to Check
191
+
192
+ Validation exists at all system boundaries — not just the frontend. Every point where data enters the system (API endpoints, message consumers, file uploads, webhook receivers) has validation specified.
193
+
194
+ ### Why This Matters
195
+
196
+ Frontend-only validation is a UX convenience, not a security control. Attackers bypass the frontend entirely and send requests directly to the API. Every system boundary where external data enters must validate that data: type checking, range checking, format checking, and business rule validation. Missing server-side validation is the root cause of injection attacks, data corruption, and denial-of-service via malformed input.
197
+
198
+ ### How to Check
199
+
200
+ 1. List every system boundary where external data enters: API endpoints, message queue consumers, file upload handlers, webhook receivers, scheduled job inputs, admin interfaces
201
+ 2. For each boundary, verify that input validation is specified
202
+ 3. Check that validation covers: type (string/number/boolean), format (email, URL, date), range (min/max length, min/max value), allowed values (enums, whitelists)
203
+ 4. Verify that validation is server-side (not relying on client-side validation for security)
204
+ 5. Check for file upload validation: file type, file size, content validation (not just extension checking)
205
+ 6. Verify that validation error responses do not leak internal information (no stack traces, no database error messages)
206
+ 7. Check for rate limiting on endpoints that accept user input (prevent abuse via high-volume invalid input)
207
+
208
+ ### What a Finding Looks Like
209
+
210
+ - P0: "API endpoint POST /users accepts a request body with no documented validation. An attacker could send a 100MB payload, inject SQL via the name field, or provide an invalid email format."
211
+ - P1: "File upload endpoint validates file extension (.jpg, .png) but does not validate file content. An attacker could upload a malicious script with a .jpg extension."
212
+ - P1: "Webhook receiver accepts payloads from external services with no signature validation. An attacker could forge webhook calls."
213
+ - P2: "Input validation is specified for API endpoints but not for message queue consumers. A malformed message could cause the consumer to crash."