@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
@@ -1,42 +1,71 @@
1
1
  ---
2
2
  name: operations
3
- description: Define operations, deployment, and dev environment strategy
3
+ description: Define deployment pipeline, deployment strategy, monitoring, alerting, and incident response
4
+ summary: "Designs your deployment pipeline (build, test, deploy, verify, rollback), defines monitoring metrics with alert thresholds, and writes incident response procedures with rollback instructions."
4
5
  phase: "quality"
5
- order: 21
6
+ order: 930
6
7
  dependencies: [review-testing]
7
8
  outputs: [docs/operations-runbook.md]
9
+ reads: [system-architecture, adrs, dev-env-setup, git-workflow]
8
10
  conditional: null
9
11
  knowledge-base: [operations-runbook]
10
12
  ---
11
13
 
12
14
  ## Purpose
13
- Define the operational strategy: CI/CD pipeline, deployment approach, monitoring
14
- and alerting, incident response, rollback procedures, and dev environment setup.
15
- This is both the production operations guide and the local development workflow.
15
+ Define the production operational strategy: deployment pipeline (extending the
16
+ base CI from git-workflow), deployment approach, monitoring and alerting, incident
17
+ response, and rollback procedures. References docs/dev-setup.md for local
18
+ development setup rather than redefining it.
16
19
 
17
20
  ## Inputs
18
21
  - docs/system-architecture.md (required) — what to deploy
19
- - docs/testing-strategy.md (required) — CI pipeline test stages
22
+ - docs/tdd-standards.md (required) — CI pipeline test stages
20
23
  - docs/adrs/ (required) — infrastructure decisions
24
+ - docs/dev-setup.md (optional) — local dev setup to reference, not redefine
25
+ - docs/git-workflow.md (optional) — base CI pipeline to extend, not redefine
21
26
 
22
27
  ## Expected Outputs
23
- - docs/operations-runbook.md — operations and deployment runbook
28
+ - docs/operations-runbook.md — production operations and deployment runbook
24
29
 
25
30
  ## Quality Criteria
26
- - CI/CD pipeline defined with all stages (build, test, lint, deploy)
27
- - Deployment strategy chosen with rollback procedure
28
- - Monitoring covers key metrics (latency, error rate, saturation)
29
- - Alerting thresholds are justified, not arbitrary
30
- - Dev environment setup is documented and reproducible
31
- - Incident response process defined
31
+ - (mvp) Deployment pipeline extends existing CI (build, deploy, post-deploy stages)
32
+ - (mvp) Deployment pipeline has explicit stages (build → test → deploy → verify → rollback-ready)
33
+ - (mvp) Does not redefine base CI stages (lint, test) from git-workflow
34
+ - (mvp) Deployment strategy chosen with rollback procedure
35
+ - (deep) Rollback procedure tested with specific trigger conditions (e.g., error rate > X%, health check failure)
36
+ - (deep) Runbook structured by operational scenario (deployment, rollback, incident, scaling)
37
+ - (mvp) Monitoring covers key metrics (latency, error rate, saturation)
38
+ - (deep) Each monitoring metric has an explicit threshold with rationale
39
+ - (deep) Health check endpoints defined with expected response codes and latency bounds
40
+ - (deep) Log aggregation strategy specifies retention period and searchable fields
41
+ - (deep) Each alert threshold documents: the metric, threshold value, business impact if crossed, and mitigation action
42
+ - References docs/dev-setup.md for local dev — does not redefine it
43
+ - (deep) Incident response process defined
44
+ - (deep) Recovery Time Objective (RTO) and Recovery Point Objective (RPO) documented for each critical service
45
+ - (deep) Secret rotation procedure documented and tested
32
46
 
33
47
  ## Methodology Scaling
34
48
  - **deep**: Full runbook. Deployment topology diagrams. Monitoring dashboard
35
- specs. Alert playbooks. DR plan. Capacity planning. Local dev with
36
- containers matching production.
37
- - **mvp**: Basic CI/CD pipeline. Deploy command. How to run locally.
49
+ specs. Alert playbooks. DR plan. Capacity planning.
50
+ - **mvp**: Deploy command. Basic monitoring. Rollback procedure.
38
51
  - **custom:depth(1-5)**: Depth 1-2: MVP-style. Depth 3: add monitoring and
