@zigrivers/scaffold 2.28.1 → 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 (375) hide show
  1. package/README.md +309 -136
  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 +4 -0
  263. package/knowledge/core/api-design.md +4 -0
  264. package/knowledge/core/automated-review-tooling.md +203 -0
  265. package/knowledge/core/coding-conventions.md +1 -1
  266. package/knowledge/core/database-design.md +4 -0
  267. package/knowledge/core/design-system-tokens.md +4 -0
  268. package/knowledge/core/domain-modeling.md +4 -0
  269. package/knowledge/core/git-workflow-patterns.md +200 -0
  270. package/knowledge/core/operations-runbook.md +5 -1
  271. package/knowledge/core/security-best-practices.md +4 -0
  272. package/knowledge/core/system-architecture.md +5 -1
  273. package/knowledge/core/task-decomposition.md +118 -3
  274. package/knowledge/core/user-story-innovation.md +13 -0
  275. package/knowledge/core/ux-specification.md +13 -0
  276. package/knowledge/execution/enhancement-workflow.md +201 -0
  277. package/knowledge/execution/task-claiming-strategy.md +130 -0
  278. package/knowledge/execution/tdd-execution-loop.md +172 -0
  279. package/knowledge/execution/worktree-management.md +205 -0
  280. package/knowledge/finalization/apply-fixes-and-freeze.md +12 -0
  281. package/knowledge/finalization/developer-onboarding.md +4 -0
  282. package/knowledge/finalization/implementation-playbook.md +83 -5
  283. package/knowledge/product/gap-analysis.md +5 -1
  284. package/knowledge/product/prd-innovation.md +12 -0
  285. package/knowledge/product/vision-craft.md +213 -0
  286. package/knowledge/review/review-adr.md +12 -0
  287. package/knowledge/review/review-api-design.md +13 -0
  288. package/knowledge/review/review-database-design.md +13 -0
  289. package/knowledge/review/review-domain-modeling.md +5 -1
  290. package/knowledge/review/review-implementation-tasks.md +58 -1
  291. package/knowledge/review/review-methodology.md +11 -0
  292. package/knowledge/review/review-operations.md +12 -0
  293. package/knowledge/review/review-prd.md +13 -0
  294. package/knowledge/review/review-security.md +12 -0
  295. package/knowledge/review/review-system-architecture.md +4 -2
  296. package/knowledge/review/review-testing-strategy.md +11 -0
  297. package/knowledge/review/review-user-stories.md +11 -0
  298. package/knowledge/review/review-ux-specification.md +13 -1
  299. package/knowledge/review/review-vision.md +255 -0
  300. package/knowledge/tools/release-management.md +222 -0
  301. package/knowledge/tools/session-analysis.md +215 -0
  302. package/knowledge/tools/version-strategy.md +200 -0
  303. package/knowledge/validation/critical-path-analysis.md +1 -1
  304. package/knowledge/validation/cross-phase-consistency.md +12 -0
  305. package/knowledge/validation/decision-completeness.md +13 -1
  306. package/knowledge/validation/dependency-validation.md +12 -0
  307. package/knowledge/validation/scope-management.md +12 -0
  308. package/knowledge/validation/traceability.md +12 -0
  309. package/methodology/README.md +37 -0
  310. package/methodology/custom-defaults.yml +12 -1
  311. package/methodology/deep.yml +11 -0
  312. package/methodology/mvp.yml +11 -0
  313. package/package.json +3 -3
  314. package/pipeline/architecture/review-architecture.md +18 -7
  315. package/pipeline/architecture/system-architecture.md +11 -8
  316. package/pipeline/build/multi-agent-resume.md +245 -0
  317. package/pipeline/build/multi-agent-start.md +236 -0
  318. package/pipeline/build/new-enhancement.md +456 -0
  319. package/pipeline/build/quick-task.md +381 -0
  320. package/pipeline/build/single-agent-resume.md +210 -0
  321. package/pipeline/build/single-agent-start.md +207 -0
  322. package/pipeline/consolidation/claude-md-optimization.md +11 -8
  323. package/pipeline/consolidation/workflow-audit.md +15 -11
  324. package/pipeline/decisions/adrs.md +7 -5
  325. package/pipeline/decisions/review-adrs.md +14 -6
  326. package/pipeline/environment/ai-memory-setup.md +18 -12
  327. package/pipeline/environment/automated-pr-review.md +10 -4
  328. package/pipeline/environment/design-system.md +9 -7
  329. package/pipeline/environment/dev-env-setup.md +8 -5
  330. package/pipeline/environment/git-workflow.md +3 -1
  331. package/pipeline/finalization/apply-fixes-and-freeze.md +16 -5
  332. package/pipeline/finalization/developer-onboarding-guide.md +22 -8
  333. package/pipeline/finalization/implementation-playbook.md +40 -11
  334. package/pipeline/foundation/beads.md +10 -7
  335. package/pipeline/foundation/coding-standards.md +6 -3
  336. package/pipeline/foundation/project-structure.md +5 -1
  337. package/pipeline/foundation/tdd.md +10 -6
  338. package/pipeline/foundation/tech-stack.md +9 -9
  339. package/pipeline/integration/add-e2e-testing.md +21 -6
  340. package/pipeline/modeling/domain-modeling.md +10 -7
  341. package/pipeline/modeling/review-domain-modeling.md +17 -6
  342. package/pipeline/parity/platform-parity-review.md +31 -11
  343. package/pipeline/planning/implementation-plan-review.md +21 -10
  344. package/pipeline/planning/implementation-plan.md +52 -19
  345. package/pipeline/pre/create-prd.md +22 -7
  346. package/pipeline/pre/innovate-prd.md +10 -8
  347. package/pipeline/pre/innovate-user-stories.md +9 -7
  348. package/pipeline/pre/review-prd.md +11 -2
  349. package/pipeline/pre/review-user-stories.md +12 -3
  350. package/pipeline/pre/user-stories.md +12 -7
  351. package/pipeline/quality/create-evals.md +10 -6
  352. package/pipeline/quality/operations.md +16 -12
  353. package/pipeline/quality/review-operations.md +19 -10
  354. package/pipeline/quality/review-security.md +21 -11
  355. package/pipeline/quality/review-testing.md +23 -12
  356. package/pipeline/quality/security.md +17 -13
  357. package/pipeline/quality/story-tests.md +6 -4
  358. package/pipeline/specification/api-contracts.md +11 -6
  359. package/pipeline/specification/database-schema.md +12 -6
  360. package/pipeline/specification/review-api.md +18 -9
  361. package/pipeline/specification/review-database.md +18 -9
  362. package/pipeline/specification/review-ux.md +20 -10
  363. package/pipeline/specification/ux-spec.md +8 -5
  364. package/pipeline/validation/critical-path-walkthrough.md +14 -7
  365. package/pipeline/validation/cross-phase-consistency.md +14 -7
  366. package/pipeline/validation/decision-completeness.md +14 -7
  367. package/pipeline/validation/dependency-graph-validation.md +15 -7
  368. package/pipeline/validation/implementability-dry-run.md +15 -7
  369. package/pipeline/validation/scope-creep-check.md +15 -7
  370. package/pipeline/validation/traceability-matrix.md +20 -7
  371. package/pipeline/vision/create-vision.md +267 -0
  372. package/pipeline/vision/innovate-vision.md +157 -0
  373. package/pipeline/vision/review-vision.md +149 -0
  374. package/skills/scaffold-pipeline/SKILL.md +33 -18
  375. package/skills/scaffold-runner/SKILL.md +172 -18
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: review-vision
3
+ description: Multi-pass review of the product vision for clarity, coherence, and downstream readiness
4
+ summary: "Stress-tests the vision across five dimensions — clarity, audience precision, competitive rigor, strategic coherence, and whether the PRD can be written from it without ambiguity — and fixes what it finds."
5
+ phase: "vision"
6
+ order: 020
7
+ dependencies: [create-vision]
8
+ outputs: [docs/reviews/vision-review-vision.md]
9
+ conditional: null
10
+ knowledge-base: [review-methodology, vision-craft, multi-model-review-dispatch, review-step-template, review-vision]
11
+ ---
12
+
13
+ ## Purpose
14
+ Deep multi-pass review of the product vision document, targeting the specific
15
+ failure modes of strategic vision artifacts. Identify issues, create a fix plan,
16
+ execute fixes, and re-validate. Ensures the vision is inspiring, coherent,
17
+ strategically sound, and ready for the PRD to consume.
18
+
19
+ ## Inputs
20
+ - docs/vision.md (required) — Vision document to review
21
+ - Project idea or brief (context from user, if available)
22
+
23
+ ## Expected Outputs
24
+ - docs/reviews/vision-review-vision.md — review findings, fix plan, and resolution log
25
+ - docs/vision.md — updated with fixes
26
+
27
+ ## Quality Criteria
28
+ - (mvp) Passes 1 and 5 executed with findings documented
29
+ - All 5 review passes executed with findings documented
30
+ - Every finding categorized by severity (P0-P3)
31
+ - Fix plan created for P0 and P1 findings
32
+ - Fixes applied and re-validated
33
+ - (mvp) Every vision section has content specific enough to derive a PRD without asking strategic clarification questions
34
+ - (depth 4+) Multi-model review findings synthesized with consensus/disagreement analysis
35
+
36
+ ## Methodology Scaling
37
+ - **deep**: All 5 review passes. Full findings report with severity
38
+ categorization. Fixes applied and re-validated.
39
+ - **mvp**: Passes 1 and 5 only (Vision Clarity and Downstream Readiness).
40
+ Focus on blocking gaps — is the vision clear enough to write a PRD from?
41
+ - **custom:depth(1-5)**: Depth 1-2: passes 1 and 5 only. Depth 3: passes 1,
42
+ 2, 5 (add Audience Precision). Depth 4: passes 1-3, 5 (add Competitive
43
+ Rigor). Depth 5: all 5 passes.
44
+
45
+ ## Mode Detection
46
+ If docs/reviews/vision-review-vision.md exists, this is a re-review. Read
47
+ previous findings and focus on whether fixes were applied and any new issues
48
+ introduced.
49
+
50
+ ## Update Mode Specifics
51
+ - **Detect prior artifact**: docs/reviews/vision-review-vision.md exists
52
+ - **Preserve**: Findings from prior review that are still valid, resolution
53
+ decisions made by user
54
+ - **Triggers for update**: Vision document changed since last review, user
55
+ requests re-review after edits
56
+ - **Conflict resolution**: if a previously resolved finding reappears, note
57
+ it as a regression
58
+
59
+ ## Instructions
60
+
61
+ Review docs/vision.md using a structured 5-pass approach. Each pass targets
62
+ a specific failure mode of product vision documents.
63
+
64
+ ### Pass 1: Vision Clarity
65
+
66
+ Evaluate the vision statement and elevator pitch for quality:
67
+ - Is the vision statement inspiring, concise, and memorable?
68
+ - Could someone repeat it from memory after hearing it once?
69
+ - Does it describe positive change in the world, not a product feature?
70
+ - Is it enduring — would it survive a pivot in approach?
71
+ - Apply Roman Pichler's checklist: Inspiring, Shared, Ethical, Concise, Ambitious, Enduring
72
+ - Is the elevator pitch (Geoffrey Moore template) filled in with specific, non-generic language?
73
+ - Does the vision statement pass the "decision test" — could you evaluate a product decision against it?
74
+
75
+ ### Pass 2: Audience Precision
76
+
77
+ Evaluate whether the target audience is defined well enough for product decisions:
78
+ - Are personas defined by behaviors and motivations, not demographics?
79
+ - Is the primary persona clearly identified and distinct from secondary personas?
80
+ - Could two people read the persona descriptions and agree on design decisions?
81
+ - Are "context of use" descriptions specific enough to inform UX decisions?
82
+ - Is there an implicit "Everything User" persona (contradictory needs)?
83
+
84
+ ### Pass 3: Competitive Rigor
85
+
86
+ Evaluate the competitive analysis for honesty and completeness:
87
+ - Are direct competitors identified with specific strengths and weaknesses?
88
+ - Are indirect alternatives considered (different approaches to the same problem)?
89
+ - Is the "do nothing" option considered as a competitor?
90
+ - Is differentiation genuine or wishful thinking?
91
+ - Are competitor strengths acknowledged honestly, not dismissed?
92
+ - Is the market gap validated with evidence, not just asserted?
93
+
94
+ ### Pass 4: Strategic Coherence
95
+
96
+ Evaluate whether the strategic elements hold together:
97
+ - Do guiding principles actually constrain decisions (or are they platitudes)?
98
+ - Would a reasonable team choose the opposite of each principle?
99
+ - Does the anti-vision name specific traps, not just vague disclaimers?
100
+ - Are success criteria measurable and time-bound?
101
+ - Does the business model intuition hold together with the target audience and value proposition?
102
+ - Are strategic risks honest about severity, with actual mitigation thinking?
103
+ - Do all sections tell a consistent story about the same product?
104
+
105
+ ### Pass 5: Downstream Readiness
106
+
107
+ Evaluate whether the PRD can be written from this vision:
108
+ - Can the PRD's problem statement be derived directly from the Problem Space section?
109
+ - Is the target audience clear enough to write user personas and stories?
110
+ - Are guiding principles concrete enough to inform tech stack and architecture decisions?
111
+ - Is there enough competitive context to differentiate features?
112
+ - Are there unresolved Open Questions that would block product definition?
113
+ - Could an AI agent write a PRD from this vision without asking strategic questions?
114
+
115
+ ### Review Process
116
+
117
+ 1. Execute each pass, documenting findings with severity (P0-P3):
118
+ - P0: Vision is fundamentally unclear or contradictory — blocks all downstream work
119
+ - P1: Significant gap that would cause PRD to make wrong assumptions
120
+ - P2: Minor gap or vagueness that could be improved
121
+ - P3: Nitpick or style suggestion
122
+ 2. Create a fix plan for all P0 and P1 findings
123
+ 3. Present the fix plan to the user for approval
124
+ 4. Apply approved fixes to docs/vision.md
125
+ 5. Re-validate that fixes resolved the issues
126
+ 6. Document all findings and resolutions in the review report
127
+
128
+ ### Output Format
129
+
130
+ Create docs/reviews/vision-review-vision.md with:
131
+
132
+ | Pass | Finding | Severity | Fix | Status |
133
+ |------|---------|----------|-----|--------|
134
+ | 1 | Vision statement references a feature ("AI-powered...") | P1 | Reframe around positive change | Fixed |
135
+ | ... | ... | ... | ... | ... |
136
+
137
+ ## After This Step
138
+
139
+ When this step is complete, tell the user:
140
+
141
+ ---
142
+ **Review complete** — `docs/reviews/vision-review-vision.md` created, fixes applied to `docs/vision.md`.
143
+
144
+ **Next:** Run `/scaffold:innovate-vision` (optional) — Explore strategic innovation opportunities.
145
+ Or skip to: `/scaffold:create-prd` — Start product requirements.
146
+
147
+ **Pipeline reference:** `/scaffold:prompt-pipeline`
148
+
149
+ ---
@@ -16,24 +16,26 @@ Use this skill ONLY when the user asks about:
16
16
 
