@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
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Scaffold
2
2
 
3
- A TypeScript CLI that assembles AI-powered prompts at runtime to guide you from "I have an idea" to working software. Scaffold walks you through 36 structured pipeline steps — organized into 9 phases — and Claude Code handles the research, planning, and implementation for you.
3
+ A TypeScript CLI that assembles AI-powered prompts at runtime to guide you from "I have an idea" to working software. Scaffold walks you through 60 structured pipeline steps — organized into 16 phases — plus 7 utility tools, and Claude Code handles the research, planning, and implementation for you.
4
4
 
5
5
  By the end, you'll have a fully planned, standards-documented, implementation-ready project with working code.
6
6
 
@@ -16,7 +16,12 @@ Here's how it works:
16
16
 
17
17
  3. **Follow the dependency graph** — Scaffold tracks which steps are complete, which are eligible, and which are blocked. Run `scaffold next` to see what's unblocked, or `scaffold status` for the full picture. Each step produces a specific artifact — a planning document, architecture decision, specification, or actual code.
18
18
 
19
- You can run steps via the CLI (`scaffold run create-prd`) or via slash commands in Claude Code (`/scaffold:create-prd`). Either way, Scaffold constructs the prompt and Claude does the work.
19
+ You can run steps two ways:
20
+
21
+ - **CLI**: `scaffold run create-prd` — the assembly engine builds a full prompt from the meta-prompt, knowledge base entries, and project context. Best for the structured pipeline with dependency tracking.
22
+ - **Slash commands**: `/scaffold:create-prd` in Claude Code — uses pre-rendered, self-contained prompts. Best for quick access to individual commands without the full pipeline ceremony.
23
+
24
+ Either way, Scaffold constructs the prompt and Claude does the work. The CLI tracks pipeline state and dependencies; slash commands are fire-and-forget.
20
25
 
21
26
  ## Key Concepts
22
27
 
@@ -24,15 +29,17 @@ You can run steps via the CLI (`scaffold run create-prd`) or via slash commands
24
29
 
25
30
  **Assembly engine** — At execution time, Scaffold builds a 7-section prompt from: system metadata, the meta-prompt, knowledge base entries, project context (artifacts from prior steps), methodology settings, layered instructions, and depth-specific execution guidance.
26
31
 
27
- **Knowledge base** — 38 domain expertise entries in `knowledge/` covering testing strategy, domain modeling, API design, security review, and more. These get injected into prompts based on each step's `knowledge-base` frontmatter field. Teams can add project-local overrides in `.scaffold/knowledge/` that layer on top of the global entries.
32
+ **Knowledge base** — 60 domain expertise entries in `knowledge/` organized in seven categories (core, product, review, validation, finalization, execution, tools) covering testing strategy, domain modeling, API design, security best practices, eval craft, TDD execution, task claiming, worktree management, release management, and more. These get injected into prompts based on each step's `knowledge-base` frontmatter field. Knowledge files with a `## Deep Guidance` section are optimized for CLI assembly — only the deep guidance content is loaded, avoiding redundancy with the prompt text. Teams can add project-local overrides in `.scaffold/knowledge/` that layer on top of the global entries.
28
33
 
29
34
  **Methodology presets** — Three built-in presets control which steps run and how deep the analysis goes:
30
- - **deep** (depth 5) — all 36 steps, exhaustive analysis
35
+ - **deep** (depth 5) — all steps enabled, exhaustive analysis
31
36
  - **mvp** (depth 1) — 7 critical steps, get to code fast
32
37
  - **custom** (depth 1-5) — you choose which steps to enable and how deep each one goes
33
38
 
34
39
  **Depth scale** (1-5) — Controls how thorough each step's output is, from "focus on the core deliverable" (1) to "explore all angles, tradeoffs, and edge cases" (5). Depth resolves with 4-level precedence: CLI flag > step override > custom default > preset default.
35
40
 