39
52
  alerts. Depth 4-5: full runbook with DR.
40
53
 
41
54
  ## Mode Detection
42
- Update mode if runbook exists.
55
+ Check for docs/operations-runbook.md. If it exists, operate in update mode:
56
+ read existing runbook and diff against current system architecture, ADRs, and
57
+ deployment configuration. Preserve existing deployment procedures, monitoring
58
+ thresholds, and incident response processes. Update deployment pipeline stages
59
+ if architecture changed. Never modify rollback procedures without user approval.
60
+
61
+ ## Update Mode Specifics
62
+ - **Detect prior artifact**: docs/operations-runbook.md exists
63
+ - **Preserve**: deployment procedures, monitoring thresholds, alerting rules,
64
+ incident response processes, rollback procedures, environment-specific
65
+ configurations
66
+ - **Triggers for update**: architecture changed deployment topology, new ADRs
67
+ changed infrastructure, security review identified operational requirements,
68
+ CI pipeline changed (new stages to extend)
69
+ - **Conflict resolution**: if architecture changed the deployment target,
70
+ update deployment stages but preserve monitoring and alerting sections;
71
+ verify runbook does not redefine base CI stages from git-workflow.md
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: review-operations
3
3
  description: Review operations runbook for completeness and safety
4
+ summary: "Verifies the full deployment lifecycle is documented, monitoring covers latency/errors/saturation, alert thresholds have rationale, and common failure scenarios have runbook entries."
4
5
  phase: "quality"
5
- order: 22
6
+ order: 940
6
7
  dependencies: [operations]
7
- outputs: [docs/reviews/review-operations.md]
8
+ outputs: [docs/reviews/review-operations.md, docs/reviews/operations/review-summary.md, docs/reviews/operations/codex-review.json, docs/reviews/operations/gemini-review.json]
8
9
  conditional: null
9
- knowledge-base: [review-methodology, review-operations]
10
+ knowledge-base: [review-methodology, review-operations, multi-model-review-dispatch, review-step-template]
10
11
  ---
11
12
 
12
13
  ## Purpose
@@ -14,6 +15,9 @@ Review operations runbook targeting operations-specific failure modes: deploymen
14
15
  strategy gaps, missing rollback procedures, monitoring blind spots, unjustified
15
16
  alerting thresholds, missing runbook scenarios, and DR coverage gaps.
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/operations-runbook.md (required) — runbook to review
19
23
  - docs/system-architecture.md (required) — for deployment coverage
@@ -21,17 +25,34 @@ alerting thresholds, missing runbook scenarios, and DR coverage gaps.
21
25
  ## Expected Outputs
22
26
  - docs/reviews/review-operations.md — findings and resolution log
23
27
  - docs/operations-runbook.md — updated with fixes
28
+ - docs/reviews/operations/review-summary.md (depth 4+) — multi-model review synthesis
29
+ - docs/reviews/operations/codex-review.json (depth 4+, if available) — raw Codex findings
30
+ - docs/reviews/operations/gemini-review.json (depth 4+, if available) — raw Gemini findings
24
31
 
25
32
  ## Quality Criteria
26
- - Deployment lifecycle fully documented (deploy, verify, rollback)
27
- - Monitoring covers all critical metrics
28
- - Alert thresholds have rationale
29
- - Common failure scenarios have runbook entries
30
- - Dev environment parity assessed
33
+ - (mvp) Deployment lifecycle fully documented (deploy, verify, rollback)
34
+ - (mvp) Monitoring verified against minimum set: latency, error rate, and saturation
35
+ - (deep) Alert thresholds have rationale
36
+ - (deep) Common failure scenarios have runbook entries
37
+ - (deep) Dev/staging/production environment differences documented in operations runbook
38
+ - Every finding categorized P0-P3 with specific runbook section, metric, and issue
39
+ - Fix plan documented for all P0/P1 findings; fixes applied to operations-runbook.md and re-validated
40
+ - Downstream readiness confirmed — no unresolved P0 or P1 findings remain before security step proceeds
41
+ - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
31
42
 
32
43
  ## Methodology Scaling
