@zigrivers/scaffold 2.1.2 → 2.38.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 (391) hide show
  1. package/README.md +505 -119
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.js +94 -14
  4. package/dist/cli/commands/build.js.map +1 -1
  5. package/dist/cli/commands/build.test.js +30 -5
  6. package/dist/cli/commands/build.test.js.map +1 -1
  7. package/dist/cli/commands/check.d.ts +12 -0
  8. package/dist/cli/commands/check.d.ts.map +1 -0
  9. package/dist/cli/commands/check.js +311 -0
  10. package/dist/cli/commands/check.js.map +1 -0
  11. package/dist/cli/commands/check.test.d.ts +2 -0
  12. package/dist/cli/commands/check.test.d.ts.map +1 -0
  13. package/dist/cli/commands/check.test.js +412 -0
  14. package/dist/cli/commands/check.test.js.map +1 -0
  15. package/dist/cli/commands/complete.d.ts +12 -0
  16. package/dist/cli/commands/complete.d.ts.map +1 -0
  17. package/dist/cli/commands/complete.js +101 -0
  18. package/dist/cli/commands/complete.js.map +1 -0
  19. package/dist/cli/commands/complete.test.d.ts +2 -0
  20. package/dist/cli/commands/complete.test.d.ts.map +1 -0
  21. package/dist/cli/commands/complete.test.js +133 -0
  22. package/dist/cli/commands/complete.test.js.map +1 -0
  23. package/dist/cli/commands/dashboard.d.ts.map +1 -1
  24. package/dist/cli/commands/dashboard.js +12 -8
  25. package/dist/cli/commands/dashboard.js.map +1 -1
  26. package/dist/cli/commands/info.d.ts.map +1 -1
  27. package/dist/cli/commands/info.js +4 -0
  28. package/dist/cli/commands/info.js.map +1 -1
  29. package/dist/cli/commands/knowledge.d.ts.map +1 -1
  30. package/dist/cli/commands/knowledge.js +6 -2
  31. package/dist/cli/commands/knowledge.js.map +1 -1
  32. package/dist/cli/commands/knowledge.test.js +16 -11
  33. package/dist/cli/commands/knowledge.test.js.map +1 -1
  34. package/dist/cli/commands/next.d.ts.map +1 -1
  35. package/dist/cli/commands/next.js +41 -13
  36. package/dist/cli/commands/next.js.map +1 -1
  37. package/dist/cli/commands/next.test.js +3 -0
  38. package/dist/cli/commands/next.test.js.map +1 -1
  39. package/dist/cli/commands/reset.d.ts +1 -0
  40. package/dist/cli/commands/reset.d.ts.map +1 -1
  41. package/dist/cli/commands/reset.js +179 -67
  42. package/dist/cli/commands/reset.js.map +1 -1
  43. package/dist/cli/commands/reset.test.js +360 -0
  44. package/dist/cli/commands/reset.test.js.map +1 -1
  45. package/dist/cli/commands/rework.d.ts +20 -0
  46. package/dist/cli/commands/rework.d.ts.map +1 -0
  47. package/dist/cli/commands/rework.js +332 -0
  48. package/dist/cli/commands/rework.js.map +1 -0
  49. package/dist/cli/commands/rework.test.d.ts +2 -0
  50. package/dist/cli/commands/rework.test.d.ts.map +1 -0
  51. package/dist/cli/commands/rework.test.js +297 -0
  52. package/dist/cli/commands/rework.test.js.map +1 -0
  53. package/dist/cli/commands/run.d.ts.map +1 -1
  54. package/dist/cli/commands/run.js +59 -31
  55. package/dist/cli/commands/run.js.map +1 -1
  56. package/dist/cli/commands/run.test.js +288 -6
  57. package/dist/cli/commands/run.test.js.map +1 -1
  58. package/dist/cli/commands/skill.d.ts +12 -0
  59. package/dist/cli/commands/skill.d.ts.map +1 -0
  60. package/dist/cli/commands/skill.js +123 -0
  61. package/dist/cli/commands/skill.js.map +1 -0
  62. package/dist/cli/commands/skill.test.d.ts +2 -0
  63. package/dist/cli/commands/skill.test.d.ts.map +1 -0
  64. package/dist/cli/commands/skill.test.js +297 -0
  65. package/dist/cli/commands/skill.test.js.map +1 -0
  66. package/dist/cli/commands/skip.d.ts +1 -1
  67. package/dist/cli/commands/skip.d.ts.map +1 -1
  68. package/dist/cli/commands/skip.js +123 -57
  69. package/dist/cli/commands/skip.js.map +1 -1
  70. package/dist/cli/commands/skip.test.js +91 -0
  71. package/dist/cli/commands/skip.test.js.map +1 -1
  72. package/dist/cli/commands/status.d.ts +1 -0
  73. package/dist/cli/commands/status.d.ts.map +1 -1
  74. package/dist/cli/commands/status.js +57 -10
  75. package/dist/cli/commands/status.js.map +1 -1
  76. package/dist/cli/commands/status.test.js +81 -0
  77. package/dist/cli/commands/status.test.js.map +1 -1
  78. package/dist/cli/commands/update.test.js +252 -0
  79. package/dist/cli/commands/update.test.js.map +1 -1
  80. package/dist/cli/commands/version.test.js +171 -1
  81. package/dist/cli/commands/version.test.js.map +1 -1
  82. package/dist/cli/index.d.ts.map +1 -1
  83. package/dist/cli/index.js +8 -0
  84. package/dist/cli/index.js.map +1 -1
  85. package/dist/core/adapters/adapter.d.ts +14 -0
  86. package/dist/core/adapters/adapter.d.ts.map +1 -1
  87. package/dist/core/adapters/adapter.js.map +1 -1
  88. package/dist/core/adapters/adapter.test.js +10 -0
  89. package/dist/core/adapters/adapter.test.js.map +1 -1
  90. package/dist/core/adapters/claude-code.d.ts.map +1 -1
  91. package/dist/core/adapters/claude-code.js +47 -10
  92. package/dist/core/adapters/claude-code.js.map +1 -1
  93. package/dist/core/adapters/claude-code.test.js +41 -20
  94. package/dist/core/adapters/claude-code.test.js.map +1 -1
  95. package/dist/core/adapters/codex.d.ts.map +1 -1
  96. package/dist/core/adapters/codex.js +5 -1
  97. package/dist/core/adapters/codex.js.map +1 -1
  98. package/dist/core/adapters/codex.test.js +5 -0
  99. package/dist/core/adapters/codex.test.js.map +1 -1
  100. package/dist/core/adapters/universal.d.ts.map +1 -1
  101. package/dist/core/adapters/universal.js +0 -1
  102. package/dist/core/adapters/universal.js.map +1 -1
  103. package/dist/core/adapters/universal.test.js +5 -0
  104. package/dist/core/adapters/universal.test.js.map +1 -1
  105. package/dist/core/assembly/context-gatherer.d.ts.map +1 -1
  106. package/dist/core/assembly/context-gatherer.js +5 -2
  107. package/dist/core/assembly/context-gatherer.js.map +1 -1
  108. package/dist/core/assembly/engine.d.ts.map +1 -1
  109. package/dist/core/assembly/engine.js +10 -2
  110. package/dist/core/assembly/engine.js.map +1 -1
  111. package/dist/core/assembly/engine.test.js +19 -0
  112. package/dist/core/assembly/engine.test.js.map +1 -1
  113. package/dist/core/assembly/knowledge-loader.d.ts +25 -0
  114. package/dist/core/assembly/knowledge-loader.d.ts.map +1 -1
  115. package/dist/core/assembly/knowledge-loader.js +75 -2
  116. package/dist/core/assembly/knowledge-loader.js.map +1 -1
  117. package/dist/core/assembly/knowledge-loader.test.js +388 -1
  118. package/dist/core/assembly/knowledge-loader.test.js.map +1 -1
  119. package/dist/core/assembly/meta-prompt-loader.d.ts +6 -0
  120. package/dist/core/assembly/meta-prompt-loader.d.ts.map +1 -1
  121. package/dist/core/assembly/meta-prompt-loader.js +41 -25
  122. package/dist/core/assembly/meta-prompt-loader.js.map +1 -1
  123. package/dist/core/assembly/preset-loader.d.ts +10 -0
  124. package/dist/core/assembly/preset-loader.d.ts.map +1 -1
  125. package/dist/core/assembly/preset-loader.js +26 -1
  126. package/dist/core/assembly/preset-loader.js.map +1 -1
  127. package/dist/core/assembly/preset-loader.test.js +65 -1
  128. package/dist/core/assembly/preset-loader.test.js.map +1 -1
  129. package/dist/core/assembly/update-mode.d.ts.map +1 -1
  130. package/dist/core/assembly/update-mode.js +10 -4
  131. package/dist/core/assembly/update-mode.js.map +1 -1
  132. package/dist/core/assembly/update-mode.test.js +47 -0
  133. package/dist/core/assembly/update-mode.test.js.map +1 -1
  134. package/dist/core/dependency/dependency.d.ts.map +1 -1
  135. package/dist/core/dependency/dependency.js +3 -2
  136. package/dist/core/dependency/dependency.js.map +1 -1
  137. package/dist/core/dependency/dependency.test.js +2 -0
  138. package/dist/core/dependency/dependency.test.js.map +1 -1
  139. package/dist/core/dependency/eligibility.js +3 -3
  140. package/dist/core/dependency/eligibility.js.map +1 -1
  141. package/dist/core/dependency/eligibility.test.js +2 -0
  142. package/dist/core/dependency/eligibility.test.js.map +1 -1
  143. package/dist/core/dependency/graph.d.ts.map +1 -1
  144. package/dist/core/dependency/graph.js +4 -0
  145. package/dist/core/dependency/graph.js.map +1 -1
  146. package/dist/core/dependency/graph.test.d.ts +2 -0
  147. package/dist/core/dependency/graph.test.d.ts.map +1 -0
  148. package/dist/core/dependency/graph.test.js +262 -0
  149. package/dist/core/dependency/graph.test.js.map +1 -0
  150. package/dist/core/rework/phase-selector.d.ts +24 -0
  151. package/dist/core/rework/phase-selector.d.ts.map +1 -0
  152. package/dist/core/rework/phase-selector.js +98 -0
  153. package/dist/core/rework/phase-selector.js.map +1 -0
  154. package/dist/core/rework/phase-selector.test.d.ts +2 -0
  155. package/dist/core/rework/phase-selector.test.d.ts.map +1 -0
  156. package/dist/core/rework/phase-selector.test.js +138 -0
  157. package/dist/core/rework/phase-selector.test.js.map +1 -0
  158. package/dist/dashboard/generator.d.ts +48 -17
  159. package/dist/dashboard/generator.d.ts.map +1 -1
  160. package/dist/dashboard/generator.js +75 -5
  161. package/dist/dashboard/generator.js.map +1 -1
  162. package/dist/dashboard/generator.test.js +213 -5
  163. package/dist/dashboard/generator.test.js.map +1 -1
  164. package/dist/dashboard/template.d.ts +1 -1
  165. package/dist/dashboard/template.d.ts.map +1 -1
  166. package/dist/dashboard/template.js +755 -114
  167. package/dist/dashboard/template.js.map +1 -1
  168. package/dist/e2e/knowledge.test.js +4 -3
  169. package/dist/e2e/knowledge.test.js.map +1 -1
  170. package/dist/e2e/pipeline.test.js +2 -0
  171. package/dist/e2e/pipeline.test.js.map +1 -1
  172. package/dist/e2e/rework.test.d.ts +6 -0
  173. package/dist/e2e/rework.test.d.ts.map +1 -0
  174. package/dist/e2e/rework.test.js +226 -0
  175. package/dist/e2e/rework.test.js.map +1 -0
  176. package/dist/index.js +0 -0
  177. package/dist/project/adopt.test.js +2 -0
  178. package/dist/project/adopt.test.js.map +1 -1
  179. package/dist/project/claude-md.js +2 -2
  180. package/dist/project/claude-md.js.map +1 -1
  181. package/dist/project/claude-md.test.js +4 -4
  182. package/dist/project/claude-md.test.js.map +1 -1
  183. package/dist/project/detector.d.ts.map +1 -1
  184. package/dist/project/detector.js +4 -1
  185. package/dist/project/detector.js.map +1 -1
  186. package/dist/project/frontmatter.d.ts.map +1 -1
  187. package/dist/project/frontmatter.js +54 -15
  188. package/dist/project/frontmatter.js.map +1 -1
  189. package/dist/project/frontmatter.test.js +2 -2
  190. package/dist/project/frontmatter.test.js.map +1 -1
  191. package/dist/state/rework-manager.d.ts +16 -0
  192. package/dist/state/rework-manager.d.ts.map +1 -0
  193. package/dist/state/rework-manager.js +126 -0
  194. package/dist/state/rework-manager.js.map +1 -0
  195. package/dist/state/rework-manager.test.d.ts +2 -0
  196. package/dist/state/rework-manager.test.d.ts.map +1 -0
  197. package/dist/state/rework-manager.test.js +191 -0
  198. package/dist/state/rework-manager.test.js.map +1 -0
  199. package/dist/state/state-manager.d.ts +13 -0
  200. package/dist/state/state-manager.d.ts.map +1 -1
  201. package/dist/state/state-manager.js +39 -2
  202. package/dist/state/state-manager.js.map +1 -1
  203. package/dist/state/state-manager.test.js +74 -1
  204. package/dist/state/state-manager.test.js.map +1 -1
  205. package/dist/state/state-migration.d.ts +23 -0
  206. package/dist/state/state-migration.d.ts.map +1 -0
  207. package/dist/state/state-migration.js +144 -0
  208. package/dist/state/state-migration.js.map +1 -0
  209. package/dist/state/state-migration.test.d.ts +2 -0
  210. package/dist/state/state-migration.test.d.ts.map +1 -0
  211. package/dist/state/state-migration.test.js +451 -0
  212. package/dist/state/state-migration.test.js.map +1 -0
  213. package/dist/types/assembly.d.ts +2 -0
  214. package/dist/types/assembly.d.ts.map +1 -1
  215. package/dist/types/dependency.d.ts +2 -2
  216. package/dist/types/dependency.d.ts.map +1 -1
  217. package/dist/types/frontmatter.d.ts +100 -7
  218. package/dist/types/frontmatter.d.ts.map +1 -1
  219. package/dist/types/frontmatter.js +89 -1
  220. package/dist/types/frontmatter.js.map +1 -1
  221. package/dist/types/index.d.ts +1 -0
  222. package/dist/types/index.d.ts.map +1 -1
  223. package/dist/types/index.js +1 -0
  224. package/dist/types/index.js.map +1 -1
  225. package/dist/types/lock.d.ts +1 -1
  226. package/dist/types/lock.d.ts.map +1 -1
  227. package/dist/types/rework.d.ts +36 -0
  228. package/dist/types/rework.d.ts.map +1 -0
  229. package/dist/types/rework.js +2 -0
  230. package/dist/types/rework.js.map +1 -0
  231. package/dist/utils/errors.d.ts +1 -0
  232. package/dist/utils/errors.d.ts.map +1 -1
  233. package/dist/utils/errors.js +8 -0
  234. package/dist/utils/errors.js.map +1 -1
  235. package/dist/utils/fs.d.ts +6 -0
  236. package/dist/utils/fs.d.ts.map +1 -1
  237. package/dist/utils/fs.js +13 -0
  238. package/dist/utils/fs.js.map +1 -1
  239. package/dist/validation/config-validator.test.d.ts +2 -0
  240. package/dist/validation/config-validator.test.d.ts.map +1 -0
  241. package/dist/validation/config-validator.test.js +210 -0
  242. package/dist/validation/config-validator.test.js.map +1 -0
  243. package/dist/validation/dependency-validator.test.d.ts +2 -0
  244. package/dist/validation/dependency-validator.test.d.ts.map +1 -0
  245. package/dist/validation/dependency-validator.test.js +215 -0
  246. package/dist/validation/dependency-validator.test.js.map +1 -0
  247. package/dist/validation/frontmatter-validator.test.d.ts +2 -0
  248. package/dist/validation/frontmatter-validator.test.d.ts.map +1 -0
  249. package/dist/validation/frontmatter-validator.test.js +371 -0
  250. package/dist/validation/frontmatter-validator.test.js.map +1 -0
  251. package/dist/validation/state-validator.test.d.ts +2 -0
  252. package/dist/validation/state-validator.test.d.ts.map +1 -0
  253. package/dist/validation/state-validator.test.js +325 -0
  254. package/dist/validation/state-validator.test.js.map +1 -0
  255. package/dist/wizard/suggestion.test.d.ts +2 -0
  256. package/dist/wizard/suggestion.test.d.ts.map +1 -0
  257. package/dist/wizard/suggestion.test.js +115 -0
  258. package/dist/wizard/suggestion.test.js.map +1 -0
  259. package/dist/wizard/wizard.d.ts.map +1 -1
  260. package/dist/wizard/wizard.js +34 -1
  261. package/dist/wizard/wizard.js.map +1 -1
  262. package/knowledge/core/adr-craft.md +57 -0
  263. package/knowledge/core/ai-memory-management.md +246 -0
  264. package/knowledge/core/api-design.md +8 -0
  265. package/knowledge/core/automated-review-tooling.md +203 -0
  266. package/knowledge/core/claude-md-patterns.md +254 -0
  267. package/knowledge/core/coding-conventions.md +246 -0
  268. package/knowledge/core/database-design.md +8 -0
  269. package/knowledge/core/design-system-tokens.md +469 -0
  270. package/knowledge/core/dev-environment.md +223 -0
  271. package/knowledge/core/domain-modeling.md +8 -0
  272. package/knowledge/core/eval-craft.md +1008 -0
  273. package/knowledge/core/git-workflow-patterns.md +200 -0
  274. package/knowledge/core/multi-model-review-dispatch.md +250 -0
  275. package/knowledge/core/operations-runbook.md +40 -225
  276. package/knowledge/core/project-structure-patterns.md +231 -0
  277. package/knowledge/core/review-step-template.md +247 -0
  278. package/knowledge/core/{security-review.md → security-best-practices.md} +9 -1
  279. package/knowledge/core/system-architecture.md +5 -1
  280. package/knowledge/core/task-decomposition.md +174 -36
  281. package/knowledge/core/task-tracking.md +225 -0
  282. package/knowledge/core/tech-stack-selection.md +214 -0
  283. package/knowledge/core/testing-strategy.md +63 -70
  284. package/knowledge/core/user-stories.md +69 -60
  285. package/knowledge/core/user-story-innovation.md +70 -0
  286. package/knowledge/core/ux-specification.md +18 -148
  287. package/knowledge/execution/enhancement-workflow.md +201 -0
  288. package/knowledge/execution/task-claiming-strategy.md +130 -0
  289. package/knowledge/execution/tdd-execution-loop.md +172 -0
  290. package/knowledge/execution/worktree-management.md +205 -0
  291. package/knowledge/finalization/apply-fixes-and-freeze.md +177 -14
  292. package/knowledge/finalization/developer-onboarding.md +4 -0
  293. package/knowledge/finalization/implementation-playbook.md +83 -5
  294. package/knowledge/product/gap-analysis.md +5 -1
  295. package/knowledge/product/prd-craft.md +55 -34
  296. package/knowledge/product/prd-innovation.md +12 -0
  297. package/knowledge/product/vision-craft.md +213 -0
  298. package/knowledge/review/review-adr.md +44 -0
  299. package/knowledge/review/{review-api-contracts.md → review-api-design.md} +47 -1
  300. package/knowledge/review/{review-database-schema.md → review-database-design.md} +40 -1
  301. package/knowledge/review/review-domain-modeling.md +38 -1
  302. package/knowledge/review/review-implementation-tasks.md +108 -1
  303. package/knowledge/review/review-methodology.md +11 -0
  304. package/knowledge/review/review-operations.md +67 -0
  305. package/knowledge/review/review-prd.md +46 -0
  306. package/knowledge/review/review-security.md +65 -0
  307. package/knowledge/review/review-system-architecture.md +32 -2
  308. package/knowledge/review/review-testing-strategy.md +62 -0
  309. package/knowledge/review/review-user-stories.md +65 -0
  310. package/knowledge/review/{review-ux-spec.md → review-ux-specification.md} +50 -2
  311. package/knowledge/review/review-vision.md +255 -0
  312. package/knowledge/tools/release-management.md +222 -0
  313. package/knowledge/tools/session-analysis.md +215 -0
  314. package/knowledge/tools/version-strategy.md +200 -0
  315. package/knowledge/validation/critical-path-analysis.md +1 -1
  316. package/knowledge/validation/cross-phase-consistency.md +12 -0
  317. package/knowledge/validation/decision-completeness.md +13 -1
  318. package/knowledge/validation/dependency-validation.md +12 -0
  319. package/knowledge/validation/scope-management.md +12 -0
  320. package/knowledge/validation/traceability.md +12 -0
  321. package/methodology/README.md +37 -0
  322. package/methodology/custom-defaults.yml +44 -4
  323. package/methodology/deep.yml +43 -3
  324. package/methodology/mvp.yml +43 -3
  325. package/package.json +4 -3
  326. package/pipeline/architecture/review-architecture.md +36 -13
  327. package/pipeline/architecture/system-architecture.md +24 -9
  328. package/pipeline/build/multi-agent-resume.md +245 -0
  329. package/pipeline/build/multi-agent-start.md +236 -0
  330. package/pipeline/build/new-enhancement.md +456 -0
  331. package/pipeline/build/quick-task.md +381 -0
  332. package/pipeline/build/single-agent-resume.md +210 -0
  333. package/pipeline/build/single-agent-start.md +207 -0
  334. package/pipeline/consolidation/claude-md-optimization.md +76 -0
  335. package/pipeline/consolidation/workflow-audit.md +77 -0
  336. package/pipeline/decisions/adrs.md +21 -7
  337. package/pipeline/decisions/review-adrs.md +32 -11
  338. package/pipeline/environment/ai-memory-setup.md +76 -0
  339. package/pipeline/environment/automated-pr-review.md +76 -0
  340. package/pipeline/environment/design-system.md +75 -0
  341. package/pipeline/environment/dev-env-setup.md +68 -0
  342. package/pipeline/environment/git-workflow.md +73 -0
  343. package/pipeline/finalization/apply-fixes-and-freeze.md +17 -6
  344. package/pipeline/finalization/developer-onboarding-guide.md +23 -9
  345. package/pipeline/finalization/implementation-playbook.md +43 -14
  346. package/pipeline/foundation/beads.md +71 -0
  347. package/pipeline/foundation/coding-standards.md +71 -0
  348. package/pipeline/foundation/project-structure.md +73 -0
  349. package/pipeline/foundation/tdd.md +64 -0
  350. package/pipeline/foundation/tech-stack.md +74 -0
  351. package/pipeline/integration/add-e2e-testing.md +80 -0
  352. package/pipeline/modeling/domain-modeling.md +23 -8
  353. package/pipeline/modeling/review-domain-modeling.md +35 -11
  354. package/pipeline/parity/platform-parity-review.md +90 -0
  355. package/pipeline/planning/implementation-plan-review.md +67 -0
  356. package/pipeline/planning/implementation-plan.md +110 -0
  357. package/pipeline/pre/create-prd.md +34 -10
  358. package/pipeline/pre/innovate-prd.md +46 -15
  359. package/pipeline/pre/innovate-user-stories.md +47 -14
  360. package/pipeline/pre/review-prd.md +29 -8
  361. package/pipeline/pre/review-user-stories.md +34 -8
  362. package/pipeline/pre/user-stories.md +23 -8
  363. package/pipeline/quality/create-evals.md +106 -0
  364. package/pipeline/quality/operations.md +46 -17
  365. package/pipeline/quality/review-operations.md +32 -11
  366. package/pipeline/quality/review-security.md +34 -12
  367. package/pipeline/quality/review-testing.md +37 -14
  368. package/pipeline/quality/security.md +36 -10
  369. package/pipeline/quality/story-tests.md +75 -0
  370. package/pipeline/specification/api-contracts.md +28 -8
  371. package/pipeline/specification/database-schema.md +29 -8
  372. package/pipeline/specification/review-api.md +32 -11
  373. package/pipeline/specification/review-database.md +32 -11
  374. package/pipeline/specification/review-ux.md +34 -12
  375. package/pipeline/specification/ux-spec.md +35 -13
  376. package/pipeline/validation/critical-path-walkthrough.md +45 -11
  377. package/pipeline/validation/cross-phase-consistency.md +45 -11
  378. package/pipeline/validation/decision-completeness.md +45 -11
  379. package/pipeline/validation/dependency-graph-validation.md +46 -11
  380. package/pipeline/validation/implementability-dry-run.md +46 -11
  381. package/pipeline/validation/scope-creep-check.md +46 -11
  382. package/pipeline/validation/traceability-matrix.md +51 -11
  383. package/pipeline/vision/create-vision.md +267 -0
  384. package/pipeline/vision/innovate-vision.md +157 -0
  385. package/pipeline/vision/review-vision.md +149 -0
  386. package/skills/multi-model-dispatch/SKILL.md +326 -0
  387. package/skills/scaffold-pipeline/SKILL.md +210 -0
  388. package/skills/scaffold-runner/SKILL.md +619 -0
  389. package/pipeline/planning/implementation-tasks.md +0 -57
  390. package/pipeline/planning/review-tasks.md +0 -38
  391. package/pipeline/quality/testing-strategy.md +0 -42
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: review-api-contracts
2
+ name: review-api-design
3
3
  description: Failure modes and review passes specific to API contract specifications