41
+ **Multi-model validation** — At depth 4-5, all 19 review and validation steps can dispatch independent reviews to Codex and/or Gemini CLIs. Two independent models catch more blind spots than one. When both CLIs are available, findings are reconciled by confidence level (both agree = high confidence, single model P0 = still actionable). Auth is verified before every dispatch (`codex login status`, `NO_BROWSER=true gemini -p "respond with ok"`). See the [Multi-Model Review](#multi-model-review) section.
42
+
36
43
  **State management** — Pipeline progress is tracked in `.scaffold/state.json` with atomic file writes and crash recovery. An advisory lock prevents concurrent runs. Decisions are logged to an append-only `decisions.jsonl`.
37
44
 
38
45
  **Dependency graph** — Steps declare their prerequisites in frontmatter. Scaffold builds a DAG, runs topological sort (Kahn's algorithm), detects cycles, and computes which steps are eligible at any point.
@@ -57,16 +64,22 @@ The AI coding assistant that runs the assembled prompts. Claude Code is a comman
57
64
 
58
65
  ### Optional
59
66
 
67
+ **Codex CLI** (for multi-model review)
68
+ Independent code review from a different AI model. Used at depth 4-5 by all review steps.
69
+ - Install: `npm install -g @openai/codex`
70
+ - Requires: ChatGPT subscription (Plus/Pro/Team)
71
+ - Verify: `codex --version`
72
+
73
+ **Gemini CLI** (for multi-model review)
74
+ Independent review from Google's model. Can run alongside or instead of Codex.
75
+ - Install: `npm install -g @google/gemini-cli`
76
+ - Requires: Google account (free tier available)
77
+ - Verify: `gemini --version`
78
+
60
79
  **Playwright MCP** (web apps only)
61
80
  Lets Claude control a real browser for visual testing and screenshots.
62
81
  - Install: `claude mcp add playwright npx @playwright/mcp@latest`
63
82
 
64
- **ChatGPT subscription** (for multi-model review)
65
- One optional step (`multi-model-review`) sets up automated code review using both Claude and OpenAI's Codex. Requires a ChatGPT subscription (Plus, Pro, or Team). Skip this step if you don't have one.
66
-
67
- **Codex CLI and/or Gemini CLI** (for multi-model stories review)
68
- One optional step (`user-stories-multi-model-review`) runs independent AI reviewers against your user stories. You need at least one of: Codex CLI (requires ChatGPT subscription) or Gemini CLI (free tier available). See [Multi-Model Stories Review Setup](docs/multi-model-stories-review-setup.md).
69
-
70
83
  ## Installation
71
84
 
72
85
  Scaffold has two parts that install separately:
@@ -93,16 +106,39 @@ brew install scaffold
93
106
 
94
107
  Verify: `scaffold version`
95
108
 
96
- ### Step 2: Add slash commands (optional)
109
+ ### Step 2: Add the plugin (recommended)
97
110
 
98
- If you want `/scaffold:` commands inside Claude Code, also install the plugin:
111
+ Install the Scaffold plugin inside Claude Code for slash commands AND the interactive runner skill:
99
112
 
100
113
  ```
101
114
  /plugin marketplace add zigrivers/scaffold
102
115
  /plugin install scaffold@zigrivers-scaffold
103
116
  ```
104
117
 
105
- This is optional — everything the plugin does can also be done with `scaffold run <step>` from the CLI.
118
+ This gives you:
119
+ - **Slash commands** (`/scaffold:create-prd`, `/scaffold:tdd`, etc.) — quick access to any pipeline step
120
+ - **Scaffold Runner skill** — intelligent interactive wrapper that surfaces decision points (depth level, strictness, optional sections) before execution instead of letting Claude pick defaults silently
121
+ - **Pipeline reference skill** — shows pipeline ordering, dependencies, and completion status
122
+ - **Multi-model dispatch skill** — correct invocation patterns for Codex and Gemini CLIs
123
+
124
+ **Usage** — just tell Claude Code what you want in natural language:
125
+ ```
126
+ "Run the next scaffold step" → previews prompt, asks decisions, executes
127
+ "Run scaffold create-prd" → same for a specific step
128
+ "Where am I in the pipeline?" → shows progress and next eligible steps
129
+ "What's left?" → compact view of remaining steps only
130
+ "Skip design-system and add-e2e-testing" → batch skip with reason
131
+ "Is add-e2e-testing applicable?" → checks platform detection without running
132
+ "Use depth 3 for everything" → remembers preference for the session
133
+ ```
134
+
135
+ The plugin is optional — everything it does can also be done with `scaffold run <step>` from the CLI. But you lose the interactive decision surfacing without the Scaffold Runner skill.
136
+
137
+ > **CLI-only users**: If you prefer not to install the plugin, add skills with one command:
138
+ > ```bash
139
+ > scaffold skill install
140
+ > ```
141
+ > This copies the Scaffold Runner, Pipeline Reference, and Multi-Model Dispatch skills to `.claude/skills/` in your project.
106
142
 
107
143
  ## Updating
108
144
 
@@ -126,160 +162,413 @@ brew upgrade scaffold
126
162
 
127
163
  Or: `/plugin marketplace update zigrivers-scaffold`
128
164
 
165
+ ### Existing projects
166
+
167
+ After upgrading the CLI, existing projects migrate automatically. Run `scaffold status` in your project directory — the state manager detects and renames old step keys, removes retired steps, normalizes artifact paths, and persists the changes atomically. No manual editing of `.scaffold/state.json` is needed.
168
+
169
+ **Step migrations handled automatically:**
170
+ - `add-playwright` / `add-maestro` → `add-e2e-testing`
171
+ - `multi-model-review` → `automated-pr-review`
172
+ - `user-stories-multi-model-review` → removed (folded into `review-user-stories`)
173
+ - `claude-code-permissions` → removed (folded into `git-workflow` + `tech-stack`)
174
+ - `multi-model-review-tasks` → removed (folded into `implementation-plan-review`)
175
+ - `testing-strategy` → `tdd`, `implementation-tasks` → `implementation-plan`, `review-tasks` → `implementation-plan-review`
176
+
177
+ The PRD is always created as `docs/plan.md`. If you have a legacy `docs/prd.md` from an older version, the context gatherer resolves aliased paths so downstream steps find your PRD regardless.
178
+
129
179
  ## Quick Start
130
180
 
131
- **1. Create a new project and initialize Scaffold**
181
+ The fastest way to use Scaffold is through natural language inside Claude Code. The Scaffold Runner skill handles pipeline navigation, surfaces decision points before Claude picks defaults, and tracks your progress automatically. The examples below show what you'd type in a Claude Code session.
182
+
183
+ ### Starting a Brand New Project
184
+
185
+ Let's say you want to build a neighborhood tool lending library — an app where neighbors can list tools they own and borrow from each other. Here's how that looks end to end.
186
+
187
+ **Set up the project** (one-time, in your terminal):
132
188
 
133
189
  ```bash
134
- mkdir my-project && cd my-project
190
+ mkdir tool-library && cd tool-library
135
191
  git init
136
192
  scaffold init
137
193
  ```
138
194
 
139
- The init wizard detects your project type and walks you through choosing a methodology preset. It creates `.scaffold/` with your config, state, and decisions log.
195
+ The init wizard detects that this is a brand new project and asks you to pick a methodology. Choose **mvp** if you want to get to working code fast — it runs only 7 critical steps instead of the full 60. You can always switch to `deep` or `custom` later.
140
196
 
141
- **2. Define your product**
197
+ **Open Claude Code in your project directory**, then start talking:
142
198
 
143
- ```bash
144
- scaffold run create-prd
199
+ ```
200
+ "I want to build a neighborhood tool lending library where neighbors can
201
+ list tools they own, browse what's available nearby, and request to borrow
202
+ items. Run the first scaffold step."
145
203
  ```
146
204
 
147
- Or in Claude Code:
205
+ The runner picks up `create-vision` (the first eligible step), asks you a few strategic questions about your idea — who's the audience, what makes this different from existing apps, what does success look like — and produces `docs/vision.md`. This becomes the foundation everything else builds on.
148
206
 
149
207
  ```
150
- /scaffold:create-prd I want to build a recipe sharing app where users can save, organize, and share recipes with friends
208
+ "Run the next scaffold step"
151
209
  ```
152
210
 
153
- Claude asks clarifying questions about your idea, researches best practices, and produces a detailed product requirements document. This becomes the foundation that all later steps build on.
211
+ Now it runs `create-prd`. Claude translates your vision into a detailed product requirements document with features, user personas, success criteria, and scope boundaries. The output lands in `docs/plan.md`.
212
+
213
+ ```
214
+ "Next step"
215
+ ```
216
+
217
+ `review-prd` — Claude reviews the PRD for gaps, ambiguity, and completeness, then suggests improvements. You decide which suggestions to accept.
218
+
219
+ ```
220
+ "Keep going"
221
+ ```
222
+
223
+ `user-stories` — Claude breaks the PRD into detailed user stories with acceptance criteria. Each story maps back to a specific requirement so nothing falls through the cracks.
224
+
225
+ ```
226
+ "What's left?"
227
+ ```
228
+
229
+ The runner shows your remaining steps and which ones are unblocked. With the `mvp` preset, you're almost there — just `review-user-stories`, `tdd`, `implementation-plan`, and `implementation-playbook` remain.
230
+
231
+ ```
232
+ "Finish the remaining steps"
233
+ ```
234
+
235
+ The runner executes each remaining step in order, pausing to surface decisions that need your input (testing framework preferences, depth level for reviews, etc.) rather than letting Claude guess silently.
236
+
237
+ Once the pipeline is complete:
238
+
239
+ ```
240
+ "Start building"
241
+ ```
242
+
243
+ Claude picks up the first implementation task and begins writing code using TDD — tests first, then implementation. Your project now has architecture docs, coding standards, a test strategy, and a task graph, all produced from your original idea.
244
+
245
+ > **CLI equivalent**: Everything above can also be done with `scaffold run create-vision`, `scaffold run create-prd`, `scaffold next`, etc. The runner skill adds interactive decision surfacing on top of these commands.
246
+
247
+ ### Adding Scaffold to an Existing Project
154
248
 
155
- **3. See what's next**
249
+ Say you have a Next.js app with a handful of features built, but no documentation, formal test strategy, or architecture docs. Scaffold can backfill all of that.
250
+
251
+ **In your project root:**
156
252
 
157
253
  ```bash
158
- scaffold next
254
+ cd ~/projects/my-nextjs-app
255
+ scaffold init
159
256
  ```
160
257
 
161
- Scaffold shows you which steps are now unblocked based on the dependency graph.
258
+ Scaffold detects that you already have code (package.json, source files, git history) and classifies the project as **brownfield**. It suggests the `deep` methodology since existing projects benefit from thorough documentation, but you can choose any preset.
162
259
 
163
- **4. Keep following the pipeline**
260
+ If you already have docs that match Scaffold's expected outputs (a PRD, architecture doc, etc.), bootstrap your state:
164
261
 
165
262
  ```bash
166
- scaffold run review-prd
167
- scaffold run user-stories
168
- # ... and so on
263
+ scaffold adopt
264
+ ```
265
+
266
+ This scans your project for existing artifacts and marks those pipeline steps as complete so you don't redo work.
267
+
268
+ **Now open Claude Code and skip what doesn't apply:**
269
+
270
+ ```
271
+ "Skip create-vision and create-prd — I already know what I'm building"
272
+ ```
273
+
274
+ The runner marks those steps as skipped with your reason logged.
275
+
276
+ ```
277
+ "Run tech-stack"
278
+ ```
279
+
280
+ Claude scans your existing dependencies, framework choices, and configuration, then documents everything in `docs/tech-stack.md` — formalizing decisions you've already made so future contributors (and AI agents) understand the rationale.
281
+
282
+ ```
283
+ "Run tdd"
284
+ ```
285
+
286
+ Claude sets up a testing strategy tailored to your existing stack — test runner config, coverage targets, TDD workflow conventions. If you already have some tests, it builds around them.
287
+
288
+ ```
289
+ "Run coding-standards"
290
+ ```
291
+
292
+ Claude analyzes your existing code patterns and creates `docs/coding-standards.md` with linter and formatter configs that match how you're already writing code.
293
+
294
+ Continue through whatever steps make sense — `git-workflow`, `security`, `implementation-plan` — and skip the rest.
295
+
296
+ **Later, when you want to add a new feature with full Scaffold rigor:**
297
+
298
+ ```
299
+ "Run new-enhancement"
300
+ ```
301
+
302
+ Claude walks you through adding a feature the right way — updating the PRD, creating new user stories, setting up tasks with dependencies, and kicking off implementation. All the planning docs stay in sync.
303
+
304
+ ### Checking Your Progress
305
+
306
+ Scaffold persists your pipeline state in `.scaffold/state.json`, so you can close Claude Code, take a break, and pick up right where you left off.
307
+
308
+ **In Claude Code** (natural language):
309
+
169
310
  ```
311
+ "Where am I in the pipeline?" → full progress view with phase breakdown
312
+ "What's next?" → shows the next unblocked step(s)
313
+ "What's left?" → compact view of remaining steps only
314
+ ```
315
+
316
+ **From the terminal** (CLI):
317
+
318
+ ```bash
319
+ scaffold status # full pipeline progress
320
+ scaffold status --compact # remaining work only
321
+ scaffold next # next eligible step(s)
322
+ scaffold dashboard # open a visual progress dashboard in your browser
323
+ ```
324
+
325
+ ### Tips for New Users
170
326
 
171
- Each step tells you what to run next. Use `scaffold status` at any time to see the full pipeline state, or `scaffold dashboard` to open a visual progress dashboard in your browser.
327
+ - **You don't need every step.** The `mvp` preset runs just 7 steps and gets you building fast. Start there and switch to `deep` or `custom` if you want more rigor.
328
+ - **"I'm not sure" is a valid answer.** When Claude asks a question you can't answer yet, say so — it'll suggest reasonable defaults and explain the trade-offs. You can revisit any decision later.
329
+ - **You can re-run any step.** If your thinking evolves, use `scaffold reset <step>` to reset it, then run it again. Scaffold uses update mode — it improves the existing artifact rather than starting from scratch.
330
+ - **Every step produces a real document.** Vision docs, PRDs, architecture decisions, test strategies — these all land in your project's `docs/` folder as markdown files. They're not throwaway; they're the source of truth your code is built from.
331
+ - **The pipeline is a guide, not a cage.** Skip steps that don't apply (`scaffold skip <step> --reason "..."`). Run them out of order if you know what you're doing. Scaffold tracks dependencies so it'll tell you if you're missing a prerequisite.
332
+ - **Depth controls thoroughness.** Each step runs at a depth from 1 (focused, fast) to 5 (exhaustive). The mvp preset defaults to depth 1; deep defaults to 5. You can override per step or per session: `"Use depth 3 for everything"`.
172
333
 
173
334
  ## The Pipeline
174
335
 
336
+ ### Phase 0 — Product Vision (vision)
337
+
338
+ You describe your idea and Claude turns it into a strategic vision document covering who it's for, what makes it different, and what success looks like. The review step stress-tests the vision for gaps, and the innovate step explores market positioning opportunities. Without this, later steps lack a clear North Star and features drift.
339
+
340
+ | Step | What It Does |
341
+ |------|-------------|
342
+ | `create-vision` | Claude asks about your idea — who it's for, what problem it solves, what makes it different — and produces a vision document with elevator pitch, target audience, competitive positioning, guiding principles, and success criteria. |
343
+ | `review-vision` | Claude 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. |
344
+ | `innovate-vision` | Claude explores untapped opportunities — adjacent markets, AI-native capabilities, ecosystem partnerships, and contrarian positioning — and proposes innovations for your approval. *(optional)* |
345
+
175
346
  ### Phase 1 — Product Definition (pre)
176
347
 
177
- Define what you're building.
348
+ Claude translates your vision into a detailed product requirements document (PRD) with features, user personas, constraints, and success criteria. Then it breaks the PRD into user stories — specific things users can do, each with testable acceptance criteria in Given/When/Then format. Review and innovation steps audit for gaps and suggest enhancements. Without this, you're building without a spec.
178
349
 
179
350
  | Step | What It Does |
180
351
  |------|-------------|
181
- | `create-prd` | Creates a detailed product requirements document from your idea |
182
- | `innovate-prd` | Reviews the PRD for missing pieces and suggests innovations |
183
- | `review-prd` | Structured review of the PRD for completeness and quality |
184
- | `user-stories` | Creates detailed user stories for every PRD feature |
185
- | `innovate-user-stories` | Gap analysis and UX innovation pass on user stories |
186
- | `review-user-stories` | Structured review of user stories for coverage and clarity |
352
+ | `create-prd` | Claude translates your vision (or idea, if no vision exists) into a product requirements document with problem statement, user personas, prioritized feature list, constraints, non-functional requirements, and measurable success criteria. |
353
+ | `innovate-prd` | Claude analyzes the PRD for feature-level gaps — competitive blind spots, UX enhancements, AI-native possibilities — and proposes additions for your approval. *(optional)* |
354
+ | `review-prd` | Claude reviews the PRD across eight passes — problem rigor, persona coverage, feature scoping, success criteria, internal consistency, constraints, non-functional requirements — and fixes blocking issues. |
355
+ | `user-stories` | Claude breaks every PRD feature into user stories ("As a [persona], I want [action], so that [outcome]") organized by epic, each with testable acceptance criteria in Given/When/Then format. |
356
+ | `innovate-user-stories` | Claude identifies UX enhancement opportunities — progressive disclosure, smart defaults, accessibility improvements — and integrates approved changes into existing stories. *(optional)* |
357
+ | `review-user-stories` | Claude verifies every PRD feature maps to at least one story, checks that acceptance criteria are specific enough to test, validates story independence, and builds a requirements traceability index at higher depths. |
187
358
 
188
- ### Phase 2 — Domain Modeling (modeling)
359
+ ### Phase 2 — Project Foundation (foundation)
189
360
 
190
- Understand the problem domain.
361
+ Claude researches and documents your technology choices (language, framework, database) with rationale, creates coding standards tailored to your stack with actual linter configs, defines your testing strategy and test pyramid, and designs a directory layout optimized for parallel AI agent work. Without this, agents guess at conventions and produce inconsistent code.
191
362
 
192
363
  | Step | What It Does |
193
364
  |------|-------------|
194
- | `domain-modeling` | DDD analysis bounded contexts, aggregates, value objects |
195
- | `review-domain-modeling` | Review of domain model for correctness and completeness |
365
+ | `beads` | Sets up Beads task tracking with a lessons-learned file for cross-session learning, and creates the initial CLAUDE.md skeleton with core principles and workflow conventions. *(optional)* |
366
+ | `tech-stack` | Claude researches technology options for your project — language, framework, database, hosting, auth — evaluates each against your requirements, and documents every choice with rationale and alternatives considered. |
367
+ | `coding-standards` | Claude creates coding standards tailored to your tech stack — naming conventions, error handling patterns, import organization, AI-specific rules — and generates working linter and formatter config files. |
368
+ | `tdd` | Claude defines your testing approach — which types of tests to write at each layer, coverage targets, what to mock and what not to, test data patterns — so agents write the right tests from the start. |
369
+ | `project-structure` | Claude designs a directory layout optimized for parallel AI agent work (minimizing file conflicts), documents where each type of file belongs, and creates the actual directories in your project. |
196
370
 
197
- ### Phase 3 — Architecture Decisions (decisions)
371
+ ### Phase 3 — Development Environment (environment)
198
372
 
199
- Record key technical decisions.
373
+ Claude sets up your local dev environment with one-command startup and live reload, creates a design system with color palette, typography, and component patterns (web apps only), configures your git branching strategy with CI pipeline and worktree scripts for parallel agents, optionally sets up automated PR review with multi-model validation, and configures AI memory so conventions persist across sessions. Without this, you're manually configuring tooling instead of building.
200
374
 
201
375
  | Step | What It Does |
202
376
  |------|-------------|
203
- | `adrs` | Creates Architecture Decision Records for major choices |
204
- | `review-adrs` | Review of ADRs for completeness and rationale |
377
+ | `dev-env-setup` | Claude configures your project so `make dev` (or equivalent) starts everything — dev server with live reload, local database, environment variables — and documents the setup in a getting-started guide. |
378
+ | `design-system` | Claude creates a visual language — color palette (WCAG-compliant), typography scale, spacing system, component patterns — and generates working theme config files for your frontend framework. *(web apps only)* |
379
+ | `git-workflow` | Claude sets up your branching strategy, commit message format, PR workflow, CI pipeline with lint and test jobs, and worktree scripts so multiple AI agents can work in parallel without conflicts. |
380
+ | `automated-pr-review` | Claude configures automated code review — using Codex and/or Gemini CLIs for dual-model review when available, or an external bot — with severity definitions and review criteria tailored to your project. *(optional)* |
381
+ | `ai-memory-setup` | Claude extracts conventions from your docs into path-scoped rule files that load automatically, optimizes CLAUDE.md with a pointer pattern, and optionally sets up persistent cross-session memory. |
205
382
 
206
- ### Phase 4 — System Architecture (architecture)
383
+ ### Phase 4 — Testing Integration (integration)
207
384
 
208
- Design the system.
385
+ Claude auto-detects your platform (web or mobile) and configures end-to-end testing — Playwright for web apps, Maestro for mobile/Expo. Skips automatically for backend-only projects. Without this, your test pyramid has no top level.
209
386
 
210
387
  | Step | What It Does |
211
388
  |------|-------------|
212
- | `system-architecture` | Component design, layering, patterns, scalability |
213
- | `review-architecture` | Structured architecture review |
389
+ | `add-e2e-testing` | Claude detects whether your project is web or mobile, then configures Playwright (web) or Maestro (mobile) with a working smoke test, baseline screenshots, and guidance on when to use E2E vs. unit tests. *(optional)* |
214
390
 
215
- ### Phase 5 — Specifications (specification)
391
+ ### Phase 5 — Domain Modeling (modeling)
216
392
 
217
- Detail the interfaces.
393
+ Claude analyzes your user stories to identify all the core concepts in your project — the entities (things like Users, Orders, Tools), their relationships, the rules that must always be true, and the events that happen when state changes. This becomes the shared language between all your docs and code. Without this, different docs use different names for the same concept and agents create duplicate logic.
218
394
 
219
395
  | Step | What It Does |
220
396
  |------|-------------|
221
- | `database-schema` | Database design normalization, indexing, migrations |
222
- | `review-database` | Review of database schema |
223
- | `api-contracts` | REST/GraphQL contracts, versioning, error handling |
224
- | `review-api` | Review of API contracts |
225
- | `ux-spec` | Interaction design, usability, user flows |
226
- | `review-ux` | Review of UX specification |
397
+ | `domain-modeling` | Claude analyzes your user stories to identify the core concepts in your project (entities, their relationships, the rules that must always hold true), and establishes a shared vocabulary that all docs and code will use. |
398
+ | `review-domain-modeling` | Claude verifies every PRD feature maps to a domain entity, checks that business rules are enforceable, and ensures the shared vocabulary is consistent across all project files. |
227
399
 
228
- ### Phase 6 — Quality (quality)
400
+ ### Phase 6 — Architecture Decisions (decisions)
229
401
 
230
- Plan for quality, security, and operations.
402
+ Claude documents every significant technology and design decision as an Architecture Decision Record (ADR) — what was decided, what alternatives were considered, and why. The review catches contradictions and missing decisions. Without this, future contributors (human or AI) don't know *why* things are the way they are.
231
403
 
232
404
  | Step | What It Does |
233
405
  |------|-------------|
234
- | `testing-strategy` | Test pyramid, patterns, coverage strategy |
235
- | `review-testing` | Review of testing strategy |
236
- | `security` | OWASP, threat modeling, security controls |
237
- | `review-security` | Review of security practices |
238
- | `operations` | CI/CD, deployment, monitoring, runbooks |
239
- | `review-operations` | Review of operations plan |
406
+ | `adrs` | Claude documents every significant design decision — what was chosen, what alternatives were considered with pros and cons, and what consequences follow — so future contributors understand *why*, not just *what*. |
407
+ | `review-adrs` | Claude checks for contradictions between decisions, missing decisions implied by the architecture, and whether every choice has honest trade-off analysis. |
240
408
 
241
- ### Phase 7 — Planning (planning)
409
+ ### Phase 7 — System Architecture (architecture)
242
410
 
243
- Break work into implementable tasks.
411
+ Claude designs the system blueprint — which components exist, how data flows between them, where each piece of code lives, and how the system can be extended. This translates your domain model and decisions into a concrete structure that implementation will follow. Without this, agents make conflicting structural assumptions.
244
412
 
245
413
  | Step | What It Does |
246
414
  |------|-------------|
247
- | `implementation-tasks` | Decompose stories into a task graph with dependencies |
248
- | `review-tasks` | Review task quality, coverage, and sizing |
415
+ | `system-architecture` | Claude 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. |
416
+ | `review-architecture` | Claude 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. |
249
417
 
250
- ### Phase 8 — Validation (validation)
418
+ ### Phase 8 — Specifications (specification)
251
419
 
252
- Cross-phase audits before implementation.
420
+ Claude creates detailed interface specifications for each layer of your system. Database schema translates domain entities into tables with constraints that enforce business rules. API contracts define every endpoint with request/response shapes, error codes, and auth requirements. UX spec maps out user flows, interaction states, accessibility requirements, and responsive behavior. Each is conditional — only generated if your project has that layer. Without these, agents guess at interfaces and implementations don't align.
253
421
 
254
422
  | Step | What It Does |
255
423
  |------|-------------|
256
- | `scope-creep-check` | Detect scope drift from original PRD |
257
- | `dependency-graph-validation` | Verify task graph integrity |
258
- | `implementability-dry-run` | Can this actually be built as specified? |
259
- | `decision-completeness` | Audit ADRs for missing decisions |
260
- | `traceability-matrix` | Requirements design tasks mapping |
261
- | `cross-phase-consistency` | Alignment check across all phases |
262
- | `critical-path-walkthrough` | Identify the critical implementation path |
424
+ | `database-schema` | Claude translates your domain model into database tables with constraints that enforce business rules, indexes optimized for your API's query patterns, and a reversible migration strategy. *(if applicable)* |
425
+ | `review-database` | Claude verifies every domain entity has a table, constraints enforce business rules at the database level, and indexes cover all query patterns from the API contracts. *(if applicable)* |
426
+ | `api-contracts` | Claude specifies every API endpoint — request/response shapes, error codes with human-readable messages, auth requirements, pagination, and example payloads — so frontend and backend can be built in parallel. *(if applicable)* |
427
+ | `review-api` | Claude checks that every domain operation has an endpoint, error responses include domain-specific codes, and auth requirements are specified for every route. *(if applicable)* |
428
+ | `ux-spec` | Claude maps out every user flow with all interaction states (loading, error, empty, populated), defines accessibility requirements (WCAG level, keyboard nav), and specifies responsive behavior at each breakpoint. *(if applicable)* |
429
+ | `review-ux` | Claude verifies every user story has a flow, accessibility requirements are met, all error states are documented, and the design system is used consistently. *(if applicable)* |
263
430
 
264
- ### Phase 9 — Finalization (finalization)
431
+ ### Phase 9 — Quality (quality)
265
432
 
266
- Lock it down and start building.
433
+ Claude reviews your testing strategy for coverage gaps, generates test skeleton files from your user story acceptance criteria (one test per criterion, ready for TDD), creates automated eval checks that verify code meets your documented standards, designs your deployment pipeline with monitoring and incident response, and conducts a security review covering OWASP Top 10, threat modeling, and input validation rules. Without this, quality is an afterthought bolted on at the end.
267
434
 
268
435
  | Step | What It Does |
269
436
  |------|-------------|
270
- | `implementation-playbook` | Step-by-step guide for the implementation phase |
271
- | `developer-onboarding-guide` | Onboarding guide for new contributors |
272
- | `apply-fixes-and-freeze` | Apply any remaining fixes and freeze the specification |
437
+ | `review-testing` | Claude audits the testing strategy for coverage gaps by layer, verifies edge cases from domain invariants are tested, and checks that test environment assumptions match actual config. |
438
+ | `story-tests` | Claude generates a test skeleton file for each user story — one pending test case per acceptance criterion, tagged with story and criterion IDs — giving agents a TDD starting point for every feature. |
439
+ | `create-evals` | Claude generates automated checks that verify your code matches your documented standards — file placement, naming conventions, feature-to-test coverage, API contract alignment, and more using your project's own test framework. |
440
+ | `operations` | Claude designs your deployment pipeline (build, test, deploy, verify, rollback), defines monitoring metrics with alert thresholds, and writes incident response procedures with rollback instructions. |
441
+ | `review-operations` | Claude verifies the full deployment lifecycle is documented, monitoring covers latency/errors/saturation, alert thresholds have rationale, and common failure scenarios have runbook entries. |
442
+ | `security` | Claude conducts a security review of your entire system — OWASP Top 10 coverage, input validation rules for every user-facing field, data classification, secrets management, CORS policy, rate limiting, and a threat model covering all trust boundaries. |
443
+ | `review-security` | Claude verifies OWASP coverage is complete, auth boundaries match API contracts, every secret is accounted for, and the threat model covers all trust boundaries. **Highest priority for multi-model review.** |
444
+
445
+ ### Phase 10 — Platform Parity (parity)
446
+
447
+ For projects targeting multiple platforms (web + mobile, for example), Claude audits all documentation for platform-specific gaps — features that work on one platform but aren't specified for another, input pattern differences, and platform-specific testing coverage. Skips automatically for single-platform projects.
448
+
449
+ | Step | What It Does |
450
+ |------|-------------|
451
+ | `platform-parity-review` | Claude audits all documentation for platform-specific gaps — features missing on one platform, input pattern differences (touch vs. mouse), and platform-specific testing coverage. *(multi-platform only)* |
452
+
453
+ ### Phase 11 — Consolidation (consolidation)
454
+
455
+ Claude optimizes your CLAUDE.md to stay under 200 lines with critical patterns front-loaded, then audits all workflow documentation for consistency — making sure commit formats, branch naming, PR workflows, and key commands match across every doc. Without this, agents encounter conflicting instructions.
456
+
457
+ | Step | What It Does |
458
+ |------|-------------|
459
+ | `claude-md-optimization` | Claude removes redundancy from CLAUDE.md, fixes terminology inconsistencies, front-loads critical patterns (TDD, commit format, worktrees), and keeps it under 200 lines so agents actually read and follow it. |
460
+ | `workflow-audit` | Claude audits every document that mentions workflow (CLAUDE.md, git-workflow, coding-standards, dev-setup) and fixes any inconsistencies in commit format, branch naming, PR steps, or key commands. |
461
+
462
+ ### Phase 12 — Planning (planning)
463
+
464
+ Claude decomposes your user stories and architecture into concrete, implementable tasks — each scoped to ~150 lines of code, limited to 3 files, with clear acceptance criteria and no ambiguous decisions for agents to guess at. The review validates coverage (every feature has tasks), checks the dependency graph for cycles, and runs multi-model validation at higher depths. Without this, agents don't know what to build or in what order.
465
+
466
+ | Step | What It Does |
467
+ |------|-------------|
468
+ | `implementation-plan` | Claude breaks your user stories and architecture into concrete tasks — each scoped to ~150 lines of code and 3 files max, with clear acceptance criteria, no ambiguous decisions, and explicit dependencies. |
469
+ | `implementation-plan-review` | Claude verifies every feature has implementation tasks, no task is too large for one session, the dependency graph has no cycles, and every acceptance criterion maps to at least one task. |
470
+
471
+ ### Phase 13 — Validation (validation)
472
+
473
+ Seven cross-cutting audits that catch problems before implementation begins. Without this phase, hidden spec problems surface during implementation as expensive rework.
474
+
475
+ | Step | What It Does |
476
+ |------|-------------|
477
+ | `scope-creep-check` | Claude compares everything that's been specified against the original PRD and flags anything that wasn't in the requirements — features, components, or tasks that crept in without justification. |
478
+ | `dependency-graph-validation` | Claude verifies the task dependency graph has no cycles (which would deadlock agents), no orphaned tasks, and no chains deeper than three sequential dependencies. |
479
+ | `implementability-dry-run` | Claude simulates picking up each task as an implementing agent and flags anything ambiguous — unclear acceptance criteria, missing input files, undefined error handling — that would force an agent to guess. |
480
+ | `decision-completeness` | Claude checks that every technology choice and architectural pattern has a recorded decision with rationale, and that no two decisions contradict each other. |
481
+ | `traceability-matrix` | Claude builds a map showing that every PRD requirement traces through to user stories, architecture components, implementation tasks, and test cases — with no gaps in either direction. |
482
+ | `cross-phase-consistency` | Claude traces every named concept (entities, fields, API endpoints) across all documents and flags any naming drift, terminology mismatches, or data shape inconsistencies. |
483
+ | `critical-path-walkthrough` | Claude walks the most important user journeys end-to-end across every spec layer — PRD to stories to UX to API to database to tasks — and flags any broken handoffs or missing layers. |
484
+
485
+ ### Phase 14 — Finalization (finalization)
486
+
487
+ Claude applies all findings from the validation phase, freezes documentation (ready for implementation), creates a developer onboarding guide (the "start here" document for anyone joining the project), and writes the implementation playbook — the operational document agents reference during every coding session. Without this, there's no bridge between planning and building.
488
+
489
+ | Step | What It Does |
490
+ |------|-------------|
491
+ | `apply-fixes-and-freeze` | Claude applies all findings from the validation phase, fixes blocking issues, and freezes every document with a version marker — signaling that specs are implementation-ready. |
492
+ | `developer-onboarding-guide` | Claude synthesizes all your frozen docs into a single onboarding narrative — project purpose, architecture overview, top coding patterns, key commands, and a quick-start checklist — so anyone joining the project knows exactly where to begin. |
493
+ | `implementation-playbook` | Claude writes the playbook agents reference during every coding session — task execution order, which docs to read before each task, the TDD loop to follow, quality gates to pass, and the handoff format between agents. |
494
+
495
+ ### Phase 15 — Build (build)
496
+
497
+ Stateless execution steps that can be run repeatedly once Phase 14 is complete. Single-agent and multi-agent modes start the TDD implementation loop (claim a task, write a failing test, make it pass, refactor, commit, repeat). Resume commands restore session context after breaks. Quick-task handles one-off bug fixes outside the main plan. New-enhancement adds a feature with full planning rigor.
498
+
499
+ | Step | What It Does |
500
+ |------|-------------|
501
+ | `single-agent-start` | Claude claims the next task, writes a failing test, implements until it passes, refactors, runs quality gates, commits, and repeats — following the implementation playbook. |
502
+ | `single-agent-resume` | Claude recovers context from the previous session — reads lessons learned, checks git state, reconciles merged PRs — and continues the TDD loop from where you left off. |
503
+ | `multi-agent-start` | Claude sets up a named agent in an isolated git worktree so multiple agents can implement tasks simultaneously without file conflicts, each following the same TDD loop. |
504
+ | `multi-agent-resume` | Claude verifies the worktree, syncs with main, reconciles completed tasks, and resumes the agent's TDD loop from the previous session. |
505
+ | `quick-task` | Claude takes a one-off request (bug fix, refactor, performance tweak) and creates a single well-scoped task with acceptance criteria and a test plan — for work outside the main implementation plan. |
506
+ | `new-enhancement` | Claude walks you through adding a feature the right way — updating the PRD, creating new user stories, running an innovation pass, and generating implementation tasks that integrate with your existing plan. |
507
+
508
+ ## Multi-Model Review
509
+
510
+ Just like you'd want more than one person reviewing a pull request, multi-model review gets independent perspectives from different AI models. When Claude, Codex, and Gemini independently flag the same issue, you know it's real. When they all approve, you can proceed with confidence.
511
+
512
+ ### Why Multiple Models?
513
+
514
+ - **Different blind spots** — what Claude considers correct, another model may flag as problematic. Each model reasons differently about architecture, security, and edge cases.
515
+ - **Independent review** — each model reviews your work without seeing what the others said, preventing groupthink.
516
+ - **Confidence through agreement** — when two or three models flag the same issue, it's almost certainly real. When they all approve, you can move forward confidently.
517
+ - **Catches what single-model misses** — security gaps, inconsistent naming across docs, missing edge cases, and specification contradictions that one model overlooks.
518
+
519
+ ### Quick Setup
520
+
521
+ Multi-model review is optional. It requires installing one or both of these additional CLI tools:
522
+
523
+ **Codex CLI** — OpenAI's command-line coding tool. Requires a ChatGPT subscription (Plus/Pro/Team).
524
+ ```bash
525
+ npm install -g @openai/codex
526
+ ```
527
+
528
+ **Gemini CLI** — Google's command-line coding tool. Free tier available with a Google account.
529
+ ```bash
530
+ npm install -g @google/gemini-cli
531
+ ```
532
+
533
+ You don't need both — Scaffold works with whichever CLIs are available. Having both gives the strongest review (three independent perspectives). See [Prerequisites](#prerequisites) for auth setup and verification commands.
534
+
535
+ ### How It Works
536
+
537
+ 1. **Claude reviews first** — completes its own structured multi-pass review using different review lenses (coverage, consistency, quality, downstream readiness)
538
+ 2. **Independent external review** — the document being reviewed is sent to each available CLI. They don't see Claude's findings or each other's output — every review is independent.
539
+ 3. **Findings are reconciled** — Scaffold merges all findings by confidence level:
540
+
541
+ | Scenario | Confidence | Action |
542
+ |----------|-----------|--------|
543
+ | Both models flag the same issue | **High** | Fix immediately |
544
+ | Both models approve | **High** | Proceed confidently |
545
+ | One flags P0, other approves | **High** | Fix it (P0 is critical) |
546
+ | One flags P1, other approves | **Medium** | Review before fixing |
547
+ | Models contradict each other | **Low** | Present both to user |
548
+
549
+ Scaffold verifies CLI authentication before every dispatch. If a token has expired, it tells you and provides the command to re-authenticate — it never silently skips a review.
550
+
551
+ ### When It Runs
552
+
553
+ Multi-model review activates automatically at **depth 4-5** during any review or validation step — that's 20 steps in total, including all domain reviews (review-prd, review-architecture, review-security, etc.) and all 7 validation checks (traceability, scope creep, implementability, etc.).
554
+
555
+ At depth 1-3, reviews are Claude-only — still thorough with multiple passes, but single-perspective. You control depth globally during `scaffold init`, per session (`"Use depth 5 for everything"`), or per step (`"Run review-security at depth 5"`).
556
+
557
+ ### What You Need
558
+
559
+ - **Depth 4 or 5** — set during `scaffold init` or override per step
560
+ - **At least one additional CLI** — Codex or Gemini (or both for triple-model review)
561
+ - **Valid authentication** — Scaffold checks before every dispatch and tells you if credentials need refreshing
273
562
 
274
563
  ## Methodology Presets
275
564
 
276
- Not every project needs all 36 steps. Choose a methodology when you run `scaffold init`:
565
+ Not every project needs all 60 steps. Choose a methodology when you run `scaffold init`:
277
566
 
278
567
  ### deep (depth 5)
279
- All 36 steps enabled. Comprehensive analysis of every angle — domain modeling, ADRs, security review, traceability matrix, the works. Best for complex systems, team projects, or when you want thorough documentation.
568
+ All steps enabled. Comprehensive analysis of every angle — domain modeling, ADRs, security review, traceability matrix, the works. At depth 4-5, review steps dispatch to Codex/Gemini CLIs for multi-model validation. Best for complex systems, team projects, or when you want thorough documentation.
280
569
 
281
570
  ### mvp (depth 1)
282
- Only 7 critical steps: create-prd, review-prd, user-stories, review-user-stories, testing-strategy, implementation-tasks, and implementation-playbook. Minimal ceremony — get to code fast. Best for prototypes, hackathons, or solo projects.
571
+ Only 7 critical steps: create-prd, review-prd, user-stories, review-user-stories, tdd, implementation-plan, and implementation-playbook. Minimal ceremony — get to code fast. Best for prototypes, hackathons, or solo projects.
283
572
 
284
573
  ### custom (configurable)
285
574
  You choose which steps to enable and set a default depth (1-5). You can also override depth per step. Best when you know which parts of the pipeline matter for your project.
@@ -294,10 +583,12 @@ You can change methodology mid-pipeline with `scaffold init --methodology <prese
294
583
  | `scaffold run <step>` | Execute a pipeline step (assembles and outputs the full prompt) |
295
584
  | `scaffold build` | Generate platform adapter output (commands/, AGENTS.md, etc.) |
296
585
  | `scaffold adopt` | Bootstrap state from existing artifacts (brownfield projects) |
297
- | `scaffold skip <step>` | Mark a step as skipped with a reason |
586
+ | `scaffold skip <step> [<step2>...]` | Skip one or more steps with a reason |
587
+ | `scaffold complete <step>` | Mark a step as completed (for steps executed outside `scaffold run`) |
298
588
  | `scaffold reset <step>` | Reset a step back to pending |
299
- | `scaffold status` | Show pipeline progress and eligibility |
589
+ | `scaffold status [--compact]` | Show pipeline progress (`--compact` shows only remaining work) |
300
590
  | `scaffold next` | List next unblocked step(s) |
591
+ | `scaffold check <step>` | Check if a conditional step applies to this project |
301
592
  | `scaffold validate` | Validate meta-prompts, config, state, and dependency graph |
302
593
  | `scaffold list` | List all steps with status |
303
594
  | `scaffold info <step>` | Show full metadata for a step |
@@ -306,20 +597,64 @@ You can change methodology mid-pipeline with `scaffold init --methodology <prese
306
597
  | `scaffold dashboard` | Open a visual progress dashboard in your browser |
307
598
  | `scaffold decisions` | Show all logged decisions |
308
599
  | `scaffold knowledge` | Manage project-local knowledge base overrides |
600
+ | `scaffold skill install` | Install scaffold skills into the current project |
601
+ | `scaffold skill list` | Show available skills and installation status |
602
+ | `scaffold skill remove` | Remove scaffold skills from the current project |
603
+
604
+ ### Examples
605
+
606
+ ```bash
607
+ # Initialize a new project with deep methodology
608
+ scaffold init
609
+
610
+ # Run a specific step
611
+ scaffold run create-prd
612
+
613
+ # See what's next
614
+ scaffold next
615
+
616
+ # Check full pipeline status
617
+ scaffold status
618
+
619
+ # See only remaining work
620
+ scaffold status --compact
621
+
622
+ # Skip multiple steps at once
623
+ scaffold skip design-system add-e2e-testing --reason "backend-only project"
624
+
625
+ # Check if a step applies before running it
626
+ scaffold check add-e2e-testing
627
+ # → Applicable: yes | Platform: web | Brownfield: no | Mode: fresh
628
+
629
+ scaffold check automated-pr-review
630
+ # → Applicable: yes | GitHub remote: yes | Available CLIs: codex, gemini | Recommended: local-cli (dual-model)
631
+
632
+ scaffold check ai-memory-setup
633
+ # → Rules: no | MCP server: none | Hooks: none | Mode: fresh
634
+
635
+ # Re-run a completed step in update mode
636
+ scaffold reset review-prd --force
637
+ scaffold run review-prd
638
+
639
+ # Open the visual dashboard
640
+ scaffold dashboard
641
+ ```
309
642
 
310
643
  ## Knowledge System
311
644
 
312
- Scaffold ships with 38 domain expertise entries organized in four categories:
645
+ Scaffold ships with 60 domain expertise entries organized in seven categories:
313
646
 
314
- - **core/** (12 entries) — testing strategy, domain modeling, API design, database design, system architecture, ADR craft, security review, operations, task decomposition, user stories, UX specification
647
+ - **core/** (25 entries) — eval craft, testing strategy, domain modeling, API design, database design, system architecture, ADR craft, security best practices, operations, task decomposition, user stories, UX specification, design system tokens, user story innovation, AI memory management, coding conventions, tech stack selection, project structure patterns, task tracking, CLAUDE.md patterns, multi-model review dispatch, review step template, dev environment, git workflow patterns, automated review tooling
315
648
  - **product/** (3 entries) — PRD craft, PRD innovation, gap analysis
316
- - **review/** (12 entries) — review methodologies for each domain area
317
- - **validation/** (7 entries) — critical path analysis, cross-phase consistency, scope management, traceability, implementability
649
+ - **review/** (13 entries) — review methodology (shared), plus domain-specific review passes for PRD, user stories, domain modeling, ADRs, architecture, API design, database design, UX specification, testing, security, operations, implementation tasks
650
+ - **validation/** (7 entries) — critical path analysis, cross-phase consistency, scope management, traceability, implementability, decision completeness, dependency validation
318
651
  - **finalization/** (3 entries) — implementation playbook, developer onboarding, apply-fixes-and-freeze
652
+ - **execution/** (4 entries) — TDD execution loop, task claiming strategy, worktree management, enhancement workflow
653
+ - **tools/** (3 entries) — release management, version strategy, session analysis
319
654
 
320
- Each pipeline step declares which knowledge entries it needs in its frontmatter. The assembly engine injects them automatically.
655
+ Each pipeline step declares which knowledge entries it needs in its frontmatter. The assembly engine injects them automatically. Knowledge files with a `## Deep Guidance` section are optimized for the CLI — only the deep guidance content is loaded into the assembled prompt, skipping the summary to avoid redundancy with the prompt text.
321
656
 
322
- ### Project-local overrides (v2.1)
657
+ ### Project-local overrides
323
658
 
324
659
  Teams can create project-specific knowledge entries in `.scaffold/knowledge/` that layer over the global entries:
325
660
 
@@ -332,21 +667,38 @@ scaffold knowledge reset testing-strategy # Remove override, revert to global
332
667
 
333
668
  Local overrides are committable — the whole team shares enriched, project-specific guidance.
334
669
 
335
- ## After the Pipeline: Ongoing Commands
670
+ ## After the Pipeline: Tools & Ongoing Commands
671
+
672
+ Once your project is scaffolded and you're building features, two categories of commands are available:
673
+
674
+ ### Build Phase (Phase 15)
675
+
676
+ These are stateless pipeline steps — they appear in `scaffold next` once Phase 14 is complete and can be run repeatedly:
677
+
678
+ | Command | When to Use |
679
+ |---------|-------------|
680
+ | `scaffold run single-agent-start` | Start the autonomous implementation loop — Claude picks up tasks and builds. |
681
+ | `scaffold run single-agent-resume` | Resume where you left off after closing Claude Code. |
682
+ | `scaffold run multi-agent-start` | Start parallel implementation with multiple agents in worktrees. |
683
+ | `scaffold run multi-agent-resume` | Resume parallel agent work after a break. |
684
+ | `scaffold run quick-task` | Create a focused task for a bug fix, refactor, or small improvement. |
685
+ | `scaffold run new-enhancement` | Add a new feature to an already-scaffolded project. Updates the PRD, creates new user stories, and sets up tasks with dependencies. |
686
+
687
+ ### Utility Tools
336
688
 
337
- Once your project is scaffolded and you're building features, these slash commands are available in Claude Code:
689
+ These are orthogonal to the pipeline usable at any time, not tied to pipeline state. Defined in `tools/` with `category: tool` frontmatter:
338
690
 
339
691
  | Command | When to Use |
340
692
  |---------|-------------|
341
- | `/scaffold:new-enhancement` | Add a new feature to an already-scaffolded project. Updates the PRD, creates new user stories, and sets up tasks with dependencies. |
342
- | `/scaffold:quick-task` | Create a focused task for a bug fix, refactor, or small improvement. |
343
- | `/scaffold:version-bump` | Mark a milestone with a version number without the full release ceremony. |
344
- | `/scaffold:release` | Ship a new version changelog, Git tag, and GitHub release. Supports `--dry-run`, `current`, and `rollback`. |
345
- | `/scaffold:single-agent-start` | Start the autonomous implementation loop Claude picks up tasks and builds. |
346
- | `/scaffold:single-agent-resume` | Resume where you left off after closing Claude Code. |
347
- | `/scaffold:multi-agent-start` | Start parallel implementation with multiple agents in worktrees. |
348
- | `/scaffold:multi-agent-resume` | Resume parallel agent work after a break. |
349
- | `/scaffold:prompt-pipeline` | Print the full pipeline reference table. |
693
+ | `scaffold run version-bump` | Mark a milestone with a version number without the full release ceremony. |
694
+ | `scaffold run release` | Ship a new version changelog, Git tag, and GitHub release. Supports `--dry-run`, `current`, and `rollback`. |
695
+ | `scaffold run version` | Show the current Scaffold version. |
696
+ | `scaffold run update` | Update Scaffold to the latest version. |
697
+ | `scaffold run dashboard` | Open a visual progress dashboard in your browser. |
698
+ | `scaffold run prompt-pipeline` | Print the full pipeline reference table. |
699
+ | `scaffold run session-analyzer` | Analyze Claude Code session logs for patterns and insights. |
700
+
701
+ All of these are also available as slash commands (`/scaffold:release`, `/scaffold:quick-task`, etc.) when the plugin is installed.
350
702
 
351
703
  ## Releasing Your Project
352
704
 
@@ -380,10 +732,11 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
380
732
  | **CLAUDE.md** | A configuration file in your project root that tells Claude Code how to work in your project. |
381
733
  | **Depth** | A 1-5 scale controlling how thorough each step's analysis is, from MVP-focused (1) to exhaustive (5). |
382
734
  | **Frontmatter** | The YAML metadata block at the top of meta-prompt files, declaring dependencies, outputs, knowledge entries, and other configuration. |
383
- | **Knowledge base** | 38 domain expertise entries that get injected into prompts. Can be extended with project-local overrides. |
735
+ | **Knowledge base** | 60 domain expertise entries that get injected into prompts. Can be extended with project-local overrides. |
384
736
  | **MCP** | Model Context Protocol. A way for Claude to use external tools like a headless browser. |
385
737
  | **Meta-prompt** | A short intent declaration in `pipeline/` that gets assembled into a full prompt at runtime. |
386
738
  | **Methodology** | A preset (deep, mvp, custom) controlling which steps run and at what depth. |
739
+ | **Multi-model review** | Independent validation from Codex/Gemini CLIs at depth 4-5, catching blind spots a single model misses. |
387
740
  | **PRD** | Product Requirements Document. The foundation for everything Scaffold builds. |
388
741
  | **Slash commands** | Commands in Claude Code starting with `/`. For example, `/scaffold:create-prd`. |
389
742
  | **Worktrees** | A git feature for multiple working copies. Scaffold uses these for parallel agent execution. |
@@ -394,10 +747,10 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
394
747
  Make sure Scaffold is installed — run `scaffold version` or `/scaffold:prompt-pipeline` in Claude Code.
395
748
 
396
749
  **Which steps can I skip?**
397
- Use `scaffold skip <step> --reason "..."` to skip any step. The mvp preset only enables 7 critical steps by default. With the custom preset, you choose exactly which steps to run.
750
+ Use `scaffold skip <step> --reason "..."` to skip any step. You can skip multiple steps at once: `scaffold skip design-system add-e2e-testing --reason "backend-only"`. The mvp preset only enables 7 critical steps by default. With the custom preset, you choose exactly which steps to run.
398
751
 
399
752
  **Can I go back and re-run a step?**
400
- Yes. Use `scaffold reset <step>` to reset it to pending, then `scaffold run <step>`. When re-running a completed step, Scaffold uses update mode — it loads the existing artifact and generates improvements rather than starting from scratch.
753
+ Yes. Use `scaffold reset <step> --force` to reset it to pending, then `scaffold run <step>`. When re-running a completed step, Scaffold uses update mode — it loads the existing artifact and generates improvements rather than starting from scratch.
401
754
 
402
755
  **Do I need to run every step in one sitting?**
403
756
  No. Pipeline state is persisted in `.scaffold/state.json`. Run `scaffold status` when you come back to see where you left off, or `scaffold next` for what's unblocked.
@@ -411,6 +764,35 @@ Yes. Run `scaffold init` — the project detector will identify it as brownfield
411
764
  **How do I customize the knowledge base for my project?**
412
765
  Use `scaffold knowledge update <name>` to create a project-local override in `.scaffold/knowledge/`. It layers over the global entry and is committable for team sharing.
413
766
 
767
+ **How do I check if an optional step applies to my project?**
768
+ Run `scaffold check <step>`. For example, `scaffold check add-e2e-testing` detects whether your project has a web or mobile frontend. `scaffold check automated-pr-review` checks for a GitHub remote and available review CLIs.
769
+
770
+ **Codex CLI fails with "stdin is not a terminal"**
771
+ Use `codex exec "prompt"` (headless mode), not bare `codex "prompt"` (interactive TUI). The `multi-model-dispatch` skill documents the correct invocation patterns.
772
+
773
+ **Codex CLI fails with "Not inside a trusted directory"**
774
+ Add `--skip-git-repo-check` flag: `codex exec --skip-git-repo-check -s read-only --ephemeral "prompt"`. This is required when the project hasn't initialized git yet.
775
+
776
+ **Gemini CLI hangs on "Opening authentication page" or returns empty output**
777
+ Gemini's child process relaunch shows a consent prompt that hangs in non-TTY shells. All scaffold Gemini invocations now include `NO_BROWSER=true` to suppress this. If you're invoking Gemini manually, prepend `NO_BROWSER=true gemini -p "..."`. If auth tokens have actually expired, run `! gemini -p "hello"` to re-authenticate interactively. For CI/headless: set `GEMINI_API_KEY` env var instead of OAuth.
778
+
779
+ **Codex CLI auth expired ("refresh token", "sign in again")**
780
+ Run `! codex login` to re-authenticate interactively. For CI/headless: set `CODEX_API_KEY` env var. Check auth status with `codex login status`.
781
+
782
+ **How does Scaffold invoke Codex/Gemini under the hood?**
783
+ Scaffold handles CLI invocation automatically — you never need to type these commands. If you're debugging or curious, here are the headless invocation patterns:
784
+ ```bash
785
+ # Codex (headless mode — use "exec", NOT bare "codex")
786
+ codex exec --skip-git-repo-check -s read-only --ephemeral "Review this artifact..." 2>/dev/null
787
+
788
+ # Gemini (headless mode — use "-p" flag, NO_BROWSER prevents consent prompt hang)
789
+ NO_BROWSER=true gemini -p "Review this artifact..." --output-format json --approval-mode yolo 2>/dev/null
790
+ ```
791
+ These are documented in detail in the `multi-model-dispatch` skill.
792
+
793
+ **I upgraded and my pipeline shows old step names**
794
+ Run `scaffold status` — the state manager automatically migrates old step names (e.g., `add-playwright` → `add-e2e-testing`, `multi-model-review` → `automated-pr-review`) and removes retired steps.
795
+
414
796
  ## Architecture (for contributors)
415
797
 
416
798
  The project is a TypeScript CLI (`@zigrivers/scaffold`) built with yargs, targeting ES2022/Node16 ESM.
@@ -419,7 +801,7 @@ The project is a TypeScript CLI (`@zigrivers/scaffold`) built with yargs, target
419
801
 
420
802
  ```
421
803
  src/
422
- ├── cli/commands/ # 16 CLI command implementations
804
+ ├── cli/commands/ # 19 CLI command implementations
423
805
  ├── cli/middleware/ # Project root detection, output mode resolution
424
806
  ├── cli/output/ # Output strategies (interactive, json, auto)
425
807
  ├── core/assembly/ # Assembly engine — meta-prompt → full prompt
@@ -439,35 +821,39 @@ src/
439
821
  ### Key modules
440
822
 
441
823
  - **Assembly engine** (`src/core/assembly/engine.ts`) — Pure orchestrator with no I/O. Constructs 7-section prompts from meta-prompt + knowledge + context + methodology + instructions + depth guidance.
442
- - **State manager** (`src/state/state-manager.ts`) — Atomic writes via tmp + `fs.renameSync()`. Tracks step status, in-progress records, and next-eligible cache.
824
+ - **State manager** (`src/state/state-manager.ts`) — Atomic writes via tmp + `fs.renameSync()`. Tracks step status, in-progress records, and next-eligible cache. Includes migration system for step renames and retired steps.
443
825
  - **Dependency graph** (`src/core/dependency/`) — Kahn's algorithm topological sort with phase-aware ordering and cycle detection.
444
826
  - **Platform adapters** (`src/core/adapters/`) — 3-step lifecycle (initialize → generateStepWrapper → finalize) producing Claude Code commands, Codex AGENTS.md, or universal markdown.
445
827
  - **Project detector** (`src/project/detector.ts`) — Scans for file system signals to classify projects as greenfield, brownfield, or v1-migration.
828
+ - **Check command** (`src/cli/commands/check.ts`) — Applicability detection for conditional steps (platform detection, GitHub remote detection, CLI availability).
446
829
 
447
830
  ### Content layout
448
831
 
449
832
  ```
450
- pipeline/ # 36 meta-prompts organized by phase
451
- knowledge/ # 38 domain expertise entries (core, product, review, validation, finalization)
833
+ pipeline/ # 60 meta-prompts organized by 16 phases (phases 0-15, including build)
834
+ tools/ # 7 tool meta-prompts (stateless, category: tool)
835
+ knowledge/ # 60 domain expertise entries (core, product, review, validation, finalization, execution, tools)
452
836
  methodology/ # 3 YAML presets (deep, mvp, custom)
453
- commands/ # Generated Claude Code slash commands (from scaffold build)
454
- skills/ # Claude Code plugin skill definition
837
+ commands/ # 80 Claude Code slash commands (60 pipeline + 13 build-phase + 7 tools)
838
+ skills/ # 3 Claude Code skills (pipeline reference, runner, multi-model dispatch)
455
839
  ```
456
840
 
457
841
  ### Testing
458
842
 
459
- - **Vitest** for unit and E2E tests (60 test files)
843
+ - **Vitest** for unit and E2E tests (73 test files, 997 tests, 90% coverage)
460
844
  - **Performance benchmarks** — assembly p95 < 500ms, state I/O p95 < 100ms, graph build p95 < 2s
461
- - **Shell script tests** via bats
462
- - Run: `npm test` (unit + E2E), `npm run test:bench` (benchmarks), `make check` (full CI gate)
845
+ - **Shell script tests** via bats (70 tests covering dashboard, worktree, frontmatter, install/uninstall)
846
+ - **Meta-evals** 39 cross-system consistency checks validating pipeline command knowledge integrity
847
+ - **Coverage thresholds** — CI enforces 84/80/88/84 minimums (statements/branches/functions/lines)
848
+ - Run: `npm test` (unit + E2E), `npm run test:perf` (performance), `make check` (bash gates), `make check-all` (full CI gate)
463
849
 
464
850
  ### Contributing
465
851
 
466
852
  1. Meta-prompt content lives in `pipeline/` — edit the relevant `.md` file
467
853
  2. Run `scaffold build` to regenerate `commands/` from pipeline meta-prompts
468
- 3. Run `npm run check` (lint + type-check + test) before submitting
854
+ 3. Run `make check-all` (lint + type-check + test + evals) before submitting
469
855
  4. Knowledge entries live in `knowledge/` — follow the existing frontmatter schema
470
- 5. ADRs documenting architectural decisions are in `docs/v2/adrs/` (55 total)
856
+ 5. ADRs documenting architectural decisions are in `docs/v2/adrs/`
471
857
 
472
858
  ## License
473
859