33
- - **deep**: Full multi-pass review. **mvp**: Deployment coverage only.
34
- - **custom:depth(1-5)**: Scale passes with depth.
44
+ - **deep**: Full multi-pass review. Multi-model review dispatched to Codex and
45
+ Gemini if available, with graceful fallback to Claude-only enhanced review.
46
+ - **mvp**: Deployment coverage only.
47
+ - **custom:depth(1-5)**: Depth 1: monitoring and logging pass only. Depth 2: add deployment and rollback pass. Depth 3: add incident response and scaling passes. Depth 4: add external model review. Depth 5: multi-model review with reconciliation.
35
48
 
36
49
  ## Mode Detection
37
- Re-review mode if previous review exists.
50
+ Re-review mode if previous review exists. If multi-model review artifacts exist
51
+ under docs/reviews/operations/, preserve prior findings still valid.
52
+
53
+ ## Update Mode Specifics
54
+
55
+ - **Detect**: `docs/reviews/review-operations.md` exists with tracking comment
56
+ - **Preserve**: Prior findings still valid, resolution decisions, multi-model review artifacts
57
+ - **Triggers**: Upstream artifact changed since last review (compare tracking comment dates)
58
+ - **Conflict resolution**: Previously resolved findings reappearing = regression; flag and re-evaluate
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: review-security
3
3
  description: Review security review for coverage and correctness
4
+ summary: "Verifies OWASP coverage is complete, auth boundaries match API contracts, every secret is accounted for, and the threat model covers all trust boundaries. Highest priority for multi-model review."
4
5
  phase: "quality"
5
- order: 24
6
+ order: 960
6
7
  dependencies: [security]
7
- outputs: [docs/reviews/review-security.md]
8
+ outputs: [docs/reviews/review-security.md, docs/reviews/security/review-summary.md, docs/reviews/security/codex-review.json, docs/reviews/security/gemini-review.json]
8
9
  conditional: null
9
- knowledge-base: [review-methodology, review-security]
10
+ reads: [api-contracts]
11
+ knowledge-base: [review-methodology, review-security, multi-model-review-dispatch, review-step-template]
10
12
  ---
11
13
 
12
14
  ## Purpose
@@ -15,6 +17,9 @@ gaps, auth/authz boundary mismatches with API contracts, secrets management gaps
15
17
  insufficient dependency audit coverage, missing threat model scenarios, and data
16
18
  classification gaps.
17
19
 
20
+ At depth 4+, dispatches to external AI models (Codex, Gemini) for
21
+ independent review validation.
22
+
18
23
  ## Inputs
19
24
  - docs/security-review.md (required) — security review document
20
25
  - docs/api-contracts.md (optional) — for auth boundary alignment
@@ -23,18 +28,35 @@ classification gaps.
23
28
  ## Expected Outputs
24
29
  - docs/reviews/review-security.md — findings and resolution log
25
30
  - docs/security-review.md — updated with fixes
31
+ - docs/reviews/security/review-summary.md (depth 4+) — multi-model review synthesis
32
+ - docs/reviews/security/codex-review.json (depth 4+, if available) — raw Codex findings
33
+ - docs/reviews/security/gemini-review.json (depth 4+, if available) — raw Gemini findings
26
34
 
27
35
  ## Quality Criteria
28
- - OWASP coverage verified for this project
29
- - Auth boundaries match API contract auth requirements
30
- - Secrets management is complete (no gaps)
31
- - Dependency audit scope covers all dependencies
32
- - Threat model covers all trust boundaries
33
- - Data classification is complete
36
+ - (mvp) OWASP coverage verified for this project
37
+ - (deep) Auth boundaries match API contract auth requirements
38
+ - (deep) Secrets management covers: all environment variables, API keys, database credentials, and third-party tokens
39
+ - (deep) Dependency audit scope covers all dependencies
40
+ - (deep) Threat model covers all trust boundaries
41
+ - (deep) Data classification covers every entity in the domain model
42
+ - Every finding categorized P0-P3 with specific control, boundary, and issue
43
+ - Fix plan documented for all P0/P1 findings; fixes applied to security-review.md and re-validated
44
+ - Downstream readiness confirmed — no unresolved P0 or P1 findings remain before planning phase proceeds
45
+ - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
34
46
 
35
47
  ## Methodology Scaling
