@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
@@ -0,0 +1,526 @@
1
+ ---
2
+ name: mastermind:do
3
+ description: "Mastermind — Execute tasks from a task file (default, docs/tasks/) or monotask board (--monotask flag) with parallel, minimal, or sequential agent modes, context group routing, and review cycles"
4
+ ---
5
+
6
+ ## Repeat Flag Extraction
7
+
8
+ **Before all other parsing:** Extract and discard `--repeat`, `--tillend`, `--maxruns`, `--wait` from `$ARGUMENTS` so they don't interfere with the command's own argument parser. `mastermind:do` manages its own task-board-driven loop internally (see end of command) — the REPEAT POSTAMBLE is NOT used. To wrap this command with an external loop, use `/mastermind:repeat -- /mastermind:do ...`.
9
+
10
+ ## Argument Parsing
11
+
12
+ **Extract `--monotask` flag first:** If `--monotask` is present, set `USE_MONOTASK=true` and remove it. Default: `USE_MONOTASK=false`.
13
+
14
+ Parse remaining `$ARGUMENTS` for the following flags (in any order):
15
+
16
+ - `--file <path>` — *(file mode only)* use this specific task file; skip file discovery
17
+ - `--space <SPACE_ID>` — *(monotask mode only)* use this space directly (skip space discovery)
18
+ - `--board <BOARD_ID>` — *(monotask mode only)* use this task board directly (skip board discovery)
19
+ - `--filter <text>` — only process tasks whose title contains this text (case-insensitive)
20
+ - `--mode <parallel|minimal|sequential>` — execution mode (default: ask user)
21
+ - `--max-agents <N>` — cap total agent spawns per run (default: 20)
22
+
23
+ If `$ARGUMENTS` contains none of these flags, treat the entire string as a filter (legacy mode).
24
+
25
+ If `--space` and `--board` are both provided (monotask mode), skip Step 1 entirely and go straight to column discovery on the given board.
26
+
27
+ ---
28
+
29
+ ## Step 0: Check monotask CLI *(skip unless `--monotask` was passed)*
30
+
31
+ **Only run this step if `USE_MONOTASK=true`.**
32
+
33
+ ```bash
34
+ command -v monotask
35
+ ```
36
+ If not found: attempt `cargo install monotask`. If cargo missing, tell user to install Rust first and STOP.
37
+
38
+ ---
39
+
40
+ ## Step 1: Find Work
41
+
42
+ **File mode (default, `USE_MONOTASK=false`):**
43
+
44
+ If `--file <path>` was provided: use that path as `TASK_FILE`. Otherwise:
45
+ ```bash
46
+ # Find the most recently modified task file
47
+ TASK_FILE=$(ls -t docs/tasks/*.md 2>/dev/null | head -1)
48
+ ```
49
+ If no file found, output "No task file found. Run `/mastermind:createtask` first to generate one." and STOP.
50
+
51
+ Read `TASK_FILE`. Store the path — it will be passed through all continuation prompts.
52
+
53
+ ---
54
+
55
+ **Monotask mode (`USE_MONOTASK=true`):**
56
+
57
+ If `--space` and `--board` were provided: use directly, jump to column discovery.
58
+
59
+ Otherwise:
60
+ 1. **Repo name**: `git remote get-url origin` → strip path + `.git`. Fallback: `basename` of cwd. Store `REPO_NAME`.
61
+ 2. **Find space**: `monotask space list` → find space named `$REPO_NAME`. If missing: "No monotask space found. Run `/mastermind:ideate` first." STOP. Store `SPACE_ID`.
62
+ 3. **Find board**: `npx monomind@latest memory search "monomind-task board_id"` → use if found. Otherwise scan `monotask space boards list $SPACE_ID` for the one with a `Backlog` column. If not found: "No task board found. Run `/mastermind:createtask --monotask` first." STOP. Store `TASK_BOARD_ID`.
63
+ 4. **Column IDs**: `monotask column list $TASK_BOARD_ID --json` → map `COL_BACKLOG`, `COL_TODO`, `COL_IN_PROGRESS`, `COL_REVIEW`, `COL_HUMAN_IN_LOOP`, `COL_DONE`.
64
+
65
+ ---
66
+
67
+ ## Step 2: Scan All Tasks and Build Execution Plan
68
+
69
+ ### 2a: Load all pending tasks
70
+
71
+ **File mode:** Read `TASK_FILE`. Find all `## Task N: <title>` sections with `> status: todo` or `> status: backlog`. Follow the parsing spec in `_taskfile.md`. If `--filter` was set, keep only tasks whose title contains the filter text (case-insensitive).
72
+
73
+ **Monotask mode:**
74
+ ```bash
75
+ monotask card list $TASK_BOARD_ID $COL_TODO --json
76
+ monotask card list $TASK_BOARD_ID $COL_BACKLOG --json
77
+ ```
78
+ Apply `--filter` if set.
79
+
80
+ If no tasks found (either mode), output:
81
+ ```
82
+ [mastermind:do] No tasks in Todo or Backlog. Queue empty.
83
+ ```
84
+ Remove any loop state files and STOP.
85
+
86
+ ### 2b: Read task metadata
87
+
88
+ **File mode:** For each task section, extract from the blockquote lines:
89
+ - `> agent:` → assigned agent type
90
+ - `> context_group:` → context group
91
+ - `> prerequisites:` → prerequisites (comma-separated titles or "none")
92
+ - `> parallel_safe:` → parallel safe flag (default `true`)
93
+
94
+ **Monotask mode:** For each card, read its comments to extract the same fields from "Assigned agent:", "Context group:", "Prerequisites:", "Parallel safe:" comment lines.
95
+
96
+ ### 2c: Build context groups
97
+
98
+ Group tasks by `context_group`:
99
+ - Same context group → **chain** (sequential, same agent)
100
+ - `independent` or no group → **independent** (parallelizable)
101
+ - Within a chain, order by prerequisites (prerequisite first)
102
+
103
+ ### 2d: Check execution strategy
104
+
105
+ **File mode:** Read `recommended_mode` from the frontmatter of `TASK_FILE`. Use as the default.
106
+
107
+ **Monotask mode:** Call `mcp__monomind__memory_search` with `"task-strategy:<REPO_NAME>"`. If found, use `recommended_execution_mode` as default.
108
+
109
+ ### 2e: Choose execution mode
110
+
111
+ **If `--mode` was provided:** Use that mode.
112
+
113
+ **If session memory has a recommendation:** Present it as default.
114
+
115
+ **Otherwise, ask the user:**
116
+
117
+ ```
118
+ [mastermind:do] Found N tasks: X in context groups, Y independent.
119
+
120
+ Context groups:
121
+ - <group-1>: 3 tasks (agent: backend-dev, sequential)
122
+ - <group-2>: 2 tasks (agent: Frontend Developer, sequential)
123
+ - independent: 4 tasks (mixed agents, parallelizable)
124
+
125
+ How do you want to execute?
126
+
127
+ 1. **Parallel** — Spawn one agent per context group + one per independent task. (~N agents, fastest)
128
+ 2. **Minimal** — One agent per context group + one shared agent for all independents. (~M agents, balanced)
129
+ 3. **Sequential** — One agent processes everything in order. (1 agent, cheapest)
130
+ ```
131
+
132
+ Store chosen mode as `EXEC_MODE`.
133
+
134
+ ---
135
+
136
+ ## Step 3: Initialize Loop State
137
+
138
+ Generate a loop ID and write the initial state file:
139
+ ```bash
140
+ mkdir -p .monomind/loops
141
+ NOW_MS=$(python3 -c 'import time;print(int(time.time()*1000))' 2>/dev/null || echo "$(date +%s)000")
142
+ export DO_LOOP_ID="do-${NOW_MS}"
143
+ cat > ".monomind/loops/${DO_LOOP_ID}.json" << EOF
144
+ {
145
+ "id": "${DO_LOOP_ID}",
146
+ "sessionId": "${DO_LOOP_ID}",
147
+ "type": "do",
148
+ "prompt": "/mastermind:do $ARGUMENTS",
149
+ "mode": "${EXEC_MODE}",
150
+ "currentTask": "starting...",
151
+ "taskFile": "${TASK_FILE:-}",
152
+ "spaceId": "${SPACE_ID:-}",
153
+ "boardId": "${TASK_BOARD_ID:-}",
154
+ "useMonotask": "${USE_MONOTASK:-false}",
155
+ "filter": "${FILTER:-}",
156
+ "startedAt": ${NOW_MS},
157
+ "lastRunAt": ${NOW_MS},
158
+ "nextRunAt": 0,
159
+ "status": "running"
160
+ }
161
+ EOF
162
+ ```
163
+
164
+ Check if a stop was requested:
165
+ ```bash
166
+ [ -f ".monomind/loops/${DO_LOOP_ID}.stop" ] && echo "DO_STOP_REQUESTED=true"
167
+ ```
168
+ If `DO_STOP_REQUESTED=true`, output `[mastermind:do] Stop requested via dashboard. Halting.`, remove state files, and STOP.
169
+
170
+ ---
171
+
172
+ ## Step 4: Execute Based on Mode
173
+
174
+ ### Agent Budget Guard
175
+
176
+ Before spawning, count total agents needed:
177
+ - **Parallel**: one per context group + one per independent task
178
+ - **Minimal**: one per context group + one shared
179
+ - **Sequential**: one
180
+
181
+ If total exceeds `--max-agents` (default: 20), downgrade mode automatically:
182
+ - Parallel → Minimal (if still over budget → Sequential)
183
+ - Output: `[mastermind:do] Agent budget exceeded (N > max-agents). Downgrading to <mode>.`
184
+
185
+ Track `AGENTS_SPAWNED` counter. If it hits the limit mid-run (e.g., during review cycles), stop spawning and queue remaining work for the next cycle.
186
+
187
+ ### Mode: Parallel
188
+
189
+ Spawn ALL agents in ONE message using the Agent tool:
190
+
191
+ **For each context group chain:**
192
+ - Spawn ONE agent of the chain's recommended type
193
+ - Provide it with ALL tasks in the chain, in prerequisite order
194
+ - The agent executes them sequentially, committing after each
195
+ - Agent prompt includes: full task context for ALL tasks in the chain, project context, instruction to execute in order
196
+
197
+ **For each independent task:**
198
+ - Spawn ONE agent of the task's assigned type
199
+ - Provide it with that single task's context
200
+ - The agent executes and commits
201
+
202
+ All agents run concurrently via `run_in_background: true`.
203
+
204
+ **Agent prompt template for chain execution:**
205
+ ```
206
+ You have N tasks to execute in order. Complete each one before moving to the next.
207
+ Tasks share context — knowledge from earlier tasks applies to later ones.
208
+
209
+ == AGENT DELEGATION CAPABILITY ==
210
+ You have full access to the Agent tool (Claude Code: Task tool) to spawn
211
+ sub-agents for any specialized subtask. This capability is recursive —
212
+ sub-agents you spawn also receive it.
213
+
214
+ Available agent categories:
215
+ CORE coder · reviewer · tester · planner · researcher
216
+ BACKEND backend-dev · Backend Architect · DB Optimizer · API Tester
217
+ FRONTEND Frontend Developer · mobile-dev · Mobile App Builder
218
+ ARCH Software Architect · system-architect
219
+ SECURITY Security Engineer · security-architect
220
+ AI/ML AI Engineer · ml-developer · Data Engineer
221
+ DEVOPS DevOps Automator · SRE · cicd-engineer
222
+ DOCS Technical Writer · api-docs
223
+ PRODUCT Product Manager · Launch Strategist · CRO Specialist
224
+ MARKETING Content Creator · SEO Specialist · Growth Hacker
225
+ SOCIAL TikTok · LinkedIn · Twitter · Instagram Strategist
226
+ SALES Deal Strategist · Sales Coach · Outbound Strategist
227
+ BUSINESS Finance Tracker · Legal Compliance Checker · Analytics Reporter
228
+ DESIGN Monodesign (UI/UX · brand · CSS · animation · design systems)
229
+
230
+ Delegate when: a subtask needs deeper expertise, parallel work speeds things up,
231
+ or a subtask is outside your domain but blocks your progress.
232
+ How: Agent({ subagent_type: "slug", prompt: `full briefing + this delegation block`, run_in_background: true })
233
+ =================================
234
+
235
+ TASK 1 of N: <title>
236
+ <full task context, checklist, acceptance criteria>
237
+
238
+ TASK 2 of N: <title>
239
+ <full task context, checklist, acceptance criteria>
240
+ ...
241
+
242
+ For each task:
243
+ 1. Implement the changes following the checklist
244
+ 2. Write/update tests
245
+ 3. Verify tests pass
246
+ 4. Commit with descriptive message
247
+ 5. Write a HANDOFF CONTEXT section (3-5 lines): what files changed, what decisions were made, what the next task needs to know
248
+ 6. Report: DONE | DONE_WITH_CONCERNS | BLOCKED (with details)
249
+
250
+ IMPORTANT — Handoff Context:
251
+ After completing each task in the chain, write a brief ## Handoff Context block:
252
+ - Files created/modified (with paths)
253
+ - Key decisions made (naming, patterns chosen, trade-offs)
254
+ - State the next task inherits (new types, config values, API shapes)
255
+ This ensures continuity even if context is compressed between tasks.
256
+
257
+ If you are BLOCKED on any task, STOP the entire chain. Do not attempt subsequent tasks.
258
+ Report which task is blocked and list the remaining unstarted tasks.
259
+ ```
260
+
261
+ **Agent prompt template for independent tasks:**
262
+ ```
263
+ Execute this single task:
264
+
265
+ == AGENT DELEGATION CAPABILITY ==
266
+ You have full access to the Agent tool (Claude Code: Task tool) to spawn
267
+ sub-agents for any specialized subtask. This capability is recursive —
268
+ sub-agents you spawn also receive it.
269
+
270
+ Available agent categories:
271
+ CORE coder · reviewer · tester · planner · researcher
272
+ BACKEND backend-dev · Backend Architect · DB Optimizer · API Tester
273
+ FRONTEND Frontend Developer · mobile-dev · Mobile App Builder
274
+ ARCH Software Architect · system-architect
275
+ SECURITY Security Engineer · security-architect
276
+ AI/ML AI Engineer · ml-developer · Data Engineer
277
+ DEVOPS DevOps Automator · SRE · cicd-engineer
278
+ DOCS Technical Writer · api-docs
279
+ PRODUCT Product Manager · Launch Strategist · CRO Specialist
280
+ MARKETING Content Creator · SEO Specialist · Growth Hacker
281
+ SOCIAL TikTok · LinkedIn · Twitter · Instagram Strategist
282
+ SALES Deal Strategist · Sales Coach · Outbound Strategist
283
+ BUSINESS Finance Tracker · Legal Compliance Checker · Analytics Reporter
284
+ DESIGN Monodesign (UI/UX · brand · CSS · animation · design systems)
285
+
286
+ Delegate when: a subtask needs deeper expertise, parallel work speeds things up,
287
+ or a subtask is outside your domain but blocks your progress.
288
+ How: Agent({ subagent_type: "slug", prompt: `full briefing + this delegation block`, run_in_background: true })
289
+ =================================
290
+
291
+ TASK: <title>
292
+ <full task context, checklist, acceptance criteria>
293
+
294
+ 1. Implement the changes following the checklist
295
+ 2. Write/update tests
296
+ 3. Verify tests pass
297
+ 4. Commit with descriptive message
298
+ 5. Report: DONE | DONE_WITH_CONCERNS | BLOCKED (with details)
299
+ ```
300
+
301
+ Mark tasks as in-progress before spawning agents:
302
+
303
+ *File mode:* For each task being dispatched, use Edit on `TASK_FILE` to change `> status: todo` → `> status: in_progress` in that task's section.
304
+
305
+ *Monotask mode:*
306
+ ```bash
307
+ monotask card move $TASK_BOARD_ID $CARD_ID $COL_IN_PROGRESS --json
308
+ ```
309
+
310
+ ### Mode: Minimal
311
+
312
+ Same as parallel, but:
313
+ - One agent per context group chain (same as parallel)
314
+ - ONE shared agent for ALL independent tasks (executes them sequentially)
315
+ - Total agents = number of context groups + 1
316
+
317
+ ### Mode: Sequential
318
+
319
+ Spawn ONE agent with ALL tasks (all chains flattened into prerequisite order, then independents):
320
+ - The single agent receives every task
321
+ - Executes them in order, committing after each
322
+ - Maximum context preservation, minimum cost
323
+
324
+ ---
325
+
326
+ ## Step 5: Gather Project Context (for agent prompts)
327
+
328
+ Collect in parallel (skip any that error):
329
+
330
+ 1. **README**: Read `README.md` (first 200 lines).
331
+ 2. **Package manifest**: Read whichever exists first: `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`.
332
+ 3. **Memory search**: Call `mcp__monomind__memory_search` with the first task's title.
333
+ 4. **Knowledge graph**: Call `mcp__monomind__monograph_suggest` with the first task's title.
334
+
335
+ Bundle into `PROJECT_CONTEXT` and include in every agent prompt.
336
+
337
+ ---
338
+
339
+ ## Step 6: Read Full Task Context (for each task)
340
+
341
+ **File mode:** Read from `TASK_FILE` using the Read tool. For the target task, extract everything between `## Task N: <title>` and the next `---` separator. This includes: What/Why/Where/Context sections, Definition of Done checkboxes, Testing Criteria, and Checklist items. Bundle into `TASK_CONTEXT`.
342
+
343
+ **Monotask mode:**
344
+
345
+ 1. `monotask card view $TASK_BOARD_ID $CARD_ID` → title, description, effort, priority
346
+ 2. `monotask card comment list $TASK_BOARD_ID $CARD_ID --json` → parse for agent type, context group, prerequisites, acceptance criteria
347
+ 3. Retrieve checklist:
348
+ ```bash
349
+ CHECKLIST_ID=$(monotask card comment list $TASK_BOARD_ID $CARD_ID --json \
350
+ | jq -r '.[].text' | grep '^CHECKLIST_ID:' | head -1 | cut -d: -f2 | tr -d ' ')
351
+ ```
352
+
353
+ Bundle into `TASK_CONTEXT` for that task.
354
+
355
+ ---
356
+
357
+ ## Step 7: Handle Agent Results
358
+
359
+ After each agent completes (or all agents in parallel mode), process results:
360
+
361
+ ### For each completed task:
362
+
363
+ **If DONE or DONE_WITH_CONCERNS:**
364
+
365
+ *File mode:* Edit `TASK_FILE` — change `> status: in_progress` → `> status: review` in that task's section. (This prevents the task from being re-picked if the loop wakes up during the review cycle.)
366
+
367
+ *Monotask mode:* No status change yet — card stays in `In Progress` until reviewer approves in Step 9.
368
+
369
+ - Proceed to review cycle (Step 8)
370
+
371
+ **If BLOCKED:**
372
+
373
+ *File mode:* Use the Edit tool on `TASK_FILE`:
374
+ - Change `> status: in_progress` → `> status: blocked` in that task's section
375
+ - Append `> blocked_reason: <question or issue>` after the status line
376
+ - For each downstream chain task: change `> status: todo` → `> status: backlog` and append `> blocked_reason: prerequisite '<blocked task title>' is blocked`
377
+
378
+ *Monotask mode:*
379
+ ```bash
380
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Blocked: <question or issue>"
381
+ monotask card move $TASK_BOARD_ID $CARD_ID $COL_HUMAN_IN_LOOP --json
382
+ # For each chain dependent:
383
+ monotask card move $TASK_BOARD_ID $DEPENDENT_CARD_ID $COL_BACKLOG --json
384
+ monotask card comment add $TASK_BOARD_ID $DEPENDENT_CARD_ID "Chain paused: prerequisite '<blocked task title>' is blocked. Reason: <blocker summary>"
385
+ ```
386
+
387
+ Do NOT attempt to execute remaining chain tasks in either mode.
388
+
389
+ ---
390
+
391
+ ## Step 8: Review and Bug Fix Cycle
392
+
393
+ After execution completes (DONE or DONE_WITH_CONCERNS), run a review session BEFORE moving the card.
394
+
395
+ ### 8a: Spawn a Code Reviewer
396
+
397
+ Spawn a `feature-dev:code-reviewer` agent via the Agent tool. Provide:
398
+ - The list of files modified (from the implementer's report)
399
+ - The `TASK_CONTEXT` (so the reviewer knows what was intended)
400
+ - The `PROJECT_CONTEXT`
401
+ - Instructions: review the changes for correctness, bugs, security issues, test coverage, and adherence to the task requirements. Run the test suite if one exists.
402
+
403
+ The reviewer MUST report:
404
+ - **APPROVED**: Changes look correct, tests pass, no issues found.
405
+ - **BUGS_FOUND**: List of specific bugs or issues found, with file paths and descriptions.
406
+ - **TESTS_FAILING**: Which tests fail and why.
407
+
408
+ ### 8b: If BUGS_FOUND or TESTS_FAILING
409
+
410
+ Spawn the original implementer agent (same type) to fix the issues. Provide:
411
+ - The reviewer's findings (exact bug descriptions, failing tests)
412
+ - The original `TASK_CONTEXT` for reference
413
+ - Instructions: fix the reported issues, run tests, commit the fixes
414
+
415
+ After the fix agent completes, run the reviewer AGAIN (repeat 8a). Loop until the reviewer returns **APPROVED** or a maximum of 3 fix cycles. If still not approved after 3 cycles:
416
+
417
+ *File mode:* Edit `TASK_FILE` — change `> status: review` → `> status: blocked`, append `> blocked_reason: max review cycles reached — <list unresolved issues>`
418
+
419
+ *Monotask mode:*
420
+ ```bash
421
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Unresolved issues: <list>"
422
+ monotask card move $TASK_BOARD_ID $CARD_ID $COL_HUMAN_IN_LOOP --json
423
+ ```
424
+
425
+ STOP processing this card.
426
+
427
+ ### 8c: If APPROVED
428
+
429
+ Proceed to Step 9.
430
+
431
+ ---
432
+
433
+ ## Step 9: Update State Based on Result
434
+
435
+ ### If APPROVED (from review cycle):
436
+
437
+ *File mode:* Use the Edit tool on `TASK_FILE`:
438
+ 1. Change `> status: review` → `> status: done` in that task's section
439
+ 2. Replace all `- [ ]` with `- [x]` in that task's Checklist section
440
+ 3. If DONE_WITH_CONCERNS: append `> concerns: <concerns>` after the status line
441
+ 4. **Unblock dependents**: Follow the "Prerequisite Unblock Logic" from `_taskfile.md` — find tasks whose prerequisites are now all `done` and change their status from `backlog` to `todo`.
442
+
443
+ *Monotask mode:*
444
+ ```bash
445
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Completed and reviewed: <summary>"
446
+ # Mark checklist items:
447
+ ITEM_IDS=$(monotask card comment list $TASK_BOARD_ID $CARD_ID --json \
448
+ | jq -r '.[].text' | grep '^ITEM_IDS:' | head -1 | sed 's/^ITEM_IDS: //')
449
+ for ITEM_ID in $(echo "$ITEM_IDS" | tr ',' '\n'); do
450
+ [ -n "$ITEM_ID" ] && monotask checklist item-check $TASK_BOARD_ID $CARD_ID $CHECKLIST_ID "$ITEM_ID"
451
+ done
452
+ # If DONE_WITH_CONCERNS:
453
+ monotask card comment add $TASK_BOARD_ID $CARD_ID "Concerns: <concerns>"
454
+ # Move to Review:
455
+ monotask card move $TASK_BOARD_ID $CARD_ID $COL_REVIEW --json
456
+ # Unblock dependents:
457
+ monotask card move $TASK_BOARD_ID $DEPENDENT_CARD_ID $COL_TODO --json
458
+ ```
459
+
460
+ ---
461
+
462
+ ## Step 10: Summary and Next Cycle
463
+
464
+ Output a status summary:
465
+ ```
466
+ [mastermind:do] Execution complete (mode: <parallel|minimal|sequential>)
467
+
468
+ | Task | Status | Agent | Review |
469
+ |-------------------------------|----------------|-------------|------------|
470
+ | <title> | Review | backend-dev | approved |
471
+ | <title> | Review | coder | approved |
472
+ | <title> | Human in Loop | coder | blocked |
473
+ ```
474
+
475
+ Then check for remaining tasks:
476
+
477
+ *File mode:* Re-read `TASK_FILE`. Count sections with `> status: todo` or `> status: backlog`.
478
+
479
+ *Monotask mode:*
480
+ ```bash
481
+ monotask card list $TASK_BOARD_ID $COL_TODO --json
482
+ monotask card list $TASK_BOARD_ID $COL_BACKLOG --json
483
+ ```
484
+
485
+ If tasks remain (including newly unblocked ones), output:
486
+ ```
487
+ [mastermind:do] Remaining: N in Todo, M in Backlog. Processing next batch in 2 minutes...
488
+ ```
489
+
490
+ Update loop state and use `ScheduleWakeup` with `delaySeconds: 120`.
491
+
492
+ - **File mode:** prompt = `/mastermind:do --file <TASK_FILE> --mode <EXEC_MODE>` (append `--filter <FILTER>` if set)
493
+ - **Monotask mode:** prompt = `/mastermind:do --monotask --space $SPACE_ID --board $TASK_BOARD_ID --mode $EXEC_MODE` (append `--filter <FILTER>` if set)
494
+
495
+ If no tasks remain, output:
496
+ ```
497
+ [mastermind:do] All tasks processed. Queue empty.
498
+ ```
499
+
500
+ To repeat this command on a schedule, wrap it with `/mastermind:repeat`.
501
+
502
+ ### Store execution outcome in session memory
503
+
504
+ Call `mcp__monomind__memory_store` with:
505
+ ```json
506
+ {
507
+ "key": "execution-outcome:<REPO_NAME>:<timestamp>",
508
+ "content": {
509
+ "mode": "<EXEC_MODE>",
510
+ "tasks_completed": N,
511
+ "tasks_blocked": M,
512
+ "agents_spawned": K,
513
+ "review_cycles": L,
514
+ "outcome": "success | partial | blocked",
515
+ "lessons": ["any patterns observed — e.g. 'context groups worked well', 'task X was too large']"
516
+ },
517
+ "tags": ["execution-outcome", "monomind-do"]
518
+ }
519
+ ```
520
+
521
+ Remove the loop state file:
522
+ ```bash
523
+ rm -f ".monomind/loops/${DO_LOOP_ID}.json" ".monomind/loops/${DO_LOOP_ID}.stop"
524
+ ```
525
+
526
+ Do NOT schedule another wake-up. STOP.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mastermind-execute
3
+ description: Execute a written implementation plan step by step with review checkpoints and finishing handoff.
4
+ ---
5
+
6
+ **First — extract repeat flags:** Follow REPEAT PREAMBLE from `_repeat.md`.
7
+
8
+ Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text (treated as plan path or goal).
9
+
10
+ Load brain context (follow `_protocol.md` Brain Load Procedure).
11
+
12
+ Default mode: **auto**.
13
+
14
+ ---
15
+
16
+ Invoke `Skill("mastermind:execute")` passing: brain_context, params, mode.
17
+
18
+ After skill returns: follow `_protocol.md` Brain Write Procedure.
19
+
20
+ Invoke `Skill("mastermind:_repeat")` now. Required — do not skip.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mastermind-finish
3
+ description: Use when implementation is complete and you need to decide how to integrate the work — merge locally, create a PR, keep the branch, or discard
4
+ ---
5
+
6
+ **First — extract repeat flags:** Follow REPEAT PREAMBLE from `_repeat.md`.
7
+
8
+ Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text.
9
+
10
+ Load brain context (follow `_protocol.md` Brain Load Procedure).
11
+
12
+ Default mode: **confirm**.
13
+
14
+ ---
15
+
16
+ Invoke `Skill("mastermind:finish")` passing: brain_context, params, mode.
17
+
18
+ After skill returns: follow `_protocol.md` Brain Write Procedure.
19
+
20
+ Invoke `Skill("mastermind:_repeat")` now. Required — do not skip.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Single-line graph stats — nodes, edges, freshness, usage %
3
+ ---
4
+
5
+ ```bash
6
+ node "$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs" graph-status
7
+ ```
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: mastermind-help
3
+ description: Mastermind commands reference — quick overview of all skills, CLI subcommands, and MCP tools available in this session
4
+ ---
5
+
6
+ # Mastermind Help
7
+
8
+ Quick reference for all Mastermind skills and CLI commands available in this project.
9
+
10
+ ## Mastermind Skills (invoke via Skill tool)
11
+
12
+ | Skill | Description |
13
+ |-------|-------------|
14
+ | `mastermind:createtask` | Decompose a prompt, spec file, or folder into tasks saved to `docs/tasks/` (add `--monotask` for board) |
15
+ | `mastermind:do` | Execute tasks from a task file (add `--file <path>`) or monotask board (`--monotask`) |
16
+ | `mastermind:ideate` | Research ideas, evaluate, elaborate, decompose — saved to `docs/ideas/` (add `--monotask` for board) |
17
+ | `mastermind:improve` | Analyze a component, research improvements, create tasks in `docs/improvements/` (`--monotask` for board) |
18
+ | `mastermind:repeat` | Repeat a prompt on a schedule (default: 15 min, 10 times) |
19
+ | `mastermind:understand` | Run semantic enrichment on the monograph knowledge graph |
20
+ | `mastermind:specialagents` | Activate a specialist agent persona (browse categories or auto-select) |
21
+ | `mastermind:swarm` | Swarm coordination reference — topologies, strategies, init patterns |
22
+ | `mastermind:memory` | Memory CLI quick reference |
23
+
24
+ ## Core CLI Commands
25
+
26
+ ```bash
27
+ # Initialize project
28
+ npx monomind init --wizard
29
+
30
+ # Start background daemon
31
+ npx monomind daemon start
32
+
33
+ # System diagnostics
34
+ npx monomind doctor --fix
35
+
36
+ # Agent management
37
+ npx monomind agent spawn -t coder --name my-coder
38
+ npx monomind agent list
39
+ npx monomind agent status --id <agent-id>
40
+ npx monomind agent stop --id <agent-id>
41
+
42
+ # Swarm management
43
+ npx monomind swarm init --topology hierarchical --max-agents 8 --strategy specialized
44
+ npx monomind swarm status
45
+ npx monomind swarm stop
46
+
47
+ # Memory operations
48
+ npx monomind memory store --key "my-key" --value "my-value" --namespace patterns
49
+ npx monomind memory search --query "search terms"
50
+ npx monomind memory list --namespace patterns
51
+ npx monomind memory retrieve --key "my-key"
52
+
53
+ # Workflow management
54
+ npx monomind workflow run -t development --task "Build feature"
55
+ npx monomind workflow list
56
+
57
+ # Knowledge graph
58
+ npx monomind monograph build
59
+ npx monomind monograph search -q "authentication"
60
+ npx monomind monograph stats
61
+
62
+ # Neural patterns
63
+ npx monomind neural train --pattern coordination --epochs 50
64
+ npx monomind neural status --verbose
65
+
66
+ # Hooks
67
+ npx monomind hooks pre-task --description "task description"
68
+ npx monomind hooks post-task --task-id "id" --success true
69
+ npx monomind hooks route --task "task description"
70
+
71
+ # Session management
72
+ npx monomind session restore --latest
73
+ npx monomind session save
74
+
75
+ # Security
76
+ npx monomind security scan --depth full
77
+
78
+ # Performance
79
+ npx monomind performance benchmark --suite all
80
+ ```
81
+
82
+ ## Built-in Workflow Templates
83
+
84
+ `development`, `research`, `testing`, `security-audit`, `code-review`, `refactoring`, `sparc`, `custom`
85
+
86
+ ## Swarm Topologies
87
+
88
+ | Topology | Use When |
89
+ |----------|----------|
90
+ | `hierarchical` | Feature dev, bug fixes (anti-drift, tight control) |
91
+ | `mesh` | Research, analysis (broad coverage) |
92
+ | `star` | Parallel testing, parallel maintenance |
93
+ | `hierarchical-mesh` | Large teams 10+ agents |
94
+
95
+ ## Key MCP Tools
96
+
97
+ ```javascript
98
+ // Memory
99
+ mcp__monomind__memory_store({ key: "...", value: "...", namespace: "..." })
100
+ mcp__monomind__memory_search({ query: "...", namespace: "..." })
101
+
102
+ // Knowledge graph
103
+ mcp__monomind__graphify_suggest({ task: "..." })
104
+ mcp__monomind__graphify_query({ query: "..." })
105
+
106
+ // Swarm
107
+ mcp__monomind__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
108
+ mcp__monomind__swarm_status({})
109
+
110
+ // System
111
+ mcp__monomind__system_health({})
112
+ mcp__monomind__agent_health({})
113
+ ```
114
+
115
+ ## Support
116
+
117
+ - Documentation: https://github.com/nokhodian/monomind
118
+ - Issues: https://github.com/nokhodian/monomind/issues