monomind 1.10.47 → 1.10.55

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 (414) 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/commands/monomind/do.md +52 -0
  41. package/.claude/commands/monomind/improve.md +2 -0
  42. package/.claude/helpers/handlers/graph-status-handler.cjs +2 -1
  43. package/.claude/helpers/handlers/route-handler.cjs +61 -11
  44. package/.claude/helpers/hook-handler.cjs +19 -0
  45. package/.claude/helpers/skill-registry.json +122 -51
  46. package/.claude/helpers/statusline.cjs +1 -1
  47. package/.claude/scheduled_tasks.lock +1 -0
  48. package/.claude/skills/agent-browser-testing/SKILL.md +522 -152
  49. package/.claude/skills/github-issue-triage/SKILL.md +354 -0
  50. package/.claude/skills/github-repo-recap/SKILL.md +207 -0
  51. package/.claude/skills/mastermind/_delegation.md +83 -0
  52. package/.claude/skills/mastermind/_protocol.md +14 -0
  53. package/.claude/skills/mastermind/approve.md +15 -7
  54. package/.claude/skills/mastermind/autodev.md +534 -0
  55. package/.claude/skills/mastermind/createorg.md +21 -5
  56. package/.claude/skills/mastermind/debug.md +232 -0
  57. package/.claude/skills/mastermind/design.md +187 -0
  58. package/.claude/skills/mastermind/execute.md +104 -0
  59. package/.claude/skills/mastermind/finish.md +251 -0
  60. package/.claude/skills/mastermind/plan.md +180 -0
  61. package/.claude/skills/mastermind/receive-review.md +213 -0
  62. package/.claude/skills/mastermind/runorg.md +23 -8
  63. package/.claude/skills/mastermind/skill-builder.md +274 -0
  64. package/.claude/skills/mastermind/taskdev.md +307 -0
  65. package/.claude/skills/mastermind/tdd.md +394 -0
  66. package/.claude/skills/mastermind/verify.md +196 -0
  67. package/.claude/skills/mastermind/worktree.md +160 -132
  68. package/.claude-plugin/docs/QUICKSTART.md +0 -3
  69. package/.claude-plugin/docs/STRUCTURE.md +1 -5
  70. package/.claude-plugin/scripts/verify.sh +0 -6
  71. package/README.md +320 -253
  72. package/package.json +1 -1
  73. package/packages/@monomind/cli/README.md +320 -253
  74. package/packages/@monomind/cli/dist/src/commands/analyze.js +9 -2
  75. package/packages/@monomind/cli/dist/src/commands/completions.js +1 -1
  76. package/packages/@monomind/cli/dist/src/commands/guidance.js +7 -7
  77. package/packages/@monomind/cli/dist/src/commands/hooks.js +16 -3
  78. package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -2
  79. package/packages/@monomind/cli/dist/src/commands/index.js +7 -0
  80. package/packages/@monomind/cli/dist/src/commands/init.js +47 -13
  81. package/packages/@monomind/cli/dist/src/commands/neural.js +100 -14
  82. package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +11 -0
  83. package/packages/@monomind/cli/dist/src/commands/platforms.js +195 -0
  84. package/packages/@monomind/cli/dist/src/commands/update.js +6 -6
  85. package/packages/@monomind/cli/dist/src/init/executor.js +28 -0
  86. package/packages/@monomind/cli/dist/src/init/statusline-generator.js +1 -1
  87. package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -0
  88. package/packages/@monomind/cli/dist/src/mcp-server.js +92 -0
  89. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +52 -0
  90. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +106 -5
  91. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -5
  92. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -5
  93. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +507 -5587
  94. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +64 -4
  95. package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +4 -4
  96. package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +2 -2
  97. package/packages/@monomind/cli/dist/src/memory/intelligence.js +108 -3
  98. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +1 -1
  99. package/packages/@monomind/cli/dist/src/memory/sona-optimizer.d.ts +1 -10
  100. package/packages/@monomind/cli/dist/src/memory/sona-optimizer.js +0 -46
  101. package/packages/@monomind/cli/dist/src/runtime/headless.js +3 -3
  102. package/packages/@monomind/cli/dist/src/ruvector/diff-classifier.d.ts +0 -2
  103. package/packages/@monomind/cli/dist/src/ruvector/diff-classifier.js +2 -14
  104. package/packages/@monomind/cli/dist/src/ruvector/index.d.ts +26 -9
  105. package/packages/@monomind/cli/dist/src/ruvector/index.js +3 -21
  106. package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.js +2 -2
  107. package/packages/@monomind/cli/dist/src/types.d.ts +0 -15
  108. package/packages/@monomind/cli/dist/src/types.js +0 -18
  109. package/packages/@monomind/cli/dist/src/update/index.js +1 -1
  110. package/packages/@monomind/cli/dist/src/update/validator.js +8 -8
  111. package/packages/@monomind/cli/package.json +2 -2
  112. package/scripts/generate-agent-avatars.mjs +500 -0
  113. package/.claude/agents/academic/academic-anthropologist.md +0 -126
  114. package/.claude/agents/academic/academic-geographer.md +0 -128
  115. package/.claude/agents/academic/academic-historian.md +0 -124
  116. package/.claude/agents/academic/academic-narratologist.md +0 -119
  117. package/.claude/agents/academic/academic-psychologist.md +0 -119
  118. package/.claude/agents/analysis/analyze-code-quality.md +0 -58
  119. package/.claude/agents/analysis/code-analyzer.md +0 -189
  120. package/.claude/agents/analysis/code-review/analyze-code-quality.md +0 -58
  121. package/.claude/agents/consensus/performance-benchmarker.md +0 -831
  122. package/.claude/agents/data/ml/data-ml-model.md +0 -76
  123. package/.claude/agents/development/dev-backend-api.md +0 -178
  124. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -52
  125. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -63
  126. package/.claude/agents/game-development/blender/blender-addon-engineer.md +0 -235
  127. package/.claude/agents/game-development/game-audio-engineer.md +0 -265
  128. package/.claude/agents/game-development/game-designer.md +0 -168
  129. package/.claude/agents/game-development/godot/godot-gameplay-scripter.md +0 -335
  130. package/.claude/agents/game-development/godot/godot-multiplayer-engineer.md +0 -298
  131. package/.claude/agents/game-development/godot/godot-shader-developer.md +0 -267
  132. package/.claude/agents/game-development/level-designer.md +0 -209
  133. package/.claude/agents/game-development/narrative-designer.md +0 -244
  134. package/.claude/agents/game-development/roblox-studio/roblox-avatar-creator.md +0 -298
  135. package/.claude/agents/game-development/roblox-studio/roblox-experience-designer.md +0 -306
  136. package/.claude/agents/game-development/roblox-studio/roblox-systems-scripter.md +0 -326
  137. package/.claude/agents/game-development/technical-artist.md +0 -230
  138. package/.claude/agents/game-development/unity/unity-architect.md +0 -272
  139. package/.claude/agents/game-development/unity/unity-editor-tool-developer.md +0 -311
  140. package/.claude/agents/game-development/unity/unity-multiplayer-engineer.md +0 -322
  141. package/.claude/agents/game-development/unity/unity-shader-graph-artist.md +0 -270
  142. package/.claude/agents/game-development/unreal-engine/unreal-multiplayer-architect.md +0 -314
  143. package/.claude/agents/game-development/unreal-engine/unreal-systems-engineer.md +0 -311
  144. package/.claude/agents/game-development/unreal-engine/unreal-technical-artist.md +0 -257
  145. package/.claude/agents/game-development/unreal-engine/unreal-world-builder.md +0 -274
  146. package/.claude/agents/github/release-swarm.md +0 -597
  147. package/.claude/agents/goal/agent.md +0 -804
  148. package/.claude/agents/goal/code-goal-planner.md +0 -445
  149. package/.claude/agents/marketing/marketing-ai-citation-strategist.md +0 -171
  150. package/.claude/agents/marketing/marketing-app-store-optimizer.md +0 -322
  151. package/.claude/agents/marketing/marketing-baidu-seo-specialist.md +0 -227
  152. package/.claude/agents/marketing/marketing-bilibili-content-strategist.md +0 -200
  153. package/.claude/agents/marketing/marketing-book-co-author.md +0 -111
  154. package/.claude/agents/marketing/marketing-carousel-growth-engine.md +0 -200
  155. package/.claude/agents/marketing/marketing-china-ecommerce-operator.md +0 -284
  156. package/.claude/agents/marketing/marketing-content-creator.md +0 -67
  157. package/.claude/agents/marketing/marketing-cross-border-ecommerce.md +0 -260
  158. package/.claude/agents/marketing/marketing-douyin-strategist.md +0 -150
  159. package/.claude/agents/marketing/marketing-growth-hacker.md +0 -54
  160. package/.claude/agents/marketing/marketing-instagram-curator.md +0 -114
  161. package/.claude/agents/marketing/marketing-kuaishou-strategist.md +0 -224
  162. package/.claude/agents/marketing/marketing-linkedin-content-creator.md +0 -215
  163. package/.claude/agents/marketing/marketing-livestream-commerce-coach.md +0 -306
  164. package/.claude/agents/marketing/marketing-podcast-strategist.md +0 -278
  165. package/.claude/agents/marketing/marketing-private-domain-operator.md +0 -309
  166. package/.claude/agents/marketing/marketing-reddit-community-builder.md +0 -124
  167. package/.claude/agents/marketing/marketing-seo-specialist.md +0 -279
  168. package/.claude/agents/marketing/marketing-short-video-editing-coach.md +0 -413
  169. package/.claude/agents/marketing/marketing-social-media-strategist.md +0 -125
  170. package/.claude/agents/marketing/marketing-tiktok-strategist.md +0 -126
  171. package/.claude/agents/marketing/marketing-twitter-engager.md +0 -127
  172. package/.claude/agents/marketing/marketing-wechat-official-account.md +0 -146
  173. package/.claude/agents/marketing/marketing-weibo-strategist.md +0 -241
  174. package/.claude/agents/marketing/marketing-xiaohongshu-specialist.md +0 -139
  175. package/.claude/agents/marketing/marketing-zhihu-strategist.md +0 -163
  176. package/.claude/agents/neural/safla-neural.md +0 -74
  177. package/.claude/agents/paid-media/paid-media-auditor.md +0 -71
  178. package/.claude/agents/paid-media/paid-media-creative-strategist.md +0 -71
  179. package/.claude/agents/paid-media/paid-media-paid-social-strategist.md +0 -71
  180. package/.claude/agents/paid-media/paid-media-ppc-strategist.md +0 -71
  181. package/.claude/agents/paid-media/paid-media-programmatic-buyer.md +0 -71
  182. package/.claude/agents/paid-media/paid-media-search-query-analyst.md +0 -71
  183. package/.claude/agents/paid-media/paid-media-tracking-specialist.md +0 -71
  184. package/.claude/agents/payments/agentic-payments.md +0 -126
  185. package/.claude/agents/product/product-behavioral-nudge-engine.md +0 -81
  186. package/.claude/agents/product/product-feedback-synthesizer.md +0 -119
  187. package/.claude/agents/product/product-manager.md +0 -469
  188. package/.claude/agents/product/product-sprint-prioritizer.md +0 -154
  189. package/.claude/agents/product/product-trend-researcher.md +0 -159
  190. package/.claude/agents/project-management/project-management-experiment-tracker.md +0 -199
  191. package/.claude/agents/project-management/project-management-jira-workflow-steward.md +0 -231
  192. package/.claude/agents/project-management/project-management-project-shepherd.md +0 -195
  193. package/.claude/agents/project-management/project-management-studio-operations.md +0 -201
  194. package/.claude/agents/project-management/project-management-studio-producer.md +0 -204
  195. package/.claude/agents/project-management/project-manager-senior.md +0 -136
  196. package/.claude/agents/reasoning/agent.md +0 -804
  197. package/.claude/agents/reasoning/goal-planner.md +0 -73
  198. package/.claude/agents/sales/sales-account-strategist.md +0 -228
  199. package/.claude/agents/sales/sales-coach.md +0 -272
  200. package/.claude/agents/sales/sales-deal-strategist.md +0 -181
  201. package/.claude/agents/sales/sales-discovery-coach.md +0 -226
  202. package/.claude/agents/sales/sales-engineer.md +0 -183
  203. package/.claude/agents/sales/sales-outbound-strategist.md +0 -202
  204. package/.claude/agents/sales/sales-pipeline-analyst.md +0 -268
  205. package/.claude/agents/sales/sales-proposal-strategist.md +0 -218
  206. package/.claude/agents/sona/sona-learning-optimizer.md +0 -65
  207. package/.claude/agents/spatial-computing/macos-spatial-metal-engineer.md +0 -338
  208. package/.claude/agents/spatial-computing/terminal-integration-specialist.md +0 -71
  209. package/.claude/agents/spatial-computing/visionos-spatial-engineer.md +0 -55
  210. package/.claude/agents/specialists/memory-specialist.md +0 -298
  211. package/.claude/agents/specialists/performance-engineer.md +0 -387
  212. package/.claude/agents/specialists/queen-coordinator.md +0 -67
  213. package/.claude/agents/specialists/security-architect.md +0 -154
  214. package/.claude/agents/specialized/accounts-payable-agent.md +0 -186
  215. package/.claude/agents/specialized/corporate-training-designer.md +0 -193
  216. package/.claude/agents/specialized/data-consolidation-agent.md +0 -61
  217. package/.claude/agents/specialized/government-digital-presales-consultant.md +0 -364
  218. package/.claude/agents/specialized/healthcare-marketing-compliance.md +0 -396
  219. package/.claude/agents/specialized/recruitment-specialist.md +0 -510
  220. package/.claude/agents/specialized/report-distribution-agent.md +0 -66
  221. package/.claude/agents/specialized/sales-data-extraction-agent.md +0 -68
  222. package/.claude/agents/specialized/specialized-french-consulting-market.md +0 -193
  223. package/.claude/agents/specialized/specialized-korean-business-navigator.md +0 -217
  224. package/.claude/agents/specialized/specialized-salesforce-architect.md +0 -181
  225. package/.claude/agents/specialized/study-abroad-advisor.md +0 -283
  226. package/.claude/agents/specialized/supply-chain-strategist.md +0 -583
  227. package/.claude/agents/sublinear/consensus-coordinator.md +0 -333
  228. package/.claude/agents/sublinear/matrix-optimizer.md +0 -180
  229. package/.claude/agents/sublinear/pagerank-analyzer.md +0 -295
  230. package/.claude/agents/sublinear/performance-optimizer.md +0 -363
  231. package/.claude/agents/sublinear/trading-predictor.md +0 -242
  232. package/.claude/agents/support/support-analytics-reporter.md +0 -366
  233. package/.claude/agents/support/support-executive-summary-generator.md +0 -213
  234. package/.claude/agents/support/support-finance-tracker.md +0 -443
  235. package/.claude/agents/support/support-infrastructure-maintainer.md +0 -619
  236. package/.claude/agents/support/support-legal-compliance-checker.md +0 -589
  237. package/.claude/agents/support/support-support-responder.md +0 -586
  238. package/.claude/agents/swarm/adaptive-coordinator.md +0 -364
  239. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -318
  240. package/.claude/agents/templates/github-pr-manager.md +0 -155
  241. package/.claude/agents/templates/memory-coordinator.md +0 -163
  242. package/.claude/agents/templates/migration-plan.md +0 -724
  243. package/.claude/agents/templates/orchestrator-task.md +0 -120
  244. package/.claude/agents/templates/performance-analyzer.md +0 -179
  245. package/.claude/agents/templates/sparc-coordinator.md +0 -163
  246. package/.claude/agents/testing/testing-reality-checker.md +0 -237
  247. package/.claude/checkpoints/1767754460.json +0 -8
  248. package/.claude/commands/analysis/token-efficiency.md +0 -42
  249. package/.claude/commands/optimization/README.md +0 -73
  250. package/.claude/commands/optimization/parallel-execution.md +0 -76
  251. package/.claude/commands/swarm/swarm-analysis.md +0 -62
  252. package/.claude/commands/swarm/swarm-background.md +0 -65
  253. package/.claude/commands/swarm/swarm-modes.md +0 -67
  254. package/.claude/commands/swarm/swarm-monitor.md +0 -54
  255. package/.claude/commands/swarm/swarm-status.md +0 -44
  256. package/.claude/commands/swarm/swarm-strategies.md +0 -76
  257. package/.claude/commands/training/model-update.md +0 -78
  258. package/.claude/commands/training/pattern-learn.md +0 -69
  259. package/.claude/commands/training/specialization.md +0 -92
  260. package/.claude/commands/verify/check.md +0 -106
  261. package/.claude/commands/verify/start.md +0 -105
  262. package/.claude/config/v1-dependency-optimization.json +0 -266
  263. package/.claude/config/v1-performance-targets.json +0 -251
  264. package/.claude/helpers/README.md +0 -105
  265. package/.claude/helpers/context-persistence-hook.mjs +0 -1988
  266. package/.claude/helpers/intelligence.cjs +0 -247
  267. package/.claude/helpers/learning-service.mjs +0 -1302
  268. package/.claude/helpers/memory-palace.cjs +0 -461
  269. package/.claude/helpers/memory.cjs +0 -84
  270. package/.claude/helpers/metrics-db.mjs +0 -488
  271. package/.claude/helpers/router.cjs +0 -559
  272. package/.claude/helpers/session.cjs +0 -126
  273. package/.claude/helpers/swarm-hooks.sh +0 -761
  274. package/.claude/helpers/toggle-statusline.cjs +0 -58
  275. package/.claude/helpers/token-tracker.cjs +0 -934
  276. package/.claude/skills/agentdb-advanced/SKILL.md +0 -549
  277. package/.claude/skills/agentdb-learning/SKILL.md +0 -544
  278. package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -337
  279. package/.claude/skills/agentdb-optimization/SKILL.md +0 -508
  280. package/.claude/skills/agentdb-vector-search/SKILL.md +0 -335
  281. package/.claude/skills/agentic-integration/SKILL.md +0 -265
  282. package/.claude/skills/cli-modernization/SKILL.md +0 -950
  283. package/.claude/skills/core-implementation/SKILL.md +0 -892
  284. package/.claude/skills/ddd-architecture/SKILL.md +0 -444
  285. package/.claude/skills/github-code-review/SKILL.md +0 -1147
  286. package/.claude/skills/github-multi-repo/SKILL.md +0 -912
  287. package/.claude/skills/github-project-management/SKILL.md +0 -1245
  288. package/.claude/skills/github-release-management/SKILL.md +0 -1118
  289. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1107
  290. package/.claude/skills/mcp-optimization/SKILL.md +0 -837
  291. package/.claude/skills/memory-unification/SKILL.md +0 -196
  292. package/.claude/skills/performance-optimization/SKILL.md +0 -416
  293. package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -444
  294. package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -199
  295. package/.claude/skills/security-hardening/SKILL.md +0 -101
  296. package/.claude/skills/stream-chain/SKILL.md +0 -560
  297. package/.claude/skills/swarm-coordination/SKILL.md +0 -451
  298. package/.claude/statusline-command.sh +0 -176
  299. package/.claude/statusline.mjs +0 -109
  300. package/.claude/statusline.sh +0 -431
  301. package/packages/@monomind/cli/bundled-graph/dist/src/analyze.d.ts +0 -32
  302. package/packages/@monomind/cli/bundled-graph/dist/src/analyze.d.ts.map +0 -1
  303. package/packages/@monomind/cli/bundled-graph/dist/src/analyze.js +0 -297
  304. package/packages/@monomind/cli/bundled-graph/dist/src/analyze.js.map +0 -1
  305. package/packages/@monomind/cli/bundled-graph/dist/src/build.d.ts +0 -8
  306. package/packages/@monomind/cli/bundled-graph/dist/src/build.d.ts.map +0 -1
  307. package/packages/@monomind/cli/bundled-graph/dist/src/build.js.map +0 -1
  308. package/packages/@monomind/cli/bundled-graph/dist/src/cache.d.ts +0 -12
  309. package/packages/@monomind/cli/bundled-graph/dist/src/cache.d.ts.map +0 -1
  310. package/packages/@monomind/cli/bundled-graph/dist/src/cache.js +0 -43
  311. package/packages/@monomind/cli/bundled-graph/dist/src/cache.js.map +0 -1
  312. package/packages/@monomind/cli/bundled-graph/dist/src/cluster.d.ts +0 -5
  313. package/packages/@monomind/cli/bundled-graph/dist/src/cluster.d.ts.map +0 -1
  314. package/packages/@monomind/cli/bundled-graph/dist/src/cluster.js.map +0 -1
  315. package/packages/@monomind/cli/bundled-graph/dist/src/detect.d.ts +0 -21
  316. package/packages/@monomind/cli/bundled-graph/dist/src/detect.d.ts.map +0 -1
  317. package/packages/@monomind/cli/bundled-graph/dist/src/detect.js +0 -195
  318. package/packages/@monomind/cli/bundled-graph/dist/src/detect.js.map +0 -1
  319. package/packages/@monomind/cli/bundled-graph/dist/src/export.d.ts +0 -21
  320. package/packages/@monomind/cli/bundled-graph/dist/src/export.d.ts.map +0 -1
  321. package/packages/@monomind/cli/bundled-graph/dist/src/export.js +0 -68
  322. package/packages/@monomind/cli/bundled-graph/dist/src/export.js.map +0 -1
  323. package/packages/@monomind/cli/bundled-graph/dist/src/extract/index.d.ts +0 -20
  324. package/packages/@monomind/cli/bundled-graph/dist/src/extract/index.d.ts.map +0 -1
  325. package/packages/@monomind/cli/bundled-graph/dist/src/extract/index.js +0 -158
  326. package/packages/@monomind/cli/bundled-graph/dist/src/extract/index.js.map +0 -1
  327. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/c.d.ts +0 -3
  328. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/c.d.ts.map +0 -1
  329. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/c.js +0 -88
  330. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/c.js.map +0 -1
  331. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/cpp.d.ts +0 -3
  332. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/cpp.d.ts.map +0 -1
  333. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/cpp.js +0 -121
  334. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/cpp.js.map +0 -1
  335. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/csharp.d.ts +0 -3
  336. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/csharp.d.ts.map +0 -1
  337. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/csharp.js +0 -121
  338. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/csharp.js.map +0 -1
  339. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/go.d.ts +0 -3
  340. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/go.d.ts.map +0 -1
  341. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/go.js +0 -181
  342. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/go.js.map +0 -1
  343. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/java.d.ts +0 -3
  344. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/java.d.ts.map +0 -1
  345. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/java.js +0 -117
  346. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/java.js.map +0 -1
  347. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/kotlin.d.ts +0 -3
  348. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/kotlin.d.ts.map +0 -1
  349. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/kotlin.js +0 -112
  350. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/kotlin.js.map +0 -1
  351. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/php.d.ts +0 -3
  352. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/php.d.ts.map +0 -1
  353. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/php.js +0 -130
  354. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/php.js.map +0 -1
  355. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/python.d.ts +0 -3
  356. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/python.d.ts.map +0 -1
  357. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/python.js +0 -230
  358. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/python.js.map +0 -1
  359. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/ruby.d.ts +0 -3
  360. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/ruby.d.ts.map +0 -1
  361. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/ruby.js +0 -120
  362. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/ruby.js.map +0 -1
  363. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/rust.d.ts +0 -3
  364. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/rust.d.ts.map +0 -1
  365. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/rust.js +0 -195
  366. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/rust.js.map +0 -1
  367. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/scala.d.ts +0 -3
  368. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/scala.d.ts.map +0 -1
  369. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/scala.js +0 -110
  370. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/scala.js.map +0 -1
  371. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/swift.d.ts +0 -3
  372. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/swift.d.ts.map +0 -1
  373. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/swift.js +0 -122
  374. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/swift.js.map +0 -1
  375. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/typescript.d.ts +0 -3
  376. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/typescript.d.ts.map +0 -1
  377. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/typescript.js +0 -295
  378. package/packages/@monomind/cli/bundled-graph/dist/src/extract/languages/typescript.js.map +0 -1
  379. package/packages/@monomind/cli/bundled-graph/dist/src/extract/semantic.d.ts +0 -38
  380. package/packages/@monomind/cli/bundled-graph/dist/src/extract/semantic.d.ts.map +0 -1
  381. package/packages/@monomind/cli/bundled-graph/dist/src/extract/semantic.js +0 -242
  382. package/packages/@monomind/cli/bundled-graph/dist/src/extract/semantic.js.map +0 -1
  383. package/packages/@monomind/cli/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts +0 -48
  384. package/packages/@monomind/cli/bundled-graph/dist/src/extract/tree-sitter-runner.d.ts.map +0 -1
  385. package/packages/@monomind/cli/bundled-graph/dist/src/extract/tree-sitter-runner.js +0 -137
  386. package/packages/@monomind/cli/bundled-graph/dist/src/extract/tree-sitter-runner.js.map +0 -1
  387. package/packages/@monomind/cli/bundled-graph/dist/src/extract/types.d.ts +0 -7
  388. package/packages/@monomind/cli/bundled-graph/dist/src/extract/types.d.ts.map +0 -1
  389. package/packages/@monomind/cli/bundled-graph/dist/src/extract/types.js +0 -2
  390. package/packages/@monomind/cli/bundled-graph/dist/src/extract/types.js.map +0 -1
  391. package/packages/@monomind/cli/bundled-graph/dist/src/index.d.ts +0 -28
  392. package/packages/@monomind/cli/bundled-graph/dist/src/index.d.ts.map +0 -1
  393. package/packages/@monomind/cli/bundled-graph/dist/src/index.js +0 -26
  394. package/packages/@monomind/cli/bundled-graph/dist/src/index.js.map +0 -1
  395. package/packages/@monomind/cli/bundled-graph/dist/src/pipeline.d.ts +0 -27
  396. package/packages/@monomind/cli/bundled-graph/dist/src/pipeline.d.ts.map +0 -1
  397. package/packages/@monomind/cli/bundled-graph/dist/src/pipeline.js +0 -269
  398. package/packages/@monomind/cli/bundled-graph/dist/src/pipeline.js.map +0 -1
  399. package/packages/@monomind/cli/bundled-graph/dist/src/report.d.ts +0 -26
  400. package/packages/@monomind/cli/bundled-graph/dist/src/report.d.ts.map +0 -1
  401. package/packages/@monomind/cli/bundled-graph/dist/src/report.js +0 -214
  402. package/packages/@monomind/cli/bundled-graph/dist/src/report.js.map +0 -1
  403. package/packages/@monomind/cli/bundled-graph/dist/src/types.d.ts +0 -124
  404. package/packages/@monomind/cli/bundled-graph/dist/src/types.d.ts.map +0 -1
  405. package/packages/@monomind/cli/bundled-graph/dist/src/types.js +0 -2
  406. package/packages/@monomind/cli/bundled-graph/dist/src/types.js.map +0 -1
  407. package/packages/@monomind/cli/bundled-graph/dist/src/visualize.d.ts +0 -4
  408. package/packages/@monomind/cli/bundled-graph/dist/src/visualize.d.ts.map +0 -1
  409. package/packages/@monomind/cli/bundled-graph/dist/src/visualize.js +0 -574
  410. package/packages/@monomind/cli/bundled-graph/dist/src/visualize.js.map +0 -1
  411. package/packages/@monomind/cli/bundled-graph/dist/tsconfig.tsbuildinfo +0 -1
  412. package/packages/@monomind/shared/README.md +0 -322
  413. package/packages/@monomind/shared/package.json +0 -42
  414. package/packages/README.md +0 -513
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: mastermind:repeat
3
+ description: "Monomind — Repeat any prompt or slash command on a schedule — default 15 min interval, 10 repetitions. This is the universal loop wrapper for all commands."
4
+ ---
5
+
6
+ ## Argument Parsing
7
+
8
+ Parse `$ARGUMENTS` for the following flags. **Everything after the first `--` (double dash) is the prompt — no further flag parsing, even if subsequent `--` tokens appear.** If no `--` is present, extract known flags in any order and treat the remainder as the prompt:
9
+
10
+ - `--every <minutes>` — interval between repetitions in minutes (default: `15`). Minimum 1.
11
+ - `--times <count>` — total number of repetitions (default: `10`). Ignored when `--tillend` is present.
12
+ - `--tillend` — run until a complete round produces no findings and no actions. Overrides `--times`.
13
+ - `--maxruns <N>` — safety cap for `--tillend` (default: `50`). Stops the loop even if the AI hasn't signaled done.
14
+ - `--rep <N>` — (internal continuation flag injected by ScheduleWakeup; do not expose to user). Must be a positive integer ≤ MAX_REPS+1; reject otherwise.
15
+ - `--loop <id>` — (internal continuation flag; preserves loop identity across runs). Must match format `repeat-[digits]-[digits]-[digits]`; reject otherwise.
16
+ - `--` — end of flags; everything after this is the prompt verbatim
17
+ - Everything else (after flag extraction) is the **prompt** to repeat
18
+
19
+ If `INTERVAL` is less than 1, set it to 1 and output: `[mastermind:repeat] Interval clamped to 1 minute (minimum).`
20
+
21
+ If `MAX_REPS` is less than 1, set it to 1 and output: `[mastermind:repeat] Repetitions clamped to 1 (minimum).`
22
+
23
+ If `MAX_REPS` is greater than 1000, set it to 1000 and output: `[mastermind:repeat] Repetitions clamped to 1000 (maximum).`
24
+
25
+ If `--every` is present but its value is missing or not a number, use the default (15).
26
+
27
+ If `--loop` is present but does not match the pattern `repeat-<digits>-<digits>-<digits>`, output `[mastermind:repeat] ERROR: invalid loop ID` and STOP.
28
+
29
+ **Examples:**
30
+ ```
31
+ /mastermind:repeat --every 5 --times 9 /mastermind:architect --iterate 2 review this project
32
+ /mastermind:repeat --every 1 --times 20 /mastermind:review check for security issues
33
+ /mastermind:repeat --every 30 /mastermind:do --space abc --board def
34
+ /mastermind:repeat check deployment status
35
+ ```
36
+
37
+ If `$ARGUMENTS` is empty or contains only flags with no prompt, output this and STOP:
38
+ > **Usage:** `/mastermind:repeat [--every <minutes>] [--times <count>] [--tillend [--maxruns <N>]] <prompt>`
39
+ >
40
+ > Defaults: every 15 minutes, 10 times.
41
+ >
42
+ > **Fixed-count mode** (default): runs the prompt N times, then stops.
43
+ > **Tillend mode** (`--tillend`): runs until a complete round produces no findings and no actions. Safety cap: `--maxruns N` (default 50).
44
+ >
45
+ > This is the universal loop wrapper. Wrap any slash command to repeat it:
46
+ > - `/mastermind:repeat --every 5 --times 9 /mastermind:architect review this project`
47
+ > - `/mastermind:repeat --every 1 --times 20 /mastermind:review check for security issues`
48
+ > - `/mastermind:repeat --tillend /mastermind:review 1` ← runs until clean pass
49
+ > - `/mastermind:repeat --every 30 /mastermind:do --space abc --board def`
50
+ > - `/mastermind:repeat check deployment status`
51
+
52
+ ---
53
+
54
+ ## Internal Flag: `--rep` and `--loop`
55
+
56
+ When `--rep <N>` is present in arguments, this is a continuation from a previous wake-up:
57
+ - `INTERVAL`, `MAX_REPS`, and `PROMPT` are already set by argument parsing above (they arrive via the ScheduleWakeup prompt)
58
+ - Set `CURRENT_REP` to `N` instead of `1`
59
+ - Set `LOOP_ID` from `--loop <id>`
60
+ - Skip Step 1 initialization entirely
61
+ - Go directly to Step 2 (execute) with output:
62
+ - **If `--tillend` active:** `[mastermind:repeat] Tillend run N (cap: MAXRUNS) starting...`
63
+ - **Otherwise:** `[mastermind:repeat] Run N/MAX_REPS starting...`
64
+
65
+ ---
66
+
67
+ ## Step 1: Initialize
68
+
69
+ Extract:
70
+ - `INTERVAL` — from `--every` flag, default `15` (minutes), minimum 1
71
+ - `MAX_REPS` — from `--times` flag, default `10`
72
+ - `PROMPT` — everything remaining after flags are removed
73
+ - `CURRENT_REP` — starts at `1`
74
+
75
+ Write the initial loop state file so the dashboard can track this run. **You MUST run this bash block now via the Bash tool.** Before running, substitute `<INTERVAL>` and `<MAX_REPS>` with the parsed integer values, `<TILLEND_ACTIVE>` with `true` or `false` based on whether `--tillend` was provided, and `<MAXRUNS>` with the safety cap value. For `<PROMPT>`, substitute the raw prompt text inside the heredoc below — the single-quoted delimiter (`'MONOMIND_PROMPT_7x9k2m'`) prevents all bash expansion, and python3 handles JSON encoding. **If the prompt text contains the literal string `MONOMIND_PROMPT_7x9k2m`, replace that string in the prompt with `MONOMIND_PROMPT` before substitution** (this prevents heredoc delimiter collision):
76
+
77
+ ```bash
78
+ mkdir -p .monomind/loops
79
+ NOW_MS=$(python3 -c 'import time;print(int(time.time()*1000))' 2>/dev/null || echo "$(date +%s)000")
80
+ LOOP_ID="repeat-${NOW_MS}-${RANDOM}-$$"
81
+ PROMPT_JSON=$(python3 -c "import sys,json; sys.stdout.write(json.dumps(sys.stdin.read().rstrip(chr(10))))" << 'MONOMIND_PROMPT_7x9k2m'
82
+ <PROMPT>
83
+ MONOMIND_PROMPT_7x9k2m
84
+ )
85
+ if [ -z "$PROMPT_JSON" ]; then PROMPT_JSON='"(prompt unavailable)"'; fi
86
+ LOOP_TYPE=$( [ '<TILLEND_ACTIVE>' = 'true' ] && echo 'tillend' || echo 'repeat' )
87
+ LOOP_MAXREPS=$( [ '<TILLEND_ACTIVE>' = 'true' ] && echo '<MAXRUNS>' || echo '<MAX_REPS>' )
88
+ cat > ".monomind/loops/${LOOP_ID}.json" << EOF
89
+ {
90
+ "id": "${LOOP_ID}",
91
+ "sessionId": "${LOOP_ID}",
92
+ "type": "${LOOP_TYPE}",
93
+ "command": "/mastermind:repeat",
94
+ "prompt": ${PROMPT_JSON},
95
+ "interval": <INTERVAL>,
96
+ "currentRep": 1,
97
+ "maxReps": ${LOOP_MAXREPS},
98
+ "startedAt": ${NOW_MS},
99
+ "lastRunAt": ${NOW_MS},
100
+ "nextRunAt": ${NOW_MS},
101
+ "status": "running"
102
+ }
103
+ EOF
104
+ echo "LOOP_ID=${LOOP_ID}"
105
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
106
+ CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
107
+ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
108
+ -H "Content-Type: application/json" \
109
+ -d "{\"type\":\"loop:start\",\"loopId\":\"${LOOP_ID}\",\"command\":\"/mastermind:repeat\",\"mode\":\"${LOOP_TYPE}\",\"maxReps\":${LOOP_MAXREPS},\"interval\":<INTERVAL>,\"ts\":$(date +%s)000}" || true
110
+ ```
111
+
112
+ Capture the `LOOP_ID` value echoed by the script — you will need it for all subsequent bash blocks.
113
+
114
+ Output:
115
+ - **If `--tillend` active:**
116
+ ```
117
+ [mastermind:repeat] Starting tillend loop: "<PROMPT>"
118
+ Interval: every INTERVAL minutes
119
+ Safety cap: MAXRUNS runs
120
+ Run 1 starting now...
121
+ ```
122
+ - **Otherwise:**
123
+ ```
124
+ [mastermind:repeat] Starting: "<PROMPT>"
125
+ Interval: every INTERVAL minutes
126
+ Repetitions: MAX_REPS total
127
+ Run 1/MAX_REPS starting now...
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Step 2: Execute the Prompt
133
+
134
+ Run the `PROMPT` as if the user typed it directly. This means:
135
+ - If the prompt starts with `/`, invoke it as a slash command via the Skill tool
136
+ - Otherwise, treat it as a normal user message and respond accordingly
137
+
138
+ ---
139
+
140
+ ## Step 3: Report and Schedule Next
141
+
142
+ **IMPORTANT:** In every bash block below, `<LOOP_ID>` must be substituted with the literal LOOP_ID value you captured from Step 1 (or from `--loop` on continuation runs). Shell variables do NOT persist between bash blocks.
143
+
144
+ Before scheduling the next run, check if a stop was requested:
145
+ ```bash
146
+ [ -f ".monomind/loops/<LOOP_ID>.stop" ] && echo "STOP_REQUESTED=true" || echo "STOP_REQUESTED=false"
147
+ ```
148
+ If `STOP_REQUESTED=true`, output `[mastermind:repeat] Stop requested via dashboard. Halting.` and remove the state files:
149
+ ```bash
150
+ rm -f ".monomind/loops/<LOOP_ID>.json" ".monomind/loops/<LOOP_ID>.stop"
151
+ ```
152
+ Then STOP.
153
+
154
+ After execution completes, save the current rep as `PREV_REP`, then increment `CURRENT_REP`. Output:
155
+ - **If `--tillend` active:** `[mastermind:repeat] Tillend run PREV_REP complete.`
156
+ - **Otherwise:** `[mastermind:repeat] Run PREV_REP/MAX_REPS complete.`
157
+
158
+ **If `--tillend` was active:** evaluate whether this round produced **zero findings AND zero actions**. Answer these two questions:
159
+ 1. Were any findings produced? (issues, problems, errors, tasks, items flagged, anything detected)
160
+ 2. Were any actions taken? (files edited, tasks created, commits made, content written, anything changed)
161
+
162
+ Set `TILLEND_EMPTY=true` only if both answers are "no". **If the round found things and fixed them, `TILLEND_EMPTY=false` — run again to verify.** Only an actually empty round (nothing found, nothing done) stops the loop.
163
+
164
+ If `TILLEND_EMPTY=true`:
165
+ - Output: `[mastermind:repeat] Empty round — nothing found and nothing changed. Tillend loop complete after PREV_REP run(s).`
166
+ - Remove state file and emit loop:complete:
167
+ ```bash
168
+ rm -f ".monomind/loops/<LOOP_ID>.json" ".monomind/loops/<LOOP_ID>.stop"
169
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
170
+ CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
171
+ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
172
+ -H "Content-Type: application/json" \
173
+ -d "{\"type\":\"loop:complete\",\"loopId\":\"<LOOP_ID>\",\"command\":\"/mastermind:repeat\",\"mode\":\"tillend\",\"ranReps\":<PREV_REP>,\"reason\":\"empty-round\",\"ts\":$(date +%s)000}" || true
174
+ ```
175
+ - STOP. Do NOT schedule another wake-up.
176
+
177
+ If `--tillend` is active AND `CURRENT_REP > MAXRUNS` (safety cap reached):
178
+ - Output: `[mastermind:repeat] Safety cap reached (MAXRUNS runs). Stopping tillend loop. If work remains, re-run with a higher --maxruns.`
179
+ - Remove state file and emit loop:complete:
180
+ ```bash
181
+ rm -f ".monomind/loops/<LOOP_ID>.json" ".monomind/loops/<LOOP_ID>.stop"
182
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
183
+ CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
184
+ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
185
+ -H "Content-Type: application/json" \
186
+ -d "{\"type\":\"loop:complete\",\"loopId\":\"<LOOP_ID>\",\"command\":\"/mastermind:repeat\",\"mode\":\"tillend\",\"ranReps\":<PREV_REP>,\"reason\":\"safety-cap\",\"ts\":$(date +%s)000}" || true
187
+ ```
188
+ - STOP.
189
+
190
+ If `CURRENT_REP > MAX_REPS` (fixed-count: all runs done), output:
191
+ ```
192
+ [mastermind:repeat] All MAX_REPS repetitions complete.
193
+ ```
194
+ Remove the state file and emit loop:complete:
195
+ ```bash
196
+ rm -f ".monomind/loops/<LOOP_ID>.json" ".monomind/loops/<LOOP_ID>.stop"
197
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
198
+ CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
199
+ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
200
+ -H "Content-Type: application/json" \
201
+ -d "{\"type\":\"loop:complete\",\"loopId\":\"<LOOP_ID>\",\"command\":\"/mastermind:repeat\",\"ranReps\":<MAX_REPS>,\"ts\":$(date +%s)000}" || true
202
+ ```
203
+ STOP. Do NOT schedule another wake-up.
204
+
205
+ Otherwise, update the loop state before scheduling. **Run this bash block** (substitute `<LOOP_ID>`, `<INTERVAL>`, `<CURRENT_REP>`, `<MAX_REPS>`, `<PREV_REP>`, `<TILLEND_ACTIVE>`, and `<MAXRUNS>` with their literal values):
206
+ ```bash
207
+ NOW_MS=$(python3 -c 'import time;print(int(time.time()*1000))' 2>/dev/null || echo "$(date +%s)000")
208
+ NEXT_AT=$(( NOW_MS + <INTERVAL> * 60 * 1000 ))
209
+ PROMPT_JSON=$(jq '.prompt' ".monomind/loops/<LOOP_ID>.json" 2>/dev/null \
210
+ || python3 -c "import json,sys; json.dump(json.load(open('.monomind/loops/<LOOP_ID>.json'))['prompt'], sys.stdout)" 2>/dev/null \
211
+ || echo '"(prompt unavailable)"')
212
+ STARTED_AT=$(jq '.startedAt' ".monomind/loops/<LOOP_ID>.json" 2>/dev/null \
213
+ || python3 -c "import json; print(json.load(open('.monomind/loops/<LOOP_ID>.json'))['startedAt'])" 2>/dev/null \
214
+ || echo "${NOW_MS}")
215
+ LOOP_TYPE=$( [ '<TILLEND_ACTIVE>' = 'true' ] && echo 'tillend' || echo 'repeat' )
216
+ LOOP_MAXREPS=$( [ '<TILLEND_ACTIVE>' = 'true' ] && echo '<MAXRUNS>' || echo '<MAX_REPS>' )
217
+ cat > ".monomind/loops/<LOOP_ID>.json" << EOF
218
+ {
219
+ "id": "<LOOP_ID>",
220
+ "sessionId": "<LOOP_ID>",
221
+ "type": "${LOOP_TYPE}",
222
+ "command": "/mastermind:repeat",
223
+ "prompt": ${PROMPT_JSON},
224
+ "interval": <INTERVAL>,
225
+ "currentRep": <CURRENT_REP>,
226
+ "maxReps": ${LOOP_MAXREPS},
227
+ "startedAt": ${STARTED_AT},
228
+ "lastRunAt": ${NOW_MS},
229
+ "nextRunAt": ${NEXT_AT},
230
+ "status": "running"
231
+ }
232
+ EOF
233
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
234
+ CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
235
+ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
236
+ -H "Content-Type: application/json" \
237
+ -d "{\"type\":\"loop:tick\",\"loopId\":\"<LOOP_ID>\",\"command\":\"/mastermind:repeat\",\"mode\":\"${LOOP_TYPE}\",\"completedRep\":<PREV_REP>,\"nextRep\":<CURRENT_REP>,\"nextAt\":${NEXT_AT},\"ts\":$(date +%s)000}" || true
238
+ ```
239
+
240
+ Output:
241
+ - **If `--tillend` active:** `[mastermind:repeat] Next tillend run in INTERVAL minutes (run CURRENT_REP, cap: MAXRUNS)...`
242
+ - **Otherwise:** `[mastermind:repeat] Next run in INTERVAL minutes (run CURRENT_REP/MAX_REPS)...`
243
+
244
+ Use `ScheduleWakeup` with:
245
+ - `delaySeconds`: `INTERVAL * 60`
246
+ - **If `--tillend` active:** `prompt`: `/mastermind:repeat --tillend --maxruns <MAXRUNS> --every <INTERVAL> --rep <CURRENT_REP> --loop <LOOP_ID> -- <PROMPT>`; `reason`: `"tillend run <CURRENT_REP> (cap: <MAXRUNS>) of /mastermind:repeat"`
247
+ - **Otherwise:** `prompt`: `/mastermind:repeat --every <INTERVAL> --times <MAX_REPS> --rep <CURRENT_REP> --loop <LOOP_ID> -- <PROMPT>`; `reason`: `"repeat run <CURRENT_REP>/<MAX_REPS> of /mastermind:repeat"`
248
+
249
+ The `--` before `<PROMPT>` ensures the prompt text is never parsed as flags, even if it contains `--every` or `--times`. Substitute all angle-bracket values with their literals.
250
+
251
+ ---
252
+
253
+ ## Interruption
254
+
255
+ The user can stop the loop at any time by:
256
+ - Interrupting the session (the next scheduled wake-up simply won't fire)
257
+ - Creating `.monomind/loops/<LOOP_ID>.stop` (or clicking Stop in the dashboard)
@@ -107,3 +107,6 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
107
107
  ```