36
- - **deep**: Full multi-pass review. **mvp**: OWASP coverage check only.
37
- - **custom:depth(1-5)**: Scale passes with depth.
48
+ - **deep**: Full multi-pass review. Multi-model review dispatched to Codex and
49
+ Gemini if available, with graceful fallback to Claude-only enhanced review.
50
+ - **mvp**: OWASP coverage check only.
51
+ - **custom:depth(1-5)**: Depth 1: OWASP top 10 and secrets management pass only. Depth 2: add auth boundary and input validation passes. Depth 3: add dependency audit and data protection passes. Depth 4: add external model security review. Depth 5: multi-model security review with reconciliation.
38
52
 
39
53
  ## Mode Detection
40
- Re-review mode if previous review exists.
54
+ Re-review mode if previous review exists. If multi-model review artifacts exist
55
+ under docs/reviews/security/, preserve prior findings still valid.
56
+
57
+ ## Update Mode Specifics
58
+
59
+ - **Detect**: `docs/reviews/review-security.md` exists with tracking comment
60
+ - **Preserve**: Prior findings still valid, resolution decisions, multi-model review artifacts
61
+ - **Triggers**: Upstream artifact changed since last review (compare tracking comment dates)
62
+ - **Conflict resolution**: Previously resolved findings reappearing = regression; flag and re-evaluate
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: review-testing
3
3
  description: Review testing strategy for coverage gaps and feasibility
4
+ summary: "Audits the testing strategy for coverage gaps by layer, verifies edge cases from domain invariants are tested, and checks that test environment assumptions match actual config."
4
5
  phase: "quality"
5
- order: 20
6
- dependencies: [testing-strategy]
7
- outputs: [docs/reviews/review-testing.md]
6
+ order: 910
7
+ dependencies: [tdd, system-architecture]
8
+ outputs: [docs/reviews/review-testing.md, docs/reviews/testing/review-summary.md, docs/reviews/testing/codex-review.json, docs/reviews/testing/gemini-review.json]
9
+ reads: [domain-modeling, system-architecture]
8
10
  conditional: null
9
- knowledge-base: [review-methodology, review-testing-strategy]
11
+ knowledge-base: [review-methodology, review-testing-strategy, multi-model-review-dispatch, review-step-template]
10
12
  ---
11
13
 
12
14
  ## Purpose
@@ -14,26 +16,47 @@ Review testing strategy targeting testing-specific failure modes: coverage gaps
14
16
  by layer, missing edge cases from domain invariants, unrealistic test environment
15
17
  assumptions, inadequate performance test coverage, and missing integration boundaries.
16
18
 
19
+ At depth 4+, dispatches to external AI models (Codex, Gemini) for
20
+ independent review validation.
21
+
17
22
  ## Inputs
18
- - docs/testing-strategy.md (required) — strategy to review
23
+ - docs/tdd-standards.md (required) — strategy to review
19
24
  - docs/domain-models/ (required) — for invariant test case coverage
20
25
  - docs/system-architecture.md (required) — for layer coverage
21
26
 
22
27
  ## Expected Outputs
23
28
  - docs/reviews/review-testing.md — findings and resolution log
24
- - docs/testing-strategy.md — updated with fixes
29
+ - docs/tdd-standards.md — updated with fixes
30
+ - docs/reviews/testing/review-summary.md (depth 4+) — multi-model review synthesis
31
+ - docs/reviews/testing/codex-review.json (depth 4+, if available) — raw Codex findings
32
+ - docs/reviews/testing/gemini-review.json (depth 4+, if available) — raw Gemini findings
25
33
 
26
34
  ## Quality Criteria
27
- - Coverage gaps by layer identified
28
- - Domain invariant test cases verified
29
- - Test environment assumptions validated
30
- - Performance test coverage assessed against NFRs
31
- - Integration boundaries have integration tests defined
35
+ - (mvp) Coverage gaps by layer documented with severity
36
+ - (deep) Domain invariant test cases verified
37
+ - (deep) Each test environment assumption verified against actual environment config or flagged as unverifiable
38
+ - (deep) Performance test coverage assessed against NFRs
39
+ - (deep) Integration boundaries have integration tests defined
40
+ - Every finding categorized P0-P3 with specific test layer, gap, and issue
41
+ - Fix plan documented for all P0/P1 findings; fixes applied to tdd-standards.md and re-validated
42
+ - Downstream readiness confirmed — no unresolved P0 or P1 findings remain before operations step proceeds
43
+ - (depth 4+) Multi-model findings synthesized with consensus/disagreement analysis
32
44
 
