@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
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: single-agent-start
3
+ description: Start single-agent TDD execution loop
4
+ summary: "Claims the next task, writes a failing test, implements until it passes, refactors, runs quality gates, commits, and repeats — following the implementation playbook."
5
+ phase: "build"
6
+ order: 1510
7
+ dependencies: [implementation-playbook]
8
+ outputs: []
9
+ conditional: null
10
+ stateless: true
11
+ category: pipeline
12
+ knowledge-base: [tdd-execution-loop, task-claiming-strategy]
13
+ reads: [coding-standards, tdd, git-workflow]
14
+ ---
15
+
16
+ ## Purpose
17
+ Start the single-agent TDD execution loop. This is the primary entry point
18
+ for implementation work when one agent works through the task list
19
+ sequentially. The agent claims the next available task, writes failing tests,
20
+ implements until green, creates a PR, and repeats until all tasks are
21
+ complete.
22
+
23
+ ## Inputs
24
+ - CLAUDE.md (required) — project conventions, key commands, workflow
25
+ - docs/implementation-playbook.md (required if exists) — primary task execution reference with wave assignments and per-task context
26
+ - docs/implementation-plan.md (fallback) — task list when no playbook exists
27
+ - docs/onboarding-guide.md (optional) — project context for orientation
28
+ - docs/coding-standards.md (required) — code conventions, naming, patterns
29
+ - docs/tdd-standards.md (required) — test categories, mocking strategy, test file locations
30
+ - docs/project-structure.md (required) — where files live
31
+ - tests/acceptance/ (optional) — TDD test skeletons for red-green-refactor starting points
32
+ - tests/evals/ (optional) — project eval checks for quality gates
33
+ - tasks/lessons.md (optional) — previous lessons learned to avoid repeating mistakes
34
+ - .beads/ (conditional) — Beads task tracking if configured
35
+
36
+ ## Expected Outputs
37
+ - Implemented features with passing tests
38
+ - Pull requests for each completed task
39
+ - Updated task status in playbook/plan or Beads
40
+
41
+ ## Quality Criteria
42
+ - (mvp) Pre-flight checks pass before starting any implementation work
43
+ - (mvp) Each task follows red-green-refactor TDD cycle
44
+ - (mvp) All quality gates pass before PR creation (make check + make eval if available)
45
+ - (mvp) Task status is updated after each completion
46
+ - (deep) Test skeletons from tests/acceptance/ are used as starting points when available
47
+ - (deep) lessons.md is consulted before each task for relevant anti-patterns
48
+ - (deep) PR description includes implementation summary, assumptions, and files modified
49
+
50
+ ## Methodology Scaling
51
+ - **deep**: Full pre-flight verification, read onboarding guide, consult lessons.md
52
+ before each task, use test skeletons, run evals, detailed PR descriptions with
53
+ implementation notes and assumptions.
54
+ - **mvp**: Quick git/dependency check, read playbook or plan, pick next task,
55
+ TDD loop, make check, create PR. Skip onboarding guide review and detailed
56
+ PR annotations.
57
+ - **custom:depth(1-5)**: Depth 1-2: minimal pre-flight, TDD loop, make check.
58
+ Depth 3: add lessons.md review and test skeleton usage. Depth 4: add
59
+ onboarding guide, eval gates, detailed PR descriptions. Depth 5: full
60
+ pre-flight suite, all quality gates, cross-reference with upstream docs.
61
+
62
+ ## Mode Detection
63
+ This is a stateless execution command. No document is created or updated.
64
+ - Always operates in EXECUTE MODE.
65
+ - If work is already in progress (feature branch exists, uncommitted changes),
66
+ redirect to `/scaffold:single-agent-resume` instead.
67
+
68
+ ## Update Mode Specifics
69
+ Not applicable — this is a stateless execution command that does not produce
70
+ a persistent document.
71
+
72
+ ## Instructions
73
+
74
+ ### Pre-Flight Verification
75
+
76
+ Before writing any code, verify the environment is ready:
77
+
78
+ 1. **Git state check**
79
+ - `git status` — working tree should be clean (no uncommitted changes)
80
+ - `git branch --show-current` — should be on `main` or a fresh branch
81
+ - If on a feature branch with changes, stop and suggest `/scaffold:single-agent-resume` instead
82
+
83
+ 2. **Dependency check**
84
+ - Run the install command from CLAUDE.md Key Commands (e.g., `npm install`, `pip install`, `bundle install`)
85
+ - Confirm dependencies are current
86
+
87
+ 3. **Test suite health**
88
+ - Run the project's check command from CLAUDE.md Key Commands (e.g., `make check`)
89
+ - If tests fail before you start, fix them first or flag to the user
90
+
91
+ 4. **Project orientation**
92
+ - Read `CLAUDE.md` for project conventions and key commands
93
+ - Read `docs/onboarding-guide.md` if it exists (first session orientation)
94
+ - Read `tasks/lessons.md` for relevant anti-patterns and gotchas
95
+
96
+ ### Beads Detection
97
+
98
+ Check if `.beads/` directory exists.
99
+
100
+ **If Beads is configured:**
101
+ - Run `bd ready` to see available tasks
102
+ - Pick the lowest-ID unblocked task
103
+ - Implement following the TDD workflow below
104
+ - After PR is merged, run `bd close <id> && bd sync`
105
+ - Repeat with `bd ready` until no tasks remain
106
+
107
+ **Without Beads:**
108
+ 1. Read `docs/implementation-playbook.md` as the primary task execution reference.
109
+ Fall back to `docs/implementation-plan.md` when no playbook is present.
110
+ 2. Pick the first uncompleted task that has no unfinished dependencies.
111
+ 3. Implement following the TDD workflow below.
112
+ 4. Mark the task complete in the plan/playbook.
113
+ 5. Repeat in dependency order until all tasks are done.
114
+
115
+ ### TDD Execution Loop
116
+
117
+ For each task:
118
+
119
+ 1. **Claim the task**
120
+ - Create a feature branch: `git checkout -b <type>/<description>` (e.g., `feat/add-auth`)
121
+ - If Beads: branch as `bd-<id>/<desc>`
122
+
123
+ 2. **Red phase — write failing tests**
124
+ - Check `tests/acceptance/` for existing test skeletons that correspond to the task
125
+ - If skeletons exist, use them as your starting point
126
+ - Otherwise, write test cases from the task's acceptance criteria
127
+ - Run the test suite — confirm the new tests FAIL (red)
128
+
129
+ 3. **Green phase — implement**
130
+ - Write the minimum code to make the failing tests pass
131
+ - Follow conventions from `docs/coding-standards.md`
132
+ - Follow file placement from `docs/project-structure.md`
133
+ - Run tests after each meaningful change — stop when green
134
+
135
+ 4. **Refactor phase — clean up**
136
+ - Refactor for clarity, DRY, and convention compliance
137
+ - Run the full test suite — confirm everything still passes
138
+
139
+ 5. **Quality gates**
140
+ - Run `make check` (or equivalent from CLAUDE.md Key Commands)
141
+ - If `tests/evals/` exists, run `make eval` (or equivalent eval command)
142
+ - Fix any failures before proceeding
143
+
144
+ 6. **Create PR**
145
+ - Push the branch: `git push -u origin HEAD`
146
+ - Create a pull request: `gh pr create`
147
+ - Include in the PR description: what was implemented, key decisions, files changed
148
+ - Follow the PR workflow from `docs/git-workflow.md` or CLAUDE.md
149
+
150
+ 7. **Update status**
151
+ - If Beads: task status is managed via `bd` commands
152
+ - Without Beads: mark the task as complete in the plan/playbook
153
+
154
+ ### Recovery Procedures
155
+
156
+ **Tests fail before starting:**
157
+ - Run the test suite and read the output carefully
158
+ - If failures are in existing tests (not your changes), fix them first
159
+ - If failures are environment-related, run the install/setup commands from CLAUDE.md
160
+
161
+ **Merge conflicts on PR:**
162
+ - `git fetch origin && git rebase origin/main`
163
+ - Resolve conflicts, re-run tests, force-push the branch
164
+
165
+ **Quality gate failures after implementation:**
166
+ - Read the failure output — most failures have clear fix instructions
167
+ - Fix lint/format issues first (often auto-fixable)
168
+ - Fix test failures next
169
+ - Re-run the full gate before pushing
170
+
171
+ **Stuck on a task:**
172
+ - Re-read the task description, acceptance criteria, and any linked docs
173
+ - Check `tasks/lessons.md` for similar past issues
174
+ - If truly blocked, note the blocker and move to the next unblocked task
175
+
176
+ ### Process Rules
177
+
178
+ 1. **TDD is not optional** — Write failing tests before implementation. No exceptions.
179
+ 2. **One task at a time** — Complete the current task fully before starting the next.
180
+ 3. **Quality gates before PR** — Never create a PR with failing checks.
181
+ 4. **Update status immediately** — Mark tasks complete as soon as the PR is created.
182
+ 5. **Consult lessons.md** — Check for relevant anti-patterns before each task.
183
+ 6. **Follow CLAUDE.md** — It is the authority on project conventions and commands.
184
+
185
+ ---
186
+
187
+ ## After This Step
188
+
189
+ When this step is complete (all tasks done or session ending), tell the user:
190
+
191
+ ---
192
+ **Execution session complete** — Tasks implemented with passing tests and PRs created.
193
+
194
+ **Session summary:**
195
+ - Tasks completed: [list task IDs/titles]
196
+ - PRs created: [list PR numbers]
197
+ - Remaining tasks: [count or "none"]
198
+
199
+ **If resuming later:** Run `/scaffold:single-agent-resume` to pick up where you left off.
200
+
201
+ **If all tasks are done:**
202
+ - Review `tasks/lessons.md` and add any patterns learned during implementation.
203
+ - Consider running `/scaffold:version-bump` for a release.
204
+
205
+ **Pipeline reference:** `/scaffold:prompt-pipeline`
206
+
207
+ ---
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: claude-md-optimization
3
+ description: Consolidate and optimize CLAUDE.md for maximum signal density
4
+ summary: "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."
5
+ phase: "consolidation"
6
+ order: 1110
7
+ dependencies: [git-workflow]
8
+ outputs: [CLAUDE.md]
9
+ reads: [create-prd, tdd, user-stories]
10
+ conditional: null
11
+ knowledge-base: [claude-md-patterns]
12
+ ---
13
+
14
+ ## Purpose
15
+ Review all project documentation and consolidate CLAUDE.md into the definitive,
16
+ optimized reference for AI agents. Eliminate redundancy from incremental additions
17
+ by multiple setup prompts, fix inconsistencies in terminology and commands, fill
18
+ gaps in workflow coverage, and front-load the most critical information for agent
19
+ scannability.
20
+
21
+ ## Inputs
22
+ - CLAUDE.md (required) — current state with incremental additions
23
+ - docs/plan.md (required) — PRD for context
24
+ - docs/tech-stack.md (required) — technology choices
25
+ - docs/coding-standards.md (required) — code conventions
26
+ - docs/tdd-standards.md (required) — testing approach
27
+ - docs/git-workflow.md (required) — branching and PR workflow
28
+ - docs/project-structure.md (required) — file placement rules
29
+ - docs/user-stories.md (optional) — feature context
30
+
31
+ ## Expected Outputs
32
+ - CLAUDE.md — restructured and consolidated with Core Principles, Git Workflow,
33
+ Workflow (session start through next task), Parallel Sessions, Quick Reference
34
+ (structure, Key Commands, doc lookup), Rules (git, code, coordination, error
35
+ recovery), Browser/E2E Testing, Self-Improvement, Autonomous Behavior
36
+
37
+ ## Quality Criteria
38
+ - (mvp) No duplicated instructions within CLAUDE.md
39
+ - (mvp) No verbatim repetition of content from other docs (reference instead)
40
+ - (mvp) Consistent terminology throughout (task vs. ticket, etc.)
41
+ - (mvp) Key Commands table matches actual Makefile/package.json commands
42
+ - Critical patterns are prominent (TDD, never push to main, keep working,
43
+ verify before commit, worktrees for parallel). If Beads: every commit needs task ID.
44
+ - (deep) CLAUDE.md is <= 200 lines or critical patterns appear in the first 50 lines
45
+ - (deep) Workflow scenarios cover error cases (test failures, merge conflicts, CI failures,
46
+ crashed sessions, blocked tasks)
47
+ - Tracking comment added: <!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->
48
+
49
+ ## Methodology Scaling
50
+ - **deep**: Full four-phase analysis (redundancy, consistency, gap, priority audits)
51
+ with detailed changelog. Comprehensive error recovery section. All nine critical
52
+ patterns verified present and prominent.
53
+ - **mvp**: Quick pass to remove obvious duplicates and ensure workflow section is
54
+ complete. Fix any command inconsistencies. Skip detailed audit.
55
+ - **custom:depth(1-5)**: Depth 1-2: dedup + workflow check. Depth 3: add
56
+ consistency pass. Depth 4: add gap analysis. Depth 5: full four-phase audit.
57
+
58
+ ## Mode Detection
59
+ Always operates in update mode (CLAUDE.md always exists by this point). Check
60
+ for tracking comment `<!-- scaffold:claude-md-optimization v1 YYYY-MM-DD -->`
61
+ to detect prior optimization. If present, compare current CLAUDE.md against
62
+ the prior version date to identify sections added or changed since last
63
+ optimization. Preserve manually-added sections (user customizations not from
64
+ setup prompts). Only consolidate sections that originated from setup prompts —
65
+ do not restructure user-authored content. Do not add new workflow steps or
66
+ rules — only consolidate and clarify what already exists.
67
+
68
+ ## Update Mode Specifics
69
+ - **Detect prior artifact**: tracking comment in CLAUDE.md with version and date
70
+ - **Preserve**: manually-added sections, user-customized rules, project-specific
71
+ command aliases, any content not traceable to a pipeline setup prompt
72
+ - **Triggers for update**: new setup prompts completed, coding-standards updated,
73
+ tdd-standards updated, git-workflow updated, terminology inconsistencies
74
+ introduced by incremental additions
75
+ - **Conflict resolution**: if a user-customized section conflicts with a setup
76
+ prompt's output, keep the user version and flag the conflict in a comment
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: workflow-audit
3
+ description: Verify workflow consistency across all documentation files
4
+ summary: "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."
5
+ phase: "consolidation"
6
+ order: 1120
7
+ dependencies: [claude-md-optimization]
8
+ outputs: [CLAUDE.md, docs/git-workflow.md]
9
+ conditional: null
10
+ reads: [operations]
11
+ knowledge-base: [cross-phase-consistency]
12
+ ---
13
+
14
+ ## Purpose
15
+ Cross-reference all documentation to ensure the canonical feature workflow is
16
+ consistently documented. Check every document that touches workflow (CLAUDE.md,
17
+ git-workflow.md, coding-standards.md, dev-setup.md, operations-runbook.md,
18
+ Makefile/package.json) for contradictions, stale references, missing steps, and
19
+ inconsistent command formats. Fix all issues found.
20
+
21
+ ## Inputs
22
+ - CLAUDE.md (required) — primary workflow document to audit
23
+ - docs/git-workflow.md (required) — git workflow to verify alignment
24
+ - docs/coding-standards.md (required) — commit format to verify
25
+ - docs/dev-setup.md (required) — commands to verify match Key Commands
26
+ - Makefile or package.json (required) — actual commands to match against
27
+ - .github/ (optional) — PR templates and CI workflows to verify
28
+ - docs/operations-runbook.md (optional) — deployment pipeline to verify doesn't contradict CI or dev-setup
29
+ - tasks/lessons.md (optional) — verify it exists and is referenced
30
+
31
+ ## Expected Outputs
32
+ - CLAUDE.md — corrected workflow section with all 9 steps + step 4.5
33
+ - docs/git-workflow.md — any contradictions fixed
34
+ - docs/coding-standards.md — commit format aligned
35
+ - Makefile/package.json — missing targets added (if needed)
36
+ - tasks/lessons.md — created if missing
37
+
38
+ ## Quality Criteria
39
+ - (mvp) CLAUDE.md contains complete workflow (9 steps + AI review step 4.5)
40
+ - (mvp) Commit format is consistent everywhere (If Beads: [BD-<id>] type(scope): description. Without Beads: type(scope): description)
41
+ - (mvp) Branch naming is consistent everywhere (If Beads: bd-<task-id>/<short-desc>. Without Beads: <type>/<short-desc>)
42
+ - (mvp) PR workflow includes all 8 sub-steps with --delete-branch flag
43
+ - (mvp) If Beads: task closure uses bd close (not bd update --status completed)
44
+ - (mvp) Key Commands table matches actual Makefile/package.json commands
45
+ - (deep) Worktree cleanup between tasks documented (cannot checkout main)
46
+ - (deep) Agent crash recovery documented
47
+ - (deep) No document contradicts the canonical workflow
48
+ - Tracking comment matches format: `<!-- scaffold:workflow-audit v1 YYYY-MM-DD -->`
49
+ - Tracking comment added: <!-- scaffold:workflow-audit v1 YYYY-MM-DD -->
50
+
51
+ ## Methodology Scaling
52
+ - **deep**: Full six-phase audit (inventory, completeness check with all
53
+ sub-checklists, consistency check, gap analysis, recommendations, execution).
54
+ Every workflow step verified in every document.
55
+ - **mvp**: Quick consistency check of commit format, branch naming, and PR
56
+ workflow across CLAUDE.md and git-workflow.md. Fix obvious contradictions.
57
+ - **custom:depth(1-5)**: Depth 1-2: CLAUDE.md workflow check only. Depth 3: add
58
+ cross-doc consistency. Depth 4: add gap analysis. Depth 5: full six-phase audit.
59
+
60
+ ## Mode Detection
61
+ Always operates in update mode (all documents exist by this point). Check for
62
+ tracking comment `<!-- scaffold:workflow-audit v1 YYYY-MM-DD -->` to detect
63
+ prior audit. If present, focus on changes since that date — new docs added,
64
+ existing docs modified, Makefile targets changed. The canonical workflow is
65
+ the source of truth — documents align to it, not vice versa. Preserve any
66
+ manually-added workflow steps or custom CI configurations.
67
+
68
+ ## Update Mode Specifics
69
+ - **Detect prior artifact**: tracking comment in CLAUDE.md with audit version
70
+ and date
71
+ - **Preserve**: custom CI jobs, user-added workflow steps, project-specific
72
+ branch protection rules, custom PR template fields
73
+ - **Triggers for update**: CI configuration changed, git-workflow.md updated,
74
+ new scripts added to Makefile, Makefile targets added or renamed, new setup
75
+ prompts modified workflow docs
76
+ - **Conflict resolution**: if two docs disagree on workflow, the canonical
77
+ workflow in CLAUDE.md wins; update the conflicting doc to match
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: adrs
3
3
  description: Document architecture decisions as ADRs
