monomind 1.19.0 → 2.0.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 (870) hide show
  1. package/README.md +2 -5
  2. package/package.json +15 -34
  3. package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +0 -2
  4. package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +0 -2
  5. package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +3 -11
  6. package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +0 -1
  7. package/packages/@monomind/cli/.claude/commands/github/issue-tracker.md +0 -2
  8. package/packages/@monomind/cli/.claude/commands/github/pr-manager.md +0 -2
  9. package/packages/@monomind/cli/.claude/commands/github/repo-architect.md +3 -10
  10. package/packages/@monomind/cli/.claude/commands/mastermind/help.md +3 -3
  11. package/packages/@monomind/cli/.claude/commands/workflows/README.md +0 -1
  12. package/packages/@monomind/cli/.claude/commands/workflows/workflow-create.md +0 -1
  13. package/packages/@monomind/cli/.claude/commands/workflows/workflow-execute.md +1 -3
  14. package/packages/@monomind/cli/.claude/commands/workflows/workflow-export.md +0 -2
  15. package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +18 -1
  16. package/packages/@monomind/cli/.claude/helpers/handlers/edit-handler.cjs +15 -0
  17. package/packages/@monomind/cli/.claude/helpers/handlers/gates-handler.cjs +2 -8
  18. package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +149 -7
  19. package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +47 -25
  20. package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +80 -43
  21. package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -4
  22. package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +69 -16
  23. package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +100 -9
  24. package/packages/@monomind/cli/.claude/helpers/router.cjs +78 -5
  25. package/packages/@monomind/cli/.claude/helpers/skill-registry.json +0 -189
  26. package/packages/@monomind/cli/.claude/skills/github-toolkit/SKILL.md +60 -0
  27. package/packages/@monomind/cli/.claude/skills/hive-mind-advanced/SKILL.md +0 -15
  28. package/packages/@monomind/cli/.claude/skills/hooks-automation/SKILL.md +0 -1
  29. package/packages/@monomind/cli/.claude/skills/mastermind-skills/_protocol.md +1 -1
  30. package/packages/@monomind/cli/.claude/skills/mastermind-skills/build.md +1 -2
  31. package/packages/@monomind/cli/.claude/skills/memory-toolkit/SKILL.md +75 -0
  32. package/packages/@monomind/cli/.claude/skills/specialagent/SKILL.md +2 -4
  33. package/packages/@monomind/cli/.claude/skills/swarm-advanced/SKILL.md +0 -1
  34. package/packages/@monomind/cli/README.md +2 -5
  35. package/packages/@monomind/cli/dist/src/autopilot-state.js +4 -5
  36. package/packages/@monomind/cli/dist/src/browser/dashboard/server.js +69 -1
  37. package/packages/@monomind/cli/dist/src/browser/dashboard/ui.html +214 -1764
  38. package/packages/@monomind/cli/dist/src/capabilities/index.d.ts +0 -2
  39. package/packages/@monomind/cli/dist/src/capabilities/index.js +0 -1
  40. package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.js +2 -6
  41. package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +0 -4
  42. package/packages/@monomind/cli/dist/src/commands/analyze.js +1 -29
  43. package/packages/@monomind/cli/dist/src/commands/completions.js +3 -22
  44. package/packages/@monomind/cli/dist/src/commands/config.js +0 -6
  45. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +12 -2
  46. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +130 -22
  47. package/packages/@monomind/cli/dist/src/commands/doctor.js +6 -5
  48. package/packages/@monomind/cli/dist/src/commands/guidance.d.ts +5 -1
  49. package/packages/@monomind/cli/dist/src/commands/guidance.js +11 -556
  50. package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.js +11 -4
  51. package/packages/@monomind/cli/dist/src/commands/hive-mind.d.ts +4 -4
  52. package/packages/@monomind/cli/dist/src/commands/hive-mind.js +9 -6
  53. package/packages/@monomind/cli/dist/src/commands/hooks-formatting.d.ts +1 -5
  54. package/packages/@monomind/cli/dist/src/commands/hooks-formatting.js +1 -18
  55. package/packages/@monomind/cli/dist/src/commands/hooks-workers.d.ts +1 -1
  56. package/packages/@monomind/cli/dist/src/commands/hooks-workers.js +82 -330
  57. package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -5
  58. package/packages/@monomind/cli/dist/src/commands/index.js +0 -45
  59. package/packages/@monomind/cli/dist/src/commands/init-wizard.js +1 -1
  60. package/packages/@monomind/cli/dist/src/commands/init.js +4 -24
  61. package/packages/@monomind/cli/dist/src/commands/neural-core.js +11 -11
  62. package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +9 -11
  63. package/packages/@monomind/cli/dist/src/commands/neural-registry.js +10 -10
  64. package/packages/@monomind/cli/dist/src/commands/providers.js +90 -1
  65. package/packages/@monomind/cli/dist/src/commands/search-universal.d.ts +7 -1
  66. package/packages/@monomind/cli/dist/src/commands/search-universal.js +59 -5
  67. package/packages/@monomind/cli/dist/src/commands/security-cve.js +3 -5
  68. package/packages/@monomind/cli/dist/src/commands/session.js +143 -3
  69. package/packages/@monomind/cli/dist/src/commands/start.js +0 -18
  70. package/packages/@monomind/cli/dist/src/commands/swarm.js +112 -65
  71. package/packages/@monomind/cli/dist/src/consensus/audit-writer.js +43 -1
  72. package/packages/@monomind/cli/dist/src/consensus/tally.d.ts +19 -0
  73. package/packages/@monomind/cli/dist/src/consensus/tally.js +34 -0
  74. package/packages/@monomind/cli/dist/src/index.d.ts +3 -2
  75. package/packages/@monomind/cli/dist/src/index.js +9 -12
  76. package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +10 -14
  77. package/packages/@monomind/cli/dist/src/init/executor.js +39 -86
  78. package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -12
  79. package/packages/@monomind/cli/dist/src/init/statusline-generator.js +62 -0
  80. package/packages/@monomind/cli/dist/src/init/types.d.ts +2 -6
  81. package/packages/@monomind/cli/dist/src/init/types.js +0 -3
  82. package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +18 -8
  83. package/packages/@monomind/cli/dist/src/mcp-client.js +0 -2
  84. package/packages/@monomind/cli/dist/src/mcp-server.js +12 -14
  85. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/coherence-check.js +1 -19
  86. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +3 -2
  87. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.js +3 -18
  88. package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +1 -7
  89. package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.js +2 -2
  90. package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +7 -17
  91. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -1
  92. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +174 -38
  93. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-advanced.d.ts +18 -0
  94. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-advanced.js +25 -0
  95. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.d.ts +4 -8
  96. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +33 -482
  97. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +1 -0
  98. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +51 -43
  99. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-synthesis.d.ts +31 -0
  100. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-synthesis.js +196 -0
  101. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +10 -8
  102. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -1
  103. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -1
  104. package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +20 -29
  105. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.d.ts +6 -0
  106. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +78 -220
  107. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +9 -4
  108. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +242 -506
  109. package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +103 -0
  110. package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +2 -1
  111. package/packages/@monomind/cli/dist/src/memory/intelligence.js +56 -43
  112. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +14 -9
  113. package/packages/@monomind/cli/dist/src/memory/memory-read.js +1 -19
  114. package/packages/@monomind/cli/dist/src/suggest.js +1 -7
  115. package/packages/@monomind/cli/dist/src/transfer/store/discovery.d.ts +3 -2
  116. package/packages/@monomind/cli/dist/src/transfer/store/discovery.js +22 -70
  117. package/packages/@monomind/cli/dist/src/update/checker.js +0 -1
  118. package/packages/@monomind/cli/dist/src/utils/cosine-similarity.d.ts +22 -0
  119. package/packages/@monomind/cli/dist/src/utils/cosine-similarity.js +38 -0
  120. package/packages/@monomind/cli/dist/src/utils/input-guards.d.ts +51 -0
  121. package/packages/@monomind/cli/dist/src/utils/input-guards.js +223 -0
  122. package/packages/@monomind/cli/dist/src/utils/json-file.d.ts +33 -0
  123. package/packages/@monomind/cli/dist/src/utils/json-file.js +57 -0
  124. package/packages/@monomind/cli/package.json +9 -6
  125. package/packages/@monomind/cli/scripts/sync-claude-assets.sh +16 -20
  126. package/scripts/generate-agent-avatars.mjs +0 -8
  127. package/.claude/agents/architecture/system-design/arch-system-design.md +0 -54
  128. package/.claude/agents/consensus/crdt-synchronizer.md +0 -977
  129. package/.claude/agents/consensus/quorum-manager.md +0 -803
  130. package/.claude/agents/consensus/security-manager.md +0 -602
  131. package/.claude/agents/core/coder.md +0 -262
  132. package/.claude/agents/core/coordinator.md +0 -71
  133. package/.claude/agents/core/planner.md +0 -170
  134. package/.claude/agents/core/researcher.md +0 -197
  135. package/.claude/agents/core/reviewer.md +0 -327
  136. package/.claude/agents/core/tester.md +0 -318
  137. package/.claude/agents/design/design-monodesign.md +0 -121
  138. package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +0 -212
  139. package/.claude/agents/engineering/engineering-ai-engineer.md +0 -165
  140. package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -108
  141. package/.claude/agents/engineering/engineering-backend-architect.md +0 -254
  142. package/.claude/agents/engineering/engineering-code-reviewer.md +0 -95
  143. package/.claude/agents/engineering/engineering-data-engineer.md +0 -307
  144. package/.claude/agents/engineering/engineering-database-optimizer.md +0 -200
  145. package/.claude/agents/engineering/engineering-devops-automator.md +0 -430
  146. package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +0 -174
  147. package/.claude/agents/engineering/engineering-feishu-integration-developer.md +0 -607
  148. package/.claude/agents/engineering/engineering-frontend-developer.md +0 -249
  149. package/.claude/agents/engineering/engineering-git-workflow-master.md +0 -108
  150. package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -482
  151. package/.claude/agents/engineering/engineering-mobile-app-builder.md +0 -499
  152. package/.claude/agents/engineering/engineering-rapid-prototyper.md +0 -463
  153. package/.claude/agents/engineering/engineering-security-engineer.md +0 -303
  154. package/.claude/agents/engineering/engineering-senior-developer.md +0 -195
  155. package/.claude/agents/engineering/engineering-software-architect.md +0 -100
  156. package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +0 -528
  157. package/.claude/agents/engineering/engineering-sre.md +0 -114
  158. package/.claude/agents/engineering/engineering-technical-writer.md +0 -412
  159. package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -540
  160. package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +0 -351
  161. package/.claude/agents/generated/case-analyst.md +0 -50
  162. package/.claude/agents/generated/channel-intelligence-director.md +0 -87
  163. package/.claude/agents/generated/chief-growth-officer.md +0 -88
  164. package/.claude/agents/generated/churn-analyst.md +0 -53
  165. package/.claude/agents/generated/code-reviewer.md +0 -55
  166. package/.claude/agents/generated/code-validator.md +0 -57
  167. package/.claude/agents/generated/complexity-scanner.md +0 -56
  168. package/.claude/agents/generated/content-seo-strategist.md +0 -90
  169. package/.claude/agents/generated/copy-editor.md +0 -45
  170. package/.claude/agents/generated/court-reporter.md +0 -50
  171. package/.claude/agents/generated/defender.md +0 -51
  172. package/.claude/agents/generated/devbot-orchestrator.md +0 -58
  173. package/.claude/agents/generated/devbot-planner.md +0 -63
  174. package/.claude/agents/generated/developer-community-strategist.md +0 -91
  175. package/.claude/agents/generated/editor-in-chief.md +0 -45
  176. package/.claude/agents/generated/fact-checker.md +0 -45
  177. package/.claude/agents/generated/impact-assessor.md +0 -54
  178. package/.claude/agents/generated/judge.md +0 -51
  179. package/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
  180. package/.claude/agents/generated/prosecutor.md +0 -51
  181. package/.claude/agents/generated/reporter.md +0 -45
  182. package/.claude/agents/generated/social-media-strategist.md +0 -91
  183. package/.claude/agents/generated/video-visual-strategist.md +0 -90
  184. package/.claude/agents/github/code-review-swarm.md +0 -557
  185. package/.claude/agents/github/github-modes.md +0 -154
  186. package/.claude/agents/github/issue-tracker.md +0 -299
  187. package/.claude/agents/github/multi-repo-swarm.md +0 -525
  188. package/.claude/agents/github/pr-manager.md +0 -163
  189. package/.claude/agents/github/project-board-sync.md +0 -478
  190. package/.claude/agents/github/release-manager.md +0 -296
  191. package/.claude/agents/github/repo-architect.md +0 -359
  192. package/.claude/agents/github/swarm-issue.md +0 -548
  193. package/.claude/agents/github/swarm-pr.md +0 -427
  194. package/.claude/agents/github/sync-coordinator.md +0 -355
  195. package/.claude/agents/github/workflow-automation.md +0 -640
  196. package/.claude/agents/goal/goal-planner.md +0 -168
  197. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -129
  198. package/.claude/agents/hive-mind/queen-coordinator.md +0 -202
  199. package/.claude/agents/hive-mind/scout-explorer.md +0 -241
  200. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -192
  201. package/.claude/agents/hive-mind/worker-specialist.md +0 -216
  202. package/.claude/agents/marketing/marketing-competitive-content.md +0 -155
  203. package/.claude/agents/marketing/marketing-cro-specialist.md +0 -147
  204. package/.claude/agents/marketing/marketing-email-specialist.md +0 -90
  205. package/.claude/agents/marketing/marketing-launch-strategist.md +0 -129
  206. package/.claude/agents/marketing/marketing-pricing-strategist.md +0 -127
  207. package/.claude/agents/optimization/benchmark-suite.md +0 -665
  208. package/.claude/agents/optimization/load-balancer.md +0 -431
  209. package/.claude/agents/optimization/performance-monitor.md +0 -672
  210. package/.claude/agents/optimization/resource-allocator.md +0 -674
  211. package/.claude/agents/optimization/topology-optimizer.md +0 -808
  212. package/.claude/agents/reengineer-squad/boss.md +0 -113
  213. package/.claude/agents/reengineer-squad/critic-architect.md +0 -132
  214. package/.claude/agents/reengineer-squad/git-manager.md +0 -145
  215. package/.claude/agents/reengineer-squad/idea-generator.md +0 -95
  216. package/.claude/agents/reengineer-squad/implementer.md +0 -112
  217. package/.claude/agents/reengineer-squad/integration-planner.md +0 -112
  218. package/.claude/agents/reengineer-squad/source-analyst.md +0 -103
  219. package/.claude/agents/reengineer-squad/target-analyst.md +0 -118
  220. package/.claude/agents/reengineer-squad/tester.md +0 -105
  221. package/.claude/agents/schemas/architecture-output.json +0 -43
  222. package/.claude/agents/schemas/code-review-output.json +0 -28
  223. package/.claude/agents/schemas/generic-task-input.json +0 -12
  224. package/.claude/agents/schemas/implementation-output.json +0 -18
  225. package/.claude/agents/schemas/research-output.json +0 -31
  226. package/.claude/agents/schemas/security-audit-output.json +0 -29
  227. package/.claude/agents/schemas/test-report-output.json +0 -29
  228. package/.claude/agents/sparc/architecture.md +0 -453
  229. package/.claude/agents/sparc/pseudocode.md +0 -299
  230. package/.claude/agents/sparc/refinement.md +0 -504
  231. package/.claude/agents/sparc/specification.md +0 -258
  232. package/.claude/agents/specialists/integration-architect.md +0 -94
  233. package/.claude/agents/specialized/agentic-identity-trust.md +0 -388
  234. package/.claude/agents/specialized/agents-orchestrator.md +0 -368
  235. package/.claude/agents/specialized/automation-governance-architect.md +0 -217
  236. package/.claude/agents/specialized/blockchain-security-auditor.md +0 -497
  237. package/.claude/agents/specialized/compliance-auditor.md +0 -159
  238. package/.claude/agents/specialized/identity-graph-operator.md +0 -261
  239. package/.claude/agents/specialized/lsp-index-engineer.md +0 -315
  240. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -89
  241. package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -89
  242. package/.claude/agents/specialized/specialized-developer-advocate.md +0 -318
  243. package/.claude/agents/specialized/specialized-document-generator.md +0 -56
  244. package/.claude/agents/specialized/specialized-mcp-builder.md +0 -64
  245. package/.claude/agents/specialized/specialized-model-qa.md +0 -489
  246. package/.claude/agents/specialized/specialized-workflow-architect.md +0 -595
  247. package/.claude/agents/specialized/zk-steward.md +0 -212
  248. package/.claude/agents/swarm/mesh-coordinator.md +0 -363
  249. package/.claude/agents/templates/automation-smart-agent.md +0 -185
  250. package/.claude/agents/templates/coordinator-swarm-init.md +0 -83
  251. package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
  252. package/.claude/agents/testing/production-validator.md +0 -375
  253. package/.claude/agents/testing/tdd-london-swarm.md +0 -241
  254. package/.claude/agents/testing/testing-accessibility-auditor.md +0 -322
  255. package/.claude/agents/testing/testing-api-tester.md +0 -307
  256. package/.claude/agents/testing/testing-evidence-collector.md +0 -213
  257. package/.claude/agents/testing/testing-performance-benchmarker.md +0 -269
  258. package/.claude/agents/testing/testing-test-results-analyzer.md +0 -306
  259. package/.claude/agents/testing/testing-tool-evaluator.md +0 -395
  260. package/.claude/agents/testing/testing-workflow-optimizer.md +0 -451
  261. package/.claude/commands/agents/README.md +0 -14
  262. package/.claude/commands/agents/agent-capabilities.md +0 -25
  263. package/.claude/commands/agents/agent-coordination.md +0 -32
  264. package/.claude/commands/agents/agent-spawning.md +0 -32
  265. package/.claude/commands/agents/agent-types.md +0 -30
  266. package/.claude/commands/analysis/README.md +0 -18
  267. package/.claude/commands/analysis/bottleneck-detect.md +0 -69
  268. package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
  269. package/.claude/commands/analysis/performance-report.md +0 -52
  270. package/.claude/commands/analysis/token-usage.md +0 -47
  271. package/.claude/commands/automation/README.md +0 -19
  272. package/.claude/commands/automation/auto-agent.md +0 -86
  273. package/.claude/commands/automation/self-healing.md +0 -108
  274. package/.claude/commands/automation/session-memory.md +0 -89
  275. package/.claude/commands/automation/smart-agents.md +0 -81
  276. package/.claude/commands/automation/smart-spawn.md +0 -66
  277. package/.claude/commands/automation/workflow-select.md +0 -60
  278. package/.claude/commands/coordination/README.md +0 -13
  279. package/.claude/commands/coordination/agent-spawn.md +0 -69
  280. package/.claude/commands/coordination/swarm-init.md +0 -82
  281. package/.claude/commands/coordination/task-orchestrate.md +0 -79
  282. package/.claude/commands/github/README.md +0 -24
  283. package/.claude/commands/github/github-modes.md +0 -151
  284. package/.claude/commands/github/issue-tracker.md +0 -293
  285. package/.claude/commands/github/pr-manager.md +0 -173
  286. package/.claude/commands/github/release-manager.md +0 -343
  287. package/.claude/commands/github/repo-architect.md +0 -379
  288. package/.claude/commands/github/sync-coordinator.md +0 -297
  289. package/.claude/commands/hive-mind/README.md +0 -42
  290. package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -72
  291. package/.claude/commands/hive-mind/hive-mind-init.md +0 -68
  292. package/.claude/commands/hive-mind/hive-mind-memory.md +0 -73
  293. package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -82
  294. package/.claude/commands/hive-mind/hive-mind-status.md +0 -56
  295. package/.claude/commands/hive-mind/hive-mind-stop.md +0 -55
  296. package/.claude/commands/hive-mind/hive-mind.md +0 -87
  297. package/.claude/commands/hooks/README.md +0 -66
  298. package/.claude/commands/hooks/overview.md +0 -112
  299. package/.claude/commands/hooks/post-edit.md +0 -78
  300. package/.claude/commands/hooks/post-task.md +0 -62
  301. package/.claude/commands/hooks/pre-edit.md +0 -81
  302. package/.claude/commands/hooks/pre-task.md +0 -73
  303. package/.claude/commands/hooks/session-end.md +0 -82
  304. package/.claude/commands/hooks/setup.md +0 -132
  305. package/.claude/commands/mastermind/_repeat.md +0 -492
  306. package/.claude/commands/mastermind/_taskfile.md +0 -232
  307. package/.claude/commands/mastermind/adr.md +0 -9
  308. package/.claude/commands/mastermind/approve.md +0 -91
  309. package/.claude/commands/mastermind/architect.md +0 -52
  310. package/.claude/commands/mastermind/autodev.md +0 -28
  311. package/.claude/commands/mastermind/brain.md +0 -99
  312. package/.claude/commands/mastermind/budget.md +0 -5
  313. package/.claude/commands/mastermind/build.md +0 -23
  314. package/.claude/commands/mastermind/code-review.md +0 -314
  315. package/.claude/commands/mastermind/content.md +0 -23
  316. package/.claude/commands/mastermind/createorg.md +0 -136
  317. package/.claude/commands/mastermind/createtask.md +0 -372
  318. package/.claude/commands/mastermind/debug.md +0 -19
  319. package/.claude/commands/mastermind/design.md +0 -17
  320. package/.claude/commands/mastermind/do.md +0 -525
  321. package/.claude/commands/mastermind/execute.md +0 -17
  322. package/.claude/commands/mastermind/finance.md +0 -23
  323. package/.claude/commands/mastermind/finish.md +0 -17
  324. package/.claude/commands/mastermind/graph-status.md +0 -5
  325. package/.claude/commands/mastermind/help.md +0 -115
  326. package/.claude/commands/mastermind/idea.md +0 -23
  327. package/.claude/commands/mastermind/ideate.md +0 -258
  328. package/.claude/commands/mastermind/improve.md +0 -342
  329. package/.claude/commands/mastermind/loops.md +0 -5
  330. package/.claude/commands/mastermind/marketing.md +0 -23
  331. package/.claude/commands/mastermind/master.md +0 -1124
  332. package/.claude/commands/mastermind/memory.md +0 -227
  333. package/.claude/commands/mastermind/okf-export.md +0 -14
  334. package/.claude/commands/mastermind/okf-import.md +0 -15
  335. package/.claude/commands/mastermind/ops.md +0 -23
  336. package/.claude/commands/mastermind/orgs.md +0 -18
  337. package/.claude/commands/mastermind/orgstatus.md +0 -56
  338. package/.claude/commands/mastermind/plan.md +0 -23
  339. package/.claude/commands/mastermind/receive-review.md +0 -17
  340. package/.claude/commands/mastermind/references/antigravity-tools.md +0 -60
  341. package/.claude/commands/mastermind/references/claude-code-tools.md +0 -50
  342. package/.claude/commands/mastermind/references/codex-tools.md +0 -64
  343. package/.claude/commands/mastermind/references/copilot-tools.md +0 -49
  344. package/.claude/commands/mastermind/references/gemini-tools.md +0 -63
  345. package/.claude/commands/mastermind/references/pi-tools.md +0 -28
  346. package/.claude/commands/mastermind/release.md +0 -23
  347. package/.claude/commands/mastermind/repeat.md +0 -254
  348. package/.claude/commands/mastermind/research.md +0 -23
  349. package/.claude/commands/mastermind/review.md +0 -34
  350. package/.claude/commands/mastermind/runorg.md +0 -153
  351. package/.claude/commands/mastermind/sales.md +0 -23
  352. package/.claude/commands/mastermind/skill-builder.md +0 -17
  353. package/.claude/commands/mastermind/specialagents.md +0 -122
  354. package/.claude/commands/mastermind/stoporg.md +0 -75
  355. package/.claude/commands/mastermind/swarm.md +0 -158
  356. package/.claude/commands/mastermind/taskdev.md +0 -23
  357. package/.claude/commands/mastermind/tdd.md +0 -19
  358. package/.claude/commands/mastermind/techport.md +0 -27
  359. package/.claude/commands/mastermind/understand.md +0 -136
  360. package/.claude/commands/mastermind/verify.md +0 -19
  361. package/.claude/commands/mastermind/worktree.md +0 -17
  362. package/.claude/commands/mastermind.md +0 -121
  363. package/.claude/commands/memory/README.md +0 -79
  364. package/.claude/commands/memory/memory-search.md +0 -77
  365. package/.claude/commands/monitoring/README.md +0 -69
  366. package/.claude/commands/monitoring/agent-metrics.md +0 -65
  367. package/.claude/commands/monitoring/agents.md +0 -71
  368. package/.claude/commands/monitoring/status.md +0 -108
  369. package/.claude/commands/monobrowse.md +0 -21
  370. package/.claude/commands/monoes/README.md +0 -30
  371. package/.claude/commands/monoes/install.md +0 -163
  372. package/.claude/commands/monoes/monoagent.md +0 -148
  373. package/.claude/commands/monoes/monoclip.md +0 -64
  374. package/.claude/commands/monoes/monotask.md +0 -137
  375. package/.claude/commands/monograph/README.md +0 -102
  376. package/.claude/commands/monograph/monograph-build.md +0 -79
  377. package/.claude/commands/monograph/monograph-search.md +0 -96
  378. package/.claude/commands/monograph/monograph-stats.md +0 -53
  379. package/.claude/commands/monograph/monograph-watch.md +0 -63
  380. package/.claude/commands/monograph/monograph-wiki.md +0 -91
  381. package/.claude/commands/optimization/auto-topology.md +0 -85
  382. package/.claude/commands/optimization/performance-optimize.md +0 -79
  383. package/.claude/commands/pair/README.md +0 -79
  384. package/.claude/commands/pair/examples.md +0 -156
  385. package/.claude/commands/pair/modes.md +0 -122
  386. package/.claude/commands/pair/session.md +0 -124
  387. package/.claude/commands/sparc/analyzer.md +0 -35
  388. package/.claude/commands/sparc/architect.md +0 -36
  389. package/.claude/commands/sparc/ask.md +0 -56
  390. package/.claude/commands/sparc/batch-executor.md +0 -37
  391. package/.claude/commands/sparc/code.md +0 -48
  392. package/.claude/commands/sparc/coder.md +0 -37
  393. package/.claude/commands/sparc/debug.md +0 -42
  394. package/.claude/commands/sparc/debugger.md +0 -37
  395. package/.claude/commands/sparc/designer.md +0 -36
  396. package/.claude/commands/sparc/devops.md +0 -68
  397. package/.claude/commands/sparc/docs-writer.md +0 -39
  398. package/.claude/commands/sparc/documenter.md +0 -37
  399. package/.claude/commands/sparc/innovator.md +0 -37
  400. package/.claude/commands/sparc/integration.md +0 -42
  401. package/.claude/commands/sparc/mcp.md +0 -76
  402. package/.claude/commands/sparc/memory-manager.md +0 -57
  403. package/.claude/commands/sparc/optimizer.md +0 -37
  404. package/.claude/commands/sparc/orchestrator.md +0 -70
  405. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
  406. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
  407. package/.claude/commands/sparc/researcher.md +0 -37
  408. package/.claude/commands/sparc/reviewer.md +0 -37
  409. package/.claude/commands/sparc/security-review.md +0 -39
  410. package/.claude/commands/sparc/sparc-modes.md +0 -120
  411. package/.claude/commands/sparc/sparc.md +0 -71
  412. package/.claude/commands/sparc/spec-pseudocode.md +0 -39
  413. package/.claude/commands/sparc/supabase-admin.md +0 -301
  414. package/.claude/commands/sparc/swarm-coordinator.md +0 -50
  415. package/.claude/commands/sparc/tdd.md +0 -37
  416. package/.claude/commands/sparc/tester.md +0 -37
  417. package/.claude/commands/sparc/tutorial.md +0 -38
  418. package/.claude/commands/sparc/workflow-manager.md +0 -37
  419. package/.claude/commands/sparc.md +0 -112
  420. package/.claude/commands/stream-chain/pipeline.md +0 -116
  421. package/.claude/commands/stream-chain/run.md +0 -156
  422. package/.claude/commands/swarm/README.md +0 -40
  423. package/.claude/commands/swarm/analysis.md +0 -73
  424. package/.claude/commands/swarm/development.md +0 -72
  425. package/.claude/commands/swarm/examples.md +0 -103
  426. package/.claude/commands/swarm/maintenance.md +0 -75
  427. package/.claude/commands/swarm/optimization.md +0 -84
  428. package/.claude/commands/swarm/research.md +0 -76
  429. package/.claude/commands/swarm/swarm.md +0 -79
  430. package/.claude/commands/swarm/testing.md +0 -80
  431. package/.claude/commands/tokens.md +0 -18
  432. package/.claude/commands/truth/start.md +0 -121
  433. package/.claude/commands/ts.md +0 -14
  434. package/.claude/commands/workflows/README.md +0 -65
  435. package/.claude/commands/workflows/development.md +0 -86
  436. package/.claude/commands/workflows/research.md +0 -89
  437. package/.claude/commands/workflows/workflow-create.md +0 -84
  438. package/.claude/commands/workflows/workflow-execute.md +0 -103
  439. package/.claude/commands/workflows/workflow-export.md +0 -90
  440. package/.claude/helpers/control-start.cjs +0 -184
  441. package/.claude/helpers/event-logger.cjs +0 -155
  442. package/.claude/helpers/extras-registry.json +0 -5141
  443. package/.claude/helpers/graphify-freshen.cjs +0 -140
  444. package/.claude/helpers/handlers/adr-draft-handler.cjs +0 -78
  445. package/.claude/helpers/handlers/agent-start-handler.cjs +0 -83
  446. package/.claude/helpers/handlers/budget-status-handler.cjs +0 -14
  447. package/.claude/helpers/handlers/capture-handler.cjs +0 -583
  448. package/.claude/helpers/handlers/compact-handler.cjs +0 -35
  449. package/.claude/helpers/handlers/edit-handler.cjs +0 -145
  450. package/.claude/helpers/handlers/gates-handler.cjs +0 -138
  451. package/.claude/helpers/handlers/graph-status-handler.cjs +0 -45
  452. package/.claude/helpers/handlers/loops-status-handler.cjs +0 -48
  453. package/.claude/helpers/handlers/route-handler.cjs +0 -381
  454. package/.claude/helpers/handlers/session-handler.cjs +0 -234
  455. package/.claude/helpers/handlers/session-restore-handler.cjs +0 -375
  456. package/.claude/helpers/handlers/stats-handler.cjs +0 -14
  457. package/.claude/helpers/handlers/task-handler.cjs +0 -206
  458. package/.claude/helpers/hook-handler.cjs +0 -765
  459. package/.claude/helpers/intelligence.cjs +0 -338
  460. package/.claude/helpers/learning-service.mjs +0 -61
  461. package/.claude/helpers/loop-tracker.cjs +0 -119
  462. package/.claude/helpers/mastermind-activate.cjs +0 -35
  463. package/.claude/helpers/memory-palace.cjs +0 -461
  464. package/.claude/helpers/memory.cjs +0 -193
  465. package/.claude/helpers/metrics-db.mjs +0 -87
  466. package/.claude/helpers/monolean-activate.cjs +0 -30
  467. package/.claude/helpers/monolean-config.cjs +0 -76
  468. package/.claude/helpers/monolean-instructions.cjs +0 -109
  469. package/.claude/helpers/monolean-propagate.cjs +0 -13
  470. package/.claude/helpers/monolean-tracker.cjs +0 -18
  471. package/.claude/helpers/router.cjs +0 -364
  472. package/.claude/helpers/session.cjs +0 -140
  473. package/.claude/helpers/skill-registry.json +0 -1043
  474. package/.claude/helpers/statusline.cjs +0 -1344
  475. package/.claude/helpers/toggle-statusline.cjs +0 -73
  476. package/.claude/helpers/token-tracker.cjs +0 -934
  477. package/.claude/helpers/utils/micro-agents.cjs +0 -354
  478. package/.claude/helpers/utils/monograph.cjs +0 -480
  479. package/.claude/helpers/utils/telemetry.cjs +0 -146
  480. package/.claude/mcp.json +0 -3
  481. package/.claude/scheduled_tasks.lock +0 -1
  482. package/.claude/settings.json +0 -475
  483. package/.claude/skills/.monomind/data/ranked-context.json +0 -5
  484. package/.claude/skills/.monomind/sessions/current.json +0 -13
  485. package/.claude/skills/.monomind/sessions/session-1777829336455.json +0 -15
  486. package/.claude/skills/.monomind/sessions/session-1777831614725.json +0 -15
  487. package/.claude/skills/.monomind/sessions/session-1777832095857.json +0 -15
  488. package/.claude/skills/.monomind/sessions/session-1777839814183.json +0 -15
  489. package/.claude/skills/.monomind/sessions/session-1777841847131.json +0 -15
  490. package/.claude/skills/.monomind/sessions/session-1777843309463.json +0 -15
  491. package/.claude/skills/.monomind/sessions/session-1777880867159.json +0 -15
  492. package/.claude/skills/.monomind/sessions/session-1777881884593.json +0 -15
  493. package/.claude/skills/.monomind/sessions/session-1777884090471.json +0 -15
  494. package/.claude/skills/.monomind/sessions/session-1777884808221.json +0 -15
  495. package/.claude/skills/.monomind/sessions/session-1777885672155.json +0 -15
  496. package/.claude/skills/.monomind/sessions/session-1777886852818.json +0 -15
  497. package/.claude/skills/.monomind/sessions/session-1777896532690.json +0 -15
  498. package/.claude/skills/agent-browser-testing/SKILL.md +0 -964
  499. package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
  500. package/.claude/skills/github-issue-triage/SKILL.md +0 -354
  501. package/.claude/skills/github-repo-recap/SKILL.md +0 -207
  502. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -709
  503. package/.claude/skills/hooks-automation/SKILL.md +0 -1193
  504. package/.claude/skills/mastermind-skills/_agent-select.md +0 -132
  505. package/.claude/skills/mastermind-skills/_delegation.md +0 -83
  506. package/.claude/skills/mastermind-skills/_intake.md +0 -83
  507. package/.claude/skills/mastermind-skills/_protocol.md +0 -404
  508. package/.claude/skills/mastermind-skills/_repeat.md +0 -171
  509. package/.claude/skills/mastermind-skills/access.md +0 -236
  510. package/.claude/skills/mastermind-skills/activity.md +0 -191
  511. package/.claude/skills/mastermind-skills/adapter-manager.md +0 -259
  512. package/.claude/skills/mastermind-skills/adapters.md +0 -204
  513. package/.claude/skills/mastermind-skills/agent-detail.md +0 -242
  514. package/.claude/skills/mastermind-skills/agents.md +0 -178
  515. package/.claude/skills/mastermind-skills/approval-detail.md +0 -259
  516. package/.claude/skills/mastermind-skills/approve.md +0 -188
  517. package/.claude/skills/mastermind-skills/architect.md +0 -862
  518. package/.claude/skills/mastermind-skills/autodev.md +0 -360
  519. package/.claude/skills/mastermind-skills/backup.md +0 -197
  520. package/.claude/skills/mastermind-skills/bootstrap.md +0 -190
  521. package/.claude/skills/mastermind-skills/budgets.md +0 -237
  522. package/.claude/skills/mastermind-skills/build.md +0 -170
  523. package/.claude/skills/mastermind-skills/code-quality-reviewer-prompt.md +0 -60
  524. package/.claude/skills/mastermind-skills/companies.md +0 -256
  525. package/.claude/skills/mastermind-skills/content.md +0 -197
  526. package/.claude/skills/mastermind-skills/costs.md +0 -151
  527. package/.claude/skills/mastermind-skills/createorg.md +0 -862
  528. package/.claude/skills/mastermind-skills/debug.md +0 -232
  529. package/.claude/skills/mastermind-skills/design.md +0 -189
  530. package/.claude/skills/mastermind-skills/diagnose.md +0 -249
  531. package/.claude/skills/mastermind-skills/env.md +0 -198
  532. package/.claude/skills/mastermind-skills/environments.md +0 -250
  533. package/.claude/skills/mastermind-skills/execute.md +0 -104
  534. package/.claude/skills/mastermind-skills/export.md +0 -333
  535. package/.claude/skills/mastermind-skills/finance.md +0 -166
  536. package/.claude/skills/mastermind-skills/finish.md +0 -251
  537. package/.claude/skills/mastermind-skills/goal-detail.md +0 -255
  538. package/.claude/skills/mastermind-skills/goals.md +0 -149
  539. package/.claude/skills/mastermind-skills/heartbeat.md +0 -164
  540. package/.claude/skills/mastermind-skills/idea.md +0 -1142
  541. package/.claude/skills/mastermind-skills/implementer-prompt.md +0 -109
  542. package/.claude/skills/mastermind-skills/import.md +0 -281
  543. package/.claude/skills/mastermind-skills/inbox.md +0 -214
  544. package/.claude/skills/mastermind-skills/instance-settings.md +0 -315
  545. package/.claude/skills/mastermind-skills/instance.md +0 -233
  546. package/.claude/skills/mastermind-skills/invite-landing.md +0 -227
  547. package/.claude/skills/mastermind-skills/invites.md +0 -254
  548. package/.claude/skills/mastermind-skills/issue-detail.md +0 -291
  549. package/.claude/skills/mastermind-skills/issues.md +0 -235
  550. package/.claude/skills/mastermind-skills/join-queue.md +0 -170
  551. package/.claude/skills/mastermind-skills/liveness.md +0 -392
  552. package/.claude/skills/mastermind-skills/marketing.md +0 -228
  553. package/.claude/skills/mastermind-skills/memory.md +0 -321
  554. package/.claude/skills/mastermind-skills/monitor.md +0 -1284
  555. package/.claude/skills/mastermind-skills/monotask.md +0 -350
  556. package/.claude/skills/mastermind-skills/my-issues.md +0 -146
  557. package/.claude/skills/mastermind-skills/new-agent.md +0 -241
  558. package/.claude/skills/mastermind-skills/ops.md +0 -168
  559. package/.claude/skills/mastermind-skills/org-chart.md +0 -209
  560. package/.claude/skills/mastermind-skills/org-settings.md +0 -254
  561. package/.claude/skills/mastermind-skills/orgs.md +0 -98
  562. package/.claude/skills/mastermind-skills/orgstatus.md +0 -194
  563. package/.claude/skills/mastermind-skills/plan-to-tasks.md +0 -136
  564. package/.claude/skills/mastermind-skills/plan.md +0 -198
  565. package/.claude/skills/mastermind-skills/plugin-manager.md +0 -241
  566. package/.claude/skills/mastermind-skills/plugin-settings.md +0 -273
  567. package/.claude/skills/mastermind-skills/plugins.md +0 -190
  568. package/.claude/skills/mastermind-skills/profile.md +0 -187
  569. package/.claude/skills/mastermind-skills/project-detail.md +0 -249
  570. package/.claude/skills/mastermind-skills/project-workspace.md +0 -244
  571. package/.claude/skills/mastermind-skills/projects.md +0 -164
  572. package/.claude/skills/mastermind-skills/receive-review.md +0 -213
  573. package/.claude/skills/mastermind-skills/references/copywriting-frameworks.md +0 -181
  574. package/.claude/skills/mastermind-skills/references/persuasion-psychology.md +0 -158
  575. package/.claude/skills/mastermind-skills/release.md +0 -168
  576. package/.claude/skills/mastermind-skills/research.md +0 -168
  577. package/.claude/skills/mastermind-skills/review.md +0 -233
  578. package/.claude/skills/mastermind-skills/routine-detail.md +0 -253
  579. package/.claude/skills/mastermind-skills/routines.md +0 -203
  580. package/.claude/skills/mastermind-skills/runorg.md +0 -714
  581. package/.claude/skills/mastermind-skills/sales.md +0 -170
  582. package/.claude/skills/mastermind-skills/search.md +0 -186
  583. package/.claude/skills/mastermind-skills/secrets.md +0 -199
  584. package/.claude/skills/mastermind-skills/skill-builder.md +0 -274
  585. package/.claude/skills/mastermind-skills/skills.md +0 -156
  586. package/.claude/skills/mastermind-skills/spec-reviewer-prompt.md +0 -63
  587. package/.claude/skills/mastermind-skills/stoporg.md +0 -138
  588. package/.claude/skills/mastermind-skills/taskdev.md +0 -307
  589. package/.claude/skills/mastermind-skills/tasks.md +0 -149
  590. package/.claude/skills/mastermind-skills/tdd.md +0 -394
  591. package/.claude/skills/mastermind-skills/techport.md +0 -777
  592. package/.claude/skills/mastermind-skills/threads.md +0 -259
  593. package/.claude/skills/mastermind-skills/tree-control.md +0 -250
  594. package/.claude/skills/mastermind-skills/verify.md +0 -196
  595. package/.claude/skills/mastermind-skills/wiki.md +0 -314
  596. package/.claude/skills/mastermind-skills/workspace-detail.md +0 -317
  597. package/.claude/skills/mastermind-skills/workspaces.md +0 -261
  598. package/.claude/skills/mastermind-skills/worktree.md +0 -215
  599. package/.claude/skills/monodesign/SKILL.md +0 -333
  600. package/.claude/skills/monodesign/adapt.md +0 -53
  601. package/.claude/skills/monodesign/agents/monodesign-asset-producer.md +0 -100
  602. package/.claude/skills/monodesign/animate.md +0 -65
  603. package/.claude/skills/monodesign/audit.md +0 -89
  604. package/.claude/skills/monodesign/bolder.md +0 -50
  605. package/.claude/skills/monodesign/clarify.md +0 -64
  606. package/.claude/skills/monodesign/colorize.md +0 -68
  607. package/.claude/skills/monodesign/craft.md +0 -51
  608. package/.claude/skills/monodesign/critique.md +0 -66
  609. package/.claude/skills/monodesign/delight.md +0 -47
  610. package/.claude/skills/monodesign/distill.md +0 -56
  611. package/.claude/skills/monodesign/document.md +0 -83
  612. package/.claude/skills/monodesign/extract.md +0 -74
  613. package/.claude/skills/monodesign/harden.md +0 -65
  614. package/.claude/skills/monodesign/live.md +0 -59
  615. package/.claude/skills/monodesign/onboard.md +0 -50
  616. package/.claude/skills/monodesign/optimize.md +0 -64
  617. package/.claude/skills/monodesign/overdrive.md +0 -56
  618. package/.claude/skills/monodesign/polish.md +0 -68
  619. package/.claude/skills/monodesign/quieter.md +0 -57
  620. package/.claude/skills/monodesign/reference/adapt.md +0 -190
  621. package/.claude/skills/monodesign/reference/animate.md +0 -175
  622. package/.claude/skills/monodesign/reference/antipatterns-catalog.md +0 -359
  623. package/.claude/skills/monodesign/reference/audit.md +0 -133
  624. package/.claude/skills/monodesign/reference/bolder.md +0 -113
  625. package/.claude/skills/monodesign/reference/brand-workflow.md +0 -180
  626. package/.claude/skills/monodesign/reference/brand.md +0 -114
  627. package/.claude/skills/monodesign/reference/clarify.md +0 -174
  628. package/.claude/skills/monodesign/reference/codex.md +0 -107
  629. package/.claude/skills/monodesign/reference/cognitive-load.md +0 -106
  630. package/.claude/skills/monodesign/reference/color-and-contrast.md +0 -105
  631. package/.claude/skills/monodesign/reference/colorize.md +0 -154
  632. package/.claude/skills/monodesign/reference/component-specs.md +0 -260
  633. package/.claude/skills/monodesign/reference/component-states.md +0 -274
  634. package/.claude/skills/monodesign/reference/component-system.md +0 -358
  635. package/.claude/skills/monodesign/reference/copy-formulas.md +0 -160
  636. package/.claude/skills/monodesign/reference/craft.md +0 -196
  637. package/.claude/skills/monodesign/reference/critique.md +0 -213
  638. package/.claude/skills/monodesign/reference/delight.md +0 -302
  639. package/.claude/skills/monodesign/reference/design-principles.md +0 -246
  640. package/.claude/skills/monodesign/reference/distill.md +0 -111
  641. package/.claude/skills/monodesign/reference/document.md +0 -427
  642. package/.claude/skills/monodesign/reference/extract.md +0 -69
  643. package/.claude/skills/monodesign/reference/harden.md +0 -347
  644. package/.claude/skills/monodesign/reference/heuristics-scoring.md +0 -234
  645. package/.claude/skills/monodesign/reference/hooks.md +0 -99
  646. package/.claude/skills/monodesign/reference/image-prompts.md +0 -130
  647. package/.claude/skills/monodesign/reference/interaction-design.md +0 -195
  648. package/.claude/skills/monodesign/reference/layout.md +0 -141
  649. package/.claude/skills/monodesign/reference/live.md +0 -622
  650. package/.claude/skills/monodesign/reference/motion-design.md +0 -109
  651. package/.claude/skills/monodesign/reference/onboard.md +0 -234
  652. package/.claude/skills/monodesign/reference/optimize.md +0 -258
  653. package/.claude/skills/monodesign/reference/overdrive.md +0 -130
  654. package/.claude/skills/monodesign/reference/personas.md +0 -179
  655. package/.claude/skills/monodesign/reference/polish.md +0 -233
  656. package/.claude/skills/monodesign/reference/pre-delivery-checklist.md +0 -108
  657. package/.claude/skills/monodesign/reference/product.md +0 -62
  658. package/.claude/skills/monodesign/reference/quieter.md +0 -99
  659. package/.claude/skills/monodesign/reference/responsive-design.md +0 -114
  660. package/.claude/skills/monodesign/reference/shape.md +0 -151
  661. package/.claude/skills/monodesign/reference/spatial-design.md +0 -100
  662. package/.claude/skills/monodesign/reference/teach.md +0 -156
  663. package/.claude/skills/monodesign/reference/token-architecture.md +0 -222
  664. package/.claude/skills/monodesign/reference/typeset.md +0 -124
  665. package/.claude/skills/monodesign/reference/typography.md +0 -159
  666. package/.claude/skills/monodesign/reference/ux-research.md +0 -143
  667. package/.claude/skills/monodesign/reference/ux-rules.md +0 -211
  668. package/.claude/skills/monodesign/reference/ux-writing.md +0 -107
  669. package/.claude/skills/monodesign/shape.md +0 -71
  670. package/.claude/skills/monodesign/teach.md +0 -69
  671. package/.claude/skills/monodesign/typeset.md +0 -59
  672. package/.claude/skills/monolean/SKILL.md +0 -118
  673. package/.claude/skills/monolean-audit/SKILL.md +0 -41
  674. package/.claude/skills/monolean-debt/SKILL.md +0 -46
  675. package/.claude/skills/monolean-help/SKILL.md +0 -60
  676. package/.claude/skills/monolean-review/SKILL.md +0 -57
  677. package/.claude/skills/monomind/.monomind/registry.json +0 -6
  678. package/.claude/skills/monomind/browse-agentcore.md +0 -115
  679. package/.claude/skills/monomind/browse-electron.md +0 -188
  680. package/.claude/skills/monomind/browse-qa.md +0 -228
  681. package/.claude/skills/monomind/browse-references/authentication.md +0 -161
  682. package/.claude/skills/monomind/browse-references/trust-boundaries.md +0 -40
  683. package/.claude/skills/monomind/browse-references/video-recording.md +0 -83
  684. package/.claude/skills/monomind/browse-slack.md +0 -188
  685. package/.claude/skills/monomind/browse-vercel.md +0 -239
  686. package/.claude/skills/monomind/browse.md +0 -724
  687. package/.claude/skills/monomotion/SKILL.md +0 -145
  688. package/.claude/skills/monomotion/rules/api-control.md +0 -139
  689. package/.claude/skills/monomotion/rules/effects.md +0 -109
  690. package/.claude/skills/monomotion/rules/integration.md +0 -140
  691. package/.claude/skills/monomotion/rules/scroll.md +0 -131
  692. package/.claude/skills/monomotion/rules/sequencing.md +0 -105
  693. package/.claude/skills/monomotion/rules/svg.md +0 -101
  694. package/.claude/skills/monomotion/rules/text.md +0 -119
  695. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  696. package/.claude/skills/performance-analysis/SKILL.md +0 -560
  697. package/.claude/skills/skill-builder/SKILL.md +0 -910
  698. package/.claude/skills/sparc-methodology/SKILL.md +0 -950
  699. package/.claude/skills/specialagent/SKILL.md +0 -208
  700. package/.claude/skills/stop-slop/SKILL.md +0 -67
  701. package/.claude/skills/stop-slop/references/examples.md +0 -61
  702. package/.claude/skills/stop-slop/references/phrases.md +0 -130
  703. package/.claude/skills/stop-slop/references/structures.md +0 -136
  704. package/.claude/skills/swarm-advanced/SKILL.md +0 -937
  705. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  706. package/.claude/skills/verification-quality/SKILL.md +0 -674
  707. package/.claude/workflows/feature-dev.yaml +0 -18
  708. package/.claude/workflows/security-audit.yaml +0 -10
  709. package/packages/@monomind/cli/.claude/agents/generated/case-analyst.md +0 -50
  710. package/packages/@monomind/cli/.claude/agents/generated/channel-intelligence-director.md +0 -87
  711. package/packages/@monomind/cli/.claude/agents/generated/chief-growth-officer.md +0 -88
  712. package/packages/@monomind/cli/.claude/agents/generated/churn-analyst.md +0 -53
  713. package/packages/@monomind/cli/.claude/agents/generated/code-reviewer.md +0 -55
  714. package/packages/@monomind/cli/.claude/agents/generated/code-validator.md +0 -57
  715. package/packages/@monomind/cli/.claude/agents/generated/complexity-scanner.md +0 -56
  716. package/packages/@monomind/cli/.claude/agents/generated/content-seo-strategist.md +0 -90
  717. package/packages/@monomind/cli/.claude/agents/generated/copy-editor.md +0 -45
  718. package/packages/@monomind/cli/.claude/agents/generated/court-reporter.md +0 -50
  719. package/packages/@monomind/cli/.claude/agents/generated/defender.md +0 -51
  720. package/packages/@monomind/cli/.claude/agents/generated/devbot-orchestrator.md +0 -58
  721. package/packages/@monomind/cli/.claude/agents/generated/devbot-planner.md +0 -63
  722. package/packages/@monomind/cli/.claude/agents/generated/developer-community-strategist.md +0 -91
  723. package/packages/@monomind/cli/.claude/agents/generated/editor-in-chief.md +0 -45
  724. package/packages/@monomind/cli/.claude/agents/generated/fact-checker.md +0 -45
  725. package/packages/@monomind/cli/.claude/agents/generated/impact-assessor.md +0 -54
  726. package/packages/@monomind/cli/.claude/agents/generated/judge.md +0 -51
  727. package/packages/@monomind/cli/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
  728. package/packages/@monomind/cli/.claude/agents/generated/prosecutor.md +0 -51
  729. package/packages/@monomind/cli/.claude/agents/generated/reporter.md +0 -45
  730. package/packages/@monomind/cli/.claude/agents/generated/social-media-strategist.md +0 -91
  731. package/packages/@monomind/cli/.claude/agents/generated/video-visual-strategist.md +0 -90
  732. package/packages/@monomind/cli/.claude/agents/reengineer-squad/boss.md +0 -113
  733. package/packages/@monomind/cli/.claude/agents/reengineer-squad/critic-architect.md +0 -132
  734. package/packages/@monomind/cli/.claude/agents/reengineer-squad/git-manager.md +0 -145
  735. package/packages/@monomind/cli/.claude/agents/reengineer-squad/idea-generator.md +0 -95
  736. package/packages/@monomind/cli/.claude/agents/reengineer-squad/implementer.md +0 -112
  737. package/packages/@monomind/cli/.claude/agents/reengineer-squad/integration-planner.md +0 -112
  738. package/packages/@monomind/cli/.claude/agents/reengineer-squad/source-analyst.md +0 -103
  739. package/packages/@monomind/cli/.claude/agents/reengineer-squad/target-analyst.md +0 -118
  740. package/packages/@monomind/cli/.claude/agents/reengineer-squad/tester.md +0 -105
  741. package/packages/@monomind/cli/.claude/agents/sparc/architecture.md +0 -453
  742. package/packages/@monomind/cli/.claude/agents/sparc/pseudocode.md +0 -299
  743. package/packages/@monomind/cli/.claude/agents/sparc/refinement.md +0 -504
  744. package/packages/@monomind/cli/.claude/agents/sparc/specification.md +0 -258
  745. package/packages/@monomind/cli/.claude/agents/templates/implementer-sparc-coder.md +0 -231
  746. package/packages/@monomind/cli/.claude/commands/sparc/analyzer.md +0 -35
  747. package/packages/@monomind/cli/.claude/commands/sparc/architect.md +0 -36
  748. package/packages/@monomind/cli/.claude/commands/sparc/ask.md +0 -56
  749. package/packages/@monomind/cli/.claude/commands/sparc/batch-executor.md +0 -37
  750. package/packages/@monomind/cli/.claude/commands/sparc/code.md +0 -48
  751. package/packages/@monomind/cli/.claude/commands/sparc/coder.md +0 -37
  752. package/packages/@monomind/cli/.claude/commands/sparc/debug.md +0 -42
  753. package/packages/@monomind/cli/.claude/commands/sparc/debugger.md +0 -37
  754. package/packages/@monomind/cli/.claude/commands/sparc/designer.md +0 -36
  755. package/packages/@monomind/cli/.claude/commands/sparc/devops.md +0 -68
  756. package/packages/@monomind/cli/.claude/commands/sparc/docs-writer.md +0 -39
  757. package/packages/@monomind/cli/.claude/commands/sparc/documenter.md +0 -37
  758. package/packages/@monomind/cli/.claude/commands/sparc/innovator.md +0 -37
  759. package/packages/@monomind/cli/.claude/commands/sparc/integration.md +0 -42
  760. package/packages/@monomind/cli/.claude/commands/sparc/mcp.md +0 -76
  761. package/packages/@monomind/cli/.claude/commands/sparc/memory-manager.md +0 -57
  762. package/packages/@monomind/cli/.claude/commands/sparc/optimizer.md +0 -37
  763. package/packages/@monomind/cli/.claude/commands/sparc/orchestrator.md +0 -70
  764. package/packages/@monomind/cli/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
  765. package/packages/@monomind/cli/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
  766. package/packages/@monomind/cli/.claude/commands/sparc/researcher.md +0 -37
  767. package/packages/@monomind/cli/.claude/commands/sparc/reviewer.md +0 -37
  768. package/packages/@monomind/cli/.claude/commands/sparc/security-review.md +0 -39
  769. package/packages/@monomind/cli/.claude/commands/sparc/sparc-modes.md +0 -120
  770. package/packages/@monomind/cli/.claude/commands/sparc/sparc.md +0 -71
  771. package/packages/@monomind/cli/.claude/commands/sparc/spec-pseudocode.md +0 -39
  772. package/packages/@monomind/cli/.claude/commands/sparc/supabase-admin.md +0 -301
  773. package/packages/@monomind/cli/.claude/commands/sparc/swarm-coordinator.md +0 -50
  774. package/packages/@monomind/cli/.claude/commands/sparc/tdd.md +0 -37
  775. package/packages/@monomind/cli/.claude/commands/sparc/tester.md +0 -37
  776. package/packages/@monomind/cli/.claude/commands/sparc/tutorial.md +0 -38
  777. package/packages/@monomind/cli/.claude/commands/sparc/workflow-manager.md +0 -37
  778. package/packages/@monomind/cli/.claude/commands/sparc.md +0 -112
  779. package/packages/@monomind/cli/.claude/skills/sparc-methodology/SKILL.md +0 -950
  780. package/packages/@monomind/cli/dist/src/capabilities/enrichment.d.ts +0 -44
  781. package/packages/@monomind/cli/dist/src/capabilities/enrichment.js +0 -141
  782. package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.d.ts +0 -14
  783. package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.js +0 -295
  784. package/packages/@monomind/cli/dist/src/commands/analyze-graph.d.ts +0 -14
  785. package/packages/@monomind/cli/dist/src/commands/analyze-graph.js +0 -304
  786. package/packages/@monomind/cli/dist/src/commands/claims.d.ts +0 -10
  787. package/packages/@monomind/cli/dist/src/commands/claims.js +0 -650
  788. package/packages/@monomind/cli/dist/src/commands/daemon.d.ts +0 -8
  789. package/packages/@monomind/cli/dist/src/commands/daemon.js +0 -681
  790. package/packages/@monomind/cli/dist/src/commands/enrich.d.ts +0 -10
  791. package/packages/@monomind/cli/dist/src/commands/enrich.js +0 -58
  792. package/packages/@monomind/cli/dist/src/commands/issues.d.ts +0 -21
  793. package/packages/@monomind/cli/dist/src/commands/issues.js +0 -575
  794. package/packages/@monomind/cli/dist/src/commands/workflow.d.ts +0 -8
  795. package/packages/@monomind/cli/dist/src/commands/workflow.js +0 -575
  796. package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
  797. package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.js +0 -717
  798. package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +0 -198
  799. package/packages/@monomind/cli/dist/src/services/claim-service.js +0 -890
  800. package/packages/@monomind/cli/dist/src/services/headless-worker-executor.d.ts +0 -311
  801. package/packages/@monomind/cli/dist/src/services/headless-worker-executor.js +0 -1183
  802. package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +0 -230
  803. package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -1350
  804. package/packages/@monomind/cli/dist/src/ui/.monomind/capture/active-run.json +0 -1
  805. package/packages/@monomind/guidance/README.md +0 -87
  806. package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
  807. package/packages/@monomind/guidance/dist/adversarial.js +0 -572
  808. package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
  809. package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
  810. package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
  811. package/packages/@monomind/guidance/dist/artifacts.js +0 -356
  812. package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
  813. package/packages/@monomind/guidance/dist/authority.js +0 -558
  814. package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
  815. package/packages/@monomind/guidance/dist/capabilities.js +0 -485
  816. package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
  817. package/packages/@monomind/guidance/dist/coherence.js +0 -378
  818. package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
  819. package/packages/@monomind/guidance/dist/compiler.js +0 -425
  820. package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
  821. package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
  822. package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
  823. package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
  824. package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
  825. package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
  826. package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
  827. package/packages/@monomind/guidance/dist/evolution.js +0 -500
  828. package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
  829. package/packages/@monomind/guidance/dist/gates.js +0 -302
  830. package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
  831. package/packages/@monomind/guidance/dist/gateway.js +0 -452
  832. package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
  833. package/packages/@monomind/guidance/dist/generators.js +0 -682
  834. package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
  835. package/packages/@monomind/guidance/dist/headless.js +0 -342
  836. package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
  837. package/packages/@monomind/guidance/dist/hooks.js +0 -347
  838. package/packages/@monomind/guidance/dist/index.d.ts +0 -203
  839. package/packages/@monomind/guidance/dist/index.js +0 -320
  840. package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
  841. package/packages/@monomind/guidance/dist/ledger.js +0 -375
  842. package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
  843. package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
  844. package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
  845. package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
  846. package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
  847. package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
  848. package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
  849. package/packages/@monomind/guidance/dist/optimizer.js +0 -329
  850. package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
  851. package/packages/@monomind/guidance/dist/persistence.js +0 -464
  852. package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
  853. package/packages/@monomind/guidance/dist/proof.js +0 -238
  854. package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
  855. package/packages/@monomind/guidance/dist/retriever.js +0 -394
  856. package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
  857. package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
  858. package/packages/@monomind/guidance/dist/temporal.d.ts +0 -428
  859. package/packages/@monomind/guidance/dist/temporal.js +0 -660
  860. package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
  861. package/packages/@monomind/guidance/dist/trust.js +0 -474
  862. package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
  863. package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
  864. package/packages/@monomind/guidance/dist/types.d.ts +0 -378
  865. package/packages/@monomind/guidance/dist/types.js +0 -10
  866. package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
  867. package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
  868. package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
  869. package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
  870. package/packages/@monomind/guidance/package.json +0 -119