4
4
  topics: [review, api, contracts, rest, graphql]
5
5
  ---
@@ -10,6 +10,19 @@ API contracts define the system's external and internal interfaces. They must co
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — Operation Coverage**: Every domain operation crossing a component boundary has a corresponding API endpoint; no missing CRUD or query operations.
16
+ - **Pass 2 — Error Contract Completeness**: Every endpoint has explicit error responses with status codes, body structure, and triggering conditions.
17
+ - **Pass 3 — Auth/AuthZ Coverage**: Every endpoint specifies authentication and authorization requirements; no ambiguous access control.
18
+ - **Pass 4 — Versioning Consistency**: API versioning strategy is consistent across all endpoints and aligns with the ADR.
19
+ - **Pass 5 — Payload Shape vs Domain Entities**: Request/response payloads align with domain model entities in naming, types, and structure.
20
+ - **Pass 6 — Idempotency**: Mutating operations document idempotency behavior; operations with side effects specify the mechanism.
21
+ - **Pass 7 — Pagination/Filtering**: List endpoints have pagination, filter, and sort parameters documented with response metadata.
22
+ - **Pass 8 — Downstream Readiness**: API provides everything needed for UX spec (screen data, error states) and implementation tasks (complexity, dependencies).
23
+
24
+ ## Deep Guidance
25
+
13
26
  ---