4
+ summary: "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."
4
5
  phase: "decisions"
5
- order: 9
6
+ order: 610
6
7
  dependencies: [review-domain-modeling]
7
8
  outputs: [docs/adrs/]
9
+ reads: [create-prd, domain-modeling]
8
10
  conditional: null
9
11
  knowledge-base: [adr-craft]
10
12
  ---
@@ -17,18 +19,19 @@ ADR category — tech stack decisions are documented here.
17
19
 
18
20
  ## Inputs
19
21
  - docs/domain-models/ (required) — domain structure driving architecture choices
20
- - docs/prd.md (required) — requirements and constraints
22
+ - docs/plan.md (required) — requirements and constraints
21
23
 
22
24
  ## Expected Outputs
23
25
  - docs/adrs/ — one ADR file per decision (ADR-NNN-title.md format)
24
26
  - docs/adrs/index.md — decision log overview
25
27
 
26
28
  ## Quality Criteria
27
- - Every significant decision has an ADR (technology, patterns, trade-offs)
28
- - Each ADR documents alternatives considered with pros/cons
29
- - Decisions trace to PRD requirements or domain model constraints
30
- - No ADR contradicts another without explicit acknowledgment
31
- - Technology selections include team expertise and maintenance considerations
29
+ - (mvp) ADRs exist for: language, framework, database, ORM, deployment target, API style, authentication, and any decision referenced in system-architecture.md
30
+ - (deep) Each ADR documents alternatives considered with pros/cons
31
+ - (mvp) Decisions trace to PRD requirements or domain model constraints
32
+ - (mvp) No ADR contradicts another without explicit acknowledgment
33
+ - (deep) Technology selections include team expertise and maintenance considerations
34
+ - (deep) Decision dependencies documented — if ADR-002 depends on ADR-001's outcome, the dependency is explicit
32
35
 
