@monoes/monomindcli 1.10.54 → 1.10.56

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 (441) hide show
  1. package/.claude/agents/optimization/benchmark-suite.md +2 -0
  2. package/.claude/agents/optimization/load-balancer.md +2 -0
  3. package/.claude/agents/optimization/performance-monitor.md +2 -0
  4. package/.claude/agents/optimization/resource-allocator.md +3 -1
  5. package/.claude/agents/optimization/topology-optimizer.md +2 -0
  6. package/.claude/commands/mastermind/_repeat.md +21 -0
  7. package/.claude/commands/mastermind/_taskfile.md +235 -0
  8. package/.claude/commands/mastermind/adr.md +11 -0
  9. package/.claude/commands/mastermind/approve.md +94 -0
  10. package/.claude/commands/mastermind/autodev.md +32 -0
  11. package/.claude/commands/mastermind/budget.md +7 -0
  12. package/.claude/commands/mastermind/code-review.md +317 -0
  13. package/.claude/commands/mastermind/createorg.md +40 -1
  14. package/.claude/commands/mastermind/createtask.md +383 -0
  15. package/.claude/commands/mastermind/debug.md +22 -0
  16. package/.claude/commands/mastermind/design.md +20 -0
  17. package/.claude/commands/mastermind/do.md +526 -0
  18. package/.claude/commands/mastermind/execute.md +20 -0
  19. package/.claude/commands/mastermind/finish.md +20 -0
  20. package/.claude/commands/mastermind/graph-status.md +7 -0
  21. package/.claude/commands/mastermind/help.md +118 -0
  22. package/.claude/commands/mastermind/ideate.md +261 -0
  23. package/.claude/commands/mastermind/improve.md +345 -0
  24. package/.claude/commands/mastermind/loops.md +7 -0
  25. package/.claude/commands/mastermind/master.md +186 -6
  26. package/.claude/commands/mastermind/memory.md +230 -0
  27. package/.claude/commands/mastermind/plan.md +26 -0
  28. package/.claude/commands/mastermind/receive-review.md +20 -0
  29. package/.claude/commands/mastermind/repeat.md +257 -0
  30. package/.claude/commands/mastermind/runorg.md +3 -0
  31. package/.claude/commands/mastermind/skill-builder.md +20 -0
  32. package/.claude/commands/mastermind/specialagents.md +125 -0
  33. package/.claude/commands/mastermind/swarm.md +161 -0
  34. package/.claude/commands/mastermind/taskdev.md +26 -0
  35. package/.claude/commands/mastermind/tdd.md +22 -0
  36. package/.claude/commands/mastermind/techport.md +4 -0
  37. package/.claude/commands/mastermind/understand.md +139 -0
  38. package/.claude/commands/mastermind/verify.md +22 -0
  39. package/.claude/commands/mastermind/worktree.md +20 -0
  40. package/.claude/helpers/handlers/graph-status-handler.cjs +2 -1
  41. package/.claude/helpers/hook-handler.cjs +19 -0
  42. package/.claude/helpers/skill-registry.json +23 -0
  43. package/.claude/helpers/statusline.cjs +1 -1
  44. package/.claude/skills/mastermind/approve.md +15 -7
  45. package/.claude/skills/mastermind/autodev.md +534 -0
  46. package/.claude/skills/mastermind/createorg.md +21 -5
  47. package/.claude/skills/mastermind/debug.md +232 -0
  48. package/.claude/skills/mastermind/design.md +187 -0
  49. package/.claude/skills/mastermind/execute.md +104 -0
  50. package/.claude/skills/mastermind/finish.md +251 -0
  51. package/.claude/skills/mastermind/plan.md +180 -0
  52. package/.claude/skills/mastermind/receive-review.md +213 -0
  53. package/.claude/skills/mastermind/runorg.md +23 -8
  54. package/.claude/skills/mastermind/skill-builder.md +274 -0
  55. package/.claude/skills/mastermind/taskdev.md +307 -0
  56. package/.claude/skills/mastermind/tdd.md +394 -0
  57. package/.claude/skills/mastermind/verify.md +196 -0
  58. package/.claude/skills/mastermind/worktree.md +160 -132
  59. package/README.md +320 -253
  60. package/dist/src/commands/analyze.d.ts.map +1 -1
  61. package/dist/src/commands/analyze.js +9 -2
  62. package/dist/src/commands/analyze.js.map +1 -1
  63. package/dist/src/commands/benchmark.js.map +1 -1
  64. package/dist/src/commands/completions.js +1 -1
  65. package/dist/src/commands/guidance.js +7 -7
  66. package/dist/src/commands/hooks.d.ts.map +1 -1
  67. package/dist/src/commands/hooks.js +16 -3
  68. package/dist/src/commands/hooks.js.map +1 -1
  69. package/dist/src/commands/index.d.ts +3 -2
  70. package/dist/src/commands/index.d.ts.map +1 -1
  71. package/dist/src/commands/index.js +7 -0
  72. package/dist/src/commands/index.js.map +1 -1
  73. package/dist/src/commands/init.d.ts.map +1 -1
  74. package/dist/src/commands/init.js +47 -13
  75. package/dist/src/commands/init.js.map +1 -1
  76. package/dist/src/commands/neural.d.ts.map +1 -1
  77. package/dist/src/commands/neural.js +100 -14
  78. package/dist/src/commands/neural.js.map +1 -1
  79. package/dist/src/commands/platforms.d.ts +11 -0
  80. package/dist/src/commands/platforms.d.ts.map +1 -0
  81. package/dist/src/commands/platforms.js +195 -0
  82. package/dist/src/commands/platforms.js.map +1 -0
  83. package/dist/src/commands/ruvector/backup.js.map +1 -1
  84. package/dist/src/commands/ruvector/benchmark.js.map +1 -1
  85. package/dist/src/commands/ruvector/init.js.map +1 -1
  86. package/dist/src/commands/ruvector/migrate.js.map +1 -1
  87. package/dist/src/commands/ruvector/optimize.js.map +1 -1
  88. package/dist/src/commands/ruvector/status.js.map +1 -1
  89. package/dist/src/commands/update.js +6 -6
  90. package/dist/src/init/executor.d.ts.map +1 -1
  91. package/dist/src/init/executor.js +28 -0
  92. package/dist/src/init/executor.js.map +1 -1
  93. package/dist/src/init/statusline-generator.js +1 -1
  94. package/dist/src/init/types.d.ts +1 -0
  95. package/dist/src/init/types.d.ts.map +1 -1
  96. package/dist/src/mcp-server.d.ts.map +1 -1
  97. package/dist/src/mcp-server.js +92 -0
  98. package/dist/src/mcp-server.js.map +1 -1
  99. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  100. package/dist/src/mcp-tools/hive-mind-tools.js +52 -0
  101. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  102. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  103. package/dist/src/mcp-tools/hooks-tools.js +106 -5
  104. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  105. package/dist/src/mcp-tools/index.d.ts +0 -5
  106. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  107. package/dist/src/mcp-tools/index.js +0 -5
  108. package/dist/src/mcp-tools/index.js.map +1 -1
  109. package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
  110. package/dist/src/mcp-tools/monograph-tools.js +507 -5587
  111. package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
  112. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  113. package/dist/src/mcp-tools/neural-tools.js +64 -4
  114. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  115. package/dist/src/mcp-tools/security-tools.js +4 -4
  116. package/dist/src/memory/intelligence.d.ts +2 -2
  117. package/dist/src/memory/intelligence.d.ts.map +1 -1
  118. package/dist/src/memory/intelligence.js +108 -3
  119. package/dist/src/memory/intelligence.js.map +1 -1
  120. package/dist/src/memory/memory-bridge.js +1 -1
  121. package/dist/src/memory/memory-bridge.js.map +1 -1
  122. package/dist/src/memory/sona-optimizer.d.ts +1 -10
  123. package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
  124. package/dist/src/memory/sona-optimizer.js +0 -46
  125. package/dist/src/memory/sona-optimizer.js.map +1 -1
  126. package/dist/src/runtime/headless.js +3 -3
  127. package/dist/src/ruvector/diff-classifier.d.ts +0 -2
  128. package/dist/src/ruvector/diff-classifier.d.ts.map +1 -1
  129. package/dist/src/ruvector/diff-classifier.js +2 -14
  130. package/dist/src/ruvector/diff-classifier.js.map +1 -1
  131. package/dist/src/ruvector/index.d.ts +26 -9
  132. package/dist/src/ruvector/index.d.ts.map +1 -1
  133. package/dist/src/ruvector/index.js +3 -21
  134. package/dist/src/ruvector/index.js.map +1 -1
  135. package/dist/src/ruvector/ruvllm-wasm.js +2 -2
  136. package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
  137. package/dist/src/types.d.ts +0 -15
  138. package/dist/src/types.d.ts.map +1 -1
  139. package/dist/src/types.js +0 -18
  140. package/dist/src/types.js.map +1 -1
  141. package/dist/src/ui/dashboard.html +8763 -9766
  142. package/dist/src/ui/orgs.html +1 -1
  143. package/dist/src/ui/server.mjs +504 -35
  144. package/dist/src/update/index.js +1 -1
  145. package/dist/src/update/validator.js +8 -8
  146. package/dist/tsconfig.tsbuildinfo +1 -1
  147. package/package.json +2 -2
  148. package/.claude/agents/academic/academic-anthropologist.md +0 -126
  149. package/.claude/agents/academic/academic-geographer.md +0 -128
  150. package/.claude/agents/academic/academic-historian.md +0 -124
  151. package/.claude/agents/academic/academic-narratologist.md +0 -119
  152. package/.claude/agents/academic/academic-psychologist.md +0 -119
  153. package/.claude/agents/analysis/analyze-code-quality.md +0 -58
  154. package/.claude/agents/analysis/code-analyzer.md +0 -189
  155. package/.claude/agents/analysis/code-review/analyze-code-quality.md +0 -58
  156. package/.claude/agents/consensus/performance-benchmarker.md +0 -831
  157. package/.claude/agents/data/ml/data-ml-model.md +0 -76
  158. package/.claude/agents/development/dev-backend-api.md +0 -178
  159. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -52
  160. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -63
  161. package/.claude/agents/game-development/blender/blender-addon-engineer.md +0 -235
  162. package/.claude/agents/game-development/game-audio-engineer.md +0 -265
  163. package/.claude/agents/game-development/game-designer.md +0 -168
  164. package/.claude/agents/game-development/godot/godot-gameplay-scripter.md +0 -335
  165. package/.claude/agents/game-development/godot/godot-multiplayer-engineer.md +0 -298
  166. package/.claude/agents/game-development/godot/godot-shader-developer.md +0 -267
  167. package/.claude/agents/game-development/level-designer.md +0 -209
  168. package/.claude/agents/game-development/narrative-designer.md +0 -244
  169. package/.claude/agents/game-development/roblox-studio/roblox-avatar-creator.md +0 -298
  170. package/.claude/agents/game-development/roblox-studio/roblox-experience-designer.md +0 -306
  171. package/.claude/agents/game-development/roblox-studio/roblox-systems-scripter.md +0 -326
  172. package/.claude/agents/game-development/technical-artist.md +0 -230
  173. package/.claude/agents/game-development/unity/unity-architect.md +0 -272
  174. package/.claude/agents/game-development/unity/unity-editor-tool-developer.md +0 -311
  175. package/.claude/agents/game-development/unity/unity-multiplayer-engineer.md +0 -322
  176. package/.claude/agents/game-development/unity/unity-shader-graph-artist.md +0 -270
  177. package/.claude/agents/game-development/unreal-engine/unreal-multiplayer-architect.md +0 -314
  178. package/.claude/agents/game-development/unreal-engine/unreal-systems-engineer.md +0 -311
  179. package/.claude/agents/game-development/unreal-engine/unreal-technical-artist.md +0 -257
  180. package/.claude/agents/game-development/unreal-engine/unreal-world-builder.md +0 -274
  181. package/.claude/agents/github/release-swarm.md +0 -597
  182. package/.claude/agents/goal/agent.md +0 -804
  183. package/.claude/agents/goal/code-goal-planner.md +0 -445
  184. package/.claude/agents/marketing/marketing-ai-citation-strategist.md +0 -171
  185. package/.claude/agents/marketing/marketing-app-store-optimizer.md +0 -322
  186. package/.claude/agents/marketing/marketing-baidu-seo-specialist.md +0 -227
  187. package/.claude/agents/marketing/marketing-bilibili-content-strategist.md +0 -200
  188. package/.claude/agents/marketing/marketing-book-co-author.md +0 -111
  189. package/.claude/agents/marketing/marketing-carousel-growth-engine.md +0 -200
  190. package/.claude/agents/marketing/marketing-china-ecommerce-operator.md +0 -284
  191. package/.claude/agents/marketing/marketing-content-creator.md +0 -67
  192. package/.claude/agents/marketing/marketing-cross-border-ecommerce.md +0 -260
  193. package/.claude/agents/marketing/marketing-douyin-strategist.md +0 -150
  194. package/.claude/agents/marketing/marketing-growth-hacker.md +0 -54
  195. package/.claude/agents/marketing/marketing-instagram-curator.md +0 -114
  196. package/.claude/agents/marketing/marketing-kuaishou-strategist.md +0 -224
  197. package/.claude/agents/marketing/marketing-linkedin-content-creator.md +0 -215
  198. package/.claude/agents/marketing/marketing-livestream-commerce-coach.md +0 -306
  199. package/.claude/agents/marketing/marketing-podcast-strategist.md +0 -278
  200. package/.claude/agents/marketing/marketing-private-domain-operator.md +0 -309
  201. package/.claude/agents/marketing/marketing-reddit-community-builder.md +0 -124
  202. package/.claude/agents/marketing/marketing-seo-specialist.md +0 -279
  203. package/.claude/agents/marketing/marketing-short-video-editing-coach.md +0 -413
  204. package/.claude/agents/marketing/marketing-social-media-strategist.md +0 -125
  205. package/.claude/agents/marketing/marketing-tiktok-strategist.md +0 -126
  206. package/.claude/agents/marketing/marketing-twitter-engager.md +0 -127
  207. package/.claude/agents/marketing/marketing-wechat-official-account.md +0 -146
  208. package/.claude/agents/marketing/marketing-weibo-strategist.md +0 -241
  209. package/.claude/agents/marketing/marketing-xiaohongshu-specialist.md +0 -139
  210. package/.claude/agents/marketing/marketing-zhihu-strategist.md +0 -163
  211. package/.claude/agents/neural/safla-neural.md +0 -74
  212. package/.claude/agents/paid-media/paid-media-auditor.md +0 -71
  213. package/.claude/agents/paid-media/paid-media-creative-strategist.md +0 -71
  214. package/.claude/agents/paid-media/paid-media-paid-social-strategist.md +0 -71
  215. package/.claude/agents/paid-media/paid-media-ppc-strategist.md +0 -71
  216. package/.claude/agents/paid-media/paid-media-programmatic-buyer.md +0 -71
  217. package/.claude/agents/paid-media/paid-media-search-query-analyst.md +0 -71
  218. package/.claude/agents/paid-media/paid-media-tracking-specialist.md +0 -71
  219. package/.claude/agents/payments/agentic-payments.md +0 -126
  220. package/.claude/agents/product/product-behavioral-nudge-engine.md +0 -81
  221. package/.claude/agents/product/product-feedback-synthesizer.md +0 -119
  222. package/.claude/agents/product/product-manager.md +0 -469
  223. package/.claude/agents/product/product-sprint-prioritizer.md +0 -154
  224. package/.claude/agents/product/product-trend-researcher.md +0 -159
  225. package/.claude/agents/project-management/project-management-experiment-tracker.md +0 -199
  226. package/.claude/agents/project-management/project-management-jira-workflow-steward.md +0 -231
  227. package/.claude/agents/project-management/project-management-project-shepherd.md +0 -195
  228. package/.claude/agents/project-management/project-management-studio-operations.md +0 -201
  229. package/.claude/agents/project-management/project-management-studio-producer.md +0 -204
  230. package/.claude/agents/project-management/project-manager-senior.md +0 -136
  231. package/.claude/agents/reasoning/agent.md +0 -804
  232. package/.claude/agents/reasoning/goal-planner.md +0 -73
  233. package/.claude/agents/sales/sales-account-strategist.md +0 -228
  234. package/.claude/agents/sales/sales-coach.md +0 -272
  235. package/.claude/agents/sales/sales-deal-strategist.md +0 -181
  236. package/.claude/agents/sales/sales-discovery-coach.md +0 -226
  237. package/.claude/agents/sales/sales-engineer.md +0 -183
  238. package/.claude/agents/sales/sales-outbound-strategist.md +0 -202
  239. package/.claude/agents/sales/sales-pipeline-analyst.md +0 -268
  240. package/.claude/agents/sales/sales-proposal-strategist.md +0 -218
  241. package/.claude/agents/sona/sona-learning-optimizer.md +0 -65
  242. package/.claude/agents/spatial-computing/macos-spatial-metal-engineer.md +0 -338
  243. package/.claude/agents/spatial-computing/terminal-integration-specialist.md +0 -71
  244. package/.claude/agents/spatial-computing/visionos-spatial-engineer.md +0 -55
  245. package/.claude/agents/specialists/memory-specialist.md +0 -298
  246. package/.claude/agents/specialists/performance-engineer.md +0 -387
  247. package/.claude/agents/specialists/queen-coordinator.md +0 -67
  248. package/.claude/agents/specialists/security-architect.md +0 -154
  249. package/.claude/agents/specialized/accounts-payable-agent.md +0 -186
  250. package/.claude/agents/specialized/corporate-training-designer.md +0 -193
  251. package/.claude/agents/specialized/data-consolidation-agent.md +0 -61
  252. package/.claude/agents/specialized/government-digital-presales-consultant.md +0 -364
  253. package/.claude/agents/specialized/healthcare-marketing-compliance.md +0 -396
  254. package/.claude/agents/specialized/recruitment-specialist.md +0 -510
  255. package/.claude/agents/specialized/report-distribution-agent.md +0 -66
  256. package/.claude/agents/specialized/sales-data-extraction-agent.md +0 -68
  257. package/.claude/agents/specialized/specialized-french-consulting-market.md +0 -193
  258. package/.claude/agents/specialized/specialized-korean-business-navigator.md +0 -217
  259. package/.claude/agents/specialized/specialized-salesforce-architect.md +0 -181
  260. package/.claude/agents/specialized/study-abroad-advisor.md +0 -283
  261. package/.claude/agents/specialized/supply-chain-strategist.md +0 -583
  262. package/.claude/agents/sublinear/consensus-coordinator.md +0 -333
  263. package/.claude/agents/sublinear/matrix-optimizer.md +0 -180
  264. package/.claude/agents/sublinear/pagerank-analyzer.md +0 -295
  265. package/.claude/agents/sublinear/performance-optimizer.md +0 -363
  266. package/.claude/agents/sublinear/trading-predictor.md +0 -242
  267. package/.claude/agents/support/support-analytics-reporter.md +0 -366
  268. package/.claude/agents/support/support-executive-summary-generator.md +0 -213
  269. package/.claude/agents/support/support-finance-tracker.md +0 -443
  270. package/.claude/agents/support/support-infrastructure-maintainer.md +0 -619
  271. package/.claude/agents/support/support-legal-compliance-checker.md +0 -589
  272. package/.claude/agents/support/support-support-responder.md +0 -586
  273. package/.claude/agents/swarm/adaptive-coordinator.md +0 -364
  274. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -318
  275. package/.claude/agents/templates/github-pr-manager.md +0 -155
  276. package/.claude/agents/templates/memory-coordinator.md +0 -163
  277. package/.claude/agents/templates/migration-plan.md +0 -724
  278. package/.claude/agents/templates/orchestrator-task.md +0 -120
  279. package/.claude/agents/templates/performance-analyzer.md +0 -179
  280. package/.claude/agents/templates/sparc-coordinator.md +0 -163
  281. package/.claude/agents/testing/testing-reality-checker.md +0 -237
  282. package/.claude/commands/analysis/token-efficiency.md +0 -42
  283. package/.claude/commands/optimization/README.md +0 -73
  284. package/.claude/commands/optimization/parallel-execution.md +0 -76
  285. package/.claude/commands/swarm/swarm-analysis.md +0 -62
  286. package/.claude/commands/swarm/swarm-background.md +0 -65
  287. package/.claude/commands/swarm/swarm-modes.md +0 -67
  288. package/.claude/commands/swarm/swarm-monitor.md +0 -54
  289. package/.claude/commands/swarm/swarm-status.md +0 -44
  290. package/.claude/commands/swarm/swarm-strategies.md +0 -76
  291. package/.claude/commands/training/model-update.md +0 -78
  292. package/.claude/commands/training/pattern-learn.md +0 -69
  293. package/.claude/commands/training/specialization.md +0 -92
  294. package/.claude/commands/verify/check.md +0 -106
  295. package/.claude/commands/verify/start.md +0 -105
  296. package/.claude/helpers/README.md +0 -105
  297. package/.claude/helpers/context-persistence-hook.mjs +0 -1988
  298. package/.claude/helpers/intelligence.cjs +0 -247
  299. package/.claude/helpers/learning-service.mjs +0 -1302
  300. package/.claude/helpers/memory-palace.cjs +0 -461
  301. package/.claude/helpers/memory.cjs +0 -84
  302. package/.claude/helpers/metrics-db.mjs +0 -488
  303. package/.claude/helpers/router.cjs +0 -559
  304. package/.claude/helpers/session.cjs +0 -126
  305. package/.claude/helpers/swarm-hooks.sh +0 -761
  306. package/.claude/helpers/toggle-statusline.cjs +0 -58
  307. package/.claude/helpers/token-tracker.cjs +0 -934
  308. package/.claude/skills/agentdb-advanced/SKILL.md +0 -549
  309. package/.claude/skills/agentdb-learning/SKILL.md +0 -544
  310. package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -337
  311. package/.claude/skills/agentdb-optimization/SKILL.md +0 -508
  312. package/.claude/skills/agentdb-vector-search/SKILL.md +0 -335
  313. package/.claude/skills/agentic-integration/SKILL.md +0 -265
  314. package/.claude/skills/cli-modernization/SKILL.md +0 -950
  315. package/.claude/skills/core-implementation/SKILL.md +0 -892
  316. package/.claude/skills/ddd-architecture/SKILL.md +0 -444
  317. package/.claude/skills/github-code-review/SKILL.md +0 -1147
  318. package/.claude/skills/github-multi-repo/SKILL.md +0 -912
  319. package/.claude/skills/github-project-management/SKILL.md +0 -1245
  320. package/.claude/skills/github-release-management/SKILL.md +0 -1118
  321. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1107
  322. package/.claude/skills/mcp-optimization/SKILL.md +0 -837
  323. package/.claude/skills/memory-unification/SKILL.md +0 -196
  324. package/.claude/skills/performance-optimization/SKILL.md +0 -416
  325. package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -444
  326. package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -199
  327. package/.claude/skills/security-hardening/SKILL.md +0 -101
  328. package/.claude/skills/stream-chain/SKILL.md +0 -560
  329. package/.claude/skills/swarm-coordination/SKILL.md +0 -451
  330. package/bundled-graph/dist/src/analyze.d.ts +0 -32
  331. package/bundled-graph/dist/src/analyze.d.ts.map +0 -1
  332. package/bundled-graph/dist/src/analyze.js +0 -297
  333. package/bundled-graph/dist/src/analyze.js.map +0 -1
  334. package/bundled-graph/dist/src/build.d.ts +0 -8
  335. package/bundled-graph/dist/src/build.d.ts.map +0 -1
  336. package/bundled-graph/dist/src/build.js.map +0 -1
  337. package/bundled-graph/dist/src/cache.d.ts +0 -12
  338. package/bundled-graph/dist/src/cache.d.ts.map +0 -1
  339. package/bundled-graph/dist/src/cache.js +0 -43
  340. package/bundled-graph/dist/src/cache.js.map +0 -1
  341. package/bundled-graph/dist/src/cluster.d.ts +0 -5
  342. package/bundled-graph/dist/src/cluster.d.ts.map +0 -1
  343. package/bundled-graph/dist/src/cluster.js.map +0 -1
  344. package/bundled-graph/dist/src/detect.d.ts +0 -21
  345. package/bundled-graph/dist/src/detect.d.ts.map +0 -1
  346. package/bundled-graph/dist/src/detect.js +0 -195
  347. package/bundled-graph/dist/src/detect.js.map +0 -1
  348. package/bundled-graph/dist/src/export.d.ts +0 -21
  349. package/bundled-graph/dist/src/export.d.ts.map +0 -1
  350. package/bundled-graph/dist/src/export.js +0 -68
  351. package/bundled-graph/dist/src/export.js.map +0 -1
  352. package/bundled-graph/dist/src/extract/index.d.ts +0 -20
  353. package/bundled-graph/dist/src/extract/index.d.ts.map +0 -1
  354. package/bundled-graph/dist/src/extract/index.js +0 -158
  355. package/bundled-graph/dist/src/extract/index.js.map +0 -1
  356. package/bundled-graph/dist/src/extract/languages/c.d.ts +0 -3
  357. package/bundled-graph/dist/src/extract/languages/c.d.ts.map +0 -1
  358. package/bundled-graph/dist/src/extract/languages/c.js +0 -88
  359. package/bundled-graph/dist/src/extract/languages/c.js.map +0 -1
  360. package/bundled-graph/dist/src/extract/languages/cpp.d.ts +0 -3
  361. package/bundled-graph/dist/src/extract/languages/cpp.d.ts.map +0 -1
  362. package/bundled-graph/dist/src/extract/languages/cpp.js +0 -121
  363. package/bundled-graph/dist/src/extract/languages/cpp.js.map +0 -1
  364. package/bundled-graph/dist/src/extract/languages/csharp.d.ts +0 -3
  365. package/bundled-graph/dist/src/extract/languages/csharp.d.ts.map +0 -1
  366. package/bundled-graph/dist/src/extract/languages/csharp.js +0 -121
  367. package/bundled-graph/dist/src/extract/languages/csharp.js.map +0 -1
  368. package/bundled-graph/dist/src/extract/languages/go.d.ts +0 -3
  369. package/bundled-graph/dist/src/extract/languages/go.d.ts.map +0 -1
  370. package/bundled-graph/dist/src/extract/languages/go.js +0 -181
  371. package/bundled-graph/dist/src/extract/languages/go.js.map +0 -1
  372. package/bundled-graph/dist/src/extract/languages/java.d.ts +0 -3
  373. package/bundled-graph/dist/src/extract/languages/java.d.ts.map +0 -1
  374. package/bundled-graph/dist/src/extract/languages/java.js +0 -117
  375. package/bundled-graph/dist/src/extract/languages/java.js.map +0 -1
  376. package/bundled-graph/dist/src/extract/languages/kotlin.d.ts +0 -3
  377. package/bundled-graph/dist/src/extract/languages/kotlin.d.ts.map +0 -1
  378. package/bundled-graph/dist/src/extract/languages/kotlin.js +0 -112
  379. package/bundled-graph/dist/src/extract/languages/kotlin.js.map +0 -1
  380. package/bundled-graph/dist/src/extract/languages/php.d.ts +0 -3
  381. package/bundled-graph/dist/src/extract/languages/php.d.ts.map +0 -1
  382. package/bundled-graph/dist/src/extract/languages/php.js +0 -130
  383. package/bundled-graph/dist/src/extract/languages/php.js.map +0 -1
  384. package/bundled-graph/dist/src/extract/languages/python.d.ts +0 -3
  385. package/bundled-graph/dist/src/extract/languages/python.d.ts.map +0 -1
  386. package/bundled-graph/dist/src/extract/languages/python.js +0 -230
  387. package/bundled-graph/dist/src/extract/languages/python.js.map +0 -1
  388. package/bundled-graph/dist/src/extract/languages/ruby.d.ts +0 -3
  389. package/bundled-graph/dist/src/extract/languages/ruby.d.ts.map +0 -1
  390. package/bundled-graph/dist/src/extract/languages/ruby.js +0 -120
  391. package/bundled-graph/dist/src/extract/languages/ruby.js.map +0 -1
  392. package/bundled-graph/dist/src/extract/languages/rust.d.ts +0 -3
  393. package/bundled-graph/dist/src/extract/languages/rust.d.ts.map +0 -1
  394. package/bundled-graph/dist/src/extract/languages/rust.js +0 -195
  395. package/bundled-graph/dist/src/extract/languages/rust.js.map +0 -1
  396. package/bundled-graph/dist/src/extract/languages/scala.d.ts +0 -3
  397. package/bundled-graph/dist/src/extract/languages/scala.d.ts.map +0 -1
  398. package/bundled-graph/dist/src/extract/languages/scala.js +0 -110
  399. package/bundled-graph/dist/src/extract/languages/scala.js.map +0 -1
  400. package/bundled-graph/dist/src/extract/languages/swift.d.ts +0 -3
  401. package/bundled-graph/dist/src/extract/languages/swift.d.ts.map +0 -1
  402. package/bundled-graph/dist/src/extract/languages/swift.js +0 -122
  403. package/bundled-graph/dist/src/extract/languages/swift.js.map +0 -1
  404. package/bundled-graph/dist/src/extract/languages/typescript.d.ts +0 -3
  405. package/bundled-graph/dist/src/extract/languages/typescript.d.ts.map +0 -1
  406. package/bundled-graph/dist/src/extract/languages/typescript.js +0 -295
  407. package/bundled-graph/dist/src/extract/languages/typescript.js.map +0 -1
  408. package/bundled-graph/dist/src/extract/semantic.d.ts +0 -38
  409. package/bundled-graph/dist/src/extract/semantic.d.ts.map +0 -1
  410. package/bundled-graph/dist/src/extract/semantic.js +0 -242
  411. package/bundled-graph/dist/src/extract/semantic.js.map +0 -1
  412. package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts +0 -48
  413. package/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts.map +0 -1
  414. package/bundled-graph/dist/src/extract/tree-sitter-runner.js +0 -137
  415. package/bundled-graph/dist/src/extract/tree-sitter-runner.js.map +0 -1
  416. package/bundled-graph/dist/src/extract/types.d.ts +0 -7
  417. package/bundled-graph/dist/src/extract/types.d.ts.map +0 -1
  418. package/bundled-graph/dist/src/extract/types.js +0 -2
  419. package/bundled-graph/dist/src/extract/types.js.map +0 -1
  420. package/bundled-graph/dist/src/index.d.ts +0 -28
  421. package/bundled-graph/dist/src/index.d.ts.map +0 -1
  422. package/bundled-graph/dist/src/index.js +0 -26
  423. package/bundled-graph/dist/src/index.js.map +0 -1
  424. package/bundled-graph/dist/src/pipeline.d.ts +0 -27
  425. package/bundled-graph/dist/src/pipeline.d.ts.map +0 -1
  426. package/bundled-graph/dist/src/pipeline.js +0 -269
  427. package/bundled-graph/dist/src/pipeline.js.map +0 -1
  428. package/bundled-graph/dist/src/report.d.ts +0 -26
  429. package/bundled-graph/dist/src/report.d.ts.map +0 -1
  430. package/bundled-graph/dist/src/report.js +0 -214
  431. package/bundled-graph/dist/src/report.js.map +0 -1
  432. package/bundled-graph/dist/src/types.d.ts +0 -124
  433. package/bundled-graph/dist/src/types.d.ts.map +0 -1
  434. package/bundled-graph/dist/src/types.js +0 -2
  435. package/bundled-graph/dist/src/types.js.map +0 -1
  436. package/bundled-graph/dist/src/visualize.d.ts +0 -4
  437. package/bundled-graph/dist/src/visualize.d.ts.map +0 -1
  438. package/bundled-graph/dist/src/visualize.js +0 -574
  439. package/bundled-graph/dist/src/visualize.js.map +0 -1
  440. package/bundled-graph/dist/tsconfig.tsbuildinfo +0 -1
  441. package/dist/src/ui/dashboard-v2.html +0 -5316
