@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
@@ -8,6 +8,18 @@ topics: [validation, dependencies, graphs, cycles, ordering, parallelization]
8
8
 
9
9
  Dependency validation extracts all dependency relationships between implementation tasks, builds a graph, checks for correctness, and verifies that the ordering matches architectural constraints. A valid dependency graph ensures that tasks can be executed in an order that never requires unbuilt dependencies.
10
10
 
11
+ ## Summary
12
+
13
+ - Extract dependencies from task declarations, architecture data flows, schema foreign keys, API contract prerequisites, and implicit shared resources.
14
+ - **Cycle detection**: Use Kahn's algorithm to find tasks that can never start; resolve by splitting tasks into "define interface" and "implement interface."
15
+ - **Completeness check**: Every referenced task ID must exist in the task list; orphaned dependencies indicate renames, removals, or typos.
16
+ - **Ordering validation**: Dependencies should follow architectural layer ordering (infrastructure -> schema -> domain -> service -> API -> frontend -> tests).
17
+ - **Parallel independence**: Tasks with no dependency path between them must not share mutable files, tables, or configuration.
18
+ - **Critical path analysis**: Identify the longest sequential chain to determine minimum project duration and focus optimization efforts.
19
+ - **Fan-in/fan-out analysis**: High fan-in tasks are blockers (prioritize and split); high fan-out tasks start late (review whether all dependencies are necessary).
20
+
21
+ ## Deep Guidance
22
+
11
23
  ## What a Dependency Graph Represents
12
24
 
13
25
  Each node in the graph is an implementation task. Each directed edge represents a "must complete before" relationship: if task A depends on task B, then B must be completed before A can start.
@@ -8,6 +8,18 @@ topics: [validation, scope, creep, prd-alignment, gold-plating]
8
8
 
9
9
  Scope management validation compares every specification artifact against the PRD to ensure that the documented system matches what was actually requested. Features that cannot be traced to a PRD requirement are scope creep. Requirements that grew during documentation are scope inflation. Extra polish on non-critical features is gold-plating. This validation catches all three.
10
10
 
11
+ ## Summary
12
+
13
+ - **Feature-to-PRD tracing**: Classify every capability as traced (maps to PRD), supporting (necessary infrastructure), or creep (no PRD justification).
14
+ - **Scope inflation detection**: Compare each PRD requirement's original scope to its implementation scope; flag features that grew beyond what was requested.
15
+ - **Gold-plating detection**: Over-abstraction, premature optimization, excessive error handling, and UI polish beyond requirements. Test: "If removed, would any PRD requirement be unmet?"
16
+ - **Deferred scope leakage**: Verify explicitly deferred items (v2 features) do not appear in specifications, including partial infrastructure for deferred features.
17
+ - **NFR scope alignment**: Implementation targets should match PRD targets, not exceed them (e.g., 99.9% uptime, not 99.99%).
18
+ - **Decision framework**: When in doubt, defer. Scope additions are kept only if required for a PRD feature to work and do not significantly increase effort or operational complexity.
19
+ - Run scope validation after all documentation phases and before implementation begins.
20
+
21
+ ## Deep Guidance
22
+
11
23
  ## Why Scope Grows
12
24
 
13
25
  Scope grows during the documentation pipeline for understandable reasons — but each growth increases implementation effort, risk, and timeline. Common causes:
@@ -8,6 +8,18 @@ topics: [validation, traceability, requirements, coverage]
8
8
 
9
9
  Traceability validation ensures that every requirement flows from its origin in the PRD through domain modeling, architecture decisions, system design, and into implementable tasks. A complete traceability matrix is the strongest evidence that nothing has been lost or invented during the documentation pipeline.
10
10
 