33
45
  ## Methodology Scaling
34
- - **deep**: Full multi-pass review targeting all testing failure modes.
46
+ - **deep**: Full multi-pass review targeting all testing failure modes. Multi-model
47
+ review dispatched to Codex and Gemini if available, with graceful fallback
48
+ to Claude-only enhanced review.
35
49
  - **mvp**: Coverage gap check only.
36
- - **custom:depth(1-5)**: Scale passes with depth.
50
+ - **custom:depth(1-5)**: Depth 1: test coverage and pyramid balance pass only. Depth 2: add test quality and naming convention passes. Depth 3: add edge case coverage and CI integration passes. Depth 4: add external model review. Depth 5: multi-model review with reconciliation.
37
51
 
38
52
  ## Mode Detection
39
- Re-review mode if previous review exists.
53
+ Re-review mode if docs/reviews/review-testing.md or docs/reviews/testing/
54
+ directory exists. If multi-model review artifacts exist under
55
+ docs/reviews/testing/, preserve prior findings still valid.
56
+
57
+ ## Update Mode Specifics
58
+
59
+ - **Detect**: `docs/reviews/review-testing.md` exists with tracking comment
60
+ - **Preserve**: Prior findings still valid, resolution decisions, multi-model review artifacts
61
+ - **Triggers**: Upstream artifact changed since last review (compare tracking comment dates)
62
+ - **Conflict resolution**: Previously resolved findings reappearing = regression; flag and re-evaluate
@@ -1,18 +1,22 @@
1
1
  ---
2
2
  name: security
3
3
  description: Security review and documentation
4
+ summary: "Conducts a security review of your entire system — OWASP Top 10 coverage, input validation rules for every user-facing field, data classification, secrets management, CORS policy, rate limiting, and a threat model covering all trust boundaries."
4
5
  phase: "quality"
5
- order: 23
6
+ order: 950
6
7
  dependencies: [review-operations]
7
8
  outputs: [docs/security-review.md]
9
+ reads: [system-architecture, api-contracts, database-schema]
8
10
  conditional: null
9
- knowledge-base: [security-review]
11
+ knowledge-base: [security-best-practices]
10
12
  ---
11
13
 
12
14
  ## Purpose
13
15
  Conduct a security review of the entire system design. Document security
14
16
  controls, threat model, auth/authz approach, data protection, secrets
15
- management, and dependency audit strategy.
17
+ management, and dependency audit strategy. The review covers OWASP Top 10
18
+ analysis specific to this project's stack and architecture, plus STRIDE
19
+ threat modeling across all trust boundaries.
16
20
 
17
21
  ## Inputs
18
22
  - docs/system-architecture.md (required) — attack surface
@@ -24,12 +28,18 @@ management, and dependency audit strategy.
24
28
  - docs/security-review.md — security review and controls document
25
29
 
26
30
  ## Quality Criteria
27
- - OWASP top 10 addressed for this specific project
28
- - Auth/authz boundaries defined and consistent with API contracts
29
- - Data classified by sensitivity with handling requirements
30
- - Secrets management strategy defined (no secrets in code)
31
- - Threat model covers all trust boundaries
32
- - Dependency audit integrated into CI
31
+ - (mvp) OWASP top 10 addressed for this specific project
32
+ - (mvp) Every API endpoint has authentication and authorization requirements specified
33
+ - (mvp) Auth/authz boundaries defined and consistent with API contracts
34
+ - (mvp) Input validation rules defined for each user-facing field: data type, maximum length, regex pattern (where applicable), and rejection error message
35
+ - (deep) Data classified by sensitivity with handling requirements
36
+ - (mvp) Secrets management strategy documented with rotation policy (no hardcoded secrets in code)
37
+ - (deep) CORS policy explicitly configured per origin (not wildcard in production)
38
+ - (deep) Rate limiting defined for public-facing endpoints with specific thresholds
39
+ - (deep) Threat model covers all trust boundaries
40
+ - (deep) Dependency audit strategy documented (automated scanning, update cadence)
41
+ - (deep) Dependency audit integrated into CI
42
+ - (deep) Secret rotation testing documented (how to rotate each secret type without downtime)
33
43
 
34
44
  ## Methodology Scaling
35
45
  - **deep**: Full threat model (STRIDE). OWASP analysis per component.