33
36
  ## Methodology Scaling
34
37
  - **deep**: Comprehensive ADR set. 3+ alternatives per decision with detailed
@@ -43,3 +46,14 @@ ADR category — tech stack decisions are documented here.
43
46
  If docs/adrs/ exists, operate in update mode: review existing ADRs against
44
47
  current domain models and requirements. Add new ADRs for undocumented decisions.
45
48
  Supersede ADRs whose context has changed.
49
+
50
+ ## Update Mode Specifics
51
+ - **Detect prior artifact**: docs/adrs/ directory exists with ADR files
52
+ - **Preserve**: existing ADR numbers and titles, accepted decisions and their
53
+ rationale, supersession chain integrity, index.md decision log
54
+ - **Triggers for update**: domain models changed (new architectural decisions
55
+ needed), requirements changed (existing decisions may need revisiting),
56
+ implementation revealed unforeseen trade-offs
57
+ - **Conflict resolution**: never modify an accepted ADR — instead create a new
58
+ ADR that supersedes it, linking back to the original with explanation of
59
+ what changed
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: review-adrs
3
3
  description: Review ADRs for completeness, consistency, and decision quality
4
+ summary: "Checks for contradictions between decisions, missing decisions implied by the architecture, and whether every choice has honest trade-off analysis."
4
5
  phase: "decisions"