14
27
 
15
28
  ## Pass 1: Operation Coverage
@@ -231,3 +244,36 @@ The implementation tasks step needs:
231
244
  - P0: "The UX wireframe shows a 'user dashboard' with order count, recent orders, and account balance, but the API has no endpoint that provides this aggregated data. The frontend would need to make 3+ separate calls."
232
245
  - P1: "Several endpoints are marked as 'async' (returns 202) but there is no documented polling or webhook mechanism for the frontend to get the result."
233
246
  - P2: "API response examples do not include null/empty cases. The UX spec needs to know what an empty order list or a user with no profile photo looks like in API terms."
247
+
248
+ ### Example Review Finding
249
+
250
+ ```markdown
251
+ ### Finding: Payment endpoint missing idempotency specification
252
+
253
+ **Pass:** 6 — Idempotency
254
+ **Priority:** P0
255
+ **Location:** API Contract Section 5.3 "POST /payments/charge"
256
+
257
+ **Issue:** The POST /payments/charge endpoint accepts a payment method and amount,
258
+ charges the customer, and returns a payment confirmation. The endpoint documents
259
+ only the 201 (success) and 400 (bad request) responses.
260
+
261
+ No idempotency mechanism is specified. If a client sends a charge request and
262
+ receives a network timeout (no response), it cannot safely retry — the retry
263
+ may charge the customer a second time. This is a financial data integrity issue.
264
+
265
+ **Impact:** Frontend developers will either (a) not retry on timeout, leaving
266
+ the user unsure if payment succeeded, or (b) retry unconditionally, risking
267
+ double charges. Both outcomes damage user trust and create support burden.
268
+
269
+ **Recommendation:** Add an Idempotency-Key header requirement:
270
+ - Client must include `Idempotency-Key: <uuid>` on every POST /payments/charge
271
+ - Server stores the key with the payment result for 24 hours
272
+ - Repeated requests with the same key return the original result without
273
+ re-processing
274
+ - Document the key format (UUIDv4), retention window (24h), and behavior on
275
+ key reuse (return cached result with 200, not 201)
276
+
277
+ **Trace:** API Contract 5.3 → PRD Section 3.2 "Payment Processing" →
278
+ ADR-009 "Financial data integrity requirements"
279
+ ```
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: review-database-schema
2
+ name: review-database-design
3
3
  description: Failure modes and review passes specific to database schema design artifacts