17
17
  ## Phases
18
18
 
19
- 14 phases, each with a slug (used in frontmatter) and display name. Canonical source: `src/types/frontmatter.ts` `PHASES` constant.
20
-
21
- | # | Slug | Display Name |
22
- |---|------|-------------|
23
- | 1 | `pre` | Product Definition |
24
- | 2 | `foundation` | Project Foundation |
25
- | 3 | `environment` | Development Environment |
26
- | 4 | `integration` | Testing Integration |
27
- | 5 | `modeling` | Domain Modeling |
28
- | 6 | `decisions` | Architecture Decisions |
29
- | 7 | `architecture` | System Architecture |
30
- | 8 | `specification` | Specifications |
31
- | 9 | `quality` | Quality Gates |
32
- | 10 | `parity` | Platform Parity |
33
- | 11 | `consolidation` | Consolidation |
34
- | 12 | `planning` | Planning |
35
- | 13 | `validation` | Validation |
36
- | 14 | `finalization` | Finalization |
19
+ 16 phases, each with a slug (used in frontmatter) and display name. Canonical source: `src/types/frontmatter.ts` `PHASES` constant.
20
+
21
+ | # | Slug | Display Name | Description |
22
+ |---|------|-------------|-------------|
23
+ | 0 | `vision` | Product Vision | Transforms your idea into a strategic vision document covering who it's for, what makes it different, and what success looks like. |
24
+ | 1 | `pre` | Product Definition | Translates your vision into a PRD with features, personas, and success criteria, then breaks it into user stories with testable acceptance criteria. |
25
+ | 2 | `foundation` | Project Foundation | Researches and documents technology choices, creates coding standards with linter configs, defines testing strategy, and designs directory layout. |
26
+ | 3 | `environment` | Development Environment | Sets up local dev environment, design system (web only), git workflow with CI and worktrees, automated PR review, and AI memory persistence. |
27
+ | 4 | `integration` | Testing Integration | Auto-detects platform and configures E2E testing — Playwright for web, Maestro for mobile. Skips for backend-only. |
28
+ | 5 | `modeling` | Domain Modeling | Identifies core concepts (entities, relationships, invariants, events) and establishes a shared vocabulary across all docs and code. |
29
+ | 6 | `decisions` | Architecture Decisions | Documents every significant design decision with alternatives and consequences, so future contributors know why. |
30
+ | 7 | `architecture` | System Architecture | Designs the system blueprint — components, data flows, module structure, and extension points. |
31
+ | 8 | `specification` | Specifications | Creates interface specs: database schema with constraints, API contracts with error codes, UX flows with accessibility. Each conditional. |
32
+ | 9 | `quality` | Quality Gates | Reviews testing, generates test skeletons, creates eval checks, designs deployment pipeline, and conducts security review. |
33
+ | 10 | `parity` | Platform Parity | Audits documentation for platform-specific gaps. Skips for single-platform projects. |
34
+ | 11 | `consolidation` | Consolidation | Optimizes CLAUDE.md under 200 lines and audits all workflow docs for consistency. |
35
+ | 12 | `planning` | Planning | Decomposes stories into concrete tasks scoped to ~150 lines and 3 files max, with clear acceptance criteria. |
36
+ | 13 | `validation` | Validation | Seven cross-cutting audits: scope creep, dependency cycles, implementability, traceability, naming drift, broken handoffs, decision completeness. |
37
+ | 14 | `finalization` | Finalization | Applies validation findings, freezes docs, creates onboarding guide, and writes the implementation playbook. |
38
+ | 15 | `build` | Build | Stateless TDD execution: single/multi-agent modes, session resume, quick tasks, and new feature enhancements. |
37
39
 