5
- order: 10
6
+ order: 620
6
7
  dependencies: [adrs]
7
- outputs: [docs/reviews/review-adrs.md]
8
+ outputs: [docs/reviews/review-adrs.md, docs/reviews/adrs/review-summary.md, docs/reviews/adrs/codex-review.json, docs/reviews/adrs/gemini-review.json]
8
9
  conditional: null
9
- knowledge-base: [review-methodology, review-adr]
10
+ knowledge-base: [review-methodology, review-adr, multi-model-review-dispatch, review-step-template]
10
11
  ---
11
12
 
12
13
  ## Purpose
@@ -14,26 +15,46 @@ Multi-pass review of ADRs targeting ADR-specific failure modes: contradictory
14
15
  decisions, missing rationale, implied-but-unrecorded decisions, and unresolved
15
16
  trade-offs.
16
17
 
18
+ At depth 4+, dispatches to external AI models (Codex, Gemini) for
19
+ independent review validation.
20
+
17
21
  ## Inputs
18
22
  - docs/adrs/ (required) — ADRs to review
19
23
  - docs/domain-models/ (required) — for coverage checking
20
- - docs/prd.md (required) — for requirement tracing
24
+ - docs/plan.md (required) — for requirement tracing
21
25
 
22
26
  ## Expected Outputs
