@zigrivers/scaffold 3.15.0 → 3.17.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 (381) hide show
  1. package/README.md +47 -12
  2. package/content/knowledge/backend/backend-fintech-broker-integration.md +244 -0
  3. package/content/knowledge/backend/backend-fintech-compliance.md +181 -0
  4. package/content/knowledge/backend/backend-fintech-data-modeling.md +210 -0
  5. package/content/knowledge/backend/backend-fintech-ledger.md +226 -0
  6. package/content/knowledge/backend/backend-fintech-observability.md +151 -0
  7. package/content/knowledge/backend/backend-fintech-order-lifecycle.md +213 -0
  8. package/content/knowledge/backend/backend-fintech-risk-management.md +150 -0
  9. package/content/knowledge/backend/backend-fintech-testing.md +197 -0
  10. package/content/knowledge/core/automated-review-tooling.md +31 -26
  11. package/content/knowledge/core/multi-model-review-dispatch.md +30 -55
  12. package/content/knowledge/core/multi-service-api-contracts.md +634 -0
  13. package/content/knowledge/core/multi-service-architecture.md +492 -0
  14. package/content/knowledge/core/multi-service-auth.md +706 -0
  15. package/content/knowledge/core/multi-service-data-ownership.md +539 -0
  16. package/content/knowledge/core/multi-service-observability.md +545 -0
  17. package/content/knowledge/core/multi-service-resilience.md +710 -0
  18. package/content/knowledge/core/multi-service-task-decomposition.md +615 -0
  19. package/content/knowledge/core/multi-service-testing.md +728 -0
  20. package/content/methodology/backend-fintech.yml +46 -0
  21. package/content/methodology/custom-defaults.yml +6 -0
  22. package/content/methodology/deep.yml +6 -0
  23. package/content/methodology/multi-service-overlay.yml +103 -0
  24. package/content/methodology/mvp.yml +6 -0
  25. package/content/pipeline/architecture/service-ownership-map.md +83 -0
  26. package/content/pipeline/quality/cross-service-auth.md +96 -0
  27. package/content/pipeline/quality/cross-service-observability.md +104 -0
  28. package/content/pipeline/quality/integration-test-plan.md +106 -0
  29. package/content/pipeline/specification/inter-service-contracts.md +95 -0
  30. package/content/tools/post-implementation-review.md +36 -7
  31. package/content/tools/review-code.md +33 -8
  32. package/content/tools/review-pr.md +79 -95
  33. package/dist/cli/commands/adopt.cli-flags.test.js +20 -0
  34. package/dist/cli/commands/adopt.cli-flags.test.js.map +1 -1
  35. package/dist/cli/commands/adopt.d.ts.map +1 -1
  36. package/dist/cli/commands/adopt.js +11 -3
  37. package/dist/cli/commands/adopt.js.map +1 -1
  38. package/dist/cli/commands/complete.d.ts +1 -0
  39. package/dist/cli/commands/complete.d.ts.map +1 -1
  40. package/dist/cli/commands/complete.js +26 -8
  41. package/dist/cli/commands/complete.js.map +1 -1
  42. package/dist/cli/commands/dashboard.d.ts +1 -0
  43. package/dist/cli/commands/dashboard.d.ts.map +1 -1
  44. package/dist/cli/commands/dashboard.js +19 -6
  45. package/dist/cli/commands/dashboard.js.map +1 -1
  46. package/dist/cli/commands/decisions.d.ts +1 -0
  47. package/dist/cli/commands/decisions.d.ts.map +1 -1
  48. package/dist/cli/commands/decisions.js +18 -4
  49. package/dist/cli/commands/decisions.js.map +1 -1
  50. package/dist/cli/commands/info.d.ts +1 -0
  51. package/dist/cli/commands/info.d.ts.map +1 -1
  52. package/dist/cli/commands/info.js +25 -3
  53. package/dist/cli/commands/info.js.map +1 -1
  54. package/dist/cli/commands/init-from.test.d.ts +2 -0
  55. package/dist/cli/commands/init-from.test.d.ts.map +1 -0
  56. package/dist/cli/commands/init-from.test.js +315 -0
  57. package/dist/cli/commands/init-from.test.js.map +1 -0
  58. package/dist/cli/commands/init.d.ts +3 -0
  59. package/dist/cli/commands/init.d.ts.map +1 -1
  60. package/dist/cli/commands/init.js +239 -129
  61. package/dist/cli/commands/init.js.map +1 -1
  62. package/dist/cli/commands/init.test.js +20 -0
  63. package/dist/cli/commands/init.test.js.map +1 -1
  64. package/dist/cli/commands/next.d.ts +1 -0
  65. package/dist/cli/commands/next.d.ts.map +1 -1
  66. package/dist/cli/commands/next.js +40 -4
  67. package/dist/cli/commands/next.js.map +1 -1
  68. package/dist/cli/commands/next.test.js +151 -0
  69. package/dist/cli/commands/next.test.js.map +1 -1
  70. package/dist/cli/commands/reset.d.ts +1 -0
  71. package/dist/cli/commands/reset.d.ts.map +1 -1
  72. package/dist/cli/commands/reset.js +77 -29
  73. package/dist/cli/commands/reset.js.map +1 -1
  74. package/dist/cli/commands/rework.d.ts +1 -0
  75. package/dist/cli/commands/rework.d.ts.map +1 -1
  76. package/dist/cli/commands/rework.js +16 -2
  77. package/dist/cli/commands/rework.js.map +1 -1
  78. package/dist/cli/commands/run.d.ts +1 -0
  79. package/dist/cli/commands/run.d.ts.map +1 -1
  80. package/dist/cli/commands/run.js +65 -13
  81. package/dist/cli/commands/run.js.map +1 -1
  82. package/dist/cli/commands/run.test.js +192 -3
  83. package/dist/cli/commands/run.test.js.map +1 -1
  84. package/dist/cli/commands/skip.d.ts +1 -0
  85. package/dist/cli/commands/skip.d.ts.map +1 -1
  86. package/dist/cli/commands/skip.js +24 -7
  87. package/dist/cli/commands/skip.js.map +1 -1
  88. package/dist/cli/commands/status.d.ts +1 -0
  89. package/dist/cli/commands/status.d.ts.map +1 -1
  90. package/dist/cli/commands/status.js +51 -4
  91. package/dist/cli/commands/status.js.map +1 -1
  92. package/dist/cli/commands/status.test.js +128 -0
  93. package/dist/cli/commands/status.test.js.map +1 -1
  94. package/dist/cli/guards-coverage.test.d.ts +2 -0
  95. package/dist/cli/guards-coverage.test.d.ts.map +1 -0
  96. package/dist/cli/guards-coverage.test.js +26 -0
  97. package/dist/cli/guards-coverage.test.js.map +1 -0
  98. package/dist/cli/guards-integration.test.d.ts +2 -0
  99. package/dist/cli/guards-integration.test.d.ts.map +1 -0
  100. package/dist/cli/guards-integration.test.js +178 -0
  101. package/dist/cli/guards-integration.test.js.map +1 -0
  102. package/dist/cli/guards.d.ts +13 -0
  103. package/dist/cli/guards.d.ts.map +1 -0
  104. package/dist/cli/guards.js +70 -0
  105. package/dist/cli/guards.js.map +1 -0
  106. package/dist/cli/guards.test.d.ts +2 -0
  107. package/dist/cli/guards.test.d.ts.map +1 -0
  108. package/dist/cli/guards.test.js +136 -0
  109. package/dist/cli/guards.test.js.map +1 -0
  110. package/dist/cli/init-flag-families.d.ts +1 -1
  111. package/dist/cli/init-flag-families.d.ts.map +1 -1
  112. package/dist/cli/init-flag-families.js +4 -1
  113. package/dist/cli/init-flag-families.js.map +1 -1
  114. package/dist/cli/init-flag-families.test.js +10 -0
  115. package/dist/cli/init-flag-families.test.js.map +1 -1
  116. package/dist/cli/shutdown.d.ts +2 -3
  117. package/dist/cli/shutdown.d.ts.map +1 -1
  118. package/dist/cli/shutdown.js +14 -11
  119. package/dist/cli/shutdown.js.map +1 -1
  120. package/dist/cli/shutdown.test.js +2 -4
  121. package/dist/cli/shutdown.test.js.map +1 -1
  122. package/dist/config/schema.d.ts +12122 -288
  123. package/dist/config/schema.d.ts.map +1 -1
  124. package/dist/config/schema.js +74 -79
  125. package/dist/config/schema.js.map +1 -1
  126. package/dist/config/schema.test.js +230 -1
  127. package/dist/config/schema.test.js.map +1 -1
  128. package/dist/config/validators/backend.d.ts +4 -0
  129. package/dist/config/validators/backend.d.ts.map +1 -0
  130. package/dist/config/validators/backend.js +14 -0
  131. package/dist/config/validators/backend.js.map +1 -0
  132. package/dist/config/validators/browser-extension.d.ts +4 -0
  133. package/dist/config/validators/browser-extension.d.ts.map +1 -0
  134. package/dist/config/validators/browser-extension.js +24 -0
  135. package/dist/config/validators/browser-extension.js.map +1 -0
  136. package/dist/config/validators/cli.d.ts +4 -0
  137. package/dist/config/validators/cli.d.ts.map +1 -0
  138. package/dist/config/validators/cli.js +14 -0
  139. package/dist/config/validators/cli.js.map +1 -0
  140. package/dist/config/validators/data-pipeline.d.ts +4 -0
  141. package/dist/config/validators/data-pipeline.d.ts.map +1 -0
  142. package/dist/config/validators/data-pipeline.js +14 -0
  143. package/dist/config/validators/data-pipeline.js.map +1 -0
  144. package/dist/config/validators/game.d.ts +4 -0
  145. package/dist/config/validators/game.d.ts.map +1 -0
  146. package/dist/config/validators/game.js +14 -0
  147. package/dist/config/validators/game.js.map +1 -0
  148. package/dist/config/validators/index.d.ts +7 -0
  149. package/dist/config/validators/index.d.ts.map +1 -0
  150. package/dist/config/validators/index.js +27 -0
  151. package/dist/config/validators/index.js.map +1 -0
  152. package/dist/config/validators/library.d.ts +4 -0
  153. package/dist/config/validators/library.d.ts.map +1 -0
  154. package/dist/config/validators/library.js +25 -0
  155. package/dist/config/validators/library.js.map +1 -0
  156. package/dist/config/validators/ml.d.ts +4 -0
  157. package/dist/config/validators/ml.d.ts.map +1 -0
  158. package/dist/config/validators/ml.js +31 -0
  159. package/dist/config/validators/ml.js.map +1 -0
  160. package/dist/config/validators/mobile-app.d.ts +4 -0
  161. package/dist/config/validators/mobile-app.d.ts.map +1 -0
  162. package/dist/config/validators/mobile-app.js +14 -0
  163. package/dist/config/validators/mobile-app.js.map +1 -0
  164. package/dist/config/validators/registry.test.d.ts +2 -0
  165. package/dist/config/validators/registry.test.d.ts.map +1 -0
  166. package/dist/config/validators/registry.test.js +26 -0
  167. package/dist/config/validators/registry.test.js.map +1 -0
  168. package/dist/config/validators/research.d.ts +4 -0
  169. package/dist/config/validators/research.d.ts.map +1 -0
  170. package/dist/config/validators/research.js +24 -0
  171. package/dist/config/validators/research.js.map +1 -0
  172. package/dist/config/validators/research.test.d.ts +2 -0
  173. package/dist/config/validators/research.test.d.ts.map +1 -0
  174. package/dist/config/validators/research.test.js +44 -0
  175. package/dist/config/validators/research.test.js.map +1 -0
  176. package/dist/config/validators/types.d.ts +19 -0
  177. package/dist/config/validators/types.d.ts.map +1 -0
  178. package/dist/config/validators/types.js +2 -0
  179. package/dist/config/validators/types.js.map +1 -0
  180. package/dist/config/validators/validators.test.d.ts +2 -0
  181. package/dist/config/validators/validators.test.d.ts.map +1 -0
  182. package/dist/config/validators/validators.test.js +25 -0
  183. package/dist/config/validators/validators.test.js.map +1 -0
  184. package/dist/config/validators/web-app.d.ts +4 -0
  185. package/dist/config/validators/web-app.d.ts.map +1 -0
  186. package/dist/config/validators/web-app.js +31 -0
  187. package/dist/config/validators/web-app.js.map +1 -0
  188. package/dist/core/assembly/context-gatherer.d.ts.map +1 -1
  189. package/dist/core/assembly/context-gatherer.js +4 -2
  190. package/dist/core/assembly/context-gatherer.js.map +1 -1
  191. package/dist/core/assembly/cross-reads.d.ts +58 -0
  192. package/dist/core/assembly/cross-reads.d.ts.map +1 -0
  193. package/dist/core/assembly/cross-reads.js +185 -0
  194. package/dist/core/assembly/cross-reads.js.map +1 -0
  195. package/dist/core/assembly/cross-reads.test.d.ts +2 -0
  196. package/dist/core/assembly/cross-reads.test.d.ts.map +1 -0
  197. package/dist/core/assembly/cross-reads.test.js +383 -0
  198. package/dist/core/assembly/cross-reads.test.js.map +1 -0
  199. package/dist/core/assembly/overlay-loader-structural.test.d.ts +2 -0
  200. package/dist/core/assembly/overlay-loader-structural.test.d.ts.map +1 -0
  201. package/dist/core/assembly/overlay-loader-structural.test.js +114 -0
  202. package/dist/core/assembly/overlay-loader-structural.test.js.map +1 -0
  203. package/dist/core/assembly/overlay-loader.d.ts +17 -3
  204. package/dist/core/assembly/overlay-loader.d.ts.map +1 -1
  205. package/dist/core/assembly/overlay-loader.js +75 -0
  206. package/dist/core/assembly/overlay-loader.js.map +1 -1
  207. package/dist/core/assembly/overlay-resolver.d.ts +2 -2
  208. package/dist/core/assembly/overlay-resolver.d.ts.map +1 -1
  209. package/dist/core/assembly/overlay-resolver.js.map +1 -1
  210. package/dist/core/assembly/overlay-resolver.test.js.map +1 -1
  211. package/dist/core/assembly/overlay-state-resolver.d.ts +5 -0
  212. package/dist/core/assembly/overlay-state-resolver.d.ts.map +1 -1
  213. package/dist/core/assembly/overlay-state-resolver.js +41 -1
  214. package/dist/core/assembly/overlay-state-resolver.js.map +1 -1
  215. package/dist/core/assembly/overlay-state-resolver.test.js +262 -0
  216. package/dist/core/assembly/overlay-state-resolver.test.js.map +1 -1
  217. package/dist/core/assembly/update-mode.d.ts +1 -0
  218. package/dist/core/assembly/update-mode.d.ts.map +1 -1
  219. package/dist/core/assembly/update-mode.js +17 -9
  220. package/dist/core/assembly/update-mode.js.map +1 -1
  221. package/dist/core/dependency/eligibility.d.ts +10 -1
  222. package/dist/core/dependency/eligibility.d.ts.map +1 -1
  223. package/dist/core/dependency/eligibility.js +19 -1
  224. package/dist/core/dependency/eligibility.js.map +1 -1
  225. package/dist/core/dependency/eligibility.test.js +82 -0
  226. package/dist/core/dependency/eligibility.test.js.map +1 -1
  227. package/dist/core/dependency/graph.d.ts +4 -1
  228. package/dist/core/dependency/graph.d.ts.map +1 -1
  229. package/dist/core/dependency/graph.js +7 -1
  230. package/dist/core/dependency/graph.js.map +1 -1
  231. package/dist/core/dependency/graph.test.js +29 -0
  232. package/dist/core/dependency/graph.test.js.map +1 -1
  233. package/dist/core/pipeline/global-steps.d.ts +7 -0
  234. package/dist/core/pipeline/global-steps.d.ts.map +1 -0
  235. package/dist/core/pipeline/global-steps.js +18 -0
  236. package/dist/core/pipeline/global-steps.js.map +1 -0
  237. package/dist/core/pipeline/resolver.d.ts +1 -0
  238. package/dist/core/pipeline/resolver.d.ts.map +1 -1
  239. package/dist/core/pipeline/resolver.js +51 -6
  240. package/dist/core/pipeline/resolver.js.map +1 -1
  241. package/dist/core/pipeline/types.d.ts +5 -1
  242. package/dist/core/pipeline/types.d.ts.map +1 -1
  243. package/dist/e2e/cross-service-references.test.d.ts +22 -0
  244. package/dist/e2e/cross-service-references.test.d.ts.map +1 -0
  245. package/dist/e2e/cross-service-references.test.js +188 -0
  246. package/dist/e2e/cross-service-references.test.js.map +1 -0
  247. package/dist/e2e/multi-service-pipeline.test.d.ts +10 -0
  248. package/dist/e2e/multi-service-pipeline.test.d.ts.map +1 -0
  249. package/dist/e2e/multi-service-pipeline.test.js +185 -0
  250. package/dist/e2e/multi-service-pipeline.test.js.map +1 -0
  251. package/dist/e2e/project-type-overlays.test.js +68 -0
  252. package/dist/e2e/project-type-overlays.test.js.map +1 -1
  253. package/dist/e2e/service-execution.test.d.ts +15 -0
  254. package/dist/e2e/service-execution.test.d.ts.map +1 -0
  255. package/dist/e2e/service-execution.test.js +219 -0
  256. package/dist/e2e/service-execution.test.js.map +1 -0
  257. package/dist/e2e/service-manifest.test.d.ts +19 -0
  258. package/dist/e2e/service-manifest.test.d.ts.map +1 -0
  259. package/dist/e2e/service-manifest.test.js +166 -0
  260. package/dist/e2e/service-manifest.test.js.map +1 -0
  261. package/dist/project/__frozen-schemas__/schema-v3.9.2.d.ts +224 -224
  262. package/dist/project/frontmatter.d.ts.map +1 -1
  263. package/dist/project/frontmatter.js +11 -0
  264. package/dist/project/frontmatter.js.map +1 -1
  265. package/dist/project/frontmatter.test.js +71 -0
  266. package/dist/project/frontmatter.test.js.map +1 -1
  267. package/dist/state/completion.d.ts +1 -1
  268. package/dist/state/completion.d.ts.map +1 -1
  269. package/dist/state/completion.js +10 -8
  270. package/dist/state/completion.js.map +1 -1
  271. package/dist/state/decision-logger.d.ts +3 -2
  272. package/dist/state/decision-logger.d.ts.map +1 -1
  273. package/dist/state/decision-logger.js +12 -11
  274. package/dist/state/decision-logger.js.map +1 -1
  275. package/dist/state/ensure-v3-migration.d.ts +9 -0
  276. package/dist/state/ensure-v3-migration.d.ts.map +1 -0
  277. package/dist/state/ensure-v3-migration.js +35 -0
  278. package/dist/state/ensure-v3-migration.js.map +1 -0
  279. package/dist/state/lock-manager.d.ts +5 -4
  280. package/dist/state/lock-manager.d.ts.map +1 -1
  281. package/dist/state/lock-manager.js +11 -11
  282. package/dist/state/lock-manager.js.map +1 -1
  283. package/dist/state/rework-manager.d.ts +1 -2
  284. package/dist/state/rework-manager.d.ts.map +1 -1
  285. package/dist/state/rework-manager.js +4 -5
  286. package/dist/state/rework-manager.js.map +1 -1
  287. package/dist/state/state-manager.d.ts +25 -1
  288. package/dist/state/state-manager.d.ts.map +1 -1
  289. package/dist/state/state-manager.js +86 -12
  290. package/dist/state/state-manager.js.map +1 -1
  291. package/dist/state/state-manager.test.js +278 -0
  292. package/dist/state/state-manager.test.js.map +1 -1
  293. package/dist/state/state-migration-v3.d.ts +22 -0
  294. package/dist/state/state-migration-v3.d.ts.map +1 -0
  295. package/dist/state/state-migration-v3.js +82 -0
  296. package/dist/state/state-migration-v3.js.map +1 -0
  297. package/dist/state/state-migration-v3.test.d.ts +2 -0
  298. package/dist/state/state-migration-v3.test.d.ts.map +1 -0
  299. package/dist/state/state-migration-v3.test.js +196 -0
  300. package/dist/state/state-migration-v3.test.js.map +1 -0
  301. package/dist/state/state-migration.d.ts.map +1 -1
  302. package/dist/state/state-migration.js +11 -6
  303. package/dist/state/state-migration.js.map +1 -1
  304. package/dist/state/state-migration.test.js +47 -2
  305. package/dist/state/state-migration.test.js.map +1 -1
  306. package/dist/state/state-path-resolver.d.ts +23 -0
  307. package/dist/state/state-path-resolver.d.ts.map +1 -0
  308. package/dist/state/state-path-resolver.js +36 -0
  309. package/dist/state/state-path-resolver.js.map +1 -0
  310. package/dist/state/state-path-resolver.test.d.ts +2 -0
  311. package/dist/state/state-path-resolver.test.d.ts.map +1 -0
  312. package/dist/state/state-path-resolver.test.js +78 -0
  313. package/dist/state/state-path-resolver.test.js.map +1 -0
  314. package/dist/state/state-version-dispatch.d.ts +17 -0
  315. package/dist/state/state-version-dispatch.d.ts.map +1 -0
  316. package/dist/state/state-version-dispatch.js +27 -0
  317. package/dist/state/state-version-dispatch.js.map +1 -0
  318. package/dist/state/state-version-dispatch.test.d.ts +2 -0
  319. package/dist/state/state-version-dispatch.test.d.ts.map +1 -0
  320. package/dist/state/state-version-dispatch.test.js +40 -0
  321. package/dist/state/state-version-dispatch.test.js.map +1 -0
  322. package/dist/types/config.d.ts +25 -3
  323. package/dist/types/config.d.ts.map +1 -1
  324. package/dist/types/config.test.js +13 -1
  325. package/dist/types/config.test.js.map +1 -1
  326. package/dist/types/dependency.d.ts +5 -0
  327. package/dist/types/dependency.d.ts.map +1 -1
  328. package/dist/types/frontmatter.d.ts +5 -0
  329. package/dist/types/frontmatter.d.ts.map +1 -1
  330. package/dist/types/lock.d.ts +1 -1
  331. package/dist/types/lock.d.ts.map +1 -1
  332. package/dist/types/state.d.ts +1 -1
  333. package/dist/types/state.d.ts.map +1 -1
  334. package/dist/utils/artifact-path.d.ts +19 -0
  335. package/dist/utils/artifact-path.d.ts.map +1 -0
  336. package/dist/utils/artifact-path.js +95 -0
  337. package/dist/utils/artifact-path.js.map +1 -0
  338. package/dist/utils/artifact-path.test.d.ts +2 -0
  339. package/dist/utils/artifact-path.test.d.ts.map +1 -0
  340. package/dist/utils/artifact-path.test.js +138 -0
  341. package/dist/utils/artifact-path.test.js.map +1 -0
  342. package/dist/utils/errors.d.ts +1 -1
  343. package/dist/utils/errors.d.ts.map +1 -1
  344. package/dist/utils/errors.js +5 -2
  345. package/dist/utils/errors.js.map +1 -1
  346. package/dist/utils/user-errors.d.ts +46 -0
  347. package/dist/utils/user-errors.d.ts.map +1 -0
  348. package/dist/utils/user-errors.js +76 -0
  349. package/dist/utils/user-errors.js.map +1 -0
  350. package/dist/utils/user-errors.test.d.ts +2 -0
  351. package/dist/utils/user-errors.test.d.ts.map +1 -0
  352. package/dist/utils/user-errors.test.js +74 -0
  353. package/dist/utils/user-errors.test.js.map +1 -0
  354. package/dist/validation/index.d.ts.map +1 -1
  355. package/dist/validation/index.js +16 -0
  356. package/dist/validation/index.js.map +1 -1
  357. package/dist/validation/index.test.js +48 -0
  358. package/dist/validation/index.test.js.map +1 -1
  359. package/dist/validation/state-validator.d.ts +5 -2
  360. package/dist/validation/state-validator.d.ts.map +1 -1
  361. package/dist/validation/state-validator.js +18 -20
  362. package/dist/validation/state-validator.js.map +1 -1
  363. package/dist/validation/state-validator.test.js +31 -2
  364. package/dist/validation/state-validator.test.js.map +1 -1
  365. package/dist/wizard/copy/backend.d.ts.map +1 -1
  366. package/dist/wizard/copy/backend.js +12 -0
  367. package/dist/wizard/copy/backend.js.map +1 -1
  368. package/dist/wizard/flags.d.ts +1 -0
  369. package/dist/wizard/flags.d.ts.map +1 -1
  370. package/dist/wizard/questions.d.ts.map +1 -1
  371. package/dist/wizard/questions.js +5 -1
  372. package/dist/wizard/questions.js.map +1 -1
  373. package/dist/wizard/questions.test.js +45 -2
  374. package/dist/wizard/questions.test.js.map +1 -1
  375. package/dist/wizard/wizard.d.ts +23 -0
  376. package/dist/wizard/wizard.d.ts.map +1 -1
  377. package/dist/wizard/wizard.js +85 -47
  378. package/dist/wizard/wizard.js.map +1 -1
  379. package/dist/wizard/wizard.test.js +186 -1
  380. package/dist/wizard/wizard.test.js.map +1 -1
  381. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ # methodology/backend-fintech.yml
