@monoes/monomindcli 1.11.14 → 1.12.0

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 (427) hide show
  1. package/.claude/agents/generated/channel-intelligence-director.md +87 -0
  2. package/.claude/agents/generated/chief-growth-officer.md +88 -0
  3. package/.claude/agents/generated/content-seo-strategist.md +90 -0
  4. package/.claude/agents/generated/developer-community-strategist.md +91 -0
  5. package/.claude/agents/generated/outreach-partnership-strategist.md +90 -0
  6. package/.claude/agents/generated/social-media-strategist.md +91 -0
  7. package/.claude/agents/generated/video-visual-strategist.md +90 -0
  8. package/.claude/commands/mastermind/master.md +1 -1
  9. package/.claude/helpers/auto-memory-hook.mjs +13 -4
  10. package/.claude/helpers/control-start.cjs +5 -0
  11. package/.claude/helpers/event-logger.cjs +114 -0
  12. package/.claude/helpers/handlers/adr-draft-handler.cjs +19 -5
  13. package/.claude/helpers/handlers/agent-start-handler.cjs +13 -4
  14. package/.claude/helpers/handlers/compact-handler.cjs +2 -0
  15. package/.claude/helpers/handlers/edit-handler.cjs +1 -1
  16. package/.claude/helpers/handlers/gates-handler.cjs +3 -0
  17. package/.claude/helpers/handlers/graph-status-handler.cjs +14 -8
  18. package/.claude/helpers/handlers/loops-status-handler.cjs +5 -2
  19. package/.claude/helpers/handlers/route-handler.cjs +13 -6
  20. package/.claude/helpers/handlers/session-handler.cjs +11 -4
  21. package/.claude/helpers/handlers/session-restore-handler.cjs +21 -11
  22. package/.claude/helpers/handlers/task-handler.cjs +13 -5
  23. package/.claude/helpers/intelligence.cjs +7 -2
  24. package/.claude/helpers/loop-tracker.cjs +15 -3
  25. package/.claude/helpers/memory.cjs +6 -1
  26. package/.claude/helpers/router.cjs +5 -2
  27. package/.claude/helpers/session.cjs +2 -0
  28. package/.claude/helpers/statusline.cjs +10 -2
  29. package/.claude/helpers/utils/micro-agents.cjs +20 -4
  30. package/.claude/skills/mastermind/_protocol.md +25 -15
  31. package/.claude/skills/mastermind/architect.md +3 -3
  32. package/.claude/skills/mastermind/autodev.md +4 -2
  33. package/.claude/skills/mastermind/idea.md +10 -0
  34. package/.claude/skills/mastermind/ops.md +3 -3
  35. package/.claude/skills/mastermind/runorg.md +153 -86
  36. package/dist/src/agents/registry-builder.d.ts.map +1 -1
  37. package/dist/src/agents/registry-builder.js +2 -0
  38. package/dist/src/agents/registry-builder.js.map +1 -1
  39. package/dist/src/autopilot-state.d.ts.map +1 -1
  40. package/dist/src/autopilot-state.js +10 -5
  41. package/dist/src/autopilot-state.js.map +1 -1
  42. package/dist/src/benchmarks/benchmark-runner.d.ts.map +1 -1
  43. package/dist/src/benchmarks/benchmark-runner.js +13 -0
  44. package/dist/src/benchmarks/benchmark-runner.js.map +1 -1
  45. package/dist/src/benchmarks/metric-evaluators.d.ts.map +1 -1
  46. package/dist/src/benchmarks/metric-evaluators.js +20 -9
  47. package/dist/src/benchmarks/metric-evaluators.js.map +1 -1
  48. package/dist/src/browser/actions.d.ts.map +1 -1
  49. package/dist/src/browser/actions.js +10 -3
  50. package/dist/src/browser/actions.js.map +1 -1
  51. package/dist/src/browser/browser.d.ts.map +1 -1
  52. package/dist/src/browser/browser.js +12 -2
  53. package/dist/src/browser/browser.js.map +1 -1
  54. package/dist/src/browser/cdp.d.ts.map +1 -1
  55. package/dist/src/browser/cdp.js +21 -3
  56. package/dist/src/browser/cdp.js.map +1 -1
  57. package/dist/src/browser/har.d.ts.map +1 -1
  58. package/dist/src/browser/har.js +27 -5
  59. package/dist/src/browser/har.js.map +1 -1
  60. package/dist/src/commands/agent.d.ts.map +1 -1
  61. package/dist/src/commands/agent.js +11 -8
  62. package/dist/src/commands/agent.js.map +1 -1
  63. package/dist/src/commands/analyze.d.ts.map +1 -1
  64. package/dist/src/commands/analyze.js +36 -21
  65. package/dist/src/commands/analyze.js.map +1 -1
  66. package/dist/src/commands/autopilot.d.ts.map +1 -1
  67. package/dist/src/commands/autopilot.js +12 -4
  68. package/dist/src/commands/autopilot.js.map +1 -1
  69. package/dist/src/commands/benchmark.d.ts.map +1 -1
  70. package/dist/src/commands/benchmark.js +51 -8
  71. package/dist/src/commands/benchmark.js.map +1 -1
  72. package/dist/src/commands/browse.d.ts.map +1 -1
  73. package/dist/src/commands/browse.js +5 -2
  74. package/dist/src/commands/browse.js.map +1 -1
  75. package/dist/src/commands/claims.d.ts.map +1 -1
  76. package/dist/src/commands/claims.js +29 -11
  77. package/dist/src/commands/claims.js.map +1 -1
  78. package/dist/src/commands/cleanup.d.ts.map +1 -1
  79. package/dist/src/commands/cleanup.js +25 -5
  80. package/dist/src/commands/cleanup.js.map +1 -1
  81. package/dist/src/commands/config.d.ts.map +1 -1
  82. package/dist/src/commands/config.js +15 -7
  83. package/dist/src/commands/config.js.map +1 -1
  84. package/dist/src/commands/daemon.d.ts.map +1 -1
  85. package/dist/src/commands/daemon.js +6 -0
  86. package/dist/src/commands/daemon.js.map +1 -1
  87. package/dist/src/commands/deployment.d.ts.map +1 -1
  88. package/dist/src/commands/deployment.js +34 -19
  89. package/dist/src/commands/deployment.js.map +1 -1
  90. package/dist/src/commands/doctor.d.ts.map +1 -1
  91. package/dist/src/commands/doctor.js +38 -12
  92. package/dist/src/commands/doctor.js.map +1 -1
  93. package/dist/src/commands/guidance.d.ts.map +1 -1
  94. package/dist/src/commands/guidance.js +15 -2
  95. package/dist/src/commands/guidance.js.map +1 -1
  96. package/dist/src/commands/hive-mind.d.ts.map +1 -1
  97. package/dist/src/commands/hive-mind.js +37 -14
  98. package/dist/src/commands/hive-mind.js.map +1 -1
  99. package/dist/src/commands/hooks.d.ts.map +1 -1
  100. package/dist/src/commands/hooks.js +42 -25
  101. package/dist/src/commands/hooks.js.map +1 -1
  102. package/dist/src/commands/init.d.ts.map +1 -1
  103. package/dist/src/commands/init.js +9 -4
  104. package/dist/src/commands/init.js.map +1 -1
  105. package/dist/src/commands/issues.d.ts.map +1 -1
  106. package/dist/src/commands/issues.js +29 -26
  107. package/dist/src/commands/issues.js.map +1 -1
  108. package/dist/src/commands/mcp.d.ts.map +1 -1
  109. package/dist/src/commands/mcp.js +11 -5
  110. package/dist/src/commands/mcp.js.map +1 -1
  111. package/dist/src/commands/memory.d.ts.map +1 -1
  112. package/dist/src/commands/memory.js +10 -0
  113. package/dist/src/commands/memory.js.map +1 -1
  114. package/dist/src/commands/migrate.js +5 -5
  115. package/dist/src/commands/migrate.js.map +1 -1
  116. package/dist/src/commands/monograph.d.ts.map +1 -1
  117. package/dist/src/commands/monograph.js +18 -5
  118. package/dist/src/commands/monograph.js.map +1 -1
  119. package/dist/src/commands/monovector/backup.d.ts.map +1 -1
  120. package/dist/src/commands/monovector/backup.js +8 -2
  121. package/dist/src/commands/monovector/backup.js.map +1 -1
  122. package/dist/src/commands/monovector/benchmark.d.ts.map +1 -1
  123. package/dist/src/commands/monovector/benchmark.js +20 -7
  124. package/dist/src/commands/monovector/benchmark.js.map +1 -1
  125. package/dist/src/commands/monovector/import.d.ts.map +1 -1
  126. package/dist/src/commands/monovector/import.js +15 -0
  127. package/dist/src/commands/monovector/import.js.map +1 -1
  128. package/dist/src/commands/monovector/migrate.d.ts.map +1 -1
  129. package/dist/src/commands/monovector/migrate.js +4 -1
  130. package/dist/src/commands/monovector/migrate.js.map +1 -1
  131. package/dist/src/commands/monovector/optimize.d.ts.map +1 -1
  132. package/dist/src/commands/monovector/optimize.js +11 -0
  133. package/dist/src/commands/monovector/optimize.js.map +1 -1
  134. package/dist/src/commands/monovector/setup.d.ts.map +1 -1
  135. package/dist/src/commands/monovector/setup.js +11 -1
  136. package/dist/src/commands/monovector/setup.js.map +1 -1
  137. package/dist/src/commands/neural.js +1 -1
  138. package/dist/src/commands/neural.js.map +1 -1
  139. package/dist/src/commands/performance.d.ts.map +1 -1
  140. package/dist/src/commands/performance.js +20 -7
  141. package/dist/src/commands/performance.js.map +1 -1
  142. package/dist/src/commands/platforms.d.ts.map +1 -1
  143. package/dist/src/commands/platforms.js +90 -8
  144. package/dist/src/commands/platforms.js.map +1 -1
  145. package/dist/src/commands/plugins.d.ts.map +1 -1
  146. package/dist/src/commands/plugins.js +12 -5
  147. package/dist/src/commands/plugins.js.map +1 -1
  148. package/dist/src/commands/process.d.ts.map +1 -1
  149. package/dist/src/commands/process.js +33 -10
  150. package/dist/src/commands/process.js.map +1 -1
  151. package/dist/src/commands/progress.d.ts.map +1 -1
  152. package/dist/src/commands/progress.js +5 -3
  153. package/dist/src/commands/progress.js.map +1 -1
  154. package/dist/src/commands/providers.js +5 -5
  155. package/dist/src/commands/providers.js.map +1 -1
  156. package/dist/src/commands/replay.d.ts.map +1 -1
  157. package/dist/src/commands/replay.js +8 -2
  158. package/dist/src/commands/replay.js.map +1 -1
  159. package/dist/src/commands/route.d.ts.map +1 -1
  160. package/dist/src/commands/route.js +27 -7
  161. package/dist/src/commands/route.js.map +1 -1
  162. package/dist/src/commands/security.d.ts.map +1 -1
  163. package/dist/src/commands/security.js +4 -0
  164. package/dist/src/commands/security.js.map +1 -1
  165. package/dist/src/commands/session.d.ts.map +1 -1
  166. package/dist/src/commands/session.js +12 -1
  167. package/dist/src/commands/session.js.map +1 -1
  168. package/dist/src/commands/start.d.ts.map +1 -1
  169. package/dist/src/commands/start.js +11 -4
  170. package/dist/src/commands/start.js.map +1 -1
  171. package/dist/src/commands/status.d.ts.map +1 -1
  172. package/dist/src/commands/status.js +7 -4
  173. package/dist/src/commands/status.js.map +1 -1
  174. package/dist/src/commands/swarm.d.ts.map +1 -1
  175. package/dist/src/commands/swarm.js +27 -13
  176. package/dist/src/commands/swarm.js.map +1 -1
  177. package/dist/src/commands/task.d.ts.map +1 -1
  178. package/dist/src/commands/task.js +26 -11
  179. package/dist/src/commands/task.js.map +1 -1
  180. package/dist/src/commands/tokens.d.ts.map +1 -1
  181. package/dist/src/commands/tokens.js +7 -2
  182. package/dist/src/commands/tokens.js.map +1 -1
  183. package/dist/src/commands/transfer-store.d.ts.map +1 -1
  184. package/dist/src/commands/transfer-store.js +36 -22
  185. package/dist/src/commands/transfer-store.js.map +1 -1
  186. package/dist/src/commands/update.d.ts.map +1 -1
  187. package/dist/src/commands/update.js +15 -3
  188. package/dist/src/commands/update.js.map +1 -1
  189. package/dist/src/commands/workflow.d.ts.map +1 -1
  190. package/dist/src/commands/workflow.js +39 -6
  191. package/dist/src/commands/workflow.js.map +1 -1
  192. package/dist/src/consensus/audit-writer.d.ts.map +1 -1
  193. package/dist/src/consensus/audit-writer.js +18 -7
  194. package/dist/src/consensus/audit-writer.js.map +1 -1
  195. package/dist/src/consensus/vote-signer.d.ts.map +1 -1
  196. package/dist/src/consensus/vote-signer.js +25 -8
  197. package/dist/src/consensus/vote-signer.js.map +1 -1
  198. package/dist/src/index.d.ts.map +1 -1
  199. package/dist/src/index.js +7 -3
  200. package/dist/src/index.js.map +1 -1
  201. package/dist/src/init/executor.d.ts.map +1 -1
  202. package/dist/src/init/executor.js +14 -11
  203. package/dist/src/init/executor.js.map +1 -1
  204. package/dist/src/init/shared-instructions-generator.d.ts.map +1 -1
  205. package/dist/src/init/shared-instructions-generator.js +20 -4
  206. package/dist/src/init/shared-instructions-generator.js.map +1 -1
  207. package/dist/src/init/statusline-generator.d.ts.map +1 -1
  208. package/dist/src/init/statusline-generator.js +36 -15
  209. package/dist/src/init/statusline-generator.js.map +1 -1
  210. package/dist/src/mcp-tools/a2a-tools.d.ts.map +1 -1
  211. package/dist/src/mcp-tools/a2a-tools.js +98 -13
  212. package/dist/src/mcp-tools/a2a-tools.js.map +1 -1
  213. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  214. package/dist/src/mcp-tools/agent-tools.js +16 -3
  215. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  216. package/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -1
  217. package/dist/src/mcp-tools/analyze-tools.js +80 -17
  218. package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
  219. package/dist/src/mcp-tools/browser-tools.d.ts.map +1 -1
  220. package/dist/src/mcp-tools/browser-tools.js +84 -22
  221. package/dist/src/mcp-tools/browser-tools.js.map +1 -1
  222. package/dist/src/mcp-tools/claims-tools.d.ts.map +1 -1
  223. package/dist/src/mcp-tools/claims-tools.js +35 -7
  224. package/dist/src/mcp-tools/claims-tools.js.map +1 -1
  225. package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
  226. package/dist/src/mcp-tools/config-tools.js +82 -17
  227. package/dist/src/mcp-tools/config-tools.js.map +1 -1
  228. package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
  229. package/dist/src/mcp-tools/coordination-tools.js +37 -4
  230. package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
  231. package/dist/src/mcp-tools/daa-tools.d.ts.map +1 -1
  232. package/dist/src/mcp-tools/daa-tools.js +49 -7
  233. package/dist/src/mcp-tools/daa-tools.js.map +1 -1
  234. package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
  235. package/dist/src/mcp-tools/embeddings-tools.js +45 -18
  236. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  237. package/dist/src/mcp-tools/github-tools.d.ts.map +1 -1
  238. package/dist/src/mcp-tools/github-tools.js +75 -25
  239. package/dist/src/mcp-tools/github-tools.js.map +1 -1
  240. package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
  241. package/dist/src/mcp-tools/guidance-tools.js +32 -10
  242. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  243. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  244. package/dist/src/mcp-tools/hive-mind-tools.js +91 -20
  245. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  246. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  247. package/dist/src/mcp-tools/hooks-tools.js +188 -29
  248. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  249. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  250. package/dist/src/mcp-tools/memory-tools.js +25 -7
  251. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  252. package/dist/src/mcp-tools/monograph-compat.d.ts.map +1 -1
  253. package/dist/src/mcp-tools/monograph-compat.js +11 -2
  254. package/dist/src/mcp-tools/monograph-compat.js.map +1 -1
  255. package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
  256. package/dist/src/mcp-tools/monograph-tools.js +148 -26
  257. package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
  258. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  259. package/dist/src/mcp-tools/neural-tools.js +44 -9
  260. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  261. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  262. package/dist/src/mcp-tools/performance-tools.js +45 -10
  263. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  264. package/dist/src/mcp-tools/progress-tools.d.ts.map +1 -1
  265. package/dist/src/mcp-tools/progress-tools.js +7 -4
  266. package/dist/src/mcp-tools/progress-tools.js.map +1 -1
  267. package/dist/src/mcp-tools/request-tracker.d.ts.map +1 -1
  268. package/dist/src/mcp-tools/request-tracker.js +15 -1
  269. package/dist/src/mcp-tools/request-tracker.js.map +1 -1
  270. package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
  271. package/dist/src/mcp-tools/security-tools.js +61 -9
  272. package/dist/src/mcp-tools/security-tools.js.map +1 -1
  273. package/dist/src/mcp-tools/session-tools.d.ts.map +1 -1
  274. package/dist/src/mcp-tools/session-tools.js +45 -14
  275. package/dist/src/mcp-tools/session-tools.js.map +1 -1
  276. package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
  277. package/dist/src/mcp-tools/swarm-tools.js +15 -3
  278. package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
  279. package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
  280. package/dist/src/mcp-tools/system-tools.js +14 -7
  281. package/dist/src/mcp-tools/system-tools.js.map +1 -1
  282. package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
  283. package/dist/src/mcp-tools/task-tools.js +52 -10
  284. package/dist/src/mcp-tools/task-tools.js.map +1 -1
  285. package/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -1
  286. package/dist/src/mcp-tools/terminal-tools.js +40 -6
  287. package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
  288. package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
  289. package/dist/src/mcp-tools/transfer-tools.js +37 -4
  290. package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
  291. package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
  292. package/dist/src/mcp-tools/workflow-tools.js +29 -6
  293. package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
  294. package/dist/src/memory/ewc-consolidation.d.ts.map +1 -1
  295. package/dist/src/memory/ewc-consolidation.js +26 -10
  296. package/dist/src/memory/ewc-consolidation.js.map +1 -1
  297. package/dist/src/memory/intelligence.d.ts.map +1 -1
  298. package/dist/src/memory/intelligence.js +80 -19
  299. package/dist/src/memory/intelligence.js.map +1 -1
  300. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  301. package/dist/src/memory/memory-bridge.js +21 -2
  302. package/dist/src/memory/memory-bridge.js.map +1 -1
  303. package/dist/src/memory/memory-initializer.d.ts.map +1 -1
  304. package/dist/src/memory/memory-initializer.js +67 -3
  305. package/dist/src/memory/memory-initializer.js.map +1 -1
  306. package/dist/src/memory/sona-optimizer.d.ts.map +1 -1
  307. package/dist/src/memory/sona-optimizer.js +14 -4
  308. package/dist/src/memory/sona-optimizer.js.map +1 -1
  309. package/dist/src/monovector/command-outcomes.d.ts.map +1 -1
  310. package/dist/src/monovector/command-outcomes.js +43 -7
  311. package/dist/src/monovector/command-outcomes.js.map +1 -1
  312. package/dist/src/monovector/coverage-router.d.ts.map +1 -1
  313. package/dist/src/monovector/coverage-router.js +8 -4
  314. package/dist/src/monovector/coverage-router.js.map +1 -1
  315. package/dist/src/monovector/coverage-tools.d.ts.map +1 -1
  316. package/dist/src/monovector/coverage-tools.js +6 -3
  317. package/dist/src/monovector/coverage-tools.js.map +1 -1
  318. package/dist/src/monovector/diff-classifier.d.ts.map +1 -1
  319. package/dist/src/monovector/diff-classifier.js +13 -0
  320. package/dist/src/monovector/diff-classifier.js.map +1 -1
  321. package/dist/src/monovector/route-outcomes.d.ts +2 -1
  322. package/dist/src/monovector/route-outcomes.d.ts.map +1 -1
  323. package/dist/src/monovector/route-outcomes.js +46 -4
  324. package/dist/src/monovector/route-outcomes.js.map +1 -1
  325. package/dist/src/plugins/manager.d.ts.map +1 -1
  326. package/dist/src/plugins/manager.js +8 -3
  327. package/dist/src/plugins/manager.js.map +1 -1
  328. package/dist/src/plugins/store/discovery.d.ts.map +1 -1
  329. package/dist/src/plugins/store/discovery.js +46 -2
  330. package/dist/src/plugins/store/discovery.js.map +1 -1
  331. package/dist/src/plugins/store/search.d.ts.map +1 -1
  332. package/dist/src/plugins/store/search.js +5 -4
  333. package/dist/src/plugins/store/search.js.map +1 -1
  334. package/dist/src/production/circuit-breaker.d.ts.map +1 -1
  335. package/dist/src/production/circuit-breaker.js +17 -3
  336. package/dist/src/production/circuit-breaker.js.map +1 -1
  337. package/dist/src/production/error-handler.d.ts.map +1 -1
  338. package/dist/src/production/error-handler.js +3 -0
  339. package/dist/src/production/error-handler.js.map +1 -1
  340. package/dist/src/production/monitoring.d.ts.map +1 -1
  341. package/dist/src/production/monitoring.js +20 -3
  342. package/dist/src/production/monitoring.js.map +1 -1
  343. package/dist/src/production/rate-limiter.d.ts.map +1 -1
  344. package/dist/src/production/rate-limiter.js +13 -4
  345. package/dist/src/production/rate-limiter.js.map +1 -1
  346. package/dist/src/production/retry.d.ts.map +1 -1
  347. package/dist/src/production/retry.js +17 -9
  348. package/dist/src/production/retry.js.map +1 -1
  349. package/dist/src/routing/embed-worker.js +6 -2
  350. package/dist/src/routing/embed-worker.js.map +1 -1
  351. package/dist/src/routing/embedder.d.ts.map +1 -1
  352. package/dist/src/routing/embedder.js +0 -0
  353. package/dist/src/routing/embedder.js.map +1 -1
  354. package/dist/src/routing/llm-caller.d.ts.map +1 -1
  355. package/dist/src/routing/llm-caller.js +13 -2
  356. package/dist/src/routing/llm-caller.js.map +1 -1
  357. package/dist/src/routing/route-layer-factory.d.ts.map +1 -1
  358. package/dist/src/routing/route-layer-factory.js +18 -3
  359. package/dist/src/routing/route-layer-factory.js.map +1 -1
  360. package/dist/src/services/claim-service.d.ts +1 -0
  361. package/dist/src/services/claim-service.d.ts.map +1 -1
  362. package/dist/src/services/claim-service.js +8 -0
  363. package/dist/src/services/claim-service.js.map +1 -1
  364. package/dist/src/services/config-file-manager.d.ts.map +1 -1
  365. package/dist/src/services/config-file-manager.js +14 -2
  366. package/dist/src/services/config-file-manager.js.map +1 -1
  367. package/dist/src/services/headless-worker-executor.d.ts.map +1 -1
  368. package/dist/src/services/headless-worker-executor.js +18 -2
  369. package/dist/src/services/headless-worker-executor.js.map +1 -1
  370. package/dist/src/services/worker-daemon.d.ts.map +1 -1
  371. package/dist/src/services/worker-daemon.js +53 -12
  372. package/dist/src/services/worker-daemon.js.map +1 -1
  373. package/dist/src/transfer/anonymization/index.d.ts +0 -3
  374. package/dist/src/transfer/anonymization/index.d.ts.map +1 -1
  375. package/dist/src/transfer/anonymization/index.js +16 -1
  376. package/dist/src/transfer/anonymization/index.js.map +1 -1
  377. package/dist/src/transfer/export.d.ts.map +1 -1
  378. package/dist/src/transfer/export.js +8 -0
  379. package/dist/src/transfer/export.js.map +1 -1
  380. package/dist/src/transfer/ipfs/upload.d.ts.map +1 -1
  381. package/dist/src/transfer/ipfs/upload.js +33 -3
  382. package/dist/src/transfer/ipfs/upload.js.map +1 -1
  383. package/dist/src/transfer/serialization/cfp.d.ts.map +1 -1
  384. package/dist/src/transfer/serialization/cfp.js +9 -3
  385. package/dist/src/transfer/serialization/cfp.js.map +1 -1
  386. package/dist/src/transfer/storage/gcs.d.ts.map +1 -1
  387. package/dist/src/transfer/storage/gcs.js +37 -3
  388. package/dist/src/transfer/storage/gcs.js.map +1 -1
  389. package/dist/src/transfer/store/discovery.d.ts.map +1 -1
  390. package/dist/src/transfer/store/discovery.js +45 -3
  391. package/dist/src/transfer/store/discovery.js.map +1 -1
  392. package/dist/src/transfer/store/download.d.ts.map +1 -1
  393. package/dist/src/transfer/store/download.js +5 -0
  394. package/dist/src/transfer/store/download.js.map +1 -1
  395. package/dist/src/transfer/store/publish.d.ts.map +1 -1
  396. package/dist/src/transfer/store/publish.js +13 -1
  397. package/dist/src/transfer/store/publish.js.map +1 -1
  398. package/dist/src/transfer/store/registry.d.ts +8 -0
  399. package/dist/src/transfer/store/registry.d.ts.map +1 -1
  400. package/dist/src/transfer/store/registry.js +30 -5
  401. package/dist/src/transfer/store/registry.js.map +1 -1
  402. package/dist/src/transfer/store/search.d.ts.map +1 -1
  403. package/dist/src/transfer/store/search.js +20 -5
  404. package/dist/src/transfer/store/search.js.map +1 -1
  405. package/dist/src/ui/collector.mjs +39 -5
  406. package/dist/src/ui/dashboard.html +934 -1282
  407. package/dist/src/ui/orgs.html +722 -12
  408. package/dist/src/ui/server.mjs +573 -134
  409. package/dist/src/update/checker.d.ts.map +1 -1
  410. package/dist/src/update/checker.js +59 -7
  411. package/dist/src/update/checker.js.map +1 -1
  412. package/dist/src/update/executor.d.ts.map +1 -1
  413. package/dist/src/update/executor.js +50 -3
  414. package/dist/src/update/executor.js.map +1 -1
  415. package/dist/src/update/index.d.ts.map +1 -1
  416. package/dist/src/update/index.js +18 -1
  417. package/dist/src/update/index.js.map +1 -1
  418. package/dist/src/update/rate-limiter.d.ts +6 -0
  419. package/dist/src/update/rate-limiter.d.ts.map +1 -1
  420. package/dist/src/update/rate-limiter.js +79 -7
  421. package/dist/src/update/rate-limiter.js.map +1 -1
  422. package/dist/src/update/validator.d.ts.map +1 -1
  423. package/dist/src/update/validator.js +52 -1
  424. package/dist/src/update/validator.js.map +1 -1
  425. package/dist/tsconfig.tsbuildinfo +1 -1
  426. package/package.json +2 -3
  427. package/dist/src/ui/data/mastermind-events.jsonl +0 -59