4
4
  topics: [review, database, schema, data-modeling]
5
5
  ---
@@ -10,6 +10,19 @@ The database schema translates domain entities and their relationships into pers
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — Entity Coverage**: Every domain entity requiring persistence maps to a table; no domain concept is missing from the schema.
16
+ - **Pass 2 — Relationship Fidelity**: Schema relationships accurately reflect domain model cardinality and direction; no missing or fabricated foreign keys.
17
+ - **Pass 3 — Normalization Justification**: Normalization level of each table is justified; deliberate denormalization has documented rationale tied to access patterns.
18
+ - **Pass 4 — Index Coverage**: Indexes cover known query patterns from architecture data flows; no critical query requires a full table scan.
19
+ - **Pass 5 — Constraint Enforcement**: Database constraints (NOT NULL, UNIQUE, CHECK, FK) enforce domain invariants where possible.
20
+ - **Pass 6 — Migration Safety**: Migration plan handles rollbacks and data preservation; destructive operations identified; data migrations separated from schema migrations.
21
+ - **Pass 7 — Cross-Schema Consistency**: Multi-database naming conventions, shared identifiers, and cross-database references are consistent.
22
+ - **Pass 8 — Downstream Readiness**: Schema supports efficient CRUD, list/search queries, relationship traversal, and aggregates needed by API contracts.
23
+
24
+ ## Deep Guidance
25
+
13
26
  ---
14
27
 
15
28
  ## Pass 1: Entity Coverage
@@ -227,3 +240,29 @@ The API contracts step specifically needs:
227
240
  - P0: "API will need 'get all orders for a customer with their line items and product details.' This requires joining orders -> line_items -> products, but line_items has no index on order_id, and the relationship from line_items to products is missing."
228
241
  - P1: "The schema supports 'get user by email' but the API will also need 'search users by name.' No index exists on user name columns."
229
242
  - P2: "Some tables use soft delete (deleted_at column) and some use hard delete. The API contract needs to know which approach applies to determine whether 'delete' operations return 204 or 200."
243
+
244
+ ### Example Review Finding
245
+
246
+ ```markdown
247
+ ### Finding: Missing composite index for primary order query pattern
248
+
249
+ **Pass:** 4 — Index Coverage
250
+ **Priority:** P0
251
+ **Location:** orders table, schema.sql lines 45-72
252
+
253
+ **Issue:** Architecture data flow DF-003 ("Customer views order history") describes
254
+ the primary query as "find all orders by customer, sorted by most recent first." This
255
+ query filters on customer_id and sorts on created_at DESC. The orders table has a
256
+ single-column index on customer_id but no composite index on (customer_id, created_at).
257
+
258
+ **Impact:** Without a composite index, PostgreSQL will use the customer_id index to
259
+ filter, then perform a filesort on the matching rows. At projected volume (50K orders
260
+ per customer for enterprise accounts), this filesort will cause multi-second response
261
+ times on the most frequently executed query.
262
+
263
+ **Recommendation:** Add composite index: CREATE INDEX idx_orders_customer_date
264
+ ON orders (customer_id, created_at DESC). The DESC matches the sort direction,
265
+ enabling an index-only scan for this query pattern.
266
+
267
+ **Trace:** Architecture data flow DF-003 → PRD Feature 2.1 "Order History"
268
+ ```
@@ -6,10 +6,14 @@ topics: [review, domain-modeling, ddd, bounded-contexts]
6
6
 