2
+ name: backend-fintech
3
+ description: >
4
+ Fintech domain sub-overlay — adds compliance, ledger design,
5
+ broker integration, order lifecycle, risk management, and
6
+ observability knowledge to backend projects.
7
+ project-type: backend
8
+ domain: fintech
9
+
10
+ knowledge-overrides:
11
+ create-prd:
12
+ append: [backend-fintech-compliance, backend-fintech-broker-integration]
13
+ user-stories:
14
+ append: [backend-fintech-order-lifecycle, backend-fintech-risk-management]
15
+ domain-modeling:
16
+ append: [backend-fintech-ledger, backend-fintech-order-lifecycle, backend-fintech-data-modeling]
17
+ system-architecture:
18
+ append: [backend-fintech-broker-integration, backend-fintech-risk-management]
19
+ database-schema:
20
+ append: [backend-fintech-ledger, backend-fintech-data-modeling]
21
+ api-contracts:
22
+ append: [backend-fintech-order-lifecycle]
23
+ security:
24
+ append: [backend-fintech-compliance]
25
+ operations:
26
+ append: [backend-fintech-observability, backend-fintech-risk-management]
27
+ tdd:
28
+ append: [backend-fintech-testing]
29
+ create-evals:
30
+ append: [backend-fintech-testing, backend-fintech-compliance]
31
+ story-tests:
32
+ append: [backend-fintech-testing]
33
+ review-architecture:
34
+ append: [backend-fintech-broker-integration, backend-fintech-risk-management, backend-fintech-ledger]
35
+ review-api:
36
+ append: [backend-fintech-order-lifecycle]
37
+ review-database:
38
+ append: [backend-fintech-ledger, backend-fintech-data-modeling]
39
+ review-security:
40
+ append: [backend-fintech-compliance]
41
+ review-operations:
42
+ append: [backend-fintech-observability, backend-fintech-risk-management]
43
+ review-testing:
44
+ append: [backend-fintech-testing]
45
+ implementation-plan:
46
+ append: [backend-fintech-ledger, backend-fintech-broker-integration, backend-fintech-order-lifecycle, backend-fintech-risk-management, backend-fintech-compliance]
@@ -106,3 +106,9 @@ steps:
106
106
  analytics-telemetry: { enabled: false }