23
27
  - docs/reviews/review-adrs.md — findings and resolution log
24
28
  - docs/adrs/ — updated with fixes
29
+ - docs/reviews/adrs/review-summary.md (depth 4+) — multi-model review synthesis
30
+ - docs/reviews/adrs/codex-review.json (depth 4+, if available) — raw Codex findings
31
+ - docs/reviews/adrs/gemini-review.json (depth 4+, if available) — raw Gemini findings
25
32
 
26
33
  ## Quality Criteria
27
- - All ADR-specific review passes executed
28
- - Every finding categorized by severity
29
- - Missing decisions identified and documented
30
- - Contradictions resolved
31
- - Downstream readiness confirmed (architecture phase can proceed)
34
+ - (mvp) All ADR-specific review passes executed
35
+ - (mvp) Every finding categorized P0-P3 with specific ADR number, section, and issue
36
+ - (deep) Missing decisions identified and documented
37
+ - (mvp) Contradictions resolved
38
+ - (mvp) Downstream readiness confirmed (architecture phase can proceed)
39
+ - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
32
40
 
33
41
  ## Methodology Scaling
34
- - **deep**: All review passes. Full findings report. Fixes applied and re-validated.
42
+ - **deep**: All review passes. Full findings report. Fixes applied and
43
+ re-validated. Multi-model review dispatched to Codex and Gemini if available,
44
+ with graceful fallback to Claude-only enhanced review.
35
45
  - **mvp**: Quick consistency check for contradictions only.
