@monoes/monomindcli 1.10.54 → 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 (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
@@ -152,7 +152,8 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
152
152
  --arg session "$sessionId" \
153
153
  --arg org "$orgName" \
154
154
  --arg goal "$goal" \
155
- '{type:"org:start",session:$session,org:$org,goal:$goal,ts:(now*1000|floor)}')" || true
155
+ --arg proj "$(pwd)" \
156
+ '{type:"org:start",session:$session,org:$org,goal:$goal,project:$proj,ts:(now*1000|floor)}')" || true
156
157
  ```
157
158
 
158
159
  ---
@@ -244,16 +245,22 @@ APPROVAL GATE (when governance.policy is "board" or "strict"):
244
245
  curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "Content-Type: application/json" \
245
246
  -d "$(jq -cn --arg org "${orgName}" --arg id "$approval_id" --arg title "<title>" \
246
247
  '{type:"org:approval:requested",org:$org,approval_id:$id,title:$title,ts:(now*1000|floor)}')" || true
247
- # Poll until approved or rejected (max 30 min):
248
+ # Poll until approved or rejected (max 30 min).
249
+ # Check the approvals file first (updated by both dashboard UI and /mastermind:approve command),
250
+ # then fall back to memory in case an external notifier wrote there.
248
251
  for i in $(seq 1 60); do
249
- status=$(npx monomind@latest memory search --query "approval:${approval_id}" --namespace "${memNs}" 2>/dev/null | jq -r '.[0].value.status // ""' 2>/dev/null)
252
+ status=$(jq --arg id "$approval_id" '.approvals[] | select(.id == $id) | .status // ""' "$approvalsFile" 2>/dev/null || echo "")
253
+ if [ -z "$status" ] || [ "$status" = "pending" ]; then
254
+ mem_status=$(npx monomind@latest memory search --query "approval:${approval_id}" --namespace "${memNs}" 2>/dev/null | jq -r '.[0].value.status // ""' 2>/dev/null)
255
+ [ -n "$mem_status" ] && status="$mem_status"
256
+ fi
250
257
  [ "$status" = "approved" ] && break
251
258
  [ "$status" = "rejected" ] && { echo "Action rejected by governance policy — skip this action"; break; }
252
259
  sleep 30
253
260
  done
254
261
 
255
262
  STOP DETECTION (check this FIRST in every loop iteration):
256
- ls ${stopFile} 2>/dev/null && echo STOP_REQUESTED
263
+ [ -f "${stopFile}" ] && echo STOP_REQUESTED
257
264
  If the file exists: emit org:complete event, clean up with "rm -f ${stopFile}", then exit.
258
265
 
259
266
  OPERATING LOOP:
@@ -270,8 +277,14 @@ OPERATING LOOP:
270
277
  - Emit org:agent:online event to dashboard before starting (use curl, see below)
271
278
  5. Collect completed results from memory (search "${memNs}:report:")
272
279
  6. Synthesize reports, make decisions, create new cards in Todo column based on progress toward goal
273
- 7. Emit org:checkpoint event with progress summary
274
- 8. Wait ${checkpointMin} minutes, then loop back to step 1
280
+ 7. Write a run-completion entry to the activity log (used by the health dashboard for 7-day success rate):
281
+ activityFile=".monomind/orgs/${orgName}-activity.jsonl"
282
+ # Count Todo cards not yet claimed as the pending_tasks metric
283
+ pending_count=$(monotask card list ${board_id} --col ${todo_col} --json 2>/dev/null | jq '[.[] | select(.labels | index("claimed") | not)] | length' 2>/dev/null || echo 0)
284
+ echo "{\"type\":\"run:complete\",\"org\":\"${orgName}\",\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"pending\":${pending_count:-0}}" >> "$activityFile"
285
+ (On error/exception, write: {"type":"run:error","ts":"...", "org":"..."})
286
+ 8. Emit org:checkpoint event with progress summary
287
+ 9. Wait ${checkpointMin} minutes, then loop back to step 1
275
288
 
276
289
  AGENT TYPES FOR YOUR TEAM:
277
290
  ${orgConfig.roles.filter(r => r.id !== bossRole.id).map(r =>
@@ -283,12 +296,13 @@ DASHBOARD EVENTS — emit via curl (NOT WebFetch — WebFetch does not support P
283
296
  CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
284
297
  curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
285
298
  -H "Content-Type: application/json" \
286
- -d "$(jq -cn --arg type TYPE --arg session SESSION --arg org ORG '{type:$type,session:$session,org:$org,ts:(now*1000|floor)}')"
299
+ -d "$(jq -cn --arg type TYPE --arg session SESSION --arg org ORG --arg proj "$REPO_ROOT" '{type:$type,session:$session,org:$org,project:$proj,ts:(now*1000|floor)}')"
287
300
  Payloads:
288
301
  - org:agent:online → add fields: role, title, agent_type
289
302
  - org:comms → add fields: from, to, msg
290
303
  - org:checkpoint → add fields: progress, pending_tasks
291
304
  - org:complete → no additional fields
305
+ Note: always include project:$REPO_ROOT in all event payloads for correct multi-project SSE filtering
292
306
 
293
307
  START NOW: check for stop signal, assess the board, create initial tasks if none exist, then begin the operating loop.`