107
107
  live-ops-plan: { enabled: false }
108
108
  platform-cert-prep: { enabled: false }
109
+ # Multi-service steps (enabled via multi-service overlay)
110
+ service-ownership-map: { enabled: false }
111
+ inter-service-contracts: { enabled: false }
112
+ cross-service-auth: { enabled: false }
113
+ cross-service-observability: { enabled: false }
114
+ integration-test-plan: { enabled: false }
@@ -105,3 +105,9 @@ steps:
105
105
  analytics-telemetry: { enabled: false }
106
106
  live-ops-plan: { enabled: false }
107
107
  platform-cert-prep: { enabled: false }
108
+ # Multi-service steps (enabled via multi-service overlay)
109
+ service-ownership-map: { enabled: false }
110
+ inter-service-contracts: { enabled: false }
111
+ cross-service-auth: { enabled: false }
112
+ cross-service-observability: { enabled: false }
113
+ integration-test-plan: { enabled: false }
@@ -0,0 +1,103 @@
1
+ name: multi-service
2
+ description: >
3
+ Cross-service pipeline steps and knowledge for multi-service monorepos.
4
+ Activated by presence of services[] in config.
5
+
6
+ # ---------------------------------------------------------------------------
7
+ # step-overrides
8
+ # ---------------------------------------------------------------------------
9
+ step-overrides:
10
+ # Cross-service steps (wave 2)
11
+ service-ownership-map: { enabled: true }
12
+ inter-service-contracts: { enabled: true }
13
+ cross-service-auth: { enabled: true }
14
+ cross-service-observability: { enabled: true }
15
+ integration-test-plan: { enabled: true }
16
+ # Pre-phase steps marked global (already enabled — no-op for enablement,
17
+ # but marks them as global for the step classifier in wave 3b)
18
+ create-vision: { enabled: true }
19
+ review-vision: { enabled: true }
20
+ create-prd: { enabled: true }
21
+ review-prd: { enabled: true }
22
+
23
+ # ---------------------------------------------------------------------------
24
+ # knowledge-overrides
25
+ # ---------------------------------------------------------------------------
26
+ knowledge-overrides:
27
+ # Architecture awareness
28
+ system-architecture:
29
+ append: [multi-service-architecture, multi-service-resilience]
30
+ # Domain/data awareness
31
+ domain-modeling:
32
+ append: [multi-service-data-ownership]
33
+ database-schema:
34
+ append: [multi-service-data-ownership]
35
+ # API awareness
36
+ api-contracts:
37
+ append: [multi-service-api-contracts]
38
+ review-api:
39
+ append: [multi-service-api-contracts]
40
+ # Operations awareness
41
+ operations:
42
+ append: [multi-service-observability, multi-service-resilience]
43
+ review-operations:
44
+ append: [multi-service-observability]
45
+ # Security awareness
46
+ security:
47
+ append: [multi-service-auth]
48
+ review-security:
49
+ append: [multi-service-auth]
50
+ # Testing awareness
51
+ review-testing:
52
+ append: [multi-service-testing]
53
+ story-tests:
54
+ append: [multi-service-testing]
55
+ create-evals:
56
+ append: [multi-service-testing]
57
+ # Planning awareness
58
+ implementation-plan:
59
+ append: [multi-service-task-decomposition]
60
+ implementation-plan-review:
61
+ append: [multi-service-task-decomposition]
62
+
63
+ # ---------------------------------------------------------------------------
64
+ # reads-overrides
65
+ # ---------------------------------------------------------------------------
66
+ reads-overrides:
67
+ # Planning reads cross-service artifacts
68
+ implementation-plan:
69
+ append: [service-ownership-map, inter-service-contracts]
70
+ # Security review reads cross-service auth (order 952 < 960 allows this)
71
+ review-security:
72
+ append: [cross-service-auth]
73
+ # Database schema reads ownership map for data partitioning
74
+ database-schema:
75
+ append: [service-ownership-map]
76
+ # Validation phase reads all 5 new outputs for holistic review
77
+ cross-phase-consistency:
78
+ append:
79
+ - service-ownership-map
80
+ - inter-service-contracts
81
+ - cross-service-auth
82
+ - cross-service-observability
83
+ - integration-test-plan
84
+
85
+ # ---------------------------------------------------------------------------
86
+ # dependency-overrides
87
+ # ---------------------------------------------------------------------------
88
+ # Reads alone don't gate execution — `next` only checks dependencies.
89
+ # These overrides ensure downstream steps wait for cross-service artifacts.
90
+ dependency-overrides:
91
+ review-security:
92
+ append: [cross-service-auth]
93
+ database-schema:
94
+ append: [service-ownership-map]
95
+ implementation-plan:
96
+ append: [service-ownership-map, inter-service-contracts]
97
+ cross-phase-consistency:
98
+ append:
99
+ - service-ownership-map
100
+ - inter-service-contracts
101
+ - cross-service-auth
102
+ - cross-service-observability
103
+ - integration-test-plan
@@ -105,3 +105,9 @@ steps:
105
105
  analytics-telemetry: { enabled: false }