38
40
  ## Pipeline Order
39
41
 
@@ -93,6 +95,19 @@ Use this skill ONLY when the user asks about:
93
95
  | 48 | Execution | `/scaffold:single-agent-start` | Single-agent TDD execution loop |
94
96
  | 48 | Execution | `/scaffold:multi-agent-start` | Multi-agent — one per worktree |
95
97
 
98
+ ### Phase 15 — Build (stateless, on-demand)
99
+
100
+ 6 steps. Available once Phase 14 is complete. These steps are **stateless** — they don't track completion state and are always available for repeated use.
101
+
102
+ | Order | Step | Description |
103
+ |-------|------|-------------|
104
+ | 1510 | single-agent-start | Start single-agent TDD execution loop |
105
+ | 1520 | single-agent-resume | Resume single-agent work after a break |
106
+ | 1530 | multi-agent-start | Start multi-agent execution loop in a worktree |
107
+ | 1540 | multi-agent-resume | Resume multi-agent work after a break |
108
+ | 1550 | quick-task | Create a focused task for a bug fix, refactor, or small improvement |
109
+ | 1560 | new-enhancement | Add a new feature to an existing project |
110
+
96
111
  ## Standalone Commands
97
112
 
98
113
  | Command | When to Use |
@@ -14,6 +14,9 @@ This skill provides an intelligent interactive layer between the user and the `s
14
14
  - User asks to run any pipeline step by name (e.g., "create the PRD", "set up testing")
15
15
  - User asks to run multiple steps: "run all reviews", "run phases 5-8", "finish the pipeline", "run the next 5 steps"
16
16
  - User asks to re-run groups: "re-run all reviews", "redo quality gates", "re-run from user-stories onward"
17
+ - User says "start building", "begin implementation", "run agent", "start agent"
18
+ - User asks about tools: "bump version", "create a release", "show version"
19
+ - User says "what can I build?" or "what tools are available?"
17
20
  - Working in a project with a `.scaffold/` directory
18
21
 
19
22
  ## Core Workflow: Smart Scaffold Execution
@@ -118,6 +121,54 @@ After the step completes:
118
121
  Want me to continue with the next step?
119
122
  ```