108
108
 
109
109
  Follow _protocol.md Brain Write Procedure for domain `ops`.
110
+
111
+
112
+ Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mastermind-skill-builder
3
+ description: Use when creating, editing, or verifying mastermind skills — guides the full TDD-for-docs cycle from baseline test through deployment
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: **auto**.
13
+
14
+ ---
15
+
16
+ Invoke `Skill("mastermind:skill-builder")` 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,125 @@
1
+ ---
2
+ name: mastermind-specialagents
3
+ description: Activate a specialist agent persona — browse by category, activate by slug, or auto-select based on conversation context
4
+ ---
5
+
6
+ Activate a specialist agent persona. Three modes:
7
+
8
+ **Direct:** `/mastermind:specialagents <slug>` — skip selection, activate immediately.
9
+
10
+ **Interactive:** `/mastermind:specialagents` — guided category → agent selection.
11
+
12
+ **Auto:** `/mastermind:specialagents auto` — LLM picks the best match from conversation context.
13
+
14
+ ---
15
+
16
+ ## Step 0 — Detect mode
17
+
18
+ - If `$ARGUMENTS` is a non-empty string that is **not** `auto`:
19
+ - Treat it as a slug/name → jump to **Step 4: Activate**.
20
+ - If `$ARGUMENTS` is `auto` or the user's message contains words like "auto", "automatically", "pick for me", "best agent", "suggest an agent":
21
+ - Jump to **Auto flow**.
22
+ - Otherwise → **Interactive flow**.
23
+
24
+ ---
25
+
26
+ ## Interactive flow
27
+
28
+ ### Step 1 — List categories
29
+
30
+ Run:
31
+ ```bash
32
+ node "${CLAUDE_PROJECT_DIR:-$(pwd)}/.claude/helpers/hook-handler.cjs" list-extras 2>/dev/null
33
+ ```
34
+
35
+ Parse the output. Extract the category names (lines like `=== ACADEMIC ===` → `academic`). Display them as a numbered list:
36
+
37
+ ```
38
+ Available agent categories:
39
+ 1. academic
40
+ 2. design
41
+ 3. marketing
42
+ 4. paid-media
43
+ 5. product
44
+ 6. project-management
45
+ 7. sales
46
+ 8. specialized
47
+ 9. support
48
+
49
+ Enter a number or category name:
50
+ ```
51
+
52
+ Wait for the user to reply with their choice.
53
+
54
+ ### Step 2 — List agents in chosen category
55
+
56
+ Map the user's reply to the lowercase category slug (e.g. "1" → `academic`, "Project Management" → `project-management`).
57
+
58
+ Run:
59
+ ```bash
60
+ node "${CLAUDE_PROJECT_DIR:-$(pwd)}/.claude/helpers/hook-handler.cjs" list-extras <category> 2>/dev/null
61
+ ```
62
+
63
+ Parse the agents listed. Display them numbered:
64
+
65
+ ```
66
+ Agents in <category>:
67
+ 1. slug-name — Short description
68
+ 2. ...
69
+
70
+ Enter a number or agent slug:
71
+ ```
72
+
73
+ Wait for the user to reply.
74
+
75
+ ### Step 3 — Confirm selection
76
+
77
+ Echo back: `Activating agent: <slug>`
78
+
79
+ Jump to **Step 4: Activate**.
80
+
81
+ ---
82
+
83
+ ## Auto flow
84
+
85
+ ### Auto Step 1 — Fetch all categories
86
+
87
+ Run:
88
+ ```bash
89
+ node "${CLAUDE_PROJECT_DIR:-$(pwd)}/.claude/helpers/hook-handler.cjs" list-extras 2>/dev/null
90
+ ```
91
+
92
+ Read the full output. Based on the current conversation context (the user's request, task description, or recent messages), decide which **category** is the best fit. Do not ask the user — choose silently.
93
+
94
+ ### Auto Step 2 — Fetch agents in chosen category
95
+
96
+ Run:
97
+ ```bash
98
+ node "${CLAUDE_PROJECT_DIR:-$(pwd)}/.claude/helpers/hook-handler.cjs" list-extras <chosen-category> 2>/dev/null
99
+ ```
100
+
101
+ Read the agent list. Based on the same conversation context, decide which **agent** is the best fit. Do not ask the user — choose silently.
102
+
103
+ Announce your reasoning in one sentence:
104
+ > "Auto-selected **<slug>** from **<category>** because <brief reason>."
105
+
106
+ Jump to **Step 4: Activate**.
107
+
108
+ ---
109
+
110
+ ## Step 4 — Activate
111
+
112
+ Run:
113
+ ```bash
114
+ node "${CLAUDE_PROJECT_DIR:-$(pwd)}/.claude/helpers/router.cjs" --load-agent "<slug>" 2>/dev/null
115
+ ```
116
+
117
+ Read the output. It will contain the agent's persona definition, capabilities, and behavioral rules.
118
+
119
+ **Adopt the agent identity fully:**
120
+ - Introduce yourself in the agent's voice: name, specialty, how you can help.
121
+ - Apply all behavioral rules from the loaded persona for the rest of this conversation.
122
+ - If the agent definition includes example openers or greetings, use one.
123
+ - Remain in character unless the user explicitly asks to switch agents or end the session.
124
+
125
+ If `router.cjs` returns an error or empty output, say: "Could not load agent `<slug>`. Run `/mastermind:specialagents` to browse available agents."
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: mastermind-swarm
3
+ description: Multi-agent swarm coordination — init, start, status, stop, scale, and coordinate agent teams
4
+ ---
5
+
6
+ # Monomind Swarm Coordination
7
+
8
+ Multi-agent swarm coordination with hierarchical topology, distributed memory, and load balancing.
9
+
10
+ ## Subcommands
11
+
12
+ | Subcommand | Description |
13
+ |---|---|
14
+ | `init` | Initialize a new swarm (topology + strategy) |
15
+ | `start` | Start swarm execution with an objective |
16
+ | `status` | Show current swarm status and progress |
17
+ | `stop` | Stop swarm execution |
18
+ | `scale` | Scale swarm agent count up or down |
19
+ | `coordinate` | Launch v1 15-agent hierarchical-mesh coordination |
20
+
21
+ ## init — Initialize a Swarm
22
+
23
+ ```bash
24
+ # Default (hierarchical, 15 agents)
25
+ npx monomind swarm init
26
+
27
+ # Anti-drift configuration (recommended)
28
+ npx monomind swarm init --topology hierarchical --max-agents 8 --strategy specialized
29
+
30
+ # v1 15-agent hierarchical-mesh
31
+ npx monomind swarm init --v1-mode
32
+ npx monomind swarm init --topology hierarchical-mesh --max-agents 15 --strategy specialized
33
+ ```
34
+
35
+ **Flags:**
36
+
37
+ | Flag | Short | Default | Description |
38
+ |---|---|---|---|
39
+ | `--topology` | `-t` | `hierarchical` | Swarm topology (see table below) |
40
+ | `--max-agents` | `-m` | `15` | Maximum concurrent agents |
41
+ | `--strategy` | `-s` | — | Coordination strategy |
42
+ | `--auto-scale` | — | `true` | Enable automatic scaling |
43
+ | `--v1-mode` | — | `false` | Enable v1 hierarchical-mesh with 15 agents |
44
+
45
+ ## Topologies
46
+
47
+ | Topology | Use When |
48
+ |---|---|
49
+ | `hierarchical` | Feature dev, bug fixes — anti-drift, tight control |
50
+ | `hierarchical-mesh` | Large teams 10-15 agents — v1 queen + peer communication |
51
+ | `mesh` | Research, analysis — broad coverage |
52
+ | `star` | Parallel testing, parallel maintenance |
53
+ | `ring` | Sequential pipeline processing |
54
+ | `hybrid` | Dynamic topology switching |
55
+
56
+ ## Strategies
57
+
58
+ `specialized` (anti-drift, clear roles), `balanced`, `adaptive`, `development`, `research`, `testing`, `optimization`, `maintenance`, `analysis`
59
+
60
+ ## start — Start Swarm Execution
61
+
62
+ ```bash
63
+ # Start a development swarm
64
+ npx monomind swarm start -o "Build REST API with authentication" -s development
65
+
66
+ # Parallel research swarm
67
+ npx monomind swarm start -o "Analyze performance bottlenecks" -s research --parallel
68
+ ```
69
+
70
+ **Flags:**
71
+
72
+ | Flag | Short | Default | Description |
73
+ |---|---|---|---|
74
+ | `--objective` | `-o` | — | Swarm objective/task (required) |
75
+ | `--strategy` | `-s` | `development` | Execution strategy |
76
+ | `--parallel` | `-p` | `true` | Enable parallel execution |
77
+ | `--monitor` | — | `true` | Enable real-time monitoring |
78
+
79
+ ## status — Check Swarm Progress
80
+
81
+ ```bash
82
+ # Overall status
83
+ npx monomind swarm status
84
+
85
+ # Status for a specific swarm ID
86
+ npx monomind swarm status swarm-abc123
87
+ ```
88
+
89
+ ## stop — Stop a Swarm
90
+
91
+ ```bash
92
+ # Graceful stop (saves state by default)
93
+ npx monomind swarm stop swarm-abc123
94
+
95
+ # Force immediate stop
96
+ npx monomind swarm stop swarm-abc123 --force
97
+ ```
98
+
99
+ **Flags:**
100
+
101
+ | Flag | Short | Default | Description |
102
+ |---|---|---|---|
103
+ | `--force` | `-f` | `false` | Force immediate stop |
104
+ | `--save-state` | — | `true` | Save state for potential resume |
105
+
106
+ ## scale — Adjust Agent Count
107
+
108
+ ```bash
109
+ # Scale to 12 agents
110
+ npx monomind swarm scale swarm-abc123 --agents 12
111
+
112
+ # Scale a specific agent type
113
+ npx monomind swarm scale swarm-abc123 --agents 8 --type coder
114
+ ```
115
+
116
+ ## coordinate — v1 15-Agent Coordination
117
+
118
+ ```bash
119
+ # Full v1 15-agent hierarchical mesh
120
+ npx monomind swarm coordinate
121
+
122
+ # Subset of agents
123
+ npx monomind swarm coordinate --agents 8
124
+ ```
125
+
126
+ Activates the v1 agent roster: Queen Coordinator, Security Architect, Security Auditor, Test Architect, Core Architect, Memory Specialist, Swarm Specialist, Integration Architect, Performance Engineer, CLI Developer, Hooks Developer, MCP Specialist, Project Coordinator, Documentation Lead, DevOps Engineer.
127
+
128
+ ## MCP Tools
129
+
130
+ ```javascript
131
+ // Initialize swarm
132
+ mcp__monomind__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
133
+
134
+ // Check status
135
+ mcp__monomind__swarm_status({})
136
+
137
+ // Health check
138
+ mcp__monomind__swarm_health({})
139
+
140
+ // Shutdown swarm
141
+ mcp__monomind__swarm_shutdown({})
142
+ ```
143
+
144
+ ## Agent Team Routing
145
+
146
+ | Task Type | Agents | Topology |
147
+ |---|---|---|
148
+ | Bug Fix | coordinator, researcher, coder, tester | hierarchical |
149
+ | Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
150
+ | Refactor | coordinator, architect, coder, reviewer | hierarchical |
151
+ | Performance | coordinator, perf-engineer, coder | hierarchical |
152
+ | Security | coordinator, security-architect, auditor | hierarchical |
153
+ | Research | coordinator, researcher x4, analyst x2 | mesh |
154
+
155
+ ## See Also
156
+
157
+ - `npx monomind agent spawn` — Spawn individual agents
158
+ - `npx monomind hive-mind init` — Byzantine fault-tolerant consensus
159
+ - `/mastermind` — Interactive swarm topology selection
160
+
161
+ Documentation: https://github.com/nokhodian/monomind
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: mastermind-taskdev
3
+ description: Execute an implementation plan task-by-task using fresh subagents with two-stage review per task. Default mode: auto.
4
+ ---
5
+
6
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing. If `is_continuation = true`, skip the empty-prompt check and intake below.
7
+
8
+ Parse `$ARGUMENTS` for:
9
+ - `--auto` flag → mode = auto
10
+ - `--confirm` flag → mode = confirm
11
+ - `--project <name>` → project_name = <name>
12
+ - Remaining text = plan_file path (path to the plan `.md` file to execute)
13
+
14
+ If plan_file is empty: ask "Which plan file should I execute? (provide an absolute path)"
15
+
16
+ Load brain context (follow `_protocol.md` Brain Load Procedure).
17
+
18
+ Default mode: **auto** (unless `--confirm` flag is present).
19
+
20
+ ---
21
+
22
+ Invoke `Skill("mastermind:taskdev")` passing: brain_context, plan_file, project_name, mode.
23
+
24
+ After skill returns: follow `_protocol.md` Brain Write Procedure.
25
+
26
+ Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: mastermind-tdd
3
+ description: Implement a feature or bugfix using Test-Driven Development — Red-Green-Refactor with the Iron Law enforced.
4
+ ---
5
+
6
+ **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `_repeat.md`.
7
+
8
+ Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text = feature_or_bug.
9
+
10
+ Load brain context for the `tdd` domain (follow `_protocol.md` Brain Load Procedure).
11
+
12
+ If feature_or_bug is empty: ask "What feature or bug should be implemented with TDD?"
13
+
14
+ Default mode: **auto**.
15
+
16
+ ---
17
+
18
+ Invoke `Skill("mastermind:tdd")` passing: brain_context, feature_or_bug, project_name, mode.
19
+
20
+ After skill returns: follow `_protocol.md` Brain Write Procedure for domain `tdd`.
21
+
22
+ Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
@@ -14,6 +14,8 @@ Parse `$ARGUMENTS` for:
14
14
 
15
15
  If source_path is empty: ask "What is the path to the project you want to analyze?"
16
16
 
17
+ Load brain context for the `techport` domain (follow `_protocol.md` Brain Load Procedure).
18
+
17
19
  Default mode: **confirm** (show analysis + port plan, wait before executing anything).
18
20
 
19
21
  > **Note for `--tillend` / `--repeat` loops:** This command defaults to `--confirm`, which presents a plan but doesn't execute it. In an unattended loop, this means each run will find items (findings = yes) but take no action (actions = no), so `TILLEND_EMPTY` never becomes true and the loop runs until the safety cap. Always add `--auto` when using this command in a loop:
@@ -23,4 +25,6 @@ Default mode: **confirm** (show analysis + port plan, wait before executing anyt
23
25
 
24
26
  Invoke `Skill("mastermind:techport")` passing: source_path, focus_hint, mode.
25
27
 
28
+ After skill returns: follow `_protocol.md` Brain Write Procedure for domain `techport`.
29
+
26
30
  Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.