@llm-dev-ops/agentics-cli 1.4.59 → 1.4.69

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 (452) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/agents.d.ts.map +1 -1
  3. package/dist/commands/agents.js +167 -0
  4. package/dist/commands/agents.js.map +1 -1
  5. package/dist/pipeline/auto-chain.d.ts +1 -0
  6. package/dist/pipeline/auto-chain.d.ts.map +1 -1
  7. package/dist/pipeline/auto-chain.js +124 -37
  8. package/dist/pipeline/auto-chain.js.map +1 -1
  9. package/dist/pipeline/execution-context.d.ts.map +1 -1
  10. package/dist/pipeline/execution-context.js +12 -37
  11. package/dist/pipeline/execution-context.js.map +1 -1
  12. package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
  13. package/dist/pipeline/phase2/phases/adr-generator.js +160 -1
  14. package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
  15. package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
  16. package/dist/pipeline/phase2/phases/ddd-generator.js +400 -3
  17. package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
  18. package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts +43 -0
  19. package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts.map +1 -0
  20. package/dist/pipeline/phase2/phases/ddd-quality-gate.js +413 -0
  21. package/dist/pipeline/phase2/phases/ddd-quality-gate.js.map +1 -0
  22. package/dist/pipeline/phase2/phases/research-dossier.d.ts +0 -13
  23. package/dist/pipeline/phase2/phases/research-dossier.d.ts.map +1 -1
  24. package/dist/pipeline/phase2/phases/research-dossier.js +114 -1
  25. package/dist/pipeline/phase2/phases/research-dossier.js.map +1 -1
  26. package/dist/pipeline/phase2/phases/research-quality-gate.d.ts +48 -0
  27. package/dist/pipeline/phase2/phases/research-quality-gate.d.ts.map +1 -0
  28. package/dist/pipeline/phase2/phases/research-quality-gate.js +322 -0
  29. package/dist/pipeline/phase2/phases/research-quality-gate.js.map +1 -0
  30. package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts +41 -0
  31. package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts.map +1 -0
  32. package/dist/pipeline/phase2/phases/sparc-quality-gate.js +350 -0
  33. package/dist/pipeline/phase2/phases/sparc-quality-gate.js.map +1 -0
  34. package/dist/pipeline/phase2/phases/sparc-specification.d.ts +14 -0
  35. package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
  36. package/dist/pipeline/phase2/phases/sparc-specification.js +500 -10
  37. package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
  38. package/dist/pipeline/phase2/phases/tdd-plan-generator.js +1 -1
  39. package/dist/pipeline/phase2/phases/tdd-plan-generator.js.map +1 -1
  40. package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts +72 -0
  41. package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts.map +1 -0
  42. package/dist/pipeline/phase2/phases/tech-stack-detector.js +332 -0
  43. package/dist/pipeline/phase2/phases/tech-stack-detector.js.map +1 -0
  44. package/dist/pipeline/phase2/types.d.ts +2 -0
  45. package/dist/pipeline/phase2/types.d.ts.map +1 -1
  46. package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
  47. package/dist/pipeline/phase3/phases/domain-codegen.js +169 -4
  48. package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
  49. package/dist/pipeline/phase3/phases/test-generator.d.ts.map +1 -1
  50. package/dist/pipeline/phase3/phases/test-generator.js +12 -2
  51. package/dist/pipeline/phase3/phases/test-generator.js.map +1 -1
  52. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.d.ts.map +1 -1
  53. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js +99 -1
  54. package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js.map +1 -1
  55. package/dist/pipeline/phase4/phases/deployment-generator.d.ts +17 -4
  56. package/dist/pipeline/phase4/phases/deployment-generator.d.ts.map +1 -1
  57. package/dist/pipeline/phase4/phases/deployment-generator.js +364 -44
  58. package/dist/pipeline/phase4/phases/deployment-generator.js.map +1 -1
  59. package/dist/pipeline/phase4/phases/erp-client-generator.d.ts.map +1 -1
  60. package/dist/pipeline/phase4/phases/erp-client-generator.js +27 -15
  61. package/dist/pipeline/phase4/phases/erp-client-generator.js.map +1 -1
  62. package/dist/pipeline/phase4/phases/erp-target-resolver.d.ts.map +1 -1
  63. package/dist/pipeline/phase4/phases/erp-target-resolver.js +49 -2
  64. package/dist/pipeline/phase4/phases/erp-target-resolver.js.map +1 -1
  65. package/dist/pipeline/phase4/phases/http-server-generator.d.ts.map +1 -1
  66. package/dist/pipeline/phase4/phases/http-server-generator.js +263 -3
  67. package/dist/pipeline/phase4/phases/http-server-generator.js.map +1 -1
  68. package/dist/pipeline/phase4/phases/infra-adapter-generator.d.ts.map +1 -1
  69. package/dist/pipeline/phase4/phases/infra-adapter-generator.js +335 -37
  70. package/dist/pipeline/phase4/phases/infra-adapter-generator.js.map +1 -1
  71. package/dist/pipeline/phase4/types.d.ts +3 -1
  72. package/dist/pipeline/phase4/types.d.ts.map +1 -1
  73. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
  74. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +211 -2
  75. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
  76. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts +54 -0
  77. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts.map +1 -0
  78. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js +417 -0
  79. package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js.map +1 -0
  80. package/dist/pipeline/phases/prompt-generator.js +1 -1
  81. package/dist/pipeline/phases/prompt-generator.js.map +1 -1
  82. package/dist/pipeline/ruflo-phase-executor.d.ts +116 -1
  83. package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
  84. package/dist/pipeline/ruflo-phase-executor.js +666 -159
  85. package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
  86. package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
  87. package/dist/pipeline/swarm-orchestrator.js +62 -6
  88. package/dist/pipeline/swarm-orchestrator.js.map +1 -1
  89. package/dist/routing/capability-classifier.d.ts +43 -0
  90. package/dist/routing/capability-classifier.d.ts.map +1 -0
  91. package/dist/routing/capability-classifier.js +157 -0
  92. package/dist/routing/capability-classifier.js.map +1 -0
  93. package/dist/routing/composition-engine.d.ts +77 -0
  94. package/dist/routing/composition-engine.d.ts.map +1 -0
  95. package/dist/routing/composition-engine.js +249 -0
  96. package/dist/routing/composition-engine.js.map +1 -0
  97. package/dist/routing/graph-federation.d.ts +71 -0
  98. package/dist/routing/graph-federation.d.ts.map +1 -0
  99. package/dist/routing/graph-federation.js +210 -0
  100. package/dist/routing/graph-federation.js.map +1 -0
  101. package/dist/routing/graph-loader.d.ts +74 -0
  102. package/dist/routing/graph-loader.d.ts.map +1 -0
  103. package/dist/routing/graph-loader.js +383 -0
  104. package/dist/routing/graph-loader.js.map +1 -0
  105. package/dist/routing/graph-router.d.ts +103 -0
  106. package/dist/routing/graph-router.d.ts.map +1 -0
  107. package/dist/routing/graph-router.js +415 -0
  108. package/dist/routing/graph-router.js.map +1 -0
  109. package/dist/routing/graph-validator.d.ts +44 -0
  110. package/dist/routing/graph-validator.d.ts.map +1 -0
  111. package/dist/routing/graph-validator.js +329 -0
  112. package/dist/routing/graph-validator.js.map +1 -0
  113. package/dist/routing/index.d.ts +52 -0
  114. package/dist/routing/index.d.ts.map +1 -0
  115. package/dist/routing/index.js +68 -0
  116. package/dist/routing/index.js.map +1 -0
  117. package/dist/routing/outcome-recorder.d.ts +71 -0
  118. package/dist/routing/outcome-recorder.d.ts.map +1 -0
  119. package/dist/routing/outcome-recorder.js +133 -0
  120. package/dist/routing/outcome-recorder.js.map +1 -0
  121. package/dist/routing/weight-adjuster.d.ts +59 -0
  122. package/dist/routing/weight-adjuster.d.ts.map +1 -0
  123. package/dist/routing/weight-adjuster.js +167 -0
  124. package/dist/routing/weight-adjuster.js.map +1 -0
  125. package/dist/routing/weighted-resolver.d.ts +55 -0
  126. package/dist/routing/weighted-resolver.d.ts.map +1 -0
  127. package/dist/routing/weighted-resolver.js +133 -0
  128. package/dist/routing/weighted-resolver.js.map +1 -0
  129. package/dist/synthesis/ask-artifact-writer.d.ts.map +1 -1
  130. package/dist/synthesis/ask-artifact-writer.js +8 -0
  131. package/dist/synthesis/ask-artifact-writer.js.map +1 -1
  132. package/dist/synthesis/simulation-artifact-generator.d.ts +14 -0
  133. package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
  134. package/dist/synthesis/simulation-artifact-generator.js +224 -1
  135. package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
  136. package/dist/synthesis/simulation-renderers.d.ts.map +1 -1
  137. package/dist/synthesis/simulation-renderers.js +211 -40
  138. package/dist/synthesis/simulation-renderers.js.map +1 -1
  139. package/package.json +3 -1
  140. package/scripts/postinstall.sh +25 -0
  141. package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
  142. package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
  143. package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
  144. package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
  145. package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
  146. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
  147. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
  148. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
  149. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
  150. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
  151. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
  152. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
  153. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
  154. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
  155. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
  156. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
  157. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
  158. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
  159. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
  160. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
  161. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  162. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
  163. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
  164. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
  165. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
  166. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
  167. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  168. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
  169. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  170. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
  171. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
  172. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
  173. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
  174. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
  175. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
  176. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
  177. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
  178. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
  179. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
  180. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
  181. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
  182. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
  183. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
  184. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
  185. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
  186. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
  187. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
  188. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  189. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
  190. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
  191. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
  192. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
  193. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  194. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
  195. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
  196. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  197. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
  198. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
  199. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  200. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
  201. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
  202. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
  203. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
  204. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
  205. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
  206. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
  207. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
  208. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
  209. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
  210. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
  211. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
  212. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
  213. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
  214. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
  215. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
  216. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
  217. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
  218. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  219. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  220. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  221. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
  222. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
  223. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
  224. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  225. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  226. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  227. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  228. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
  229. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
  230. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
  231. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
  232. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
  233. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  234. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  235. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  236. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  237. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  238. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  239. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  240. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
  241. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
  242. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
  243. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
  244. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
  245. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
  246. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
  247. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
  248. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
  249. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
  250. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
  251. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
  252. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
  253. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
  254. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
  255. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
  256. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
  257. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
  258. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
  259. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
  260. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  261. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
  262. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
  263. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
  264. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
  265. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
  266. package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
  267. package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
  268. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
  269. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
  270. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
  271. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
  272. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
  273. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
  274. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
  275. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
  276. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
  277. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
  278. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
  279. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
  280. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
  281. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
  282. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
  283. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  284. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
  285. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
  286. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
  287. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
  288. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
  289. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  290. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
  291. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  292. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
  293. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
  294. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
  295. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
  296. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
  297. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
  298. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
  299. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
  300. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
  301. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
  302. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
  303. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
  304. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
  305. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
  306. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
  307. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
  308. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
  309. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
  310. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  311. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
  312. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
  313. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
  314. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
  315. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  316. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
  317. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
  318. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  319. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
  320. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
  321. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  322. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
  323. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
  324. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
  325. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
  326. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
  327. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
  328. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
  329. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
  330. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
  331. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
  332. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
  333. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
  334. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
  335. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
  336. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
  337. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  338. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  339. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  340. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
  341. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
  342. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
  343. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  344. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  345. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  346. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  347. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
  348. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
  349. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
  350. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
  351. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
  352. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  353. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  354. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  355. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  356. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  357. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  358. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  359. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
  360. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
  361. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
  362. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
  363. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
  364. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
  365. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
  366. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
  367. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
  368. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
  369. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
  370. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
  371. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
  372. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
  373. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
  374. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
  375. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
  376. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
  377. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
  378. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
  379. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  380. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
  381. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
  382. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
  383. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
  384. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
  385. package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
  386. package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
  387. package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
  388. package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
  389. package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
  390. package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
  391. package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
  392. package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
  393. package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
  394. package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
  395. package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
  396. package/dist/bundled-agents/copilot-agents/package.json +0 -5
  397. package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
  398. package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
  399. package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
  400. package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
  401. package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
  402. package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
  403. package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
  404. package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
  405. package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
  406. package/dist/bundled-agents/platform-agents/package.json +0 -22
  407. package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
  408. package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
  409. package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
  410. package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
  411. package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
  412. package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
  413. package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
  414. package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
  415. package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
  416. package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
  417. package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
  418. package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
  419. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
  420. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
  421. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
  422. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
  423. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
  424. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
  425. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
  426. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
  427. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
  428. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
  429. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
  430. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
  431. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
  432. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
  433. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
  434. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
  435. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
  436. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
  437. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
  438. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
  439. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
  440. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
  441. package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
  442. package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
  443. package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
  444. package/dist/bundled-agents/sentinel-agents/package.json +0 -62
  445. package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
  446. package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
  447. package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
  448. package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
  449. package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
  450. package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
  451. package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
  452. package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