120
123
 
124
+ ## Stateless Step Execution
125
+
126
+ Build phase steps (phase 15) and tools are **stateless** — they don't track completion state. When executing a stateless step, modify the Smart Scaffold Execution workflow:
127
+
128
+ ### Modified Post-Execution (replaces Step 6 for stateless steps)
129
+
130
+ After executing a stateless step:
131
+
132
+ 1. **Skip** `scaffold complete <step>` — stateless steps have no completion state
133
+ 2. **Skip** "show what's next" — build steps are always available
134
+ 3. **Instead**: Show a brief execution summary and offer to run another build step or tool:
135
+ ```
136
+ Step executed. Build phase steps are always available for re-use.
137
+ Run another? single-agent-start | quick-task | new-enhancement | ...
138
+ ```
139
+
140
+ ### Resume Step Visibility
141
+
142
+ `single-agent-resume` and `multi-agent-resume` are conditionally shown — only offer them when evidence of prior agent activity exists:
143
+ - Feature branches (e.g., `bd-*` branches) in git
144
+ - In-progress tasks (Beads `bd list` shows in_progress, or implementation plan tasks marked started)
145
+ - Open PRs from previous agent work
146
+
147
+ If no prior activity is detected, suggest `single-agent-start` or `multi-agent-start` instead.
148
+
149
+ ## Tool Execution
150
+
151
+ Tools (version-bump, release, version, update, dashboard, prompt-pipeline, session-analyzer) are utility commands orthogonal to the pipeline.
152
+
153
+ ### Differences from Pipeline Steps
154
+
155
+ - **No eligibility check** — tools are always available, regardless of pipeline progress
156
+ - **No state tracking** — tools don't appear in `scaffold next` or `scaffold status`
157
+ - **Argument passthrough** — tools support CLI arguments: `scaffold run release --dry-run`, `scaffold run version-bump patch`
158
+
159
+ ### Tool Execution Flow
160
+
161
+ 1. **Skip eligibility** — don't run `scaffold next` to check
162
+ 2. **Preview** — `scaffold run <tool> --auto 2>&1` (same as pipeline steps)
163
+ 3. **Extract decisions** — same process as pipeline steps
164
+ 4. **Execute** — follow the assembled prompt faithfully
165
+ 5. **No completion** — skip `scaffold complete`, skip "what's next"
166
+
167
+ ### Accessing Tools
168
+
169
+ - `scaffold run <tool-name>` — run a specific tool
170
+ - `scaffold list --tools` — show available tools (when implemented)
171
+
121
172
  ## Session Preferences
