claude-flow-novice 2.0.4 → 2.0.5

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 (496) hide show
  1. package/dist/src/cli/commands/guidance.js +668 -487
  2. package/dist/src/cli/commands/index-validate.js +29 -18
  3. package/dist/src/cli/commands/mcp-troubleshoot.js +282 -230
  4. package/dist/src/cli/commands/neural-goal-init.js +125 -92
  5. package/dist/src/cli/commands/swarm-exec.js +393 -317
  6. package/dist/src/cli/commands/validate-framework.js +1100 -983
  7. package/dist/src/cli/commands/validate.js +223 -144
  8. package/dist/src/cli/main.js +1 -1
  9. package/dist/src/cli/simple-commands/__tests__/agent.test.js +277 -265
  10. package/dist/src/cli/simple-commands/__tests__/memory.test.js +7 -6
  11. package/dist/src/cli/simple-commands/__tests__/swarm.test.js +356 -373
  12. package/dist/src/cli/simple-commands/__tests__/task.test.js +7 -6
  13. package/dist/src/cli/simple-commands/agent.js +193 -157
  14. package/dist/src/cli/simple-commands/analysis.js +446 -336
  15. package/dist/src/cli/simple-commands/automation-executor.js +1339 -1095
  16. package/dist/src/cli/simple-commands/automation.js +469 -481
  17. package/dist/src/cli/simple-commands/batch-manager.js +313 -261
  18. package/dist/src/cli/simple-commands/claude-telemetry.js +267 -241
  19. package/dist/src/cli/simple-commands/claude-track.js +90 -68
  20. package/dist/src/cli/simple-commands/concurrent-display.js +320 -266
  21. package/dist/src/cli/simple-commands/config.js +290 -245
  22. package/dist/src/cli/simple-commands/coordination.js +234 -182
  23. package/dist/src/cli/simple-commands/enhanced-ui-views.js +615 -812
  24. package/dist/src/cli/simple-commands/enhanced-webui-complete.js +981 -922
  25. package/dist/src/cli/simple-commands/fix-hook-variables.js +294 -274
  26. package/dist/src/cli/simple-commands/github/gh-coordinator.js +457 -378
  27. package/dist/src/cli/simple-commands/github/github-api.js +574 -535
  28. package/dist/src/cli/simple-commands/github/init.js +303 -276
  29. package/dist/src/cli/simple-commands/github.js +247 -222
  30. package/dist/src/cli/simple-commands/goal.js +63 -51
  31. package/dist/src/cli/simple-commands/hive-mind/auto-save-middleware.js +278 -208
  32. package/dist/src/cli/simple-commands/hive-mind/communication.js +696 -601
  33. package/dist/src/cli/simple-commands/hive-mind/core.js +979 -907
  34. package/dist/src/cli/simple-commands/hive-mind/db-optimizer.js +655 -406
  35. package/dist/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1245 -1125
  36. package/dist/src/cli/simple-commands/hive-mind/memory.js +1090 -854
  37. package/dist/src/cli/simple-commands/hive-mind/performance-optimizer.js +574 -459
  38. package/dist/src/cli/simple-commands/hive-mind/performance-test.js +347 -263
  39. package/dist/src/cli/simple-commands/hive-mind/queen.js +768 -727
  40. package/dist/src/cli/simple-commands/hive-mind/session-manager.js +1049 -745
  41. package/dist/src/cli/simple-commands/hive-mind-optimize.js +283 -227
  42. package/dist/src/cli/simple-commands/hive-mind-wizard.js +217 -174
  43. package/dist/src/cli/simple-commands/hive-mind.js +2282 -1841
  44. package/dist/src/cli/simple-commands/hive.js +79 -90
  45. package/dist/src/cli/simple-commands/hook-safety.js +521 -431
  46. package/dist/src/cli/simple-commands/hooks/session-start-soul.js +254 -203
  47. package/dist/src/cli/simple-commands/hooks.js +1204 -1064
  48. package/dist/src/cli/simple-commands/init/agent-copier.js +319 -294
  49. package/dist/src/cli/simple-commands/init/batch-init.js +562 -496
  50. package/dist/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +19 -13
  51. package/dist/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +19 -13
  52. package/dist/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +88 -61
  53. package/dist/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +150 -125
  54. package/dist/src/cli/simple-commands/init/claude-commands/slash-commands.js +49 -42
  55. package/dist/src/cli/simple-commands/init/claude-commands/sparc-commands.js +61 -43
  56. package/dist/src/cli/simple-commands/init/copy-revised-templates.js +147 -141
  57. package/dist/src/cli/simple-commands/init/executable-wrapper.js +44 -31
  58. package/dist/src/cli/simple-commands/init/gitignore-updater.js +90 -64
  59. package/dist/src/cli/simple-commands/init/help.js +107 -104
  60. package/dist/src/cli/simple-commands/init/hive-mind-init.js +528 -509
  61. package/dist/src/cli/simple-commands/init/index.js +1759 -1510
  62. package/dist/src/cli/simple-commands/init/performance-monitor.js +317 -234
  63. package/dist/src/cli/simple-commands/init/rollback/backup-manager.js +504 -441
  64. package/dist/src/cli/simple-commands/init/rollback/index.js +364 -289
  65. package/dist/src/cli/simple-commands/init/rollback/recovery-manager.js +728 -652
  66. package/dist/src/cli/simple-commands/init/rollback/rollback-executor.js +481 -416
  67. package/dist/src/cli/simple-commands/init/rollback/state-tracker.js +448 -369
  68. package/dist/src/cli/simple-commands/init/sparc/roo-readme.js +2 -1
  69. package/dist/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -122
  70. package/dist/src/cli/simple-commands/init/sparc/workflows.js +37 -32
  71. package/dist/src/cli/simple-commands/init/sparc-structure.js +62 -55
  72. package/dist/src/cli/simple-commands/init/template-copier.js +533 -421
  73. package/dist/src/cli/simple-commands/init/templates/coordination-md.js +6 -3
  74. package/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +318 -344
  75. package/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +218 -173
  76. package/dist/src/cli/simple-commands/init/templates/github-safe.js +75 -65
  77. package/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +6 -3
  78. package/dist/src/cli/simple-commands/init/templates/readme-files.js +4 -2
  79. package/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +230 -187
  80. package/dist/src/cli/simple-commands/init/templates/sparc-modes.js +80 -53
  81. package/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +85 -101
  82. package/dist/src/cli/simple-commands/init/validation/config-validator.js +330 -283
  83. package/dist/src/cli/simple-commands/init/validation/health-checker.js +561 -495
  84. package/dist/src/cli/simple-commands/init/validation/index.js +358 -302
  85. package/dist/src/cli/simple-commands/init/validation/mode-validator.js +359 -308
  86. package/dist/src/cli/simple-commands/init/validation/post-init-validator.js +366 -389
  87. package/dist/src/cli/simple-commands/init/validation/pre-init-validator.js +268 -270
  88. package/dist/src/cli/simple-commands/init/validation/test-runner.js +447 -427
  89. package/dist/src/cli/simple-commands/init.js +2 -1
  90. package/dist/src/cli/simple-commands/mcp-health.js +158 -131
  91. package/dist/src/cli/simple-commands/mcp-integration-layer.js +634 -533
  92. package/dist/src/cli/simple-commands/mcp.js +400 -345
  93. package/dist/src/cli/simple-commands/memory-consolidation.js +537 -426
  94. package/dist/src/cli/simple-commands/memory.js +311 -247
  95. package/dist/src/cli/simple-commands/migrate-hooks.js +46 -39
  96. package/dist/src/cli/simple-commands/monitor.js +363 -294
  97. package/dist/src/cli/simple-commands/neural.js +65 -51
  98. package/dist/src/cli/simple-commands/pair-autofix-only.js +662 -538
  99. package/dist/src/cli/simple-commands/pair-basic.js +656 -528
  100. package/dist/src/cli/simple-commands/pair-old.js +543 -430
  101. package/dist/src/cli/simple-commands/pair-working.js +751 -615
  102. package/dist/src/cli/simple-commands/pair.js +751 -615
  103. package/dist/src/cli/simple-commands/performance-hooks.js +111 -83
  104. package/dist/src/cli/simple-commands/performance-metrics.js +433 -348
  105. package/dist/src/cli/simple-commands/process-ui-enhanced.js +787 -708
  106. package/dist/src/cli/simple-commands/process-ui.js +254 -230
  107. package/dist/src/cli/simple-commands/realtime-update-system.js +611 -525
  108. package/dist/src/cli/simple-commands/sparc/architecture.js +1530 -1704
  109. package/dist/src/cli/simple-commands/sparc/commands.js +516 -438
  110. package/dist/src/cli/simple-commands/sparc/completion.js +1481 -1224
  111. package/dist/src/cli/simple-commands/sparc/coordinator.js +978 -913
  112. package/dist/src/cli/simple-commands/sparc/index.js +298 -241
  113. package/dist/src/cli/simple-commands/sparc/phase-base.js +390 -314
  114. package/dist/src/cli/simple-commands/sparc/pseudocode.js +869 -965
  115. package/dist/src/cli/simple-commands/sparc/refinement.js +1273 -980
  116. package/dist/src/cli/simple-commands/sparc/specification.js +645 -559
  117. package/dist/src/cli/simple-commands/sparc-modes/architect.js +1 -1
  118. package/dist/src/cli/simple-commands/sparc-modes/ask.js +1 -1
  119. package/dist/src/cli/simple-commands/sparc-modes/code.js +1 -1
  120. package/dist/src/cli/simple-commands/sparc-modes/debug.js +1 -1
  121. package/dist/src/cli/simple-commands/sparc-modes/devops.js +1 -1
  122. package/dist/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
  123. package/dist/src/cli/simple-commands/sparc-modes/generic.js +1 -1
  124. package/dist/src/cli/simple-commands/sparc-modes/index.js +55 -47
  125. package/dist/src/cli/simple-commands/sparc-modes/integration.js +1 -1
  126. package/dist/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
  127. package/dist/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
  128. package/dist/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
  129. package/dist/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
  130. package/dist/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
  131. package/dist/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
  132. package/dist/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
  133. package/dist/src/cli/simple-commands/sparc-modes/swarm.js +87 -101
  134. package/dist/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
  135. package/dist/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
  136. package/dist/src/cli/simple-commands/sparc.js +493 -465
  137. package/dist/src/cli/simple-commands/start-ui.js +132 -108
  138. package/dist/src/cli/simple-commands/start-wrapper.js +268 -240
  139. package/dist/src/cli/simple-commands/start.js +1 -1
  140. package/dist/src/cli/simple-commands/status.js +275 -254
  141. package/dist/src/cli/simple-commands/stream-chain-clean.js +171 -128
  142. package/dist/src/cli/simple-commands/stream-chain-fixed.js +82 -61
  143. package/dist/src/cli/simple-commands/stream-chain-real.js +331 -267
  144. package/dist/src/cli/simple-commands/stream-chain-working.js +263 -211
  145. package/dist/src/cli/simple-commands/stream-chain.js +318 -260
  146. package/dist/src/cli/simple-commands/stream-processor.js +315 -290
  147. package/dist/src/cli/simple-commands/swarm-executor.js +222 -189
  148. package/dist/src/cli/simple-commands/swarm-metrics-integration.js +300 -208
  149. package/dist/src/cli/simple-commands/swarm-ui.js +703 -623
  150. package/dist/src/cli/simple-commands/swarm-webui-integration.js +286 -258
  151. package/dist/src/cli/simple-commands/swarm.js +1082 -887
  152. package/dist/src/cli/simple-commands/task.js +206 -161
  153. package/dist/src/cli/simple-commands/timestamp-fix.js +89 -59
  154. package/dist/src/cli/simple-commands/token-tracker.js +316 -258
  155. package/dist/src/cli/simple-commands/tool-execution-framework.js +519 -433
  156. package/dist/src/cli/simple-commands/train-and-stream.js +331 -275
  157. package/dist/src/cli/simple-commands/training-pipeline.js +725 -619
  158. package/dist/src/cli/simple-commands/training.js +227 -170
  159. package/dist/src/cli/simple-commands/verification-hooks.js +284 -261
  160. package/dist/src/cli/simple-commands/verification-integration.js +417 -389
  161. package/dist/src/cli/simple-commands/verification-training-integration.js +606 -486
  162. package/dist/src/cli/simple-commands/verification.js +513 -493
  163. package/dist/src/cli/simple-commands/web-server.js +836 -766
  164. package/dist/src/cli/simple-commands/webui-validator.js +124 -106
  165. package/dist/src/coordination/byzantine-memory-channels.js +25 -1
  166. package/dist/src/coordination/event-bus/demo-wasm-integration.js +251 -212
  167. package/dist/src/coordination/event-bus/qe-event-bus.js +748 -608
  168. package/dist/src/coordination/event-bus/qe-event-bus.test.js +454 -379
  169. package/dist/src/coordination/iteration-tracker.js +454 -363
  170. package/dist/src/index.js +384 -35
  171. package/dist/src/mcp/DEPRECATED.js +60 -46
  172. package/dist/src/mcp/fixes/mcp-error-fixes.js +134 -115
  173. package/dist/src/mcp/implementations/agent-tracker.js +128 -114
  174. package/dist/src/mcp/implementations/daa-tools.js +350 -292
  175. package/dist/src/mcp/implementations/workflow-tools.js +361 -329
  176. package/dist/src/mcp/mcp-config-manager.js +1331 -1183
  177. package/dist/src/mcp/mcp-server-novice-simplified.js +17 -11
  178. package/dist/src/mcp/mcp-server-novice.js +17 -11
  179. package/dist/src/mcp/mcp-server-sdk.js +17 -11
  180. package/dist/src/mcp/mcp-server.js +1484 -1620
  181. package/dist/src/mcp/ruv-swarm-wrapper.js +239 -209
  182. package/dist/src/memory/advanced-serializer.js +589 -609
  183. package/dist/src/memory/enhanced-examples.js +305 -220
  184. package/dist/src/memory/enhanced-memory.js +336 -295
  185. package/dist/src/memory/enhanced-session-serializer.js +492 -408
  186. package/dist/src/memory/fallback-memory-system.js +1021 -900
  187. package/dist/src/memory/fallback-store.js +131 -93
  188. package/dist/src/memory/high-performance-serialization.js +730 -592
  189. package/dist/src/memory/in-memory-store.js +213 -161
  190. package/dist/src/memory/index.js +157 -123
  191. package/dist/src/memory/lock-free-structures.js +764 -578
  192. package/dist/src/memory/memory-mapped-persistence.js +766 -585
  193. package/dist/src/memory/memory-pressure-manager.js +707 -569
  194. package/dist/src/memory/migration.js +445 -358
  195. package/dist/src/memory/shared-memory.js +768 -641
  196. package/dist/src/memory/sqlite-store.js +325 -245
  197. package/dist/src/memory/sqlite-wrapper.js +151 -122
  198. package/dist/src/memory/swarm-memory.js +603 -470
  199. package/dist/src/memory/test-example.js +134 -126
  200. package/dist/src/memory/ultra-fast-memory-store.js +821 -622
  201. package/dist/src/memory/unified-memory-manager.js +437 -356
  202. package/dist/src/swarm/CodeRefactoringSwarm.js +952 -777
  203. package/dist/src/utils/__tests__/github-cli-safety-wrapper.test.js +400 -332
  204. package/dist/src/utils/error-handler.js +2 -36
  205. package/dist/src/utils/github-cli-safe.js +64 -56
  206. package/dist/src/utils/github-cli-safety-wrapper.js +546 -451
  207. package/dist/src/utils/npx-isolated-cache.js +119 -104
  208. package/dist/src/utils/preference-manager.js +652 -622
  209. package/dist/src/utils/timezone-utils.js +105 -86
  210. package/dist/src/web/api/apm-routes.js +353 -0
  211. package/dist/src/web/api/config/api-config.js +184 -0
  212. package/dist/src/web/api/middleware/auth.js +203 -0
  213. package/dist/src/web/api/middleware/cache.js +273 -0
  214. package/dist/src/web/api/middleware/error-handler.js +257 -0
  215. package/dist/src/web/api/middleware/request-logger.js +215 -0
  216. package/dist/src/web/api/middleware/validation.js +323 -0
  217. package/dist/src/web/api/routes/events.js +463 -0
  218. package/dist/src/web/api/routes/hierarchy.js +300 -0
  219. package/dist/src/web/api/routes/index.js +12 -0
  220. package/dist/src/web/api/routes/metrics.js +559 -0
  221. package/dist/src/web/api/routes/parallel-status.js +359 -0
  222. package/dist/src/web/api/routes/status.js +448 -0
  223. package/dist/src/web/api/server.js +462 -0
  224. package/dist/src/web/dashboard/hooks/useWebSocket.js +383 -0
  225. package/dist/src/web/dashboard/index.js +85 -0
  226. package/dist/src/web/dashboard/realtime/CustomSyncManager.js +439 -0
  227. package/dist/src/web/dashboard/realtime/NativeWebSocketManager.js +323 -0
  228. package/dist/src/web/dashboard/realtime/PerformanceBenchmark.js +527 -0
  229. package/dist/src/web/dashboard/realtime/RealtimeCommunicationManager.js +474 -0
  230. package/dist/src/web/dashboard/realtime/RealtimeServer.js +666 -0
  231. package/dist/src/web/dashboard/realtime/SSEManager.js +426 -0
  232. package/dist/src/web/dashboard/types.js +4 -0
  233. package/dist/src/web/messaging/agent-status-tracker.js +453 -0
  234. package/dist/src/web/messaging/human-intervention-system.js +305 -0
  235. package/dist/src/web/messaging/message-filter.js +302 -0
  236. package/dist/src/web/messaging/swarm-message-router.js +324 -0
  237. package/dist/src/web/messaging/transparency-logger.js +421 -0
  238. package/dist/src/web/portal-server.js +460 -0
  239. package/dist/src/web/server.js +322 -0
  240. package/dist/src/web/websocket/apm-websocket-handler.js +453 -0
  241. package/dist/src/web/websocket/websocket-manager.js +780 -0
  242. package/package.json +5 -3
  243. package/dist/src/cli/minimal-main.js +0 -22
  244. package/dist/src/enterprise/analytics-manager.js +0 -1135
  245. package/dist/src/enterprise/audit-manager.js +0 -1115
  246. package/dist/src/enterprise/cloud-manager.js +0 -891
  247. package/dist/src/enterprise/deployment-manager.js +0 -966
  248. package/dist/src/enterprise/index.js +0 -6
  249. package/dist/src/enterprise/project-manager.js +0 -584
  250. package/dist/src/enterprise/security-manager.js +0 -991
  251. package/dist/src/migration/index.js +0 -92
  252. package/dist/src/migration/logger.js +0 -121
  253. package/dist/src/migration/migration-analyzer.js +0 -268
  254. package/dist/src/migration/migration-runner.js +0 -522
  255. package/dist/src/migration/migration-validator.js +0 -285
  256. package/dist/src/migration/progress-reporter.js +0 -150
  257. package/dist/src/migration/rollback-manager.js +0 -321
  258. package/dist/src/migration/tests/migration-system.test.js +0 -7
  259. package/dist/src/migration/types.js +0 -3
  260. package/dist/src/swarm/__tests__/integration.test.js +0 -227
  261. package/dist/src/swarm/__tests__/prompt-copier.test.js +0 -344
  262. package/dist/src/swarm/advanced-orchestrator.js +0 -1095
  263. package/dist/src/swarm/claude-code-interface.js +0 -961
  264. package/dist/src/swarm/claude-flow-executor.js +0 -229
  265. package/dist/src/swarm/consensus-coordinator.js +0 -475
  266. package/dist/src/swarm/coordinator.js +0 -2993
  267. package/dist/src/swarm/direct-executor.js +0 -1180
  268. package/dist/src/swarm/error-recovery/advanced-error-detection.js +0 -691
  269. package/dist/src/swarm/error-recovery/automated-recovery-workflows.js +0 -998
  270. package/dist/src/swarm/error-recovery/error-recovery-coordinator.js +0 -1197
  271. package/dist/src/swarm/error-recovery/recovery-monitoring.js +0 -772
  272. package/dist/src/swarm/error-recovery/resilience-architecture.js +0 -714
  273. package/dist/src/swarm/error-recovery/self-healing-mechanisms.js +0 -1319
  274. package/dist/src/swarm/error-recovery/test-error-recovery-effectiveness.js +0 -808
  275. package/dist/src/swarm/executor-v2.js +0 -322
  276. package/dist/src/swarm/executor.js +0 -815
  277. package/dist/src/swarm/hive-mind-integration.js +0 -703
  278. package/dist/src/swarm/index.js +0 -41
  279. package/dist/src/swarm/json-output-aggregator.js +0 -267
  280. package/dist/src/swarm/large-scale-coordinator.js +0 -542
  281. package/dist/src/swarm/mcp-integration-wrapper.js +0 -628
  282. package/dist/src/swarm/memory.js +0 -1117
  283. package/dist/src/swarm/optimizations/__tests__/optimization.test.js +0 -348
  284. package/dist/src/swarm/optimizations/async-file-manager.js +0 -285
  285. package/dist/src/swarm/optimizations/circular-buffer.js +0 -162
  286. package/dist/src/swarm/optimizations/connection-pool.js +0 -244
  287. package/dist/src/swarm/optimizations/index.js +0 -28
  288. package/dist/src/swarm/optimizations/optimized-executor.js +0 -320
  289. package/dist/src/swarm/optimizations/ttl-map.js +0 -234
  290. package/dist/src/swarm/prompt-cli.js +0 -200
  291. package/dist/src/swarm/prompt-copier-enhanced.js +0 -202
  292. package/dist/src/swarm/prompt-copier.js +0 -381
  293. package/dist/src/swarm/prompt-manager.js +0 -295
  294. package/dist/src/swarm/prompt-utils.js +0 -310
  295. package/dist/src/swarm/result-aggregator.js +0 -718
  296. package/dist/src/swarm/sparc-executor.js +0 -1568
  297. package/dist/src/swarm/strategies/auto.js +0 -758
  298. package/dist/src/swarm/strategies/base.js +0 -128
  299. package/dist/src/swarm/strategies/research.js +0 -914
  300. package/dist/src/swarm/strategies/strategy-metrics-patch.js +0 -2
  301. package/dist/src/swarm/types.js +0 -52
  302. package/dist/src/swarm/workers/copy-worker.js +0 -56
  303. package/dist/src/validators/epic-config-schema.js +0 -214
  304. package/dist/src/validators/index.js +0 -10
  305. package/dist/src/validators/swarm-init-validator.js +0 -259
  306. package/dist/src/validators/todowrite-batching-validator.js +0 -215
  307. package/dist/src/validators/todowrite-integration.js +0 -187
  308. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +0 -23
  309. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +0 -57
  310. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +0 -401
  311. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +0 -181
  312. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +0 -44
  313. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +0 -157
  314. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js +0 -71
  315. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/editorState/browser/editorState.js +0 -112
  316. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findController.js +0 -990
  317. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findDecorations.js +0 -296
  318. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findModel.js +0 -488
  319. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +0 -138
  320. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findState.js +0 -243
  321. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findWidget.js +0 -1177
  322. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/folding.js +0 -1093
  323. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +0 -133
  324. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingModel.js +0 -538
  325. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingRanges.js +0 -351
  326. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +0 -49
  327. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/format.js +0 -360
  328. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formatActions.js +0 -263
  329. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formattingEdit.js +0 -54
  330. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +0 -149
  331. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/hover/browser/contentHover.js +0 -874
  332. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js +0 -7
  333. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commands.js +0 -199
  334. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +0 -70
  335. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -26
  336. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +0 -153
  337. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +0 -33
  338. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +0 -354
  339. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js +0 -146
  340. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/suggest/browser/completionModel.js +0 -224
  341. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +0 -119
  342. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/edcore.main.js +0 -14
  343. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.all.js +0 -63
  344. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.api.js +0 -55
  345. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.main.js +0 -7
  346. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.worker.js +0 -25
  347. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/standalone/browser/colorizer.js +0 -118
  348. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/css.worker.js +0 -36869
  349. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js +0 -2035
  350. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
  351. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
  352. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
  353. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
  354. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
  355. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
  356. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
  357. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
  358. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
  359. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
  360. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
  361. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
  362. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
  363. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
  364. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
  365. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
  366. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
  367. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
  368. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
  369. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
  370. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
  371. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
  372. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
  373. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
  374. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
  375. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
  376. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
  377. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
  378. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
  379. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
  380. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
  381. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
  382. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
  383. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
  384. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
  385. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
  386. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
  387. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
  388. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
  389. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
  390. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
  391. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
  392. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cameligo/cameligo.js +0 -10
  393. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/clojure/clojure.js +0 -10
  394. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/coffee/coffee.js +0 -10
  395. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cpp/cpp.js +0 -10
  396. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csharp/csharp.js +0 -10
  397. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csp/csp.js +0 -10
  398. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/css/css.js +0 -12
  399. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cypher/cypher.js +0 -10
  400. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dart/dart.js +0 -10
  401. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dockerfile/dockerfile.js +0 -10
  402. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/ecl/ecl.js +0 -10
  403. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/elixir/elixir.js +0 -10
  404. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/flow9/flow9.js +0 -10
  405. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.js +0 -745
  406. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.de.js +0 -31
  407. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.es.js +0 -31
  408. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.fr.js +0 -29
  409. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.it.js +0 -29
  410. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ja.js +0 -31
  411. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.js +0 -29
  412. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ko.js +0 -29
  413. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ru.js +0 -31
  414. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-cn.js +0 -31
  415. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-tw.js +0 -29
  416. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssMode.js +0 -13
  417. package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssWorker.js +0 -81
  418. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/cli.js +0 -64
  419. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/example.js +0 -36
  420. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/index.js +0 -205
  421. package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/test.js +0 -260
  422. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.browser.js +0 -34
  423. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.js +0 -35
  424. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.native.js +0 -26
  425. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.browser.js +0 -34
  426. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.js +0 -45
  427. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/nanoid.js +0 -1
  428. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/non-secure/index.js +0 -21
  429. package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/url-alphabet/index.js +0 -3
  430. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/bin/nodemon.js +0 -16
  431. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/index.js +0 -49
  432. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/parse.js +0 -230
  433. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/command.js +0 -43
  434. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/defaults.js +0 -34
  435. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/exec.js +0 -234
  436. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/index.js +0 -93
  437. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/load.js +0 -225
  438. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/help/index.js +0 -27
  439. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/index.js +0 -1
  440. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/index.js +0 -4
  441. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/match.js +0 -287
  442. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/run.js +0 -562
  443. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/signals.js +0 -34
  444. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/watch.js +0 -244
  445. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/nodemon.js +0 -317
  446. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/add.js +0 -89
  447. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/index.js +0 -53
  448. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/parse.js +0 -43
  449. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/spawn.js +0 -74
  450. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/bus.js +0 -44
  451. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/clone.js +0 -40
  452. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/colour.js +0 -26
  453. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/index.js +0 -103
  454. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/log.js +0 -82
  455. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/merge.js +0 -47
  456. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/version.js +0 -100
  457. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/brace-expansion/index.js +0 -201
  458. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/has-flag/index.js +0 -8
  459. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/minimatch/minimatch.js +0 -947
  460. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/browser.js +0 -5
  461. package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js +0 -131
  462. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/bin/pidtree.js +0 -128
  463. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/index.js +0 -49
  464. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/bin.js +0 -61
  465. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/get.js +0 -45
  466. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/pidtree.js +0 -104
  467. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/ps.js +0 -47
  468. package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/wmic.js +0 -49
  469. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/doc.js +0 -1270
  470. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/acorn.js +0 -15
  471. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/angular.js +0 -2
  472. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/babel.js +0 -15
  473. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/estree.js +0 -36
  474. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/flow.js +0 -19
  475. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/glimmer.js +0 -29
  476. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/graphql.js +0 -29
  477. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/html.js +0 -22
  478. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/markdown.js +0 -63
  479. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/meriyah.js +0 -4
  480. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/postcss.js +0 -54
  481. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/typescript.js +0 -20
  482. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/yaml.js +0 -160
  483. package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/standalone.js +0 -34
  484. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/bin/react-scripts.js +0 -58
  485. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/env.js +0 -112
  486. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/getHttpsConfig.js +0 -74
  487. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/babelTransform.js +0 -37
  488. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/cssTransform.js +0 -22
  489. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/fileTransform.js +0 -40
  490. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/modules.js +0 -142
  491. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/paths.js +0 -153
  492. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
  493. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack.config.js +0 -796
  494. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpackDevServer.config.js +0 -135
  495. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/build.js +0 -225
  496. package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/eject.js +0 -340