7
7
  # Review: Domain Modeling
8
8
 
9
- Domain models are the foundation of the entire pipeline. Every subsequent phase builds on them. A gap or error here compounds through ADRs, architecture, database schema, API contracts, and implementation tasks. This review uses 10 passes targeting the specific ways domain models fail.
9
+ ## Summary
10
+
11
+ Domain models are the foundation of the entire pipeline. Every subsequent phase builds on them. A gap or error here compounds through ADRs, architecture, database schema, API contracts, and implementation tasks. This review uses 10 passes targeting the specific ways domain models fail: (1) PRD coverage audit, (2) bounded context integrity, (3) entity vs value object classification, (4) aggregate boundary validation, (5) domain event completeness, (6) invariant specification, (7) ubiquitous language consistency, (8) cross-domain relationship clarity, (9) downstream readiness, and (10) internal consistency.
10
12
 
11
13
  Follows the review process defined in `review-methodology.md`.
12
14
 
15
+ ## Deep Guidance
16
+
13
17
  ---
14
18
 
15
19
  ## Pass 1: PRD Coverage Audit
@@ -286,3 +290,36 @@ Internal inconsistencies within a single domain model erode trust in the artifac
286
290
  - P0: "Invariant 'PaymentAmount must not exceed OrderTotal' references PaymentAmount, but the Payment entity has an attribute called 'amount', not 'paymentAmount'."
287
291
  - P1: "Relationship diagram shows Order -> Customer as one-to-many, but the Order entity definition says 'each order belongs to one customer' (many-to-one). Direction is inverted."
288
292
  - P2: "The Inventory domain model calls the same concept 'stock level' in the overview and 'quantity on hand' in the entity definition."
293
+
294
+ ### Example Review Finding
295
+
296
+ ```markdown
297
+ ### Finding: Aggregate boundary cannot enforce cross-aggregate invariant
298
+
299
+ **Pass:** 4 — Aggregate Boundary Validation
300
+ **Priority:** P0
301
+ **Location:** Order aggregate and Discount aggregate (domain-models.md, Section 3.2)
302
+
303
+ **Issue:** Domain invariant INV-007 states "discount amount must not exceed order
304
+ subtotal." Enforcing this requires access to both the Order aggregate (to read the
305
+ subtotal, which is the sum of line items) and the Discount aggregate (to read the
306
+ discount amount). These are modeled as separate aggregates with independent
307
+ lifecycles.
308
+
309
+ Because aggregates are consistency boundaries, there is no transactional guarantee
310
+ that the discount and order subtotal are evaluated atomically. A line item could be
311
+ removed from the Order (reducing subtotal) after a discount was validated against
312
+ the previous subtotal, violating the invariant.
313
+
314
+ **Impact:** Without resolution, implementing agents will either (a) ignore the
315
+ invariant, allowing invalid discount states, or (b) create tight coupling between
316
+ Order and Discount aggregates, defeating the purpose of the boundary.
317
+
318
+ **Recommendation:** Move Discount inside the Order aggregate as a value object.
319
+ The discount lifecycle is tied to the order — discounts do not exist independently.
320
+ This allows the Order aggregate root to enforce INV-007 within a single
321
+ consistency boundary.
322
+
323
+ **Trace:** Invariant INV-007 → Order aggregate + Discount aggregate → PRD
324
+ Feature 3.4 "Apply discount codes at checkout"
325
+ ```
@@ -6,10 +6,23 @@ topics: [review, tasks, planning, decomposition, agents]
6
6
 
7
7
  # Review: Implementation Tasks
8
8
 
9
- The implementation tasks document translates the architecture into discrete, actionable work items that AI agents can execute. Each task must be self-contained enough for a single agent session, correctly ordered by dependency, and clear enough to implement without asking questions. This review uses 7 passes targeting the specific ways implementation tasks fail.
9
+ The implementation tasks document translates the architecture into discrete, actionable work items that AI agents can execute. Each task must be self-contained enough for a single agent session, correctly ordered by dependency, and clear enough to implement without asking questions. This review uses 8 passes targeting the specific ways implementation tasks fail.
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — Architecture Coverage**: Every architectural component, module, and integration point has corresponding tasks; cross-cutting concerns and infrastructure included.
16
+ - **Pass 2 — Missing Dependencies**: Task dependencies are complete and correct; no circular dependencies; no implicit prerequisites left undeclared.
17
+ - **Pass 3 — Task Sizing**: No task too large for a single agent session (30-60 min) or too small to be meaningful; clear scope boundaries.
18
+ - **Pass 4 — Acceptance Criteria**: Every task has clear, testable criteria covering happy path and at least one error/edge case.
19
+ - **Pass 5 — Critical Path Accuracy**: The identified critical path is actually the longest dependency chain; near-critical paths identified.
20
+ - **Pass 6 — Parallelization Validity**: Tasks marked as parallel are truly independent; no shared state, files, or undeclared dependencies.
21
+ - **Pass 7 — Agent Context**: Each task specifies which documents/sections the implementing agent should read; context is sufficient and minimal.
22
+ - **Pass 8 — Agent Executability**: Every task complies with the 5 agent sizing rules (three-file, 150-line, single-concern, decision-free, test co-location); exceptions are justified.
23
+
24
+ ## Deep Guidance
25
+
13
26
  ---
14
27
 
15
28
  ## Pass 1: Architecture Coverage
@@ -200,3 +213,97 @@ AI agents have limited context windows. If a task does not specify what to read,
200
213
  - P0: "Task 'Implement order creation endpoint' lists no context documents. The agent needs the API contract (endpoint spec), database schema (orders table), domain model (Order aggregate invariants), and architecture section (Order Service design)."
201
214
  - P1: "Task 'Build user dashboard' references the architecture document but not the UX spec. The agent will build the component structure correctly but not the visual design."
202
215
  - P2: "Task context references 'docs/system-architecture.md' without specifying which section. The agent will load the entire 2000-line document instead of the relevant 100-line section."