36
- - **custom:depth(1-5)**: Scale number of review passes with depth.
46
+ - **custom:depth(1-5)**: Depth 1-3: scale number of review passes with depth.
47
+ Depth 4: full review + one external model (if CLI available). Depth 5:
48
+ full review + multi-model with reconciliation.
37
49
 
38
50
  ## Mode Detection
39
51
  Re-review mode if previous review exists. Check which findings were addressed.
52
+ If multi-model review artifacts exist under docs/reviews/adrs/, preserve prior
53
+ findings still valid.
54
+
55
+ ## Update Mode Specifics
56
+
57
+ - **Detect**: `docs/reviews/review-adrs.md` exists with tracking comment
58
+ - **Preserve**: Prior findings still valid, resolution decisions, multi-model review artifacts
59
+ - **Triggers**: Upstream artifact changed since last review (compare tracking comment dates)
60
+ - **Conflict resolution**: Previously resolved findings reappearing = regression; flag and re-evaluate
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: ai-memory-setup
3
+ description: Configure AI memory and context management with modular rules, optional MCP memory server, lifecycle hooks, and external context integration
4
+ summary: "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."
5
+ phase: "environment"
6
+ order: 350
7
+ dependencies: [git-workflow]
8
+ outputs: [.claude/rules/, docs/ai-memory-setup.md]
9
+ reads: [coding-standards, tech-stack]
10
+ conditional: null
11
+ knowledge-base: [ai-memory-management]
12
+ ---
13
+
14
+ ## Purpose
15
+ Set up a tiered AI memory stack that improves agent effectiveness across sessions.
16
+ Tier 1 (modular rules) extracts conventions from existing project docs into
17
+ path-scoped `.claude/rules/` files, keeping CLAUDE.md lean. Tier 2 (persistent
18
+ memory) configures an MCP memory server and lifecycle hooks for cross-session
19
+ decision capture. Tier 3 (external context) adds library documentation servers
20
+ to prevent API hallucination. Users choose which tiers to enable.
21
+
22
+ ## Inputs
23
+ - docs/coding-standards.md (required) — source for code convention rules
24
+ - docs/tech-stack.md (required) — source for technology-specific rules
25
+ - docs/git-workflow.md (required) — source for workflow rules
26
+ - CLAUDE.md (required) — will be optimized after rules extraction
27
+ - package.json or equivalent (optional) — dependency list for Tier 3 assessment
28
+
29
+ ## Expected Outputs
30
+ - .claude/rules/ directory with path-scoped rule files extracted from project docs
31
+ - docs/ai-memory-setup.md — documentation of configured memory stack
32
+ - CLAUDE.md updated with pointer pattern (references rules instead of inline content)
33
+ - (Tier 2) .claude/settings.json with MCP memory server and hook configuration
34
+ - (Tier 2) docs/decisions/ directory for structured decision logging
35
+ - (Tier 3) .claude/settings.json with external context MCP server
36
+
37
+ ## Quality Criteria
38
+ - (mvp) .claude/rules/ files use valid YAML frontmatter with description and globs fields
39
+ - (mvp) Each rule file targets a specific concern (no catch-all files)
40
+ - (mvp) Total rule content stays under 500 lines across all files
41
+ - (mvp) CLAUDE.md references rules via pointer pattern, stays under 200 lines
42
+ - (mvp) Rules accurately reflect the conventions in source documents (no drift)
43
+ - (deep) MCP memory server responds to basic queries
44
+ - (deep) At least PreCompact hook is configured and functional
45
+ - (deep) Library doc server returns results for project dependencies
46
+
47
+ ## Methodology Scaling
48
+ - **deep**: All three tiers offered. Tier 1 generates comprehensive rules from
49
+ all project docs. Tier 2 recommends hmem or Claude-Mem for thorough capture.
50
+ Tier 3 configured with appropriate library doc server.
51
+ - **mvp**: Tier 1 only (modular rules). Quick extraction of essential conventions
52
+ into 2-3 rule files. Skip Tier 2 and 3. Minimal CLAUDE.md optimization.
53
+ - **custom:depth(1-5)**: Depth 1-2: Tier 1 basics (2-3 rule files). Depth 3:
54
+ full Tier 1 + offer Tier 2. Depth 4-5: all tiers with comprehensive setup.
55
+
56
+ ## Mode Detection
57
+ Check if `.claude/rules/` directory or docs/ai-memory-setup.md exists first. If
58
+ `.claude/rules/` exists, check for scaffold tracking comments (e.g.,
59
+ `<!-- scaffold:ai-memory-setup -->`) in rule files for conservativeness calibration.
60
+ - If `.claude/rules/` exists with tracking comments: UPDATE MODE — preserve existing
61
+ rule files and their customizations, add missing rules for new conventions,
62
+ update rules where source docs have changed. Never delete user-customized rules.
63
+ If MCP server already configured, verify and update rather than replace.
64
+ - If `.claude/rules/` does not exist: FRESH MODE — create rules directory and generate
65
+ rule files from scratch.
66
+
67
+ ## Update Mode Specifics
68
+ - **Detect prior artifact**: .claude/rules/ directory exists with rule files
69
+ - **Preserve**: existing rule files and their YAML frontmatter, user-customized
70
+ rules, MCP server configurations, hook settings, CLAUDE.md pointer patterns
71
+ - **Triggers for update**: source docs changed (coding-standards.md, tech-stack.md,
72
+ git-workflow.md), new conventions added that need rule extraction, new
73
+ dependencies added that need Tier 3 doc servers
74
+ - **Conflict resolution**: if a source doc changed a convention, update the
75
+ corresponding rule file but preserve any user-added rules in that file;
76
+ never exceed 500-line total rule budget without consolidating
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: automated-pr-review
3
+ description: Agent-driven automated PR review with external reviewers (Codex Cloud, Gemini Code Assist, or custom)
4
+ summary: "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."
5
+ phase: "environment"
6
+ order: 340
7
+ dependencies: [git-workflow]
8
+ outputs: [AGENTS.md, docs/review-standards.md]
9
+ reads: [tdd]
10
+ conditional: "if-needed"
11
+ knowledge-base: [review-methodology, automated-review-tooling]
12
+ ---
13
+
14
+ ## Purpose
15
+ Configure an agent-driven automated PR review system using local CLI reviewers
16
+ (Codex, Gemini — runs both when available for dual-model quality) or external
17
+ GitHub App reviewers. Zero GitHub Actions workflows. The agent manages the
18
+ entire review-fix loop locally.
19
+
20
+ ## Inputs
21
+ - docs/coding-standards.md (required) — review criteria reference
22
+ - docs/tdd-standards.md (required) — test coverage expectations
23
+ - docs/git-workflow.md (required) — PR workflow to integrate with
24
+ - CLAUDE.md (required) — workflow sections to update
25
+
26
+ ## Expected Outputs
27
+ - AGENTS.md — Reviewer instructions with project-specific rules
28
+ - docs/review-standards.md — severity definitions (P0-P3) and review criteria
29
+ - scripts/cli-pr-review.sh (local CLI mode) — dual-model review with reconciliation
30
+ - scripts/await-pr-review.sh (external bot mode) — polling script with JSON output
31
+ - docs/git-workflow.md updated with review loop integration
32
+ - CLAUDE.md updated with agent-driven review workflow
33
+
34
+ ## Quality Criteria
35
+ - External reviewer configured and verified (AGENTS.md created)
36
+ - Review standards document matches project coding conventions
37
+ - Await script handles all exit conditions (approved, findings, cap, skip, timeout)
38
+ - CLAUDE.md workflow documents the agent-driven loop
39
+ - No GitHub Actions workflows created (zero Actions minutes)
40
+ - No ANTHROPIC_API_KEY secret required
41
+ - Legacy GitHub Actions workflows detected and cleanup offered
42
+ - (deep) Dual-model review enabled when both CLIs available
43
+
44
+ ## Methodology Scaling
45
+ - **deep**: Full setup with local CLI review (dual-model when both available),
46
+ review-standards.md, AGENTS.md, and comprehensive CLAUDE.md workflow.
47
+ Falls back to external bot review if no CLIs available.
48
+ - **mvp**: Step is disabled. Local self-review from git-workflow suffices.
49
+ - **custom:depth(1-5)**: Depth 1-2: disabled. Depth 3: basic review-standards.md
50
+ + single-CLI review. Depth 4: add dual-model review. Depth 5: full suite
51
+ with all options and legacy cleanup.
52
+
53
+ ## Conditional Evaluation
54
+ Enable when: project uses GitHub for version control, team size > 1 or CI/CD is
55
+ configured, or git-workflow.md establishes a PR-based workflow. Skip when: solo
56
+ developer with no CI, depth < 3, or project uses a non-GitHub VCS host.
57
+
58
+ ## Mode Detection
59
+ Check if AGENTS.md exists first. If it exists, check for scaffold tracking comment
60
+ (`<!-- scaffold:automated-pr-review -->`).
61
+ - If AGENTS.md exists with tracking comment: UPDATE MODE — preserve custom review rules,
62
+ reviewer bot name, and round cap settings. Detect legacy GitHub Actions
63
+ workflows (code-review-trigger.yml, code-review-handler.yml) and offer removal.
64
+ - If AGENTS.md does not exist: FRESH MODE — configure from scratch.
65
+
66
+ ## Update Mode Specifics
67
+ - **Detect prior artifact**: AGENTS.md exists
68
+ - **Preserve**: custom review rules, reviewer bot configuration, round cap
69
+ settings, severity definitions in docs/review-standards.md, CLI review
70
+ script customizations
71
+ - **Triggers for update**: coding-standards.md changed (new review criteria),
72
+ tdd-standards.md changed (coverage expectations), new external reviewer
73
+ CLI became available, git-workflow.md changed PR workflow steps
74
+ - **Conflict resolution**: if review criteria changed in coding-standards.md,
75
+ update AGENTS.md review rules to match; if both CLI reviewers are now
76
+ available, offer to enable dual-model review