@monoes/monomindcli 2.10.10 → 2.10.14

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 (243) hide show
  1. package/.claude/commands/mastermind/brain.md +14 -14
  2. package/.claude/commands/mastermind/help.md +2 -2
  3. package/.claude/commands/mastermind/master.md +24 -19
  4. package/.claude/commands/mastermind/memory.md +8 -8
  5. package/.claude/commands/mastermind/monoswarm.md +4 -4
  6. package/.claude/commands/mastermind.md +7 -7
  7. package/.claude/commands/truth/start.md +3 -3
  8. package/.claude/helpers/handlers/gates-handler.cjs +13 -1
  9. package/.claude/skills/mastermind/SKILL.md +7 -16
  10. package/.claude/skills/mastermind-debug/SKILL.md +3 -3
  11. package/.claude/skills/mastermind-design/SKILL.md +2 -0
  12. package/.claude/skills/mastermind-execute/SKILL.md +66 -11
  13. package/.claude/skills/mastermind-idea/SKILL.md +9 -2
  14. package/.claude/skills/mastermind-intake/SKILL.md +31 -7
  15. package/.claude/skills/mastermind-issue-detail/SKILL.md +70 -16
  16. package/.claude/skills/mastermind-issues/SKILL.md +111 -16
  17. package/.claude/skills/mastermind-liveness/SKILL.md +96 -26
  18. package/.claude/skills/mastermind-my-issues/SKILL.md +40 -8
  19. package/.claude/skills/mastermind-org/SKILL.md +2 -0
  20. package/.claude/skills/mastermind-plan/SKILL.md +7 -16
  21. package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +132 -24
  22. package/.claude/skills/mastermind-protocol/SKILL.md +33 -22
  23. package/.claude/skills/mastermind-runorg/SKILL.md +22 -3
  24. package/.claude/skills/mastermind-skill-builder/SKILL.md +1 -1
  25. package/.claude/skills/mastermind-tasks/SKILL.md +5 -0
  26. package/.claude/skills/mastermind-techport/SKILL.md +1 -1
  27. package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +56 -15
  28. package/.claude/skills/performance-analysis/SKILL.md +1 -1
  29. package/.claude/skills/verification-quality/SKILL.md +2 -3
  30. package/README.md +2 -2
  31. package/dist/src/commands/doc.js +2 -2
  32. package/dist/src/commands/doc.js.map +1 -1
  33. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  34. package/dist/src/commands/doctor-project-checks.js +45 -2
  35. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  36. package/dist/src/commands/memory-crud.d.ts.map +1 -1
  37. package/dist/src/commands/memory-crud.js +13 -2
  38. package/dist/src/commands/memory-crud.js.map +1 -1
  39. package/dist/src/commands/memory.js +1 -1
  40. package/dist/src/commands/memory.js.map +1 -1
  41. package/dist/src/commands/monograph.d.ts.map +1 -1
  42. package/dist/src/commands/monograph.js +11 -4
  43. package/dist/src/commands/monograph.js.map +1 -1
  44. package/dist/src/commands/org-observe.d.ts.map +1 -1
  45. package/dist/src/commands/org-observe.js +56 -6
  46. package/dist/src/commands/org-observe.js.map +1 -1
  47. package/dist/src/commands/org.d.ts +26 -0
  48. package/dist/src/commands/org.d.ts.map +1 -1
  49. package/dist/src/commands/org.js +144 -28
  50. package/dist/src/commands/org.js.map +1 -1
  51. package/dist/src/init/executor.d.ts.map +1 -1
  52. package/dist/src/init/executor.js +10 -9
  53. package/dist/src/init/executor.js.map +1 -1
  54. package/dist/src/init/settings-generator.d.ts.map +1 -1
  55. package/dist/src/init/settings-generator.js.map +1 -1
  56. package/dist/src/init/upgrade.d.ts.map +1 -1
  57. package/dist/src/init/upgrade.js +29 -0
  58. package/dist/src/init/upgrade.js.map +1 -1
  59. package/dist/src/init/write-codex.d.ts.map +1 -1
  60. package/dist/src/init/write-codex.js.map +1 -1
  61. package/dist/src/knowledge/document-pipeline.d.ts +5 -0
  62. package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
  63. package/dist/src/knowledge/document-pipeline.js +32 -16
  64. package/dist/src/knowledge/document-pipeline.js.map +1 -1
  65. package/dist/src/mcp-tools/hooks-routing.d.ts +9 -0
  66. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  67. package/dist/src/mcp-tools/hooks-routing.js +12 -1
  68. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  69. package/dist/src/mcp-tools/knowledge-tools.d.ts.map +1 -1
  70. package/dist/src/mcp-tools/knowledge-tools.js +105 -13
  71. package/dist/src/mcp-tools/knowledge-tools.js.map +1 -1
  72. package/dist/src/mcp-tools/memory-tools.d.ts +13 -0
  73. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  74. package/dist/src/mcp-tools/memory-tools.js +257 -31
  75. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  76. package/dist/src/mcp-tools/monograph/health-tools.d.ts.map +1 -1
  77. package/dist/src/mcp-tools/monograph/health-tools.js +99 -42
  78. package/dist/src/mcp-tools/monograph/health-tools.js.map +1 -1
  79. package/dist/src/mcp-tools/monograph/impact-tools.d.ts.map +1 -1
  80. package/dist/src/mcp-tools/monograph/impact-tools.js +123 -51
  81. package/dist/src/mcp-tools/monograph/impact-tools.js.map +1 -1
  82. package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
  83. package/dist/src/mcp-tools/monograph/query-tools.js +113 -96
  84. package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
  85. package/dist/src/mcp-tools/monograph/shared.d.ts +37 -4
  86. package/dist/src/mcp-tools/monograph/shared.d.ts.map +1 -1
  87. package/dist/src/mcp-tools/monograph/shared.js +75 -56
  88. package/dist/src/mcp-tools/monograph/shared.js.map +1 -1
  89. package/dist/src/memory/memory-bridge.d.ts +60 -1
  90. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  91. package/dist/src/memory/memory-bridge.js +172 -42
  92. package/dist/src/memory/memory-bridge.js.map +1 -1
  93. package/dist/src/memory/memory-kg.d.ts +495 -28
  94. package/dist/src/memory/memory-kg.d.ts.map +1 -1
  95. package/dist/src/memory/memory-kg.js +2186 -251
  96. package/dist/src/memory/memory-kg.js.map +1 -1
  97. package/dist/src/memory/query-router.d.ts +51 -0
  98. package/dist/src/memory/query-router.d.ts.map +1 -1
  99. package/dist/src/memory/query-router.js +38 -2
  100. package/dist/src/memory/query-router.js.map +1 -1
  101. package/dist/src/orgrt/agent-exec.d.ts.map +1 -1
  102. package/dist/src/orgrt/agent-exec.js +7 -0
  103. package/dist/src/orgrt/agent-exec.js.map +1 -1
  104. package/dist/src/orgrt/agent-runner.d.ts +26 -1
  105. package/dist/src/orgrt/agent-runner.d.ts.map +1 -1
  106. package/dist/src/orgrt/agent-runner.js +73 -22
  107. package/dist/src/orgrt/agent-runner.js.map +1 -1
  108. package/dist/src/orgrt/antigravity-runner.d.ts +1 -1
  109. package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
  110. package/dist/src/orgrt/antigravity-runner.js +36 -19
  111. package/dist/src/orgrt/antigravity-runner.js.map +1 -1
  112. package/dist/src/orgrt/approvals.d.ts +26 -2
  113. package/dist/src/orgrt/approvals.d.ts.map +1 -1
  114. package/dist/src/orgrt/approvals.js +67 -7
  115. package/dist/src/orgrt/approvals.js.map +1 -1
  116. package/dist/src/orgrt/broker.d.ts +21 -2
  117. package/dist/src/orgrt/broker.d.ts.map +1 -1
  118. package/dist/src/orgrt/broker.js +56 -8
  119. package/dist/src/orgrt/broker.js.map +1 -1
  120. package/dist/src/orgrt/bus.d.ts +8 -0
  121. package/dist/src/orgrt/bus.d.ts.map +1 -1
  122. package/dist/src/orgrt/bus.js +27 -0
  123. package/dist/src/orgrt/bus.js.map +1 -1
  124. package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
  125. package/dist/src/orgrt/checkpoint-ops.js +15 -5
  126. package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
  127. package/dist/src/orgrt/checkpoint.d.ts +42 -4
  128. package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
  129. package/dist/src/orgrt/checkpoint.js +75 -4
  130. package/dist/src/orgrt/checkpoint.js.map +1 -1
  131. package/dist/src/orgrt/codex-runner.d.ts +1 -1
  132. package/dist/src/orgrt/codex-runner.d.ts.map +1 -1
  133. package/dist/src/orgrt/codex-runner.js +50 -23
  134. package/dist/src/orgrt/codex-runner.js.map +1 -1
  135. package/dist/src/orgrt/copilot-runner.d.ts +24 -2
  136. package/dist/src/orgrt/copilot-runner.d.ts.map +1 -1
  137. package/dist/src/orgrt/copilot-runner.js +257 -157
  138. package/dist/src/orgrt/copilot-runner.js.map +1 -1
  139. package/dist/src/orgrt/cross-org.d.ts +10 -3
  140. package/dist/src/orgrt/cross-org.d.ts.map +1 -1
  141. package/dist/src/orgrt/cross-org.js +225 -10
  142. package/dist/src/orgrt/cross-org.js.map +1 -1
  143. package/dist/src/orgrt/crush-runner.d.ts +22 -2
  144. package/dist/src/orgrt/crush-runner.d.ts.map +1 -1
  145. package/dist/src/orgrt/crush-runner.js +227 -120
  146. package/dist/src/orgrt/crush-runner.js.map +1 -1
  147. package/dist/src/orgrt/daemon.d.ts +77 -7
  148. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  149. package/dist/src/orgrt/daemon.js +989 -385
  150. package/dist/src/orgrt/daemon.js.map +1 -1
  151. package/dist/src/orgrt/decisions.d.ts +2 -2
  152. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  153. package/dist/src/orgrt/decisions.js +90 -18
  154. package/dist/src/orgrt/decisions.js.map +1 -1
  155. package/dist/src/orgrt/grok-runner.d.ts +29 -3
  156. package/dist/src/orgrt/grok-runner.d.ts.map +1 -1
  157. package/dist/src/orgrt/grok-runner.js +286 -150
  158. package/dist/src/orgrt/grok-runner.js.map +1 -1
  159. package/dist/src/orgrt/kimicode-runner.d.ts +5 -5
  160. package/dist/src/orgrt/kimicode-runner.d.ts.map +1 -1
  161. package/dist/src/orgrt/kimicode-runner.js +53 -32
  162. package/dist/src/orgrt/kimicode-runner.js.map +1 -1
  163. package/dist/src/orgrt/mailbox.d.ts +15 -0
  164. package/dist/src/orgrt/mailbox.d.ts.map +1 -1
  165. package/dist/src/orgrt/mailbox.js +29 -1
  166. package/dist/src/orgrt/mailbox.js.map +1 -1
  167. package/dist/src/orgrt/migrate.d.ts.map +1 -1
  168. package/dist/src/orgrt/migrate.js +8 -5
  169. package/dist/src/orgrt/migrate.js.map +1 -1
  170. package/dist/src/orgrt/opencode-runner.d.ts +1 -1
  171. package/dist/src/orgrt/opencode-runner.d.ts.map +1 -1
  172. package/dist/src/orgrt/opencode-runner.js +29 -3
  173. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  174. package/dist/src/orgrt/org-memory.d.ts +19 -3
  175. package/dist/src/orgrt/org-memory.d.ts.map +1 -1
  176. package/dist/src/orgrt/org-memory.js +110 -38
  177. package/dist/src/orgrt/org-memory.js.map +1 -1
  178. package/dist/src/orgrt/pi-rpc-runner.d.ts +3 -1
  179. package/dist/src/orgrt/pi-rpc-runner.d.ts.map +1 -1
  180. package/dist/src/orgrt/pi-rpc-runner.js +35 -3
  181. package/dist/src/orgrt/pi-rpc-runner.js.map +1 -1
  182. package/dist/src/orgrt/pi-runner.d.ts +25 -2
  183. package/dist/src/orgrt/pi-runner.d.ts.map +1 -1
  184. package/dist/src/orgrt/pi-runner.js +271 -152
  185. package/dist/src/orgrt/pi-runner.js.map +1 -1
  186. package/dist/src/orgrt/policy.d.ts +1 -0
  187. package/dist/src/orgrt/policy.d.ts.map +1 -1
  188. package/dist/src/orgrt/policy.js +199 -39
  189. package/dist/src/orgrt/policy.js.map +1 -1
  190. package/dist/src/orgrt/provider.d.ts +4 -0
  191. package/dist/src/orgrt/provider.d.ts.map +1 -1
  192. package/dist/src/orgrt/provider.js +16 -0
  193. package/dist/src/orgrt/provider.js.map +1 -1
  194. package/dist/src/orgrt/qwen-rpc-runner.d.ts +3 -1
  195. package/dist/src/orgrt/qwen-rpc-runner.d.ts.map +1 -1
  196. package/dist/src/orgrt/qwen-rpc-runner.js +35 -3
  197. package/dist/src/orgrt/qwen-rpc-runner.js.map +1 -1
  198. package/dist/src/orgrt/qwen-runner.d.ts +30 -3
  199. package/dist/src/orgrt/qwen-runner.d.ts.map +1 -1
  200. package/dist/src/orgrt/qwen-runner.js +282 -142
  201. package/dist/src/orgrt/qwen-runner.js.map +1 -1
  202. package/dist/src/orgrt/role-slot.d.ts +88 -0
  203. package/dist/src/orgrt/role-slot.d.ts.map +1 -0
  204. package/dist/src/orgrt/role-slot.js +133 -0
  205. package/dist/src/orgrt/role-slot.js.map +1 -0
  206. package/dist/src/orgrt/runtime-options.d.ts +17 -0
  207. package/dist/src/orgrt/runtime-options.d.ts.map +1 -0
  208. package/dist/src/orgrt/runtime-options.js +32 -0
  209. package/dist/src/orgrt/runtime-options.js.map +1 -0
  210. package/dist/src/orgrt/scheduler-integration.d.ts +11 -0
  211. package/dist/src/orgrt/scheduler-integration.d.ts.map +1 -1
  212. package/dist/src/orgrt/scheduler-integration.js +75 -17
  213. package/dist/src/orgrt/scheduler-integration.js.map +1 -1
  214. package/dist/src/orgrt/scheduler.d.ts +4 -0
  215. package/dist/src/orgrt/scheduler.d.ts.map +1 -1
  216. package/dist/src/orgrt/scheduler.js +7 -1
  217. package/dist/src/orgrt/scheduler.js.map +1 -1
  218. package/dist/src/orgrt/server.d.ts +8 -3
  219. package/dist/src/orgrt/server.d.ts.map +1 -1
  220. package/dist/src/orgrt/server.js +48 -13
  221. package/dist/src/orgrt/server.js.map +1 -1
  222. package/dist/src/orgrt/session.d.ts +26 -2
  223. package/dist/src/orgrt/session.d.ts.map +1 -1
  224. package/dist/src/orgrt/session.js +98 -4
  225. package/dist/src/orgrt/session.js.map +1 -1
  226. package/dist/src/orgrt/task-dag.d.ts +5 -0
  227. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  228. package/dist/src/orgrt/task-dag.js +41 -0
  229. package/dist/src/orgrt/task-dag.js.map +1 -1
  230. package/dist/src/orgrt/test-loop.js +2 -2
  231. package/dist/src/orgrt/test-loop.js.map +1 -1
  232. package/dist/src/orgrt/types.d.ts +14 -2
  233. package/dist/src/orgrt/types.d.ts.map +1 -1
  234. package/dist/src/orgrt/types.js +15 -1
  235. package/dist/src/orgrt/types.js.map +1 -1
  236. package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
  237. package/dist/src/orgrt/vercel-runner.js +4 -0
  238. package/dist/src/orgrt/vercel-runner.js.map +1 -1
  239. package/dist/src/ui/routes-org.mjs +27 -7
  240. package/dist/src/ui/server.mjs +82 -48
  241. package/dist/tsconfig.tsbuildinfo +1 -1
  242. package/package.json +3 -2
  243. package/dist/src/ui/data/mastermind-sessions.json +0 -1