122
173
 
123
174
  Track these preferences within the current session to avoid re-asking:
@@ -140,7 +191,7 @@ Respond to these natural language requests:
140
191
  |---|---|
141
192
  | "What's next?" / "Next step" | Run `scaffold next`, present eligible steps |
142
193
  | "Where am I?" / "Pipeline status" | Run `scaffold status`, present progress summary |
143
- | "What does X do?" | Run `scaffold info <step>`, present purpose and dependencies |
194
+ | "What does X do?" | Run `scaffold info <step>`, present purpose, summary, and dependencies |
144
195
  | "Is X applicable?" / "Do I need X?" | Run `scaffold check <step>` to detect platform and brownfield status |
145
196
  | "Set up memory" / "Configure AI memory" / "Add memory" | Run `scaffold run ai-memory-setup` — sets up modular rules, optional MCP memory server, and external context |
146
197
  | "Set up testing" / "Add Playwright" / "Add Maestro" | Run `scaffold run add-e2e-testing` — auto-detects web/mobile and configures the right framework(s) |
@@ -150,6 +201,8 @@ Respond to these natural language requests:
150
201
  | "What's left?" / "Show remaining" | Run `scaffold status --compact`, show only pending/in-progress steps |
151
202
  | "Re-run X" / "Redo X" / "Go back to X" | Reset then re-run: `scaffold reset <step> --force && scaffold run <step>` |