106
106
  live-ops-plan: { enabled: false }
107
107
  platform-cert-prep: { enabled: false }
108
+ # Multi-service steps (enabled via multi-service overlay)
109
+ service-ownership-map: { enabled: false }
110
+ inter-service-contracts: { enabled: false }
111
+ cross-service-auth: { enabled: false }
112
+ cross-service-observability: { enabled: false }
113
+ integration-test-plan: { enabled: false }
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: service-ownership-map
3
+ description: Define logical domain and data ownership boundaries across services
4
+ summary: "Maps which service owns which business domain, data concepts, and event topics. Establishes boundaries that inform database schema design, API contracts, and cross-service communication patterns."
5
+ phase: "architecture"
6
+ order: 721
7
+ dependencies: [review-architecture]
8
+ outputs: [docs/service-ownership-map.md]
9
+ reads: [system-architecture, domain-modeling]
10
+ conditional: null
11
+ knowledge-base: [multi-service-architecture, multi-service-data-ownership]
12
+ ---
13
+
14
+ ## Purpose
15
+ Define logical ownership boundaries across services: which service owns which
16
+ business domain, data concepts, and event topics. Produces a reference document
17
+ that informs database schema design, API contracts, and cross-service
18
+ communication patterns. Prevents ownership ambiguity and data-coupling
19
+ anti-patterns before implementation begins.
20
+
21
+ ## Inputs
22
+ - docs/system-architecture.md (required) — service topology and responsibilities
23
+ - docs/domain-modeling.md (optional) — bounded contexts and aggregate roots
24
+ - docs/adrs/ (optional) — architecture decisions affecting service boundaries
25
+
26
+ ## Expected Outputs
27
+ - docs/service-ownership-map.md — service-to-domain ownership matrix, data
28
+ concept ownership table, event topic ownership list, and cross-cutting concern
29
+ assignments
30
+
31
+ ## Quality Criteria
32
+ - (mvp) Each service maps to at least one primary business domain
33
+ - (mvp) Every core data concept has exactly one owning service (no orphans, no
34
+ co-owners)
35
+ - (mvp) Cross-service reads are listed as explicit access patterns (not implicit
36
+ data sharing)
37
+ - (deep) Event topic ownership assigned per service with producer/consumer roles
38
+ listed
39
+ - (deep) Data sync strategies documented for each cross-service read pattern
40
+ (sync call, async replication, CQRS projection)
41
+ - (deep) Ownership matrix covers all entities from domain model with no gaps
42
+ - (deep) Cross-cutting concerns (auth, audit logging, rate limiting, feature
43
+ flags) assigned to named services or shared infrastructure
44
+ - (deep) Boundary violations from the current architecture are identified and
45
+ flagged for resolution
46
+ - (deep) Ownership conflicts (candidate co-owners) are surfaced with a
47
+ resolution rationale
48
+
49
+ ## Methodology Scaling
50
+ - **deep**: Full ownership matrix with every entity and aggregate. Event flow
51
+ diagrams showing producer/consumer relationships. Data sync strategies per
52
+ cross-service read. Cross-cutting concern assignments with rationale. Boundary
53
+ violation inventory.
54
+ - **mvp**: Service-to-domain mapping table. Primary data concept ownership list.
55
+ Cross-service read patterns enumerated without sync detail.
56
+ - **custom:depth(1-5)**:
57
+ - Depth 1: service-to-domain mapping table only.
58
+ - Depth 2: add primary data concept ownership and list cross-service reads.
59
+ - Depth 3: add event topic ownership with producer/consumer roles.
60
+ - Depth 4: add data sync strategies, cross-cutting concern assignments, and
61
+ boundary violation flags.
62
+ - Depth 5: full ownership matrix with conflict resolution rationale, event flow
63
+ diagrams, and multi-region or multi-tenant ownership considerations.
64
+
65
+ ## Mode Detection
66
+ Check for docs/service-ownership-map.md. If it exists, operate in update mode:
67
+ read the existing map and diff against the current system architecture and any
68
+ updated domain model. Preserve existing ownership assignments unless the
69
+ architecture has explicitly reassigned a domain. Surface new services or data
70
+ concepts that lack ownership entries and prompt for assignments. Never silently
71
+ change an ownership assignment without documenting the reason.
72
+
73
+ ## Update Mode Specifics
74
+ - **Detect prior artifact**: docs/service-ownership-map.md exists
75
+ - **Preserve**: established service-to-domain assignments, confirmed event topic
76
+ ownership, cross-cutting concern assignments, documented sync strategies
77
+ - **Triggers for update**: new service added to architecture, domain model
78
+ changed aggregate boundaries, ADR reassigned data ownership, review identified
79
+ ownership ambiguity
80
+ - **Conflict resolution**: if architecture added a new service that overlaps an
81
+ existing domain, surface the conflict with both candidate owners and request a
82
+ resolution decision before updating the map; do not silently absorb the new
83
+ service into an existing owner
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: cross-service-auth
3
+ description: Define inter-service trust model — mTLS, service tokens, audience scoping
4
+ summary: "Designs the internal service identity and trust framework: mutual TLS configuration, service-to-service token issuance and validation, audience scoping, and zero-trust boundary definitions."
5
+ phase: "quality"
6
+ order: 952
7
+ dependencies: [security, service-ownership-map]
8
+ outputs: [docs/cross-service-auth.md]
9
+ reads: [inter-service-contracts]
10
+ conditional: null
11
+ knowledge-base: [multi-service-auth]
12
+ ---
13
+
14
+ ## Purpose
15
+ Define the inter-service trust model for multi-service systems: how services
16
+ establish identity, authenticate to one another, and enforce authorization at
17
+ service boundaries. Produces a document specifying the chosen trust mechanism
18
+ (mTLS, service tokens, or both), certificate or token lifecycle management,
19
+ audience scoping per service, and zero-trust boundary definitions. Complements
20
+ docs/security-review.md (which covers user-facing auth) by focusing exclusively
21
+ on machine-to-machine trust.
22
+
23
+ ## Inputs
24
+ - docs/security-review.md (required) — user-facing auth controls and trust model
25
+ - docs/service-ownership-map.md (required) — which services communicate and
26
+ who owns which trust boundary
27
+ - docs/inter-service-contracts.md (required) — auth mechanism noted per contract
28
+ - docs/system-architecture.md (optional) — service topology and transport choices
29
+ - docs/operations-runbook.md (optional) — certificate and secret rotation context
30
+
31
+ ## Expected Outputs
32
+ - docs/cross-service-auth.md — inter-service trust model: identity approach,
33
+ mTLS configuration, token issuance and validation, audience scoping, and
34
+ zero-trust boundary definitions
35
+
36
+ ## Quality Criteria
37
+ - (mvp) Trust mechanism chosen (mTLS, short-lived service tokens, or hybrid)
38
+ with rationale tied to architecture constraints
39
+ - (mvp) Every cross-service call from the ownership map has an assigned trust
40
+ mechanism (no gaps)
41
+ - (mvp) Audience scoping defined: each service token specifies the intended
42
+ recipient service and is rejected outside that scope
43
+ - (mvp) Token issuance authority identified (internal token service, mesh
44
+ control plane, or cloud IAM)
45
+ - (mvp) Certificate or token lifetime documented with rotation policy
46
+ - (deep) mTLS configuration specified: CA hierarchy, certificate SAN fields,
47
+ validation rules, and revocation strategy
48
+ - (deep) Token claims schema documented (issuer, subject, audience, expiry,
49
+ scope) with validation rules per receiving service
50
+ - (deep) Zero-trust boundary definitions: each service trusts no caller by
51
+ default; allowed callers enumerated per service
52
+ - (deep) Service identity bootstrapping process documented (how a new service
53
+ instance proves identity before receiving credentials)
54
+ - (deep) Token revocation or short-lived-token refresh strategy documented for
55
+ compromise scenarios
56
+ - (deep) Lateral movement controls: a compromised service cannot escalate
57
+ privileges or reach services outside its allowed caller list
58
+ - (deep) Auth enforcement point identified per contract (sidecar, library, or
59
+ service-level middleware) so no contract relies on network-only isolation
60
+
61
+ ## Methodology Scaling
62
+ - **deep**: Full zero-trust model. mTLS CA hierarchy with revocation strategy.
63
+ Token claims schema with validation rules per service. Service identity
64
+ bootstrapping. Lateral movement controls. Enforcement point per contract.
65
+ - **mvp**: Trust mechanism choice with rationale. Audience scoping. Token
66
+ lifetime and rotation policy. Allowed-caller list per service.
67
+ - **custom:depth(1-5)**:
68
+ - Depth 1: trust mechanism choice and audience scoping only.
69
+ - Depth 2: add token lifetime, rotation policy, and allowed-caller list per service.
70
+ - Depth 3: add token claims schema and validation rules; or mTLS CA hierarchy
71
+ and SAN fields if mTLS is chosen.
72
+ - Depth 4: add zero-trust boundary definitions, service identity bootstrapping,
73
+ and enforcement point per contract.
74
+ - Depth 5: full zero-trust model with lateral movement controls, revocation
75
+ strategy, and compromise-scenario runbook.
76
+
77
+ ## Mode Detection
78
+ Check for docs/cross-service-auth.md. If it exists, operate in update mode:
79
+ read the existing trust model and diff against the current service ownership
80
+ map, security review, and inter-service contracts. Preserve confirmed trust
81
+ mechanism choices, audience scoping rules, and rotation policies. Surface new
82
+ cross-service calls that lack an assigned trust mechanism. Flag contracts whose
83
+ auth mechanism changed in the inter-service contracts document.
84
+
85
+ ## Update Mode Specifics
86
+ - **Detect prior artifact**: docs/cross-service-auth.md exists
87
+ - **Preserve**: confirmed trust mechanism, mTLS configuration, token claims
88
+ schema, audience scoping rules, rotation policies, zero-trust boundary
89
+ definitions, enforcement points
90
+ - **Triggers for update**: ownership map added a new cross-service call,
91
+ security review changed the trust model, inter-service contracts updated
92
+ an auth mechanism, architecture changed transport or added a new service
93
+ - **Conflict resolution**: if a new cross-service call introduces a caller
94
+ that is not on the allowed-caller list of the target service, surface the
95
+ gap and request an explicit approval decision before expanding the trust
96
+ boundary; never silently widen a zero-trust boundary
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: cross-service-observability
3
+ description: Design distributed tracing, correlation IDs, and cross-service SLOs
4
+ summary: "Defines the observability strategy for multi-service systems: distributed tracing propagation, correlation ID standards, cross-service SLO definitions, and failure isolation alerting."
5
+ phase: "quality"
6
+ order: 941
7
+ dependencies: [review-operations, service-ownership-map]
8
+ outputs: [docs/cross-service-observability.md]
9
+ reads: [operations]
10
+ conditional: null
11
+ knowledge-base: [multi-service-observability]
12
+ ---
13
+
14
+ ## Purpose
15
+ Design the observability strategy specific to multi-service systems: how traces
16
+ propagate across service boundaries, how correlation IDs are generated and
17
+ forwarded, what cross-service SLOs are defined and measured, and how alerting
18
+ isolates failures to a specific service rather than surfacing them only at the
19
+ user-facing layer. Extends the single-service monitoring strategy in
20
+ docs/operations-runbook.md without redefining it — focusing on the interactions
21
+ and dependencies between services.
22
+
23
+ ## Inputs
24
+ - docs/operations-runbook.md (required) — single-service monitoring baseline
25
+ to extend
26
+ - docs/service-ownership-map.md (required) — which services exist and how they
27
+ communicate
28
+ - docs/system-architecture.md (optional) — service topology and transport choices
29
+ - docs/inter-service-contracts.md (optional) — per-contract SLA targets to
30
+ derive SLOs from
31
+
32
+ ## Expected Outputs
33
+ - docs/cross-service-observability.md — distributed tracing setup, correlation
34
+ ID standard, cross-service SLO definitions, failure isolation alerting strategy
35
+
36
+ ## Quality Criteria
37
+ - (mvp) Distributed tracing standard chosen (OpenTelemetry, Jaeger, Zipkin, or
38
+ vendor-specific) with propagation format specified (W3C TraceContext, B3)
39
+ - (mvp) Correlation ID standard defined: field name, generation point (entry
40
+ service or API gateway), forwarding requirement (all outbound calls must
41
+ propagate the ID)
42
+ - (mvp) Every service in the ownership map emits traces with at minimum: service
43
+ name, operation name, trace ID, span ID, and error status
44
+ - (mvp) Cross-service SLOs defined for at least the critical user-facing request
45
+ paths (availability and latency targets per path)
46
+ - (deep) Sampling strategy defined: head-based vs. tail-based, sampling rate,
47
+ and rules for forcing full traces on errors or slow requests
48
+ - (deep) Each cross-service SLO includes: the measured boundary (caller or
49
+ provider), the metric (p99 latency, error rate), the threshold, and the
50
+ measurement window
51
+ - (deep) Error budget alerting: alert fires before 100% of monthly error budget
52
+ is consumed (e.g., at 50% and 90%), not only on threshold breach
53
+ - (deep) Failure isolation alerting: alerts identify the originating service,
54
+ not just the user-facing symptom (dependency latency vs. internal latency
55
+ tracked separately)
56
+ - (deep) Span attributes standardized across services: required attribute set
57
+ documented (HTTP method, status code, db system, messaging system, etc.)
58
+ - (deep) Log correlation: every log line emitted during a traced request includes
59
+ the trace ID and span ID so logs and traces can be joined
60
+ - (deep) Observability data retention policy defined per signal type (traces,
61
+ metrics, logs) with storage tier and cost rationale
62
+ - (deep) Cross-service dashboard spec: describes what panels are needed to
63
+ diagnose a latency spike from entry point to the offending downstream service
64
+
65
+ ## Methodology Scaling
66
+ - **deep**: Full distributed tracing setup with sampling strategy. Standardized
67
+ span attributes. Log-trace correlation. Cross-service SLOs with error budgets
68
+ and multi-threshold alerting. Failure isolation alerting. Dashboard spec.
69
+ Retention policy.
70
+ - **mvp**: Tracing standard and propagation format. Correlation ID standard.
71
+ Cross-service SLOs for critical paths. Basic failure isolation alerting.
72
+ - **custom:depth(1-5)**:
73
+ - Depth 1: tracing standard choice and correlation ID standard only.
74
+ - Depth 2: add per-service trace emission requirements and cross-service SLOs
75
+ for critical paths.
76
+ - Depth 3: add sampling strategy, span attribute standards, and log-trace
77
+ correlation.
78
+ - Depth 4: add error budget alerting, failure isolation alerting per service,
79
+ and cross-service dashboard spec.
80
+ - Depth 5: full observability strategy with retention policy, cost rationale,
81
+ and multi-region or multi-tenant trace propagation considerations.
82
+
83
+ ## Mode Detection
84
+ Check for docs/cross-service-observability.md. If it exists, operate in update
85
+ mode: read the existing observability strategy and diff against the current
86
+ service ownership map and operations runbook. Preserve confirmed SLOs, sampling
87
+ strategies, and correlation ID standards. Surface new services from the
88
+ ownership map that lack trace emission requirements. Flag SLOs whose source
89
+ contracts changed in the inter-service contracts document.
90
+
91
+ ## Update Mode Specifics
92
+ - **Detect prior artifact**: docs/cross-service-observability.md exists
93
+ - **Preserve**: confirmed SLO definitions, error budget thresholds, sampling
94
+ strategy, correlation ID standard, span attribute requirements, log-trace
95
+ correlation rules, retention policy
96
+ - **Triggers for update**: ownership map added a new service or cross-service
97
+ call, operations runbook changed the monitoring baseline, inter-service
98
+ contracts updated SLA targets, architecture changed transport or observability
99
+ infrastructure
100
+ - **Conflict resolution**: if a new service from the ownership map has
101
+ conflicting SLO requirements (e.g., its provider SLA is tighter than the
102
+ existing consumer SLO), surface both targets and request a resolution
103
+ decision; never silently relax an existing SLO without documenting the
104
+ rationale
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: integration-test-plan
3
+ description: Design contract tests, cross-service E2E flows, and service mocking strategy
4
+ summary: "Plans the cross-service testing strategy: consumer-driven contract tests, integration test flows covering critical multi-service journeys, and service dependency mocking approaches for isolated testing."
5
+ phase: "quality"
6
+ order: 942
7
+ dependencies: [review-testing, inter-service-contracts]
8
+ outputs: [docs/integration-test-plan.md]
9
+ reads: [service-ownership-map, cross-service-auth]
10
+ conditional: null
11
+ knowledge-base: [multi-service-testing]
12
+ ---
13
+
14
+ ## Purpose
15
+ Design and document the cross-service testing strategy: consumer-driven contract
16
+ tests that verify inter-service API compatibility without full-stack deployment,
17
+ integration test flows covering critical multi-service user journeys, and
18
+ service dependency mocking approaches that allow individual services to be
19
+ tested in isolation. Extends the single-service TDD standards in
20
+ docs/tdd-standards.md — focusing on the boundaries and interactions between
21
+ services rather than unit or component tests within a single service.
22
+
23
+ ## Inputs
24
+ - docs/tdd-standards.md (required) — single-service test standards to extend
25
+ - docs/inter-service-contracts.md (required) — contracts to derive consumer-
26
+ driven tests from
27
+ - docs/service-ownership-map.md (required) — which services communicate and
28
+ own which data concepts
29
+ - docs/cross-service-auth.md (optional) — auth mechanism to include in
30
+ integration test flows
31
+
32
+ ## Expected Outputs
33
+ - docs/integration-test-plan.md — contract testing approach, integration test
34
+ flow inventory, and service mocking strategy
35
+
36
+ ## Quality Criteria
37
+ - (mvp) Contract testing tool chosen (Pact, Spring Cloud Contract, or equivalent)
38
+ with rationale
39
+ - (mvp) Every cross-service call from the ownership map has a corresponding
40
+ consumer-driven contract test
41
+ - (mvp) Consumer-driven contract tests run in CI on both consumer and provider
42
+ pipelines; provider cannot merge a breaking change without a failing test
43
+ - (mvp) Integration test flows defined for at least the critical user-facing
44
+ multi-service journeys (happy path per journey)
45
+ - (mvp) Each integration test flow identifies: the services involved, the entry
46
+ point, the data dependencies, and the expected end state
47
+ - (deep) Contract tests cover: success responses, error responses, and schema
48
+ evolution cases (optional field added, field deprecated)
49
+ - (deep) Provider state setup documented for each contract test: how to
50
+ bootstrap the provider into the correct state before verification
51
+ - (deep) Service mocking strategy defined per dependency type: in-process stub,
52
+ WireMock/API mock server, or contract-verified test double
53
+ - (deep) Mocking boundary policy stated: mocks are only used at service
54
+ boundaries (never mock internal collaborators in integration tests)
55
+ - (deep) Integration test environment strategy: dedicated environment, ephemeral
56
+ per-PR environment, or service virtualization — with trade-offs documented
57
+ - (deep) Cross-service auth included in integration test flows: service tokens
58
+ or mTLS certificates provisioned in the test environment
59
+ - (deep) Flaky test mitigation strategy: retry policy for integration tests,
60
+ isolation rules (no shared state between tests), and quarantine process for
61
+ known-flaky tests
62
+ - (deep) Data seeding and teardown approach: how test data is created and
63
+ cleaned up across services without leaking state between test runs
64
+
65
+ ## Methodology Scaling
66
+ - **deep**: Full contract test suite per service pair with provider state setup.
67
+ Integration test flow inventory covering all critical journeys (happy and
68
+ error paths). Service mocking strategy with boundary policy. Flaky test
69
+ mitigation. Data seeding and teardown. Cross-service auth in test flows.
70
+ Integration environment strategy with trade-offs.
71
+ - **mvp**: Contract testing tool choice. Consumer-driven tests per cross-service
72
+ call. Integration test flows for critical journeys (happy path). Basic
73
+ mocking strategy.
74
+ - **custom:depth(1-5)**:
75
+ - Depth 1: contract testing tool choice and consumer-driven test list only.
76
+ - Depth 2: add integration test flows for critical journeys and basic mocking
77
+ strategy.
78
+ - Depth 3: add provider state setup, schema evolution test cases, and mocking
79
+ boundary policy.
80
+ - Depth 4: add integration environment strategy, cross-service auth in test
81
+ flows, and data seeding/teardown approach.
82
+ - Depth 5: full plan with flaky test mitigation, quarantine process, and
83
+ multi-environment or multi-tenant testing considerations.
84
+
85
+ ## Mode Detection
86
+ Check for docs/integration-test-plan.md. If it exists, operate in update mode:
87
+ read the existing plan and diff against the current inter-service contracts and
88
+ service ownership map. Preserve confirmed contract test tool choice, mocking
89
+ strategy, and integration test flows. Surface new cross-service calls from the
90
+ ownership map that lack contract tests. Flag flows whose participating services
91
+ changed in the architecture.
92
+
93
+ ## Update Mode Specifics
94
+ - **Detect prior artifact**: docs/integration-test-plan.md exists
95
+ - **Preserve**: confirmed contract testing tool, consumer-driven test inventory,
96
+ provider state setup, mocking strategy, integration environment choice,
97
+ flaky test mitigation rules, data seeding approach
98
+ - **Triggers for update**: ownership map added a new cross-service call,
99
+ inter-service contracts changed a schema or auth mechanism, architecture
100
+ added or removed a service, security review identified new auth requirements
101
+ that affect test flows
102
+ - **Conflict resolution**: if a new cross-service call from the ownership map
103
+ has no clear owner for writing the consumer-driven contract test, surface the
104
+ ambiguity and request an ownership assignment before adding the test entry;
105
+ never add a contract test without a designated consumer team responsible for
106
+ maintaining it
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: inter-service-contracts
3
+ description: Design API contracts between services with versioning, retries, and failure isolation
4
+ summary: "Specifies internal service-to-service API contracts including versioning strategy, backward compatibility rules, retry policies, timeout budgets, idempotency requirements, and failure isolation patterns."
5
+ phase: "specification"
6
+ order: 841
7
+ dependencies: [service-ownership-map, review-api]
8
+ outputs: [docs/inter-service-contracts.md]
9
+ reads: [api-contracts]
10
+ conditional: null
11
+ knowledge-base: [multi-service-api-contracts, multi-service-resilience]
12
+ ---
13
+
14
+ ## Purpose
15
+ Design and document the internal API contracts between services: endpoint
16
+ signatures, versioning strategy, backward compatibility rules, retry policies,
17
+ timeout budgets, idempotency requirements, and failure isolation patterns.
18
+ Produces a contract document that governs how services call one another and
19
+ what guarantees callers can rely on, distinct from the public-facing API
20
+ contracts in docs/api-contracts.md.
21
+
22
+ ## Inputs
23
+ - docs/service-ownership-map.md (required) — which services communicate and
24
+ who owns which data concepts
25
+ - docs/api-contracts.md (required) — public API patterns to align with
26
+ - docs/system-architecture.md (optional) — service topology and transport choices
27
+ - docs/adrs/ (optional) — decisions affecting inter-service transport or
28
+ resilience strategy
29
+
30
+ ## Expected Outputs
31
+ - docs/inter-service-contracts.md — per-contract specifications covering
32
+ endpoint or event schema, versioning, retry policy, timeout budget,
33
+ idempotency, and failure isolation
34
+
35
+ ## Quality Criteria
36
+ - (mvp) Every cross-service call from the ownership map has a corresponding
37
+ contract entry
38
+ - (mvp) Each contract specifies the caller, the provider, the operation name,
39
+ and the transport (HTTP, gRPC, message queue, etc.)
40
+ - (mvp) Versioning strategy defined (URI prefix, header, schema version field)
41
+ and applied consistently across all contracts
42
+ - (mvp) Backward compatibility rules stated (additive-only, deprecation window,
43
+ breaking-change process)
44
+ - (deep) Each contract has an explicit timeout budget with rationale tied to
45
+ the caller's own SLA
46
+ - (deep) Retry policy specified per contract: max attempts, backoff strategy
47
+ (exponential + jitter), retryable vs. non-retryable error codes
48
+ - (deep) Idempotency requirements stated per operation (idempotency key, safe
49
+ to retry, at-most-once)
50
+ - (deep) Failure isolation pattern assigned per contract (circuit breaker,
51
+ bulkhead, fallback response, graceful degradation)
52
+ - (deep) Each contract documents its SLA: expected p99 latency and error
53
+ budget
54
+ - (deep) Schema evolution rules documented (required vs. optional fields,
55
+ unknown field handling, enum extension policy)
56
+ - (deep) Authentication and authorization mechanism specified for each
57
+ contract (service-to-service token, mTLS, API key scope)
58
+
59
+ ## Methodology Scaling
60
+ - **deep**: Full contract specification per service pair. Timeout budgets with
61
+ SLA rationale. Retry and backoff policies. Idempotency guarantees. Failure
62
+ isolation patterns (circuit breaker, bulkhead). Schema evolution rules.
63
+ Auth mechanism per contract.
64
+ - **mvp**: Contract list with caller, provider, operation, and transport.
65
+ Versioning strategy. Backward compatibility rules.
66
+ - **custom:depth(1-5)**:
67
+ - Depth 1: contract list with caller, provider, operation, and transport only.
68
+ - Depth 2: add versioning strategy and backward compatibility rules.
69
+ - Depth 3: add timeout budgets, retry policies, and idempotency requirements.
70
+ - Depth 4: add failure isolation patterns, SLA documentation, and schema
71
+ evolution rules.
72
+ - Depth 5: full specification with auth mechanism per contract, consumer-driven
73
+ contract testing strategy, and multi-version coexistence plan.
74
+
75
+ ## Mode Detection
76
+ Check for docs/inter-service-contracts.md. If it exists, operate in update
77
+ mode: read the existing contracts and diff against the current service
78
+ ownership map and API review findings. Preserve all confirmed contracts.
79
+ Surface new cross-service calls from the ownership map that lack contract
80
+ entries. Flag contracts whose provider or transport changed in the architecture
81
+ and require review. Never silently change a retry policy or timeout budget
82
+ without documenting the reason.
83
+
84
+ ## Update Mode Specifics
85
+ - **Detect prior artifact**: docs/inter-service-contracts.md exists
86
+ - **Preserve**: confirmed retry policies, timeout budgets, idempotency
87
+ guarantees, failure isolation patterns, versioning strategy, auth mechanisms
88
+ - **Triggers for update**: ownership map added a new cross-service call,
89
+ API review identified a missing contract, architecture changed transport for
90
+ a service pair, ADR updated resilience strategy
91
+ - **Conflict resolution**: if a new cross-service call from the ownership map
92
+ conflicts with an existing contract boundary (e.g., caller now bypasses the
93
+ designated provider), surface the conflict and request resolution before
94
+ adding the new contract entry; do not silently add a contract that undermines
95
+ an existing ownership assignment