@@ -1,4 +1,4 @@
1
- <!-- Mastermind brain management — inspect, compact, refresh, and control the three-tier business memory (LanceDB + Monograph) -->
1
+ <!-- Mastermind brain management — inspect, compact, refresh, and control the three-tier business memory (memory store + Monograph) -->
2
2
 
3
3
  **First — extract repeat flags:** Follow the REPEAT PREAMBLE from `mastermind-repeat/SKILL.md`. Extracts `--repeat`, `--tillend`, `--maxruns`, `--wait`, `--rep`, `--loop` from `$ARGUMENTS` before all other parsing.
4
4
 
@@ -11,9 +11,9 @@ Parse `$ARGUMENTS` to determine the sub-command and flags.
11
11
  Show the current state of all brain tiers across all domains.
12
12
 
13
13
  For each domain that has data, call:
14
- - `mcp__monomind__lancedb_health` on namespace `mastermind:<domain>:raw` → Tier 1 entry count, last write date, archived count
15
- - `mcp__monomind__lancedb_health` on namespace `mastermind:<domain>:weekly` → Tier 2 summary count, last compaction date
16
- - `mcp__monomind__lancedb_health` on namespace `mastermind:principles` → Tier 3 principle count
14
+ - `mcp__monomind__memory_health` on namespace `mastermind:<domain>:raw` → Tier 1 entry count, last write date, archived count
15
+ - `mcp__monomind__memory_health` on namespace `mastermind:<domain>:weekly` → Tier 2 summary count, last compaction date
16
+ - `mcp__monomind__memory_health` on namespace `mastermind:principles` → Tier 3 principle count
17
17
 