216
+
217
+ ---
218
+
219
+ ## Pass 8: Agent Executability
220
+
221
+ ### What to Check
222
+
223
+ Every task complies with the five agent executability rules. Tasks exceeding limits without justification must be split.
224
+
225
+ - **Three-File Rule**: Count application files each task modifies (test files excluded). Flag any task touching 4+ files. Check for `<!-- agent-size-exception -->` annotations on flagged tasks.
226
+ - **150-Line Budget**: Estimate net-new lines per task based on the task description scope. Flag tasks likely to produce 200+ lines. Signals: "implement X with Y and Z", multiple acceptance criteria spanning different modules, multi-layer work.
227
+ - **Single-Concern Rule**: Check each task description for "and" connecting unrelated work. Flag tasks spanning multiple architectural layers or feature domains.
228
+ - **Decision-Free Execution**: Scan for unresolved design decisions. Red flags: "choose", "determine", "decide", "evaluate options", "select the best approach", "pick the right", "figure out". Every design choice must be resolved in the task description.
229
+ - **Test Co-location**: Verify every task that produces application code also includes test requirements. Flag any "write tests for tasks X-Y" aggregation pattern. Flag tasks with no test mention.
230
+
231
+ ### Why This Matters
232
+
233
+ Large tasks are the #1 cause of AI agent failure during implementation. When a task requires reading 5+ files, holding multiple abstractions in context, and writing 300+ lines — agents lose coherence, make inconsistent changes, or run out of context window. Tasks with unresolved design decisions cause agents to make architectural choices they shouldn't, producing inconsistent implementations across tasks. Deferred testing produces untestable code and violates TDD.
234
+
235
+ ### How to Check
236
+
237
+ 1. For each task, count the application files it modifies (exclude test files). Flag 4+ files.
238
+ 2. Estimate net-new application code lines from the task scope. Flag 200+ estimated lines.
239
+ 3. Read the task description. Does it contain "and" connecting distinct concerns? Flag it.
240
+ 4. Scan for decision language: "choose", "determine", "decide", "evaluate", "select", "figure out". Flag any unresolved decisions.
241
+ 5. Check test requirements. Does every code-producing task specify what to test? Flag tasks with no test mention or deferred testing.
242
+ 6. For flagged tasks, check for `<!-- agent-size-exception: reason -->`. Accept justified exceptions; flag unjustified ones.
243
+ 7. For each P0/P1 finding, provide a specific split recommendation: name the sub-tasks, list files each owns, specify dependencies between them.
244
+
245
+ ### Severity
246
+
247
+ - P0: Task exceeds 6+ files or 300+ estimated lines — must split immediately, no exceptions
248
+ - P1: Task violates three-file rule without justification — must split or add exception annotation
249
+ - P1: Task violates 150-line budget without justification — must split or justify
250
+ - P1: Task contains unresolved design decisions — must resolve in task description
251
+ - P2: Task has "and" connecting concerns but stays within limits — recommend split
252
+ - P2: Test requirements vague ("add appropriate tests") or deferred — strengthen with specifics
253
+ - P3: Task near limits (3 files, ~150 lines) — note as borderline, no action required
254
+
255
+ ### What a Finding Looks Like
256
+
257
+ - P1: "Task BD-15 'Implement order management API' modifies 5 files (routes, controller, service, validator, model). Violates three-file rule. Split into: BD-15a 'Create order model and migration' (1 file + migration), BD-15b 'Implement order service with validation' (2 files), BD-15c 'Add order routes and controller' (2 files, depends on BD-15a, BD-15b)."
258
+ - P1: "Task BD-22 'Build settings page' says 'determine whether to use tabs or accordion for organizing preferences.' This is an unresolved design decision. The task description must specify the layout pattern."
259
+ - P2: "Task BD-08 'Set up error handling AND configure logging' connects two concerns with 'and'. Recommend splitting into error handling task and logging task."
260
+
261
+ ---
262
+
263
+ ## Common Review Anti-Patterns
264
+
265
+ ### 1. Reviewing Tasks in Isolation
266
+
267
+ The reviewer checks each task individually (sizing, acceptance criteria, context) but never builds the full dependency graph or traces the critical path. Individual tasks may look fine, but the overall task structure has cycles, missing coverage, or an incorrect critical path. Passes 2, 5, and 6 require looking at the task set as a whole, not one task at a time.
268
+
269
+ **How to spot it:** The review report has findings only from Passes 3, 4, and 7 (task-level checks) and none from Passes 1, 2, 5, or 6 (structural checks). The reviewer never drew the dependency graph.
270
+
271
+ ### 2. Trusting Dependency Declarations Without Verification
272
+
273
+ The reviewer reads the declared dependencies for each task and checks for cycles, but never verifies that the declared dependencies are complete. A task that says "depends on: database schema" may also implicitly depend on "auth middleware" (because the endpoint requires authentication), but this dependency is not declared. The reviewer must read the task description and infer actual prerequisites, not just validate declared ones.
274
+
275
+ **Example finding:**
276
+
277
+ ```markdown
278
+ ## Finding: ITR-022
279
+
280
+ **Priority:** P0
281
+ **Pass:** Missing Dependencies (Pass 2)
282
+ **Document:** docs/implementation-tasks.md, Task 14
283
+
284
+ **Issue:** Task 14 ("Implement order creation endpoint") declares dependency on Task 3
285
+ ("Create database schema") but does not declare dependency on Task 7 ("Implement auth
286
+ middleware"). The task's acceptance criteria include "returns 401 for unauthenticated
287
+ requests," which requires auth middleware to exist. If an agent starts Task 14 before
288
+ Task 7 is complete, they cannot implement or test the auth requirement.
289
+
290
+ **Recommendation:** Add Task 7 as an explicit dependency for Task 14.
291
+ ```
292
+
293
+ ### 3. Accepting "Implement Feature X" as a Valid Task
294
+
295
+ The reviewer sees a task titled "Implement user management" with acceptance criteria listing 8 endpoints, 3 database tables, 2 background jobs, and role-based access control — and does not flag it as too large. A single task should be completable in one agent session (30-60 minutes). "Implement user management" is a project phase, not a task.
296
+
297
+ **How to spot it:** Count the acceptance criteria and the distinct concerns. More than 5-7 acceptance criteria or more than 2 distinct concerns (e.g., API + database + auth) means the task needs splitting.
298
+
299
+ ### 4. Ignoring Test Tasks
300
+
301
+ The reviewer verifies implementation tasks but does not check whether corresponding test tasks exist. The testing strategy says "integration tests for all API endpoints," but there is no task for writing those tests. Tests are not free — they require their own implementation time, and if no task exists for them, they will not be written.
302
+
303
+ **How to spot it:** For each implementation task, search for a corresponding test task. If implementation tasks outnumber test tasks by more than 3:1, testing is systematically under-tasked.
304
+
305
+ ### 5. No Verification of Parallelization Claims
306
+
307
+ Tasks are marked as parallelizable, and the reviewer accepts this at face value. But two tasks marked as parallel both modify `src/config/database.ts` or both add routes to the same router file. The reviewer must check for shared file modifications, not just logical independence.
308
+
309
+ **How to spot it:** The review has no findings from Pass 6 (Parallelization Validity). The reviewer checked for logical dependencies but not for file-level conflicts.
@@ -8,6 +8,17 @@ topics: [review, methodology, quality-assurance, multi-pass]
8
8
 
9
9
  This document defines the shared process for reviewing pipeline artifacts. It covers HOW to review, not WHAT to check — each artifact type has its own review knowledge base document with domain-specific passes and failure modes. Every review phase (1a through 10a) follows this process.
10
10
 
11
+ ## Summary
12
+
13
+ - **Multi-pass review**: Each pass has a single focus (coverage, consistency, structure, downstream readiness). Passes are ordered broadest-to-most-specific.
14
+ - **Finding severity**: P0 blocks next phase (must fix), P1 is a significant gap (should fix), P2 is an improvement opportunity (fix if time permits), P3 is nice-to-have (skip).
15
+ - **Fix planning**: Group findings by root cause, same section, and same severity. Fix all P0s first, then P1s. Never fix ad hoc.
16
+ - **Re-validation**: After applying fixes, re-run the specific passes that produced the findings. Stop when no new P0/P1 findings appear.
17
+ - **Downstream readiness gate**: Final check verifies the next phase can proceed with these artifacts. Outcomes: pass, conditional pass, or fail.
18
+ - **Review report**: Structured output with executive summary, findings by pass, fix plan, fix log, re-validation results, and downstream readiness assessment.
19
+
20
+ ## Deep Guidance
21
+
11
22
  ## Multi-Pass Review Structure
12
23
 
13
24
  ### Why Multiple Passes
@@ -10,6 +10,18 @@ The operations runbook defines how the system is deployed, monitored, and mainta
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — Deployment Strategy Completeness**: Full deploy lifecycle documented from merged PR to running production, including build, test, stage, deploy, verify, and rollback stages.
16
+ - **Pass 2 — Rollback Procedures**: Every deployment type has a corresponding rollback procedure; database rollbacks addressed separately from code rollbacks.
17
+ - **Pass 3 — Monitoring Coverage**: Infrastructure, application, and business metrics identified with dashboards defined for all critical system components.
18
+ - **Pass 4 — Alerting Thresholds**: Alerts have justified thresholds based on baselines, severity levels map to response expectations, and alert fatigue is considered.
19
+ - **Pass 5 — Runbook Scenarios**: Common failure scenarios have step-by-step runbook entries covering symptoms, diagnosis, resolution, verification, and escalation.
20
+ - **Pass 6 — Dev Environment Parity**: Local development environment reasonably matches production behavior; documented deviations with implications.
21
+ - **Pass 7 — DR/Backup Coverage**: Disaster recovery approach documented with RTO/RPO targets; backup strategy covers all persistent data stores.
22
+
23
+ ## Deep Guidance
24
+
13
25
  ---
14
26
 
15
27
  ## Pass 1: Deployment Strategy Completeness