@@ -0,0 +1,417 @@
1
+ /**
2
+ * Phase 5 Quality Gate: Implementation Prompt Validator
3
+ *
4
+ * Validates implementation prompts before ruflo swarm execution.
5
+ * Ensures prompts contain enough domain context for non-generic code.
6
+ * Injects cloud provider, typed fields, and realistic test data.
7
+ *
8
+ * Runs AFTER prior-phase-loading and BEFORE domain-codegen, checking
9
+ * that the merged phase2 artifacts (DDD model, ADRs, SPARC spec)
10
+ * provide sufficient signal for the ruflo swarm to generate
11
+ * domain-specific (not template-generic) implementation code.
12
+ *
13
+ * Error codes:
14
+ * ECLI-P5-030 Implementation prompt quality too low for code generation
15
+ * ECLI-P5-031 Required phase artifacts not available for validation
16
+ */
17
+ import * as fs from 'node:fs';
18
+ import * as path from 'node:path';
19
+ // ============================================================================
20
+ // Detection Patterns
21
+ // ============================================================================
22
+ /**
23
+ * Cloud provider detection patterns with canonical names.
24
+ */
25
+ const CLOUD_PROVIDER_DETECTORS = [
26
+ {
27
+ name: 'AWS',
28
+ patterns: [
29
+ /\b(?:AWS|Amazon\s*Web\s*Services)\b/gi,
30
+ /\b(?:Lambda|DynamoDB|S3|SQS|SNS|ECS|EKS|Aurora|RDS|Kinesis|EventBridge|CloudFormation|CDK|Fargate|Step\s*Functions)\b/g,
31
+ ],
32
+ },
33
+ {
34
+ name: 'Azure',
35
+ patterns: [
36
+ /\bAzure\b/gi,
37
+ /\b(?:Cosmos\s*DB|Azure\s*Functions|AKS|Azure\s*SQL|Service\s*Bus|Event\s*Grid|Bicep)\b/gi,
38
+ ],
39
+ },
40
+ {
41
+ name: 'GCP',
42
+ patterns: [
43
+ /\b(?:GCP|Google\s*Cloud)\b/gi,
44
+ /\b(?:Cloud\s*Run|Cloud\s*SQL|Pub\/Sub|BigQuery|Firestore|Cloud\s*Functions|GKE|Spanner|Datastore)\b/gi,
45
+ ],
46
+ },
47
+ ];
48
+ /**
49
+ * Database dialect detection with canonical names.
50
+ */
51
+ const DATABASE_DIALECT_DETECTORS = [
52
+ { name: 'PostgreSQL', patterns: [/\b(?:PostgreSQL|Postgres|pg_|pgcrypto|JSONB|SERIAL|BIGSERIAL|CREATE\s+EXTENSION)\b/gi] },
53
+ { name: 'MySQL', patterns: [/\b(?:MySQL|MariaDB|AUTO_INCREMENT|ENGINE\s*=\s*InnoDB)\b/gi] },
54
+ { name: 'DynamoDB', patterns: [/\b(?:DynamoDB|partition\s*key|sort\s*key|GSI|LSI|PutItem|GetItem|BatchWrite)\b/gi] },
55
+ { name: 'MongoDB', patterns: [/\b(?:MongoDB|Mongoose|ObjectId|collection\.|aggregate\s*pipeline)\b/gi] },
56
+ { name: 'CosmosDB', patterns: [/\b(?:Cosmos\s*DB|CosmosDB|partition\s*key|cross-partition|RU\/s)\b/gi] },
57
+ { name: 'SQL Server', patterns: [/\b(?:SQL\s*Server|MSSQL|T-SQL|NVARCHAR|UNIQUEIDENTIFIER|GETDATE)\b/gi] },
58
+ { name: 'Firestore', patterns: [/\b(?:Firestore|document\s*reference|collection\s*group|subcollection)\b/gi] },
59
+ ];
60
+ /**
61
+ * Typed field patterns (from DDD entities/value objects).
62
+ * Match concrete field definitions, not generic placeholders.
63
+ */
64
+ const TYPED_FIELD_PATTERNS = [
65
+ /\b\w+\s*:\s*(?:string|number|boolean|Date|UUID|decimal|integer|float|bigint|enum)\b/gi,
66
+ /\b(?:readonly|public|private)\s+\w+\s*:\s*[A-Z]\w+/g,
67
+ /\b\w+Id\s*:\s*(?:string|UUID|number)\b/gi,
68
+ /\b\w+(?:Amount|Price|Total|Quantity|Count)\s*:\s*(?:number|decimal|Decimal|Money)\b/gi,
69
+ /\b\w+(?:Date|Time|At|Timestamp)\s*:\s*(?:Date|DateTime|Instant|string)\b/gi,
70
+ /\b\w+(?:Status|State|Phase)\s*:\s*(?:enum|string|'[^']+'\s*\|)/gi,
71
+ ];
72
+ /**
73
+ * Generic CRUD command patterns (indicate non-domain-specific generation).
74
+ */
75
+ const GENERIC_CRUD_PATTERNS = [
76
+ /\b(?:Create|Read|Update|Delete|List|Get|Set|Remove)\s*(?:Item|Record|Entry|Data|Entity|Resource|Object)\b/g,
77
+ /\b(?:CRUD|crud)\s+(?:operation|endpoint|handler|controller)\b/gi,
78
+ /\b(?:generic(?:Controller|Service|Repository|Handler))\b/g,
79
+ ];
80
+ /**
81
+ * Domain-specific command patterns (the GOOD kind).
82
+ */
83
+ const DOMAIN_COMMAND_PATTERNS = [
84
+ // PascalCase verbs + domain nouns (e.g. SubmitPurchaseOrder, ApproveBatchRelease)
85
+ /\b(?:Submit|Approve|Reject|Cancel|Complete|Start|Initiate|Process|Verify|Validate|Register|Assign|Allocate|Release|Transfer|Dispatch|Reconcile|Archive|Amend|Revoke|Escalate|Finalize|Authorize)\s*[A-Z][a-z]+(?:[A-Z][a-z]+)*/g,
86
+ // Domain event names (PascalCase + Past tense)
87
+ /\b[A-Z][a-z]+(?:[A-Z][a-z]+)*(?:Created|Updated|Completed|Approved|Rejected|Cancelled|Submitted|Processed|Verified|Released|Dispatched|Reconciled|Archived)\b/g,
88
+ ];
89
+ /**
90
+ * Test data example patterns (realistic data, not just "test" or "sample").
91
+ */
92
+ const TEST_DATA_PATTERNS = [
93
+ // Specific numeric values (not just 0, 1, or round numbers)
94
+ /\b(?:\d{3,}(?:\.\d{1,2})?)\b/g,
95
+ // Date literals
96
+ /\b(?:20\d{2}-\d{2}-\d{2}|January|February|March|April|May|June|July|August|September|October|November|December)\b/g,
97
+ // UUID-like patterns
98
+ /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,
99
+ // Email patterns in test data
100
+ /\b\w+@\w+\.\w{2,4}\b/g,
101
+ // Realistic business terms in test data (order numbers, part numbers, etc.)
102
+ /\b(?:ORD|INV|PO|WO|SO|BOM|SKU|LOT|BATCH)-\d{3,}/g,
103
+ ];
104
+ /**
105
+ * Record<string, unknown> or similar untyped patterns in implementation artifacts.
106
+ */
107
+ const RECORD_UNKNOWN_PATTERNS = [
108
+ /Record\s*<\s*string\s*,\s*(?:unknown|any)\s*>/g,
109
+ /\[key:\s*string\]\s*:\s*(?:unknown|any)/g,
110
+ /:\s*(?:unknown|any)\s*(?:\[\])?(?:\s*[;,}])/g,
111
+ /\bObject\.keys\b.*\bas\s+any\b/g,
112
+ ];
113
+ // ============================================================================
114
+ // Artifact Loading
115
+ // ============================================================================
116
+ /**
117
+ * Expected artifact files and their descriptions.
118
+ */
119
+ const EXPECTED_ARTIFACTS = [
120
+ { filename: 'ddd/domain-model.json', label: 'DDD domain model', required: true },
121
+ { filename: 'sparc/sparc-combined.json', label: 'SPARC specification', required: true },
122
+ { filename: 'adrs/adr-index.json', label: 'ADR index', required: false },
123
+ { filename: 'tdd/tdd-plan.json', label: 'TDD plan', required: false },
124
+ ];
125
+ /**
126
+ * Load and concatenate all textual artifact content from a merged phase2 directory.
127
+ * Returns the combined text for pattern scanning, plus a list of missing artifacts.
128
+ */
129
+ function loadArtifactCorpus(phase2Dir) {
130
+ const parts = [];
131
+ const missingArtifacts = [];
132
+ for (const { filename, label, required } of EXPECTED_ARTIFACTS) {
133
+ const fullPath = path.join(phase2Dir, filename);
134
+ if (!fs.existsSync(fullPath)) {
135
+ if (required)
136
+ missingArtifacts.push(label);
137
+ continue;
138
+ }
139
+ try {
140
+ const content = fs.readFileSync(fullPath, 'utf-8');
141
+ parts.push(content);
142
+ }
143
+ catch {
144
+ if (required)
145
+ missingArtifacts.push(`${label} (read error)`);
146
+ }
147
+ }
148
+ // Also scan any markdown files in the phase2 directory tree
149
+ const mdFiles = findFilesRecursive(phase2Dir, '.md', 10);
150
+ for (const mdPath of mdFiles) {
151
+ try {
152
+ parts.push(fs.readFileSync(mdPath, 'utf-8'));
153
+ }
154
+ catch { /* skip unreadable */ }
155
+ }
156
+ return { corpus: parts.join('\n'), missingArtifacts };
157
+ }
158
+ /**
159
+ * Recursively find files with a given extension, up to a max count.
160
+ */
161
+ function findFilesRecursive(dir, ext, maxFiles) {
162
+ const results = [];
163
+ if (!fs.existsSync(dir))
164
+ return results;
165
+ try {
166
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
167
+ for (const entry of entries) {
168
+ if (results.length >= maxFiles)
169
+ break;
170
+ const fullPath = path.join(dir, entry.name);
171
+ if (entry.isDirectory() && !['node_modules', '.git'].includes(entry.name)) {
172
+ results.push(...findFilesRecursive(fullPath, ext, maxFiles - results.length));
173
+ }
174
+ else if (entry.isFile() && entry.name.endsWith(ext)) {
175
+ results.push(fullPath);
176
+ }
177
+ }
178
+ }
179
+ catch { /* skip unreadable directories */ }
180
+ return results;
181
+ }
182
+ // ============================================================================
183
+ // Counting Helpers
184
+ // ============================================================================
185
+ function countUniqueMatches(text, patterns) {
186
+ const matches = new Set();
187
+ for (const pattern of patterns) {
188
+ const re = new RegExp(pattern.source, pattern.flags);
189
+ let m;
190
+ while ((m = re.exec(text)) !== null) {
191
+ matches.add(m[0].toLowerCase().trim());
192
+ }
193
+ }
194
+ return matches.size;
195
+ }
196
+ function detectProvider(text, detectors) {
197
+ let bestName = null;
198
+ let bestCount = 0;
199
+ for (const { name, patterns } of detectors) {
200
+ let count = 0;
201
+ for (const pattern of patterns) {
202
+ const re = new RegExp(pattern.source, pattern.flags);
203
+ const matches = text.match(re);
204
+ if (matches)
205
+ count += matches.length;
206
+ }
207
+ if (count > bestCount) {
208
+ bestCount = count;
209
+ bestName = name;
210
+ }
211
+ }
212
+ return bestCount >= 2 ? bestName : null;
213
+ }
214
+ // ============================================================================
215
+ // Main Validation
216
+ // ============================================================================
217
+ const PASSING_SCORE = 60;
218
+ const WEIGHTS = {
219
+ cloudProvider: 15, // cloud provider directive present
220
+ typedFields: 25, // typed field definitions from DDD model
221
+ domainCommands: 20, // domain-specific commands (not generic CRUD)
222
+ testData: 10, // realistic test data examples
223
+ databaseDialect: 10, // database-specific SQL dialect hints
224
+ artifactCompleteness: 10, // all expected artifacts present
225
+ contentIntegrity: 10, // no Record<string, unknown> patterns
226
+ };
227
+ /**
228
+ * Validate implementation artifacts quality before ruflo swarm execution.
229
+ */
230
+ export function validateImplementationQuality(corpus, missingArtifacts) {
231
+ const issues = [];
232
+ // ---- Empty corpus fast-path ----
233
+ if (corpus.trim().length === 0) {
234
+ return {
235
+ passed: false,
236
+ score: 0,
237
+ issues: ['No implementation artifacts found. Phase 2 output may be empty or unreachable.'],
238
+ cloudProviderDetected: null,
239
+ typedFieldsFound: 0,
240
+ domainCommandsFound: 0,
241
+ genericCRUDDetected: 0,
242
+ testDataExamplesFound: 0,
243
+ databaseDialectDetected: null,
244
+ recordUnknownPatterns: 0,
245
+ missingArtifacts,
246
+ };
247
+ }
248
+ // ---- Detect signals ----
249
+ // 1. Cloud provider
250
+ const cloudProviderDetected = detectProvider(corpus, CLOUD_PROVIDER_DETECTORS);
251
+ // 2. Typed fields
252
+ const typedFieldsFound = countUniqueMatches(corpus, TYPED_FIELD_PATTERNS);
253
+ // 3. Domain-specific commands vs generic CRUD
254
+ const domainCommandsFound = countUniqueMatches(corpus, DOMAIN_COMMAND_PATTERNS);
255
+ const genericCRUDDetected = countUniqueMatches(corpus, GENERIC_CRUD_PATTERNS);
256
+ // 4. Test data examples
257
+ const testDataExamplesFound = countUniqueMatches(corpus, TEST_DATA_PATTERNS);
258
+ // 5. Database dialect
259
+ const databaseDialectDetected = detectProvider(corpus, DATABASE_DIALECT_DETECTORS);
260
+ // 6. Record<string, unknown> patterns
261
+ const recordUnknownPatterns = countUniqueMatches(corpus, RECORD_UNKNOWN_PATTERNS);
262
+ // ---- Compute sub-scores ----
263
+ // Cloud provider (binary: detected or not)
264
+ const cloudScore = cloudProviderDetected
265
+ ? WEIGHTS.cloudProvider
266
+ : 0;
267
+ // Typed fields (full marks at >= 10 typed fields)
268
+ const typedFieldsRatio = Math.min(1, typedFieldsFound / 10);
269
+ const typedFieldsScore = typedFieldsRatio * WEIGHTS.typedFields;
270
+ // Domain commands (full marks at >= 5, penalize if too many generic CRUDs)
271
+ const domainRatio = Math.min(1, domainCommandsFound / 5);
272
+ const crudPenalty = genericCRUDDetected > domainCommandsFound && domainCommandsFound < 3
273
+ ? 0.5 // halve the score if generic CRUD dominates
274
+ : 1.0;
275
+ const domainScore = domainRatio * crudPenalty * WEIGHTS.domainCommands;
276
+ // Test data (full marks at >= 5 examples)
277
+ const testDataRatio = Math.min(1, testDataExamplesFound / 5);
278
+ const testDataScore = testDataRatio * WEIGHTS.testData;
279
+ // Database dialect (binary: detected or not)
280
+ const dbScore = databaseDialectDetected
281
+ ? WEIGHTS.databaseDialect
282
+ : 0;
283
+ // Artifact completeness
284
+ const requiredArtifacts = EXPECTED_ARTIFACTS.filter((a) => a.required);
285
+ const missingRequired = missingArtifacts.filter((m) => requiredArtifacts.some((a) => a.label === m || m.startsWith(a.label)));
286
+ const artifactRatio = requiredArtifacts.length > 0
287
+ ? (requiredArtifacts.length - missingRequired.length) / requiredArtifacts.length
288
+ : 1;
289
+ const artifactScore = artifactRatio * WEIGHTS.artifactCompleteness;
290
+ // Content integrity (penalize Record<string, unknown>)
291
+ const integrityPenalty = Math.min(WEIGHTS.contentIntegrity, recordUnknownPatterns * 2);
292
+ const integrityScore = WEIGHTS.contentIntegrity - integrityPenalty;
293
+ const rawScore = cloudScore + typedFieldsScore + domainScore +
294
+ testDataScore + dbScore + artifactScore + integrityScore;
295
+ const score = Math.max(0, Math.min(100, Math.round(rawScore)));
296
+ // ---- Collect actionable issues ----
297
+ if (!cloudProviderDetected) {
298
+ issues.push('No cloud provider detected in implementation artifacts. ' +
299
+ 'Specify AWS, Azure, or GCP so code generation uses the correct SDK, service names, and deployment targets.');
300
+ }
301
+ if (typedFieldsFound < 10) {
302
+ issues.push(`Only ${typedFieldsFound}/10 typed field definitions found. ` +
303
+ 'DDD model should include concrete types (e.g. "orderId: UUID", "amount: Decimal") not just entity names.');
304
+ }
305
+ if (domainCommandsFound < 5) {
306
+ issues.push(`Only ${domainCommandsFound}/5 domain-specific commands found. ` +
307
+ 'Use domain verbs (SubmitOrder, ApproveRelease) instead of generic CRUD (CreateItem, UpdateRecord).');
308
+ }
309
+ if (genericCRUDDetected > domainCommandsFound && domainCommandsFound < 3) {
310
+ issues.push(`${genericCRUDDetected} generic CRUD patterns detected vs ${domainCommandsFound} domain commands. ` +
311
+ 'Domain commands should outnumber generic CRUD to prevent template-like code generation.');
312
+ }
313
+ if (testDataExamplesFound < 5) {
314
+ issues.push(`Only ${testDataExamplesFound}/5 realistic test data examples found. ` +
315
+ 'Add concrete examples: dates, order numbers (e.g. ORD-12345), UUIDs, realistic amounts.');
316
+ }
317
+ if (!databaseDialectDetected) {
318
+ issues.push('No database dialect detected. Specify the database engine (PostgreSQL, DynamoDB, etc.) ' +
319
+ 'so code generation produces correct SQL dialect, index strategies, and connection patterns.');
320
+ }
321
+ if (missingRequired.length > 0) {
322
+ issues.push(`Missing required artifacts: ${missingRequired.join(', ')}. ` +
323
+ 'Phase 2 pipeline may not have completed successfully.');
324
+ }
325
+ if (recordUnknownPatterns > 0) {
326
+ issues.push(`${recordUnknownPatterns} untyped patterns detected (Record<string, unknown>, [key: string]: any). ` +
327
+ 'Replace with concrete typed interfaces from the DDD model.');
328
+ }
329
+ const passed = score >= PASSING_SCORE;
330
+ return {
331
+ passed,
332
+ score,
333
+ issues,
334
+ cloudProviderDetected,
335
+ typedFieldsFound,
336
+ domainCommandsFound,
337
+ genericCRUDDetected,
338
+ testDataExamplesFound,
339
+ databaseDialectDetected,
340
+ recordUnknownPatterns,
341
+ missingArtifacts,
342
+ };
343
+ }
344
+ // ============================================================================
345
+ // Pipeline Stage Entry Point
346
+ // ============================================================================
347
+ /**
348
+ * Execute the implementation quality gate as a Phase 5 pipeline stage.
349
+ *
350
+ * Scans the merged phase2 artifacts directory for domain context signals
351
+ * and validates that enough information is present for non-generic code
352
+ * generation by the ruflo swarm.
353
+ *
354
+ * @param context - Phase 5 build context with directory paths
355
+ * @returns Stage output indicating pass or fail with actionable issues
356
+ */
357
+ export async function executeImplementationQualityGate(context) {
358
+ const start = Date.now();
359
+ // Look for merged phase2 artifacts in the phase5 build directory
360
+ const mergedPhase2Dir = path.join(context.phase5Dir, '.phase2-merged');
361
+ const phase2Dir = fs.existsSync(mergedPhase2Dir) ? mergedPhase2Dir : context.phase2Dir;
362
+ if (!fs.existsSync(phase2Dir)) {
363
+ const elapsed = Date.now() - start;
364
+ return {
365
+ stage: 'prior-phase-loading',
366
+ status: 'failed',
367
+ timing: elapsed,
368
+ artifacts: [],
369
+ summary: 'ECLI-P5-031: Phase 2 artifacts directory not found. Cannot validate implementation readiness.',
370
+ data: {
371
+ passed: false,
372
+ score: 0,
373
+ issues: [`Phase 2 directory not found: ${phase2Dir}`],
374
+ cloudProviderDetected: null,
375
+ typedFieldsFound: 0,
376
+ domainCommandsFound: 0,
377
+ genericCRUDDetected: 0,
378
+ testDataExamplesFound: 0,
379
+ databaseDialectDetected: null,
380
+ recordUnknownPatterns: 0,
381
+ missingArtifacts: ['all'],
382
+ },
383
+ };
384
+ }
385
+ const { corpus, missingArtifacts } = loadArtifactCorpus(phase2Dir);
386
+ const report = validateImplementationQuality(corpus, missingArtifacts);
387
+ const elapsed = Date.now() - start;
388
+ if (!report.passed) {
389
+ console.error(` [QUALITY-GATE] Implementation artifacts FAILED (score: ${report.score}/100)`);
390
+ for (const issue of report.issues) {
391
+ console.error(` - ${issue}`);
392
+ }
393
+ return {
394
+ stage: 'prior-phase-loading',
395
+ status: 'failed',
396
+ timing: elapsed,
397
+ artifacts: [],
398
+ summary: `ECLI-P5-030: Implementation prompt quality too low (score: ${report.score}/100, minimum: ${PASSING_SCORE}). ` +
399
+ `Issues: ${report.issues.join(' | ')}`,
400
+ data: report,
401
+ };
402
+ }
403
+ console.error(` [QUALITY-GATE] Implementation artifacts PASSED (score: ${report.score}/100)`);
404
+ console.error(` Cloud: ${report.cloudProviderDetected ?? 'none'}, DB: ${report.databaseDialectDetected ?? 'none'}, ` +
405
+ `Typed fields: ${report.typedFieldsFound}, Domain commands: ${report.domainCommandsFound}`);
406
+ return {
407
+ stage: 'prior-phase-loading',
408
+ status: 'completed',
409
+ timing: elapsed,
410
+ artifacts: [],
411
+ summary: `Implementation quality gate passed (score: ${report.score}/100). ` +
412
+ `Cloud: ${report.cloudProviderDetected ?? 'undetected'}, DB: ${report.databaseDialectDetected ?? 'undetected'}, ` +
413
+ `${report.typedFieldsFound} typed fields, ${report.domainCommandsFound} domain commands.`,
414
+ data: report,
415
+ };
416
+ }
417
+ //# sourceMappingURL=implementation-quality-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implementation-quality-gate.js","sourceRoot":"","sources":["../../../../src/pipeline/phase5-build/phases/implementation-quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAkClC,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,wBAAwB,GAAiE;IAC7F;QACE,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE;YACR,uCAAuC;YACvC,wHAAwH;SACzH;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,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AAC,gBAAgB,sBAAsB,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAE9F,OAAO;QACL,KAAK,EAAE,qBAAqB;QAC5B,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,OAAO;QACf,SAAS,EAAE,EAAE;QACb,OAAO,EACL,8CAA8C,MAAM,CAAC,KAAK,SAAS;YACnE,UAAU,MAAM,CAAC,qBAAqB,IAAI,YAAY,SAAS,MAAM,CAAC,uBAAuB,IAAI,YAAY,IAAI;YACjH,GAAG,MAAM,CAAC,gBAAgB,kBAAkB,MAAM,CAAC,mBAAmB,mBAAmB;QAC3F,IAAI,EAAE,MAAM;KACb,CAAC;AACJ,CAAC"}
@@ -255,7 +255,7 @@ function buildADRPromptContent(query, adr, affectedContexts, relatedServices, sp
255
255
  lines.push('1. **Implement ONLY this ADR.** Do not implement other ADRs in this step.');
256
256
  lines.push('2. **Write tests first** (TDD). Define expected behavior, then implement to pass.');
257
257
  lines.push('3. **Write real domain logic** — no stubs, no TODOs, no placeholder functions. Every function must have a working body.');
258
- lines.push('4. **Use typed interfaces** — no `Record<string, unknown>` or `any` for domain types. Define concrete types with named fields.');
258
+ lines.push('4. **Use typed interfaces from the DDD domain model** — when the domain model provides typed aggregate fields, use those exact types. Only use `Record<string, unknown>` as a last resort with a TODO comment. Never use `any` for domain types.');
259
259
  lines.push('5. **Enforce invariants** — validate domain rules in constructors and commands. Throw domain-specific exceptions on violation.');
260
260
  lines.push('6. **Handle all error paths** — use domain exceptions with error codes, not generic throws. Include retry logic where appropriate.');
261
261
  lines.push('7. **Integrate with prior ADRs** — build on what was already implemented. Import and use existing types and services.');
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-generator.js","sourceRoot":"","sources":["../../../src/pipeline/phases/prompt-generator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAWlC,MAAM,CAAC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,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,cAAc,WAAW,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;KAC/J,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -22,6 +22,25 @@ export interface RufloTask {
22
22
  readonly description: string;
23
23
  /** Target directory for this task's output (relative to project root). */
24
24
  readonly targetDir: string;
25
+ /** Implementation wave (1=foundation, 2=core, 3=dependent, 4=cross-cutting). */
26
+ readonly wave?: number;
27
+ /** Labels of tasks this depends on (must complete before this task starts). */
28
+ readonly dependsOn?: string[];
29
+ }
30
+ /** A single implementation wave containing ordered tasks and a focused prompt. */
31
+ export interface ImplementationWave {
32
+ /** Wave number (1=foundation, 2=core, 3=dependent, 4=cross-cutting). */
33
+ readonly wave: number;
34
+ /** Human-readable wave label. */
35
+ readonly label: string;
36
+ /** Bounded context names included in this wave. */
37
+ readonly contexts: string[];
38
+ /** Focused implementation prompt for this wave. */
39
+ readonly prompt: string;
40
+ /** Tasks belonging to this wave. */
41
+ readonly tasks: RufloTask[];
42
+ /** Prior wave numbers that must complete before this wave. */
43
+ readonly dependsOn: number[];
25
44
  }
26
45
  /** Phase-specific configuration for the Ruflo swarm. */
27
46
  export interface RufloPhaseConfig {
@@ -75,6 +94,15 @@ interface AgentCodeFile {
75
94
  readonly content: string;
76
95
  readonly sizeBytes: number;
77
96
  }
97
+ /**
98
+ * Sanitize generated interface names to prevent double-prefix bugs.
99
+ *
100
+ * Convention:
101
+ * Port interfaces: {ContextName}Port (no "I" prefix)
102
+ * Adapters: {Implementation}{ContextName}Adapter
103
+ * Never double-prefix (II*, IInterface*)
104
+ */
105
+ export declare function sanitizeInterfaceName(name: string, kind: 'port' | 'adapter' | 'interface'): string;
78
106
  /**
79
107
  * Resolve the ruflo binary. Checks local node_modules, walks up, then global.
80
108
  * Result is cached for the process lifetime.
@@ -86,6 +114,80 @@ export declare function checkRufloAvailable(): {
86
114
  version: string;
87
115
  binary: string;
88
116
  };
117
+ /**
118
+ * Analyze the DDD context map to determine bounded context dependencies.
119
+ * Returns a map of context name -> list of context names it depends on.
120
+ *
121
+ * Dependency direction: if A is upstream of B (A -> B), then B depends on A.
122
+ * Relationships like "customer-supplier", "conformist", and "anticorruption-layer"
123
+ * mean the downstream context depends on the upstream context.
124
+ * "shared-kernel" means mutual dependency — both go in the same wave.
125
+ */
126
+ export declare function buildContextDependencyGraph(contextMap: {
127
+ from: string;
128
+ to: string;
129
+ relationship: string;
130
+ }[], contextNames: string[]): Map<string, string[]>;
131
+ /**
132
+ * Topologically sort bounded contexts by dependency order.
133
+ * Contexts with no dependencies come first (foundations), then contexts
134
+ * that depend only on already-sorted contexts, and so on.
135
+ *
136
+ * Returns contexts grouped by depth level (0 = no deps, 1 = depends on level 0, etc.).
137
+ * Handles cycles by placing cyclic contexts at the deepest level encountered.
138
+ */
139
+ export declare function topologicalSort(deps: Map<string, string[]>): string[][];
140
+ /**
141
+ * Group topologically sorted contexts into implementation waves.
142
+ *
143
+ * - Wave 1 (Foundation): Database schemas, shared infrastructure, contexts with zero dependencies
144
+ * - Wave 2 (Core): Contexts that depend only on Wave 1 contexts
145
+ * - Wave 3 (Dependent): Contexts that depend on Wave 2 contexts
146
+ * - Wave 4 (Cross-cutting): Frontend, tests, deployment — built AFTER domain code exists
147
+ *
148
+ * If there are more than 3 dependency levels, intermediate levels are merged
149
+ * into Waves 2 and 3 proportionally.
150
+ */
151
+ export declare function groupIntoWaves(sortedLevels: string[][], _language: string, scenarioQuery: string, artifacts: Record<string, string>): ImplementationWave[];
152
+ /**
153
+ * Build a focused, 20-40 line implementation prompt for a single wave.
154
+ * Each prompt tells the LLM exactly:
155
+ * - What to implement (specific contexts, specific ADRs)
156
+ * - Why this order (dependency rationale)
157
+ * - What's already built (prior wave output)
158
+ * - Concrete fields and types (from DDD aggregates)
159
+ */
160
+ export declare function buildWavePrompt(wave: ImplementationWave, ddd: {
161
+ contexts: {
162
+ name: string;
163
+ aggregates: string[];
164
+ commands: string[];
165
+ queries: string[];
166
+ events: string[];
167
+ }[];
168
+ }, adrs: {
169
+ id: string;
170
+ title: string;
171
+ decision: string;
172
+ }[], tdd: {
173
+ suites: {
174
+ name: string;
175
+ testCount: number;
176
+ strategy: string;
177
+ }[];
178
+ approach: string;
179
+ }, language: string, priorWaveLabels: string[]): string;
180
+ /**
181
+ * Build iterative, dependency-ordered implementation prompts.
182
+ *
183
+ * Instead of one monolithic prompt dumping ALL contexts, ADRs, and TDD suites,
184
+ * this function produces a sequence of focused wave prompts. Each wave prompt
185
+ * references only the contexts, ADRs, and tests relevant to that wave, and
186
+ * explicitly states what prior waves have already built.
187
+ *
188
+ * Exported for direct use by Phase 5 wave-ordered execution.
189
+ */
190
+ export declare function buildIterativeImplementationPrompts(artifacts: Record<string, string>, scenarioQuery: string, language: string): ImplementationWave[];
89
191
  /**
90
192
  * Build a structured implementation prompt from pipeline artifacts.
91
193
  *
@@ -95,6 +197,9 @@ export declare function checkRufloAvailable(): {
95
197
  *
96
198
  * The prompt is written to disk as `implementation-prompt.md` and used as the
97
199
  * swarm objective across all phases.
200
+ *
201
+ * ADR-028: Now internally uses iterative wave-ordered prompts. The output is
202
+ * a single string with clear wave boundaries for backward compatibility.
98
203
  */
99
204
  export declare function buildImplementationPrompt(artifacts: Record<string, string>, scenarioQuery: string, language: string): string;
100
205
  /**
@@ -122,7 +227,17 @@ export declare function buildPhase3Tasks(scenarioQuery: string, artifacts: Recor
122
227
  export declare function buildPhase4Tasks(scenarioQuery: string, artifacts: Record<string, string>): RufloTask[];
123
228
  /**
124
229
  * Build Ruflo tasks for Phase 5: Production Build.
125
- * Ruflo writes the complete production-ready application.
230
+ *
231
+ * ADR-028 Change 4: Instead of creating all tasks in a flat list dispatched
232
+ * simultaneously, tasks are now organized into dependency-ordered waves.
233
+ * Each task carries a `wave` property and `dependsOn` references so the
234
+ * executor can run them sequentially (wave 1 first, then 2, etc.).
235
+ *
236
+ * Wave structure:
237
+ * Wave 1 (Foundation): Database schemas, shared infra, contexts with no deps
238
+ * Wave 2 (Core): Independent bounded contexts
239
+ * Wave 3 (Dependent): Contexts that reference Wave 2 contexts
240
+ * Wave 4 (Cross-cutting): Frontend, tests, deployment -- AFTER domain code
126
241
  */
127
242
  export declare function buildPhase5Tasks(scenarioQuery: string, language: string, artifacts: Record<string, string>): RufloTask[];
128
243
  /**