@@ -1,980 +1,1045 @@
1
1
  // SPARC Coordinator
2
2
  // Integrates SPARC methodology with swarm system for enhanced coordination
3
+
4
+ import { SparcPhase } from './phase-base.js';
5
+
3
6
  export class SparcCoordinator {
4
- /**
7
+ constructor(phases, options = {}) {
8
+ this.phases = phases;
9
+ this.options = options;
10
+ this.swarmId = null;
11
+ this.agents = [];
12
+ this.phaseAgents = new Map();
13
+ this.coordination = {
14
+ strategy: 'adaptive',
15
+ topology: 'hierarchical',
16
+ communication: 'event-driven',
17
+ loadBalancing: 'capability-based',
18
+ };
19
+ this.metrics = {
20
+ phaseExecutions: 0,
21
+ agentUtilization: {},
22
+ coordinationEfficiency: 0,
23
+ qualityGates: [],
24
+ learningData: [],
25
+ };
26
+ this.neuralContext = null;
27
+ this.swarmEnabled = options.swarmEnabled || false;
28
+ }
29
+
30
+ /**
5
31
  * Initialize swarm for SPARC execution
6
- */ async initializeSwarm() {
7
- if (!this.swarmEnabled) {
8
- console.log('🔄 SPARC running in standalone mode');
9
- return;
10
- }
11
- console.log('🐝 Initializing SPARC Swarm Coordination');
12
- try {
13
- // Initialize swarm using ruv-swarm hooks
14
- const swarmConfig = {
15
- topology: this.coordination.topology,
16
- maxAgents: this.calculateOptimalAgentCount(),
17
- strategy: 'sparc_methodology',
18
- communication: this.coordination.communication,
19
- loadBalancing: this.coordination.loadBalancing
20
- };
21
- this.swarmId = await this.executeSwarmHook('swarm_init', swarmConfig);
22
- console.log(`🆔 Swarm initialized: ${this.swarmId}`);
23
- // Spawn specialized SPARC agents
24
- await this.spawnSparcAgents();
25
- // Setup inter-phase coordination
26
- await this.setupPhaseCoordination();
27
- console.log('✅ SPARC Swarm coordination initialized');
28
- } catch (error) {
29
- console.warn(`⚠️ Swarm initialization failed: ${error.message}`);
30
- console.log('🔄 Falling back to standalone mode');
31
- this.swarmEnabled = false;
32
- }
32
+ */
33
+ async initializeSwarm() {
34
+ if (!this.swarmEnabled) {
35
+ console.log('🔄 SPARC running in standalone mode');
36
+ return;
33
37
  }
34
- /**
35
- * Calculate optimal agent count based on SPARC phases
36
- */ calculateOptimalAgentCount() {
37
- const baseAgents = Object.keys(this.phases).length; // One per phase
38
- const complexityMultiplier = this.assessTaskComplexity();
39
- const parallelismFactor = this.options.parallelExecution ? 2 : 1;
40
- return Math.min(20, Math.max(5, baseAgents * complexityMultiplier * parallelismFactor));
38
+
39
+ console.log('🐝 Initializing SPARC Swarm Coordination');
40
+
41
+ try {
42
+ // Initialize swarm using ruv-swarm hooks
43
+ const swarmConfig = {
44
+ topology: this.coordination.topology,
45
+ maxAgents: this.calculateOptimalAgentCount(),
46
+ strategy: 'sparc_methodology',
47
+ communication: this.coordination.communication,
48
+ loadBalancing: this.coordination.loadBalancing,
49
+ };
50
+
51
+ this.swarmId = await this.executeSwarmHook('swarm_init', swarmConfig);
52
+ console.log(`🆔 Swarm initialized: ${this.swarmId}`);
53
+
54
+ // Spawn specialized SPARC agents
55
+ await this.spawnSparcAgents();
56
+
57
+ // Setup inter-phase coordination
58
+ await this.setupPhaseCoordination();
59
+
60
+ console.log('✅ SPARC Swarm coordination initialized');
61
+ } catch (error) {
62
+ console.warn(`⚠️ Swarm initialization failed: ${error.message}`);
63
+ console.log('🔄 Falling back to standalone mode');
64
+ this.swarmEnabled = false;
41
65
  }
42
- /**
66
+ }
67
+
68
+ /**
69
+ * Calculate optimal agent count based on SPARC phases
70
+ */
71
+ calculateOptimalAgentCount() {
72
+ const baseAgents = Object.keys(this.phases).length; // One per phase
73
+ const complexityMultiplier = this.assessTaskComplexity();
74
+ const parallelismFactor = this.options.parallelExecution ? 2 : 1;
75
+
76
+ return Math.min(20, Math.max(5, baseAgents * complexityMultiplier * parallelismFactor));
77
+ }
78
+
79
+ /**
43
80
  * Assess task complexity for agent allocation
44
- */ assessTaskComplexity() {
45
- const taskDescription = this.options.taskDescription || '';
46
- const complexityKeywords = [
47
- 'complex',
48
- 'enterprise',
49
- 'scalable',
50
- 'distributed',
51
- 'microservice',
52
- 'integration'
53
- ];
54
- const matchedKeywords = complexityKeywords.filter((keyword)=>taskDescription.toLowerCase().includes(keyword));
55
- if (matchedKeywords.length >= 3) return 3; // High complexity
56
- if (matchedKeywords.length >= 1) return 2; // Medium complexity
57
- return 1; // Low complexity
58
- }
59
- /**
81
+ */
82
+ assessTaskComplexity() {
83
+ const taskDescription = this.options.taskDescription || '';
84
+ const complexityKeywords = [
85
+ 'complex',
86
+ 'enterprise',
87
+ 'scalable',
88
+ 'distributed',
89
+ 'microservice',
90
+ 'integration',
91
+ ];
92
+ const matchedKeywords = complexityKeywords.filter((keyword) =>
93
+ taskDescription.toLowerCase().includes(keyword),
94
+ );
95
+
96
+ if (matchedKeywords.length >= 3) return 3; // High complexity
97
+ if (matchedKeywords.length >= 1) return 2; // Medium complexity
98
+ return 1; // Low complexity
99
+ }
100
+
101
+ /**
60
102
  * Spawn specialized SPARC agents
61
- */ async spawnSparcAgents() {
62
- const agentTypes = [
63
- {
64
- type: 'sparc_specification',
65
- role: 'Requirements Analyst',
66
- capabilities: [
67
- 'analysis',
68
- 'documentation',
69
- 'validation'
70
- ]
71
- },
72
- {
73
- type: 'sparc_pseudocode',
74
- role: 'Logic Designer',
75
- capabilities: [
76
- 'design',
77
- 'flowcharts',
78
- 'algorithms'
79
- ]
80
- },
81
- {
82
- type: 'sparc_architecture',
83
- role: 'System Architect',
84
- capabilities: [
85
- 'architecture',
86
- 'design_patterns',
87
- 'scalability'
88
- ]
89
- },
90
- {
91
- type: 'sparc_refinement',
92
- role: 'TDD Engineer',
93
- capabilities: [
94
- 'testing',
95
- 'refactoring',
96
- 'code_quality'
97
- ]
98
- },
99
- {
100
- type: 'sparc_completion',
101
- role: 'Integration Specialist',
102
- capabilities: [
103
- 'integration',
104
- 'deployment',
105
- 'validation'
106
- ]
107
- },
108
- {
109
- type: 'sparc_coordinator',
110
- role: 'SPARC Orchestrator',
111
- capabilities: [
112
- 'coordination',
113
- 'monitoring',
114
- 'optimization'
115
- ]
116
- }
117
- ];
118
- for (const agentSpec of agentTypes){
119
- try {
120
- const agentId = await this.executeSwarmHook('agent_spawn', {
121
- type: agentSpec.type,
122
- role: agentSpec.role,
123
- capabilities: agentSpec.capabilities,
124
- maxConcurrentTasks: this.getAgentConcurrency(agentSpec.type),
125
- specialization: 'sparc_methodology'
126
- });
127
- const agent = {
128
- id: agentId,
129
- type: agentSpec.type,
130
- role: agentSpec.role,
131
- capabilities: agentSpec.capabilities,
132
- status: 'ready',
133
- currentPhase: null,
134
- assignedTasks: [],
135
- performance: {
136
- tasksCompleted: 0,
137
- averageTime: 0,
138
- qualityScore: 1.0,
139
- efficiency: 1.0
140
- }
141
- };
142
- this.agents.push(agent);
143
- console.log(` 🤖 Spawned ${agentSpec.role} (${agentSpec.type})`);
144
- } catch (error) {
145
- console.warn(`⚠️ Failed to spawn ${agentSpec.role}: ${error.message}`);
146
- }
147
- }
148
- }
149
- /**
150
- * Get agent concurrency based on type
151
- */ getAgentConcurrency(agentType) {
152
- const concurrencyMap = {
153
- sparc_specification: 2,
154
- sparc_pseudocode: 1,
155
- sparc_architecture: 3,
156
- sparc_refinement: 4,
157
- sparc_completion: 2,
158
- sparc_coordinator: 1
103
+ */
104
+ async spawnSparcAgents() {
105
+ const agentTypes = [
106
+ {
107
+ type: 'sparc_specification',
108
+ role: 'Requirements Analyst',
109
+ capabilities: ['analysis', 'documentation', 'validation'],
110
+ },
111
+ {
112
+ type: 'sparc_pseudocode',
113
+ role: 'Logic Designer',
114
+ capabilities: ['design', 'flowcharts', 'algorithms'],
115
+ },
116
+ {
117
+ type: 'sparc_architecture',
118
+ role: 'System Architect',
119
+ capabilities: ['architecture', 'design_patterns', 'scalability'],
120
+ },
121
+ {
122
+ type: 'sparc_refinement',
123
+ role: 'TDD Engineer',
124
+ capabilities: ['testing', 'refactoring', 'code_quality'],
125
+ },
126
+ {
127
+ type: 'sparc_completion',
128
+ role: 'Integration Specialist',
129
+ capabilities: ['integration', 'deployment', 'validation'],
130
+ },
131
+ {
132
+ type: 'sparc_coordinator',
133
+ role: 'SPARC Orchestrator',
134
+ capabilities: ['coordination', 'monitoring', 'optimization'],
135
+ },
136
+ ];
137
+
138
+ for (const agentSpec of agentTypes) {
139
+ try {
140
+ const agentId = await this.executeSwarmHook('agent_spawn', {
141
+ type: agentSpec.type,
142
+ role: agentSpec.role,
143
+ capabilities: agentSpec.capabilities,
144
+ maxConcurrentTasks: this.getAgentConcurrency(agentSpec.type),
145
+ specialization: 'sparc_methodology',
146
+ });
147
+
148
+ const agent = {
149
+ id: agentId,
150
+ type: agentSpec.type,
151
+ role: agentSpec.role,
152
+ capabilities: agentSpec.capabilities,
153
+ status: 'ready',
154
+ currentPhase: null,
155
+ assignedTasks: [],
156
+ performance: {
157
+ tasksCompleted: 0,
158
+ averageTime: 0,
159
+ qualityScore: 1.0,
160
+ efficiency: 1.0,
161
+ },
159
162
  };
160
- return concurrencyMap[agentType] || 2;
163
+
164
+ this.agents.push(agent);
165
+ console.log(` 🤖 Spawned ${agentSpec.role} (${agentSpec.type})`);
166
+ } catch (error) {
167
+ console.warn(`⚠️ Failed to spawn ${agentSpec.role}: ${error.message}`);
168
+ }
161
169
  }
162
- /**
170
+ }
171
+
172
+ /**
173
+ * Get agent concurrency based on type
174
+ */
175
+ getAgentConcurrency(agentType) {
176
+ const concurrencyMap = {
177
+ sparc_specification: 2,
178
+ sparc_pseudocode: 1,
179
+ sparc_architecture: 3,
180
+ sparc_refinement: 4,
181
+ sparc_completion: 2,
182
+ sparc_coordinator: 1,
183
+ };
184
+
185
+ return concurrencyMap[agentType] || 2;
186
+ }
187
+
188
+ /**
163
189
  * Setup phase coordination
164
- */ async setupPhaseCoordination() {
165
- // Map agents to phases
166
- for (const agent of this.agents){
167
- const phaseName = agent.type.replace('sparc_', '');
168
- if (this.phases[phaseName]) {
169
- if (!this.phaseAgents.has(phaseName)) {
170
- this.phaseAgents.set(phaseName, []);
171
- }
172
- this.phaseAgents.get(phaseName).push(agent);
173
- }
190
+ */
191
+ async setupPhaseCoordination() {
192
+ // Map agents to phases
193
+ for (const agent of this.agents) {
194
+ const phaseName = agent.type.replace('sparc_', '');
195
+ if (this.phases[phaseName]) {
196
+ if (!this.phaseAgents.has(phaseName)) {
197
+ this.phaseAgents.set(phaseName, []);
174
198
  }
175
- // Setup phase dependencies
176
- await this.executeSwarmHook('setup_dependencies', {
177
- phases: Object.keys(this.phases),
178
- dependencies: {
179
- pseudocode: [
180
- 'specification'
181
- ],
182
- architecture: [
183
- 'specification',
184
- 'pseudocode'
185
- ],
186
- refinement: [
187
- 'specification',
188
- 'pseudocode',
189
- 'architecture'
190
- ],
191
- completion: [
192
- 'specification',
193
- 'pseudocode',
194
- 'architecture',
195
- 'refinement'
196
- ]
197
- }
198
- });
199
- // Setup quality gates between phases
200
- await this.setupQualityGates();
199
+ this.phaseAgents.get(phaseName).push(agent);
200
+ }
201
201
  }
202
- /**
202
+
203
+ // Setup phase dependencies
204
+ await this.executeSwarmHook('setup_dependencies', {
205
+ phases: Object.keys(this.phases),
206
+ dependencies: {
207
+ pseudocode: ['specification'],
208
+ architecture: ['specification', 'pseudocode'],
209
+ refinement: ['specification', 'pseudocode', 'architecture'],
210
+ completion: ['specification', 'pseudocode', 'architecture', 'refinement'],
211
+ },
212
+ });
213
+
214
+ // Setup quality gates between phases
215
+ await this.setupQualityGates();
216
+ }
217
+
218
+ /**
203
219
  * Setup quality gates between phases
204
- */ async setupQualityGates() {
205
- const qualityGates = [
206
- {
207
- phase: 'specification',
208
- criteria: [
209
- 'requirements_complete',
210
- 'acceptance_criteria_defined'
211
- ],
212
- threshold: 0.9
213
- },
214
- {
215
- phase: 'pseudocode',
216
- criteria: [
217
- 'flow_diagram_complete',
218
- 'algorithms_defined'
219
- ],
220
- threshold: 0.85
221
- },
222
- {
223
- phase: 'architecture',
224
- criteria: [
225
- 'components_defined',
226
- 'patterns_selected'
227
- ],
228
- threshold: 0.85
229
- },
230
- {
231
- phase: 'refinement',
232
- criteria: [
233
- 'tests_passing',
234
- 'code_quality_acceptable'
235
- ],
236
- threshold: 0.8
237
- },
238
- {
239
- phase: 'completion',
240
- criteria: [
241
- 'validation_passed',
242
- 'deployment_successful'
243
- ],
244
- threshold: 0.9
245
- }
246
- ];
247
- for (const gate of qualityGates){
248
- await this.executeSwarmHook('register_quality_gate', gate);
249
- }
220
+ */
221
+ async setupQualityGates() {
222
+ const qualityGates = [
223
+ {
224
+ phase: 'specification',
225
+ criteria: ['requirements_complete', 'acceptance_criteria_defined'],
226
+ threshold: 0.9,
227
+ },
228
+ {
229
+ phase: 'pseudocode',
230
+ criteria: ['flow_diagram_complete', 'algorithms_defined'],
231
+ threshold: 0.85,
232
+ },
233
+ {
234
+ phase: 'architecture',
235
+ criteria: ['components_defined', 'patterns_selected'],
236
+ threshold: 0.85,
237
+ },
238
+ {
239
+ phase: 'refinement',
240
+ criteria: ['tests_passing', 'code_quality_acceptable'],
241
+ threshold: 0.8,
242
+ },
243
+ {
244
+ phase: 'completion',
245
+ criteria: ['validation_passed', 'deployment_successful'],
246
+ threshold: 0.9,
247
+ },
248
+ ];
249
+
250
+ for (const gate of qualityGates) {
251
+ await this.executeSwarmHook('register_quality_gate', gate);
250
252
  }
251
- /**
253
+ }
254
+
255
+ /**
252
256
  * Pre-phase coordination
253
- */ async prePhase(phaseName) {
254
- if (!this.swarmEnabled) return;
255
- console.log(`🔄 Pre-phase coordination: ${phaseName}`);
256
- try {
257
- // Load neural context for the phase
258
- await this.loadNeuralContext(phaseName);
259
- // Assign agents to phase
260
- await this.assignAgentsToPhase(phaseName);
261
- // Prepare phase environment
262
- await this.preparePhaseEnvironment(phaseName);
263
- // Store phase initiation in memory
264
- await this.executeSwarmHook('memory_store', {
265
- key: `sparc_phase_${phaseName}_start`,
266
- value: {
267
- timestamp: Date.now(),
268
- agents: this.phaseAgents.get(phaseName)?.map((a)=>a.id) || [],
269
- neuralContext: this.neuralContext
270
- }
271
- });
272
- } catch (error) {
273
- console.warn(`⚠️ Pre-phase coordination failed for ${phaseName}: ${error.message}`);
274
- }
257
+ */
258
+ async prePhase(phaseName) {
259
+ if (!this.swarmEnabled) return;
260
+
261
+ console.log(`🔄 Pre-phase coordination: ${phaseName}`);
262
+
263
+ try {
264
+ // Load neural context for the phase
265
+ await this.loadNeuralContext(phaseName);
266
+
267
+ // Assign agents to phase
268
+ await this.assignAgentsToPhase(phaseName);
269
+
270
+ // Prepare phase environment
271
+ await this.preparePhaseEnvironment(phaseName);
272
+
273
+ // Store phase initiation in memory
274
+ await this.executeSwarmHook('memory_store', {
275
+ key: `sparc_phase_${phaseName}_start`,
276
+ value: {
277
+ timestamp: Date.now(),
278
+ agents: this.phaseAgents.get(phaseName)?.map((a) => a.id) || [],
279
+ neuralContext: this.neuralContext,
280
+ },
281
+ });
282
+ } catch (error) {
283
+ console.warn(`⚠️ Pre-phase coordination failed for ${phaseName}: ${error.message}`);
275
284
  }
276
- /**
285
+ }
286
+
287
+ /**
277
288
  * Load neural context for phase
278
- */ async loadNeuralContext(phaseName) {
279
- try {
280
- const neuralData = await this.executeSwarmHook('neural_load_context', {
281
- phase: phaseName,
282
- methodology: 'sparc',
283
- taskType: this.classifyTaskType()
284
- });
285
- this.neuralContext = {
286
- phase: phaseName,
287
- patterns: neuralData.patterns || [],
288
- insights: neuralData.insights || [],
289
- recommendations: neuralData.recommendations || [],
290
- confidence: neuralData.confidence || 0.5
291
- };
292
- console.log(`🧠 Neural context loaded for ${phaseName} (confidence: ${this.neuralContext.confidence.toFixed(2)})`);
293
- } catch (error) {
294
- console.warn(`⚠️ Neural context loading failed: ${error.message}`);
295
- this.neuralContext = {
296
- phase: phaseName,
297
- patterns: [],
298
- insights: [],
299
- recommendations: [],
300
- confidence: 0.5
301
- };
302
- }
289
+ */
290
+ async loadNeuralContext(phaseName) {
291
+ try {
292
+ const neuralData = await this.executeSwarmHook('neural_load_context', {
293
+ phase: phaseName,
294
+ methodology: 'sparc',
295
+ taskType: this.classifyTaskType(),
296
+ });
297
+
298
+ this.neuralContext = {
299
+ phase: phaseName,
300
+ patterns: neuralData.patterns || [],
301
+ insights: neuralData.insights || [],
302
+ recommendations: neuralData.recommendations || [],
303
+ confidence: neuralData.confidence || 0.5,
304
+ };
305
+
306
+ console.log(
307
+ `🧠 Neural context loaded for ${phaseName} (confidence: ${this.neuralContext.confidence.toFixed(2)})`,
308
+ );
309
+ } catch (error) {
310
+ console.warn(`⚠️ Neural context loading failed: ${error.message}`);
311
+ this.neuralContext = {
312
+ phase: phaseName,
313
+ patterns: [],
314
+ insights: [],
315
+ recommendations: [],
316
+ confidence: 0.5,
317
+ };
303
318
  }
304
- /**
319
+ }
320
+
321
+ /**
305
322
  * Classify task type for neural learning
306
- */ classifyTaskType() {
307
- const taskDescription = this.options.taskDescription || '';
308
- const taskLower = taskDescription.toLowerCase();
309
- if (taskLower.includes('api') || taskLower.includes('service')) return 'api_development';
310
- if (taskLower.includes('ui') || taskLower.includes('frontend')) return 'frontend_development';
311
- if (taskLower.includes('data') || taskLower.includes('database')) return 'data_management';
312
- if (taskLower.includes('test') || taskLower.includes('testing')) return 'testing';
313
- if (taskLower.includes('deploy') || taskLower.includes('infrastructure')) return 'deployment';
314
- return 'general_development';
315
- }
316
- /**
323
+ */
324
+ classifyTaskType() {
325
+ const taskDescription = this.options.taskDescription || '';
326
+ const taskLower = taskDescription.toLowerCase();
327
+
328
+ if (taskLower.includes('api') || taskLower.includes('service')) return 'api_development';
329
+ if (taskLower.includes('ui') || taskLower.includes('frontend')) return 'frontend_development';
330
+ if (taskLower.includes('data') || taskLower.includes('database')) return 'data_management';
331
+ if (taskLower.includes('test') || taskLower.includes('testing')) return 'testing';
332
+ if (taskLower.includes('deploy') || taskLower.includes('infrastructure')) return 'deployment';
333
+
334
+ return 'general_development';
335
+ }
336
+
337
+ /**
317
338
  * Assign agents to phase
318
- */ async assignAgentsToPhase(phaseName) {
319
- const phaseAgents = this.phaseAgents.get(phaseName) || [];
320
- for (const agent of phaseAgents){
321
- agent.currentPhase = phaseName;
322
- agent.status = 'assigned';
323
- await this.executeSwarmHook('agent_assign', {
324
- agentId: agent.id,
325
- phase: phaseName,
326
- priority: this.getPhasePriority(phaseName),
327
- context: this.neuralContext
328
- });
329
- }
330
- // If no dedicated agents, assign general coordinator
331
- if (phaseAgents.length === 0) {
332
- const coordinator = this.agents.find((a)=>a.type === 'sparc_coordinator');
333
- if (coordinator) {
334
- coordinator.currentPhase = phaseName;
335
- coordinator.status = 'assigned';
336
- await this.executeSwarmHook('agent_assign', {
337
- agentId: coordinator.id,
338
- phase: phaseName,
339
- priority: this.getPhasePriority(phaseName),
340
- context: this.neuralContext
341
- });
342
- }
343
- }
339
+ */
340
+ async assignAgentsToPhase(phaseName) {
341
+ const phaseAgents = this.phaseAgents.get(phaseName) || [];
342
+
343
+ for (const agent of phaseAgents) {
344
+ agent.currentPhase = phaseName;
345
+ agent.status = 'assigned';
346
+
347
+ await this.executeSwarmHook('agent_assign', {
348
+ agentId: agent.id,
349
+ phase: phaseName,
350
+ priority: this.getPhasePriority(phaseName),
351
+ context: this.neuralContext,
352
+ });
344
353
  }
345
- /**
346
- * Get phase priority for scheduling
347
- */ getPhasePriority(phaseName) {
348
- const priorities = {
349
- specification: 5,
350
- pseudocode: 4,
351
- architecture: 4,
352
- refinement: 3,
353
- completion: 2
354
- };
355
- return priorities[phaseName] || 1;
354
+
355
+ // If no dedicated agents, assign general coordinator
356
+ if (phaseAgents.length === 0) {
357
+ const coordinator = this.agents.find((a) => a.type === 'sparc_coordinator');
358
+ if (coordinator) {
359
+ coordinator.currentPhase = phaseName;
360
+ coordinator.status = 'assigned';
361
+
362
+ await this.executeSwarmHook('agent_assign', {
363
+ agentId: coordinator.id,
364
+ phase: phaseName,
365
+ priority: this.getPhasePriority(phaseName),
366
+ context: this.neuralContext,
367
+ });
368
+ }
356
369
  }
357
- /**
370
+ }
371
+
372
+ /**
373
+ * Get phase priority for scheduling
374
+ */
375
+ getPhasePriority(phaseName) {
376
+ const priorities = {
377
+ specification: 5, // Highest priority
378
+ pseudocode: 4,
379
+ architecture: 4,
380
+ refinement: 3,
381
+ completion: 2,
382
+ };
383
+
384
+ return priorities[phaseName] || 1;
385
+ }
386
+
387
+ /**
358
388
  * Prepare phase environment
359
- */ async preparePhaseEnvironment(phaseName) {
360
- // Create phase-specific workspace
361
- await this.executeSwarmHook('create_workspace', {
362
- phase: phaseName,
363
- namespace: this.options.namespace || 'sparc',
364
- isolation: true
365
- });
366
- // Load previous phase artifacts
367
- const dependencies = this.getPhaseDependencies(phaseName);
368
- for (const dependency of dependencies){
369
- await this.executeSwarmHook('load_artifacts', {
370
- fromPhase: dependency,
371
- toPhase: phaseName,
372
- artifactTypes: [
373
- 'outputs',
374
- 'decisions',
375
- 'validations'
376
- ]
377
- });
378
- }
389
+ */
390
+ async preparePhaseEnvironment(phaseName) {
391
+ // Create phase-specific workspace
392
+ await this.executeSwarmHook('create_workspace', {
393
+ phase: phaseName,
394
+ namespace: this.options.namespace || 'sparc',
395
+ isolation: true,
396
+ });
397
+
398
+ // Load previous phase artifacts
399
+ const dependencies = this.getPhaseDependencies(phaseName);
400
+ for (const dependency of dependencies) {
401
+ await this.executeSwarmHook('load_artifacts', {
402
+ fromPhase: dependency,
403
+ toPhase: phaseName,
404
+ artifactTypes: ['outputs', 'decisions', 'validations'],
405
+ });
379
406
  }
380
- /**
407
+ }
408
+
409
+ /**
381
410
  * Get phase dependencies
382
- */ getPhaseDependencies(phaseName) {
383
- const dependencies = {
384
- specification: [],
385
- pseudocode: [
386
- 'specification'
387
- ],
388
- architecture: [
389
- 'specification',
390
- 'pseudocode'
391
- ],
392
- refinement: [
393
- 'specification',
394
- 'pseudocode',
395
- 'architecture'
396
- ],
397
- completion: [
398
- 'specification',
399
- 'pseudocode',
400
- 'architecture',
401
- 'refinement'
402
- ]
403
- };
404
- return dependencies[phaseName] || [];
405
- }
406
- /**
411
+ */
412
+ getPhaseDependencies(phaseName) {
413
+ const dependencies = {
414
+ specification: [],
415
+ pseudocode: ['specification'],
416
+ architecture: ['specification', 'pseudocode'],
417
+ refinement: ['specification', 'pseudocode', 'architecture'],
418
+ completion: ['specification', 'pseudocode', 'architecture', 'refinement'],
419
+ };
420
+
421
+ return dependencies[phaseName] || [];
422
+ }
423
+
424
+ /**
407
425
  * Post-phase coordination
408
- */ async postPhase(phaseName, result) {
409
- if (!this.swarmEnabled) return;
410
- console.log(`✅ Post-phase coordination: ${phaseName}`);
411
- try {
412
- // Validate phase results
413
- const validation = await this.validatePhaseResults(phaseName, result);
414
- // Update agent performance
415
- await this.updateAgentPerformance(phaseName, result, validation);
416
- // Store phase completion in memory
417
- await this.executeSwarmHook('memory_store', {
418
- key: `sparc_phase_${phaseName}_complete`,
419
- value: {
420
- timestamp: Date.now(),
421
- result: result,
422
- validation: validation,
423
- agents: this.phaseAgents.get(phaseName)?.map((a)=>({
424
- id: a.id,
425
- performance: a.performance
426
- })) || []
427
- }
428
- });
429
- // Neural learning from phase execution
430
- if (this.options.neuralLearning) {
431
- await this.recordNeuralLearning(phaseName, result, validation);
432
- }
433
- // Prepare handoff to next phase
434
- await this.preparePhaseHandoff(phaseName, result);
435
- // Update metrics
436
- this.updateCoordinationMetrics(phaseName, result, validation);
437
- } catch (error) {
438
- console.warn(`⚠️ Post-phase coordination failed for ${phaseName}: ${error.message}`);
439
- }
426
+ */
427
+ async postPhase(phaseName, result) {
428
+ if (!this.swarmEnabled) return;
429
+
430
+ console.log(`✅ Post-phase coordination: ${phaseName}`);
431
+
432
+ try {
433
+ // Validate phase results
434
+ const validation = await this.validatePhaseResults(phaseName, result);
435
+
436
+ // Update agent performance
437
+ await this.updateAgentPerformance(phaseName, result, validation);
438
+
439
+ // Store phase completion in memory
440
+ await this.executeSwarmHook('memory_store', {
441
+ key: `sparc_phase_${phaseName}_complete`,
442
+ value: {
443
+ timestamp: Date.now(),
444
+ result: result,
445
+ validation: validation,
446
+ agents:
447
+ this.phaseAgents.get(phaseName)?.map((a) => ({
448
+ id: a.id,
449
+ performance: a.performance,
450
+ })) || [],
451
+ },
452
+ });
453
+
454
+ // Neural learning from phase execution
455
+ if (this.options.neuralLearning) {
456
+ await this.recordNeuralLearning(phaseName, result, validation);
457
+ }
458
+
459
+ // Prepare handoff to next phase
460
+ await this.preparePhaseHandoff(phaseName, result);
461
+
462
+ // Update metrics
463
+ this.updateCoordinationMetrics(phaseName, result, validation);
464
+ } catch (error) {
465
+ console.warn(`⚠️ Post-phase coordination failed for ${phaseName}: ${error.message}`);
440
466
  }
441
- /**
467
+ }
468
+
469
+ /**
442
470
  * Validate phase results
443
- */ async validatePhaseResults(phaseName, result) {
444
- const validation = {
445
- phase: phaseName,
446
- passed: true,
447
- score: 0,
448
- issues: [],
449
- recommendations: []
450
- };
451
- try {
452
- // Execute swarm-based validation
453
- const swarmValidation = await this.executeSwarmHook('validate_phase', {
454
- phase: phaseName,
455
- result: result,
456
- criteria: this.getValidationCriteria(phaseName)
457
- });
458
- validation.passed = swarmValidation.passed;
459
- validation.score = swarmValidation.score;
460
- validation.issues = swarmValidation.issues || [];
461
- validation.recommendations = swarmValidation.recommendations || [];
462
- } catch (error) {
463
- console.warn(`⚠️ Swarm validation failed: ${error.message}`);
464
- // Fallback to basic validation
465
- validation.passed = !!result;
466
- validation.score = result ? 85 : 0;
467
- }
468
- return validation;
471
+ */
472
+ async validatePhaseResults(phaseName, result) {
473
+ const validation = {
474
+ phase: phaseName,
475
+ passed: true,
476
+ score: 0,
477
+ issues: [],
478
+ recommendations: [],
479
+ };
480
+
481
+ try {
482
+ // Execute swarm-based validation
483
+ const swarmValidation = await this.executeSwarmHook('validate_phase', {
484
+ phase: phaseName,
485
+ result: result,
486
+ criteria: this.getValidationCriteria(phaseName),
487
+ });
488
+
489
+ validation.passed = swarmValidation.passed;
490
+ validation.score = swarmValidation.score;
491
+ validation.issues = swarmValidation.issues || [];
492
+ validation.recommendations = swarmValidation.recommendations || [];
493
+ } catch (error) {
494
+ console.warn(`⚠️ Swarm validation failed: ${error.message}`);
495
+ // Fallback to basic validation
496
+ validation.passed = !!result;
497
+ validation.score = result ? 85 : 0;
469
498
  }
470
- /**
499
+
500
+ return validation;
501
+ }
502
+
503
+ /**
471
504
  * Get validation criteria for phase
472
- */ getValidationCriteria(phaseName) {
473
- const criteria = {
474
- specification: {
475
- requiredFields: [
476
- 'requirements',
477
- 'acceptanceCriteria',
478
- 'userStories'
479
- ],
480
- qualityThresholds: {
481
- completeness: 0.9,
482
- clarity: 0.8
483
- }
484
- },
485
- pseudocode: {
486
- requiredFields: [
487
- 'flowDiagram',
488
- 'pseudocode',
489
- 'algorithms'
490
- ],
491
- qualityThresholds: {
492
- completeness: 0.85,
493
- complexity: 0.7
494
- }
495
- },
496
- architecture: {
497
- requiredFields: [
498
- 'systemDesign',
499
- 'components',
500
- 'designPatterns'
501
- ],
502
- qualityThresholds: {
503
- modularity: 0.8,
504
- scalability: 0.75
505
- }
506
- },
507
- refinement: {
508
- requiredFields: [
509
- 'testResults',
510
- 'codeQuality',
511
- 'implementations'
512
- ],
513
- qualityThresholds: {
514
- testCoverage: 0.8,
515
- codeQuality: 0.75
516
- }
517
- },
518
- completion: {
519
- requiredFields: [
520
- 'validation',
521
- 'deployment',
522
- 'documentation'
523
- ],
524
- qualityThresholds: {
525
- completeness: 0.9,
526
- readiness: 0.85
527
- }
528
- }
529
- };
530
- return criteria[phaseName] || {
531
- requiredFields: [],
532
- qualityThresholds: {}
533
- };
534
- }
535
- /**
505
+ */
506
+ getValidationCriteria(phaseName) {
507
+ const criteria = {
508
+ specification: {
509
+ requiredFields: ['requirements', 'acceptanceCriteria', 'userStories'],
510
+ qualityThresholds: { completeness: 0.9, clarity: 0.8 },
511
+ },
512
+ pseudocode: {
513
+ requiredFields: ['flowDiagram', 'pseudocode', 'algorithms'],
514
+ qualityThresholds: { completeness: 0.85, complexity: 0.7 },
515
+ },
516
+ architecture: {
517
+ requiredFields: ['systemDesign', 'components', 'designPatterns'],
518
+ qualityThresholds: { modularity: 0.8, scalability: 0.75 },
519
+ },
520
+ refinement: {
521
+ requiredFields: ['testResults', 'codeQuality', 'implementations'],
522
+ qualityThresholds: { testCoverage: 0.8, codeQuality: 0.75 },
523
+ },
524
+ completion: {
525
+ requiredFields: ['validation', 'deployment', 'documentation'],
526
+ qualityThresholds: { completeness: 0.9, readiness: 0.85 },
527
+ },
528
+ };
529
+
530
+ return criteria[phaseName] || { requiredFields: [], qualityThresholds: {} };
531
+ }
532
+
533
+ /**
536
534
  * Update agent performance metrics
537
- */ async updateAgentPerformance(phaseName, result, validation) {
538
- const phaseAgents = this.phaseAgents.get(phaseName) || [];
539
- for (const agent of phaseAgents){
540
- agent.performance.tasksCompleted += 1;
541
- // Update quality score based on validation
542
- const qualityScore = validation.score / 100;
543
- agent.performance.qualityScore = (agent.performance.qualityScore + qualityScore) / 2;
544
- // Update efficiency based on execution time
545
- const executionTime = Date.now() - this.getPhaseStartTime(phaseName);
546
- const expectedTime = this.getExpectedPhaseTime(phaseName);
547
- const efficiency = Math.min(1, expectedTime / executionTime);
548
- agent.performance.efficiency = (agent.performance.efficiency + efficiency) / 2;
549
- // Update average time
550
- agent.performance.averageTime = (agent.performance.averageTime + executionTime) / 2;
551
- // Store performance update
552
- await this.executeSwarmHook('update_agent_performance', {
553
- agentId: agent.id,
554
- performance: agent.performance,
555
- phase: phaseName
556
- });
557
- }
535
+ */
536
+ async updateAgentPerformance(phaseName, result, validation) {
537
+ const phaseAgents = this.phaseAgents.get(phaseName) || [];
538
+
539
+ for (const agent of phaseAgents) {
540
+ agent.performance.tasksCompleted += 1;
541
+
542
+ // Update quality score based on validation
543
+ const qualityScore = validation.score / 100;
544
+ agent.performance.qualityScore = (agent.performance.qualityScore + qualityScore) / 2;
545
+
546
+ // Update efficiency based on execution time
547
+ const executionTime = Date.now() - this.getPhaseStartTime(phaseName);
548
+ const expectedTime = this.getExpectedPhaseTime(phaseName);
549
+ const efficiency = Math.min(1, expectedTime / executionTime);
550
+ agent.performance.efficiency = (agent.performance.efficiency + efficiency) / 2;
551
+
552
+ // Update average time
553
+ agent.performance.averageTime = (agent.performance.averageTime + executionTime) / 2;
554
+
555
+ // Store performance update
556
+ await this.executeSwarmHook('update_agent_performance', {
557
+ agentId: agent.id,
558
+ performance: agent.performance,
559
+ phase: phaseName,
560
+ });
558
561
  }
559
- /**
562
+ }
563
+
564
+ /**
560
565
  * Get phase start time
561
- */ getPhaseStartTime(phaseName) {
562
- // This would typically be stored in memory or agent state
563
- return Date.now() - 5 * 60 * 1000; // Default to 5 minutes ago
564
- }
565
- /**
566
+ */
567
+ getPhaseStartTime(phaseName) {
568
+ // This would typically be stored in memory or agent state
569
+ return Date.now() - 5 * 60 * 1000; // Default to 5 minutes ago
570
+ }
571
+
572
+ /**
566
573
  * Get expected phase execution time
567
- */ getExpectedPhaseTime(phaseName) {
568
- const expectedTimes = {
569
- specification: 10 * 60 * 1000,
570
- pseudocode: 5 * 60 * 1000,
571
- architecture: 15 * 60 * 1000,
572
- refinement: 20 * 60 * 1000,
573
- completion: 10 * 60 * 1000
574
- };
575
- return expectedTimes[phaseName] || 10 * 60 * 1000;
576
- }
577
- /**
574
+ */
575
+ getExpectedPhaseTime(phaseName) {
576
+ const expectedTimes = {
577
+ specification: 10 * 60 * 1000, // 10 minutes
578
+ pseudocode: 5 * 60 * 1000, // 5 minutes
579
+ architecture: 15 * 60 * 1000, // 15 minutes
580
+ refinement: 20 * 60 * 1000, // 20 minutes
581
+ completion: 10 * 60 * 1000, // 10 minutes
582
+ };
583
+
584
+ return expectedTimes[phaseName] || 10 * 60 * 1000;
585
+ }
586
+
587
+ /**
578
588
  * Record neural learning from phase execution
579
- */ async recordNeuralLearning(phaseName, result, validation) {
580
- try {
581
- const learningData = {
582
- phase: phaseName,
583
- taskType: this.classifyTaskType(),
584
- methodology: 'sparc',
585
- execution: {
586
- result: result,
587
- validation: validation,
588
- timestamp: Date.now()
589
- },
590
- context: {
591
- taskDescription: this.options.taskDescription,
592
- neuralContext: this.neuralContext,
593
- agentPerformance: this.getAgentPerformanceData(phaseName)
594
- },
595
- outcomes: {
596
- success: validation.passed,
597
- quality: validation.score,
598
- efficiency: this.calculatePhaseEfficiency(phaseName),
599
- learnings: this.extractLearnings(phaseName, result, validation)
600
- }
601
- };
602
- await this.executeSwarmHook('neural_record_learning', learningData);
603
- // Train neural patterns based on this execution
604
- await this.executeSwarmHook('neural_train', {
605
- data: learningData,
606
- updateWeights: true,
607
- savePattern: true
608
- });
609
- console.log(`🧠 Neural learning recorded for ${phaseName}`);
610
- } catch (error) {
611
- console.warn(`⚠️ Neural learning failed: ${error.message}`);
612
- }
589
+ */
590
+ async recordNeuralLearning(phaseName, result, validation) {
591
+ try {
592
+ const learningData = {
593
+ phase: phaseName,
594
+ taskType: this.classifyTaskType(),
595
+ methodology: 'sparc',
596
+ execution: {
597
+ result: result,
598
+ validation: validation,
599
+ timestamp: Date.now(),
600
+ },
601
+ context: {
602
+ taskDescription: this.options.taskDescription,
603
+ neuralContext: this.neuralContext,
604
+ agentPerformance: this.getAgentPerformanceData(phaseName),
605
+ },
606
+ outcomes: {
607
+ success: validation.passed,
608
+ quality: validation.score,
609
+ efficiency: this.calculatePhaseEfficiency(phaseName),
610
+ learnings: this.extractLearnings(phaseName, result, validation),
611
+ },
612
+ };
613
+
614
+ await this.executeSwarmHook('neural_record_learning', learningData);
615
+
616
+ // Train neural patterns based on this execution
617
+ await this.executeSwarmHook('neural_train', {
618
+ data: learningData,
619
+ updateWeights: true,
620
+ savePattern: true,
621
+ });
622
+
623
+ console.log(`🧠 Neural learning recorded for ${phaseName}`);
624
+ } catch (error) {
625
+ console.warn(`⚠️ Neural learning failed: ${error.message}`);
613
626
  }
614
- /**
627
+ }
628
+
629
+ /**
615
630
  * Get agent performance data for phase
616
- */ getAgentPerformanceData(phaseName) {
617
- const phaseAgents = this.phaseAgents.get(phaseName) || [];
618
- return phaseAgents.map((agent)=>({
619
- id: agent.id,
620
- type: agent.type,
621
- performance: agent.performance
622
- }));
623
- }
624
- /**
631
+ */
632
+ getAgentPerformanceData(phaseName) {
633
+ const phaseAgents = this.phaseAgents.get(phaseName) || [];
634
+ return phaseAgents.map((agent) => ({
635
+ id: agent.id,
636
+ type: agent.type,
637
+ performance: agent.performance,
638
+ }));
639
+ }
640
+
641
+ /**
625
642
  * Calculate phase efficiency
626
- */ calculatePhaseEfficiency(phaseName) {
627
- const phaseAgents = this.phaseAgents.get(phaseName) || [];
628
- if (phaseAgents.length === 0) return 0.5;
629
- const avgEfficiency = phaseAgents.reduce((sum, agent)=>sum + agent.performance.efficiency, 0) / phaseAgents.length;
630
- return avgEfficiency;
631
- }
632
- /**
643
+ */
644
+ calculatePhaseEfficiency(phaseName) {
645
+ const phaseAgents = this.phaseAgents.get(phaseName) || [];
646
+ if (phaseAgents.length === 0) return 0.5;
647
+
648
+ const avgEfficiency =
649
+ phaseAgents.reduce((sum, agent) => sum + agent.performance.efficiency, 0) /
650
+ phaseAgents.length;
651
+ return avgEfficiency;
652
+ }
653
+
654
+ /**
633
655
  * Extract learnings from phase execution
634
- */ extractLearnings(phaseName, result, validation) {
635
- const learnings = [];
636
- if (validation.passed) {
637
- learnings.push(`${phaseName} phase executed successfully`);
638
- if (validation.score > 90) {
639
- learnings.push(`High quality output achieved in ${phaseName}`);
640
- }
641
- } else {
642
- learnings.push(`${phaseName} phase encountered issues: ${validation.issues.join(', ')}`);
643
- }
644
- if (validation.recommendations.length > 0) {
645
- learnings.push(`Recommendations for ${phaseName}: ${validation.recommendations.join(', ')}`);
646
- }
647
- return learnings;
656
+ */
657
+ extractLearnings(phaseName, result, validation) {
658
+ const learnings = [];
659
+
660
+ if (validation.passed) {
661
+ learnings.push(`${phaseName} phase executed successfully`);
662
+ if (validation.score > 90) {
663
+ learnings.push(`High quality output achieved in ${phaseName}`);
664
+ }
665
+ } else {
666
+ learnings.push(`${phaseName} phase encountered issues: ${validation.issues.join(', ')}`);
667
+ }
668
+
669
+ if (validation.recommendations.length > 0) {
670
+ learnings.push(`Recommendations for ${phaseName}: ${validation.recommendations.join(', ')}`);
648
671
  }
649
- /**
672
+
673
+ return learnings;
674
+ }
675
+
676
+ /**
650
677
  * Prepare handoff to next phase
651
- */ async preparePhaseHandoff(phaseName, result) {
652
- const nextPhase = this.getNextPhase(phaseName);
653
- if (!nextPhase) return;
654
- // Prepare artifacts for next phase
655
- await this.executeSwarmHook('prepare_handoff', {
656
- fromPhase: phaseName,
657
- toPhase: nextPhase,
658
- artifacts: {
659
- outputs: result,
660
- decisions: this.extractDecisions(result),
661
- context: this.neuralContext
662
- }
663
- });
664
- // Pre-warm next phase agents
665
- const nextPhaseAgents = this.phaseAgents.get(nextPhase) || [];
666
- for (const agent of nextPhaseAgents){
667
- await this.executeSwarmHook('agent_prewarm', {
668
- agentId: agent.id,
669
- phase: nextPhase,
670
- context: result
671
- });
672
- }
678
+ */
679
+ async preparePhaseHandoff(phaseName, result) {
680
+ const nextPhase = this.getNextPhase(phaseName);
681
+ if (!nextPhase) return;
682
+
683
+ // Prepare artifacts for next phase
684
+ await this.executeSwarmHook('prepare_handoff', {
685
+ fromPhase: phaseName,
686
+ toPhase: nextPhase,
687
+ artifacts: {
688
+ outputs: result,
689
+ decisions: this.extractDecisions(result),
690
+ context: this.neuralContext,
691
+ },
692
+ });
693
+
694
+ // Pre-warm next phase agents
695
+ const nextPhaseAgents = this.phaseAgents.get(nextPhase) || [];
696
+ for (const agent of nextPhaseAgents) {
697
+ await this.executeSwarmHook('agent_prewarm', {
698
+ agentId: agent.id,
699
+ phase: nextPhase,
700
+ context: result,
701
+ });
673
702
  }
674
- /**
703
+ }
704
+
705
+ /**
675
706
  * Get next phase in SPARC sequence
676
- */ getNextPhase(currentPhase) {
677
- const sequence = [
678
- 'specification',
679
- 'pseudocode',
680
- 'architecture',
681
- 'refinement',
682
- 'completion'
683
- ];
684
- const currentIndex = sequence.indexOf(currentPhase);
685
- return currentIndex >= 0 && currentIndex < sequence.length - 1 ? sequence[currentIndex + 1] : null;
686
- }
687
- /**
707
+ */
708
+ getNextPhase(currentPhase) {
709
+ const sequence = ['specification', 'pseudocode', 'architecture', 'refinement', 'completion'];
710
+ const currentIndex = sequence.indexOf(currentPhase);
711
+ return currentIndex >= 0 && currentIndex < sequence.length - 1
712
+ ? sequence[currentIndex + 1]
713
+ : null;
714
+ }
715
+
716
+ /**
688
717
  * Extract decisions from phase result
689
- */ extractDecisions(result) {
690
- const decisions = [];
691
- if (result.architecturalDecisions) {
692
- decisions.push(...result.architecturalDecisions);
693
- }
694
- if (result.designDecisions) {
695
- decisions.push(...result.designDecisions);
696
- }
697
- if (result.qualityGates) {
698
- decisions.push(...result.qualityGates.map((gate)=>({
699
- decision: `Quality gate: ${gate.name}`,
700
- rationale: gate.rationale || 'Quality assurance',
701
- impact: gate.impact || 'process'
702
- })));
703
- }
704
- return decisions;
718
+ */
719
+ extractDecisions(result) {
720
+ const decisions = [];
721
+
722
+ if (result.architecturalDecisions) {
723
+ decisions.push(...result.architecturalDecisions);
705
724
  }
706
- /**
725
+
726
+ if (result.designDecisions) {
727
+ decisions.push(...result.designDecisions);
728
+ }
729
+
730
+ if (result.qualityGates) {
731
+ decisions.push(
732
+ ...result.qualityGates.map((gate) => ({
733
+ decision: `Quality gate: ${gate.name}`,
734
+ rationale: gate.rationale || 'Quality assurance',
735
+ impact: gate.impact || 'process',
736
+ })),
737
+ );
738
+ }
739
+
740
+ return decisions;
741
+ }
742
+
743
+ /**
707
744
  * Update coordination metrics
708
- */ updateCoordinationMetrics(phaseName, result, validation) {
709
- this.metrics.phaseExecutions += 1;
710
- // Update agent utilization
711
- const phaseAgents = this.phaseAgents.get(phaseName) || [];
712
- for (const agent of phaseAgents){
713
- if (!this.metrics.agentUtilization[agent.id]) {
714
- this.metrics.agentUtilization[agent.id] = {
715
- phases: 0,
716
- totalTime: 0,
717
- quality: 0
718
- };
719
- }
720
- this.metrics.agentUtilization[agent.id].phases += 1;
721
- this.metrics.agentUtilization[agent.id].quality += validation.score;
722
- }
723
- // Update coordination efficiency
724
- const efficiency = this.calculatePhaseEfficiency(phaseName);
725
- this.metrics.coordinationEfficiency = (this.metrics.coordinationEfficiency + efficiency) / 2;
726
- // Record quality gate
727
- this.metrics.qualityGates.push({
728
- phase: phaseName,
729
- passed: validation.passed,
730
- score: validation.score,
731
- timestamp: Date.now()
732
- });
733
- // Record learning data
734
- if (validation.passed) {
735
- this.metrics.learningData.push({
736
- phase: phaseName,
737
- success: true,
738
- quality: validation.score,
739
- patterns: this.neuralContext?.patterns || []
740
- });
741
- }
745
+ */
746
+ updateCoordinationMetrics(phaseName, result, validation) {
747
+ this.metrics.phaseExecutions += 1;
748
+
749
+ // Update agent utilization
750
+ const phaseAgents = this.phaseAgents.get(phaseName) || [];
751
+ for (const agent of phaseAgents) {
752
+ if (!this.metrics.agentUtilization[agent.id]) {
753
+ this.metrics.agentUtilization[agent.id] = { phases: 0, totalTime: 0, quality: 0 };
754
+ }
755
+ this.metrics.agentUtilization[agent.id].phases += 1;
756
+ this.metrics.agentUtilization[agent.id].quality += validation.score;
742
757
  }
743
- /**
758
+
759
+ // Update coordination efficiency
760
+ const efficiency = this.calculatePhaseEfficiency(phaseName);
761
+ this.metrics.coordinationEfficiency = (this.metrics.coordinationEfficiency + efficiency) / 2;
762
+
763
+ // Record quality gate
764
+ this.metrics.qualityGates.push({
765
+ phase: phaseName,
766
+ passed: validation.passed,
767
+ score: validation.score,
768
+ timestamp: Date.now(),
769
+ });
770
+
771
+ // Record learning data
772
+ if (validation.passed) {
773
+ this.metrics.learningData.push({
774
+ phase: phaseName,
775
+ success: true,
776
+ quality: validation.score,
777
+ patterns: this.neuralContext?.patterns || [],
778
+ });
779
+ }
780
+ }
781
+
782
+ /**
744
783
  * Finalize coordination
745
- */ async finalize() {
746
- if (!this.swarmEnabled) return;
747
- console.log('🏁 Finalizing SPARC coordination');
748
- try {
749
- // Generate coordination report
750
- const report = await this.generateCoordinationReport();
751
- // Store final metrics
752
- await this.executeSwarmHook('memory_store', {
753
- key: 'sparc_coordination_final',
754
- value: {
755
- metrics: this.metrics,
756
- report: report,
757
- timestamp: Date.now()
758
- }
759
- });
760
- // Shutdown agents
761
- for (const agent of this.agents){
762
- await this.executeSwarmHook('agent_shutdown', {
763
- agentId: agent.id,
764
- graceful: true
765
- });
766
- }
767
- // Shutdown swarm
768
- await this.executeSwarmHook('swarm_shutdown', {
769
- swarmId: this.swarmId,
770
- preserveData: true
771
- });
772
- console.log('✅ SPARC coordination finalized');
773
- } catch (error) {
774
- console.warn(`⚠️ Coordination finalization failed: ${error.message}`);
775
- }
784
+ */
785
+ async finalize() {
786
+ if (!this.swarmEnabled) return;
787
+
788
+ console.log('🏁 Finalizing SPARC coordination');
789
+
790
+ try {
791
+ // Generate coordination report
792
+ const report = await this.generateCoordinationReport();
793
+
794
+ // Store final metrics
795
+ await this.executeSwarmHook('memory_store', {
796
+ key: 'sparc_coordination_final',
797
+ value: {
798
+ metrics: this.metrics,
799
+ report: report,
800
+ timestamp: Date.now(),
801
+ },
802
+ });
803
+
804
+ // Shutdown agents
805
+ for (const agent of this.agents) {
806
+ await this.executeSwarmHook('agent_shutdown', {
807
+ agentId: agent.id,
808
+ graceful: true,
809
+ });
810
+ }
811
+
812
+ // Shutdown swarm
813
+ await this.executeSwarmHook('swarm_shutdown', {
814
+ swarmId: this.swarmId,
815
+ preserveData: true,
816
+ });
817
+
818
+ console.log('✅ SPARC coordination finalized');
819
+ } catch (error) {
820
+ console.warn(`⚠️ Coordination finalization failed: ${error.message}`);
776
821
  }
777
- /**
822
+ }
823
+
824
+ /**
778
825
  * Generate coordination report
779
- */ async generateCoordinationReport() {
780
- const report = {
781
- summary: {
782
- phasesExecuted: this.metrics.phaseExecutions,
783
- agentsUtilized: Object.keys(this.metrics.agentUtilization).length,
784
- coordinationEfficiency: this.metrics.coordinationEfficiency,
785
- qualityGatesPassed: this.metrics.qualityGates.filter((g)=>g.passed).length,
786
- totalQualityGates: this.metrics.qualityGates.length
787
- },
788
- agentPerformance: this.calculateAgentPerformanceSummary(),
789
- phaseAnalysis: this.analyzePhasePerformance(),
790
- recommendations: this.generateRecommendations(),
791
- neuralInsights: this.extractNeuralInsights()
792
- };
793
- return report;
794
- }
795
- /**
826
+ */
827
+ async generateCoordinationReport() {
828
+ const report = {
829
+ summary: {
830
+ phasesExecuted: this.metrics.phaseExecutions,
831
+ agentsUtilized: Object.keys(this.metrics.agentUtilization).length,
832
+ coordinationEfficiency: this.metrics.coordinationEfficiency,
833
+ qualityGatesPassed: this.metrics.qualityGates.filter((g) => g.passed).length,
834
+ totalQualityGates: this.metrics.qualityGates.length,
835
+ },
836
+ agentPerformance: this.calculateAgentPerformanceSummary(),
837
+ phaseAnalysis: this.analyzePhasePerformance(),
838
+ recommendations: this.generateRecommendations(),
839
+ neuralInsights: this.extractNeuralInsights(),
840
+ };
841
+
842
+ return report;
843
+ }
844
+
845
+ /**
796
846
  * Calculate agent performance summary
797
- */ calculateAgentPerformanceSummary() {
798
- const summary = {};
799
- for (const agent of this.agents){
800
- summary[agent.id] = {
801
- type: agent.type,
802
- role: agent.role,
803
- tasksCompleted: agent.performance.tasksCompleted,
804
- averageQuality: agent.performance.qualityScore,
805
- efficiency: agent.performance.efficiency,
806
- averageTime: agent.performance.averageTime
807
- };
808
- }
809
- return summary;
847
+ */
848
+ calculateAgentPerformanceSummary() {
849
+ const summary = {};
850
+
851
+ for (const agent of this.agents) {
852
+ summary[agent.id] = {
853
+ type: agent.type,
854
+ role: agent.role,
855
+ tasksCompleted: agent.performance.tasksCompleted,
856
+ averageQuality: agent.performance.qualityScore,
857
+ efficiency: agent.performance.efficiency,
858
+ averageTime: agent.performance.averageTime,
859
+ };
810
860
  }
811
- /**
861
+
862
+ return summary;
863
+ }
864
+
865
+ /**
812
866
  * Analyze phase performance
813
- */ analyzePhasePerformance() {
814
- const analysis = {};
815
- for (const gate of this.metrics.qualityGates){
816
- if (!analysis[gate.phase]) {
817
- analysis[gate.phase] = {
818
- executions: 0,
819
- passed: 0,
820
- averageScore: 0,
821
- totalScore: 0
822
- };
823
- }
824
- analysis[gate.phase].executions += 1;
825
- if (gate.passed) analysis[gate.phase].passed += 1;
826
- analysis[gate.phase].totalScore += gate.score;
827
- }
828
- // Calculate averages
829
- for (const phase of Object.keys(analysis)){
830
- analysis[phase].averageScore = analysis[phase].totalScore / analysis[phase].executions;
831
- analysis[phase].successRate = analysis[phase].passed / analysis[phase].executions;
832
- }
833
- return analysis;
867
+ */
868
+ analyzePhasePerformance() {
869
+ const analysis = {};
870
+
871
+ for (const gate of this.metrics.qualityGates) {
872
+ if (!analysis[gate.phase]) {
873
+ analysis[gate.phase] = {
874
+ executions: 0,
875
+ passed: 0,
876
+ averageScore: 0,
877
+ totalScore: 0,
878
+ };
879
+ }
880
+
881
+ analysis[gate.phase].executions += 1;
882
+ if (gate.passed) analysis[gate.phase].passed += 1;
883
+ analysis[gate.phase].totalScore += gate.score;
884
+ }
885
+
886
+ // Calculate averages
887
+ for (const phase of Object.keys(analysis)) {
888
+ analysis[phase].averageScore = analysis[phase].totalScore / analysis[phase].executions;
889
+ analysis[phase].successRate = analysis[phase].passed / analysis[phase].executions;
834
890
  }
835
- /**
891
+
892
+ return analysis;
893
+ }
894
+
895
+ /**
836
896
  * Generate recommendations for improvement
837
- */ generateRecommendations() {
838
- const recommendations = [];
839
- // Analyze agent utilization
840
- const avgUtilization = Object.values(this.metrics.agentUtilization).reduce((sum, agent)=>sum + agent.phases, 0) / Object.keys(this.metrics.agentUtilization).length;
841
- if (avgUtilization < 2) {
842
- recommendations.push('Consider reducing agent count for better utilization');
843
- } else if (avgUtilization > 4) {
844
- recommendations.push('Consider increasing agent count to distribute load');
845
- }
846
- // Analyze coordination efficiency
847
- if (this.metrics.coordinationEfficiency < 0.7) {
848
- recommendations.push('Improve coordination efficiency through better task decomposition');
849
- }
850
- // Analyze quality gates
851
- const qualityGateSuccess = this.metrics.qualityGates.filter((g)=>g.passed).length / this.metrics.qualityGates.length;
852
- if (qualityGateSuccess < 0.8) {
853
- recommendations.push('Review quality gate criteria and provide additional agent training');
854
- }
855
- return recommendations;
897
+ */
898
+ generateRecommendations() {
899
+ const recommendations = [];
900
+
901
+ // Analyze agent utilization
902
+ const avgUtilization =
903
+ Object.values(this.metrics.agentUtilization).reduce((sum, agent) => sum + agent.phases, 0) /
904
+ Object.keys(this.metrics.agentUtilization).length;
905
+
906
+ if (avgUtilization < 2) {
907
+ recommendations.push('Consider reducing agent count for better utilization');
908
+ } else if (avgUtilization > 4) {
909
+ recommendations.push('Consider increasing agent count to distribute load');
856
910
  }
857
- /**
911
+
912
+ // Analyze coordination efficiency
913
+ if (this.metrics.coordinationEfficiency < 0.7) {
914
+ recommendations.push('Improve coordination efficiency through better task decomposition');
915
+ }
916
+
917
+ // Analyze quality gates
918
+ const qualityGateSuccess =
919
+ this.metrics.qualityGates.filter((g) => g.passed).length / this.metrics.qualityGates.length;
920
+ if (qualityGateSuccess < 0.8) {
921
+ recommendations.push('Review quality gate criteria and provide additional agent training');
922
+ }
923
+
924
+ return recommendations;
925
+ }
926
+
927
+ /**
858
928
  * Extract neural insights
859
- */ extractNeuralInsights() {
860
- const insights = [];
861
- // Pattern analysis
862
- const successfulPatterns = this.metrics.learningData.filter((d)=>d.success);
863
- if (successfulPatterns.length > 0) {
864
- insights.push(`${successfulPatterns.length} successful execution patterns identified`);
865
- }
866
- // Quality analysis
867
- const avgQuality = this.metrics.learningData.reduce((sum, d)=>sum + d.quality, 0) / this.metrics.learningData.length;
868
- if (avgQuality > 85) {
869
- insights.push('High quality outcomes consistently achieved');
870
- } else if (avgQuality < 70) {
871
- insights.push('Quality improvements needed in execution');
872
- }
873
- return insights;
929
+ */
930
+ extractNeuralInsights() {
931
+ const insights = [];
932
+
933
+ // Pattern analysis
934
+ const successfulPatterns = this.metrics.learningData.filter((d) => d.success);
935
+ if (successfulPatterns.length > 0) {
936
+ insights.push(`${successfulPatterns.length} successful execution patterns identified`);
937
+ }
938
+
939
+ // Quality analysis
940
+ const avgQuality =
941
+ this.metrics.learningData.reduce((sum, d) => sum + d.quality, 0) /
942
+ this.metrics.learningData.length;
943
+ if (avgQuality > 85) {
944
+ insights.push('High quality outcomes consistently achieved');
945
+ } else if (avgQuality < 70) {
946
+ insights.push('Quality improvements needed in execution');
874
947
  }
875
- /**
948
+
949
+ return insights;
950
+ }
951
+
952
+ /**
876
953
  * Execute swarm hook with error handling
877
- */ async executeSwarmHook(hookName, data = {}) {
878
- if (!this.swarmEnabled) {
879
- throw new Error('Swarm not enabled');
880
- }
881
- try {
882
- const { spawn } = await import("child_process");
883
- return new Promise((resolve, reject)=>{
884
- const args = [
885
- 'ruv-swarm',
886
- 'hook',
887
- hookName
888
- ];
889
- // Add data as JSON argument
890
- if (Object.keys(data).length > 0) {
891
- args.push('--data', JSON.stringify(data));
892
- }
893
- const process = spawn('npx', args, {
894
- stdio: 'pipe'
895
- });
896
- let output = '';
897
- let error = '';
898
- process.stdout.on('data', (data)=>{
899
- output += data.toString();
900
- });
901
- process.stderr.on('data', (data)=>{
902
- error += data.toString();
903
- });
904
- process.on('close', (code)=>{
905
- if (code === 0) {
906
- try {
907
- const result = JSON.parse(output);
908
- resolve(result);
909
- } catch (parseError) {
910
- resolve(output.trim());
911
- }
912
- } else {
913
- reject(new Error(`Hook ${hookName} failed: ${error}`));
914
- }
915
- });
916
- process.on('error', (err)=>{
917
- reject(err);
918
- });
919
- });
920
- } catch (error) {
921
- throw new Error(`Failed to execute swarm hook ${hookName}: ${error.message}`);
954
+ */
955
+ async executeSwarmHook(hookName, data = {}) {
956
+ if (!this.swarmEnabled) {
957
+ throw new Error('Swarm not enabled');
958
+ }
959
+
960
+ try {
961
+ const { spawn } = await import('child_process');
962
+
963
+ return new Promise((resolve, reject) => {
964
+ const args = ['ruv-swarm', 'hook', hookName];
965
+
966
+ // Add data as JSON argument
967
+ if (Object.keys(data).length > 0) {
968
+ args.push('--data', JSON.stringify(data));
922
969
  }
970
+
971
+ const process = spawn('npx', args, {
972
+ stdio: 'pipe',
973
+ });
974
+
975
+ let output = '';
976
+ let error = '';
977
+
978
+ process.stdout.on('data', (data) => {
979
+ output += data.toString();
980
+ });
981
+
982
+ process.stderr.on('data', (data) => {
983
+ error += data.toString();
984
+ });
985
+
986
+ process.on('close', (code) => {
987
+ if (code === 0) {
988
+ try {
989
+ const result = JSON.parse(output);
990
+ resolve(result);
991
+ } catch (parseError) {
992
+ resolve(output.trim());
993
+ }
994
+ } else {
995
+ reject(new Error(`Hook ${hookName} failed: ${error}`));
996
+ }
997
+ });
998
+
999
+ process.on('error', (err) => {
1000
+ reject(err);
1001
+ });
1002
+ });
1003
+ } catch (error) {
1004
+ throw new Error(`Failed to execute swarm hook ${hookName}: ${error.message}`);
923
1005
  }
924
- /**
1006
+ }
1007
+
1008
+ /**
925
1009
  * Record learning from SPARC execution
926
- */ async recordLearning(learningData) {
927
- if (!this.options.neuralLearning) return;
928
- try {
929
- await this.executeSwarmHook('neural_record_learning', {
930
- methodology: 'sparc',
931
- data: learningData,
932
- timestamp: Date.now()
933
- });
934
- } catch (error) {
935
- console.warn(`⚠️ Failed to record learning: ${error.message}`);
936
- }
1010
+ */
1011
+ async recordLearning(learningData) {
1012
+ if (!this.options.neuralLearning) return;
1013
+
1014
+ try {
1015
+ await this.executeSwarmHook('neural_record_learning', {
1016
+ methodology: 'sparc',
1017
+ data: learningData,
1018
+ timestamp: Date.now(),
1019
+ });
1020
+ } catch (error) {
1021
+ console.warn(`⚠️ Failed to record learning: ${error.message}`);
937
1022
  }
938
- /**
1023
+ }
1024
+
1025
+ /**
939
1026
  * Get coordination status
940
- */ getStatus() {
941
- return {
942
- swarmEnabled: this.swarmEnabled,
943
- swarmId: this.swarmId,
944
- agentCount: this.agents.length,
945
- phaseAgents: Object.fromEntries(Array.from(this.phaseAgents.entries()).map(([phase, agents])=>[
946
- phase,
947
- agents.map((a)=>({
948
- id: a.id,
949
- type: a.type,
950
- status: a.status
951
- }))
952
- ])),
953
- metrics: this.metrics,
954
- coordination: this.coordination
955
- };
956
- }
957
- constructor(phases, options = {}){
958
- this.phases = phases;
959
- this.options = options;
960
- this.swarmId = null;
961
- this.agents = [];
962
- this.phaseAgents = new Map();
963
- this.coordination = {
964
- strategy: 'adaptive',
965
- topology: 'hierarchical',
966
- communication: 'event-driven',
967
- loadBalancing: 'capability-based'
968
- };
969
- this.metrics = {
970
- phaseExecutions: 0,
971
- agentUtilization: {},
972
- coordinationEfficiency: 0,
973
- qualityGates: [],
974
- learningData: []
975
- };
976
- this.neuralContext = null;
977
- this.swarmEnabled = options.swarmEnabled || false;
978
- }
1027
+ */
1028
+ getStatus() {
1029
+ return {
1030
+ swarmEnabled: this.swarmEnabled,
1031
+ swarmId: this.swarmId,
1032
+ agentCount: this.agents.length,
1033
+ phaseAgents: Object.fromEntries(
1034
+ Array.from(this.phaseAgents.entries()).map(([phase, agents]) => [
1035
+ phase,
1036
+ agents.map((a) => ({ id: a.id, type: a.type, status: a.status })),
1037
+ ]),
1038
+ ),
1039
+ metrics: this.metrics,
1040
+ coordination: this.coordination,
1041
+ };
1042
+ }
979
1043
  }
1044
+
980
1045
  export default SparcCoordinator;