11
+ ## Summary
12
+
13
+ - **Traceability matrix**: A table where each row is a requirement and columns are pipeline artifacts (domain, ADR, architecture, schema, API, UX, tasks, tests). Empty cells are gaps.
14
+ - **Build process**: Extract all PRD requirements (functional, NFR, constraints, deferred), then trace each forward through every downstream artifact.
15
+ - **Gap detection**: Empty cells (not N/A), orphaned artifacts tracing to no requirement, thin traces, and deferred items appearing downstream.
16
+ - **Bidirectional tracing**: Forward (requirement -> implementation) catches gaps; backward (implementation -> requirement) catches scope creep.
17
+ - **NFR tracing**: Performance, security, and accessibility requirements cut across components and need special tracing through architecture, schema, API, testing, and UX.
18
+ - **Common issues**: Orphan features, assumed infrastructure, tested-but-not-specified behaviors, specified-but-not-tested requirements, and split requirements across unlinked tasks.
19
+ - Use consistent identifiers (REQ-001, ADR-003, T-012) so traces are searchable across all artifacts.
20
+
21
+ ## Deep Guidance
22
+
11
23
  ## What a Traceability Matrix Is
12
24
 
13
25
  A traceability matrix is a table where each row represents a requirement and each column represents a pipeline artifact. A complete row means the requirement is fully traced from origin to implementation. A missing cell means a gap — either the requirement was not addressed at that phase, or it was addressed but the connection is not explicit.
@@ -0,0 +1,37 @@
1
+ # Methodology Depth Levels
2
+
3
+ The scaffold pipeline supports 5 depth levels that control the thoroughness of each step's output.
4
+
5
+ | Depth | Name | Description |
6
+ |-------|------|-------------|
7
+ | 1 | Minimal | Bare minimum viable output. Just enough to start building. |
8
+ | 2 | Light | Slightly more detail than minimal. Still focused on speed over completeness. |
9
+ | 3 | Balanced | Recommended for most projects. Good coverage without excessive documentation. |
10
+ | 4 | Thorough | Comprehensive output with external model validation (Codex/Gemini) when available. |
11
+ | 5 | Exhaustive | Maximum detail with multi-model reconciliation. Best for critical or regulated projects. |
12
+
13
+ ## Presets
14
+
15
+ | Preset | Default Depth | Philosophy |
16
+ |--------|---------------|------------|
17
+ | `mvp.yml` | 1 | Ship fast. Only essential steps enabled. No review cycles beyond PRD/stories. |
18
+ | `custom-defaults.yml` | 3 | Balanced. Most steps enabled. Innovation and automated review disabled by default. |
19
+ | `deep.yml` | 5 | Maximum quality. All steps enabled. External model dispatch at depth 4+. |
20
+
21
+ ## How Depth Affects Steps
22
+
23
+ Each pipeline step defines a `## Methodology Scaling` section with behavior at each depth:
24
+ - **mvp** bullet: What the step produces at depth 1-2
25
+ - **deep** bullet: What the step produces at depth 4-5
26
+ - **custom:depth(1-5)** bullet: Explicit per-level breakdown
27
+
28
+ Depth 3 is typically the inflection point where steps add structure, cross-references, and validation beyond the basics.
29
+
30
+ ## Depth Tags in Quality Criteria
31
+
32
+ Quality Criteria items may be tagged:
33
+ - `(mvp)` — applies at all depths (depth 1+)
34
+ - `(deep)` — applies only at depth 4+
35
+ - `(depth N+)` — applies at depth N and above
36
+
37
+ Untagged criteria apply at all depths by default.
@@ -3,34 +3,66 @@ name: Custom
3
3
  description: Choose which steps to include and how deep to go
4
4
  default_depth: 3
5
5
 
6
- # All steps enabled by default at depth 3 — user overrides individual steps
6
+ # Most steps enabled by default at depth 3 — innovation and automated-pr-review disabled by default, user overrides individual steps
7
7
  steps:
8
+ # Phase 0 — Product Vision (vision)
9
+ create-vision: { enabled: true }
10
+ review-vision: { enabled: true }
11
+ innovate-vision: { enabled: false }
12
+ # Phase 1 — Product Definition (pre)
8
13
  create-prd: { enabled: true }
9
14
  review-prd: { enabled: true }
10
15
  innovate-prd: { enabled: false }
11
16
  user-stories: { enabled: true }
12
17
  review-user-stories: { enabled: true }
13
18
  innovate-user-stories: { enabled: false }