@@ -41,4 +51,20 @@ management, and dependency audit strategy.
41
51
  Depth 4-5: full security review.
42
52
 
43
53
  ## Mode Detection
44
- Update mode if review exists.
54
+ Check for docs/security-review.md. If it exists, operate in update mode: read
55
+ existing security controls and threat model, diff against current system
56
+ architecture and API contracts. Preserve existing threat model entries, auth
57
+ decisions, and data classification. Add new threat boundaries for new
58
+ components. Update auth requirements if API contracts changed.
59
+
60
+ ## Update Mode Specifics
61
+ - **Detect prior artifact**: docs/security-review.md exists
62
+ - **Preserve**: threat model entries, data classification matrix, auth/authz
63
+ decisions, secrets management strategy, dependency audit configuration,
64
+ compliance checklist items
65
+ - **Triggers for update**: architecture added new components (new attack surface),
66
+ API contracts changed auth requirements, database schema changed data
67
+ sensitivity, operations runbook changed deployment security
68
+ - **Conflict resolution**: if a new component introduces a trust boundary
69
+ that conflicts with existing auth approach, document both and flag for
70
+ user decision; never weaken existing security controls without approval
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: story-tests
3
+ description: Generate test skeletons from user story acceptance criteria
4
+ summary: "Generates a test skeleton file for each user story — one pending test case per acceptance criterion, tagged with story and criterion IDs — giving agents a TDD starting point for every feature."
5
+ phase: "quality"
6
+ order: 915
7
+ dependencies: [tdd, review-user-stories, review-architecture]
8
+ outputs: [tests/acceptance/, docs/story-tests-map.md]
9
+ reads: [tech-stack, coding-standards, project-structure, api-contracts, database-schema, ux-spec]
10
+ conditional: null
11
+ knowledge-base: [testing-strategy, user-stories]
12
+ ---
13
+
14
+ ## Purpose
15
+ Generate test skeleton files from user story acceptance criteria, creating a
16
+ direct, traceable link from every AC to a tagged test case. Each story produces
17
+ a test file with one test case per acceptance criterion, tagged with story and
18
+ AC IDs for downstream coverage verification. Test cases are created as
19
+ pending/skipped — developers implement them during TDD execution.
20
+
21
+ ## Inputs
22
+ - docs/user-stories.md (required) — stories with acceptance criteria in GWT format
23
+ - docs/tdd-standards.md (required) — test framework, patterns, layer conventions
24
+ - docs/tech-stack.md (required) — language, test runner, assertion library
25
+ - docs/coding-standards.md (required) — test naming conventions
26
+ - docs/system-architecture.md (required) — component structure for layer assignment
27
+ - docs/project-structure.md (required) — test file location conventions
28
+ - docs/api-contracts.md (optional) — endpoint details for API test skeletons
29
+ - docs/database-schema.md (optional) — data layer context for integration tests
30
+ - docs/ux-spec.md (optional) — UI component context for component tests
31
+
32
+ ## Expected Outputs
33
+ - tests/acceptance/{story-id}-{slug}.test.* — one test file per story with
34
+ tagged pending test cases per AC
35
+ - docs/story-tests-map.md — traceability matrix mapping stories → test files,
36
+ ACs → test cases, and layer assignments (unit/integration/e2e)
37
+
38
+ ## Quality Criteria
39
+ - (mvp) Every user story in docs/user-stories.md has a corresponding test file
40
+ - (mvp) Every acceptance criterion has at least one tagged test case
41
+ - Test cases are tagged with story ID and AC ID for traceability
42
+ - (deep) Test layer assignment: single-function ACs → unit; cross-component ACs → integration; full user journey ACs → e2e
43
+ - Test files use the project's test framework from docs/tech-stack.md
44
+ - All test cases are created as pending/skipped (not implemented)
45
+ - docs/story-tests-map.md shows 100% AC-to-test-case coverage
46
+ - Test file location follows conventions from docs/project-structure.md
47
+ - (deep) Test data fixtures and dependencies documented for each test file
48
+
49
+ ## Methodology Scaling
50
+ - **deep**: All stories get test files. Negative test cases for every happy path
51
+ AC. Boundary condition tests. Layer-specific skeletons (unit + integration +
52
+ e2e where applicable). Traceability matrix with confidence analysis.
53
+ - **mvp**: Test files for Must-have stories only. One test case per AC. No
54
+ layer splitting — all tests in acceptance/ directory.
55
+ - **custom:depth(1-5)**: Depth 1: Must-have stories only. Depth 2: add
56
+ Should-have. Depth 3: add negative cases. Depth 4: add boundary conditions
57
+ and layer splitting. Depth 5: full suite with all stories and edge cases.
58
+
59
+ ## Mode Detection
60
+ Update mode if tests/acceptance/ directory exists. In update mode: add test
61
+ files for new stories, add test cases for new ACs in existing stories, never
62
+ delete user-implemented test logic (only add new pending cases). Update
63
+ docs/story-tests-map.md with new mappings.
64
+
65
+ ## Update Mode Specifics
66
+ - **Detect prior artifact**: tests/acceptance/ directory exists with test files
67
+ - **Preserve**: all user-implemented test logic, existing test file names and
68
+ structure, story ID and AC ID tags, traceability mappings in
69
+ docs/story-tests-map.md
70
+ - **Triggers for update**: user stories added or changed acceptance criteria,
71
+ architecture changed component structure (layer assignments may shift),
72
+ tdd-standards.md changed test patterns or framework
73
+ - **Conflict resolution**: if a story's AC was reworded, update the test case
74
+ description but preserve any implemented test body; if layer assignment
75
+ changed, move the test case to the correct layer file
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: api-contracts
3
3
  description: Specify API contracts for all system interfaces