18
18
  Display as a table:
19
19
 
@@ -39,9 +39,9 @@ Avg memory score: 0.64 | Entries below archive threshold: 3
39
39
  Force immediate weekly distillation across all domains (or `--domain <name>` for one domain).
40
40
 
41
41
  For each domain (or the specified domain):
42
- 1. Retrieve all Tier 1 raw entries since last compaction via `mcp__monomind__lancedb_hierarchical-recall` (namespace `mastermind:<domain>:raw`)
42
+ 1. Retrieve all Tier 1 raw entries since last compaction via `mcp__monomind__memory_hierarchical-recall` (namespace `mastermind:<domain>:raw`)
43
43
  2. Produce per-domain weekly summary: synthesize decisions, patterns, and lessons into ≤300 words
44
- 3. Store to Tier 2 via `mcp__monomind__lancedb_hierarchical-store` (namespace `mastermind:<domain>:weekly`)
44
+ 3. Store to Tier 2 via `mcp__monomind__memory_hierarchical-store` (namespace `mastermind:<domain>:weekly`)
45
45
  4. Archive Tier 1 entries with score < 0.1 (update metadata: `{ archived: true }`)
46
46
  5. Report: "Compacted <domain>: <N> entries → <M> summary, <K> archived"
47
47
 
@@ -53,8 +53,8 @@ Re-cluster the knowledge graph for a specific domain and rebuild Tier 3 principl
53
53
 
54
54
  1. Call `mcp__monomind__monograph_community` for nodes matching `mastermind:<domain>`
55
55
  2. For any cluster of 3+ similar nodes: merge into a single principle (LLM synthesis)
56
- 3. Store merged principle: `mcp__monomind__lancedb_hierarchical-store` namespace `mastermind:principles`
57
- 4. For conflicting nodes: add `EXCEPTION` edge via `mcp__monomind__monograph_add_fact`
56
+ 3. Store merged principle: `mcp__monomind__memory_hierarchical-store` namespace `mastermind:principles`
57
+ 4. For conflicting nodes: add the exception relation via `mcp__monomind__memory_kg_ingest`
58
58
  5. Report: "Refreshed <domain>: <N> clusters found, <M> principles updated, <K> exceptions noted"
59
59
 
60
60
  ---
@@ -63,9 +63,9 @@ Re-cluster the knowledge graph for a specific domain and rebuild Tier 3 principl
63
63
 
64
64
  Show raw contents of a specific brain tier.
65
65
 
66
- - Tier 1: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:<domain>:raw`, display each entry with its score and date.
67
- - Tier 2: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:<domain>:weekly`, display summaries with dates.
68
- - Tier 3: Call `mcp__monomind__lancedb_hierarchical-recall` on `mastermind:principles`, display all principles.
66
+ - Tier 1: Call `mcp__monomind__memory_hierarchical-recall` on `mastermind:<domain>:raw`, display each entry with its score and date.
67
+ - Tier 2: Call `mcp__monomind__memory_hierarchical-recall` on `mastermind:<domain>:weekly`, display summaries with dates.
68
+ - Tier 3: Call `mcp__monomind__memory_hierarchical-recall` on `mastermind:principles`, display all principles.
69
69
 
70
70
  Default limit: 10. Use `--limit N` to override.
71
71
 
@@ -75,7 +75,7 @@ Default limit: 10. Use `--limit N` to override.
75
75
 
76
76
  Find and archive all brain entries semantically matching the query.
77
77
 
78
- 1. Call `mcp__monomind__lancedb_pattern-search` with query text across all mastermind namespaces
78
+ 1. Call `mcp__monomind__memory_pattern-search` with query text across all mastermind namespaces
79
79
  2. Display matching entries with their scores and domains
80
80
  3. Ask: "Archive these N entries? (yes/no)"