19
+ # Phase 2 — Project Foundation (foundation)
20
+ beads: { enabled: true, conditional: "if-needed" }
21
+ tech-stack: { enabled: true }
22
+ coding-standards: { enabled: true }
23
+ tdd: { enabled: true }
24
+ project-structure: { enabled: true }
25
+ # Phase 3 — Development Environment (environment)
26
+ dev-env-setup: { enabled: true }
27
+ design-system: { enabled: true, conditional: "if-needed" }
28
+ git-workflow: { enabled: true }
29
+ automated-pr-review: { enabled: false }
30
+ ai-memory-setup: { enabled: true }
31
+ # Phase 4 — Testing Integration (integration)
32
+ add-e2e-testing: { enabled: true, conditional: "if-needed" }
33
+ # Phase 5 — Domain Modeling (modeling)
14
34
  domain-modeling: { enabled: true }
15
35
  review-domain-modeling: { enabled: true }
36
+ # Phase 6 — Architecture Decisions (decisions)
16
37
  adrs: { enabled: true }
17
38
  review-adrs: { enabled: true }
39
+ # Phase 7 — System Architecture (architecture)
18
40
  system-architecture: { enabled: true }
19
41
  review-architecture: { enabled: true }
42
+ # Phase 8 — Specifications (specification)
20
43
  database-schema: { enabled: true, conditional: "if-needed" }
21
44
  review-database: { enabled: true, conditional: "if-needed" }
22
45
  api-contracts: { enabled: true, conditional: "if-needed" }
23
46
  review-api: { enabled: true, conditional: "if-needed" }
24
47
  ux-spec: { enabled: true, conditional: "if-needed" }
25
48
  review-ux: { enabled: true, conditional: "if-needed" }
26
- testing-strategy: { enabled: true }
49
+ # Phase 9 Quality Gates (quality)
27
50
  review-testing: { enabled: true }
51
+ story-tests: { enabled: true }
52
+ create-evals: { enabled: true }
28
53
  operations: { enabled: true }
29
54
  review-operations: { enabled: true }
30
55
  security: { enabled: true }
31
56
  review-security: { enabled: true }
32
- implementation-tasks: { enabled: true }
33
- review-tasks: { enabled: true }
57
+ # Phase 10 Platform Parity (parity)
58
+ platform-parity-review: { enabled: true, conditional: "if-needed" }
59
+ # Phase 11 — Consolidation (consolidation)
60
+ claude-md-optimization: { enabled: true }
61
+ workflow-audit: { enabled: true }
62
+ # Phase 12 — Planning (planning)
63
+ implementation-plan: { enabled: true }
64
+ implementation-plan-review: { enabled: true }
65
+ # Phase 13 — Validation (validation)
34
66
  cross-phase-consistency: { enabled: true }
35
67
  traceability-matrix: { enabled: true }
36
68
  decision-completeness: { enabled: true }
@@ -38,6 +70,14 @@ steps:
38
70
  implementability-dry-run: { enabled: true }
39
71
  dependency-graph-validation: { enabled: true }
40
72
  scope-creep-check: { enabled: true }
73
+ # Phase 14 — Finalization (finalization)
41
74
  apply-fixes-and-freeze: { enabled: true }
42
75
  developer-onboarding-guide: { enabled: true }
43
76
  implementation-playbook: { enabled: true }
77
+ # Phase 15 — Build (build) — stateless, on-demand execution steps
78
+ single-agent-start: { enabled: true }
79
+ single-agent-resume: { enabled: true }
80
+ multi-agent-start: { enabled: true }
81
+ multi-agent-resume: { enabled: true }
82
+ quick-task: { enabled: true }
83
+ new-enhancement: { enabled: true }
@@ -4,32 +4,64 @@ description: Comprehensive documentation for complex systems — full analysis a
4
4
  default_depth: 5
5
5
 
6
6
  steps:
7
+ # Phase 0 — Product Vision (vision)
8
+ create-vision: { enabled: true }
9
+ review-vision: { enabled: true }
10
+ innovate-vision: { enabled: true, conditional: "if-needed" }
11
+ # Phase 1 — Product Definition (pre)
7
12
  create-prd: { enabled: true }
8
13
  review-prd: { enabled: true }
9
14
  innovate-prd: { enabled: true, conditional: "if-needed" }
10
15
  user-stories: { enabled: true }
11
16
  review-user-stories: { enabled: true }
12
17
  innovate-user-stories: { enabled: true, conditional: "if-needed" }