@@ -210,3 +222,58 @@ Without a backup strategy, data loss is permanent. Without a disaster recovery p
210
222
  - P0: "Backups run daily but the RPO is 15 minutes. Up to 24 hours of data could be lost, far exceeding the business tolerance."
211
223
  - P1: "Backup restoration procedure says 'restore from backup' with no specifics. What tool? What command? How long does it take? What is the verification step?"
212
224
  - P2: "DR strategy exists but has never been tested. The team does not know if recovery actually works within the stated RTO."
225
+
226
+ ---
227
+
228
+ ## Common Review Anti-Patterns
229
+
230
+ ### 1. Reviewing the Runbook as a Standalone Document
231
+
232
+ The reviewer checks the operations runbook for completeness (are all sections present? are rollback procedures documented?) but never cross-references with the architecture or deployment infrastructure. The runbook may describe a deployment pipeline that does not match the actual CI/CD configuration, or monitoring that covers components that no longer exist. Operations documentation must be validated against the architecture it describes.
233
+
234
+ **How to spot it:** The review has no findings that reference the architecture document or infrastructure configuration. All findings are about what the runbook says, not whether what it says matches reality.
235
+
236
+ ### 2. "We Use Kubernetes" as a Complete Deployment Strategy
237
+
238
+ The deployment section names the orchestration platform (Kubernetes, ECS, Heroku) but does not describe the actual deployment process. How are images built? How are they tagged? What triggers a deployment? What is the rollout strategy (rolling update, blue-green, canary)? What happens when a pod fails health checks during rollout? Naming the platform is not a strategy.
239
+
240
+ **Example finding:**
241
+
242
+ ```markdown
243
+ ## Finding: OPS-011
244
+
245
+ **Priority:** P1
246
+ **Pass:** Deployment Strategy Completeness (Pass 1)
247
+ **Document:** docs/operations-runbook.md, Section 2
248
+
249
+ **Issue:** Deployment section states: "The application is deployed to Kubernetes using
250
+ Helm charts." No further detail is provided. The following questions are unanswered:
251
+ - What triggers a deployment? (manual, on PR merge, on tag?)
252
+ - What is the rollout strategy? (rolling update, blue-green, canary?)
253
+ - What are the health check endpoints and thresholds?
254
+ - When do database migrations run relative to the code deployment?
255
+ - What is the rollback procedure? (Helm rollback? Redeploy previous image?)
256
+ - How long does a typical deployment take?
257
+
258
+ **Recommendation:** Expand the deployment section to cover each stage of the pipeline
259
+ from merged PR to verified production deployment, with specific commands, tools,
260
+ and decision points.
261
+ ```
262
+
263
+ ### 3. Monitoring Section Lists Tools but Not Metrics
264
+
265
+ The monitoring section says "we use Datadog for monitoring and PagerDuty for alerting" but does not specify what metrics are collected, what dashboards exist, or what alert thresholds are configured. Tools are not a monitoring strategy. The question is not "do we have Datadog?" but "what does Datadog measure, and when does it wake someone up?"
266
+
267
+ **How to spot it:** The monitoring section mentions tool names but contains no metric names (error rate, p95 latency, request throughput), no threshold values, and no alert severity definitions.
268
+
269
+ ### 4. Rollback Procedure That Ignores Data
270
+
271
+ The rollback section describes how to revert code (redeploy previous version, Helm rollback) but does not address database schema changes or data migrations. If the deployment included a migration that added a column and backfilled data, "rollback" is not just reverting the code — it requires a reverse migration, and the reverse migration may be destructive (dropping the new column loses the backfilled data).
272
+
273
+ **How to spot it:** The rollback section mentions code rollback but not database rollback. Search for "migration," "schema," or "database" in the rollback procedure — if absent, data rollback is unaddressed.
274
+
275
+ ### 5. No Runbook Entries for the Most Likely Failures
276
+
277
+ The runbook has procedures for exotic failure scenarios (complete region outage, database corruption) but not for the failures that actually happen weekly: a single pod crashing, a dependency timing out, disk filling up from log accumulation, a certificate expiring. The most useful runbook entries cover common, mundane failures — not catastrophic ones.
278
+
279
+ **How to spot it:** Count runbook entries. If there are fewer than 5, the most likely failure scenarios are probably missing. Check specifically for: service restart, dependency timeout, disk full, certificate expiration, and failed deployment rollback.
@@ -10,6 +10,19 @@ The PRD is the foundation of the entire pipeline. Every subsequent phase builds
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — Problem Statement Rigor**: Verify the problem is specific, testable, grounded in evidence, and names a specific user group without prescribing solutions.
16
+ - **Pass 2 — Persona & Stakeholder Coverage**: Ensure personas are goal-driven with constraints and context; 2-4 meaningful personas covering all stakeholder groups.
17
+ - **Pass 3 — Feature Scoping Completeness**: Confirm in-scope, out-of-scope, and deferred lists exist; features are specific enough to estimate with prioritization applied.
18
+ - **Pass 4 — Success Criteria Measurability**: Every criterion needs a target value, measurement method, and tie-back to the problem statement.
19
+ - **Pass 5 — NFR Quantification**: All NFR categories addressed with quantified targets and conditions, not adjectives.
20
+ - **Pass 6 — Constraint & Dependency Documentation**: Technical, timeline, budget, team, and regulatory constraints present with traceable downstream impact.
21
+ - **Pass 7 — Error & Edge Case Coverage**: Sad paths for every feature with user input or external dependencies; failure modes for third-party integrations.
22
+ - **Pass 8 — Downstream Readiness for User Stories**: Features specific enough to map to stories, personas specific enough to be actors, business rules explicit enough for acceptance criteria.
23
+
24
+ ## Deep Guidance
25
+
13
26
  ---
14
27
 
15
28
  ## Pass 1: Problem Statement Rigor
@@ -233,3 +246,36 @@ The PRD's primary consumer is the user stories phase. If features are too vague
233
246
 
234
247
  - P0: "Feature 'user management' cannot be decomposed into stories — what operations? What user types? What permissions model?"
235
248
  - P1: "Business rules for discount application are implied but not stated — story acceptance criteria will have to guess at validation logic."
249
+
250
+ ### Example Review Finding
251
+
252
+ ```markdown
253
+ ### Finding: NFRs use qualitative adjectives instead of quantified targets
254
+
255
+ **Pass:** 5 — NFR Quantification
256
+ **Priority:** P1
257
+ **Location:** PRD Section 6 "Non-Functional Requirements"
258
+
259
+ **Issue:** Performance requirements state "the system should be fast and responsive."
260
+ No response time targets, percentile thresholds, or load conditions are specified.
261
+ "Fast" is subjective — it means <100ms to a backend engineer and <3s to a product
262
+ manager evaluating full page loads.
263
+
264
+ Similarly, availability requirement states "high availability" without specifying
265
+ a target uptime percentage, maximum acceptable downtime window, or recovery time
266
+ objective (RTO).
267
+
268
+ **Impact:** The architecture step cannot make infrastructure decisions (single
269
+ instance vs. load-balanced, database read replicas, CDN) without quantified
270
+ performance targets. The testing step cannot write performance tests without
271
+ thresholds to assert against. Implementing agents will make arbitrary performance
272
+ trade-offs with no shared baseline.
273
+
274
+ **Recommendation:** Replace with quantified targets:
275
+ - "API response time: p95 < 200ms, p99 < 500ms under 1000 concurrent users"
276
+ - "Page load time: Largest Contentful Paint < 2.5s on 4G connection"
277
+ - "Availability: 99.9% uptime (8.7 hours maximum downtime per year)"
278
+ - "Recovery: RTO < 15 minutes, RPO < 1 hour"
279
+
280
+ **Trace:** PRD Section 6 → blocks Architecture Phase → blocks Implementation
281
+ ```
@@ -10,6 +10,18 @@ The security review document assesses the system's security posture across authe
10
10
 
11
11
  Follows the review process defined in `review-methodology.md`.
12
12
 
