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

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 (451) 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 +1 -1
  140. package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
  141. package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
  142. package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
  143. package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
  144. package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
  145. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
  146. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
  147. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
  148. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
  149. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
  150. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
  151. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
  152. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
  153. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
  154. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
  155. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
  156. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
  157. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
  158. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
  159. package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
  160. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  161. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
  162. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
  163. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
  164. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
  165. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
  166. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  167. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
  168. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  169. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
  170. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
  171. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
  172. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
  173. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
  174. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
  175. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
  176. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
  177. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
  178. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
  179. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
  180. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
  181. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
  182. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
  183. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
  184. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
  185. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
  186. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
  187. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  188. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
  189. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
  190. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
  191. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
  192. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  193. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
  194. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
  195. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  196. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
  197. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
  198. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  199. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
  200. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
  201. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
  202. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
  203. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
  204. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
  205. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
  206. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
  207. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
  208. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
  209. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
  210. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
  211. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
  212. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
  213. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
  214. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
  215. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
  216. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
  217. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  218. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  219. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  220. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
  221. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
  222. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
  223. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  224. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  225. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  226. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  227. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
  228. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
  229. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
  230. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
  231. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
  232. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  233. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  234. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  235. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  236. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  237. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  238. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  239. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
  240. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
  241. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
  242. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
  243. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
  244. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
  245. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
  246. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
  247. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
  248. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
  249. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
  250. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
  251. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
  252. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
  253. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
  254. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
  255. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
  256. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
  257. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
  258. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
  259. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  260. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
  261. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
  262. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
  263. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
  264. package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
  265. package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
  266. package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
  267. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
  268. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
  269. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
  270. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
  271. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
  272. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
  273. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
  274. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
  275. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
  276. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
  277. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
  278. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
  279. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
  280. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
  281. package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
  282. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
  283. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
  284. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
  285. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
  286. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
  287. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
  288. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
  289. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
  290. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
  291. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
  292. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
  293. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
  294. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
  295. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
  296. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
  297. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
  298. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
  299. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
  300. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
  301. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
  302. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
  303. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
  304. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
  305. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
  306. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
  307. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
  308. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
  309. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
  310. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
  311. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
  312. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
  313. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
  314. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
  315. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
  316. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
  317. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
  318. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
  319. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
  320. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
  321. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
  322. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
  323. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
  324. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
  325. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
  326. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
  327. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
  328. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
  329. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
  330. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
  331. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
  332. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
  333. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
  334. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
  335. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
  336. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
  337. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
  338. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
  339. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
  340. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
  341. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
  342. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
  343. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
  344. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
  345. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
  346. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
  347. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
  348. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
  349. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
  350. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
  351. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
  352. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
  353. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
  354. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
  355. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
  356. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
  357. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
  358. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
  359. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
  360. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
  361. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
  362. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
  363. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
  364. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
  365. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
  366. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
  367. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
  368. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
  369. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
  370. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
  371. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
  372. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
  373. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
  374. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
  375. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
  376. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
  377. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
  378. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
  379. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
  380. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
  381. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
  382. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
  383. package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
  384. package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
  385. package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
  386. package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
  387. package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
  388. package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
  389. package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
  390. package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
  391. package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
  392. package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
  393. package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
  394. package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
  395. package/dist/bundled-agents/copilot-agents/package.json +0 -5
  396. package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
  397. package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
  398. package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
  399. package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
  400. package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
  401. package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
  402. package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
  403. package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
  404. package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
  405. package/dist/bundled-agents/platform-agents/package.json +0 -22
  406. package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
  407. package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
  408. package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
  409. package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
  410. package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
  411. package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
  412. package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
  413. package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
  414. package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
  415. package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
  416. package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
  417. package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
  418. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
  419. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
  420. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
  421. package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
  422. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
  423. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
  424. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
  425. package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
  426. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
  427. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
  428. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
  429. package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
  430. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
  431. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
  432. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
  433. package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
  434. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
  435. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
  436. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
  437. package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
  438. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
  439. package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
  440. package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
  441. package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
  442. package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
  443. package/dist/bundled-agents/sentinel-agents/package.json +0 -62
  444. package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
  445. package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
  446. package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
  447. package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
  448. package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
  449. package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
  450. package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
  451. package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