18
+ # Phase 2 — Project Foundation (foundation)
19
+ beads: { enabled: true, conditional: "if-needed" }
20
+ tech-stack: { enabled: true }
21
+ coding-standards: { enabled: true }
22
+ tdd: { enabled: true }
23
+ project-structure: { enabled: true }
24
+ # Phase 3 — Development Environment (environment)
25
+ dev-env-setup: { enabled: true }
26
+ design-system: { enabled: true, conditional: "if-needed" }
27
+ git-workflow: { enabled: true }
28
+ automated-pr-review: { enabled: true, conditional: "if-needed" }
29
+ ai-memory-setup: { enabled: true }
30
+ # Phase 4 — Testing Integration (integration)
31
+ add-e2e-testing: { enabled: true, conditional: "if-needed" }
32
+ # Phase 5 — Domain Modeling (modeling)
13
33
  domain-modeling: { enabled: true }
14
34
  review-domain-modeling: { enabled: true }
35
+ # Phase 6 — Architecture Decisions (decisions)
15
36
  adrs: { enabled: true }
16
37
  review-adrs: { enabled: true }
38
+ # Phase 7 — System Architecture (architecture)
17
39
  system-architecture: { enabled: true }
18
40
  review-architecture: { enabled: true }
41
+ # Phase 8 — Specifications (specification)
19
42
  database-schema: { enabled: true, conditional: "if-needed" }
20
43
  review-database: { enabled: true, conditional: "if-needed" }
21
44
  api-contracts: { enabled: true, conditional: "if-needed" }
22
45
  review-api: { enabled: true, conditional: "if-needed" }
23
46
  ux-spec: { enabled: true, conditional: "if-needed" }
24
47
  review-ux: { enabled: true, conditional: "if-needed" }
25
- testing-strategy: { enabled: true }
48
+ # Phase 9 Quality Gates (quality)
26
49
  review-testing: { enabled: true }
50
+ story-tests: { enabled: true }
51
+ create-evals: { enabled: true }
27
52
  operations: { enabled: true }
28
53
  review-operations: { enabled: true }
29
54
  security: { enabled: true }
30
55
  review-security: { enabled: true }
31
- implementation-tasks: { enabled: true }
32
- review-tasks: { enabled: true }
56
+ # Phase 10 Platform Parity (parity)
57
+ platform-parity-review: { enabled: true, conditional: "if-needed" }
58
+ # Phase 11 — Consolidation (consolidation)
59
+ claude-md-optimization: { enabled: true }
60
+ workflow-audit: { enabled: true }
61
+ # Phase 12 — Planning (planning)
62
+ implementation-plan: { enabled: true }
63
+ implementation-plan-review: { enabled: true }
64
+ # Phase 13 — Validation (validation)
33
65
  cross-phase-consistency: { enabled: true }
34
66
  traceability-matrix: { enabled: true }
35
67
  decision-completeness: { enabled: true }
@@ -37,6 +69,14 @@ steps:
37
69
  implementability-dry-run: { enabled: true }
38
70
  dependency-graph-validation: { enabled: true }
39
71
  scope-creep-check: { enabled: true }
72
+ # Phase 14 — Finalization (finalization)
40
73
  apply-fixes-and-freeze: { enabled: true }
41
74
  developer-onboarding-guide: { enabled: true }
42
75
  implementation-playbook: { enabled: true }
76
+ # Phase 15 — Build (build) — stateless, on-demand execution steps
77
+ single-agent-start: { enabled: true }
78
+ single-agent-resume: { enabled: true }
79
+ multi-agent-start: { enabled: true }
80
+ multi-agent-resume: { enabled: true }
81
+ quick-task: { enabled: true }
82
+ new-enhancement: { enabled: true }
@@ -4,32 +4,64 @@ description: Get to code fast with minimal ceremony
4
4
  default_depth: 1
5
5
 
6
6
  steps:
7
+ # Phase 0 — Product Vision (vision)
8
+ create-vision: { enabled: true }
9
+ review-vision: { enabled: true }
10
+ innovate-vision: { enabled: false }
11
+ # Phase 1 — Product Definition (pre)
7
12
  create-prd: { enabled: true }