81
81
  4. If yes: update each entry's metadata to `{ archived: true }`
@@ -88,8 +88,8 @@ Find and archive all brain entries semantically matching the query.
88
88
  **Destructive.** Wipes all brain data for a specific domain. Requires `--confirm` flag explicitly — refuse if missing.
89
89
 
90
90
  If `--confirm` is present:
91
- 1. Delete all Tier 1 entries: `mcp__monomind__memory_delete` on namespace `mastermind:<domain>:raw`
92
- 2. Delete all Tier 2 entries: `mcp__monomind__memory_delete` on namespace `mastermind:<domain>:weekly`
91
+ 1. Delete all Tier 1 entries: `npx monomind@latest memory delete --namespace mastermind:<domain>:raw`
92
+ 2. Delete all Tier 2 entries: `npx monomind@latest memory delete --namespace mastermind:<domain>:weekly`
93
93
  3. Remove domain nodes from Monograph graph
94
94
  4. Report: "Reset complete for domain <name>. All memory wiped."
95
95
 
@@ -119,8 +119,8 @@ mcp__monomind__monograph_suggest({ task: "..." })
119
119
  mcp__monomind__monograph_query({ query: "..." })
120
120
 
121
121
  // Swarm
122
- mcp__monomind__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
123
- mcp__monomind__swarm_status({})
122
+ mcp__monomind__monoswarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
123
+ mcp__monomind__monoswarm_status({})
124
124
 
125
125
  // System
126
126
  mcp__monomind__system_health({})