@@ -0,0 +1,350 @@
1
+ /**
2
+ * Phase 2 Quality Gate: SPARC Output Validator
3
+ *
4
+ * Validates SPARC specification + pseudocode before DDD generation.
5
+ * Prevents empty entity types by ensuring pseudocode contains:
6
+ * - dataStructures with typed fields (not just type names)
7
+ * - Algorithm steps (not empty arrays)
8
+ * - Service definitions with API signatures
9
+ *
10
+ * Error codes:
11
+ * ECLI-P2-040 SPARC output quality too low for DDD generation
12
+ * ECLI-P2-041 SPARC output not available on context
13
+ */
14
+ // ============================================================================
15
+ // Detection Patterns
16
+ // ============================================================================
17
+ /**
18
+ * Patterns indicating typed field definitions in data structures.
19
+ * Matches formats like "fieldName: string", "amount: number", "{ name: Type }".
20
+ */
21
+ const TYPED_FIELD_PATTERNS = [
22
+ /\w+\s*:\s*(?:string|number|boolean|Date|int|float|double|bigint|uuid|decimal)\b/gi,
23
+ /\w+\s*:\s*(?:Array|List|Set|Map|Record|Optional|Nullable)<?\s*\w+/gi,
24
+ /\w+\s*:\s*[A-Z][a-z]+(?:[A-Z][a-z]+)+/g, // fieldName: PascalCaseType
25
+ /(?:readonly|public|private|protected)\s+\w+\s*:\s*\w+/gi,
26
+ ];
27
+ /**
28
+ * Patterns indicating truncated or corrupt JSON content.
29
+ */
30
+ const TRUNCATION_PATTERNS = [
31
+ /\.\.\.\s*$/m, // ends with "..."
32
+ /\{\s*$/m, // ends with opening brace
33
+ /,\s*$/m, // ends with trailing comma
34
+ /(?:truncated|maximum\s+length|token\s+limit|cut\s+off)\b/gi,
35
+ ];
36
+ /**
37
+ * Patterns indicating error messages leaked into content.
38
+ */
39
+ const ERROR_MESSAGE_PATTERNS = [
40
+ /\b(?:Error|Exception|ENOENT|EACCES|EPERM|EISDIR)\b.*:/g,
41
+ /\bstack\s*trace\b/gi,
42
+ /\bat\s+\w+\s*\(.*:\d+:\d+\)/g, // "at functionName (file:line:col)"
43
+ /\b(?:undefined|null)\s+is\s+not\s+(?:a\s+function|an?\s+object|iterable)\b/gi,
44
+ /\b(?:Cannot\s+read\s+propert(?:y|ies)\s+of\s+(?:undefined|null))\b/gi,
45
+ ];
46
+ /**
47
+ * Patterns indicating API signatures with input/output types.
48
+ */
49
+ const API_SIGNATURE_PATTERNS = [
50
+ /\b\w+\s*\(.*\)\s*(?:=>|->|:)\s*\w+/g, // func(args) => ReturnType
51
+ /\b(?:GET|POST|PUT|PATCH|DELETE)\s+\/\w+/g, // HTTP method + path
52
+ /\b(?:input|request|params?)\s*:\s*\{[^}]+\}/gi, // input: { ... }
53
+ /\b(?:output|response|returns?)\s*:\s*(?:\{[^}]+\}|\w+)/gi, // output: { ... } or Type
54
+ /\b(?:rpc|grpc|graphql)\b/gi, // RPC protocol mentions
55
+ ];
56
+ // ============================================================================
57
+ // Validation Helpers
58
+ // ============================================================================
59
+ /**
60
+ * Check whether a pseudocode module has real typed data structures
61
+ * (not just empty type names or generic placeholders).
62
+ */
63
+ function moduleHasTypedDataStructures(mod) {
64
+ // Check the markdown content for typed field patterns
65
+ const content = `${mod.markdown} ${mod.dataStructures.join(' ')}`;
66
+ for (const pattern of TYPED_FIELD_PATTERNS) {
67
+ const re = new RegExp(pattern.source, pattern.flags);
68
+ if (re.test(content))
69
+ return true;
70
+ }
71
+ // Also accept dataStructures array entries that contain ":" (field: type)
72
+ return mod.dataStructures.some((ds) => /\w+\s*:\s*\w+/.test(ds));
73
+ }
74
+ /**
75
+ * Check whether a pseudocode module has non-empty algorithm steps.
76
+ */
77
+ function moduleHasAlgorithms(mod) {
78
+ // algorithms array must have real entries (not empty strings)
79
+ if (mod.algorithms.length > 0 && mod.algorithms.some((a) => a.trim().length > 10)) {
80
+ return true;
81
+ }
82
+ // Also check markdown for algorithmic constructs
83
+ return /\b(?:if|for|while|loop|iterate|return|throw|try|catch|switch|case|step\s+\d)\b/i.test(mod.markdown);
84
+ }
85
+ /**
86
+ * Check whether a service has API signatures with typed inputs/outputs.
87
+ */
88
+ function serviceHasTypedAPIs(svc) {
89
+ const apiText = svc.api.join(' ');
90
+ for (const pattern of API_SIGNATURE_PATTERNS) {
91
+ const re = new RegExp(pattern.source, pattern.flags);
92
+ if (re.test(apiText))
93
+ return true;
94
+ }
95
+ return false;
96
+ }
97
+ /**
98
+ * Detect truncated content across all SPARC output text.
99
+ */
100
+ function detectTruncation(sparc) {
101
+ const allText = gatherAllText(sparc);
102
+ for (const pattern of TRUNCATION_PATTERNS) {
103
+ const re = new RegExp(pattern.source, pattern.flags);
104
+ if (re.test(allText))
105
+ return true;
106
+ }
107
+ return false;
108
+ }
109
+ /**
110
+ * Detect error messages leaked into SPARC content.
111
+ */
112
+ function detectErrorMessages(sparc) {
113
+ const allText = gatherAllText(sparc);
114
+ for (const pattern of ERROR_MESSAGE_PATTERNS) {
115
+ const re = new RegExp(pattern.source, pattern.flags);
116
+ if (re.test(allText))
117
+ return true;
118
+ }
119
+ return false;
120
+ }
121
+ /**
122
+ * Concatenate all textual content from SPARC output for scanning.
123
+ */
124
+ function gatherAllText(sparc) {
125
+ const parts = [];
126
+ // Specification
127
+ parts.push(sparc.specification.scope);
128
+ for (const req of sparc.specification.requirements)
129
+ parts.push(req.text);
130
+ for (const con of sparc.specification.constraints)
131
+ parts.push(con.text);
132
+ for (const sc of sparc.specification.successCriteria)
133
+ parts.push(sc.text);
134
+ // Pseudocode
135
+ for (const mod of sparc.pseudocode.modules) {
136
+ parts.push(mod.markdown);
137
+ parts.push(mod.algorithms.join(' '));
138
+ parts.push(mod.dataStructures.join(' '));
139
+ }
140
+ // Architecture
141
+ for (const svc of sparc.architecture.services) {
142
+ parts.push(svc.responsibility);
143
+ parts.push(svc.api.join(' '));
144
+ }
145
+ parts.push(sparc.architecture.dataFlow);
146
+ parts.push(sparc.architecture.apiContracts.join(' '));
147
+ // Refinement
148
+ for (const sec of sparc.refinement.securityConsiderations)
149
+ parts.push(sec.text);
150
+ for (const perf of sparc.refinement.performanceTargets)
151
+ parts.push(perf.text);
152
+ parts.push(sparc.refinement.testStrategy);
153
+ // Completion
154
+ parts.push(sparc.completion.integrationPlan);
155
+ parts.push(sparc.completion.documentation.join(' '));
156
+ return parts.join('\n');
157
+ }
158
+ // ============================================================================
159
+ // Main Validation
160
+ // ============================================================================
161
+ const PASSING_SCORE = 60;
162
+ const WEIGHTS = {
163
+ servicesCovered: 25, // every service has at least 1 pseudocode module
164
+ dataStructures: 25, // modules have typed data structures
165
+ algorithms: 15, // modules have real algorithms
166
+ apiSignatures: 15, // services have typed API signatures
167
+ specCompleteness: 10, // specification has requirements + constraints
168
+ contentIntegrity: 10, // no truncation or error messages
169
+ };
170
+ /**
171
+ * Validate SPARC output quality and produce a detailed report.
172
+ */
173
+ export function validateSPARCQuality(sparc) {
174
+ const issues = [];
175
+ const modules = sparc.pseudocode.modules;
176
+ const services = sparc.architecture.services;
177
+ const spec = sparc.specification;
178
+ const totalModules = modules.length;
179
+ const totalServices = services.length;
180
+ // ---- Empty output fast-path ----
181
+ if (totalModules === 0 && totalServices === 0) {
182
+ return {
183
+ passed: false,
184
+ score: 0,
185
+ issues: ['SPARC output contains zero pseudocode modules and zero services. Generation may have failed entirely.'],
186
+ servicesWithPseudocode: 0,
187
+ totalServices: 0,
188
+ modulesWithDataStructures: 0,
189
+ modulesWithAlgorithms: 0,
190
+ totalModules: 0,
191
+ apisWithSignatures: 0,
192
+ truncatedContentDetected: false,
193
+ errorMessagesDetected: false,
194
+ };
195
+ }
196
+ // ---- Count signals ----
197
+ // 1. Services with at least one pseudocode module
198
+ const serviceNames = new Set(services.map((s) => s.name.toLowerCase()));
199
+ const moduleMappedServices = new Set();
200
+ for (const mod of modules) {
201
+ // Try to map modules to services by name similarity
202
+ const modNameLower = mod.name.toLowerCase();
203
+ for (const svcName of serviceNames) {
204
+ if (modNameLower.includes(svcName) || svcName.includes(modNameLower)) {
205
+ moduleMappedServices.add(svcName);
206
+ }
207
+ }
208
+ }
209
+ // If no direct mapping, count by ratio of modules to services
210
+ const servicesWithPseudocode = moduleMappedServices.size > 0
211
+ ? moduleMappedServices.size
212
+ : Math.min(totalServices, totalModules);
213
+ // 2. Modules with typed data structures
214
+ const modulesWithDataStructures = modules.filter(moduleHasTypedDataStructures).length;
215
+ // 3. Modules with real algorithms
216
+ const modulesWithAlgorithms = modules.filter(moduleHasAlgorithms).length;
217
+ // 4. Services with typed API signatures
218
+ const apisWithSignatures = services.filter(serviceHasTypedAPIs).length;
219
+ // 5. Content integrity
220
+ const truncatedContentDetected = detectTruncation(sparc);
221
+ const errorMessagesDetected = detectErrorMessages(sparc);
222
+ // ---- Compute sub-scores ----
223
+ const servicesCoveredRatio = totalServices > 0
224
+ ? servicesWithPseudocode / totalServices
225
+ : (totalModules > 0 ? 1 : 0);
226
+ const servicesCoveredScore = servicesCoveredRatio * WEIGHTS.servicesCovered;
227
+ const dsRatio = totalModules > 0 ? modulesWithDataStructures / totalModules : 0;
228
+ const dataStructuresScore = dsRatio * WEIGHTS.dataStructures;
229
+ const algoRatio = totalModules > 0 ? modulesWithAlgorithms / totalModules : 0;
230
+ const algorithmsScore = algoRatio * WEIGHTS.algorithms;
231
+ const apiRatio = totalServices > 0 ? apisWithSignatures / totalServices : 0;
232
+ const apiScore = apiRatio * WEIGHTS.apiSignatures;
233
+ // Spec completeness: has requirements, constraints, and success criteria
234
+ const specParts = [
235
+ spec.requirements.length > 0 ? 1 : 0,
236
+ spec.constraints.length > 0 ? 1 : 0,
237
+ spec.successCriteria.length > 0 ? 1 : 0,
238
+ ];
239
+ const specRatio = specParts.reduce((a, b) => a + b, 0) / 3;
240
+ const specScore = specRatio * WEIGHTS.specCompleteness;
241
+ // Content integrity penalty
242
+ let integrityPenalty = 0;
243
+ if (truncatedContentDetected)
244
+ integrityPenalty += WEIGHTS.contentIntegrity / 2;
245
+ if (errorMessagesDetected)
246
+ integrityPenalty += WEIGHTS.contentIntegrity / 2;
247
+ const integrityScore = WEIGHTS.contentIntegrity - integrityPenalty;
248
+ const rawScore = servicesCoveredScore + dataStructuresScore + algorithmsScore +
249
+ apiScore + specScore + integrityScore;
250
+ const score = Math.max(0, Math.min(100, Math.round(rawScore)));
251
+ // ---- Collect actionable issues ----
252
+ if (totalModules === 0) {
253
+ issues.push('No pseudocode modules generated. SPARC pseudocode phase may have been skipped.');
254
+ }
255
+ if (totalServices === 0) {
256
+ issues.push('No services defined in SPARC architecture. Architecture phase may have been skipped.');
257
+ }
258
+ if (totalServices > 0 && servicesWithPseudocode < totalServices) {
259
+ issues.push(`Only ${servicesWithPseudocode}/${totalServices} services have corresponding pseudocode modules. ` +
260
+ 'Each service needs at least one pseudocode module for DDD generation.');
261
+ }
262
+ if (totalModules > 0 && modulesWithDataStructures < totalModules) {
263
+ issues.push(`Only ${modulesWithDataStructures}/${totalModules} modules have typed data structures. ` +
264
+ 'Add "{ fieldName: type }" definitions to dataStructures arrays.');
265
+ }
266
+ if (totalModules > 0 && modulesWithAlgorithms < totalModules) {
267
+ issues.push(`Only ${modulesWithAlgorithms}/${totalModules} modules have non-trivial algorithms. ` +
268
+ 'Algorithm arrays should contain real control flow, not empty strings.');
269
+ }
270
+ if (totalServices > 0 && apisWithSignatures < totalServices) {
271
+ issues.push(`Only ${apisWithSignatures}/${totalServices} services have typed API signatures. ` +
272
+ 'API entries should include input/output types (e.g. "createOrder(input: CreateOrderDTO) => OrderConfirmation").');
273
+ }
274
+ if (spec.requirements.length === 0) {
275
+ issues.push('Specification has no requirements. At least one "must" requirement is expected.');
276
+ }
277
+ if (spec.constraints.length === 0) {
278
+ issues.push('Specification has no constraints defined.');
279
+ }
280
+ if (truncatedContentDetected) {
281
+ issues.push('Truncated content detected in SPARC output. LLM response may have been cut off by token limits.');
282
+ }
283
+ if (errorMessagesDetected) {
284
+ issues.push('Error messages or stack traces detected in SPARC content. Generation may have partially failed.');
285
+ }
286
+ const passed = score >= PASSING_SCORE;
287
+ return {
288
+ passed,
289
+ score,
290
+ issues,
291
+ servicesWithPseudocode,
292
+ totalServices,
293
+ modulesWithDataStructures,
294
+ modulesWithAlgorithms,
295
+ totalModules,
296
+ apisWithSignatures,
297
+ truncatedContentDetected,
298
+ errorMessagesDetected,
299
+ };
300
+ }
301
+ // ============================================================================
302
+ // Pipeline Stage Entry Point
303
+ // ============================================================================
304
+ /**
305
+ * Execute the SPARC quality gate as a Phase 2 pipeline stage.
306
+ *
307
+ * Reads the SPARC output from context stage outputs, validates it,
308
+ * and returns a stage output indicating pass or fail.
309
+ *
310
+ * @throws Error with ECLI-P2-041 if SPARC output is not on context
311
+ */
312
+ export async function executeSPARCQualityGate(context) {
313
+ const start = Date.now();
314
+ const sparcOutput = context.stageOutputs.get('sparc-specification');
315
+ if (!sparcOutput || sparcOutput.status !== 'completed' || !sparcOutput.data) {
316
+ throw new Error('ECLI-P2-041: SPARC output not available on context. ' +
317
+ 'The sparc-specification stage must complete successfully before the SPARC quality gate.');
318
+ }
319
+ const sparc = sparcOutput.data;
320
+ const report = validateSPARCQuality(sparc);
321
+ const elapsed = Date.now() - start;
322
+ if (!report.passed) {
323
+ console.error(` [QUALITY-GATE] SPARC output FAILED (score: ${report.score}/100)`);
324
+ for (const issue of report.issues) {
325
+ console.error(` - ${issue}`);
326
+ }
327
+ return {
328
+ stage: 'sparc-specification',
329
+ status: 'failed',
330
+ data: report,
331
+ artifacts: [],
332
+ timing: elapsed,
333
+ summary: `ECLI-P2-040: SPARC output quality too low (score: ${report.score}/100, minimum: ${PASSING_SCORE}). ` +
334
+ `Issues: ${report.issues.join(' | ')}`,
335
+ };
336
+ }
337
+ console.error(` [QUALITY-GATE] SPARC output PASSED (score: ${report.score}/100)`);
338
+ console.error(` Modules: ${report.totalModules}, Services: ${report.totalServices}, ` +
339
+ `Data structures OK: ${report.modulesWithDataStructures}, APIs typed: ${report.apisWithSignatures}`);
340
+ return {
341
+ stage: 'sparc-specification',
342
+ status: 'completed',
343
+ data: report,
344
+ artifacts: [],
345
+ timing: elapsed,
346
+ summary: `SPARC quality gate passed (score: ${report.score}/100). ` +
347
+ `${report.totalModules} modules, ${report.totalServices} services validated.`,
348
+ };
349
+ }
350
+ //# sourceMappingURL=sparc-quality-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparc-quality-gate.js","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/sparc-quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA4BH,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,oBAAoB,GAAsB;IAC9C,mFAAmF;IACnF,qEAAqE;IACrE,wCAAwC,EAAG,4BAA4B;IACvE,yDAAyD;CAC1D,CAAC;AAEF;;GAEG;AACH,MAAM,mBAAmB,GAAsB;IAC7C,aAAa,EAA4B,kBAAkB;IAC3D,SAAS,EAAgC,0BAA0B;IACnE,QAAQ,EAAiC,2BAA2B;IACpE,4DAA4D;CAC7D,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAsB;IAChD,wDAAwD;IACxD,qBAAqB;IACrB,8BAA8B,EAAS,oCAAoC;IAC3E,8EAA8E;IAC9E,sEAAsE;CACvE,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAsB;IAChD,qCAAqC,EAAuB,2BAA2B;IACvF,0CAA0C,EAAoB,qBAAqB;IACnF,+CAA+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K,OAAO,CAAC,CAAC;IACnF,OAAO,CAAC,KAAK,CAAC,gBAAgB,MAAM,CAAC,YAAY,eAAe,MAAM,CAAC,aAAa,IAAI;QACtF,uBAAuB,MAAM,CAAC,yBAAyB,iBAAiB,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEvG,OAAO;QACL,KAAK,EAAE,qBAAqB;QAC5B,MAAM,EAAE,WAAW;QACnB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,EAAE;QACb,MAAM,EAAE,OAAO;QACf,OAAO,EACL,qCAAqC,MAAM,CAAC,KAAK,SAAS;YAC1D,GAAG,MAAM,CAAC,YAAY,aAAa,MAAM,CAAC,aAAa,sBAAsB;KAChF,CAAC;AACJ,CAAC"}
@@ -16,6 +16,20 @@
16
16
  * ECLI-P2-011 SPARC file write failure