8
13
  review-prd: { enabled: true }
9
14
  innovate-prd: { enabled: false }
10
15
  user-stories: { enabled: true }
11
16
  review-user-stories: { enabled: true }
12
17
  innovate-user-stories: { enabled: false }
18
+ # Phase 2 — Project Foundation (foundation)
19
+ beads: { enabled: false }
20
+ tech-stack: { enabled: true }
21
+ coding-standards: { enabled: true }
22
+ tdd: { enabled: true }
23
+ project-structure: { enabled: true }
24
+ # Phase 3 — Development Environment (environment)
25
+ dev-env-setup: { enabled: true }
26
+ design-system: { enabled: false }
27
+ git-workflow: { enabled: false }
28
+ automated-pr-review: { enabled: false }
29
+ ai-memory-setup: { enabled: false }
30
+ # Phase 4 — Testing Integration (integration)
31
+ add-e2e-testing: { enabled: false }
32
+ # Phase 5 — Domain Modeling (modeling)
13
33
  domain-modeling: { enabled: false }
14
34
  review-domain-modeling: { enabled: false }
35
+ # Phase 6 — Architecture Decisions (decisions)
15
36
  adrs: { enabled: false }
16
37
  review-adrs: { enabled: false }
38
+ # Phase 7 — System Architecture (architecture)
17
39
  system-architecture: { enabled: false }
18
40
  review-architecture: { enabled: false }
41
+ # Phase 8 — Specifications (specification)
19
42
  database-schema: { enabled: false }
20
43
  review-database: { enabled: false }
21
44
  api-contracts: { enabled: false }
22
45
  review-api: { enabled: false }
23
46
  ux-spec: { enabled: false }
24
47
  review-ux: { enabled: false }
25
- testing-strategy: { enabled: true }
48
+ # Phase 9 Quality Gates (quality)
26
49
  review-testing: { enabled: false }
50
+ story-tests: { enabled: false }
51
+ create-evals: { enabled: false }
27
52
  operations: { enabled: false }
28
53
  review-operations: { enabled: false }
29
54
  security: { enabled: false }
30
55
  review-security: { enabled: false }
31
- implementation-tasks: { enabled: true }
32
- review-tasks: { enabled: false }
56
+ # Phase 10 Platform Parity (parity)
57
+ platform-parity-review: { enabled: false }
58
+ # Phase 11 — Consolidation (consolidation)
59
+ claude-md-optimization: { enabled: false }
60
+ workflow-audit: { enabled: false }
61
+ # Phase 12 — Planning (planning)
62
+ implementation-plan: { enabled: true }
63
+ implementation-plan-review: { enabled: false }
64
+ # Phase 13 — Validation (validation)
33
65
  cross-phase-consistency: { enabled: false }
34
66
  traceability-matrix: { enabled: false }
35
67
  decision-completeness: { enabled: false }
@@ -37,6 +69,14 @@ steps:
37
69
  implementability-dry-run: { enabled: false }
38
70
  dependency-graph-validation: { enabled: false }
39
71
  scope-creep-check: { enabled: false }
72
+ # Phase 14 — Finalization (finalization)
40
73
  apply-fixes-and-freeze: { enabled: false }
41
74
  developer-onboarding-guide: { enabled: false }
42
75
  implementation-playbook: { enabled: true }
76
+ # Phase 15 — Build (build) — stateless, on-demand execution steps
77
+ single-agent-start: { enabled: true }
78
+ single-agent-resume: { enabled: true }
79
+ multi-agent-start: { enabled: true }
80
+ multi-agent-resume: { enabled: true }
81
+ quick-task: { enabled: true }
82
+ new-enhancement: { enabled: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zigrivers/scaffold",
3
- "version": "2.1.2",
3
+ "version": "2.38.0",
4
4
  "description": "AI-powered software project scaffolding pipeline",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -26,6 +26,7 @@
26
26
  "pipeline/",
27
27
  "knowledge/",
28
28
  "methodology/",
29
+ "skills/",
29
30
  "README.md",
30
31
  "LICENSE"
31
32
  ],
@@ -40,11 +41,11 @@
40
41
  "test": "vitest run",
41
42
  "test:coverage": "vitest run --coverage",