13
+ ## Summary
14
+
15
+ - **Pass 1 — OWASP Coverage**: Every OWASP Top 10 category addressed with project-specific analysis, not generic checklist advice.
16
+ - **Pass 2 — Auth/AuthZ Boundary Alignment**: Security boundaries align with API contract auth requirements; no access control gaps between security review and API enforcement.
17
+ - **Pass 3 — Secrets Management**: No secrets in code or version control; rotation strategy exists; vault/secrets manager integration specified for all secret categories.
18
+ - **Pass 4 — Dependency Audit Coverage**: Vulnerability scanning integrated into CI covering direct and transitive dependencies; response policy for discovered vulnerabilities.
19
+ - **Pass 5 — Threat Model Scenarios**: Structured threat model (STRIDE/PASTA) covering all trust boundaries with specific, project-relevant threat scenarios and mapped mitigations.
20
+ - **Pass 6 — Data Classification**: Data categorized by sensitivity level with handling requirements per category; regulatory compliance addressed.
21
+ - **Pass 7 — Input Validation**: Validation at all system boundaries (not just frontend) covering type, format, range, and business rules.
22
+
23
+ ## Deep Guidance
24
+
13
25
  ---
14
26
 
15
27
  ## Pass 1: OWASP Coverage
@@ -211,3 +223,56 @@ Frontend-only validation is a UX convenience, not a security control. Attackers
211
223
  - 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
224
  - P1: "Webhook receiver accepts payloads from external services with no signature validation. An attacker could forge webhook calls."
213
225
  - P2: "Input validation is specified for API endpoints but not for message queue consumers. A malformed message could cause the consumer to crash."
226
+
227
+ ---
228
+
229
+ ## Common Review Anti-Patterns
230
+
231
+ ### 1. Generic OWASP Checklist Without Project Mapping
232
+
233
+ The security document lists all 10 OWASP categories with textbook mitigations ("use parameterized queries," "encrypt data at rest") but never connects them to the actual project. No component names, no endpoint references, no architecture-specific analysis. The same document could describe any web application.
234
+
235
+ **How to spot it:** The OWASP section contains zero references to the project's architecture document, API contracts, or database schema. Mitigations are general advice rather than specific implementation plans tied to named components.
236
+
237
+ ### 2. Auth Designed in Isolation from API Contracts
238
+
239
+ The security document defines roles, permissions, and access control policies, but the reviewer does not cross-reference these with the API contract's endpoint-level auth requirements. The security document says "admin-only" for user management, but the API contract has no auth annotation on DELETE /users/{id}. This gap means the security design exists on paper but may not be enforced.
240
+
241
+ **Example finding:**
242
+
243
+ ```markdown
244
+ ## Finding: SEC-018
245
+
246
+ **Priority:** P0
247
+ **Pass:** Auth/AuthZ Boundary Alignment (Pass 2)
248
+ **Document:** docs/security-review.md, Section 3 / docs/api-contracts.md, Section 5.2
249
+
250
+ **Issue:** Security document defines three roles (admin, editor, viewer) with a permission
251
+ matrix. API contract defines 24 endpoints. Cross-referencing reveals:
252
+ - 6 endpoints have no auth requirement specified in the API contract
253
+ - 3 endpoints specify "authenticated" but the security document requires "admin" role
254
+ - Endpoint PATCH /users/{id}/role has no authorization check — any authenticated user
255
+ could escalate privileges
256
+
257
+ **Recommendation:** Add auth/authz annotations to all 24 endpoints in the API contract.
258
+ Reconcile the 3 mismatched endpoints with the security document's permission matrix.
259
+ Add explicit admin-only restriction to the role-change endpoint.
260
+ ```
261
+
262
+ ### 3. Secrets Strategy Says "Environment Variables" and Stops
263
+
264
+ The security document addresses secrets management by stating "secrets are stored in environment variables" with no further detail. This leaves critical questions unanswered: how are environment variables populated in production (plain text config file on the server? Kubernetes secrets? A vault?)? How are secrets rotated? What happens when a secret is compromised? "Environment variables" is a mechanism, not a strategy.
265
+
266
+ **How to spot it:** The secrets management section is shorter than half a page. It mentions environment variables but not rotation, not emergency response, not CI/CD secret injection, and not local development secrets handling.
267
+
268
+ ### 4. Threat Model Without Trust Boundaries
269
+
270
+ The security document includes a threat model section that lists generic threats (SQL injection, XSS, CSRF) without mapping them to the system's trust boundaries. No data flow analysis, no identification of where untrusted input enters the system, no assessment of service-to-service trust. The threats listed are a vocabulary exercise, not a risk analysis.
271
+
272
+ **How to spot it:** The threat model section does not reference the architecture diagram. No trust boundaries are drawn. Threats are listed as a flat list rather than organized by boundary (client-to-API, service-to-service, service-to-database).
273
+
274
+ ### 5. Reviewing Security Document Without Cross-Referencing Other Artifacts
275
+
276
+ The reviewer checks the security document internally (are all sections present? is the OWASP analysis complete?) but never opens the API contracts, architecture document, or operations runbook. Security findings that span multiple documents — auth gaps between the security doc and API contract, secrets handling gaps between the security doc and operations runbook — are invisible to a single-document review.
277
+
278
+ **How to spot it:** The review report cites only the security document. No findings reference the API contracts (Pass 2), the architecture (Pass 5 trust boundaries), or the operations runbook (Pass 3 secrets in deployment).
@@ -6,12 +6,14 @@ topics: [review, architecture, components, data-flow, modules]
6
6
 
7
7
  # Review: System Architecture
8
8
 
9
- The system architecture document translates domain models and ADR decisions into a concrete component structure, data flows, and module organization. It is the primary reference for all subsequent phases — database schema, API contracts, UX spec, and implementation tasks all derive from it. Errors here propagate everywhere.
9
+ ## Summary
10
10
 
11
- This review uses 10 passes targeting the specific ways architecture documents fail.
11
+ The system architecture document translates domain models and ADR decisions into a concrete component structure, data flows, and module organization. It is the primary reference for all subsequent phases — database schema, API contracts, UX spec, and implementation tasks all derive from it. Errors here propagate everywhere. This review uses 10 passes targeting the specific ways architecture documents fail: (1) domain model coverage, (2) ADR constraint compliance, (3) data flow completeness, (4) module structure integrity, (5) state consistency, (6) diagram/prose consistency, (7) extension point integrity, (8) invariant verification, (9) downstream readiness, and (10) internal consistency.
12
12
 
13
13
  Follows the review process defined in `review-methodology.md`.
14
14
 
15
+ ## Deep Guidance
16
+
15
17
  ---
16
18
 
17
19
  ## Pass 1: Domain Model Coverage
@@ -294,3 +296,31 @@ Architecture documents are long. Inconsistencies between early and late sections
294
296
  - P1: "Section 3 describes the system as having five microservices, but the component diagram shows six. The 'Scheduler' component appears in the diagram but not in the prose."
295
297
  - P1: "The architecture uses 'API Gateway' in sections 2-4 and 'Reverse Proxy' in section 6 for what appears to be the same component."
296
298
  - P2: "Node.js version is stated as 18 in section 1 and 20 in the deployment section."
299
+
300
+ ### Example Review Finding
301
+
302
+ ```markdown
303
+ ### Finding: Orphaned component with no data flow connections
304
+
305
+ **Pass:** 3 — Data Flow Completeness
306
+ **Priority:** P0
307
+ **Location:** Component diagram (architecture.md, Section 2.1)
308
+
309
+ **Issue:** Component 'AnalyticsEngine' appears in the component diagram as a
310
+ standalone service but is not referenced in any of the 12 documented data flows.
311
+ It has no documented inputs (what data does it consume?), no documented outputs
312
+ (where do analytics results go?), and no documented trigger (what initiates
313
+ analytics processing?).
314
+
315
+ **Impact:** The database schema step cannot design analytics storage without
316
+ knowing what data the AnalyticsEngine processes. The implementation tasks step
317
+ cannot scope analytics work without knowing the component's interfaces. The UX
318
+ spec step cannot design analytics dashboards without knowing what data is available.
319
+
320
+ **Recommendation:** Either (a) add data flows showing how AnalyticsEngine receives
321
+ events from other components, what processing it performs, and where results are
322
+ stored/served, or (b) remove AnalyticsEngine from the diagram if analytics is
323
+ out of scope for v1.
324
+
325
+ **Trace:** Component diagram → missing data flow coverage
326
+ ```