@@ -91,19 +91,19 @@ digraph mastermind_routing {
91
91
  | Situation | Skill to invoke |
92
92
  |---|---|
93
93
  | Debug a bug, test failure, unexpected behavior | `Skill("mastermind-debug")` |
94
- | Verify a claim — tests pass, feature works, fix resolved | `Skill("mastermind-verify")` |
95
- | Write tests first, enforce Red-Green-Refactor | `Skill("mastermind-tdd")` |
94
+ | Verify a claim — tests pass, feature works, fix resolved | `Skill("mastermind-review")` |
95
+ | Write tests first, enforce Red-Green-Refactor | `Skill("mastermind-debug")` (Phase 4 covers the failing-test-first loop) |
96
96
  | Write a structured implementation plan (no placeholders) | `Skill("mastermind-plan")` |
97
97
  | Execute a written plan step-by-step with stop-on-blocker | `Skill("mastermind-execute")` |
98
- | Execute a plan via fresh subagents with 2-stage review | `Skill("mastermind-taskdev")` |
99
- | Fix or investigate 2+ independent problems concurrently (different files, subsystems, or bugs) | dispatch parallel subagents in one message — one per independent domain; use `Skill("mastermind-taskdev")` for plan-driven parallel work |
98
+ | Execute a plan via fresh subagents with 2-stage review | `Skill("mastermind-execute")` |
99
+ | Fix or investigate 2+ independent problems concurrently (different files, subsystems, or bugs) | dispatch parallel subagents in one message — one per independent domain; use `Skill("mastermind-execute")` for plan-driven parallel work |
100
100
  | Ingest a prompt/spec/folder and generate agent-optimized tasks | `Skill("mastermind-createtask")` |
101
101
  | Execute tasks from a task file or monotask board (parallel/sequential/minimal modes, review cycles, loop) | `Skill("mastermind-do")` |
102
102
  | Design first — spec, approaches, approval gate before code | `Skill("mastermind-design")` |
103
- | Build a feature, fix a bug, implement anything | `Skill("mastermind-build")` |
103
+ | Build a feature, fix a bug, implement anything | `Skill("mastermind-plan")` then `Skill("mastermind-execute")` |
104
104
  | Code review, content critique, strategy audit | `Skill("mastermind-review")` |
105
105
  | Receive a code review and apply it correctly | `Skill("mastermind-receive-review")` |
106
- | System architecture, DDD, technical design | `Skill("mastermind-architect")` |
106
+ | System architecture, DDD, technical design | `Skill("mastermind-design")` |
107
107
  | Market research, competitive analysis, user insights | `Skill("mastermind-research")` |
108
108
  | Ideas, feature generation, opportunity framing | `Skill("mastermind-idea")` |
109
109
  | Research ideas, evaluate with PM lens, decompose into subtasks | `Skill("mastermind-ideate")` |
@@ -112,14 +112,13 @@ digraph mastermind_routing {
112
112
  | Sales outreach, proposals, pipeline | `Skill("mastermind-sales")` |
113
113
  | Blog, docs, newsletters, threads | `Skill("mastermind-content")` |
114
114
  | Versioning, changelogs, deployment | `Skill("mastermind-release")` |
115
- | Finish a branch — tests, options menu, merge/PR/discard | `Skill("mastermind-finish")` |
115
+ | Finish a branch — tests, options menu, merge/PR/discard | `Skill("mastermind-review")` |
116
116
  | Workflow, process, reporting | `Skill("mastermind-ops")` |
117
117
  | Invoicing, forecasting, cost | `Skill("mastermind-finance")` |
118
118
  | Inspect or manage brain memory | `Skill("mastermind-brain")` |
119
119
  | Technical portfolio, project state assessment | `Skill("mastermind-techport")` |
120
120
  | Define/run an agent organization | `Skill("mastermind-createorg")` / `Skill("mastermind-runorg")` |
121
- | Review and action pending agent approval requests | `Skill("mastermind-approvev1")` (v1 orgs only — v2 approvals arrive in the dashboard Human Input tab) |
122
- | Autonomous build + review until clean | `Skill("mastermind-autodev")` |
121
+ | Autonomous build + review until clean | `Skill("mastermind-execute")` |
123
122
  | Isolate work in a git worktree | `Skill("mastermind-worktree")` |
124
123
  | Write or improve a mastermind skill | `Skill("mastermind-skill-builder")` |
125
124
 
@@ -182,7 +181,7 @@ These sequences are non-negotiable in all modes:
182
181
  - **When fixing bugs**: `mastermind:debug` first (root cause) → write failing test via `mastermind:tdd` → fix → `mastermind:verify`
183
182
  - **After building**: `mastermind:review` — at minimum one pass before reporting complete
184
183
  - **Consuming a review**: `mastermind:receive-review` — verify before implementing, clarify unclear items first
185
- - **After any run**: Brain Write Procedure — score decisions, append to LanceDB
184
+ - **After any run**: Brain Write Procedure — score decisions, append to the memory store
186
185
  - **Before releasing**: `mastermind:review --tillend --auto` → `mastermind:verify` → `mastermind:finish`
187
186
  - **Isolated work**: `mastermind:worktree` before making changes to avoid contaminating main
188
187
  - **Before claiming complete**: Run `mastermind:verify` — never claim completion based on agent reports, linter passes, or partial checks
@@ -292,8 +291,8 @@ project_name="${project_name:-$(basename "$PWD")}"
292
291
 
293
292
  Follow the Brain Load Procedure from `mastermind-protocol/SKILL.md`:
294
293
 
295
- 1. Call `mcp__monomind__lancedb_hierarchical-recall` namespace `mastermind:principles` (limit 20)
296
- 2. For each domain that appears relevant to the prompt, call `mcp__monomind__lancedb_context-synthesize` namespace `mastermind:<domain>:weekly`
294
+ 1. Call `mcp__monomind__memory_hierarchical-recall` namespace `mastermind:principles` (limit 20)
295
+ 2. For each domain that appears relevant to the prompt, call `mcp__monomind__memory_context-synthesize` namespace `mastermind:<domain>:weekly`
297
296
  3. Call `mcp__monomind__monograph_query` with 3-5 keywords from the prompt
298
297
 
299
298
  Assemble the BRAIN CONTEXT block from results.
@@ -658,9 +657,15 @@ pick_domain_manager() {
658
657
  | {name: .name,
659
658
  score: (
660
659
  (.name | ascii_downcase) as $n |
661
- # Score on ANY keyword match, not just the first
660
+ (.description // "" | ascii_downcase) as $desc |
661
+ # Score keyword matches against both name (weight 2) and description (weight 1) —
662
+ # name match is a stronger signal. Bind each word to $w before contains(): piping
663
+ # into contains(.) rebinds "." to the piped value, which would silently match everything.
662
664
  (if ($kw | length) > 0
663
- then ([$kw | split(" ")[] | select(length > 0) | if ($n | contains(.)) then 1 else 0 end] | add // 0)
665
+ then ([$kw | split(" ")[] | select(length > 0) | . as $w |
666
+ (if ($n | contains($w)) then 2 else 0 end) +
667
+ (if ($desc | contains($w)) then 1 else 0 end)
668
+ ] | add // 0)
664
669
  else 0 end) +
665
670
  (if $n | test("manager|director|coordinator") then 1 else 0 end)
666
671
  )}
@@ -761,7 +766,7 @@ Each Task call must include a complete briefing following the Monotask Task Brie
761
766
  - Instruction to create monotask cards directly using `monotask card create $BOARD_ID $COL_TODO_ID "<title>" --json` for all sub-tasks
762
767
  - Instruction to use `Skill("mastermind-do")` to execute tasks (Task agents have Skill tool access — do NOT use slash command syntax)
763
768
  - Instruction to spawn specialized agents using the domain-appropriate swarm topology
764
- - **For the `build` domain only:** include `build_exec_mode` (value: `"taskdev"` or `"execute"`) and instruct the manager: "Use `Skill("mastermind-taskdev")` if build_exec_mode is `taskdev`, or `Skill("mastermind-execute")` if `execute`. This was resolved in the Step 3.6 Plan Gate (or Step 5)." If `build_plan` is set in `current.json`, include the plan path and instruct the manager to execute THAT plan task-by-task rather than re-deriving tasks from the goal.
769
+ - **For the `build` domain only:** instruct the manager: "Use `Skill("mastermind-execute")`. This was resolved in the Step 3.6 Plan Gate (or Step 5)." If `build_plan` is set in `current.json`, include the plan path and instruct the manager to execute THAT plan task-by-task rather than re-deriving tasks from the goal.
765
770
  - Instruction to return the unified output schema when done
766
771
 
767
772
  Example Task call for Development Manager. Substitute all **pre-known** `<…>` placeholders (project_name, SESSION_ID, board/col IDs, goals, manager name) before calling Task. Placeholders like `<status>`, `<path1>`, `<action1>` are filled at runtime by the spawned agent — do not attempt to substitute them. `subagent_type` is the **string value** of `$domain_manager_build` (e.g. `"Backend Architect"`), not a variable reference.
@@ -931,7 +936,7 @@ Monotask boards:
931
936
 
932
937
  Follow the Brain Write Procedure from `mastermind-protocol/SKILL.md` for each domain that ran:
933
938
  1. Score all decisions from this run
934
- 2. Append to Tier 1 raw log (LanceDB)
939
+ 2. Append to Tier 1 raw log (the memory store)
935
940
  3. Check and trigger weekly compaction if threshold met
936
941
  4. Check and trigger graph consolidation if cluster detected
937
942
 
@@ -1085,11 +1090,11 @@ Log this as a decision in the cycle's output schema with `confidence` set accord
1085
1090
 
1086
1091
  Execute the chosen activity by invoking the appropriate domain skill via the `Skill` tool (Steps 4–10 of the main flow, condensed). Use `Skill("mastermind-<domain>")` — do NOT use slash command syntax (`/<name>`), which only works when typed interactively in the Claude Code CLI, not within an executing command or skill:
1087
1092
 
1088
- - Test → `Skill("mastermind-tdd")` with the untested artifacts as prompt (enforce Red-Green-Refactor)
1093
+ - Test → `Skill("mastermind-debug")` Phase 4 with the untested artifacts as prompt (write the failing test first, enforce Red-Green-Refactor)
1089
1094
  - Debug/Fix → `Skill("mastermind-debug")` with the failing test or error as prompt (root-cause first, then fix)
1090
1095
  - Review → `Skill("mastermind-review")` with scope = artifacts from last run
1091
- - Improve/Refactor → `Skill("mastermind-build")` with refactor prompt
1092
- - Add feature → `Skill("mastermind-build")` with the next feature from the `next_actions` array printed by the Step 12a output above
1096
+ - Improve/Refactor → `Skill("mastermind-plan")` then `Skill("mastermind-execute")` with refactor prompt
1097
+ - Add feature → `Skill("mastermind-plan")` then `Skill("mastermind-execute")` with the next feature from the `next_actions` array printed by the Step 12a output above
1093
1098
  - Research → `Skill("mastermind-research")` with the open question as prompt
1094
1099
  - Content/Docs → `Skill("mastermind-content")` with scope = new artifacts
1095
1100
  - Release → `Skill("mastermind-release")` with project scope
@@ -193,17 +193,17 @@ mcp__monomind__memory_pattern-store({ key: "pattern/auth", value: "JWT + refresh
193
193
  // Search
194
194
  mcp__monomind__memory_pattern-search({ query: "authentication", namespace: "patterns" })
195
195
 
196
- // Retrieve
197
- mcp__monomind__memory_retrieve({ key: "pattern/auth", namespace: "patterns" })
196
+ // Retrieve (CLI only — no MCP tool)
197
+ // npx monomind@latest memory retrieve --key "pattern/auth" --namespace patterns
198
198
 
199
- // List
200
- mcp__monomind__memory_list({ namespace: "patterns" })
199
+ // List (CLI only — no MCP tool)
200
+ // npx monomind@latest memory list --namespace patterns
201
201
 
202
- // Delete
203
- mcp__monomind__memory_delete({ key: "pattern/auth", namespace: "patterns" })
202
+ // Delete (CLI only — no MCP tool)
203
+ // npx monomind@latest memory delete --key "pattern/auth" --namespace patterns
204
204
 
205
- // Stats
206
- mcp__monomind__memory_stats({})
205
+ // Stats (CLI only — no MCP tool)
206
+ // npx monomind@latest memory stats
207
207
  ```
208
208
 
209
209
  ## Common Workflows
@@ -113,16 +113,16 @@ npx monomind monoswarm scale swarm-abc123 --agents 8 --type coder
113
113
 
114
114
  ```javascript
115
115
  // Initialize swarm
116
- mcp__monomind__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
116
+ mcp__monomind__monoswarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
117
117
 
118
118
  // Check status
119
- mcp__monomind__swarm_status({})
119
+ mcp__monomind__monoswarm_status({})
120
120
 
121
121
  // Health check
122
- mcp__monomind__swarm_health({})
122
+ mcp__monomind__monoswarm_health({})
123
123
 
124
124
  // Shutdown swarm
125
- mcp__monomind__swarm_shutdown({})
125
+ mcp__monomind__monoswarm_shutdown({})
126
126
  ```
127
127
 
128
128
  ## Agent Team Routing
@@ -47,14 +47,14 @@ Match the intent against this catalog. Pick ONE primary route, plus supporting s
47
47
  | Intent | Primary route |
48
48
  |---|---|
49
49
  | Fix a bug, test failure, unexpected behavior | `Skill("mastermind-debug")` → root cause first, then fix |
50
- | Build a feature / implement anything | `Skill("mastermind-design")` → spec, then `Skill("mastermind-build")` |
51
- | Plan before coding | `Skill("mastermind-plan")` (write) / `Skill("mastermind-execute")` or `Skill("mastermind-taskdev")` (run) |
52
- | TDD workflow | `Skill("mastermind-tdd")` |
53
- | Refactor / architecture / DDD / dedup | `Skill("mastermind-architect")` |
50
+ | Build a feature / implement anything | `Skill("mastermind-design")` → spec, then `Skill("mastermind-plan")` → `Skill("mastermind-execute")` |
51
+ | Plan before coding | `Skill("mastermind-plan")` (write) / `Skill("mastermind-execute")` (run) |
52
+ | TDD workflow | `Skill("mastermind-debug")` (Phase 4 covers the failing-test-first loop) |
53
+ | Refactor / architecture / DDD / dedup | `Skill("mastermind-design")` |
54
54
  | Code review, audit quality | `Skill("mastermind-review")`; apply one received: `Skill("mastermind-receive-review")` |
55
- | Verify a claim ("it works", "tests pass") | `Skill("mastermind-verify")` |
56
- | Autonomous improve-loop | `Skill("mastermind-autodev")` (`--tillend` for until-clean) |
57
- | Finish/merge/PR a branch | `Skill("mastermind-finish")`; release/versioning: `Skill("mastermind-release")` |
55
+ | Verify a claim ("it works", "tests pass") | `Skill("mastermind-review")` |
56
+ | Autonomous improve-loop | `Skill("mastermind-execute")`, re-invoking `Skill("mastermind-review")` between passes until clean |
57
+ | Finish/merge/PR a branch | `Skill("mastermind-review")`; release/versioning: `Skill("mastermind-release")` |
58
58
  | Isolate risky work | `Skill("mastermind-worktree")` |
59
59
  | Spec → agent task file/board | `Skill("mastermind-createtask")`, execute with `Skill("mastermind-do")` |
60
60
 
@@ -74,8 +74,8 @@ mcp__monomind__hooks_intelligence_stats({})
74
74
  mcp__monomind__task_summary({})
75
75
  mcp__monomind__progress_summary({})
76
76
 
77
- // LanceDB health (memory integrity)
78
- mcp__monomind__lancedb_health({})
77
+ // Memory store health (memory integrity)
78
+ mcp__monomind__memory_health({})
79
79
  ```
80
80
 
81
81
  ### Performance
@@ -105,7 +105,7 @@ When invoked, run these checks in parallel:
105
105
  mcp__monomind__system_health({})
106
106
  mcp__monomind__agent_health({})
107
107
  mcp__monomind__neural_status({ verbose: true })
108
- mcp__monomind__lancedb_health({})
108
+ mcp__monomind__memory_health({})
109
109
  mcp__monomind__performance_report({ format: "detailed" })
110
110
  ```
111
111
 
@@ -18,7 +18,19 @@
18
18
 
19
19
  const fs = require('fs');
20
20
  const path = require('path');
21
- const { appendAuditEvent } = require('../audit-log-writer.cjs');
21
+ // Audit logging must never be able to take the gates down with it. This
22
+ // handler runs inside hook-handler.cjs's fail-closed PreToolUse path, so a
23
+ // throw at module load — MODULE_NOT_FOUND when audit-log-writer.cjs is absent
24
+ // (issue #225) — blocked every Bash and Write call for the rest of the
25
+ // session, including the write that would have restored the file. The gate
26
+ // decisions themselves do not depend on the audit log, so degrade to a no-op
27
+ // writer and keep enforcing them.
28
+ let appendAuditEvent;
29
+ try {
30
+ ({ appendAuditEvent } = require('../audit-log-writer.cjs'));
31
+ } catch {
32
+ appendAuditEvent = () => {};
33
+ }
22
34
 
23
35
  // ─── monofence-ai integration (additional layer on top of regex gates) ───────
24
36
  //
@@ -7,30 +7,21 @@ description: Use when a request may need a Mastermind workflow such as planning,
7
7
 
8
8
  Load only the workflow that matches the request:
9
9
 
10
+ - `mastermind-idea` to shape a raw prompt into a stated problem and options.
11
+ - `mastermind-design` before building a feature — this is a gate, not a suggestion.
10
12
  - `mastermind-plan` before multi-file implementation.
13
+ - `mastermind-execute` for a written plan.
11
14
  - `mastermind-review` for audits and critiques.
12
15
  - `mastermind-debug` for failures or unexpected behavior.
13
16
  - `mastermind-research` for open questions.
14
- - `mastermind-execute` for a written plan.
15
17
  - `mastermind-org` for organization lifecycle work.
16
18
  - `mastermind-memory` for persistent knowledge.
17
19
 
20
+ **For build/feature work, the gates are mandatory and ordered:** idea → design → plan →
21
+ execute → review. The full routing table for the other 20+ Mastermind workflows lives in
22
+ `.claude/commands/mastermind-master.md`; consult it before concluding that no workflow applies.
23
+
18
24
  Use Monograph before broad repository search when the platform exposes the
19
25
  Monomind MCP server. Without native skills, run
20
26
  `monomind mastermind run <skill> --print` and follow the printed procedure.
21
27
  Platform tool mappings are in [references/](references/).
22
- # monomind:start skills:claude:mastermind
23
- # Mastermind
24
-
25
- Load only the workflow that matches the current task:
26
- - `mastermind` — Route a request to the relevant Mastermind workflow.
27
- - `mastermind-plan` — Write a detailed implementation plan before changing code.
28
- - `mastermind-review` — Review code, content, strategy, or security work.
29
- - `mastermind-debug` — Investigate a failure or unexpected behavior before fixing it.
30
- - `mastermind-research` — Research an open question before making a decision.
31
- - `mastermind-execute` — Execute a written implementation plan step by step.
32
- - `mastermind-org` — Create, run, inspect, and manage a Mastermind organization.
33
- - `mastermind-memory` — Store, retrieve, and maintain persistent organization knowledge.
34
-
35
- If skills cannot be loaded natively, run `monomind mastermind run <skill> --print`.
36
- # monomind:end skills:claude:mastermind
@@ -157,7 +157,7 @@ Once you understand WHERE the break is, find existing working examples:
157
157
 
158
158
  1. **Write a failing test first** (before touching production code)
159
159
  - Automated test where possible; a one-off test script if no framework
160
- - Use `Skill("mastermind-tdd")` for writing proper failing tests
160
+ - Write the test so it fails for the stated root cause, not for a setup error
161
161
  - The test MUST fail before the fix proves it
162
162
 
163
163
  2. **Implement a single fix**
@@ -266,8 +266,8 @@ If systematic investigation reveals the issue is truly environmental, timing-dep
266
266
  - **Condition-based waiting:** replace arbitrary sleeps/timeouts in flaky tests and scripts with polling for the actual condition ("wait until the file exists / the port answers"), with a hard cap. Timing guesses are bugs waiting for a slower machine.
267
267
 
268
268
  **Related skills:**
269
- - `Skill("mastermind-tdd")` — for creating the failing test case (Phase 4, Step 1)
270
- - `Skill("mastermind-verify")` — verify the fix worked before claiming success
269
+ - `Skill("mastermind-review")` — verify the fix worked before claiming success
270
+ - `Skill("mastermind-plan")` — when the root cause turns out to need a multi-file change
271
271
 
272
272
  ## Impact
273
273
 
@@ -79,6 +79,7 @@ Invoke Skill("mastermind-plan") ← TERMINAL STATE
79
79
  ### Understanding the idea
80
80
 
81
81
  - Check current project state first (files, docs, recent commits)
82
+ - Check `brain_context` for relevant prior decisions, lessons, or patterns for this domain/project before drafting questions — if it surfaces something relevant (a past constraint, a lesson from a similar feature, a decision already made), say so to the user and let it steer which questions actually need asking. Do not silently re-ask what's already answered in `brain_context`.
82
83
  - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems, flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
83
84
  - If too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order to build? Then design the first sub-project through the normal flow. Each sub-project gets its own spec → plan → implementation cycle.
84
85
  - For appropriately-scoped projects, ask questions one at a time
@@ -88,6 +89,7 @@ Invoke Skill("mastermind-plan") ← TERMINAL STATE
88
89
 
89
90
  ### Exploring approaches
90
91
 
92
+ - Check `brain_context` for approaches tried (and their outcomes) on similar past work before proposing new ones — prefer what worked, flag what didn't, and say when a proposed approach is informed by recalled history
91
93
  - Propose 2-3 different approaches with trade-offs
92
94
  - Present options conversationally with your recommendation and reasoning
93
95
  - Lead with the recommended option and explain why
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mastermind-execute
3
- description: Load a written implementation plan, review it critically, execute all tasks step by step, and hand off to mastermind:finish when complete.
3
+ description: Load a written implementation plan, review it critically, execute all tasks step by step, and hand off to mastermind:review when complete.
4
4
  type: domain-skill
5
5
  default_mode: confirm
6
6
  ---
@@ -11,7 +11,7 @@ Load plan, review critically, execute all tasks, report when complete.
11
11
 
12
12
  **Announce at start:** "I'm using the mastermind:execute skill to implement this plan."
13
13
 
14
- **Note:** This skill works best with subagent support (Claude Code). When subagents are available, prefer `Skill("mastermind-taskdev")` for parallel task execution.
14
+ **Note:** This skill works best with subagent support (Claude Code). When subagents are available, dispatch one subagent per independent task in a single message.
15
15
 
16
16
  ---
17
17
 
@@ -47,18 +47,43 @@ For each task in the plan:
47
47
  3. Run verifications as specified in the plan
48
48
  4. Mark as `completed`
49
49
 
50
+ **Dispatching subagents (when available):** when independent tasks can run in parallel, dispatch one subagent per task in a single message via the Task tool. Each subagent starts with no memory of this session — embed the plan step and the `brain_context` received in Inputs directly in its prompt so it has the same grounding this skill was given.
51
+
52
+ **CRITICAL — variable substitution required:** before constructing the Task prompt, replace `${brain_context}` and `${project_name}` below with their actual literal values (the BRAIN CONTEXT block from Inputs, and the project name) — an unsubstituted `${brain_context}` placeholder means the subagent executes blind to prior decisions and constraints. This is the same substitution discipline `mastermind-idea/SKILL.md` uses for its Task prompts.
53
+
54
+ ```javascript
55
+ Task({
56
+ subagent_type: "coder", // pick per task, per the plan's agent recommendation
57
+ description: "<task title from plan>",
58
+ run_in_background: false, // true only when running independently alongside other parallel tasks
59
+ prompt: `You are executing one task from an implementation plan for project "${project_name}".
60
+
61
+ BRAIN CONTEXT:
62
+ ${brain_context}
63
+
64
+ TASK: <task title>
65
+ STEPS:
66
+ <verbatim bite-sized steps for this task from the plan>
67
+
68
+ VERIFICATION:
69
+ <verification command(s) from the plan>
70
+
71
+ Follow the steps exactly — do not skip, reorder, or invent steps not listed. Run the verification before reporting done.`
72
+ })
73
+ ```
74
+
50
75
  When the plan references skills:
51
- - `mastermind:taskdev` → invoke `Skill("mastermind-taskdev")`
52
- - `mastermind:verify` → invoke `Skill("mastermind-verify")`
76
+ - `mastermind:taskdev` → this skill; continue inline (no separate taskdev skill exists)
77
+ - `mastermind:verify` → invoke `Skill("mastermind-review")`
53
78
  - Any other `mastermind:*` skill → invoke `Skill("mastermind-<name>")`
54
79
 
55
80
  ### Step 3: Complete Development
56
81
 
57
82
  After all tasks complete and are verified:
58
83
 
59
- - Announce: "All tasks complete. Handing off to mastermind:finish."
60
- - **REQUIRED SUB-SKILL:** invoke `Skill("mastermind-finish")`
61
- - Follow that skill to verify tests, present options, and execute the chosen finish action
84
+ - Announce: "All tasks complete. Handing off to mastermind:review."
85
+ - **REQUIRED SUB-SKILL:** invoke `Skill("mastermind-review")`
86
+ - Follow that skill to verify the work before any merge, PR, or release step
62
87
 
63
88
  ---
64
89
 
@@ -72,6 +97,37 @@ After all tasks complete and are verified:
72
97
 
73
98
  **Ask for clarification rather than guessing.** Never invent steps not in the plan.
74
99
 
100
+ **Required stop-report format.** When any condition above fires, report using this exact structure — never just "I'm stuck" or a bare "please advise":
101
+
102
+ ```
103
+ STOP — <one-line description of what blocked>
104
+
105
+ Task: <the specific plan task/step that stopped, e.g. "Task 3: Add rate limiter">
106
+ Tried: <what was actually attempted — commands run, files checked, approaches tried — not just "it failed">
107
+ Result: <the actual error, output, or contradiction observed>
108
+ Need: <the exact decision or input required to unblock — a choice between named options,
109
+ a missing value, or explicit permission for a specific next step>
110
+ ```
111
+
112
+ Example:
113
+
114
+ ```
115
+ STOP — verification fails repeatedly on Task 3
116
+
117
+ Task: Task 3: Add rate limiter to /api/upload
118
+ Tried: Ran `npm test -- rate-limiter.test.ts` 3x after adding express-rate-limit
119
+ middleware per plan step 3.2. Confirmed middleware order matches the plan.
120
+ Checked for port conflicts (none). Re-read plan steps 3.1-3.4 — no gap found.
121
+ Result: Test "blocks after 100 requests/min" fails every run: expected 429, got 200.
122
+ express-rate-limit v7's `max` option appears to be silently ignored — same
123
+ failure with max:1.
124
+ Need: Decide between (a) pin express-rate-limit to v6 (last version where `max`
125
+ worked as documented) or (b) switch to a different limiter library — the plan
126
+ doesn't specify a version. Confirm which, or provide the correct v7 config.
127
+ ```
128
+
129
+ The report must let the user act without re-deriving the investigation themselves — never a vague "please advise" with no Task/Tried/Result/Need detail.
130
+
75
131
  ---
76
132
 
77
133
  ## When to Revisit Earlier Steps
@@ -90,7 +146,7 @@ After all tasks complete and are verified:
90
146
  - Follow plan steps exactly — do not improvise
91
147
  - Do not skip verifications
92
148
  - Reference skills when the plan says to invoke them
93
- - Stop when blocked; never guess
149
+ - Stop when blocked; never guess — use the required stop-report format above
94
150
  - Never start implementation on `main` or `master` without explicit user consent
95
151
 
96
152
  ---
@@ -99,6 +155,5 @@ After all tasks complete and are verified:
99
155
 
100
156
  **Skills used by this skill:**
101
157
  - `Skill("mastermind-plan")` — creates the plan this skill executes
102
- - `Skill("mastermind-taskdev")` — subagent-driven parallel task execution (preferred for complex plans)
103
- - `Skill("mastermind-finish")` — complete the development branch after all tasks
104
- - `Skill("mastermind-verify")` — verification gate before finishing
158
+ - `Skill("mastermind-review")` — verification gate after all tasks complete
159
+ - `Skill("mastermind-debug")` — when a task fails for a reason the plan did not anticipate
@@ -172,9 +172,16 @@ user_market_agents=$(jq \
172
172
  | {name: .name, slug: .slug, category: .category,
173
173
  score: (
174
174
  (.name | ascii_downcase) as $n |
175
- # Score on ANY keyword match (mirrors master.md pick_domain_manager scoring)
175
+ (.description // "" | ascii_downcase) as $desc |
176
+ # Score keyword matches against both name (weight 2) and description (weight 1) —
177
+ # name match is a stronger signal (mirrors master.md pick_domain_manager scoring).
178
+ # Bind each word to $w before contains(): piping into contains(.) rebinds "." to the
179
+ # piped value, which would silently match everything.
176
180
  (if ($kw | length) > 0
177
- then ([$kw | split(" ")[] | select(length > 0) | if ($n | contains(.)) then 1 else 0 end] | add // 0)
181
+ then ([$kw | split(" ")[] | select(length > 0) | . as $w |
182
+ (if ($n | contains($w)) then 2 else 0 end) +
183
+ (if ($desc | contains($w)) then 1 else 0 end)
184
+ ] | add // 0)
178
185
  else 0 end)
179
186
  )}
180
187
  ] | sort_by(-.score) | unique_by(.slug) | .[0:$n] | [.[].name]' \
@@ -14,12 +14,16 @@ This file is referenced by `master.md` and domain commands. Never invoke directl
14
14
 
15
15
  Count the words in `$ARGUMENTS` and scan for domain signals.
16
16
 
17
- **Rich prompt** (skip all intake questions → proceed to execution):
18
- - Word count ≥ 20 AND
19
- - Contains at least one domain signal (build, ship, feature, bug, fix, campaign, marketing, SEO, content, review, audit, research, launch, release, sales, outreach, ops, finance, report) AND
20
- - Contains a goal or outcome phrase (e.g. "so that", "by end of", "targeting", "for our", "to improve")
17
+ **Rich prompt** (skip all intake questions → proceed to execution) if EITHER of these holds:
21
18
 
22
- **Vague prompt** (run intake): anything that doesn't meet rich-prompt criteria.
19
+ - **A. Long + domain-signaled:** word count ≥ 20 AND contains at least one domain signal (build, ship, feature, bug, fix, campaign, marketing, SEO, content, review, audit, research, launch, release, sales, outreach, ops, finance, report).
20
+ - **B. Concrete imperative:** contains a clear imperative verb (fix, add, remove, rename, update, refactor, migrate, upgrade, revert, patch, bump) AND names something specific enough that no reasonable person would need clarifying questions — a file/path, a function/class/component name, an error message or stack-trace fragment, a bug symptom with a concrete detail (a number, duration, status code, version), or a named third-party service/library. This counts as rich even under 20 words and without a goal/outcome phrase. Examples:
21
+ - "Fix the login bug where sessions expire after 5 minutes instead of 30"
22
+ - "Rename `getUserData` to `fetchUserProfile` in src/api/users.ts"
23
+ - "Update the Stripe webhook handler to retry on 502s"
24
+ - "Remove the unused `legacyAuth` middleware"
25
+
26
+ **Vague prompt** (run intake): anything that meets neither A nor B.
23
27
 
24
28
  Even with a rich prompt, if `--confirm` flag is present: skip to execution but show the plan before spawning agents and wait for "go".
25
29
 
@@ -30,9 +34,29 @@ Even with a rich prompt, if `--confirm` flag is present: skip to execution but s
30
34
  Ask ONE question at a time. Wait for the answer before asking the next. Stop asking as soon as you have enough to proceed.
31
35
 
32
36
  **Q1 — Goal:**
33
- > "What outcome defines success for this run? Be as specific as you can — what will be done or produced when we're finished?"
37
+ > "What outcome defines success for this run? Be as specific as you can — what will be done or produced when we're finished? (Or just say 'you decide' at any point and I'll infer the rest.)"
34
38
 
35
39
  **Q2 — Scope:**
40
+
41
+ Infer the likely domain(s) from the Q1 answer using this keyword mapping (case-insensitive substring match; a "don't over-engineer" heuristic, not a classifier):
42
+
43
+ | Domain | Keyword signals |
44
+ |---|---|
45
+ | build | build, ship, feature, implement, code, bug, fix, develop |
46
+ | idea | idea, brainstorm, concept, pivot, explore |
47
+ | marketing | marketing, campaign, SEO, ads, brand, positioning |
48
+ | review | review, audit, evaluate, assess, critique |
49
+ | research | research, investigate, analyze, study, benchmark |
50
+ | content | content, blog, copy, article, docs, documentation |
51
+ | release | release, launch, deploy, version, publish |
52
+ | sales | sales, outreach, deal, pipeline, prospect |
53
+ | ops | ops, operations, process, workflow, infra |
54
+ | finance | finance, budget, cost, revenue, pricing |
55
+
56
+ If one or more domains match, ask a single yes/no-shaped confirmation instead of the raw menu:
57
+ > "This looks like <inferred domain(s), comma-joined> work — sound right, or something else?"
58
+
59
+ If the user confirms, use the inferred domain(s) and move on. If the user says "something else" (or nothing matched in the first place), fall back to the raw menu:
36
60
  > "Which business domains should this touch? Options: build, idea, marketing, review, research, content, release, sales, ops, finance — or should I decide based on the goal?"
37
61
 
38
62
  **Q3 — Constraints:**
@@ -42,7 +66,7 @@ Ask ONE question at a time. Wait for the answer before asking the next. Stop ask
42
66
  > "Should I execute automatically once I have a plan, or show you the plan first and wait for your approval before spawning agents?"
43
67
 
44
68
  **Q5 — Project:**
45
- > "Which project is this for? I'll create or find a monotask space with that name. (Or I can infer it from context.)"
69
+ > "Which project is this for? I'll create or find a workspace with that name. (Or I can infer it from context.)"
46
70
 
47
71
  Skip Q4 if `--auto` or `--confirm` flag was provided. Skip Q5 if `--project <name>` flag was provided.
48
72