152
203
  | "Re-run all reviews" / "Redo quality gates" | Batch re-run — see [Batch Execution](#batch-execution) |
204
+ | "Rework phases 1-5" / "Rework through phase 5" | `scaffold rework --through 5` — see [Rework Mode](#rework-mode) |
205
+ | "Continue rework" / "Resume rework" | `scaffold rework --resume` — see [Rework Mode](#rework-mode) |
153
206
  | "Run phases 5-8" / "Run modeling through specs" | Batch run by phase range — see [Batch Execution](#batch-execution) |
154
207
  | "Run the next N steps" / "Finish the pipeline" | Batch forward run — see [Batch Execution](#batch-execution) |
155
208
  | "Continue the batch" / "Resume" | Resume an interrupted batch from where it stopped |
@@ -158,6 +211,14 @@ Respond to these natural language requests:
158
211
  | "Show the full pipeline" | Run `scaffold list`, present with status indicators |
159
212
  | "Open the dashboard" | Run `scaffold dashboard` |
160
213
  | "Switch to MVP" / "Change depth" | Run `scaffold init --methodology <preset>` |
214
+ | "Start building" / "Begin implementation" | `scaffold run single-agent-start` |
215
+ | "Start multi-agent" / "Set up agents" | `scaffold run multi-agent-start <agent-name>` |
216
+ | "Quick task" / "Bug fix" / "Small fix" | `scaffold run quick-task <description>` |
217
+ | "New feature" / "Add enhancement" | `scaffold run new-enhancement <description>` |
218
+ | "Bump version" / "Version bump" | `scaffold run version-bump` |
219
+ | "Create release" / "Release" | `scaffold run release` |
220
+ | "What tools are available?" | `scaffold list --tools` |
221
+ | "Show version" | `scaffold run version` |
161
222
 
162
223
  ### Re-running Steps
163
224
 
@@ -275,22 +336,24 @@ Map natural language requests to concrete step lists using `scaffold status` out
275
336
 
276
337
  **Phase name reference** (for resolving phase-based requests):
277
338
 
278
- | Phase Name | Also Known As | Steps |
279
- |---|---|---|
280
- | pre | Product Definition | create-prd, review-prd, innovate-prd, user-stories, review-user-stories, innovate-user-stories |
281
- | foundation | Project Foundation | beads, tech-stack, coding-standards, tdd, project-structure |
282
- | environment | Dev Environment | dev-env-setup, design-system, git-workflow, automated-pr-review, ai-memory-setup |
283
- | integration | Testing Integration | add-e2e-testing |
284
- | modeling | Domain Modeling | domain-modeling, review-domain-modeling |
285
- | decisions | Architecture Decisions | adrs, review-adrs |
286
- | architecture | System Architecture | system-architecture, review-architecture |
287
- | specification | Specifications | database-schema, review-database, api-contracts, review-api, ux-spec, review-ux |
288
- | quality | Quality Gates | review-testing, story-tests, create-evals, operations, review-operations, security, review-security |
289
- | parity | Platform Parity | platform-parity-review |
290
- | consolidation | Consolidation | claude-md-optimization, workflow-audit |
291
- | planning | Planning | implementation-plan, implementation-plan-review |
292
- | validation | Validation | cross-phase-consistency, traceability-matrix, decision-completeness, critical-path-walkthrough, implementability-dry-run, dependency-graph-validation, scope-creep-check |
293
- | finalization | Finalization | apply-fixes-and-freeze, developer-onboarding-guide, implementation-playbook |
339
+ | Phase Name | Also Known As | Description | Steps |
340
+ |---|---|---|---|
341
+ | vision | Product Vision | Transforms your idea into a strategic vision document covering who it's for, what makes it different, and what success looks like. | create-vision, review-vision, innovate-vision |
342
+ | pre | Product Definition | Translates your vision into a PRD with features, personas, and success criteria, then breaks it into user stories with testable acceptance criteria. | create-prd, review-prd, innovate-prd, user-stories, review-user-stories, innovate-user-stories |
343
+ | foundation | Project Foundation | Researches and documents technology choices, creates coding standards with linter configs, defines testing strategy, and designs directory layout for parallel agent work. | beads, tech-stack, coding-standards, tdd, project-structure |
344
+ | environment | Dev Environment | Sets up local dev environment, design system (web only), git workflow with CI and worktree scripts, automated PR review, and AI memory persistence. | dev-env-setup, design-system, git-workflow, automated-pr-review, ai-memory-setup |
345
+ | integration | Testing Integration | Auto-detects platform and configures E2E testing — Playwright for web, Maestro for mobile. Skips for backend-only projects. | add-e2e-testing |
346
+ | modeling | Domain Modeling | Identifies core concepts (entities, relationships, invariants, events) and establishes a shared vocabulary across all docs and code. | domain-modeling, review-domain-modeling |
347
+ | decisions | Architecture Decisions | Documents every significant design decision with alternatives considered and consequences, so future contributors know why things are the way they are. | adrs, review-adrs |
348
+ | architecture | System Architecture | Designs the system blueprint — components, data flows, module structure, and extension points that implementation will follow. | system-architecture, review-architecture |
349
+ | specification | Specifications | Creates interface specs for each system layer: database schema with constraints, API contracts with endpoints and error codes, UX flows with accessibility. Each conditional. | database-schema, review-database, api-contracts, review-api, ux-spec, review-ux |
350
+ | quality | Quality Gates | Reviews testing strategy, generates test skeletons from acceptance criteria, creates eval checks, designs deployment pipeline, and conducts OWASP security review. | review-testing, story-tests, create-evals, operations, review-operations, security, review-security |
351
+ | parity | Platform Parity | Audits documentation for platform-specific gaps across target platforms. Skips for single-platform projects. | platform-parity-review |
352
+ | consolidation | Consolidation | Optimizes CLAUDE.md under 200 lines with critical patterns front-loaded, then audits all workflow docs for consistency. | claude-md-optimization, workflow-audit |
353
+ | planning | Planning | Decomposes stories and architecture into concrete tasks scoped to ~150 lines of code and 3 files max, with clear acceptance criteria. | implementation-plan, implementation-plan-review |
354
+ | validation | Validation | Seven cross-cutting audits catching scope creep, dependency cycles, implementability ambiguities, traceability gaps, naming drift, and broken handoffs. | cross-phase-consistency, traceability-matrix, decision-completeness, critical-path-walkthrough, implementability-dry-run, dependency-graph-validation, scope-creep-check |
355
+ | finalization | Finalization | Applies validation findings, freezes docs, creates developer onboarding guide, and writes the implementation playbook agents follow during every coding session. | apply-fixes-and-freeze, developer-onboarding-guide, implementation-playbook |
356
+ | build | Build | Stateless execution steps: TDD implementation loop (single/multi-agent), session resume, quick tasks, and new feature enhancements. | single-agent-start, single-agent-resume, multi-agent-start, multi-agent-resume, quick-task, new-enhancement |
294
357
 
295
358
  ### Resolution Process
296
359
 
@@ -329,7 +392,7 @@ For each step in the batch:
329
392
 
330
393
  #### A. Pre-Step
331
394
 
332
- 1. **Report progress**: `"Step 3/7: operations — Deployment, monitoring, incident response"`
395
+ 1. **Report progress**: Use the step's summary from `scaffold info <step>` for context: `"Step 3/7: operations — Designs your deployment pipeline, defines monitoring metrics with alert thresholds, and writes incident response procedures."`
333
396
  2. **If re-run**: Reset the step first: `scaffold reset <step> --force`
334
397
  3. **Check eligibility**: Run `scaffold next` and verify the step is eligible. If not, report the blocker and either:
335
398
  - Wait for user input (if the blocker is external)
@@ -443,6 +506,97 @@ Action: These are independent (no deps between them) — run sequentially
443
506
  Note: These are quick, low-decision steps — usually fully autonomous
444
507
  ```
445
508
 
509
+ ## Rework Mode
510
+
511
+ Rework mode enables systematic re-execution of entire phases for depth improvement or quality cleanup. It uses a persistent session file (`.scaffold/rework.json`) that survives context resets.
512
+
513
+ ### Detection
514
+
515
+ On activation, check for an active rework session:
516
+
517
+ ```bash
518
+ cat .scaffold/rework.json 2>/dev/null
519
+ ```
520
+
521
+ If present, enter rework mode automatically and show status: "Active rework: 15/23 steps completed, currently in Phase 3".
522
+
523
+ ### Natural Language Triggers
524
+
525
+ | User Says | Action |
526
+ |---|---|
527
+ | "rework phases 1-5" | `scaffold rework --through 5` → enter rework mode |
528
+ | "rework everything" | `scaffold rework` (requires --phases or --through flag) |
529
+ | "rework phases 1-3 excluding 2" | `scaffold rework --through 3 --exclude 2` |
530
+ | "continue rework" / "resume rework" | `scaffold rework --resume` → continue from where it stopped |
531
+ | "stop rework" / "cancel rework" | `scaffold rework --clear` |
532
+ | "rework status" | Read `.scaffold/rework.json`, show progress |
533
+
534
+ ### Creating a Rework Session
535
+
536
+ When the user requests a rework:
537
+
538
+ 1. Run `scaffold rework --phases <list> --auto --format json` (or `--through N`)
539
+ 2. The CLI creates `.scaffold/rework.json` with the execution plan and resets selected steps in state.json
540
+ 3. Show the plan summary: step count, phases, depth
541
+
542
+ ### Executing Rework Steps
543
+
544
+ For each step in the rework session:
545
+
546
+ 1. Read the current rework session: `scaffold rework --resume --format json`
547
+ 2. Identify the next pending step from the session
548
+ 3. **If config.fix is true and step name starts with `review-`**: Add auto-fix instruction
549
+ ```bash
550
+ scaffold run <step> --auto --instructions "Apply fixes directly to the reviewed artifact instead of just listing issues. Summarize what you changed." 2>&1
551
+ ```
552
+ 4. **Otherwise**: Run normally
553
+ ```bash
554
+ scaffold run <step> --auto 2>&1
555
+ ```
556
+ 5. Follow the normal Smart Scaffold Execution workflow (preview → extract decisions → execute)
557
+ 6. After completion:
558
+ ```bash
559
+ scaffold rework --advance <step> # Update rework session
560
+ scaffold complete <step> # Update pipeline state
561
+ ```
562
+
563
+ ### Fresh Mode
564
+
565
+ If the rework config has `fresh: true`, delete the existing artifact before running the step:
566
+ - Read the step's `produces` paths from the assembled prompt metadata
567
+ - Delete those files before executing the step
568
+ - The step will run in fresh mode (no existing artifact detected)
569
+
570
+ ### Phase Boundary Pauses
571
+
572
+ When `config.auto` is false (the default):
573
+ - After completing the last step in a phase, pause execution
574
+ - Show a phase summary (use the phase description from the reference table for context):
575
+ ```
576
+ Phase 1 (Product Definition) complete: 3/3 steps
577
+ Translates your vision into a PRD with features, personas, and success criteria,
578
+ then breaks it into user stories with testable acceptance criteria.
579
+ ✓ create-prd — updated docs/plan.md
580
+ ✓ review-prd — 2 issues found and fixed
581
+ ✓ innovate-prd — added competitive analysis
582
+
583
+ Next: Phase 2 (Project Foundation) — Researches and documents technology choices,
584
+ creates coding standards with linter configs, defines testing strategy, and designs
585
+ directory layout for parallel agent work.
586
+
587
+ Continue? [Yes / Stop here]
588
+ ```
589
+ - Wait for user confirmation before proceeding to the next phase
590
+
591
+ When `config.auto` is true, skip pauses and continue through all steps.
592
+
593
+ ### Completion
594
+
595
+ When `scaffold rework --advance` reports all steps done (returns `all_done: true` in JSON):
596
+ 1. Show the full rework summary (similar to batch summary)
597
+ 2. The session file is automatically cleaned up by the CLI
598
+ 3. Show overall pipeline status via `scaffold status`
599
+
446
600
  ## Error Handling
447
601
 
448
602
  | Situation | Response |