@@ -172,7 +172,7 @@ module.exports = {
172
172
  const remaining = fs.readdirSync(regDir).filter(f => f.endsWith('.json')).length;
173
173
  const _actPath = path.join(CWD, '.monomind', 'metrics', 'swarm-activity.json');
174
174
  let _prevLastActive = 0;
175
- try { _prevLastActive = (JSON.parse(fs.readFileSync(_actPath, 'utf-8'))?.swarm?.lastActive) || 0; } catch { /* ignore */ }
175
+ try { var _actSt = fs.statSync(_actPath); if (_actSt.size < 65536) { _prevLastActive = (JSON.parse(fs.readFileSync(_actPath, 'utf-8'))?.swarm?.lastActive) || 0; } } catch { /* ignore */ }
176
176
  fs.writeFileSync(_actPath, JSON.stringify({
177
177
  timestamp: new Date().toISOString(),
178
178
  swarm: {
@@ -217,7 +217,8 @@ module.exports = {
217
217
  try {
218
218
  var haltFile = path.join(CWD, 'data', 'halt-signals.jsonl');
219
219
  if (fs.existsSync(haltFile)) {
220
- var haltLines = fs.readFileSync(haltFile, 'utf-8').trim().split('\n').filter(Boolean);
220
+ var haltSt = fs.statSync(haltFile);
221
+ var haltLines = haltSt.size < 1048576 ? fs.readFileSync(haltFile, 'utf-8').trim().split('\n').filter(Boolean) : [];
221
222
  if (haltLines.length > 0) {
222
223
  console.warn('[HALT_DETECTED] ' + haltLines.length + ' halt signal(s) present');
223
224
  }
@@ -298,8 +299,11 @@ module.exports = {
298
299
  var settingsPath = path.join(CWD, '.claude', 'settings.json');
299
300
  var adrCfg = {};
300
301
  if (fs.existsSync(settingsPath)) {
301
- var s = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
302
- adrCfg = (s.monomind && s.monomind.adr) || {};
302
+ var settingsSt = fs.statSync(settingsPath);
303
+ if (settingsSt.size < 524288) {
304
+ var s = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
305
+ adrCfg = (s.monomind && s.monomind.adr) || {};
306
+ }
303
307
  }
304
308
  if (adrCfg.autoGenerate) {
305
309
  var taskAgent = hookInput.agentSlug || hookInput.agent_slug || '';
@@ -307,7 +311,11 @@ module.exports = {
307
311
  var isArchitectLevel = ['architect', 'system-architect', 'software-architect'].includes(taskAgent)
308
312
  || /\b(architecture|design decision|adr|trade-?off|migration strategy)\b/.test(taskDescAdr);
309
313
  if (isArchitectLevel && taskDescAdr.length > 30) {
310
- var adrDir = path.join(CWD, adrCfg.directory || 'docs/adrs');
314
+ // Guard adrCfg.directory against path traversal outside CWD
315
+ var rawAdrDir = typeof adrCfg.directory === 'string' ? adrCfg.directory : 'docs/adrs';
316
+ var resolvedAdrDir = path.resolve(CWD, rawAdrDir);
317
+ if (!resolvedAdrDir.startsWith(CWD + path.sep) && resolvedAdrDir !== CWD) { throw new Error('adr.directory outside project'); }
318
+ var adrDir = resolvedAdrDir;
311
319
  fs.mkdirSync(adrDir, { recursive: true });
312
320
  var adrNum = (fs.readdirSync(adrDir).filter(function(f) { return f.endsWith('.md'); }).length + 1)
313
321
  .toString().padStart(4, '0');
@@ -20,9 +20,13 @@ function ensureDir() {
20
20
  try { fs.mkdirSync(INTEL_DIR, { recursive: true }); } catch (_) {}
21
21
  }
22
22
 
23
+ var MAX_PATTERNS_SIZE = 10 * 1024 * 1024; // 10 MiB guard
24
+
23
25
  function loadPatterns() {
24
26
  try {
25
27
  if (fs.existsSync(PATTERNS_FILE)) {
28
+ var st = fs.statSync(PATTERNS_FILE);
29
+ if (st.size > MAX_PATTERNS_SIZE) { _patterns = []; return; }
26
30
  _patterns = JSON.parse(fs.readFileSync(PATTERNS_FILE, 'utf-8'));
27
31
  }
28
32
  } catch (_) { _patterns = []; }
@@ -77,8 +81,9 @@ function feedback(success) {
77
81
  function storePattern(pattern) {
78
82
  ensureDir();
79
83
  loadPatterns();
80
- _patterns = _patterns.filter(function(p) { return p.id !== pattern.id; });
81
- _patterns.push(Object.assign({ storedAt: new Date().toISOString() }, pattern));
84
+ var safeId = String(pattern.id || '').slice(0, 256);
85
+ _patterns = _patterns.filter(function(p) { return p.id !== safeId; });
86
+ _patterns.push(Object.assign({ storedAt: new Date().toISOString() }, pattern, { id: safeId }));
82
87
  try {
83
88
  fs.writeFileSync(PATTERNS_FILE, JSON.stringify(_patterns.slice(-500), null, 2), 'utf-8');
84
89
  } catch (_) {}
@@ -15,13 +15,20 @@ const path = require('path');
15
15
  const CWD = process.env.CLAUDE_PROJECT_DIR || process.cwd();
16
16
  const LOOPS_DIR = path.join(CWD, '.monomind', 'loops');
17
17
 
18
+ const STDIN_MAX_BYTES = 1 * 1024 * 1024; // 1 MiB cap to prevent OOM
19
+
18
20
  async function readStdin() {
19
21
  if (process.stdin.isTTY) return '';
20
22
  return new Promise((resolve) => {
21
23
  let data = '';
24
+ let bytesRead = 0;
22
25
  const timer = setTimeout(() => { process.stdin.removeAllListeners(); resolve(data); }, 3000);
23
26
  process.stdin.setEncoding('utf8');
24
- process.stdin.on('data', chunk => { data += chunk; });
27
+ process.stdin.on('data', chunk => {
28
+ bytesRead += Buffer.byteLength(chunk, 'utf8');
29
+ if (bytesRead > STDIN_MAX_BYTES) { clearTimeout(timer); resolve(''); return; }
30
+ data += chunk;
31
+ });
25
32
  process.stdin.on('end', () => { clearTimeout(timer); resolve(data); });
26
33
  process.stdin.on('error', () => { clearTimeout(timer); resolve(data); });
27
34
  process.stdin.resume();
@@ -60,7 +67,9 @@ async function main() {
60
67
  try { hookInput = JSON.parse(raw); } catch { process.exit(0); }
61
68
 
62
69
  const toolInput = hookInput.tool_input || hookInput.toolInput || {};
63
- const sessionId = hookInput.session_id || hookInput.sessionId || hookInput.id || '';
70
+ const rawSessionId = hookInput.session_id || hookInput.sessionId || hookInput.id || '';
71
+ // Sanitize sessionId to prevent path traversal — allow only alphanumeric, dash, underscore, dot
72
+ const sessionId = String(rawSessionId).replace(/[^a-zA-Z0-9_.\-]/g, '').slice(0, 128);
64
73
 
65
74
  if (!sessionId) { process.exit(0); }
66
75
 
@@ -75,7 +84,10 @@ async function main() {
75
84
  let existing = {};
76
85
  try {
77
86
  if (fs.existsSync(loopFile)) {
78
- existing = JSON.parse(fs.readFileSync(loopFile, 'utf-8'));
87
+ const stat = fs.statSync(loopFile);
88
+ if (stat.size <= 512 * 1024) { // 512 KiB guard to prevent OOM
89
+ existing = JSON.parse(fs.readFileSync(loopFile, 'utf-8'));
90
+ }
79
91
  }
80
92
  } catch { /* start fresh */ }
81
93
 
@@ -16,9 +16,13 @@ function ensureDir() {
16
16
  try { fs.mkdirSync(MEMORY_DIR, { recursive: true }); } catch (_) {}
17
17
  }
18
18
 
19
+ var MAX_INDEX_SIZE = 50 * 1024 * 1024; // 50 MiB guard
20
+
19
21
  function loadIndex() {
20
22
  try {
21
23
  if (!fs.existsSync(MEMORY_INDEX)) return [];
24
+ var st = fs.statSync(MEMORY_INDEX);
25
+ if (st.size > MAX_INDEX_SIZE) return [];
22
26
  return JSON.parse(fs.readFileSync(MEMORY_INDEX, 'utf-8'));
23
27
  } catch (_) {
24
28
  return [];
@@ -36,7 +40,8 @@ function saveIndex(entries) {
36
40
 
37
41
  function store(key, value, namespace) {
38
42
  var entries = loadIndex();
39
- var ns = namespace || 'default';
43
+ var ns = String(namespace || 'default').slice(0, 128);
44
+ key = String(key || '').slice(0, 512);
40
45
  // Remove existing entry with same key+namespace
41
46
  entries = entries.filter(function(e) { return !(e.key === key && e.namespace === ns); });
42
47
  entries.push({ key: key, value: value, namespace: ns, storedAt: new Date().toISOString() });
@@ -35,13 +35,16 @@ const DEFAULT_RESULT = {
35
35
  extrasMatches: [],
36
36
  };
37
37
 
38
+ var MAX_PROMPT = 2000;
39
+
38
40
  function routeTask(prompt) {
39
41
  if (!prompt || typeof prompt !== 'string') return DEFAULT_RESULT;
42
+ var safePrompt = prompt.slice(0, MAX_PROMPT);
40
43
 
41
44
  var best = null;
42
45
  for (var i = 0; i < KEYWORD_ROUTES.length; i++) {
43
46
  var rule = KEYWORD_ROUTES[i];
44
- if (rule.pattern.test(prompt)) {
47
+ if (rule.pattern.test(safePrompt)) {
45
48
  if (!best || rule.confidence > best.confidence) {
46
49
  best = rule;
47
50
  }
@@ -54,7 +57,7 @@ function routeTask(prompt) {
54
57
  agent: best.agent,
55
58
  agentSlug: best.agent.toLowerCase().replace(/\s+/g, '-'),
56
59
  confidence: best.confidence,
57
- reason: 'Keyword match: ' + best.pattern.toString().slice(1, 40),
60
+ reason: ('Keyword match: ' + best.pattern.toString()).slice(0, 80),
58
61
  semanticRouting: false,
59
62
  specificAgents: [],
60
63
  skillMatches: [],
@@ -17,6 +17,8 @@ function ensureDir() {
17
17
  function restore() {
18
18
  try {
19
19
  if (!fs.existsSync(SESSION_FILE)) return null;
20
+ var st = fs.statSync(SESSION_FILE);
21
+ if (st.size > 1 * 1024 * 1024) return null; // 1 MiB guard
20
22
  var raw = fs.readFileSync(SESSION_FILE, 'utf-8');
21
23
  var data = JSON.parse(raw);
22
24
  if (!data || !data.sessionId) return null;
@@ -16,7 +16,7 @@
16
16
  /* eslint-disable @typescript-eslint/no-var-requires */
17
17
  const fs = require('fs');
18
18
  const path = require('path');
19
- const { execSync } = require('child_process');
19
+ const { execSync, spawnSync } = require('child_process');
20
20
  const os = require('os');
21
21
 
22
22
  // Configuration
@@ -204,6 +204,8 @@ function getModelFromSessionJSONL() {
204
204
  if (files.length === 0) return null;
205
205
 
206
206
  const sessionFile = path.join(projectsDir, files[0].f);
207
+ // Guard against OOM: skip session files larger than 10 MB
208
+ try { if (fs.statSync(sessionFile).size > 10 * 1024 * 1024) return null; } catch { return null; }
207
209
  const raw = fs.readFileSync(sessionFile, 'utf-8');
208
210
  const lines = raw.split('\n').filter(Boolean);
209
211
 
@@ -922,7 +924,13 @@ function getGraphifyStats() {
922
924
 
923
925
  try {
924
926
  if (fs.existsSync(dbPath)) {
925
- const out = safeExec(`sqlite3 "${dbPath}" "SELECT (SELECT COUNT(*) FROM nodes), (SELECT COUNT(*) FROM edges);"`, 1000);
927
+ // Use spawnSync array args to prevent shell injection via dbPath (CWD-derived)
928
+ const result = spawnSync(
929
+ 'sqlite3',
930
+ [dbPath, 'SELECT (SELECT COUNT(*) FROM nodes), (SELECT COUNT(*) FROM edges);'],
931
+ { encoding: 'utf-8', timeout: 1000 }
932
+ );
933
+ const out = (result.stdout || '').trim();
926
934
  if (out) {
927
935
  const [n, e] = out.split('|').map(v => parseInt(v, 10) || 0);
928
936
  if (n > 0) return { nodes: n, edges: e, exists: true };
@@ -77,15 +77,18 @@ function _triggerExtractFromFrontmatter(content, agentSlug) {
77
77
  return triggers;
78
78
  }
79
79
 
80
- function _triggerCollectMdFiles(dir) {
80
+ function _triggerCollectMdFiles(dir, _depth) {
81
+ var depth = (_depth === undefined) ? 0 : _depth;
82
+ if (depth > 5) return []; // cap recursion depth to prevent stack overflow DoS
81
83
  var results = [];
82
84
  try {
83
85
  var entries = fs.readdirSync(dir);
84
86
  for (var i = 0; i < entries.length; i++) {
87
+ if (results.length >= 200) break; // cap total file count to prevent DoS
85
88
  var full = path.join(dir, entries[i]);
86
89
  try {
87
90
  var st = fs.lstatSync(full);
88
- if (st.isDirectory()) results = results.concat(_triggerCollectMdFiles(full));
91
+ if (st.isDirectory()) results = results.concat(_triggerCollectMdFiles(full, depth + 1));
89
92
  else if (entries[i].endsWith('.md')) results.push(full);
90
93
  } catch (e) {}
91
94
  }
@@ -98,7 +101,11 @@ function _triggerBuildIndex(agentDir) {
98
101
  var files = _triggerCollectMdFiles(agentDir);
99
102
  for (var i = 0; i < files.length; i++) {
100
103
  var content;
101
- try { content = fs.readFileSync(files[i], 'utf-8'); } catch (e) { continue; }
104
+ try {
105
+ var _fst = fs.statSync(files[i]);
106
+ if (_fst.size > 256 * 1024) continue; // skip files > 256 KiB to prevent OOM
107
+ content = fs.readFileSync(files[i], 'utf-8');
108
+ } catch (e) { continue; }
102
109
  var slug = files[i].split('/').pop().replace(/\.md$/i, '').toLowerCase().replace(/[^a-z0-9-]/g, '-');
103
110
  patterns = patterns.concat(_triggerExtractFromFrontmatter(content, slug));
104
111
  }
@@ -114,6 +121,8 @@ function scanMicroAgentTriggers(prompt) {
114
121
 
115
122
  try {
116
123
  if (fs.existsSync(indexPath)) {
124
+ var _idxSt = fs.statSync(indexPath);
125
+ if (_idxSt.size > 512 * 1024) { throw new Error('trigger-index.json exceeds 512 KiB'); }
117
126
  var idx = JSON.parse(fs.readFileSync(indexPath, 'utf-8'));
118
127
  var age = Date.now() - new Date(idx.builtAt || 0).getTime();
119
128
  if (age < 3600000 && Array.isArray(idx.patterns)) {
@@ -140,6 +149,7 @@ function scanMicroAgentTriggers(prompt) {
140
149
  if (p.mode !== 'inject' && p.mode !== 'takeover') continue;
141
150
  if (seen[p.agentSlug]) continue;
142
151
  try {
152
+ if (typeof p.pattern !== 'string' || p.pattern.length > 500) continue; // cap pattern length to prevent ReDoS
143
153
  var re = new RegExp(p.pattern, 'i');
144
154
  var m = re.exec(prompt);
145
155
  if (m) {
@@ -164,6 +174,8 @@ function _buildKnowledgeSearchFn(knowledgeDir) {
164
174
  if (!fs.existsSync(chunksFile)) return [];
165
175
  var lines;
166
176
  try {
177
+ var _cSt = fs.statSync(chunksFile);
178
+ if (_cSt.size > 4 * 1024 * 1024) return []; // skip > 4 MiB to prevent OOM
167
179
  lines = fs.readFileSync(chunksFile, 'utf-8').trim().split('\n').filter(Boolean);
168
180
  } catch (e) { return []; }
169
181
 
@@ -209,6 +221,8 @@ function _autoIndexKnowledge(knowledgeDir) {
209
221
  } catch (e) {}
210
222
  }
211
223
  try {
224
+ var _sSt = fs.statSync(path.join(CWD, '.monomind', 'graph', 'stats.json'));
225
+ if (_sSt.size > 256 * 1024) { throw new Error('stats.json exceeds 256 KiB'); }
212
226
  var statsForHash = JSON.parse(fs.readFileSync(path.join(CWD, '.monomind', 'graph', 'stats.json'), 'utf-8'));
213
227
  hashInput += 'monograph:' + (statsForHash.builtAt || 0) + ';';
214
228
  } catch(e) {}
@@ -220,7 +234,7 @@ function _autoIndexKnowledge(knowledgeDir) {
220
234
  try { existingHash = fs.readFileSync(hashFile, 'utf-8').trim(); } catch (e) {}
221
235
 
222
236
  var existingChunkCount = 0;
223
- try { if (fs.existsSync(chunksFile)) { existingChunkCount = fs.readFileSync(chunksFile, 'utf-8').trim().split('\n').filter(Boolean).length; } } catch (e) {}
237
+ try { if (fs.existsSync(chunksFile)) { var _ecSt = fs.statSync(chunksFile); if (_ecSt.size <= 4 * 1024 * 1024) { existingChunkCount = fs.readFileSync(chunksFile, 'utf-8').trim().split('\n').filter(Boolean).length; } } } catch (e) {}
224
238
  if (existingHash === contentHash && existingChunkCount > 0) return 0;
225
239
 
226
240
  var newLines = [];
@@ -228,6 +242,8 @@ function _autoIndexKnowledge(knowledgeDir) {
228
242
  var src = sources[si];
229
243
  try {
230
244
  if (!fs.existsSync(src.filePath)) continue;
245
+ var _srcSt = fs.statSync(src.filePath);
246
+ if (_srcSt.size > 512 * 1024) continue; // skip > 512 KiB to prevent OOM
231
247
  var content = fs.readFileSync(src.filePath, 'utf-8');
232
248
  var sections = content.split(/\n{2,}|\n(?=#{1,3} )/);
233
249
  for (var ci = 0; ci < sections.length; ci++) {
@@ -289,14 +289,16 @@ If the user is running across multiple repos for the same project, they MUST use
289
289
  # Compatible with macOS bash 3.2
290
290
  project_name="${project_name:-$(basename "$PWD")}"
291
291
  canonical="${project_name}-<domain>"
292
+ board_tracking=true
292
293
 
293
294
  # Step 1 — Resolve space
294
295
  space_id=$(monotask space list 2>/dev/null | awk -F'|' '{gsub(/^ +| +$/,"",$1);gsub(/^ +| +$/,"",$2);if($2==n)print $1}' n="$project_name" | head -1)
295
296
  [ -z "$space_id" ] && space_id=$(monotask space create "$project_name" 2>/dev/null | grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
296
- [ -z "$space_id" ] && { echo "ERROR: Could not find or create space '$project_name' verify monotask is installed (monotask --version)"; exit 1; }
297
+ [ -z "$space_id" ] && { echo "[mastermind] monotask board unavailableboard tracking skipped."; board_tracking=false; }
297
298
 
298
299
  # Step 2 — Find existing board by canonical name or create
299
300
  # board list format is "uuid: name" (colon-space separator, NOT pipe)
301
+ if [ "$board_tracking" = "true" ]; then
300
302
  board_id=$(monotask board list 2>/dev/null | awk -F': ' '{gsub(/^ +| +$/,"",$1);gsub(/^ +| +$/,"",$2);if($2==n)print $1}' n="$canonical" | head -1)
301
303
  if [ -n "$board_id" ]; then
302
304
  # Step 3a — Fetch column IDs from existing board
@@ -306,13 +308,16 @@ if [ -n "$board_id" ]; then
306
308
  done_col=$(echo "$cols_json" | jq -r '[.[] | select(.title=="Done")] | .[0].id // empty')
307
309
  else
308
310
  # Step 3b — Create board and columns
309
- board_id=$(monotask board create --space "$space_id" "$canonical" --json | jq -r '.id // empty')
310
- [ -z "$board_id" ] && { echo "ERROR: Failed to create board '$canonical'"; exit 1; }
311
+ board_id=$(monotask board create --space "$space_id" "$canonical" --json 2>/dev/null | jq -r '.id // empty')
312
+ [ -z "$board_id" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
313
+ if [ "$board_tracking" = "true" ]; then
311
314
  monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
312
- todo_col=$(monotask column create "$board_id" "Todo" --json | jq -r '.id // empty')
313
- doing_col=$(monotask column create "$board_id" "Doing" --json | jq -r '.id // empty')
314
- done_col=$(monotask column create "$board_id" "Done" --json | jq -r '.id // empty')
315
- [ -z "$todo_col" ] && { echo "ERROR: Failed to create Todo column for $canonical"; exit 1; }
315
+ todo_col=$(monotask column create "$board_id" "Todo" --json 2>/dev/null | jq -r '.id // empty')
316
+ doing_col=$(monotask column create "$board_id" "Doing" --json 2>/dev/null | jq -r '.id // empty')
317
+ done_col=$(monotask column create "$board_id" "Done" --json 2>/dev/null | jq -r '.id // empty')
318
+ [ -z "$todo_col" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
319
+ fi
320
+ fi
316
321
  fi
317
322
  ```
318
323
 
@@ -321,28 +326,33 @@ When master.md runs multiple domains, resolve the space **once** before the loop
321
326
  ```bash
322
327
  # Compatible with macOS bash 3.2 — jq accumulation instead of declare -A
323
328
  project_name="<resolved project_name>"
329
+ board_tracking=true
324
330
  space_id=$(monotask space list 2>/dev/null | awk -F'|' '{gsub(/^ +| +$/,"",$1);gsub(/^ +| +$/,"",$2);if($2==n)print $1}' n="$project_name" | head -1)
325
331
  [ -z "$space_id" ] && space_id=$(monotask space create "$project_name" 2>/dev/null | grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
326
- [ -z "$space_id" ] && { echo "ERROR: Could not find or create space '$project_name'"; exit 1; }
332
+ [ -z "$space_id" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
327
333
 
328
334
  state_patch='{}'
329
335
  for domain in build marketing ops; do # substitute actual domain list
330
336
  canonical="${project_name}-${domain}"
337
+ if [ "$board_tracking" = "true" ]; then
331
338
  # board list format is "uuid: name" (colon-space separator, NOT pipe)
332
- board_id=$(monotask board list 2>/dev/null | awk -F': ' '{gsub(/^ +| +$/,"",$1);gsub(/^ +| +$/,"",$2);if($2==n)print $1}' n="$canonical" | head -1)
339
+ board_id=$(monotask board list 2>/dev/null | awk -F': ' '{gsub(/^ +| +$/,"",$1);gsub(/^ +| +$/,"",$2);if($2==n)print $1}' n="$canonical" | head -1)
333
340
  if [ -n "$board_id" ]; then
334
341
  cols_json=$(monotask column list "$board_id" --json 2>/dev/null || echo '[]')
335
342
  todo_col=$(echo "$cols_json" | jq -r '[.[] | select(.title=="Todo" or .title=="Backlog")] | .[0].id // empty')
336
343
  doing_col=$(echo "$cols_json" | jq -r '[.[] | select(.title=="Doing" or .title=="In Progress")] | .[0].id // empty')
337
344
  done_col=$(echo "$cols_json" | jq -r '[.[] | select(.title=="Done")] | .[0].id // empty')
338
345
  else
339
- board_id=$(monotask board create --space "$space_id" "$canonical" --json | jq -r '.id // empty')
340
- [ -z "$board_id" ] && { echo "ERROR: Failed to create $canonical board"; exit 1; }
346
+ board_id=$(monotask board create --space "$space_id" "$canonical" --json 2>/dev/null | jq -r '.id // empty')
347
+ [ -z "$board_id" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
348
+ if [ "$board_tracking" = "true" ]; then
341
349
  monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
342
- todo_col=$(monotask column create "$board_id" "Todo" --json | jq -r '.id // empty')
343
- doing_col=$(monotask column create "$board_id" "Doing" --json | jq -r '.id // empty')
344
- done_col=$(monotask column create "$board_id" "Done" --json | jq -r '.id // empty')
345
- [ -z "$todo_col" ] && { echo "ERROR: Failed to create Todo column for $canonical"; exit 1; }
350
+ todo_col=$(monotask column create "$board_id" "Todo" --json 2>/dev/null | jq -r '.id // empty')
351
+ doing_col=$(monotask column create "$board_id" "Doing" --json 2>/dev/null | jq -r '.id // empty')
352
+ done_col=$(monotask column create "$board_id" "Done" --json 2>/dev/null | jq -r '.id // empty')
353
+ [ -z "$todo_col" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
354
+ fi
355
+ fi
346
356
  fi
347
357
  state_patch=$(echo "$state_patch" | jq \
348
358
  --arg d "$domain" --arg b "$board_id" \
@@ -95,10 +95,10 @@ If this skill is invoked directly (not by master):
95
95
  result=$(monotask board create "architect" --json 2>/dev/null)
96
96
  board_id=$(echo "$result" | jq -r '.id // empty')
97
97
  [ -n "$board_id" ] && [ -n "$space_id" ] && monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
98
- [ -z "$board_id" ] && { echo "ERROR: Failed to create monotask board — verify monotask is installed (run: monotask --version)"; exit 1; }
99
- echo "$board_id"
98
+ [ -z "$board_id" ] && { echo "[mastermind] monotask board unavailable board tracking skipped."; board_tracking=false; }
99
+ echo "${board_id:-}"
100
100
  ```
101
- If this block exits with an error (board_id is still empty), stop execution and return an error to the caller do not proceed to complexity assessment.
101
+ If board_id is empty after this block, set `board_tracking=false` and continue do not abort. Card creation steps later are skipped when `board_tracking=false`.
102
102
  6. Proceed with complexity assessment below
103
103
  7. At end: emit `session:complete` (if `caller` is `standalone`). Before executing the curl below, substitute the resolved sessionId for `<sessionId>`:
104
104
  ```bash
@@ -432,7 +432,7 @@ Invoke `Skill("mastermind:build")` with:
432
432
  - `brain_context`: the loaded brain context
433
433
  - `project_name`: `$(basename "$PWD")`
434
434
  - `mode`: `auto`
435
- - `board_id`: the autodev board (create once at startup, reuse)
435
+ - `board_id`: the autodev board (only if non-empty; omit if monotask was unavailable)
436
436
 
437
437
  The brief passed to build MUST include:
438
438
  - What to build (concrete spec, not vague)
@@ -490,11 +490,13 @@ If `N < count`: log `[autodev] Moving to improvement <N+1>/<count>...` and repea
490
490
 
491
491
  1. Extract flags (leading integer for count, --newfeature N, --focus, --auto/--confirm)
492
492
  2. Load brain context via _protocol.md Brain Load Procedure (namespace: `autodev`)
493
- 3. Create monotask board:
493
+ 3. Create monotask board (optional — skip gracefully if monotask is not installed):
494
494
  ```bash
495
495
  project_name="${project_name:-$(basename "$PWD")}"
496
496
  board_id=$(monotask board create "autodev" --json 2>/dev/null | jq -r '.id // empty')
497
+ [ -z "$board_id" ] && echo "[autodev] monotask board unavailable — board tracking skipped."
497
498
  ```
499
+ Pass `board_id` to `mastermind:build` only if non-empty; omit the parameter otherwise.
498
500
  4. **If `--newfeature` was parsed:** run the Feature Pipeline (FP-0 through FP-End) and skip the improvement loop entirely.
499
501
  **Otherwise:** run the Loop section above for each improvement.
500
502
  5. At end: follow _protocol.md Brain Write Procedure (namespace: `autodev`)
@@ -9,6 +9,16 @@ default_mode: confirm
9
9
 
10
10
  This skill is invoked by `mastermind:master` or directly via `/mastermind:idea`.
11
11
 
12
+ **Extract `--monotask` flag:** If present in `$ARGUMENTS`, set `USE_MONOTASK=true` and remove it from `$ARGUMENTS`. Default: `USE_MONOTASK=false`.
13
+
14
+ **File mode (default, `USE_MONOTASK=false`):**
15
+
16
+ Invoke `Skill("mastermind:ideate", $ARGUMENTS)` immediately — it provides the same research, evaluation, elaboration, and task-decomposition pipeline with file-first storage (`docs/ideas/` and `docs/tasks/`). The rest of this skill is skipped in file mode.
17
+
18
+ **Board mode (`USE_MONOTASK=true`):**
19
+
20
+ Continue with the full monotask board pipeline below (Steps 3-6).
21
+
12
22
  ---
13
23
 
14
24
  ## Inputs
@@ -51,8 +51,8 @@ If this skill is invoked directly (not by master):
51
51
  space_id=$(monotask space list 2>/dev/null | awk -F' \| ' -v n="$project_name" '$2==n{print $1}' | head -1)
52
52
  [ -z "$space_id" ] && space_id=$(monotask space create "$project_name" 2>&1 | grep -oE '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
53
53
  [ -z "$space_id" ] && { echo "ERROR: Could not find or create space '$project_name'"; exit 1; }
54
- board_id=$(monotask board create "ops" --json | jq -r '.id // empty')
55
- [ -z "$board_id" ] && { echo "ERROR: Failed to create ops board"; exit 1; }
54
+ board_id=$(monotask board create "ops" --json 2>/dev/null | jq -r '.id // empty')
55
+ [ -z "$board_id" ] && echo "[ops] monotask board unavailable board tracking skipped."
56
56
  monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
57
57
  todo_col=$(monotask column create "$board_id" "Todo" --json | jq -r '.id')
58
58
  doing_col=$(monotask column create "$board_id" "Doing" --json | jq -r '.id')
@@ -118,7 +118,7 @@ Spawn one Task agent per workstream (star topology — hub aggregates independen
118
118
  - Infrastructure automation: subagent_type "DevOps Automator"
119
119
  - CI/CD pipelines: subagent_type "cicd-engineer"
120
120
 
121
- Also run /mastermind:do --board <board_id> to track execution.
121
+ Tasks are saved to `docs/tasks/` by default. To execute: `/mastermind:do --file <TASK_FILE>`. With monotask: `/mastermind:do --monotask --space $SPACE_ID --board $TASK_BOARD_ID`.
122
122
 
123
123
  STEP 4 — COLLECT AND RETURN
124
124
  Collect all agent outputs. Return to caller: