@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,200 @@
1
+ ---
2
+ name: git-workflow-patterns
3
+ description: Git branching strategies, commit conventions, PR workflows, merge policies, and CI integration patterns for AI-agent-driven development
4
+ topics: [git, branching, commits, pull-requests, ci-cd, merge-strategy, worktrees]
5
+ ---
6
+
7
+ # Git Workflow Patterns
8
+
9
+ Structured git workflows for AI-agent-driven projects ensure consistent branching, meaningful commit history, automated quality gates, and smooth multi-agent collaboration via worktrees.
10
+
11
+ ## Summary
12
+
13
+ ### Branching Strategy
14
+
15
+ The trunk-based development model works best for AI-agent workflows:
16
+
17
+ - **Main branch** (`main`) — always deployable, protected by CI
18
+ - **Feature branches** — short-lived, created per task or story (`feat/US-xxx-slug`, `fix/bug-description`)
19
+ - **Worktree branches** — parallel agent execution using git worktrees (`agent/<name>/<task>`)
20
+
21
+ Branch naming conventions:
22
+ ```
23
+ feat/US-001-user-registration # Feature work tied to a story
24
+ fix/login-timeout-handling # Bug fix
25
+ chore/update-dependencies # Maintenance
26
+ docs/api-contract-updates # Documentation only
27
+ ```
28
+
29
+ ### Commit Conventions
30
+
31
+ Use Conventional Commits format for machine-parseable history:
32
+
33
+ ```
34
+ <type>(<scope>): <description>
35
+
36
+ [optional body]
37
+
38
+ [optional footer(s)]
39
+ ```
40
+
41
+ Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`
42
+
43
+ AI agent commits should include the Co-Authored-By trailer for attribution and auditability.
44
+
45
+ ### Pull Request Workflow
46
+
47
+ Standard PR lifecycle:
48
+ 1. Create branch from `main`
49
+ 2. Implement changes with passing tests
50
+ 3. Push branch, create PR with structured description
51
+ 4. CI runs all quality gates (`make check` or equivalent)
52
+ 5. Review (automated or manual)
53
+ 6. Squash-merge to maintain clean history
54
+ 7. Delete branch after merge
55
+
56
+ ## Deep Guidance
57
+
58
+ ### Merge Policies
59
+
60
+ - **Squash merge** for feature branches — keeps main history clean
61
+ - **Merge commit** for release branches — preserves the merge point
62
+ - **Never force-push** to main or shared branches
63
+ - **Delete branches** after merge to prevent clutter
64
+
65
+ ### CI Integration
66
+
67
+ Minimum CI pipeline for scaffold projects:
68
+ 1. **Lint** — ShellCheck, ESLint, or language-appropriate linter
69
+ 2. **Test** — Full test suite including evals
70
+ 3. **Build** — Verify compilation/bundling succeeds
71
+ 4. **Type check** — For typed languages (TypeScript, etc.)
72
+
73
+ ### Worktree Patterns for Multi-Agent Work
74
+
75
+ Git worktrees enable parallel agent execution on the same repository:
76
+
77
+ ```bash
78
+ # Create a worktree for an agent
79
+ scripts/setup-agent-worktree.sh agent-name
80
+
81
+ # Each worktree gets its own branch and working directory
82
+ # Agents can work simultaneously without conflicts
83
+ ```
84
+
85
+ Key rules:
86
+ - Each agent works in its own worktree with its own branch
87
+ - Agents coordinate via the implementation plan task assignments
88
+ - Merge conflicts are resolved by the agent whose branch is behind
89
+ - The main worktree is the coordination point
90
+
91
+ ### Branch Protection Rules
92
+
93
+ Configure branch protection for `main`:
94
+ - Require status checks to pass before merge
95
+ - Require branches to be up to date before merge
96
+ - Do not allow direct pushes
97
+ - Require squash merging for feature branches
98
+
99
+ ### Commit Message Quality
100
+
101
+ Good commit messages for AI agents:
102
+ ```
103
+ feat(auth): add JWT token refresh endpoint
104
+
105
+ Implements automatic token refresh when the access token expires
106
+ within 5 minutes. Refresh tokens are rotated on each use.
107
+
108
+ Closes US-015
109
+ ```
110
+
111
+ Bad commit messages to avoid:
112
+ - `fix stuff` — no context
113
+ - `WIP` — should never be pushed
114
+ - `update` — what was updated?
115
+
116
+ ### PR Description Template
117
+
118
+ ```
119
+ ### What changed
120
+ - [1-3 bullet points describing the change]
121
+
122
+ ### Files modified
123
+ - [Specific files/components modified]
124
+
125
+ ### How to test
126
+ - [How to verify the changes work]
127
+
128
+ ### Related
129
+ - [Story ID, issue link, or ADR reference]
130
+ ```
131
+
132
+ ### Conflict Resolution Strategy
133
+
134
+ When multiple agents work in parallel:
135
+ 1. Agent finishing first merges normally
136
+ 2. Agent finishing second rebases onto updated main
137
+ 3. If conflicts arise, the second agent resolves them
138
+ 4. Never force-push over another agent's work
139
+
140
+ Conflict resolution checklist:
141
+ - Pull latest main before starting any task
142
+ - Rebase frequently on long-running branches (every few commits)
143
+ - If a rebase produces conflicts in files you didn't modify, investigate — another agent may have refactored the same area
144
+ - After resolving conflicts, re-run the full test suite before pushing
145
+ - Document unusual conflict resolutions in the commit message body
146
+
147
+ ### Release Workflow
148
+
149
+ For version-tagged releases:
150
+ 1. Ensure all PRs are merged to main
151
+ 2. Run full quality gates on main
152
+ 3. Create a version tag (`v1.2.3`)
153
+ 4. Generate changelog from conventional commits
154
+ 5. Push tag to trigger release pipeline
155
+
156
+ ### Semantic Versioning
157
+
158
+ Follow semver for version tags:
159
+ - **MAJOR** (`X.0.0`) — breaking API changes, incompatible migrations
160
+ - **MINOR** (`0.X.0`) — new features, backward-compatible additions
161
+ - **PATCH** (`0.0.X`) — bug fixes, documentation, internal refactors
162
+
163
+ Pre-release versions for staging: `v1.2.3-rc.1`, `v1.2.3-beta.1`
164
+
165
+ ### Git Hooks
166
+
167
+ Pre-commit hooks for quality enforcement:
168
+ ```bash
169
+ # .husky/pre-commit or .git/hooks/pre-commit
170
+ #!/usr/bin/env bash
171
+ set -euo pipefail
172
+
173
+ # Run linter on staged files
174
+ make lint
175
+
176
+ # Validate frontmatter on changed command files
177
+ ./scripts/validate-frontmatter.sh $(git diff --cached --name-only -- 'commands/*.md')
178
+ ```
179
+
180
+ Pre-push hooks for broader validation:
181
+ ```bash
182
+ # .husky/pre-push or .git/hooks/pre-push
183
+ #!/usr/bin/env bash
184
+ set -euo pipefail
185
+
186
+ # Run full test suite before pushing
187
+ make test
188
+ ```
189
+
190
+ ### Common Anti-Patterns
191
+
192
+ Patterns to avoid in AI-agent git workflows:
193
+
194
+ 1. **Long-lived branches** — branches older than 1 day risk merge conflicts. Keep branches short-lived.
195
+ 2. **Giant PRs** — PRs with 500+ lines changed are hard to review. Split into smaller, focused PRs.
196
+ 3. **Skipping hooks** — `--no-verify` hides real issues. Fix the root cause instead.
197
+ 4. **Rebasing shared branches** — only rebase branches that only you use. Shared branches use merge commits.
198
+ 5. **Committing generated files** — lock files yes, build output no. Use `.gitignore` aggressively.
199
+ 6. **Force-pushing to main** — this is never acceptable. Even if CI is broken, create a fix branch.
200
+ 7. **Mixing concerns in one commit** — each commit should be atomic and focused on one change.
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: multi-model-review-dispatch
3
+ description: Patterns for dispatching reviews to external AI models (Codex, Gemini) at depth 4+, including fallback strategies and finding reconciliation
4
+ topics: [multi-model, code-review, depth-scaling, codex, gemini, review-synthesis]
5
+ ---
6
+
7
+ # Multi-Model Review Dispatch
8
+
9
+ At higher methodology depths (4+), reviews benefit from independent validation by external AI models. Different models have different blind spots — Codex excels at code-centric analysis while Gemini brings strength in design and architectural reasoning. Dispatching to multiple models and reconciling their findings produces higher-quality reviews than any single model alone. This knowledge covers when to dispatch, how to dispatch, how to handle failures, and how to reconcile disagreements.
10
+
11
+ ## Summary
12
+
13
+ ### When to Dispatch
14
+
15
+ Multi-model review activates at depth 4+ in the methodology scaling system:
16
+
17
+ | Depth | Review Approach |
18
+ |-------|----------------|
19
+ | 1-2 | Claude-only, reduced pass count |
20
+ | 3 | Claude-only, full pass count |
21
+ | 4 | Full passes + one external model (if available) |
22
+ | 5 | Full passes + multi-model with reconciliation |
23
+
24
+ Dispatch is always optional. If no external model CLI is available, the review proceeds as a Claude-only enhanced review with additional self-review passes to partially compensate.
25
+
26
+ ### Model Selection
27
+
28
+ | Model | Strength | Best For |
29
+ |-------|----------|----------|
30
+ | **Codex** (OpenAI) | Code analysis, implementation correctness, API contract validation | Code reviews, security reviews, API reviews, database schema reviews |
31
+ | **Gemini** (Google) | Design reasoning, architectural patterns, broad context understanding | Architecture reviews, PRD reviews, UX reviews, domain model reviews |
32
+
33
+ When both models are available at depth 5, dispatch to both and reconcile. At depth 4, choose the model best suited to the artifact type.
34
+
35
+ ### Graceful Fallback
36
+
37
+ External models are never required. The fallback chain:
38
+ 1. Attempt dispatch to selected model(s)
39
+ 2. If CLI unavailable → skip that model, note in report
40
+ 3. If timeout → use partial results if any, note incompleteness
41
+ 4. If all external models fail → Claude-only enhanced review (additional self-review passes)
42
+
43
+ The review never blocks on external model availability.
44
+
45
+ ## Deep Guidance
46
+
47
+ ### Dispatch Mechanics
48
+
49
+ #### CLI Availability Check
50
+
51
+ Before dispatching, verify the model CLI is installed and authenticated:
52
+
53
+ ```bash
54
+ # Codex check
55
+ which codex && codex --version 2>/dev/null
56
+
57
+ # Gemini check (via Google Cloud CLI or dedicated tool)
58
+ which gemini 2>/dev/null || (which gcloud && gcloud ai models list 2>/dev/null)
59
+ ```
60
+
61
+ If the CLI is not found, skip dispatch immediately. Do not prompt the user to install it — this is a review enhancement, not a requirement.
62
+
63
+ #### Prompt Formatting
64
+
65
+ External model prompts must be self-contained. The external model has no access to the pipeline context, CLAUDE.md, or prior conversation. Every dispatch includes:
66
+
67
+ 1. **Artifact content** — The full text of the document being reviewed
68
+ 2. **Review focus** — What specific aspects to evaluate (coverage, consistency, correctness)
69
+ 3. **Upstream context** — Relevant upstream artifacts that the document should be consistent with
70
+ 4. **Output format** — Structured JSON for machine-parseable findings
71
+
72
+ **Prompt template:**
73
+ ```
74
+ You are reviewing the following [artifact type] for a software project.
75
+
76
+ ## Document Under Review
77
+ [full artifact content]
78
+
79
+ ## Upstream Context
80
+ [relevant upstream artifacts, summarized or in full]
81
+
82
+ ## Review Instructions
83
+ Evaluate this document for:
84
+ 1. Coverage — Are all expected topics addressed?
85
+ 2. Consistency — Does it agree with the upstream context?
86
+ 3. Correctness — Are technical claims accurate?
87
+ 4. Completeness — Are there gaps that would block downstream work?
88
+
89
+ ## Output Format
90
+ Respond with a JSON array of findings:
91
+ [
92
+ {
93
+ "id": "F-001",
94
+ "severity": "P0|P1|P2|P3",
95
+ "category": "coverage|consistency|correctness|completeness",
96
+ "location": "section or line reference",
97
+ "finding": "description of the issue",
98
+ "suggestion": "recommended fix"
99
+ }
100
+ ]
101
+ ```
102
+
103
+ #### Output Parsing
104
+
105
+ External model output is parsed as JSON. Handle common parsing issues:
106
+ - Strip markdown code fences (```json ... ```) if the model wraps output
107
+ - Handle trailing commas in JSON arrays
108
+ - Validate that each finding has the required fields (severity, category, finding)
109
+ - Discard malformed entries rather than failing the entire parse
110
+
111
+ Store raw output for audit:
112
+ ```
113
+ docs/reviews/{artifact}/codex-review.json — raw Codex findings
114
+ docs/reviews/{artifact}/gemini-review.json — raw Gemini findings
115
+ docs/reviews/{artifact}/review-summary.md — reconciled synthesis
116
+ ```
117
+
118
+ ### Timeout Handling
119
+
120
+ External model calls can hang or take unreasonably long. Set reasonable timeouts:
121
+
122
+ | Operation | Timeout | Rationale |
123
+ |-----------|---------|-----------|
124
+ | CLI availability check | 5 seconds | Should be instant |
125
+ | Small artifact review (<2000 words) | 60 seconds | Quick read and analysis |
126
+ | Medium artifact review (2000-10000 words) | 120 seconds | Needs more processing time |
127
+ | Large artifact review (>10000 words) | 180 seconds | Maximum reasonable wait |
128
+
129
+ #### Partial Result Handling
130
+
131
+ If a timeout occurs mid-response:
132
+ 1. Check if the partial output contains valid JSON entries
133
+ 2. If yes, use the valid entries and note "partial results" in the report
134
+ 3. If no, treat as a model failure and fall back
135
+
136
+ Never wait indefinitely. A review that completes in 3 minutes with Claude-only findings is better than one that blocks for 10 minutes waiting for an external model.
137
+
138
+ ### Finding Reconciliation
139
+
140
+ When multiple models produce findings, reconciliation synthesizes them into a unified report.
141
+
142
+ #### Consensus Analysis
143
+
144
+ Compare findings across models to identify agreement and disagreement:
145
+
146
+ **Consensus** — Multiple models flag the same issue (possibly with different wording). High confidence in the finding. Use the most specific description.
147
+
148
+ **Single-source finding** — Only one model flags an issue. Lower confidence but still valuable. Include in the report with a note about which model found it.
149
+
150
+ **Disagreement** — One model flags an issue that another model explicitly considers correct. Requires manual analysis.
151
+
152
+ #### Reconciliation Process
153
+
154
+ 1. **Normalize findings.** Map each model's findings to a common schema (severity, category, location, description).
155
+
156
+ 2. **Match findings across models.** Two findings match if they reference the same location and describe the same underlying issue (even with different wording). Use location + category as the matching key.
157
+
158
+ 3. **Score by consensus.**
159
+ - Found by all models → confidence: high
160
+ - Found by majority → confidence: medium
161
+ - Found by one model → confidence: low (but still reported)
162
+
163
+ 4. **Resolve severity disagreements.** When models disagree on severity:
164
+ - If one says P0 and another says P1 → use P0 (err on the side of caution)
165
+ - If one says P1 and another says P3 → investigate the specific finding before deciding
166
+ - Document the disagreement in the synthesis report
167
+
168
+ 5. **Merge descriptions.** When multiple models describe the same finding differently, combine their perspectives. Model A might identify the symptom while Model B identifies the root cause.
169
+
170
+ #### Disagreement Resolution
171
+
172
+ When models actively disagree (one flags an issue, another says the same thing is correct):
173
+
174
+ 1. **Read both arguments.** Each model explains its reasoning. One may have a factual error.
175
+ 2. **Check against source material.** Read the actual artifact and upstream docs. The correct answer is in the documents, not in model opinions.
176
+ 3. **Default to the stricter interpretation.** If genuinely ambiguous, the finding stands at reduced severity (P1 → P2).
177
+ 4. **Document the disagreement.** The reconciliation report should note: "Models disagreed on [topic]. Resolution: [decision and rationale]."
178
+
179
+ ### Output Format
180
+
181
+ #### Review Summary (review-summary.md)
182
+
183
+ ```markdown
184
+ # Multi-Model Review Summary: [Artifact Name]
185
+
186
+ ## Models Used
187
+ - Claude (primary reviewer)
188
+ - Codex (external, depth 4+) — [available/unavailable/timeout]
189
+ - Gemini (external, depth 5) — [available/unavailable/timeout]
190
+
191
+ ## Consensus Findings
192
+ | # | Severity | Finding | Models | Confidence |
193
+ |---|----------|---------|--------|------------|
194
+ | 1 | P0 | [description] | Claude, Codex | High |
195
+ | 2 | P1 | [description] | Claude, Codex, Gemini | High |
196
+
197
+ ## Single-Source Findings
198
+ | # | Severity | Finding | Source | Confidence |
199
+ |---|----------|---------|--------|------------|
200
+ | 3 | P1 | [description] | Gemini | Low |
201
+
202
+ ## Disagreements
203
+ | # | Topic | Claude | Codex | Resolution |
204
+ |---|-------|--------|-------|------------|
205
+ | 4 | [topic] | P1 issue | No issue | [resolution rationale] |
206
+
207
+ ## Reconciliation Notes
208
+ [Any significant observations about model agreement patterns, recurring themes,
209
+ or areas where external models provided unique value]
210
+ ```
211
+
212
+ #### Raw JSON Preservation
213
+
214
+ Always preserve the raw JSON output from external models, even after reconciliation. The raw findings serve as an audit trail and enable re-analysis if the reconciliation logic is later improved.
215
+
216
+ ```
217
+ docs/reviews/{artifact}/
218
+ codex-review.json — raw output from Codex
219
+ gemini-review.json — raw output from Gemini
220
+ review-summary.md — reconciled synthesis
221
+ ```
222
+
223
+ ### Quality Gates
224
+
225
+ Minimum standards for a multi-model review to be considered complete:
226
+
227
+ | Gate | Threshold | Rationale |
228
+ |------|-----------|-----------|
229
+ | Minimum finding count | At least 3 findings across all models | A review with zero findings likely missed something |
230
+ | Coverage threshold | Every review pass has at least one finding or explicit "no issues found" note | Ensures all passes were actually executed |
231
+ | Reconciliation completeness | All cross-model disagreements have documented resolutions | No unresolved conflicts |
232
+ | Raw output preserved | JSON files exist for all models that were dispatched | Audit trail |
233
+
234
+ If the primary Claude review produces zero findings and external models are unavailable, the review should explicitly note this as unusual and recommend a targeted re-review at a later stage.
235
+
236
+ ### Common Anti-Patterns
237
+
238
+ **Blind trust of external findings.** An external model flags an issue and the reviewer includes it without verification. External models hallucinate — they may flag a "missing section" that actually exists, or cite a "contradiction" based on a misread. Fix: every external finding must be verified against the actual artifact before inclusion in the final report.
239
+
240
+ **Ignoring disagreements.** Two models disagree, and the reviewer picks one without analysis. Fix: disagreements are the most valuable signal in multi-model review. They identify areas of genuine ambiguity or complexity. Always investigate and document the resolution.
241
+
242
+ **Dispatching at low depth.** Running external model reviews at depth 1-2 where the review scope is intentionally minimal. The external model does a full analysis anyway, producing findings that are out of scope. Fix: only dispatch at depth 4+. Lower depths use Claude-only review with reduced pass count.
243
+
244
+ **No fallback plan.** The review pipeline assumes external models are always available. When Codex is down, the review fails entirely. Fix: external dispatch is always optional. The fallback to Claude-only enhanced review must be implemented and tested.
245
+
246
+ **Over-weighting consensus.** Two models agree on a finding, so it must be correct. But both models may share the same bias (e.g., both flag a pattern as an anti-pattern that is actually appropriate for this project's constraints). Fix: consensus increases confidence but does not guarantee correctness. All findings still require artifact-level verification.
247
+
248
+ **Dispatching the full pipeline context.** Sending the entire project context (all docs, all code) to the external model. This exceeds context limits and dilutes focus. Fix: send only the artifact under review and the minimal upstream context needed for that specific review.
249
+
250
+ **Ignoring partial results.** A model times out after producing 3 of 5 findings. The reviewer discards all results because the review is "incomplete." Fix: partial results are still valuable. Include them with a note about incompleteness. Three real findings are better than zero.