4
+ summary: "Specifies every API endpoint — request/response shapes, error codes with human-readable messages, auth requirements, pagination, and example payloads — so frontend and backend can be built in parallel."
4
5
  phase: "specification"
5
- order: 15
6
+ order: 830
6
7
  dependencies: [review-architecture]
7
8
  outputs: [docs/api-contracts.md]
8
9
  conditional: "if-needed"
@@ -13,6 +14,8 @@ knowledge-base: [api-design]
13
14
  Define API contracts for all system interfaces — REST endpoints, GraphQL schema,
14
15
  WebSocket events, or inter-service communication. Each endpoint specifies request/
15
16
  response shapes, error codes, authentication requirements, and rate limits.
17
+ Contracts serve as the definitive agreement between frontend and backend agents,
18
+ enabling parallel development with confidence.
16
19
 
17
20
  ## Inputs
18
21
  - docs/system-architecture.md (required) — component interfaces to specify
@@ -24,12 +27,14 @@ response shapes, error codes, authentication requirements, and rate limits.
24
27
  shapes, error contracts, auth requirements
25
28
 
26
29
  ## Quality Criteria
27
- - Every domain operation that crosses a component boundary has an API endpoint
28
- - Error contracts are explicit (not just "500 Internal Server Error")
29
- - Authentication and authorization requirements per endpoint
30
- - Versioning strategy documented (if applicable)
31
- - Pagination, filtering, and sorting for list endpoints
32
- - Idempotency documented for mutating operations
30
+ - (mvp) Every domain operation that crosses a component boundary has an API endpoint
31
+ - (mvp) Every endpoint documents: success response code, error response codes, error response body schema, and at least 2 domain-specific error codes per endpoint with human-readable reason phrases (e.g., 400 `invalid_email`, 409 `user_already_exists`)
32
+ - (mvp) Authentication and authorization requirements per endpoint
33
+ - (deep) Versioning strategy documented (if applicable)
34
+ - (deep) Pagination, filtering, and sorting for list endpoints
35
+ - (deep) Idempotency documented for mutating operations
36
+ - (deep) Pagination schema documented for all list endpoints (cursor or offset, page size limits, total count)
37
+ - (mvp) Example request and response payloads included for each endpoint
33
38
 
34
39
  ## Methodology Scaling
35
40
  - **deep**: OpenAPI-style specification. Full request/response schemas with
@@ -41,4 +46,19 @@ response shapes, error codes, authentication requirements, and rate limits.
41
46
  error contracts. Depth 4-5: full OpenAPI-style spec.
42
47
 
43
48
  ## Mode Detection