@@ -1,862 +0,0 @@
1
- ---
2
- name: mastermind-createorg
3
- description: Mastermind createorg — design, configure, and persist an autonomous agent organization with named roles, hierarchy, and communication topology. Supports optional --schedule flag for self-scheduling loop orgs.
4
- type: domain-skill
5
- default_mode: confirm
6
- ---
7
-
8
- # Mastermind Create Org
9
-
10
- This skill is invoked by `mastermind:createorg` or directly via `/mastermind:createorg`.
11
-
12
- ---
13
-
14
- ## Inputs
15
-
16
- - `brain_context`: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
17
- - `prompt`: goal and/or role description for this org
18
- - `org_name`: desired name for the org (slug, e.g. `content-team`); constrained to `[a-z0-9-]`
19
- - `roles_desc`: optional explicit role list from user (e.g. "boss, content writer, reviewer, marketer, designer, middle manager")
20
- - `schedule`: optional schedule string, e.g. `"every 30 minutes"`, `"every hour"`, `"every 2 hours"`, `"daily"`. When provided, generates a self-scheduling loop org.
21
- - `mode`: auto | confirm
22
- - `session_id`: session ID passed by command wrapper (snake_case input)
23
- - `caller`: command | master
24
-
25
- ### Schedule parsing (when `--schedule` is present)
26
-
27
- Convert the schedule string to `poll_interval_minutes`:
28
-
29
- | Schedule string | Minutes |
30
- |---|---|
31
- | `every N minutes` | N |
32
- | `every minute` | 1 |
33
- | `every hour` | 60 |
34
- | `every N hours` | N × 60 |
35
- | `daily` / `every day` | 1440 |
36
- | `every N days` | N × 1440 |
37
-
38
- ```bash
39
- # Example: "every 30 minutes" → poll_interval_minutes=30
40
- # "every 2 hours" → poll_interval_minutes=120
41
- # "daily" → poll_interval_minutes=1440
42
- ```
43
-
44
- Store the parsed value as `poll_interval_minutes` for use in Steps 4 and 6.7.
45
-
46
- ---
47
-
48
- ## Step 0 — Brain Load (standalone only)
49
-
50
- If `caller` is not "command" (i.e. invoked directly, not by the command wrapper), load brain context following _protocol.md Brain Load Procedure with namespace: `ops`.
51
-
52
- If `caller` is "command", use the `brain_context` already provided.
53
-
54
- Run intake from `_intake.md` if `prompt` is vague (stop at Q3, domain is `ops`). Skip intake if `prompt` is a rich prompt per _intake.md criteria.
55
-
56
- ---
57
-
58
- ## Step 1 — Resolve Org Name
59
-
60
- If `org_name` is not provided, extract the most prominent product/team noun from `prompt`, slugify it (lowercase, spaces → hyphens, strip non-`[a-z0-9-]` chars), and confirm with the user. Fallback: `org-<YYYYMMDD>`.
61
-
62
- Reject any `org_name` that does not match `^[a-z0-9][a-z0-9-]{0,63}$`.
63
-
64
- ---
65
-
66
- ## Step 2 — Ingest Roles
67
-
68
- Parse `roles_desc` (if provided) into a list of role titles. If not provided, derive a set of roles from `prompt` by identifying the human functions needed to achieve the goal.
69
-
70
- **Required roles to include when deriving roles from the prompt** (**skip this rule for persona-based orgs** where the characters themselves define the structure; do not inject a generic coordinator into a celebrity panel):
71
- - A coordinator/boss role that owns the goal and makes final decisions
72
- - At least one executor role that does the primary work
73
- - A reviewer or QA role if quality output is implied
74
- - A communication layer (middle manager) if team size ≥ 4
75
-
76
- **If the user provided an explicit `roles_desc`, their list is authoritative — never silently inject roles into it.** If a structural role above is missing (e.g. no coordinator, or ≥4 roles with no middle manager), in confirm mode note the gap in the Step 5 plan as a one-line suggestion ("Suggestion: add a coordinator — none in your list; reply 'add it' or 'go' to keep as-is"); in auto mode, create exactly the roles listed.
77
-
78
- **Step 2.2 — Detect the org's domain.** From the goal/prompt, classify the org's domain in one or two words (e.g. `software-engineering`, `content-marketing`, `sports-analytics`, `legal`, `medical`, `finance`). This drives agent-type resolution below.
79
-
80
- > ⚠ **Check Step 2.3 (Persona / Character Detection) BEFORE resolving agent types.** If the org is persona-based (roles are named real people, celebrities, or fictional characters), skip the roster below for those roles and follow Step 2.3 instead.
81
-
82
- **Step 2.4 — Resolve each role's `agent_type` (domain-fit first).**
83
-
84
- The premade roster below is a set of **candidates, not defaults**. Every premade agent is domain-scoped — `reviewer` reviews *code*, `tester` tests *software*, `Content Creator` writes *marketing content*. A keyword match alone is never enough to use one; the agent's domain must also match the role's actual job in this org.
85
-
86
- | Premade agent slug | Its domain | Candidate for role keywords |
87
- |---|---|---|
88
- | `coordinator` | any (domain-neutral orchestration) | boss / ceo / director / lead / chief |
89
- | `Project Shepherd` | any (domain-neutral coordination) | middle manager / manager |
90
- | `researcher` | general research | researcher (broad research roles only) |
91
- | `coder` | software | engineer / developer / coder / dev |
92
- | `reviewer` | software — code review | code reviewer |
93
- | `tester` | software — QA/testing | qa / tester (of software) |
94
- | `Content Creator` | content/marketing | content writer / copywriter |
95
- | `Growth Hacker` | marketing | marketer / growth |
96
- | `SEO Specialist` | search marketing | seo / search |
97
- | `Social Media Strategist` | social marketing | social media / social |
98
- | `Product Manager` | product/software | product / product manager |
99
- | `Monodesign` | design/UI/brand | designer / ui / ux / visual |
100
-
101
- **Resolution procedure — apply to each role in order:**
102
-
103
- 1. **Persona role** (Step 2.3) → coin the character slug; skip the roster.
104
- 2. Find a roster candidate by role keyword.
105
- 3. **Domain-fit gate:** accept the candidate ONLY if its domain column matches what this role actually does in *this org's* domain (Step 2.2). A "reviewer" in a football-analysis org reviews match analyses, not code — `reviewer` fails the gate. An "analyst" there analyzes matches, not general research — `researcher` fails too. When in doubt, the gate fails.
106
- 4. **Gate passed, generic role** → reuse the premade slug as-is.
107
- 5. **Gate passed, use-case-specific role** (e.g. a content writer for a niche audience) → still reuse the premade slug; put the specialization into the role's `responsibilities` and the org goal (runorg passes both to the agent). Do not fork the definition for mere topical focus.
108
- 6. **No candidate, or gate failed** → coin a role-specific slug from the role title (`Football Analyst` → `football-analyst`, `Court Reporter` → `court-reporter`, `Churn Analyst` → `churn-analyst`, devbot `Orchestrator` → `devbot-orchestrator`) and fully generate its definition in Step 2.5 — skills, instructions, and I/O contracts all authored for this role in this org's domain. If a rejected candidate was structurally close, its definition may seed the *shape* of the generated one, but every line must be rewritten for the actual domain.
109
- 7. `general-purpose` is a last resort, only when no sensible slug applies. Never map an editor/content-reviewer role to `reviewer` — that agent is code review; coin `content-editor` (or similar) and generate.
110
-
111
- **A coined slug + generated definition always beats a premade agent whose system prompt describes a different job.** runorg and the dashboard load whatever definition matches `agent_type` — a football org whose analyst is `researcher` or whose reviewer is `reviewer` gets the wrong instructions at run time. That is a bug, not a fallback.
112
-
113
- ---
114
-
115
- ## Step 2.3 — Persona / Character Detection (run BEFORE the Step 2.4 resolution above)
116
-
117
- **Before resolving agent types via Step 2.4, detect whether this org is persona-based:**
118
-
119
- A role is **persona-based** if its title is:
120
- - A named real person (e.g. "Donald Trump", "Elon Musk", "Steve Jobs")
121
- - A well-known fictional character (e.g. "Sherlock Holmes", "Tony Stark")
122
- - A celebrity, historical figure, or public persona referred to by name
123
-
124
- An org is **persona-based** if ≥ 50% of its roles are character names, OR the goal/prompt contains keywords like: `panel`, `debate`, `simulation`, `roleplay`, `celebrity`, `character`, `virtual [name]`, `impersonate`, `as [name]`.
125
-
126
- **If persona-based:**
127
-
128
- 1. **Ignore the premade roster entirely for these roles.** Do NOT map "Donald Trump" → `coder`, "Elon Musk" → `researcher`, etc.
129
-
130
- 2. **Coin a character-specific `agent_type` slug** from the character's name:
131
- - `Donald Trump` → `donald-trump`
132
- - `Sherlock Holmes` → `sherlock-holmes`
133
- - `Steve Jobs` → `steve-jobs`
134
-
135
- 3. **Derive skills and expertise from what is publicly known about that person**, not from generic software roles. Use your knowledge of the person's career, public persona, communication style, known positions, and characteristic behaviors. For example:
136
- - Donald Trump: negotiation, real-estate dealmaking, brand promotion, confrontational rhetoric, media manipulation, self-promotion, political populism
137
- - Elon Musk: first-principles engineering, disruptive product vision, risk-taking, rapid iteration, social media provocation, space/EV technology
138
- - A fictional detective: deductive reasoning, observation, criminal psychology, pattern recognition
139
-
140
- 4. **The generated agent definition** (written in Step 2.5) must read as that character — their voice, stance, known views, communication style. It is a character simulation, not a generic role.
141
-
142
- 5. **Non-character roles in the same org** (e.g. "Moderator", "Audience") go through the normal Step 2.4 resolution (roster + domain-fit gate, or a role-coined slug).
143
-
144
- **If NOT persona-based:** proceed normally with Step 2.4.
145
-
146
- ---
147
-
148
- ## Step 2.5 — Complete Every Agent's Specification (generate what's missing)
149
-
150
- **This is the step that makes each created agent actually work.** A role is only usable if it has: skills, an instruction document (system prompt), an input contract, and an output contract. Most of these are missing from a bare role description — **generate them, tailored to the specific agent, rather than leaving them blank.**
151
-
152
- **For persona/character roles** (identified in Step 2.3): the generated definition must embody the character. The system prompt should open with "You are [Character Name]" and describe their personality, known views, communication style, and behavioral quirks drawn from public knowledge. Skills must reflect their real-world expertise and traits, not generic software capabilities. If the character is a living public figure, base the portrayal on documented public behavior and statements — do not invent positions they haven't taken.
153
-
154
- For **each** role, do the following:
155
-
156
- **1. Check whether a usable agent definition already exists.**
157
- ```bash
158
- # Match by frontmatter `name:` first, then by filename slug, anywhere under .claude/agents
159
- at="<agent_type>"
160
- existing=$(grep -rils "^name:[[:space:]]*${at}\$" .claude/agents 2>/dev/null | head -1)
161
- [ -z "$existing" ] && existing=$(find .claude/agents -iname "${at}.md" 2>/dev/null | head -1)
162
- ```
163
- A definition is **usable** only if it exists AND it passed the Step 2.4 domain-fit gate (its instructions describe this role's actual job in this org's domain). A curated def about a different domain (e.g. `reviewer.md` = code review, applied to a "Court Reporter" or "Match Reviewer") does **not** count as usable — treat it as missing, coin a role-specific `agent_type` per Step 2.4 rule 6, and generate.
164
-
165
- **2. If no usable definition exists, generate one** at `.claude/agents/generated/<agent_type>.md`. Author it specifically for this role and this org's goal — never a generic stub. Use this shape:
166
-
167
- ```markdown
168
- ---
169
- name: <agent_type>
170
- description: <one line — who this agent is and what it does>
171
- capability:
172
- role: <agent_type>
173
- goal: <one sentence: the agent's standing objective in this org>
174
- version: "1.0.0"
175
- expertise: # 4–6 concrete SKILLS this role needs to do its job well
176
- - <skill>
177
- - <skill>
178
- task_types: # 3–5 kinds of work it performs
179
- - <task-type>
180
- input_type: <what this agent consumes — who/what it receives, derived from its inbound communication edges + responsibilities>
181
- output_type: <what this agent produces — the artifact it hands off or reports, derived from its outbound edges + responsibilities>
182
- model_preference: sonnet
183
- termination: <the condition under which this agent's job is done>
184
- ---
185
-
186
- # <Role Title>
187
-
188
- <1–2 sentences: the agent's identity and stance.>
189
-
190
- ## Core Responsibilities
191
- <the role's responsibilities, expanded into numbered, actionable duties>
192
-
193
- ## Operating Guidelines
194
- <3–6 concrete rules that keep this agent doing the right thing for its domain — what to always do, what never to do, how to handle missing inputs>
195
-
196
- ## Communication
197
- - **Receives (input)**: <sources + what, from the inbound edges in Step 3>
198
- - **Sends (output)**: <targets + what, from the outbound edges in Step 3>
199
- - **Protocol**: <direct / via manager; who it reports to>
200
-
201
- ## Quality Bar
202
- <one sentence defining "good output" for this role, so the agent can self-check>
203
- ```
204
-
205
- Generate this content with real domain reasoning — the `expertise`, `input_type`, `output_type`, and instruction body must be specific to *this* agent (a prosecutor's skills are not a judge's). Reuse a generated def across roles of the same `agent_type` (don't regenerate if you just created it this run).
206
-
207
- **3. Populate the org role.** Set the role's `skills` array to the def's `expertise` list (so the org config is self-describing), and keep `agent_type` pointing at the (possibly newly coined) type. Never leave `skills: []` when expertise was generated.
208
-
209
- **4. Note generated files** for the Step 8 artifacts list.
210
-
211
- The dashboard agent drawer and `runorg` both read these definitions (matched by `agent_type`), so generating them here is what makes the Roles/Skills/instructions show up *and* what gives each spawned agent its real instructions at run time.
212
-
213
- ---
214
-
215
- ## Step 2.6 — COMPLETENESS GATE (BLOCKING — do not proceed to Step 3 until all checks pass)
216
-
217
- This gate prevents saving an org where the dashboard will show "No instruction document" or blank skills. **Run these checks now — one Bash call per role:**
218
-
219
- **Check 0 — domain fit (judgment, per role using a premade slug):** for every role whose `agent_type` comes from the Step 2.4 roster, re-confirm the gate: the premade agent's definition describes this role's actual job in *this org's* domain. If not, go back to Step 2.4 rule 6 — coin a slug and generate. An org outside the roster's domains (sports, legal, medical, etc.) should have **zero domain-scoped** roster slugs (`coder`, `reviewer`, `tester`, `researcher`, etc.); domain-neutral slugs (`coordinator`, `Project Shepherd`) and roles whose *function itself* matches a premade (e.g. a content writer publishing that org's output → `Content Creator`, per rule 5) remain valid reuses.
220
-
221
- For each role in the org:
222
-
223
- ```bash
224
- # Check 1 — agent_type is set
225
- role_id="<role_id>"
226
- agent_type="<agent_type>"
227
- [ -z "$agent_type" ] && echo "FAIL: role '$role_id' has no agent_type" && exit 1
228
-
229
- # Check 2 — definition file exists on disk
230
- def_file=".claude/agents/generated/${agent_type}.md"
231
- # Also check non-generated paths
232
- fallback=$(find .claude/agents -iname "${agent_type}.md" 2>/dev/null | head -1)
233
- if [ ! -f "$def_file" ] && [ -z "$fallback" ]; then
234
- echo "FAIL: no agent definition file for '$agent_type' — generate it now before continuing"
235
- exit 1
236
- fi
237
- echo "OK: $role_id → $agent_type ✓"
238
- ```
239
-
240
- If any check fails: go back to Step 2.5 and generate the missing file before proceeding. Do not skip this check.
241
-
242
- **Also verify the `skills` array for each role is non-empty (≥3 items).** If `skills: []` for any role, pull the expertise from the generated definition file and populate it now.
243
-
244
- ---
245
-
246
- ## Step 3 — Suggest Communication Topology
247
-
248
- Determine topology from team size:
249
- - 1–3 roles → `mesh` (all communicate directly)
250
- - 4–6 roles → `star` (boss at center, all report to boss)
251
- - 7+ roles → `hierarchical` (boss → middle manager(s) → executors)
252
-
253
- Build directed communication edges:
254
-
255
- **Communication edge types:**
256
- - `command`: top-down direction of work
257
- - `report`: bottom-up status / output delivery
258
- - `feedback`: peer review or critique
259
- - `handoff`: one role passes output directly to next role in sequence
260
-
261
- **Default edges for a 6-role org (boss, content writer, content reviewer, marketer, designer, middle manager):**
262
- ```
263
- boss → middle_manager (command)
264
- middle_manager → content_writer (command)
265
- middle_manager → designer (command)
266
- middle_manager → marketer (command)
267
- content_writer → content_reviewer (handoff)
268
- content_reviewer → middle_manager (report)
269
- designer → middle_manager (report)
270
- marketer → middle_manager (report)
271
- middle_manager → boss (report)
272
- boss → middle_manager (feedback)
273
- ```
274
-
275
- Adjust for the actual roles in this run. Assign `reports_to` on each role using the derived topology.
276
-
277
- **Completeness rules (every role must be properly wired — no orphans):**
278
- - Every executor role has **≥1 inbound edge** (how work reaches it — usually a `command`) and **≥1 outbound edge** (how its output leaves — usually a `report` or `handoff`).
279
- - Where one role's output is another's input, connect them with a `handoff` in that direction (e.g. clerk → counsel; writer → editor). Make sequential producer→consumer chains explicit.
280
- - The coordinator/boss has an inbound `report` from each role it commands, so results flow back up.
281
- - Peer roles that critique each other get `feedback` edges; adversarial pairs (e.g. prosecutor ↔ defender) get reciprocal `handoff` edges.
282
- - After building edges, **derive each role's input/output contract from them**: a role's `input_type` summarizes who/what its inbound edges deliver; its `output_type` summarizes what its outbound edges carry. Feed these into the generated definition from Step 2.5 so the spec and the topology agree.
283
-
284
- A role that ends up with no inbound or no outbound edge is a bug — re-examine the topology before saving.
285
-
286
- ---
287
-
288
- ## Step 3.5 — TOPOLOGY VALIDATION GATE (BLOCKING — do not proceed to Step 4 until all checks pass)
289
-
290
- Build the communication array now, then validate it with these checks:
291
-
292
- ```bash
293
- # Check 1 — at least one edge exists
294
- edges='<communication_json_array>'
295
- edge_count=$(echo "$edges" | jq 'length')
296
- [ "$edge_count" -eq 0 ] && echo "FAIL: communication array is empty — define edges now" && exit 1
297
-
298
- # Check 2 — every role has at least one inbound OR outbound edge
299
- role_ids=("<id1>" "<id2>" ... ) # all role IDs
300
- for rid in "${role_ids[@]}"; do
301
- has_edge=$(echo "$edges" | jq --arg r "$rid" '[.[] | select(.from==$r or .to==$r)] | length')
302
- [ "$has_edge" -eq 0 ] && echo "FAIL: role '$rid' has no communication edges — it is an orphan" && exit 1
303
- done
304
-
305
- # Check 3 — every non-boss executor role has at least one inbound edge (receives work)
306
- # and at least one outbound edge (delivers output)
307
- echo "OK: topology validated — $edge_count edges, all roles wired"
308
- ```
309
-
310
- If any check fails: go back to Step 3 and add the missing edges. **The `communication` array must be non-empty in the saved JSON** — the dashboard Chart tab draws its arrows from this array; an empty array means a blank chart with isolated nodes and no connection lines.
311
-
312
- ---
313
-
314
- ## Step 4 — Build Org Config
315
-
316
- Produce an org config object using the resolved topology (not hardcoded to `hierarchical`).
317
-
318
- Ask the user (or infer from prompt) for the optional Paperclip-style fields:
319
- - **Budget**: max token budget for this org run (e.g. 500000 tokens). Use `unlimited` if not specified.
320
- - **Governance**: approval policy — `auto` (agents act freely) | `board` (sensitive actions require `/mastermind:approve`) | `strict` (all external actions need approval)
321
- - **Adapter**: which AI model/adapter the CEO agent should use (e.g. `claude-sonnet-4-6`, `claude-opus-4-7`). Default: `claude-sonnet-4-6`.
322
-
323
- ```json
324
- {
325
- "name": "<org_name>",
326
- "goal": "<the goal the org exists to achieve>",
327
- "created_at": "<ISO8601>",
328
- "mode": "daemon",
329
- "topology": "<mesh | star | hierarchical — from Step 3>",
330
- "status": "<'stopped' if --schedule provided; 'active' otherwise>",
331
- "roles": [
332
- {
333
- "id": "<slug>",
334
- "title": "<display title>",
335
- "agent_type": "<subagent_type slug — from Step 2.3 character slug for persona roles, or from the Step 2.4 resolution (reused premade or coined+generated) for functional roles>",
336
- "responsibilities": ["<1-3 bullet responsibilities>"],
337
- "reports_to": "<role id or null>",
338
- "skills": ["<populated from the generated def's expertise in Step 2.5 — never left empty>"],
339
- "adapter_config": {
340
- "model": "<claude model id>",
341
- "max_tokens": 8192
342
- }
343
- }
344
- ],
345
- "communication": [
346
- {
347
- "from": "<role_id>",
348
- "to": "<role_id>",
349
- "type": "command | report | feedback | handoff",
350
- "protocol": "direct"
351
- }
352
- ],
353
- "governance": {
354
- "policy": "auto | board | strict",
355
- "approvals_file": ".monomind/orgs/<org_name>-approvals.json"
356
- },
357
- "board_id": "<uuid — filled in Step 6 after board creation>",
358
- "todo_col_id": "<uuid — filled in Step 6>",
359
- "doing_col_id": "<uuid — filled in Step 6>",
360
- "done_col_id": "<uuid — filled in Step 6>",
361
- "board_space": "<org_name>",
362
- "board_name": "org-tasks",
363
- "run_config": {
364
- "checkpoint_interval_min": 30,
365
- "max_concurrent_agents": 6,
366
- "memory_namespace": "org:<org_name>",
367
- "budget_tokens": "<number or 0 for unlimited>",
368
- "alert_threshold": 0.8,
369
- "ceo_adapter": "<model id>"
370
- },
371
- "loop": "<only included when --schedule was provided; see below>"
372
- }
373
- ```
374
-
375
- **If `--schedule` was provided**, include these two additional top-level fields in the org config:
376
-
377
- ```json
378
- {
379
- "status": "stopped",
380
- "loop": {
381
- "poll_interval_minutes": "<parsed from schedule string>",
382
- "last_run": null,
383
- "next_run": null,
384
- "run_prompt_file": ".monomind/loops/<org_name>.md"
385
- }
386
- }
387
- ```
388
-
389
- `status` starts as `"stopped"`. The org does not run until `/mastermind:runorg --org <org_name>` is called (which transitions it to `"active"`).
390
-
391
- ---
392
-
393
- ## Step 5 — Show Plan and Confirm (confirm mode)
394
-
395
- Render the org plan in a clear human-readable format:
396
-
397
- ```
398
- ╔══════════════════════════════════════════════════╗
399
- ║ ORG: <org_name> ║
400
- ║ GOAL: <goal> ║
401
- ╚══════════════════════════════════════════════════╝
402
-
403
- ROLES (N roles — all must have agent_type + skills before "go")
404
- ─────
405
- • [boss] CEO / Boss
406
- Agent type: coordinator
407
- Skills: strategic oversight, decision-making, org management
408
- Reports to: (none — top of hierarchy)
409
- Responsibilities: Strategic oversight, final approval
410
- Definition file: .claude/agents/coordinator.md ✓
411
-
412
- • [middle_manager] Middle Manager
413
- Agent type: project-shepherd
414
- Skills: sprint planning, cross-team coordination, status tracking
415
- Reports to: boss
416
- Responsibilities: Sprint planning, cross-team coordination
417
- Definition file: .claude/agents/generated/project-shepherd.md ✓
418
-
419
- ... (all roles — each showing agent_type, skills, and definition file status)
420
-
421
- COMMUNICATION TOPOLOGY (N edges — must be non-zero)
422
- ──────────────────────
423
- boss → middle_manager (command)
424
- middle_manager → content_writer (command)
425
- content_writer → content_reviewer (handoff)
426
- content_reviewer → middle_manager (report)
427
- middle_manager → boss (report)
428
- ... (all edges — every role must appear here at least once)
429
-
430
- SETTINGS
431
- ────────
432
- Topology: <derived> | Mode: persistent daemon
433
- Memory: org:<org_name> | Board: <org_name>/org-tasks
434
- Checkpoint every: 30 min | Max agents: 6
435
- Schedule: <"every <poll_interval_minutes> minutes" if --schedule; otherwise "manual (no auto-schedule)">
436
- Status: <"stopped (run /mastermind:runorg --org <org_name> to activate)" if --schedule; otherwise "—">
437
-
438
- Type "go" to save this org, or describe changes.
439
- ```
440
-
441
- In **auto** mode, skip the confirmation prompt.
442
-
443
- If the user requests changes, apply them and re-render. Repeat until confirmed.
444
-
445
- ---
446
-
447
- ## Step 6 — Save Org Config
448
-
449
- Set shell variables from the resolved inputs (use the actual `org_name` value from Step 1 and `session_id` input):
450
-
451
- ```bash
452
- org_name="<resolved org name from Step 1>" # e.g. "content-team"
453
- session_id="<session_id input>" # passed by command wrapper
454
- orgJson=".monomind/orgs/${org_name}.json"
455
- mkdir -p .monomind/orgs
456
- ```
457
-
458
- Write the confirmed org config as JSON using `jq` to guarantee valid encoding:
459
-
460
- ```bash
461
- # Build the config JSON from the confirmed org plan and write atomically.
462
- # Set shell variables from the confirmed plan before running this block:
463
- # governance_policy — "auto" | "board" | "strict" (from Step 4)
464
- # budget_tokens_val — integer or 0 for unlimited (from Step 4)
465
- # ceo_adapter — model id string (from Step 4)
466
- # poll_interval_minutes — integer (from --schedule), or "" if no schedule
467
- jq -n \
468
- --arg name "$org_name" \
469
- --arg goal "$goal" \
470
- --arg topology "$topology" \
471
- --argjson roles "$roles_json" \
472
- --argjson communication "$communication_json" \
473
- --arg gov_policy "${governance_policy:-auto}" \
474
- --argjson budget_tokens "${budget_tokens_val:-0}" \
475
- --arg ceo_adapter "${ceo_adapter:-claude-sonnet-4-6}" \
476
- '{name:$name,goal:$goal,mode:"daemon",topology:$topology,status:"active",
477
- created_at:(now|todate),roles:$roles,communication:$communication,
478
- governance:{policy:$gov_policy,approvals_file:(".monomind/orgs/"+$name+"-approvals.json")},
479
- board_space:$name,board_name:"org-tasks",
480
- run_config:{
481
- checkpoint_interval_min:30,
482
- max_concurrent_agents:6,
483
- memory_namespace:("org:"+$name),
484
- budget_tokens:$budget_tokens,
485
- alert_threshold:0.8,
486
- ceo_adapter:$ceo_adapter
487
- }}' \
488
- > "${orgJson}.tmp" && mv "${orgJson}.tmp" "$orgJson"
489
- ```
490
-
491
- **If `--schedule` was provided**, patch the saved config with `status` and `loop`:
492
-
493
- ```bash
494
- # Only run this block when poll_interval_minutes is set (i.e. --schedule was used)
495
- tmp="${orgJson}.tmp"
496
- jq \
497
- --argjson interval "$poll_interval_minutes" \
498
- --arg run_prompt_file ".monomind/loops/${org_name}.md" \
499
- '. + {
500
- status: "stopped",
501
- loop: {
502
- poll_interval_minutes: $interval,
503
- last_run: null,
504
- next_run: null,
505
- run_prompt_file: $run_prompt_file
506
- }
507
- }' \
508
- "$orgJson" > "$tmp" && mv "$tmp" "$orgJson"
509
- ```
510
-
511
- Create the monotask space, board, and default columns (space is required — abort before creating board if space fails):
512
- ```bash
513
- # Step 1 — Space (required first)
514
- space_id=$(monotask space list 2>/dev/null | awk -F' \| ' -v n="$org_name" '$2==n{print $1}' | head -1)
515
- [ -z "$space_id" ] && space_id=$(monotask space create "$org_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}')
516
- [ -z "$space_id" ] && { echo "ERROR: Could not find or create space '$org_name' — verify monotask is installed (run: monotask --version)"; exit 1; }
517
-
518
- # Step 2 — Board (created only after space is confirmed)
519
- board_id=$(monotask board create "org-tasks" --json | jq -r '.id // empty')
520
- [ -z "$board_id" ] && { echo "ERROR: Failed to create monotask board"; exit 1; }
521
-
522
- # Step 3 — Link board to space immediately
523
- monotask space boards add "$space_id" "$board_id" >/dev/null 2>&1 || true
524
-
525
- # Step 4 — Columns
526
- todo_col_id=$(monotask column create "$board_id" "Todo" --json | jq -r '.id // empty')
527
- doing_col_id=$(monotask column create "$board_id" "Doing" --json | jq -r '.id // empty')
528
- done_col_id=$(monotask column create "$board_id" "Done" --json | jq -r '.id // empty')
529
- [ -z "$todo_col_id" ] && { echo "ERROR: Failed to create 'Todo' column on board $board_id"; exit 1; }
530
- [ -z "$doing_col_id" ] && { echo "ERROR: Failed to create 'Doing' column on board $board_id"; exit 1; }
531
- [ -z "$done_col_id" ] && { echo "ERROR: Failed to create 'Done' column on board $board_id"; exit 1; }
532
- ```
533
-
534
- Patch the saved org config with the board and column IDs:
535
- ```bash
536
- tmp="${orgJson}.tmp"
537
- jq --arg board_id "$board_id" \
538
- --arg todo_col_id "$todo_col_id" \
539
- --arg doing_col_id "$doing_col_id" \
540
- --arg done_col_id "$done_col_id" \
541
- '. + {board_id:$board_id,todo_col_id:$todo_col_id,doing_col_id:$doing_col_id,done_col_id:$done_col_id}' \
542
- "$orgJson" > "$tmp" && mv "$tmp" "$orgJson"
543
- ```
544
-
545
- **POST-SAVE VALIDATION (run immediately after saving — abort if either check fails):**
546
-
547
- ```bash
548
- # Check 1 — communication array is non-empty (dashboard Chart tab requires this for arrows)
549
- comm_count=$(jq '.communication | length' "$orgJson" 2>/dev/null || echo 0)
550
- if [ "$comm_count" -eq 0 ]; then
551
- echo "ERROR: Saved org has empty communication array — dashboard Chart will show isolated nodes with no arrows."
552
- echo "Fix: go back to Step 3 and Step 3.5, define edges, then re-save."
553
- exit 1
554
- fi
555
- echo "✓ Communication: $comm_count edges saved"
556
-
557
- # Check 2 — every role has agent_type set
558
- bad_roles=$(jq -r '.roles[] | select((.agent_type // "") == "") | .id' "$orgJson" 2>/dev/null)
559
- if [ -n "$bad_roles" ]; then
560
- echo "ERROR: These roles have no agent_type — dashboard will show '?' for each:"
561
- echo "$bad_roles"
562
- echo "Fix: go back to Step 2 / Step 2.5 and set agent_type for each role, then re-save."
563
- exit 1
564
- fi
565
- echo "✓ All roles have agent_type set"
566
-
567
- # Check 3 — every role has skills (non-empty array)
568
- empty_skills=$(jq -r '.roles[] | select((.skills // []) | length == 0) | .id' "$orgJson" 2>/dev/null)
569
- if [ -n "$empty_skills" ]; then
570
- echo "WARNING: These roles have empty skills arrays — dashboard Skills tab will show nothing:"
571
- echo "$empty_skills"
572
- echo "Fix: populate skills from each role's generated agent definition."
573
- fi
574
-
575
- echo "✓ Org config validated — org is ready to run"
576
- ```
577
-
578
- ---
579
-
580
- ## Step 6.7 — Generate Loop Prompt File (scheduled orgs only)
581
-
582
- **Skip this step if `--schedule` was NOT provided.**
583
-
584
- If `poll_interval_minutes` is set, generate the self-scheduling loop prompt at `.monomind/loops/<org_name>.md`.
585
-
586
- This file is the single source of truth for one scheduled iteration. It is passed verbatim as the `prompt` argument to `ScheduleWakeup` at the end of every iteration — the loop is self-perpetuating as long as `status == "active"`.
587
-
588
- **Loop prompt structure:**
589
-
590
- The file must follow this exact template (substitute actual values for all `<placeholders>`):
591
-
592
- ````markdown
593
- # <org_name> — Loop Prompt
594
-
595
- **Controlled by:** `.monomind/orgs/<org_name>.json` → `status` field
596
- **Start:** `/mastermind:runorg --org <org_name>` (sets `status: "active"` and runs first iteration)
597
- **Stop:** `/mastermind:stoporg --org <org_name>` (sets `status: "stopped"` — next wakeup exits without rescheduling)
598
- **Pause (HIL):** set `status: "paused"` in `.monomind/orgs/<org_name>.json` — loop keeps waking up but skips work until status returns to `"active"`
599
-
600
- ---
601
-
602
- ## Step 0 — Status Gate (REQUIRED FIRST — do not skip)
603
-
604
- ```bash
605
- ORG_FILE=".monomind/orgs/<org_name>.json"
606
- LOOP_STATUS=$(jq -r '.status // "stopped"' "$ORG_FILE" 2>/dev/null || echo "stopped")
607
- ```
608
-
609
- - If `LOOP_STATUS == "active"` → continue to Step 1.
610
- - If `LOOP_STATUS == "paused"` → print "Org '<org_name>' is paused — skipping iteration. Jump directly to Schedule Next." Do NOT run Steps 1–N.
611
- - If anything else (including `"stopped"`) → print "Org '<org_name>' status is '$LOOP_STATUS' — exiting loop. **Do NOT call ScheduleWakeup.**" and stop.
612
-
613
- ---
614
-
615
- ## Step 1 — Record Iteration Start
616
-
617
- ```bash
618
- ORG_FILE=".monomind/orgs/<org_name>.json"
619
- tmp="${ORG_FILE}.tmp"
620
- jq '.loop.last_run = (now|todate)' "$ORG_FILE" > "$tmp" && mv "$tmp" "$ORG_FILE"
621
- REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
622
- CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
623
- # Unique run ID — used to thread all events in the Chat tab under one session
624
- RUN_ID="run-$(date -u +%Y%m%dT%H%M%S)"
625
- # Capture Claude project dir for per-agent token tracking
626
- CLAUDE_PROJECT_DIR="$HOME/.claude/projects/$(echo "$REPO_ROOT" | tr '/' '-' | sed 's/^-//')"
627
-
628
- # Comm helper — emits org:comms so Chat tab shows agent-to-agent messages
629
- _comm() {
630
- local _from="$1" _to="$2" _msg="$3"
631
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
632
- -H "Content-Type: application/json" \
633
- -d "$(jq -cn \
634
- --arg org "<org_name>" \
635
- --arg runId "$RUN_ID" \
636
- --arg from "$_from" \
637
- --arg to "$_to" \
638
- --arg msg "$_msg" \
639
- '{type:"org:comms",org:$org,runId:$runId,from:$from,to:$to,msg:$msg,ts:(now*1000|floor)}')" || true
640
- }
641
-
642
- # Register this run with the server — creates run file and enables Chat tab dropdown
643
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
644
- -H "Content-Type: application/json" \
645
- -d "$(jq -cn \
646
- --arg org "<org_name>" \
647
- --arg runId "$RUN_ID" \
648
- --arg goal "<goal>" \
649
- '{type:"run:start",org:$org,runId:$runId,goal:$goal,ts:(now*1000|floor)}')" || true
650
- ```
651
-
652
- ---
653
-
654
- ## [Org-specific iteration steps]
655
-
656
- <IMPORTANT: Generate the actual work steps here from the org's goal and roles. These are NOT generic placeholders — write real, actionable steps derived from the org's goal, roles, and communication topology.>
657
-
658
- <For a GitHub issue-resolver org, these would be: find next issue, claim it, implement, test, deploy, report.>
659
- <For a content org, these would be: check content calendar, assign writers, review drafts, publish.>
660
- <Derive from orgConfig.goal and orgConfig.roles[].responsibilities — be specific.>
661
-
662
- **REQUIRED — include these patterns at every agent handoff:**
663
-
664
- 1. **Before spawning each agent**, snapshot the Claude project JSONL files and emit a `_comm` from the dispatching role to the receiving role describing the task:
665
- ```bash
666
- JSONL_SNAP_<N>=$(ls -t "$CLAUDE_PROJECT_DIR"/*.jsonl 2>/dev/null | head -20 | sort)
667
- _comm "<dispatcher-role-id>" "<agent-role-id>" "Task: <what the agent is being asked to do>"
668
- ```
669
-
670
- 2. **After the agent returns**, emit a `_comm` from that agent back to its caller with the result summary, then emit its token usage:
671
- ```bash
672
- JSONL_SNAP_<N+1>=$(ls -t "$CLAUDE_PROJECT_DIR"/*.jsonl 2>/dev/null | head -20 | sort)
673
- NEW_JSONL=$(comm -13 <(echo "$JSONL_SNAP_<N>") <(echo "$JSONL_SNAP_<N+1>") | head -1)
674
- _comm "<agent-role-id>" "<dispatcher-role-id>" "Result: <one-sentence summary of what the agent returned>"
675
- if [ -n "$NEW_JSONL" ] && [ -f "$NEW_JSONL" ]; then
676
- USAGE=$(python3 -c "
677
- import json, sys
678
- tin=tout=0
679
- for l in open(sys.argv[1]):
680
- try:
681
- d=json.loads(l)
682
- u=d.get('message',{}).get('usage',{})
683
- tin+=u.get('input_tokens',0); tout+=u.get('output_tokens',0)
684
- except: pass
685
- cost=tin*3e-6+tout*15e-6
686
- print(json.dumps({'tokens_in':tin,'tokens_out':tout,'cost_usd':round(cost,6)}))
687
- " "$NEW_JSONL" 2>/dev/null || echo '{"tokens_in":0,"tokens_out":0,"cost_usd":0}')
688
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
689
- -H "Content-Type: application/json" \
690
- -d "$(echo "$USAGE" | jq \
691
- --arg org "<org_name>" \
692
- --arg role "<agent-role-id>" \
693
- --arg runId "$RUN_ID" \
694
- '. + {type:"agent:usage",org:$org,role:$role,runId:$runId,ts:(now*1000|floor|tostring|tonumber)}')" || true
695
- fi
696
- ```
697
-
698
- 3. Use the actual content from the agent's return value in the `_comm` `msg` field — not a generic placeholder. The Chat tab shows this text verbatim.
699
-
700
- 4. At cycle end (before Schedule Next), emit the completion comms and event:
701
- ```bash
702
- _comm "<boss-role-id>" "sys" "Cycle complete: <one-line summary of what was accomplished>"
703
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
704
- -H "Content-Type: application/json" \
705
- -d "$(jq -cn \
706
- --arg org "<org_name>" \
707
- --arg runId "$RUN_ID" \
708
- '{type:"org:cycle:complete",org:$org,runId:$runId,ts:(now*1000|floor)}')" || true
709
- ```
710
-
711
- ---
712
-
713
- ## Schedule Next (ONLY if status is active or paused)
714
-
715
- Re-check org status before rescheduling:
716
-
717
- ```bash
718
- ORG_FILE=".monomind/orgs/<org_name>.json"
719
- LOOP_STATUS=$(jq -r '.status // "stopped"' "$ORG_FILE" 2>/dev/null || echo "stopped")
720
- ```
721
-
722
- If `LOOP_STATUS == "active"` or `LOOP_STATUS == "paused"`:
723
-
724
- 1. Read this loop prompt file verbatim:
725
- ```bash
726
- LOOP_PROMPT=$(cat .monomind/loops/<org_name>.md)
727
- ```
728
-
729
- 2. Call `ScheduleWakeup` with:
730
- - `delaySeconds`: `<poll_interval_minutes * 60>`
731
- - `reason`: `"<org_name>: next scheduled poll (every <poll_interval_minutes> min)"`
732
- - `prompt`: the full contents of `$LOOP_PROMPT`
733
-
734
- 3. Update `next_run` in the org JSON:
735
- ```bash
736
- ORG_FILE=".monomind/orgs/<org_name>.json"
737
- tmp="${ORG_FILE}.tmp"
738
- next_ts=$(( $(date +%s) + <poll_interval_minutes * 60> ))
739
- next_iso=$(date -u -r "$next_ts" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \
740
- || date -u -d "@$next_ts" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null \
741
- || python3 -c "import datetime; print(datetime.datetime.utcfromtimestamp($next_ts).strftime('%Y-%m-%dT%H:%M:%SZ'))")
742
- jq --arg next "$next_iso" '.loop.next_run = $next' "$ORG_FILE" > "$tmp" && mv "$tmp" "$ORG_FILE"
743
- ```
744
-
745
- 4. Emit `org:loop:scheduled` event:
746
- ```bash
747
- REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
748
- CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
749
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
750
- -H "Content-Type: application/json" \
751
- -d "$(jq -cn --arg org "<org_name>" --arg next "$next_iso" --arg proj "$REPO_ROOT" \
752
- '{type:"org:loop:scheduled",org:$org,next_run:$next,project:$proj,ts:(now*1000|floor)}')" || true
753
- ```
754
-
755
- If `LOOP_STATUS` is anything else (e.g. `"stopped"`) → print "Org '<org_name>' loop ended — not rescheduling." and exit.
756
- ````
757
-
758
- **Before writing: substitute ALL `<org_name>` tokens with the actual resolved org name string (the value from Step 1, e.g. `research-pod`), and all `<poll_interval_minutes>` tokens with the numeric value. These are template placeholders — the written file must contain no angle-bracket tokens. Every `ORG_FILE=".monomind/orgs/<org_name>.json"` becomes `ORG_FILE=".monomind/orgs/research-pod.json"`, every `cat .monomind/loops/<org_name>.md` becomes `cat .monomind/loops/research-pod.md`, etc. Leaving any `<...>` token unexpanded will cause shell failures at loop execution time.**
759
-
760
- **Write this file to disk:**
761
-
762
- ```bash
763
- mkdir -p .monomind/loops
764
- # Write the generated loop prompt (with all placeholders substituted)
765
- # to .monomind/loops/<org_name>.md (← substitute this path too)
766
- ```
767
-
768
- Use the Write tool (not Bash echo/cat) to write the file so the content is verbatim.
769
-
770
- The org-specific iteration steps (the block between Step 1 and "Schedule Next") must be **generated from the actual org** — goal, roles, responsibilities — not left as generic placeholders.
771
-
772
- ---
773
-
774
- ## Step 7 — Emit Dashboard Events
775
-
776
- Read values from the saved JSON file and emit two events: `domain:complete` (for the session stream) and `org:create` (so the dashboard Orgs panel registers the new org immediately):
777
-
778
- ```bash
779
- REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
780
- CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
781
- orgName=$(jq -r '.name' "$orgJson")
782
- goal_val=$(jq -r '.goal' "$orgJson")
783
- rolesCount=$(jq '.roles | length // 0' "$orgJson")
784
-
785
- # domain:complete — for session correlation
786
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
787
- -H "Content-Type: application/json" \
788
- -d "$(jq -cn \
789
- --arg session "$session_id" \
790
- --arg orgName "$orgName" \
791
- --arg goal "$goal_val" \
792
- --argjson rolesCount "$rolesCount" \
793
- '{type:"domain:complete",session:$session,domain:"ops",status:"complete",
794
- org:$orgName,goal:$goal,roles_count:$rolesCount,ts:(now*1000|floor)}')" || true
795
-
796
- # org:create — so handleOrgEvent routes it to the Orgs panel event log and SSE triggers list refresh
797
- curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
798
- -H "Content-Type: application/json" \
799
- -d "$(jq -cn \
800
- --arg session "$session_id" \
801
- --arg org "$orgName" \
802
- --arg goal "$goal_val" \
803
- --arg proj "$(pwd)" \
804
- '{type:"org:create",session:$session,org:$org,goal:$goal,project:$proj,ts:(now*1000|floor)}')" || true
805
- ```
806
-
807
- ---
808
-
809
- ## Step 8 — Return Output
810
-
811
- ```yaml
812
- domain: ops
813
- status: complete
814
- artifacts:
815
- - path: .monomind/orgs/<org_name>.json
816
- type: config
817
- - path: .claude/agents/generated/<agent_type>.md
818
- type: agent-definition
819
- note: "one per role whose agent_type lacked a usable definition (skills, instructions, input/output)"
820
- - path: .monomind/loops/<org_name>.md
821
- type: loop-prompt
822
- note: "only present when --schedule was used; omit otherwise"
823
- decisions:
824
- - what: "Org <org_name> created with N roles"
825
- why: "Role mapping derived from goal and user description"
826
- confidence: 0.85
827
- outcome: shipped
828
- lessons:
829
- - what_worked: "Auto-suggested roles matched user intent"
830
- - what_didnt: ""
831
- next_actions:
832
- - "Run /mastermind:runorg --org <org_name> to start the organization"
833
- - "Edit .monomind/orgs/<org_name>.json to customize roles or communication"
834
- - "[scheduled orgs only] Run /mastermind:stoporg --org <org_name> to stop the loop"
835
- - "[scheduled orgs only] Run /mastermind:orgs to see all org statuses"
836
- board_url: "monotask://<org_name>/org-tasks"
837
- run_id: "<current UTC datetime as ISO8601, e.g. via $(date -u +%Y-%m-%dT%H:%M:%SZ)>"
838
- ```
839
-
840
- Print confirmation:
841
- ```
842
- ✓ Org "<org_name>" saved to .monomind/orgs/<org_name>.json
843
- → Run: /mastermind:runorg --org <org_name>
844
- ```
845
-
846
- If `--schedule` was provided, also print:
847
- ```
848
- ✓ Loop prompt saved to .monomind/loops/<org_name>.md
849
- Schedule: every <poll_interval_minutes> minutes
850
- Status: stopped (org will not run until /mastermind:runorg --org <org_name>)
851
-
852
- Lifecycle:
853
- Start: /mastermind:runorg --org <org_name>
854
- Stop: /mastermind:stoporg --org <org_name>
855
- List: /mastermind:orgs
856
- ```
857
-
858
- ---
859
-
860
- ## Step 9 — Brain Write (standalone only)
861
-
862
- If `caller` is not "command", follow _protocol.md Brain Write Procedure for domain `ops`.