@@ -1,950 +0,0 @@
1
- ---
2
- name: cli-modernization
3
- description: "CLI modernization and hooks system enhancement for monomind. Implements interactive prompts, command decomposition, enhanced hooks integration, and intelligent workflow automation."
4
- triggers:
5
- - modernize CLI
6
- - CLI refactor
7
- - interactive CLI
8
- - add interactive prompts
9
- - decompose index.ts
10
- - command file too large
11
- - CLI hooks integration
12
- - CLI performance
13
- ---
14
-
15
- # CLI Modernization
16
-
17
- ## What This Skill Does
18
-
19
- Modernizes monomind CLI with interactive prompts, intelligent command decomposition, enhanced hooks integration, performance optimization, and comprehensive workflow automation capabilities.
20
-
21
- ## Quick Start
22
-
23
- ```bash
24
- # Initialize CLI modernization analysis
25
- Task("CLI architecture", "Analyze current CLI structure and identify optimization opportunities", "cli-hooks-developer")
26
-
27
- # Modernization implementation (parallel)
28
- Task("Command decomposition", "Break down large CLI files into focused modules", "cli-hooks-developer")
29
- Task("Interactive prompts", "Implement intelligent interactive CLI experience", "cli-hooks-developer")
30
- Task("Hooks enhancement", "Deep integrate hooks with CLI lifecycle", "cli-hooks-developer")
31
- ```
32
-
33
- ## CLI Architecture Modernization
34
-
35
- ### Current State Analysis
36
-
37
- ```
38
- Current CLI Issues:
39
- ├── index.ts: 108KB monolithic file
40
- ├── enterprise.ts: 68KB feature module
41
- ├── Limited interactivity: Basic command parsing
42
- ├── Hooks integration: Basic pre/post execution
43
- └── No intelligent workflows: Manual command chaining
44
-
45
- Target Architecture:
46
- ├── Modular Commands: <500 lines per command
47
- ├── Interactive Prompts: Smart context-aware UX
48
- ├── Enhanced Hooks: Deep lifecycle integration
49
- ├── Workflow Automation: Intelligent command orchestration
50
- └── Performance: <200ms command response time
51
- ```
52
-
53
- ### Modular Command Architecture
54
-
55
- ```typescript
56
- // src/cli/core/command-registry.ts
57
- interface CommandModule {
58
- name: string;
59
- description: string;
60
- category: CommandCategory;
61
- handler: CommandHandler;
62
- middleware: MiddlewareStack;
63
- permissions: Permission[];
64
- examples: CommandExample[];
65
- }
66
-
67
- export class ModularCommandRegistry {
68
- private commands = new Map<string, CommandModule>();
69
- private categories = new Map<CommandCategory, CommandModule[]>();
70
- private aliases = new Map<string, string>();
71
-
72
- registerCommand(command: CommandModule): void {
73
- this.commands.set(command.name, command);
74
-
75
- // Register in category index
76
- if (!this.categories.has(command.category)) {
77
- this.categories.set(command.category, []);
78
- }
79
- this.categories.get(command.category)!.push(command);
80
- }
81
-
82
- async executeCommand(name: string, args: string[]): Promise<CommandResult> {
83
- const command = this.resolveCommand(name);
84
- if (!command) {
85
- throw new CommandNotFoundError(name, this.getSuggestions(name));
86
- }
87
-
88
- // Execute middleware stack
89
- const context = await this.buildExecutionContext(command, args);
90
- const result = await command.middleware.execute(context);
91
-
92
- return result;
93
- }
94
-
95
- private resolveCommand(name: string): CommandModule | undefined {
96
- // Try exact match first
97
- if (this.commands.has(name)) {
98
- return this.commands.get(name);
99
- }
100
-
101
- // Try alias
102
- const aliasTarget = this.aliases.get(name);
103
- if (aliasTarget) {
104
- return this.commands.get(aliasTarget);
105
- }
106
-
107
- // Try fuzzy match
108
- return this.findFuzzyMatch(name);
109
- }
110
- }
111
- ```
112
-
113
- ## Command Decomposition Strategy
114
-
115
- ### Swarm Commands Module
116
-
117
- ```typescript
118
- // src/cli/commands/swarm/swarm.command.ts
119
- @Command({
120
- name: "swarm",
121
- description: "Swarm coordination and management",
122
- category: "orchestration",
123
- })
124
- export class SwarmCommand {
125
- constructor(
126
- private swarmCoordinator: UnifiedSwarmCoordinator,
127
- private promptService: InteractivePromptService,
128
- ) {}
129
-
130
- @SubCommand("init")
131
- @Option(
132
- "--topology",
133
- "Swarm topology (mesh|hierarchical|adaptive)",
134
- "hierarchical",
135
- )
136
- @Option("--agents", "Number of agents to spawn", 5)
137
- @Option("--interactive", "Interactive agent configuration", false)
138
- async init(
139
- @Arg("projectName") projectName: string,
140
- options: SwarmInitOptions,
141
- ): Promise<CommandResult> {
142
- if (options.interactive) {
143
- return this.interactiveSwarmInit(projectName);
144
- }
145
-
146
- return this.quickSwarmInit(projectName, options);
147
- }
148
-
149
- private async interactiveSwarmInit(
150
- projectName: string,
151
- ): Promise<CommandResult> {
152
- console.log(`🚀 Initializing Swarm for ${projectName}`);
153
-
154
- // Interactive topology selection
155
- const topology = await this.promptService.select({
156
- message: "Select swarm topology:",
157
- choices: [
158
- {
159
- name: "Hierarchical (Queen-led coordination)",
160
- value: "hierarchical",
161
- },
162
- { name: "Mesh (Peer-to-peer collaboration)", value: "mesh" },
163
- { name: "Adaptive (Dynamic topology switching)", value: "adaptive" },
164
- ],
165
- });
166
-
167
- // Agent configuration
168
- const agents = await this.promptAgentConfiguration();
169
-
170
- // Initialize with configuration
171
- const swarm = await this.swarmCoordinator.initialize({
172
- name: projectName,
173
- topology,
174
- agents,
175
- hooks: {
176
- onAgentSpawn: this.handleAgentSpawn.bind(this),
177
- onTaskComplete: this.handleTaskComplete.bind(this),
178
- onSwarmComplete: this.handleSwarmComplete.bind(this),
179
- },
180
- });
181
-
182
- return CommandResult.success({
183
- message: `✅ Swarm ${projectName} initialized with ${agents.length} agents`,
184
- data: { swarmId: swarm.id, topology, agentCount: agents.length },
185
- });
186
- }
187
-
188
- @SubCommand("status")
189
- async status(): Promise<CommandResult> {
190
- const swarms = await this.swarmCoordinator.listActiveSwarms();
191
-
192
- if (swarms.length === 0) {
193
- return CommandResult.info("No active swarms found");
194
- }
195
-
196
- // Interactive swarm selection if multiple
197
- const selectedSwarm =
198
- swarms.length === 1
199
- ? swarms[0]
200
- : await this.promptService.select({
201
- message: "Select swarm to inspect:",
202
- choices: swarms.map((s) => ({
203
- name: `${s.name} (${s.agents.length} agents, ${s.topology})`,
204
- value: s,
205
- })),
206
- });
207
-
208
- return this.displaySwarmStatus(selectedSwarm);
209
- }
210
- }
211
- ```
212
-
213
- ### Learning Commands Module
214
-
215
- ```typescript
216
- // src/cli/commands/learning/learning.command.ts
217
- @Command({
218
- name: "learning",
219
- description: "Learning system management and optimization",
220
- category: "intelligence",
221
- })
222
- export class LearningCommand {
223
- constructor(
224
- private learningService: IntegratedLearningService,
225
- private promptService: InteractivePromptService,
226
- ) {}
227
-
228
- @SubCommand("start")
229
- @Option("--algorithm", "RL algorithm to use", "auto")
230
- @Option("--tier", "Learning tier (basic|standard|advanced)", "standard")
231
- async start(options: LearningStartOptions): Promise<CommandResult> {
232
- // Auto-detect optimal algorithm if not specified
233
- if (options.algorithm === "auto") {
234
- const taskContext = await this.analyzeCurrentContext();
235
- options.algorithm =
236
- this.learningService.selectOptimalAlgorithm(taskContext);
237
-
238
- console.log(
239
- `🧠 Auto-selected ${options.algorithm} algorithm based on context`,
240
- );
241
- }
242
-
243
- const session = await this.learningService.startSession({
244
- algorithm: options.algorithm,
245
- tier: options.tier,
246
- userId: await this.getCurrentUser(),
247
- });
248
-
249
- return CommandResult.success({
250
- message: `🚀 Learning session started with ${options.algorithm}`,
251
- data: {
252
- sessionId: session.id,
253
- algorithm: options.algorithm,
254
- tier: options.tier,
255
- },
256
- });
257
- }
258
-
259
- @SubCommand("feedback")
260
- @Arg("reward", "Reward value (0-1)", "number")
261
- async feedback(
262
- @Arg("reward") reward: number,
263
- @Option("--context", "Additional context for learning")
264
- context?: string,
265
- ): Promise<CommandResult> {
266
- const activeSession = await this.learningService.getActiveSession();
267
- if (!activeSession) {
268
- return CommandResult.error(
269
- "No active learning session found. Start one with `learning start`",
270
- );
271
- }
272
-
273
- await this.learningService.submitFeedback({
274
- sessionId: activeSession.id,
275
- reward,
276
- context,
277
- timestamp: new Date(),
278
- });
279
-
280
- return CommandResult.success({
281
- message: `📊 Feedback recorded (reward: ${reward})`,
282
- data: { reward, sessionId: activeSession.id },
283
- });
284
- }
285
-
286
- @SubCommand("metrics")
287
- async metrics(): Promise<CommandResult> {
288
- const metrics = await this.learningService.getMetrics();
289
-
290
- // Interactive metrics display
291
- await this.displayInteractiveMetrics(metrics);
292
-
293
- return CommandResult.success("Metrics displayed");
294
- }
295
- }
296
- ```
297
-
298
- ## Interactive Prompt System
299
-
300
- ### Advanced Prompt Service
301
-
302
- ```typescript
303
- // src/cli/services/interactive-prompt.service.ts
304
- interface PromptOptions {
305
- message: string;
306
- type: "select" | "multiselect" | "input" | "confirm" | "progress";
307
- choices?: PromptChoice[];
308
- default?: any;
309
- validate?: (input: any) => boolean | string;
310
- transform?: (input: any) => any;
311
- }
312
-
313
- export class InteractivePromptService {
314
- private inquirer: any; // Dynamic import for tree-shaking
315
-
316
- async select<T>(options: SelectPromptOptions<T>): Promise<T> {
317
- const { default: inquirer } = await import("inquirer");
318
-
319
- const result = await inquirer.prompt([
320
- {
321
- type: "list",
322
- name: "selection",
323
- message: options.message,
324
- choices: options.choices,
325
- default: options.default,
326
- },
327
- ]);
328
-
329
- return result.selection;
330
- }
331
-
332
- async multiSelect<T>(options: MultiSelectPromptOptions<T>): Promise<T[]> {
333
- const { default: inquirer } = await import("inquirer");
334
-
335
- const result = await inquirer.prompt([
336
- {
337
- type: "checkbox",
338
- name: "selections",
339
- message: options.message,
340
- choices: options.choices,
341
- validate: (input: T[]) => {
342
- if (options.minSelections && input.length < options.minSelections) {
343
- return `Please select at least ${options.minSelections} options`;
344
- }
345
- if (options.maxSelections && input.length > options.maxSelections) {
346
- return `Please select at most ${options.maxSelections} options`;
347
- }
348
- return true;
349
- },
350
- },
351
- ]);
352
-
353
- return result.selections;
354
- }
355
-
356
- async input(options: InputPromptOptions): Promise<string> {
357
- const { default: inquirer } = await import("inquirer");
358
-
359
- const result = await inquirer.prompt([
360
- {
361
- type: "input",
362
- name: "input",
363
- message: options.message,
364
- default: options.default,
365
- validate: options.validate,
366
- transformer: options.transform,
367
- },
368
- ]);
369
-
370
- return result.input;
371
- }
372
-
373
- async progressTask<T>(
374
- task: ProgressTask<T>,
375
- options: ProgressOptions,
376
- ): Promise<T> {
377
- const { default: cliProgress } = await import("cli-progress");
378
-
379
- const progressBar = new cliProgress.SingleBar({
380
- format: `${options.title} |{bar}| {percentage}% | {status}`,
381
- barCompleteChar: "█",
382
- barIncompleteChar: "░",
383
- hideCursor: true,
384
- });
385
-
386
- progressBar.start(100, 0, { status: "Starting..." });
387
-
388
- try {
389
- const result = await task({
390
- updateProgress: (percent: number, status?: string) => {
391
- progressBar.update(percent, { status: status || "Processing..." });
392
- },
393
- });
394
-
395
- progressBar.update(100, { status: "Complete!" });
396
- progressBar.stop();
397
-
398
- return result;
399
- } catch (error) {
400
- progressBar.stop();
401
- throw error;
402
- }
403
- }
404
-
405
- async confirmWithDetails(
406
- message: string,
407
- details: ConfirmationDetails,
408
- ): Promise<boolean> {
409
- console.log("\n" + chalk.bold(message));
410
- console.log(chalk.gray("Details:"));
411
-
412
- for (const [key, value] of Object.entries(details)) {
413
- console.log(chalk.gray(` ${key}: ${value}`));
414
- }
415
-
416
- return this.confirm("\nProceed?");
417
- }
418
- }
419
- ```
420
-
421
- ## Enhanced Hooks Integration
422
-
423
- ### Deep CLI Hooks Integration
424
-
425
- ```typescript
426
- // src/cli/hooks/cli-hooks-manager.ts
427
- interface CLIHookEvent {
428
- type:
429
- | "command_start"
430
- | "command_end"
431
- | "command_error"
432
- | "agent_spawn"
433
- | "task_complete";
434
- command: string;
435
- args: string[];
436
- context: ExecutionContext;
437
- timestamp: Date;
438
- }
439
-
440
- export class CLIHooksManager {
441
- private hooks: Map<string, HookHandler[]> = new Map();
442
- private learningIntegration: LearningHooksIntegration;
443
-
444
- constructor() {
445
- this.learningIntegration = new LearningHooksIntegration();
446
- this.setupDefaultHooks();
447
- }
448
-
449
- private setupDefaultHooks(): void {
450
- // Learning integration hooks
451
- this.registerHook("command_start", async (event: CLIHookEvent) => {
452
- await this.learningIntegration.recordCommandStart(event);
453
- });
454
-
455
- this.registerHook("command_end", async (event: CLIHookEvent) => {
456
- await this.learningIntegration.recordCommandSuccess(event);
457
- });
458
-
459
- this.registerHook("command_error", async (event: CLIHookEvent) => {
460
- await this.learningIntegration.recordCommandError(event);
461
- });
462
-
463
- // Intelligent suggestions
464
- this.registerHook("command_start", async (event: CLIHookEvent) => {
465
- const suggestions = await this.generateIntelligentSuggestions(event);
466
- if (suggestions.length > 0) {
467
- this.displaySuggestions(suggestions);
468
- }
469
- });
470
-
471
- // Performance monitoring
472
- this.registerHook("command_end", async (event: CLIHookEvent) => {
473
- await this.recordPerformanceMetrics(event);
474
- });
475
- }
476
-
477
- async executeHooks(type: string, event: CLIHookEvent): Promise<void> {
478
- const handlers = this.hooks.get(type) || [];
479
-
480
- await Promise.all(
481
- handlers.map((handler) => this.executeHookSafely(handler, event)),
482
- );
483
- }
484
-
485
- private async generateIntelligentSuggestions(
486
- event: CLIHookEvent,
487
- ): Promise<Suggestion[]> {
488
- const context = await this.learningIntegration.getExecutionContext(event);
489
- const patterns =
490
- await this.learningIntegration.findSimilarPatterns(context);
491
-
492
- return patterns.map((pattern) => ({
493
- type: "optimization",
494
- message: `Based on similar executions, consider: ${pattern.suggestion}`,
495
- confidence: pattern.confidence,
496
- }));
497
- }
498
- }
499
- ```
500
-
501
- ### Learning Integration
502
-
503
- ```typescript
504
- // src/cli/hooks/learning-hooks-integration.ts
505
- export class LearningHooksIntegration {
506
- constructor(
507
- private agenticFlowHooks: AgenticFlowHooksClient,
508
- private agentDBLearning: AgentDBLearningClient,
509
- ) {}
510
-
511
- async recordCommandStart(event: CLIHookEvent): Promise<void> {
512
- // Start trajectory tracking
513
- await this.agenticFlowHooks.trajectoryStart({
514
- sessionId: event.context.sessionId,
515
- command: event.command,
516
- args: event.args,
517
- context: event.context,
518
- });
519
-
520
- // Record experience in AgentDB
521
- await this.agentDBLearning.recordExperience({
522
- type: "command_execution",
523
- state: this.encodeCommandState(event),
524
- action: event.command,
525
- timestamp: event.timestamp,
526
- });
527
- }
528
-
529
- async recordCommandSuccess(event: CLIHookEvent): Promise<void> {
530
- const executionTime = Date.now() - event.timestamp.getTime();
531
- const reward = this.calculateReward(event, executionTime, true);
532
-
533
- // Complete trajectory
534
- await this.agenticFlowHooks.trajectoryEnd({
535
- sessionId: event.context.sessionId,
536
- success: true,
537
- reward,
538
- verdict: "positive",
539
- });
540
-
541
- // Submit feedback to learning system
542
- await this.agentDBLearning.submitFeedback({
543
- sessionId: event.context.learningSessionId,
544
- reward,
545
- success: true,
546
- latencyMs: executionTime,
547
- });
548
-
549
- // Store successful pattern
550
- if (reward > 0.8) {
551
- await this.agenticFlowHooks.storePattern({
552
- pattern: event.command,
553
- solution: event.context.result,
554
- confidence: reward,
555
- });
556
- }
557
- }
558
-
559
- async recordCommandError(event: CLIHookEvent): Promise<void> {
560
- const executionTime = Date.now() - event.timestamp.getTime();
561
- const reward = this.calculateReward(event, executionTime, false);
562
-
563
- // Complete trajectory with error
564
- await this.agenticFlowHooks.trajectoryEnd({
565
- sessionId: event.context.sessionId,
566
- success: false,
567
- reward,
568
- verdict: "negative",
569
- error: event.context.error,
570
- });
571
-
572
- // Learn from failure
573
- await this.agentDBLearning.submitFeedback({
574
- sessionId: event.context.learningSessionId,
575
- reward,
576
- success: false,
577
- latencyMs: executionTime,
578
- error: event.context.error,
579
- });
580
- }
581
-
582
- private calculateReward(
583
- event: CLIHookEvent,
584
- executionTime: number,
585
- success: boolean,
586
- ): number {
587
- if (!success) return 0;
588
-
589
- // Base reward for success
590
- let reward = 0.5;
591
-
592
- // Performance bonus (faster execution)
593
- const expectedTime = this.getExpectedExecutionTime(event.command);
594
- if (executionTime < expectedTime) {
595
- reward += 0.3 * (1 - executionTime / expectedTime);
596
- }
597
-
598
- // Complexity bonus
599
- const complexity = this.calculateCommandComplexity(event);
600
- reward += complexity * 0.2;
601
-
602
- return Math.min(reward, 1.0);
603
- }
604
- }
605
- ```
606
-
607
- ## Intelligent Workflow Automation
608
-
609
- ### Workflow Orchestrator
610
-
611
- ```typescript
612
- // src/cli/workflows/workflow-orchestrator.ts
613
- interface WorkflowStep {
614
- id: string;
615
- command: string;
616
- args: string[];
617
- dependsOn: string[];
618
- condition?: WorkflowCondition;
619
- retryPolicy?: RetryPolicy;
620
- }
621
-
622
- export class WorkflowOrchestrator {
623
- constructor(
624
- private commandRegistry: ModularCommandRegistry,
625
- private promptService: InteractivePromptService,
626
- ) {}
627
-
628
- async executeWorkflow(workflow: Workflow): Promise<WorkflowResult> {
629
- const context = new WorkflowExecutionContext(workflow);
630
-
631
- // Display workflow overview
632
- await this.displayWorkflowOverview(workflow);
633
-
634
- const confirmed = await this.promptService.confirm(
635
- "Execute this workflow?",
636
- );
637
-
638
- if (!confirmed) {
639
- return WorkflowResult.cancelled();
640
- }
641
-
642
- // Execute steps
643
- return this.promptService.progressTask(
644
- async ({ updateProgress }) => {
645
- const steps = this.sortStepsByDependencies(workflow.steps);
646
-
647
- for (let i = 0; i < steps.length; i++) {
648
- const step = steps[i];
649
- updateProgress((i / steps.length) * 100, `Executing ${step.command}`);
650
-
651
- await this.executeStep(step, context);
652
- }
653
-
654
- return WorkflowResult.success(context.getResults());
655
- },
656
- { title: `Workflow: ${workflow.name}` },
657
- );
658
- }
659
-
660
- async generateWorkflowFromIntent(intent: string): Promise<Workflow> {
661
- // Use learning system to generate workflow
662
- const patterns = await this.findWorkflowPatterns(intent);
663
-
664
- if (patterns.length === 0) {
665
- throw new Error("Could not generate workflow for intent");
666
- }
667
-
668
- // Select best pattern or let user choose
669
- const selectedPattern =
670
- patterns.length === 1
671
- ? patterns[0]
672
- : await this.promptService.select({
673
- message: "Select workflow template:",
674
- choices: patterns.map((p) => ({
675
- name: `${p.name} (${p.confidence}% match)`,
676
- value: p,
677
- })),
678
- });
679
-
680
- return this.customizeWorkflow(selectedPattern, intent);
681
- }
682
-
683
- private async executeStep(
684
- step: WorkflowStep,
685
- context: WorkflowExecutionContext,
686
- ): Promise<void> {
687
- // Check conditions
688
- if (step.condition && !this.evaluateCondition(step.condition, context)) {
689
- context.skipStep(step.id, "Condition not met");
690
- return;
691
- }
692
-
693
- // Check dependencies
694
- const missingDeps = step.dependsOn.filter(
695
- (dep) => !context.isStepCompleted(dep),
696
- );
697
- if (missingDeps.length > 0) {
698
- throw new WorkflowError(
699
- `Step ${step.id} has unmet dependencies: ${missingDeps.join(", ")}`,
700
- );
701
- }
702
-
703
- // Execute with retry policy
704
- const retryPolicy = step.retryPolicy || { maxAttempts: 1 };
705
- let lastError: Error | null = null;
706
-
707
- for (let attempt = 1; attempt <= retryPolicy.maxAttempts; attempt++) {
708
- try {
709
- const result = await this.commandRegistry.executeCommand(
710
- step.command,
711
- step.args,
712
- );
713
- context.completeStep(step.id, result);
714
- return;
715
- } catch (error) {
716
- lastError = error as Error;
717
-
718
- if (attempt < retryPolicy.maxAttempts) {
719
- await this.delay(retryPolicy.backoffMs || 1000);
720
- }
721
- }
722
- }
723
-
724
- throw new WorkflowError(
725
- `Step ${step.id} failed after ${retryPolicy.maxAttempts} attempts: ${lastError?.message}`,
726
- );
727
- }
728
- }
729
- ```
730
-
731
- ## Performance Optimization
732
-
733
- ### Command Performance Monitoring
734
-
735
- ```typescript
736
- // src/cli/performance/command-performance.ts
737
- export class CommandPerformanceMonitor {
738
- private metrics = new Map<string, CommandMetrics>();
739
-
740
- async measureCommand<T>(
741
- commandName: string,
742
- executor: () => Promise<T>,
743
- ): Promise<T> {
744
- const start = performance.now();
745
- const memBefore = process.memoryUsage();
746
-
747
- try {
748
- const result = await executor();
749
- const end = performance.now();
750
- const memAfter = process.memoryUsage();
751
-
752
- this.recordMetrics(commandName, {
753
- executionTime: end - start,
754
- memoryDelta: memAfter.heapUsed - memBefore.heapUsed,
755
- success: true,
756
- });
757
-
758
- return result;
759
- } catch (error) {
760
- const end = performance.now();
761
-
762
- this.recordMetrics(commandName, {
763
- executionTime: end - start,
764
- memoryDelta: 0,
765
- success: false,
766
- error: error as Error,
767
- });
768
-
769
- throw error;
770
- }
771
- }
772
-
773
- private recordMetrics(
774
- command: string,
775
- measurement: PerformanceMeasurement,
776
- ): void {
777
- if (!this.metrics.has(command)) {
778
- this.metrics.set(command, new CommandMetrics(command));
779
- }
780
-
781
- const metrics = this.metrics.get(command)!;
782
- metrics.addMeasurement(measurement);
783
-
784
- // Alert if performance degrades
785
- if (metrics.getP95ExecutionTime() > 5000) {
786
- // 5 seconds
787
- console.warn(
788
- `⚠️ Command '${command}' is performing slowly (P95: ${metrics.getP95ExecutionTime()}ms)`,
789
- );
790
- }
791
- }
792
-
793
- getCommandReport(command: string): PerformanceReport {
794
- const metrics = this.metrics.get(command);
795
- if (!metrics) {
796
- throw new Error(`No metrics found for command: ${command}`);
797
- }
798
-
799
- return {
800
- command,
801
- totalExecutions: metrics.getTotalExecutions(),
802
- successRate: metrics.getSuccessRate(),
803
- avgExecutionTime: metrics.getAverageExecutionTime(),
804
- p95ExecutionTime: metrics.getP95ExecutionTime(),
805
- avgMemoryUsage: metrics.getAverageMemoryUsage(),
806
- recommendations: this.generateRecommendations(metrics),
807
- };
808
- }
809
- }
810
- ```
811
-
812
- ## Smart Auto-completion
813
-
814
- ### Intelligent Command Completion
815
-
816
- ```typescript
817
- // src/cli/completion/intelligent-completion.ts
818
- export class IntelligentCompletion {
819
- constructor(
820
- private learningService: LearningService,
821
- private commandRegistry: ModularCommandRegistry,
822
- ) {}
823
-
824
- async generateCompletions(
825
- partial: string,
826
- context: CompletionContext,
827
- ): Promise<Completion[]> {
828
- const completions: Completion[] = [];
829
-
830
- // 1. Exact command matches
831
- const exactMatches = this.commandRegistry.findCommandsByPrefix(partial);
832
- completions.push(
833
- ...exactMatches.map((cmd) => ({
834
- value: cmd.name,
835
- description: cmd.description,
836
- type: "command",
837
- confidence: 1.0,
838
- })),
839
- );
840
-
841
- // 2. Learning-based suggestions
842
- const learnedSuggestions = await this.learningService.suggestCommands(
843
- partial,
844
- context,
845
- );
846
- completions.push(...learnedSuggestions);
847
-
848
- // 3. Context-aware suggestions
849
- const contextualSuggestions = await this.generateContextualSuggestions(
850
- partial,
851
- context,
852
- );
853
- completions.push(...contextualSuggestions);
854
-
855
- // Sort by confidence and relevance
856
- return completions.sort((a, b) => b.confidence - a.confidence).slice(0, 10); // Top 10 suggestions
857
- }
858
-
859
- private async generateContextualSuggestions(
860
- partial: string,
861
- context: CompletionContext,
862
- ): Promise<Completion[]> {
863
- const suggestions: Completion[] = [];
864
-
865
- // If in git repository, suggest git-related commands
866
- if (context.isGitRepository) {
867
- if (partial.startsWith("git")) {
868
- suggestions.push({
869
- value: "git commit",
870
- description: "Create git commit with generated message",
871
- type: "workflow",
872
- confidence: 0.8,
873
- });
874
- }
875
- }
876
-
877
- // If package.json exists, suggest npm commands
878
- if (context.hasPackageJson) {
879
- if (partial.startsWith("npm") || partial.startsWith("swarm")) {
880
- suggestions.push({
881
- value: "swarm init",
882
- description: "Initialize swarm for this project",
883
- type: "workflow",
884
- confidence: 0.9,
885
- });
886
- }
887
- }
888
-
889
- return suggestions;
890
- }
891
- }
892
- ```
893
-
894
- ## Success Metrics
895
-
896
- ### CLI Performance Targets
897
-
898
- - [ ] **Command Response**: <200ms average command execution time
899
- - [ ] **File Decomposition**: index.ts (108KB) → <10KB per command module
900
- - [ ] **Interactive UX**: Smart prompts with context awareness
901
- - [ ] **Hook Integration**: Deep lifecycle integration with learning
902
- - [ ] **Workflow Automation**: Intelligent multi-step command orchestration
903
- - [ ] **Auto-completion**: >90% accuracy for command suggestions
904
-
905
- ### User Experience Improvements
906
-
907
- ```typescript
908
- const cliImprovements = {
909
- before: {
910
- commandResponse: "~500ms",
911
- interactivity: "Basic command parsing",
912
- workflows: "Manual command chaining",
913
- suggestions: "Static help text",
914
- },
915
-
916
- after: {
917
- commandResponse: "<200ms with caching",
918
- interactivity: "Smart context-aware prompts",
919
- workflows: "Automated multi-step execution",
920
- suggestions: "Learning-based intelligent completion",
921
- },
922
- };
923
- ```
924
-
925
- ## Related Skills
926
-
927
- - `core-implementation` - Core domain integration
928
- - `memory-unification` - Memory-backed command caching
929
- - `swarm-coordination` - CLI swarm management integration
930
- - `performance-optimization` - CLI performance monitoring
931
-
932
- ## Usage Examples
933
-
934
- ### Complete CLI Modernization
935
-
936
- ```bash
937
- # Full CLI modernization implementation
938
- Task("CLI modernization implementation",
939
- "Implement modular commands, interactive prompts, and intelligent workflows",
940
- "cli-hooks-developer")
941
- ```
942
-
943
- ### Interactive Command Enhancement
944
-
945
- ```bash
946
- # Enhanced interactive commands
947
- monomind swarm init --interactive
948
- monomind learning start --guided
949
- monomind workflow create --from-intent "setup new project"
950
- ```