44
- Update mode if contracts exist. Diff against architecture changes.
49
+ Check for docs/api-contracts.md. If it exists, operate in update mode: read
50
+ existing endpoint definitions and diff against current system architecture and
51
+ domain models. Preserve existing endpoint paths, request/response schemas, and
52
+ error contracts. Add new endpoints for new features or domain operations.
53
+ Update error contracts if domain model changed validation rules. Never remove
54
+ or rename existing endpoints without explicit user approval.
55
+
56
+ ## Update Mode Specifics
57
+ - **Detect prior artifact**: docs/api-contracts.md exists
58
+ - **Preserve**: existing endpoint paths, HTTP methods, request/response schemas,
59
+ error codes, auth requirements, pagination patterns, versioning strategy
60
+ - **Triggers for update**: architecture changed component boundaries, domain
61
+ models added new operations, ADRs changed API style or auth approach
62
+ - **Conflict resolution**: if architecture moved an operation to a different
63
+ component, update the endpoint's component ownership but preserve its contract;
64
+ flag breaking schema changes for user review
@@ -1,17 +1,22 @@
1
1
  ---
2
2
  name: database-schema
3
3
  description: Design database schema from domain models
4
+ summary: "Translates your domain model into database tables with constraints that enforce business rules, indexes optimized for your API query patterns, and a reversible migration strategy."
4
5
  phase: "specification"
5
- order: 13
6
+ order: 810
6
7
  dependencies: [review-architecture]
7
8
  outputs: [docs/database-schema.md]
9
+ reads: [domain-modeling, system-architecture, adrs]
8
10
  conditional: "if-needed"
9
11
  knowledge-base: [database-design]
10
12
  ---
11
13
 
12
14
  ## Purpose
13
15
  Translate domain models into a concrete database schema. Define tables/collections,
14
- relationships, indexes, constraints, and migration strategy.
16
+ relationships, indexes, constraints, and migration strategy. Every domain entity
17
+ maps to a table with appropriate normalization, and every domain invariant is
18
+ enforced at the database level through constraints. Indexing strategy is derived
19
+ from the application's query patterns.
15
20
 
16
21
  ## Inputs
17
22
  - docs/domain-models/ (required) — entities and relationships to model
@@ -23,11 +28,12 @@ relationships, indexes, constraints, and migration strategy.
23
28
  constraints, and migration strategy
24
29
 
25
30
  ## Quality Criteria
26
- - Every domain entity maps to a table/collection (or justified denormalization)
27
- - Relationships match domain model relationships
28
- - Indexes cover known query patterns from architecture data flows
29
- - Constraints enforce domain invariants at the database level
30
- - Migration strategy handles schema evolution
31
+ - (mvp) Every domain entity maps to a table/collection (or justified denormalization)
32
+ - (mvp) Relationships match domain model relationships
33
+ - (mvp) Constraints enforce domain invariants at the database level
34
+ - (deep) Migration strategy specifies: migration tool, forward migration approach, rollback approach, and data preservation policy
35
+ - (deep) Every migration is reversible (rollback script or equivalent exists)
36
+ - (mvp) Indexes cover all query patterns referenced in docs/api-contracts.md (if it exists)
31
37
 
32
38
  ## Methodology Scaling
33
39
  - **deep**: Full schema specification. CREATE TABLE statements or equivalent.
@@ -38,4 +44,19 @@ relationships, indexes, constraints, and migration strategy.
38
44
  constraints. Depth 4-5: full specification with migrations.
39
45
 
40
46
  ## Mode Detection
41
- Update mode if schema exists. Diff against current domain models.
47
+ Check for docs/database-schema.md. If it exists, operate in update mode: read
48
+ existing schema and diff against current domain models in docs/domain-models/.
49
+ Preserve existing table definitions, relationships, constraints, and migration
50
+ history. Add new entities from updated domain models. Update indexes for new
51
+ query patterns identified in architecture data flows. Never drop existing
52
+ tables without explicit user approval.
53
+
54
+ ## Update Mode Specifics
55
+ - **Detect prior artifact**: docs/database-schema.md exists
56
+ - **Preserve**: existing table/collection definitions, relationships, constraints,
57
+ migration history, index justifications, seed data strategy
58
+ - **Triggers for update**: domain models changed (new entities or relationships),
59
+ ADRs changed database technology, architecture introduced new query patterns
60
+ - **Conflict resolution**: if domain model renamed an entity, create a migration
61
+ that renames rather than drops and recreates; flag breaking changes for user
62
+ review