42
43
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
43
- "test:bench": "vitest bench",
44
+ "test:perf": "vitest run tests/performance/",
44
45
  "lint": "eslint src/ tests/",
45
46
  "type-check": "tsc --noEmit",
46
47
  "check": "npm run lint && npm run type-check && npm test",
47
- "prepublish": "bash scripts/prepublish.sh"
48
+ "prepublishOnly": "bash scripts/prepublish.sh"
48
49
  },
49
50
  "dependencies": {
50
51
  "@inquirer/prompts": "^7.4.0",
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: review-architecture
3
3
  description: Review system architecture for completeness and downstream readiness
4
+ summary: "Verifies every domain concept lands in a component, every decision constraint is respected, no components are orphaned from data flows, and the module structure minimizes merge conflicts."
4
5
  phase: "architecture"
5
- order: 12
6
+ order: 720
6
7
  dependencies: [system-architecture]
7
- outputs: [docs/reviews/review-architecture.md]
8
+ outputs: [docs/reviews/review-architecture.md, docs/reviews/architecture/review-summary.md, docs/reviews/architecture/codex-review.json, docs/reviews/architecture/gemini-review.json]
9
+ reads: [domain-modeling]
8
10
  conditional: null
9
- knowledge-base: [review-methodology, review-system-architecture]
11
+ knowledge-base: [review-methodology, review-system-architecture, multi-model-review-dispatch, review-step-template]
10
12
  ---
11
13
 
12
14
  ## Purpose
@@ -15,30 +17,51 @@ failure modes: domain coverage gaps, ADR constraint violations, data flow
15
17
  orphans, module structure issues, state inconsistencies, diagram/prose drift,
16
18
  and downstream readiness.
17
19
 
20
+ At depth 4+, dispatches to external AI models (Codex, Gemini) for
21
+ independent review validation.
22
+
18
23
  ## Inputs
19
24
  - docs/system-architecture.md (required) — architecture to review
20
25
  - docs/domain-models/ (required) — for coverage checking
21
26
  - docs/adrs/ (required) — for constraint compliance
22
- - docs/prd.md (required) — for requirement tracing
27
+ - docs/plan.md (required) — for requirement tracing
23
28
 
24
29
  ## Expected Outputs
25
30
  - docs/reviews/review-architecture.md — findings and resolution log
26
31
  - docs/system-architecture.md — updated with fixes
32
+ - docs/reviews/architecture/review-summary.md (depth 4+) — multi-model review synthesis
33
+ - docs/reviews/architecture/codex-review.json (depth 4+, if available) — raw Codex findings
34
+ - docs/reviews/architecture/gemini-review.json (depth 4+, if available) — raw Gemini findings
27
35
 
28
36
  ## Quality Criteria
29
- - All architecture-specific review passes executed
30
- - Domain model coverage verified (every model maps to a component)
31
- - ADR constraint compliance verified
32
- - Data flow completeness verified (no orphaned components)
33
- - Module structure validated for practical concerns
34
- - Downstream readiness confirmed (specification, quality, and planning steps can proceed)
37
+ - (mvp) Domain model coverage verified (every model maps to a component)
38
+ - (mvp) ADR constraint compliance verified
39
+ - (deep) All architecture-specific review passes executed
40
+ - (deep) Data flow completeness verified (no orphaned components)
41
+ - (deep) Module structure assessed for merge conflict risk, circular dependency risk, and import depth
42
+ - (mvp) Downstream readiness confirmed (specification, quality, and planning steps can proceed)
43
+ - (mvp) Every finding categorized P0-P3 with specific component, section, and issue
44
+ - (mvp) Fix plan documented for all P0/P1 findings; fixes applied to system-architecture.md and re-validated
45
+ - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
35
46
 
36
47
  ## Methodology Scaling
37
48
  - **deep**: All 10 review passes (coverage, constraints, data flows, module
38
49
  structure, state consistency, diagram integrity, extension points,
39
- invariants, downstream readiness, internal consistency).
50
+ invariants, downstream readiness, internal consistency). Multi-model
51
+ review dispatched to Codex and Gemini if available, with graceful fallback
52
+ to Claude-only enhanced review.
40
53
  - **mvp**: Domain coverage and ADR compliance checks only.