294
308
  })
@@ -311,7 +325,8 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
311
325
  --arg role "$bossRole_id" \
312
326
  --arg title "$bossRole_title" \
313
327
  --arg agent_type "$bossRole_agent_type" \
314
- '{type:"org:agent:online",session:$session,org:$org,role:$role,title:$title,agent_type:$agent_type,ts:(now*1000|floor)}')" || true
328
+ --arg proj "$REPO_ROOT" \
329
+ '{type:"org:agent:online",session:$session,org:$org,role:$role,title:$title,agent_type:$agent_type,project:$proj,ts:(now*1000|floor)}')" || true
315
330
  ```
316
331
 
317
332
  (Use the scalar string variables `$bossRole_id`, `$bossRole_title`, `$bossRole_agent_type` derived by extracting fields from `bossRole` before constructing the curl call.)
@@ -0,0 +1,274 @@
1
+ ---
2
+ name: mastermind-skill-builder
3
+ description: Use when creating new mastermind skills, editing existing mastermind skills, or verifying mastermind skills work before deployment
4
+ ---
5
+
6
+ # Writing Mastermind Skills
7
+
8
+ ## Overview
9
+
10
+ **Writing mastermind skills IS Test-Driven Development applied to process documentation.**
11
+
12
+ **Mastermind skills live in `.claude/skills/mastermind/` and commands in `.claude/commands/mastermind/`.**
13
+
14
+ You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
15
+
16
+ **Core principle:** If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
17
+
18
+ ## What is a Mastermind Skill?
19
+
20
+ A **skill** is a reference guide for proven techniques, patterns, or tools. Skills help future Claude instances find and apply effective approaches.
21
+
22
+ **Skills are:** Reusable techniques, patterns, tools, reference guides
23
+
24
+ **Skills are NOT:** Narratives about how you solved a problem once
25
+
26
+ ## TDD Mapping for Skills
27
+
28
+ | TDD Concept | Skill Creation |
29
+ |-------------|----------------|
30
+ | **Test case** | Pressure scenario with subagent |
31
+ | **Production code** | Skill document (`.md`) |
32
+ | **Test fails (RED)** | Agent violates rule without skill (baseline) |
33
+ | **Test passes (GREEN)** | Agent complies with skill present |
34
+ | **Refactor** | Close loopholes while maintaining compliance |
35
+ | **Write test first** | Run baseline scenario BEFORE writing skill |
36
+ | **Watch it fail** | Document exact rationalizations agent uses |
37
+ | **Minimal code** | Write skill addressing those specific violations |
38
+ | **Watch it pass** | Verify agent now complies |
39
+ | **Refactor cycle** | Find new rationalizations → plug → re-verify |
40
+
41
+ ## When to Create a Skill
42
+
43
+ **Create when:**
44
+ - Technique wasn't intuitively obvious
45
+ - You'd reference this again across projects
46
+ - Pattern applies broadly (not project-specific)
47
+ - Others would benefit
48
+
49
+ **Don't create for:**
50
+ - One-off solutions
51
+ - Standard practices well-documented elsewhere
52
+ - Project-specific conventions (put in CLAUDE.md)
53
+ - Mechanical constraints (if it's enforceable with regex/validation, automate it)
54
+
55
+ ## Skill Types
56
+
57
+ ### Technique
58
+ Concrete method with steps to follow
59
+
60
+ ### Pattern
61
+ Way of thinking about problems
62
+
63
+ ### Reference
64
+ API docs, syntax guides, tool documentation
65
+
66
+ ## Directory Structure
67
+
68
+ ```
69
+ .claude/skills/mastermind/
70
+ skill-name.md # Main skill (required)
71
+
72
+ .claude/commands/mastermind/
73
+ skill-name.md # Command entry point (required)
74
+ ```
75
+
76
+ **Flat namespace** — all mastermind skills in one searchable namespace.
77
+
78
+ ## Skill File Structure
79
+
80
+ **Frontmatter (YAML):**
81
+ - Two required fields: `name` and `description` (max 1024 characters total)
82
+ - `name`: Use letters, numbers, and hyphens only (no parentheses, special chars)
83
+ - `description`: Third-person, describes ONLY when to use (NOT what it does)
84
+ - Start with "Use when..." to focus on triggering conditions
85
+ - Include specific symptoms, situations, and contexts
86
+ - **NEVER summarize the skill's process or workflow** (see CSO section)
87
+ - Keep under 500 characters if possible
88
+
89
+ ```markdown
90
+ ---
91
+ name: mastermind-skill-name
92
+ description: Use when [specific triggering conditions and symptoms]
93
+ ---
94
+
95
+ # Skill Name
96
+
97
+ ## Overview
98
+ What is this? Core principle in 1-2 sentences.
99
+
100
+ ## Quick Reference
101
+ Table or bullets for scanning common operations
102
+
103
+ ## The Process / Core Pattern
104
+ Steps, before/after comparisons
105
+
106
+ ## Common Mistakes
107
+ What goes wrong + fixes
108
+
109
+ ## Red Flags
110
+ Never / Always lists
111
+ ```
112
+
113
+ ## Command File Structure
114
+
115
+ Every skill needs a companion command file:
116
+
117
+ ```markdown
118
+ ---
119
+ name: mastermind-[name]
120
+ description: [one-line description of when to use]
121
+ ---
122
+
123
+ **First — extract repeat flags:** Follow REPEAT PREAMBLE from `_repeat.md`.
124
+
125
+ Parse `$ARGUMENTS` for `--auto`, `--confirm`, `--project <name>`, and remaining text.
126
+
127
+ Load brain context (follow `_protocol.md` Brain Load Procedure).
128
+
129
+ Default mode: **confirm** (or **auto** for low-risk/fast skills).
130
+
131
+ ---
132
+
133
+ Invoke `Skill("mastermind:[name]")` passing: brain_context, params, mode.
134
+
135
+ After skill returns: follow `_protocol.md` Brain Write Procedure.
136
+
137
+ Invoke `Skill("mastermind:_repeat")` now. Required — do not skip.
138
+ ```
139
+
140
+ ## Claude Search Optimization (CSO)
141
+
142
+ **Critical for discovery:** Future Claude must FIND your skill.
143
+
144
+ ### Description = When to Use, NOT What the Skill Does
145
+
146
+ The description should ONLY describe triggering conditions. Do NOT summarize the skill's process or workflow in the description.
147
+
148
+ **Why this matters:** When a description summarizes the workflow, Claude may follow the description instead of reading the full skill content — the skill body becomes documentation Claude skips.
149
+
150
+ ```yaml
151
+ # BAD: Summarizes workflow
152
+ description: Use when finishing branches - runs tests, shows 4 options, handles merge/PR/cleanup
153
+
154
+ # BAD: Too much process detail
155
+ description: Use for TDD - write test first, watch it fail, write minimal code, refactor
156
+
157
+ # GOOD: Just triggering conditions
158
+ description: Use when implementation is complete and you need to decide how to integrate the work
159
+
160
+ # GOOD: Triggering conditions only
161
+ description: Use when receiving code review feedback before implementing suggestions
162
+ ```
163
+
164
+ ### Keyword Coverage
165
+
166
+ Use words Claude would search for:
167
+ - Error messages and symptoms
168
+ - Synonyms (timeout/hang/freeze, cleanup/teardown)
169
+ - Tools: actual commands, library names
170
+
171
+ ### Token Efficiency (Critical)
172
+
173
+ **Target word counts:**
174
+ - Frequently-loaded skills: under 200 words total
175
+ - Other skills: under 500 words (still be concise)
176
+
177
+ **Techniques:**
178
+ - Reference other skills instead of repeating content
179
+ - Use cross-references: `**REQUIRED BACKGROUND:** Use Skill("mastermind:X")`
180
+ - One excellent example beats many mediocre ones
181
+
182
+ ### Cross-Referencing Other Skills
183
+
184
+ ```markdown
185
+ # GOOD: Explicit requirement marker
186
+ **REQUIRED SUB-SKILL:** Use Skill("mastermind:worktree")
187
+ **REQUIRED BACKGROUND:** You MUST understand Skill("mastermind:finish")
188
+
189
+ # BAD: Unclear if required
190
+ See mastermind/worktree.md
191
+ ```
192
+
193
+ ## The Iron Law (Same as TDD)
194
+
195
+ ```
196
+ NO SKILL WITHOUT A FAILING TEST FIRST
197
+ ```
198
+
199
+ This applies to NEW skills AND EDITS to existing skills.
200
+
201
+ Write skill before testing? Delete it. Start over.
202
+ Edit skill without testing? Same violation.
203
+
204
+ **No exceptions:**
205
+ - Not for "simple additions"
206
+ - Not for "just adding a section"
207
+ - Not for "documentation updates"
208
+ - Delete means delete
209
+
210
+ ## RED-GREEN-REFACTOR for Skills
211
+
212
+ ### RED: Write Failing Test (Baseline)
213
+
214
+ Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
215
+ - What choices did they make?
216
+ - What rationalizations did they use (verbatim)?
217
+ - Which pressures triggered violations?
218
+
219
+ ### GREEN: Write Minimal Skill
220
+
221
+ Write skill that addresses those specific rationalizations. Don't add extra content for hypothetical cases.
222
+
223
+ Run same scenarios WITH skill. Agent should now comply.
224
+
225
+ ### REFACTOR: Close Loopholes
226
+
227
+ Agent found new rationalization? Add explicit counter. Re-test until bulletproof.
228
+
229
+ ## Common Rationalizations for Skipping Testing
230
+
231
+ | Excuse | Reality |
232
+ |--------|---------|
233
+ | "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. |
234
+ | "It's just a reference" | References can have gaps. Test retrieval. |
235
+ | "Testing is overkill" | Untested skills have issues. Always. |
236
+ | "I'll test if problems emerge" | Test BEFORE deploying. |
237
+ | "I'm confident it's good" | Overconfidence guarantees issues. Test anyway. |
238
+
239
+ ## Skill Creation Checklist
240
+
241
+ **RED Phase:**
242
+ - [ ] Create pressure scenarios (3+ combined pressures for discipline skills)
243
+ - [ ] Run scenarios WITHOUT skill — document baseline behavior verbatim
244
+ - [ ] Identify patterns in rationalizations/failures
245
+
246
+ **GREEN Phase:**
247
+ - [ ] Name uses only letters, numbers, hyphens
248
+ - [ ] YAML frontmatter with `name` and `description` fields
249
+ - [ ] Description starts with "Use when..." — triggering conditions only
250
+ - [ ] Description written in third person
251
+ - [ ] Keywords throughout for search
252
+ - [ ] Clear overview with core principle
253
+ - [ ] Address specific baseline failures from RED phase
254
+ - [ ] Run scenarios WITH skill — verify agents now comply
255
+
256
+ **REFACTOR Phase:**
257
+ - [ ] Identify NEW rationalizations from testing
258
+ - [ ] Add explicit counters for discipline skills
259
+ - [ ] Build rationalization table from all test iterations
260
+ - [ ] Create red flags list
261
+ - [ ] Re-test until bulletproof
262
+
263
+ **Deployment:**
264
+ - [ ] Skill file at `.claude/skills/mastermind/<name>.md`
265
+ - [ ] Command file at `.claude/commands/mastermind/<name>.md`
266
+ - [ ] Commit both files to git
267
+
268
+ ## The Bottom Line
269
+
270
+ **Creating mastermind skills IS TDD for process documentation.**
271
+
272
+ Same Iron Law: No skill without failing test first.
273
+ Same cycle: RED (baseline) → GREEN (write skill) → REFACTOR (close loopholes).
274
+ Same benefits: Better quality, fewer surprises, bulletproof results.
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: mastermind-taskdev
3
+ description: Execute implementation plans with independent tasks using fresh subagents per task, with two-stage review (spec compliance then code quality) after each.
4
+ type: domain-skill
5
+ default_mode: auto
6
+ ---
7
+
8
+ # Mastermind Taskdev
9
+
10
+ Execute a plan by dispatching a fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
11
+
12
+ **Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
13
+
14
+ **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
15
+
16
+ **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
17
+
18
+ ---
19
+
20
+ ## When to Use
21
+
22
+ ```dot
23
+ digraph when_to_use {
24
+ "Have implementation plan?" [shape=diamond];
25
+ "Tasks mostly independent?" [shape=diamond];
26
+ "Stay in this session?" [shape=diamond];
27
+ "mastermind:taskdev" [shape=box];
28
+ "mastermind:execute" [shape=box];
29
+ "Manual execution or brainstorm first" [shape=box];
30
+
31
+ "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
32
+ "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
33
+ "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
34
+ "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
35
+ "Stay in this session?" -> "mastermind:taskdev" [label="yes"];
36
+ "Stay in this session?" -> "mastermind:execute" [label="no - parallel session"];
37
+ }
38
+ ```
39
+
40
+ **vs. mastermind:execute (parallel session):**
41
+ - Same session (no context switch)
42
+ - Fresh subagent per task (no context pollution)
43
+ - Two-stage review after each task: spec compliance first, then code quality
44
+ - Faster iteration (no human-in-loop between tasks)
45
+
46
+ ---
47
+
48
+ ## Inputs
49
+
50
+ - `brain_context`: BRAIN CONTEXT block (loaded via _protocol.md brain load)
51
+ - `plan_file`: absolute path to the plan `.md` file to execute
52
+ - `params`: any additional flags or context
53
+ - `mode`: auto | confirm
54
+
55
+ ---
56
+
57
+ ## The Process
58
+
59
+ ```dot
60
+ digraph process {
61
+ rankdir=TB;
62
+
63
+ subgraph cluster_per_task {
64
+ label="Per Task";
65
+ "Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
66
+ "Implementer subagent asks questions?" [shape=diamond];
67
+ "Answer questions, provide context" [shape=box];
68
+ "Implementer subagent implements, tests, commits, self-reviews" [shape=box];
69
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [shape=box];
70
+ "Spec reviewer subagent confirms code matches spec?" [shape=diamond];
71
+ "Implementer subagent fixes spec gaps" [shape=box];
72
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [shape=box];
73
+ "Code quality reviewer subagent approves?" [shape=diamond];
74
+ "Implementer subagent fixes quality issues" [shape=box];
75
+ "Mark task complete in TodoWrite" [shape=box];
76
+ }
77
+
78
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" [shape=box];
79
+ "More tasks remain?" [shape=diamond];
80
+ "Dispatch final code reviewer subagent for entire implementation" [shape=box];
81
+ "Use mastermind:finish" [shape=box style=filled fillcolor=lightgreen];
82
+
83
+ "Read plan, extract all tasks with full text, note context, create TodoWrite" -> "Dispatch implementer subagent (./implementer-prompt.md)";
84
+ "Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
85
+ "Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
86
+ "Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
87
+ "Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
88
+ "Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)";
89
+ "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" -> "Spec reviewer subagent confirms code matches spec?";
90
+ "Spec reviewer subagent confirms code matches spec?" -> "Implementer subagent fixes spec gaps" [label="no"];
91
+ "Implementer subagent fixes spec gaps" -> "Dispatch spec reviewer subagent (./spec-reviewer-prompt.md)" [label="re-review"];
92
+ "Spec reviewer subagent confirms code matches spec?" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="yes"];
93
+ "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" -> "Code quality reviewer subagent approves?";
94
+ "Code quality reviewer subagent approves?" -> "Implementer subagent fixes quality issues" [label="no"];
95
+ "Implementer subagent fixes quality issues" -> "Dispatch code quality reviewer subagent (./code-quality-reviewer-prompt.md)" [label="re-review"];
96
+ "Code quality reviewer subagent approves?" -> "Mark task complete in TodoWrite" [label="yes"];
97
+ "Mark task complete in TodoWrite" -> "More tasks remain?";
98
+ "More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
99
+ "More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
100
+ "Dispatch final code reviewer subagent for entire implementation" -> "Use mastermind:finish";
101
+ }
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Model Selection
107
+
108
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
109
+
110
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
111
+
112
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
113
+
114
+ **Architecture, design, and review tasks**: use the most capable available model.
115
+
116
+ **Task complexity signals:**
117
+ - Touches 1-2 files with a complete spec → cheap model
118
+ - Touches multiple files with integration concerns → standard model
119
+ - Requires design judgment or broad codebase understanding → most capable model
120
+
121
+ ---
122
+
123
+ ## Handling Implementer Status
124
+
125
+ Implementer subagents report one of four statuses. Handle each appropriately:
126
+
127
+ **DONE:** Proceed to spec compliance review.
128
+
129
+ **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
130
+
131
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
132
+
133
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
134
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
135
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
136
+ 3. If the task is too large, break it into smaller pieces
137
+ 4. If the plan itself is wrong, escalate to the human
138
+
139
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
140
+
141
+ ---
142
+
143
+ ## Prompt Templates
144
+
145
+ - `./implementer-prompt.md` - Dispatch implementer subagent
146
+ - `./spec-reviewer-prompt.md` - Dispatch spec compliance reviewer subagent
147
+ - `./code-quality-reviewer-prompt.md` - Dispatch code quality reviewer subagent
148
+
149
+ ---
150
+
151
+ ## Example Workflow
152
+
153
+ ```
154
+ You: I'm using mastermind:taskdev to execute this plan.
155
+
156
+ [Read plan file once: docs/mastermind/plans/feature-plan.md]
157
+ [Extract all 5 tasks with full text and context]
158
+ [Create TodoWrite with all tasks]
159
+
160
+ Task 1: Hook installation script
161
+
162
+ [Get Task 1 text and context (already extracted)]
163
+ [Dispatch implementation subagent with full task text + context]
164
+
165
+ Implementer: "Before I begin - should the hook be installed at user or system level?"
166
+
167
+ You: "User level (~/.config/monomind/hooks/)"
168
+
169
+ Implementer: "Got it. Implementing now..."
170
+ [Later] Implementer:
171
+ - Implemented install-hook command
172
+ - Added tests, 5/5 passing
173
+ - Self-review: Found I missed --force flag, added it
174
+ - Committed
175
+
176
+ [Dispatch spec compliance reviewer]
177
+ Spec reviewer: ✅ Spec compliant - all requirements met, nothing extra
178
+
179
+ [Get git SHAs, dispatch code quality reviewer]
180
+ Code reviewer: Strengths: Good test coverage, clean. Issues: None. Approved.
181
+
182
+ [Mark Task 1 complete]
183
+
184
+ Task 2: Recovery modes
185
+
186
+ [Get Task 2 text and context (already extracted)]
187
+ [Dispatch implementation subagent with full task text + context]
188
+
189
+ Implementer: [No questions, proceeds]
190
+ Implementer:
191
+ - Added verify/repair modes
192
+ - 8/8 tests passing
193
+ - Self-review: All good
194
+ - Committed
195
+
196
+ [Dispatch spec compliance reviewer]
197
+ Spec reviewer: ❌ Issues:
198
+ - Missing: Progress reporting (spec says "report every 100 items")
199
+ - Extra: Added --json flag (not requested)
200
+
201
+ [Implementer fixes issues]
202
+ Implementer: Removed --json flag, added progress reporting
203
+
204
+ [Spec reviewer reviews again]
205
+ Spec reviewer: ✅ Spec compliant now
206
+
207
+ [Dispatch code quality reviewer]
208
+ Code reviewer: Strengths: Solid. Issues (Important): Magic number (100)
209
+
210
+ [Implementer fixes]
211
+ Implementer: Extracted PROGRESS_INTERVAL constant
212
+
213
+ [Code reviewer reviews again]
214
+ Code reviewer: ✅ Approved
215
+
216
+ [Mark Task 2 complete]
217
+
218
+ ...
219
+
220
+ [After all tasks]
221
+ [Dispatch final code-reviewer]
222
+ Final reviewer: All requirements met, ready to merge
223
+
224
+ Done!
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Advantages
230
+
231
+ **vs. Manual execution:**
232
+ - Subagents follow TDD naturally
233
+ - Fresh context per task (no confusion)
234
+ - Parallel-safe (subagents don't interfere)
235
+ - Subagent can ask questions (before AND during work)
236
+
237
+ **vs. mastermind:execute:**
238
+ - Same session (no handoff)
239
+ - Continuous progress (no waiting)
240
+ - Review checkpoints automatic
241
+
242
+ **Efficiency gains:**
243
+ - No file reading overhead (controller provides full text)
244
+ - Controller curates exactly what context is needed
245
+ - Subagent gets complete information upfront
246
+ - Questions surfaced before work begins (not after)
247
+
248
+ **Quality gates:**
249
+ - Self-review catches issues before handoff
250
+ - Two-stage review: spec compliance, then code quality
251
+ - Review loops ensure fixes actually work
252
+ - Spec compliance prevents over/under-building
253
+ - Code quality ensures implementation is well-built
254
+
255
+ **Cost:**
256
+ - More subagent invocations (implementer + 2 reviewers per task)
257
+ - Controller does more prep work (extracting all tasks upfront)
258
+ - Review loops add iterations
259
+ - But catches issues early (cheaper than debugging later)
260
+
261
+ ---
262
+
263
+ ## Red Flags
264
+
265
+ **Never:**
266
+ - Start implementation on main/master branch without explicit user consent
267
+ - Skip reviews (spec compliance OR code quality)
268
+ - Proceed with unfixed issues
269
+ - Dispatch multiple implementation subagents in parallel (conflicts)
270
+ - Make subagent read plan file (provide full text instead)
271
+ - Skip scene-setting context (subagent needs to understand where task fits)
272
+ - Ignore subagent questions (answer before letting them proceed)
273
+ - Accept "close enough" on spec compliance (spec reviewer found issues = not done)
274
+ - Skip review loops (reviewer found issues = implementer fixes = review again)
275
+ - Let implementer self-review replace actual review (both are needed)
276
+ - **Start code quality review before spec compliance is ✅** (wrong order)
277
+ - Move to next task while either review has open issues
278
+
279
+ **If subagent asks questions:**
280
+ - Answer clearly and completely
281
+ - Provide additional context if needed
282
+ - Don't rush them into implementation
283
+
284
+ **If reviewer finds issues:**
285
+ - Implementer (same subagent) fixes them
286
+ - Reviewer reviews again
287
+ - Repeat until approved
288
+ - Don't skip the re-review
289
+
290
+ **If subagent fails task:**
291
+ - Dispatch fix subagent with specific instructions
292
+ - Don't try to fix manually (context pollution)
293
+
294
+ ---
295
+
296
+ ## Integration
297
+
298
+ **Required workflow skills:**
299
+ - `Skill("mastermind:plan")` - Creates the plan this skill executes
300
+ - `Skill("mastermind:review")` - Code review template for reviewer subagents
301
+ - `Skill("mastermind:finish")` - Complete development after all tasks done
302
+
303
+ **Subagents should use:**
304
+ - `Skill("mastermind:tdd")` - Subagents follow TDD for each task
305
+
306
+ **Alternative workflow:**
307
+ - `Skill("mastermind:execute")` - Use for parallel session instead of same-session execution