17
17
  */
18
18
  import type { Phase2Context, Phase2StageOutput, ResearchDossier, Phase1Artifacts, Phase2SPARCOutput } from '../types.js';
19
+ /**
20
+ * Detect whether the user's query requires intelligence/ML/analytics contexts.
21
+ * Returns keywords found and suggested intelligence context names.
22
+ */
23
+ export declare function detectIntelligenceRequirements(query: string): {
24
+ hasIntelligence: boolean;
25
+ keywords: string[];
26
+ suggestedContexts: Array<{
27
+ name: string;
28
+ type: 'ml-inference' | 'analytics' | 'anomaly-detection' | 'forecasting' | 'data-pipeline';
29
+ commands: string[];
30
+ description: string;
31
+ }>;
32
+ };
19
33
  export declare function buildPhase2SPARC(dossier: ResearchDossier, artifacts: Phase1Artifacts): Phase2SPARCOutput;
20
34
  /**
21
35
  * Stage 3 entry point: generate SPARC specification from the research dossier
@@ -1 +1 @@
1
- {"version":3,"file":"sparc-specification.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/sparc-specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EAWlB,MAAM,aAAa,CAAC;AA65BrB,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,eAAe,GACzB,iBAAiB,CAEnB;AAMD;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CA6H5B"}
1
+ {"version":3,"file":"sparc-specification.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/sparc-specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EAWlB,MAAM,aAAa,CAAC;AAiBrB;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG;IAC7D,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,KAAK,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,cAAc,GAAG,WAAW,GAAG,mBAAmB,GAAG,aAAa,GAAG,eAAe,CAAC;QAC3F,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;CACJ,CA8GA;AAi1CD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,eAAe,GACzB,iBAAiB,CAEnB;AAMD;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CAiJ5B"}