41
- - **custom:depth(1-5)**: Scale number of passes with depth.
54
+ - **custom:depth(1-5)**: Depth 1-3: scale number of passes with depth.
55
+ Depth 4: all passes + one external model (if CLI available). Depth 5:
56
+ all passes + multi-model with reconciliation.
42
57
 
43
58
  ## Mode Detection
44
- Re-review mode if previous review exists.
59
+ Re-review mode if previous review exists. If multi-model review artifacts exist
60
+ under docs/reviews/architecture/, preserve prior findings still valid.
61
+
62
+ ## Update Mode Specifics
63
+
64
+ - **Detect**: `docs/reviews/review-architecture.md` exists with tracking comment
65
+ - **Preserve**: Prior findings still valid, resolution decisions, multi-model review artifacts
66
+ - **Triggers**: Upstream artifact changed since last review (compare tracking comment dates)
67
+ - **Conflict resolution**: Previously resolved findings reappearing = regression; flag and re-evaluate
@@ -1,34 +1,38 @@
1
1
  ---
2
2
  name: system-architecture
3
3
  description: Design and document system architecture
4
+ summary: "Designs the system blueprint — which components exist, how data flows between them, where each module lives in the directory tree, and where extension points allow custom behavior."
4
5
  phase: "architecture"
5
- order: 11
6
+ order: 710
6
7
  dependencies: [review-adrs]
7
8
  outputs: [docs/system-architecture.md]
9
+ reads: [create-prd, domain-modeling, adrs]
8
10
  conditional: null
9
- knowledge-base: [system-architecture]
11
+ knowledge-base: [system-architecture, domain-modeling]
10
12
  ---
11
13
 
12
14
  ## Purpose
13
15
  Design and document the system architecture, translating domain models and ADR
14
16
  decisions into a concrete component structure, data flows, and module
15
- organization. Project directory structure and module organization are defined here.
17
+ organization. Project directory structure and module organization are defined
18
+ here. This is the blueprint that agents reference when deciding where code
19
+ lives and how components communicate.
16
20
 
17
21
  ## Inputs
18
22
  - docs/domain-models/ (required) — domain models from modeling phase
19
23
  - docs/adrs/ (required) — architecture decisions from decisions phase
20
- - docs/prd.md (required) — requirements driving architecture
24
+ - docs/plan.md (required) — requirements driving architecture
21
25
 
22
26
  ## Expected Outputs
23
27
  - docs/system-architecture.md — architecture document with component design,
24
28
  data flows, module structure, and extension points
25
29
 
26
30
  ## Quality Criteria
27
- - Every domain model lands in a component or module
28
- - Every ADR constraint is respected in the architecture
29
- - All components appear in at least one data flow diagram
30
- - Extension points are both documented and designed (not just listed)
31
- - Project directory structure is defined with file-level granularity
31
+ - (mvp) Every domain model lands in a component or module
32
+ - (mvp) Every ADR constraint is respected in the architecture
33
+ - (mvp) All components appear in at least one data flow diagram
34
+ - (deep) Each extension point has interface definition, example usage scenario, and constraints on what can/cannot be extended
35
+ - (mvp) Project directory structure is defined with file-level granularity
32
36
 
33
37
  ## Methodology Scaling
34
38
  - **deep**: Full architecture document. Component diagrams, data flow diagrams,
@@ -43,3 +47,14 @@ organization. Project directory structure and module organization are defined he
43
47
  If outputs already exist, operate in update mode: read existing content, diff
44
48
  against current project state and new ADRs, propose targeted updates rather
45
49
  than regenerating.
50
+
51
+ ## Update Mode Specifics
52
+ - **Detect prior artifact**: docs/system-architecture.md exists
53
+ - **Preserve**: component structure, data flow diagrams, module organization,
54
+ extension points, deployment topology decisions
55
+ - **Triggers for update**: new ADRs introduced (technology or pattern changes),
56
+ domain models added new bounded contexts, PRD requirements changed system
57
+ boundaries, implementation revealed architectural gaps
58
+ - **Conflict resolution**: if a new ADR contradicts the current architecture,
59
+ update the affected components and data flows while preserving unaffected
60
+ sections; flag breaking changes for user review