@monoes/monomindcli 2.9.4 → 2.9.5

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 (173) hide show
  1. package/.claude/commands/mastermind/approvev1.md +94 -0
  2. package/.claude/commands/mastermind/architect.md +52 -0
  3. package/.claude/commands/mastermind/autodev.md +28 -0
  4. package/.claude/commands/mastermind/build.md +23 -0
  5. package/.claude/commands/mastermind/finish.md +17 -0
  6. package/.claude/commands/mastermind/runorgv1.md +159 -0
  7. package/.claude/commands/mastermind/taskdev.md +23 -0
  8. package/.claude/commands/mastermind/tdd.md +19 -0
  9. package/.claude/commands/mastermind/verify.md +19 -0
  10. package/.claude/helpers/intelligence.cjs +6 -27
  11. package/.claude/skills/agentic-jujutsu/SKILL.md +15 -17
  12. package/.claude/skills/hive-mind-advanced/SKILL.md +559 -212
  13. package/.claude/skills/hooks-automation/SKILL.md +1 -1
  14. package/.claude/skills/mastermind-approvev1/SKILL.md +191 -0
  15. package/.claude/skills/mastermind-architect/SKILL.md +862 -0
  16. package/.claude/skills/mastermind-autodev/SKILL.md +360 -0
  17. package/.claude/skills/mastermind-build/SKILL.md +169 -0
  18. package/.claude/skills/mastermind-companies/SKILL.md +256 -0
  19. package/.claude/skills/mastermind-content/SKILL.md +197 -0
  20. package/.claude/skills/mastermind-costs/SKILL.md +151 -0
  21. package/.claude/skills/mastermind-finance/SKILL.md +166 -0
  22. package/.claude/skills/mastermind-finish/SKILL.md +251 -0
  23. package/.claude/skills/mastermind-heartbeatv1/SKILL.md +167 -0
  24. package/.claude/skills/mastermind-instance-settings/SKILL.md +315 -0
  25. package/.claude/skills/mastermind-marketing/SKILL.md +228 -0
  26. package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +181 -0
  27. package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +158 -0
  28. package/.claude/skills/mastermind-ops/SKILL.md +168 -0
  29. package/.claude/skills/mastermind-org-chart/SKILL.md +209 -0
  30. package/.claude/skills/mastermind-project-detail/SKILL.md +249 -0
  31. package/.claude/skills/mastermind-project-workspace/SKILL.md +244 -0
  32. package/.claude/skills/mastermind-projects/SKILL.md +167 -0
  33. package/.claude/skills/mastermind-runorgv1/SKILL.md +731 -0
  34. package/.claude/skills/mastermind-sales/SKILL.md +170 -0
  35. package/.claude/skills/mastermind-taskdev/SKILL.md +377 -0
  36. package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +60 -0
  37. package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +144 -0
  38. package/.claude/skills/mastermind-taskdev/implementer-prompt.md +114 -0
  39. package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +80 -0
  40. package/.claude/skills/mastermind-tdd/SKILL.md +424 -0
  41. package/.claude/skills/mastermind-verify/SKILL.md +196 -0
  42. package/.claude/skills/mastermind-wiki/SKILL.md +314 -0
  43. package/.claude/skills/monolean-review/SKILL.md +57 -0
  44. package/.claude/skills/pair-programming/SKILL.md +1 -1
  45. package/.claude/skills/performance-analysis/SKILL.md +484 -228
  46. package/.claude/skills/swarm-advanced/SKILL.md +2 -2
  47. package/.claude/skills/swarm-orchestration/SKILL.md +150 -220
  48. package/.claude/skills/verification-quality/SKILL.md +571 -247
  49. package/README.md +3 -3
  50. package/dist/src/commands/agent-lifecycle.js +3 -3
  51. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  52. package/dist/src/commands/autopilot.d.ts.map +1 -1
  53. package/dist/src/commands/autopilot.js +1 -7
  54. package/dist/src/commands/autopilot.js.map +1 -1
  55. package/dist/src/commands/doc.d.ts.map +1 -1
  56. package/dist/src/commands/doc.js +3 -14
  57. package/dist/src/commands/doc.js.map +1 -1
  58. package/dist/src/commands/doctor-env-checks.d.ts +1 -1
  59. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
  60. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  61. package/dist/src/commands/doctor-project-checks.js +20 -3
  62. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  63. package/dist/src/commands/doctor.d.ts.map +1 -1
  64. package/dist/src/commands/doctor.js +1 -30
  65. package/dist/src/commands/doctor.js.map +1 -1
  66. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  67. package/dist/src/commands/hooks-coverage-commands.js +67 -75
  68. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  69. package/dist/src/commands/hooks-workers.d.ts.map +1 -1
  70. package/dist/src/commands/hooks-workers.js +10 -41
  71. package/dist/src/commands/hooks-workers.js.map +1 -1
  72. package/dist/src/commands/hooks.js +1 -1
  73. package/dist/src/commands/init.d.ts.map +1 -1
  74. package/dist/src/commands/init.js +7 -80
  75. package/dist/src/commands/init.js.map +1 -1
  76. package/dist/src/commands/mcp.d.ts.map +1 -1
  77. package/dist/src/commands/mcp.js +2 -78
  78. package/dist/src/commands/mcp.js.map +1 -1
  79. package/dist/src/commands/org.d.ts.map +1 -1
  80. package/dist/src/commands/org.js +3 -116
  81. package/dist/src/commands/org.js.map +1 -1
  82. package/dist/src/commands/performance.js +1 -1
  83. package/dist/src/commands/performance.js.map +1 -1
  84. package/dist/src/commands/security-cve.d.ts.map +1 -1
  85. package/dist/src/commands/security-cve.js +11 -1
  86. package/dist/src/commands/security-cve.js.map +1 -1
  87. package/dist/src/commands/security-misc.d.ts +9 -0
  88. package/dist/src/commands/security-misc.d.ts.map +1 -1
  89. package/dist/src/commands/security-misc.js +54 -33
  90. package/dist/src/commands/security-misc.js.map +1 -1
  91. package/dist/src/commands/security-scan.d.ts.map +1 -1
  92. package/dist/src/commands/security-scan.js +11 -3
  93. package/dist/src/commands/security-scan.js.map +1 -1
  94. package/dist/src/commands/swarm.d.ts.map +1 -1
  95. package/dist/src/commands/swarm.js +2 -7
  96. package/dist/src/commands/swarm.js.map +1 -1
  97. package/dist/src/init/claudemd-generator.js +1 -1
  98. package/dist/src/init/executor.d.ts.map +1 -1
  99. package/dist/src/init/executor.js +3 -13
  100. package/dist/src/init/executor.js.map +1 -1
  101. package/dist/src/init/kimi-generator.d.ts +2 -3
  102. package/dist/src/init/kimi-generator.d.ts.map +1 -1
  103. package/dist/src/init/kimi-generator.js +13 -45
  104. package/dist/src/init/kimi-generator.js.map +1 -1
  105. package/dist/src/init/statusline-generator.d.ts +1 -1
  106. package/dist/src/init/statusline-generator.js +1 -1
  107. package/dist/src/mcp-tools/embeddings-tools.js +2 -2
  108. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  109. package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
  110. package/dist/src/mcp-tools/hooks-intelligence.js +3 -29
  111. package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
  112. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  113. package/dist/src/mcp-tools/hooks-routing.js +19 -32
  114. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  115. package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
  116. package/dist/src/mcp-tools/monograph/query-tools.js +18 -48
  117. package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
  118. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  119. package/dist/src/mcp-tools/performance-tools.js +10 -15
  120. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  121. package/dist/src/memory/embedding-operations.d.ts +0 -4
  122. package/dist/src/memory/embedding-operations.d.ts.map +1 -1
  123. package/dist/src/memory/embedding-operations.js +32 -125
  124. package/dist/src/memory/embedding-operations.js.map +1 -1
  125. package/dist/src/memory/hnsw-operations.d.ts +1 -1
  126. package/dist/src/memory/hnsw-operations.js +1 -1
  127. package/dist/src/memory/memory-read.d.ts +1 -1
  128. package/dist/src/memory/memory-read.js +2 -2
  129. package/dist/src/memory/memory-read.js.map +1 -1
  130. package/dist/src/monovector/diff-classifier.js +3 -3
  131. package/dist/src/monovector/diff-classifier.js.map +1 -1
  132. package/dist/src/orgrt/checkpoint-ops.d.ts +1 -11
  133. package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
  134. package/dist/src/orgrt/checkpoint-ops.js +1 -15
  135. package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
  136. package/dist/src/orgrt/checkpoint.js +1 -1
  137. package/dist/src/orgrt/checkpoint.js.map +1 -1
  138. package/dist/src/orgrt/daemon.d.ts +0 -6
  139. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  140. package/dist/src/orgrt/daemon.js +0 -26
  141. package/dist/src/orgrt/daemon.js.map +1 -1
  142. package/dist/src/orgrt/decisions.d.ts +0 -13
  143. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  144. package/dist/src/orgrt/decisions.js +0 -95
  145. package/dist/src/orgrt/decisions.js.map +1 -1
  146. package/dist/src/orgrt/kimicode-runner.js +1 -1
  147. package/dist/src/orgrt/kimicode-runner.js.map +1 -1
  148. package/dist/src/orgrt/opencode-runner.js +1 -1
  149. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  150. package/dist/src/orgrt/session.d.ts +1 -27
  151. package/dist/src/orgrt/session.d.ts.map +1 -1
  152. package/dist/src/orgrt/session.js +3 -42
  153. package/dist/src/orgrt/session.js.map +1 -1
  154. package/dist/src/orgrt/task-dag.d.ts +1 -11
  155. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  156. package/dist/src/orgrt/task-dag.js +2 -93
  157. package/dist/src/orgrt/task-dag.js.map +1 -1
  158. package/dist/src/orgrt/templates.d.ts.map +1 -1
  159. package/dist/src/orgrt/templates.js +0 -24
  160. package/dist/src/orgrt/templates.js.map +1 -1
  161. package/dist/src/orgrt/types.d.ts +1 -70
  162. package/dist/src/orgrt/types.d.ts.map +1 -1
  163. package/dist/src/orgrt/types.js +0 -19
  164. package/dist/src/orgrt/types.js.map +1 -1
  165. package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
  166. package/dist/src/orgrt/vercel-providers.js +4 -9
  167. package/dist/src/orgrt/vercel-providers.js.map +1 -1
  168. package/dist/src/orgrt/vercel-runner.d.ts +23 -0
  169. package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
  170. package/dist/src/orgrt/vercel-runner.js +1 -26
  171. package/dist/src/orgrt/vercel-runner.js.map +1 -1
  172. package/dist/tsconfig.tsbuildinfo +1 -1
  173. package/package.json +5 -5
@@ -6,342 +6,689 @@ description: |
6
6
 
7
7
  # Hive Mind Advanced Skill
8
8
 
9
- Queen-led multi-agent coordination with shared JSON state, threshold-based voting, and a collective memory blob. Use when a task needs a declared coordinator (queen) plus N workers who must reach a documented decision before proceeding.
9
+ Master the advanced Hive Mind collective intelligence system for sophisticated multi-agent coordination using queen-led architecture, Byzantine consensus, and collective memory.
10
10
 
11
- ## What Hive-Mind Is — and Is Not
11
+ ## Overview
12
12
 
13
- **Is:** An MCP-only surface that tracks queen + workers, proposals/votes, and a shared key/value blob in a single JSON state file at `.monomind/hive-mind/state.json`. Real execution happens in Claude Code Task-tool agents; the hive only records bookkeeping.
13
+ The Hive Mind system represents the pinnacle of multi-agent coordination in Monomind, implementing a queen-led hierarchical architecture where a strategic queen coordinator directs specialized worker agents through collective decision-making and shared memory.
14
14
 
15
- **Is not:** A distributed system. The consensus strategies (`bft` / `raft` / `quorum`) are **vote-count thresholds applied to one in-process tally** — not Raft leader election, not Byzantine agreement, not Paxos. There is no log replication, no network model, no adversarial fault model. The strategy names are kept for CLI/API compatibility; see the honesty note in `packages/@monomind/cli/src/mcp-tools/hive-mind-tools.ts:2-12`.
15
+ ## Core Concepts
16
16
 
17
- If you need to actually coordinate work in parallel, use `monomind swarm` (real CLI) — see "Swarm vs Hive-Mind" below.
17
+ ### Architecture Patterns
18
18
 
19
- ## Visibility Requires `MONOMIND_MCP_SPECULATIVE=1`
19
+ **Queen-Led Coordination**
20
+ - Strategic queen agents orchestrate high-level objectives
21
+ - Tactical queens manage mid-level execution
22
+ - Adaptive queens dynamically adjust strategies based on performance
20
23
 
21
- Only two hive-mind tools are visible to MCP clients by default: `hive-mind_status` and `hive-mind_join`. To see and call the full surface (`init`, `spawn`, `consensus`, `memory`, `broadcast`, `shutdown`, `audit_*`), the MCP server must run with:
24
+ **Worker Specialization**
25
+ - Researcher agents: Analysis and investigation
26
+ - Coder agents: Implementation and development
27
+ - Analyst agents: Data processing and metrics
28
+ - Tester agents: Quality assurance and validation
29
+ - Architect agents: System design and planning
30
+ - Reviewer agents: Code review and improvement
31
+ - Optimizer agents: Performance enhancement
32
+ - Documenter agents: Documentation generation
22
33
 
23
- ```bash
24
- MONOMIND_MCP_SPECULATIVE=1
25
- ```
34
+ **Collective Memory System**
35
+ - Shared knowledge base across all agents
36
+ - LRU cache with memory pressure handling
37
+ - SQLite persistence with WAL mode
38
+ - Memory consolidation and association
39
+ - Access pattern tracking and optimization
26
40
 
27
- If a tool returns "unknown tool" or isn't listed, this flag is missing. Set it on the `mcp start` invocation (e.g. in `claude mcp add monomind -- env MONOMIND_MCP_SPECULATIVE=1 npx -y monomind@latest mcp start`).
41
+ ### Consensus Mechanisms
28
42
 
29
- ## Core Concepts
43
+ **Majority Consensus**
44
+ Simple voting where the option with most votes wins.
30
45
 
31
- ### Queen / Worker Roles
46
+ **Weighted Consensus**
47
+ Queen vote counts as 3x weight, providing strategic guidance.
32
48
 
33
- - **Queen** — the agent ID recorded as hive coordinator at `hive-mind_init`. Pure bookkeeping label; the queen has no special powers in code. Strategic/tactical/adaptive "queen types" from older docs are **not implemented** — pick the queen by passing its `queenId`.
34
- - **Worker** — generalist agent joined to the hive.
35
- - **Specialist** — worker with a defined specialty.
36
- - **Scout** — worker role for exploration / information gathering.
49
+ **Byzantine Fault Tolerance**
50
+ Requires 2/3 majority for decision approval, ensuring robust consensus even with faulty agents.
37
51
 
38
- ### Topologies (recorded on state, not enforced)
52
+ ## Getting Started
39
53
 
40
- `mesh`, `hierarchical`, `ring`, `star`. The topology is a label stored on the state file; nothing in the hive-mind tools routes messages differently based on it. Real coordination topology comes from how **you** spawn and instruct Task-tool agents.
54
+ ### 1. Initialize Hive Mind
41
55
 
42
- ### Consensus Strategies — Honest Definitions
56
+ ```bash
57
+ # Basic initialization
58
+ npx monomind hive-mind init
43
59
 
44
- Source: `hive-mind-tools.ts:98-124` and `hive-mind_consensus` description at `hive-mind-tools.ts:662-663`.
60
+ # Force reinitialize
61
+ npx monomind hive-mind init --force
45
62
 
46
- | Strategy | Required votes to resolve | Tolerates | Notes |
47
- |---|---|---|---|
48
- | `bft` (CLI alias: `byzantine`) | `floor(2n/3) + 1` | `f < n/3` "faulty" voters | Cross-proposal conflicting votes are flagged in `byzantineVoters`. Still a single-process tally. |
49
- | `raft` | `floor(n/2) + 1` (majority) | `f < n/2` | One pending proposal per `term`. Re-proposal timeout defaults to 30s. No leader election. |
50
- | `quorum` | Configurable preset | depends on preset | Presets: `majority`, `supermajority`, `unanimous`. `unanimous` rejects on the first dissent. |
63
+ # Custom configuration
64
+ npx monomind hive-mind init --config hive-config.json
65
+ ```
51
66
 
52
- **Not implemented:** `gossip` and `crdt`. Passing them to `hive-mind_init` or `hive-mind_consensus` returns an explicit error.
67
+ ### 2. Spawn a Swarm
53
68
 
54
- **O-Information anti-groupthink gate** (`minDivergenceRounds`, optional): forces a proposal to wait through N rounds of non-unanimous votes before it can resolve, even if the threshold is already met. Source: arXiv:2510.05174. Off by default.
69
+ ```bash
70
+ # Basic spawn with objective
71
+ npx monomind hive-mind spawn "Build microservices architecture"
55
72
 
56
- ## Swarm vs Hive-Mind — Pick the Right Surface
73
+ # Strategic queen type
74
+ npx monomind hive-mind spawn "Research AI patterns" --queen-type strategic
57
75
 
58
- | Need | Use |
59
- |---|---|
60
- | Real CLI to register agents, set topology, run an objective | `monomind swarm init/start/status/stop` (real commands) |
61
- | Threshold-vote a decision and keep an audit trail | `mcp__monomind__hive-mind_*` (this skill) |
62
- | Both at once | Initialize a swarm for execution **and** a hive-mind for the decision record |
76
+ # Tactical queen with max workers
77
+ npx monomind hive-mind spawn "Implement API" --queen-type tactical --max-workers 12
63
78
 
64
- Hive-mind tools do **not** spawn processes. `hive-mind_spawn` writes agent records into the agent store and joins their IDs to the hive state file — actual work happens in Task-tool agents you start yourself.
79
+ # Adaptive queen with consensus
80
+ npx monomind hive-mind spawn "Optimize system" --queen-type adaptive --consensus byzantine
65
81
 
66
- ## MCP Tool Reference
82
+ # Generate Claude Code commands
83
+ npx monomind hive-mind spawn "Build full-stack app" --claude
84
+ ```
67
85
 
68
- All tools are called as `mcp__monomind__<tool_name>` from inside Claude Code.
86
+ ### 3. Monitor Status
69
87
 
70
- ### Lifecycle
88
+ ```bash
89
+ # Check hive mind status
90
+ npx monomind hive-mind status
71
91
 
72
- ```
73
- mcp__monomind__hive-mind_init {
74
- topology: "mesh" | "hierarchical" | "ring" | "star", // default: mesh
75
- queenId: "<agent-id>", // default: queen-<ts>
76
- consensus: "byzantine" | "bft" | "raft" | "quorum", // default: byzantine
77
- maxAgents: 15, // default: 15
78
- persist: true,
79
- memoryBackend: "hybrid"
80
- }
92
+ # Get detailed metrics
93
+ npx monomind hive-mind metrics
94
+
95
+ # Monitor collective memory
96
+ npx monomind hive-mind memory
81
97
  ```
82
98
 
83
- Persists `state.json` with empty workers. Returns `hiveId`, elected queen, and the resolved consensus strategy. The strategy chosen here governs `hive-mind_consensus` propose/vote when the caller doesn't pass one explicitly.
99
+ ## Advanced Workflows
84
100
 
85
- ```
86
- mcp__monomind__hive-mind_spawn {
87
- count: 1, // 1-20 per call
88
- role: "worker" | "specialist" | "scout", // default: worker
89
- agentType: "worker", // recorded on agent record
90
- prefix: "hive-worker" // agent-id prefix
91
- }
92
- ```
101
+ ### Session Management
93
102
 
94
- Creates agent records **and** joins them to the hive in one call. Caps: 20 workers per call, 100 workers max in the hive.
103
+ **Create and Manage Sessions**
104
+
105
+ ```bash
106
+ # List active sessions
107
+ npx monomind hive-mind sessions
95
108
 
109
+ # Pause a session
110
+ npx monomind hive-mind pause <session-id>
111
+
112
+ # Resume a paused session
113
+ npx monomind hive-mind resume <session-id>
114
+
115
+ # Stop a running session
116
+ npx monomind hive-mind stop <session-id>
96
117
  ```
97
- mcp__monomind__hive-mind_join { agentId, role } // join an existing agent
98
- mcp__monomind__hive-mind_leave { agentId } // remove from hive
118
+
119
+ **Session Features**
120
+ - Automatic checkpoint creation
121
+ - Progress tracking with completion percentages
122
+ - Parent-child process management
123
+ - Session logs with event tracking
124
+ - Export/import capabilities
125
+
126
+ ### Consensus Building
127
+
128
+ The Hive Mind builds consensus through structured voting:
129
+
130
+ ```javascript
131
+ // Programmatic consensus building
132
+ const decision = await hiveMind.buildConsensus(
133
+ 'Architecture pattern selection',
134
+ ['microservices', 'monolith', 'serverless']
135
+ );
136
+
137
+ // Result includes:
138
+ // - decision: Winning option
139
+ // - confidence: Vote percentage
140
+ // - votes: Individual agent votes
99
141
  ```
100
142
 
101
- Use `join` when the agent was created elsewhere (e.g. via `monomind agent spawn`). `agentId` must match `^[a-zA-Z0-9_-]+$` and is capped at 128 chars.
143
+ **Consensus Algorithms**
144
+
145
+ 1. **Majority** - Simple democratic voting
146
+ 2. **Weighted** - Queen has 3x voting power
147
+ 3. **Byzantine** - 2/3 supermajority required
148
+
149
+ ### Collective Memory
102
150
 
151
+ **Storing Knowledge**
152
+
153
+ ```javascript
154
+ // Store in collective memory
155
+ await memory.store('api-patterns', {
156
+ rest: { pros: [...], cons: [...] },
157
+ graphql: { pros: [...], cons: [...] }
158
+ }, 'knowledge', { confidence: 0.95 });
103
159
  ```
104
- mcp__monomind__hive-mind_shutdown { graceful: true, force: false }
160
+
161
+ **Memory Types**
162
+ - `knowledge`: Permanent insights (no TTL)
163
+ - `context`: Session context (1 hour TTL)
164
+ - `task`: Task-specific data (30 min TTL)
165
+ - `result`: Execution results (permanent, compressed)
166
+ - `error`: Error logs (24 hour TTL)
167
+ - `metric`: Performance metrics (1 hour TTL)
168
+ - `consensus`: Decision records (permanent)
169
+ - `system`: System configuration (permanent)
170
+
171
+ **Searching and Retrieval**
172
+
173
+ ```javascript
174
+ // Search memory by pattern
175
+ const results = await memory.search('api*', {
176
+ type: 'knowledge',
177
+ minConfidence: 0.8,
178
+ limit: 50
179
+ });
180
+
181
+ // Get related memories
182
+ const related = await memory.getRelated('api-patterns', 10);
183
+
184
+ // Build associations
185
+ await memory.associate('rest-api', 'authentication', 0.9);
105
186
  ```
106
187
 
107
- Removes worker records from the agent store and clears pending proposals. Graceful shutdown refuses to run with pending proposals unless `force: true`. Consensus **history** is kept for audit.
188
+ ### Task Distribution
108
189
 
109
- ### Status & Memory
190
+ **Automatic Worker Assignment**
110
191
 
192
+ The system intelligently assigns tasks based on:
193
+ - Keyword matching with agent specialization
194
+ - Historical performance metrics
195
+ - Worker availability and load
196
+ - Task complexity analysis
197
+
198
+ ```javascript
199
+ // Create task (auto-assigned)
200
+ const task = await hiveMind.createTask(
201
+ 'Implement user authentication',
202
+ priority: 8,
203
+ { estimatedDuration: 30000 }
204
+ );
111
205
  ```
112
- mcp__monomind__hive-mind_status { verbose: false }
206
+
207
+ **Auto-Scaling**
208
+
209
+ ```javascript
210
+ // Configure auto-scaling
211
+ const config = {
212
+ autoScale: true,
213
+ maxWorkers: 12,
214
+ scaleUpThreshold: 2, // Pending tasks per idle worker
215
+ scaleDownThreshold: 2 // Idle workers above pending tasks
216
+ };
113
217
  ```
114
218
 
115
- Returns hive state: queen, worker count, pending/history proposals, and task counters computed from the task store.
219
+ ## Integration Patterns
220
+
221
+ ### With Claude Code
222
+
223
+ Generate Claude Code spawn commands directly:
116
224
 
225
+ ```bash
226
+ npx monomind hive-mind spawn "Build REST API" --claude
117
227
  ```
118
- mcp__monomind__hive-mind_memory {
119
- action: "get" | "set" | "delete" | "list",
120
- key: "<string>", // required for get/set/delete, ≤256 chars
121
- value: <any> // required for set, ≤1 MiB string or any JSON
122
- }
228
+
229
+ Output:
230
+ ```javascript
231
+ Task("Queen Coordinator", "Orchestrate REST API development...", "coordinator")
232
+ Task("Backend Developer", "Implement Express routes...", "backend-dev")
233
+ Task("Database Architect", "Design PostgreSQL schema...", "code-analyzer")
234
+ Task("Test Engineer", "Create Jest test suite...", "tester")
123
235
  ```
124
236
 
125
- Plain key/value blob on `state.sharedMemory`. Bounded: 1000 keys max, 1 MiB per string value. `set` also mirrors the entry into the searchable memory bridge (`namespace: hive-memory`) so `memory search` can find it. This is **not** a replicated KV store — it's JSON on disk.
237
+ ### With GitHub Integration
126
238
 
239
+ ```bash
240
+ # Repository analysis with hive mind
241
+ npx monomind hive-mind spawn "Analyze repo quality" --objective "owner/repo"
242
+
243
+ # PR review coordination
244
+ npx monomind hive-mind spawn "Review PR #123" --queen-type tactical
127
245
  ```
128
- mcp__monomind__hive-mind_broadcast {
129
- message: "<text>", // ≤1 MiB
130
- priority: "low" | "normal" | "high" | "critical",
131
- fromId: "<agent-id>"
132
- }
246
+
247
+ ## Performance Optimization
248
+
249
+ ### Memory Optimization
250
+
251
+ The collective memory system includes advanced optimizations:
252
+
253
+ **LRU Cache**
254
+ - Configurable cache size (default: 1000 entries)
255
+ - Memory pressure handling (default: 50MB)
256
+ - Automatic eviction of least-used entries
257
+
258
+ **Database Optimization**
259
+ - WAL (Write-Ahead Logging) mode
260
+ - 64MB cache size
261
+ - 256MB memory mapping
262
+ - Prepared statements for common queries
263
+ - Automatic ANALYZE and OPTIMIZE
264
+
265
+ **Object Pooling**
266
+ - Query result pooling
267
+ - Memory entry pooling
268
+ - Reduced garbage collection pressure
269
+
270
+ ### Performance Metrics
271
+
272
+ ```javascript
273
+ // Get performance insights
274
+ const insights = hiveMind.getPerformanceInsights();
275
+
276
+ // Includes:
277
+ // - asyncQueue utilization
278
+ // - Batch processing stats
279
+ // - Success rates
280
+ // - Average processing times
281
+ // - Memory efficiency
133
282
  ```
134
283
 
135
- Appends to a capped 100-entry noticeboard on `state.sharedMemory.broadcasts`. **Not message delivery** — no listener is notified. A worker sees a broadcast only when something later reads `hive-mind_status` or `hive-mind_memory get`. `recipients` in the response is just `state.workers.length`.
284
+ ### Task Execution
136
285
 
137
- ### Consensus
286
+ **Parallel Processing**
287
+ - Batch agent spawning (5 agents per batch)
288
+ - Concurrent task orchestration
289
+ - Async operation optimization
290
+ - Non-blocking task assignment
291
+
292
+ **Benchmarks**
293
+ - 10-20x faster batch spawning
294
+ - 2.8-4.4x speed improvement overall
295
+ - 32.3% token reduction
296
+ - 84.8% SWE-Bench solve rate
297
+
298
+ ## Configuration
138
299
 
300
+ ### Hive Mind Config
301
+
302
+ ```javascript
303
+ {
304
+ "objective": "Build microservices",
305
+ "name": "my-hive",
306
+ "queenType": "strategic", // strategic | tactical | adaptive
307
+ "maxWorkers": 8,
308
+ "consensusAlgorithm": "byzantine", // majority | weighted | byzantine
309
+ "autoScale": true,
310
+ "memorySize": 100, // MB
311
+ "taskTimeout": 60, // minutes
312
+ "encryption": false
313
+ }
139
314
  ```
140
- mcp__monomind__hive-mind_consensus {
141
- action: "propose" | "vote" | "status" | "list",
142
- // propose:
143
- type: "<proposal-type>", // ≤128 chars, e.g. "architecture"
144
- value: <any>, // ≤64 KiB if string
145
- voterId: "<agent-id>", // recorded as proposedBy
146
- strategy: "bft" | "raft" | "quorum", // default: from hive-mind_init, then "raft"
147
- quorumPreset: "majority" | "supermajority" | "unanimous",
148
- term: 1, // raft only
149
- timeoutMs: 30000, // raft re-proposal timeout
150
- minDivergenceRounds: 0, // O-Information gate, default 0 (off)
151
- // vote / status:
152
- proposalId: "<id>",
153
- vote: true | false
315
+
316
+ ### Memory Config
317
+
318
+ ```javascript
319
+ {
320
+ "maxSize": 100, // MB
321
+ "compressionThreshold": 1024, // bytes
322
+ "gcInterval": 300000, // 5 minutes
323
+ "cacheSize": 1000,
324
+ "cacheMemoryMB": 50,
325
+ "enablePooling": true,
326
+ "enableAsyncOperations": true
154
327
  }
155
328
  ```
156
329
 
157
- **propose** creates a pending proposal, computes required votes from current worker count, and (for raft) blocks duplicate proposals in the same term. **vote** records a boolean vote and tries to resolve: approved if `votesFor >= required`, rejected if `votesAgainst >= required` (or, for `unanimous`, on any dissent). Deadlock (neither side can reach threshold) rejects. **status** / **list** read pending and historical proposals.
330
+ ## Hooks Integration
158
331
 
159
- Each resolved decision is HMAC-signed and appended to a tamper-evident JSONL audit trail at `.monomind/consensus/`. The signing secret comes from `MONOMIND_SESSION_SECRET` if set, otherwise a per-project generated secret at `.monomind/hive-mind/session-secret`.
332
+ Hive Mind integrates with Monomind hooks for automation:
160
333
 
161
- ### Audit
334
+ **Pre-Task Hooks**
335
+ - Auto-assign agents by file type
336
+ - Validate objective complexity
337
+ - Optimize topology selection
338
+ - Cache search patterns
162
339
 
163
- ```
164
- mcp__monomind__hive-mind_audit_list { swarmId?, limit: 50 } // max 500
165
- mcp__monomind__hive-mind_audit_verify { decisionId }
166
- ```
340
+ **Post-Task Hooks**
341
+ - Auto-format deliverables
342
+ - Train neural patterns
343
+ - Update collective memory
344
+ - Analyze performance bottlenecks
167
345
 
168
- List signed decision records, or verify that all vote signatures and the record signature on a specific decision still validate against the project secret.
346
+ **Session Hooks**
347
+ - Generate session summaries
348
+ - Persist checkpoint data
349
+ - Track comprehensive metrics
350
+ - Restore execution context
169
351
 
170
- ## Workflow Patterns
352
+ ## Best Practices
171
353
 
172
- ### Pattern 1: Decide-then-Build (queen + workers + vote)
354
+ ### 1. Choose the Right Queen Type
173
355
 
174
- Use when an architectural choice must be documented before implementation begins.
356
+ **Strategic Queens** - For research, planning, and analysis
357
+ ```bash
358
+ npx monomind hive-mind spawn "Research ML frameworks" --queen-type strategic
359
+ ```
175
360
 
361
+ **Tactical Queens** - For implementation and execution
362
+ ```bash
363
+ npx monomind hive-mind spawn "Build authentication" --queen-type tactical
176
364
  ```
177
- # 1. Initialize hive with a known queen and byzantine threshold
178
- mcp__monomind__hive-mind_init {
179
- topology: "hierarchical",
180
- queenId: "architect-1",
181
- consensus: "byzantine"
182
- }
183
365
 
184
- # 2. Spawn or join workers (specialist role for SMEs)
185
- mcp__monomind__hive-mind_spawn { count: 4, role: "specialist", agentType: "reviewer" }
366
+ **Adaptive Queens** - For optimization and dynamic tasks
367
+ ```bash
368
+ npx monomind hive-mind spawn "Optimize performance" --queen-type adaptive
369
+ ```
186
370
 
187
- # 3. Queen proposes the architecture decision
188
- mcp__monomind__hive-mind_consensus {
189
- action: "propose",
190
- type: "architecture",
191
- value: { pattern: "modular-monolith", modules: ["auth","billing","shipping"] },
192
- voterId: "architect-1"
193
- }
194
- # → returns proposalId
371
+ ### 2. Leverage Consensus
372
+
373
+ Use consensus for critical decisions:
374
+ - Architecture pattern selection
375
+ - Technology stack choices
376
+ - Implementation approach
377
+ - Code review approval
378
+ - Release readiness
379
+
380
+ ### 3. Utilize Collective Memory
381
+
382
+ **Store Learnings**
383
+ ```javascript
384
+ // After successful pattern implementation
385
+ await memory.store('auth-pattern', {
386
+ approach: 'JWT with refresh tokens',
387
+ pros: ['Stateless', 'Scalable'],
388
+ cons: ['Token size', 'Revocation complexity'],
389
+ implementation: {...}
390
+ }, 'knowledge', { confidence: 0.95 });
391
+ ```
195
392
 
196
- # 4. Each worker votes (in parallel Task-tool agents)
197
- mcp__monomind__hive-mind_consensus {
198
- action: "vote", proposalId: "<id>",
199
- vote: true, voterId: "reviewer-2"
200
- }
393
+ **Build Associations**
394
+ ```javascript
395
+ // Link related concepts
396
+ await memory.associate('jwt-auth', 'refresh-tokens', 0.9);
397
+ await memory.associate('jwt-auth', 'oauth2', 0.7);
398
+ ```
201
399
 
202
- # 5. Once threshold reached, store the decision rationale
203
- mcp__monomind__hive-mind_memory {
204
- action: "set", key: "decision-architecture-v1",
205
- value: { summary: "...", proposalId: "<id>", decidedAt: "..." }
206
- }
400
+ ### 4. Monitor Performance
401
+
402
+ ```bash
403
+ # Regular status checks
404
+ npx monomind hive-mind status
405
+
406
+ # Track metrics
407
+ npx monomind hive-mind metrics
207
408
 
208
- # 6. Spin up a real swarm to execute, sharing the decision via memory namespace
209
- # (CLI)
210
- npx monomind@latest swarm init --topology hierarchical --max-agents 6
211
- npx monomind@latest swarm start --objective "Implement modular monolith per decision-architecture-v1"
409
+ # Analyze memory usage
410
+ npx monomind hive-mind memory
212
411
  ```
213
412
 
214
- ### Pattern 2: Release Gate (raft majority for go/no-go)
413
+ ### 5. Session Management
215
414
 
415
+ **Checkpoint Frequently**
416
+ ```javascript
417
+ // Create checkpoints at key milestones
418
+ await sessionManager.saveCheckpoint(
419
+ sessionId,
420
+ 'api-routes-complete',
421
+ { completedRoutes: [...], remaining: [...] }
422
+ );
216
423
  ```
217
- mcp__monomind__hive-mind_init { topology: "star", queenId: "release-manager", consensus: "raft" }
218
- mcp__monomind__hive-mind_spawn { count: 3, role: "specialist", agentType: "reviewer" }
219
424
 
220
- # One proposal per term — propose "ship v2.9.5"
221
- mcp__monomind__hive-mind_consensus {
222
- action: "propose", type: "release-gate",
223
- value: { version: "2.9.5" }, voterId: "release-manager", term: 1
224
- }
225
- # Reviewers vote; majority of 4 nodes = 3 votes needed
425
+ **Resume Sessions**
426
+ ```bash
427
+ # Resume from any previous state
428
+ npx monomind hive-mind resume <session-id>
226
429
  ```
227
430
 
228
- If the term times out (30s default), re-propose with `term: 2`.
431
+ ## Troubleshooting
432
+
433
+ ### Memory Issues
434
+
435
+ **High Memory Usage**
436
+ ```bash
437
+ # Run garbage collection
438
+ npx monomind hive-mind memory --gc
229
439
 
230
- ### Pattern 3: Unanimous Consent (quorum/unanimous for high-bar decisions)
440
+ # Optimize database
441
+ npx monomind hive-mind memory --optimize
231
442
 
443
+ # Export and clear
444
+ npx monomind hive-mind memory --export --clear
232
445
  ```
233
- mcp__monomind__hive-mind_consensus {
234
- action: "propose", type: "policy-change",
235
- value: "...", strategy: "quorum", quorumPreset: "unanimous",
236
- voterId: "queen-1"
446
+
447
+ **Low Cache Hit Rate**
448
+ ```javascript
449
+ // Increase cache size in config
450
+ {
451
+ "cacheSize": 2000,
452
+ "cacheMemoryMB": 100
237
453
  }
238
- # Any single dissent rejects the proposal immediately.
239
454
  ```
240
455
 
241
- ### Pattern 4: Shared Scratchpad (no voting, just memory)
242
-
243
- For loose coordination without a formal vote — skip consensus entirely.
456
+ ### Performance Issues
244
457
 
458
+ **Slow Task Assignment**
459
+ ```javascript
460
+ // Enable worker type caching
461
+ // The system caches best worker matches for 5 minutes
462
+ // Automatic - no configuration needed
245
463
  ```
246
- mcp__monomind__hive-mind_init { topology: "mesh", queenId: "coord-1", consensus: "raft" }
247
- mcp__monomind__hive-mind_join { agentId: "agent-a", role: "worker" }
248
- mcp__monomind__hive-mind_join { agentId: "agent-b", role: "worker" }
249
464
 
250
- # Agents write findings into shared memory via MCP, in their Task-tool bodies
251
- mcp__monomind__hive-mind_memory { action: "set", key: "auth-findings", value: { ... } }
252
- mcp__monomind__hive-mind_memory { action: "list" }
465
+ **High Queue Utilization**
466
+ ```javascript
467
+ // Increase async queue concurrency
468
+ {
469
+ "asyncQueueConcurrency": 20 // Default: min(maxWorkers * 2, 20)
470
+ }
253
471
  ```
254
472
 
255
- ## Configuration
473
+ ### Consensus Failures
256
474
 
257
- The hive config is the `state.json` written by `hive-mind_init`. There is no separate config file. Notable fields persisted:
475
+ **No Consensus Reached (Byzantine)**
476
+ ```bash
477
+ # Switch to weighted consensus for more decisive results
478
+ npx monomind hive-mind spawn "..." --consensus weighted
258
479
 
259
- | Field | Meaning |
260
- |---|---|
261
- | `hiveId` | Random `hive-<ts>-<rand>` identifier |
262
- | `topology` | One of `mesh` / `hierarchical` / `ring` / `star` (label only) |
263
- | `queen` | `{ agentId, electedAt, term }` |
264
- | `consensusStrategy` | `bft` / `raft` / `quorum` — the default for `hive-mind_consensus` |
265
- | `workers` | Array of joined agent IDs (≤100) |
266
- | `sharedMemory` | Free-form key/value object (≤1000 keys) |
267
- | `consensus.pending` / `consensus.history` | Open and resolved proposals (history capped at 1000) |
480
+ # Or use simple majority
481
+ npx monomind hive-mind spawn "..." --consensus majority
482
+ ```
268
483
 
269
- Hive state file is capped at 10 MiB; larger files are treated as corrupt and reset to defaults.
484
+ ## Advanced Topics
270
485
 
271
- ## Best Practices
486
+ ### Custom Worker Types
272
487
 
273
- ### 1. Pick the strategy by decision shape
488
+ Define specialized workers in `.claude/agents/`:
274
489
 
275
- - **High-bar policy / breaking change** → `quorum` with `unanimous` or `supermajority`
276
- - **Adversarial review with distrusted input** → `bft` (raises threshold to 2/3, flags conflicting voters)
277
- - **Standard majority decision** → `raft` (simple majority, one proposal per term)
278
- - **Quick informal coordination** → skip consensus, use `hive-mind_memory` only
490
+ ```yaml
491
+ name: security-auditor
492
+ type: specialist
493
+ capabilities:
494
+ - vulnerability-scanning
495
+ - security-review
496
+ - penetration-testing
497
+ - compliance-checking
498
+ priority: high
499
+ ```
279
500
 
280
- ### 2. Initialize before spawn/join
501
+ ### Neural Pattern Training
281
502
 
282
- `spawn`, `join`, `consensus`, `broadcast`, and `memory` all error with `"Hive-mind not initialized"` until `hive-mind_init` has written `state.json`.
503
+ The system trains on successful patterns:
283
504
 
284
- ### 3. Set `MONOMIND_MCP_SPECULATIVE=1` once, up front
505
+ ```javascript
506
+ // Automatic pattern learning
507
+ // Happens after successful task completion
508
+ // Stores in collective memory
509
+ // Improves future task matching
510
+ ```
285
511
 
286
- Without it only `status` and `join` are exposed. If `init`, `spawn`, `consensus`, `memory`, `broadcast`, `shutdown`, or `audit_*` are reported as unknown tools, the flag is missing.
512
+ ### Multi-Hive Coordination
287
513
 
288
- ### 4. Real parallelism comes from Task-tool agents
514
+ Run multiple hive minds simultaneously:
289
515
 
290
- `hive-mind_spawn` writes records; it does not start anything. For each worker, spawn a Task-tool agent with `run_in_background: true` in **one** message, and let each agent call `hive-mind_consensus vote` / `hive-mind_memory set` via MCP from inside its work.
516
+ ```bash
517
+ # Frontend hive
518
+ npx monomind hive-mind spawn "Build UI" --name frontend-hive
291
519
 
292
- ### 5. Don't use the broadcast tool as a message bus
520
+ # Backend hive
521
+ npx monomind hive-mind spawn "Build API" --name backend-hive
293
522
 
294
- `hive-mind_broadcast` is a noticeboard, not delivery. For real task assignment use `mcp__monomind__task_create` / `task_assign`, or pass instructions in each Task-tool agent's prompt directly.
523
+ # They share collective memory for coordination
524
+ ```
295
525
 
296
- ### 6. Verify important decisions cryptographically
526
+ ### Export/Import Sessions
297
527
 
298
- For any decision that will be cited later (release gates, architecture calls), record the `decisionId` and run `hive-mind_audit_verify` after the fact to prove the vote signatures still validate.
528
+ ```bash
529
+ # Export session for backup
530
+ npx monomind hive-mind export <session-id> --output backup.json
299
531
 
300
- ## Troubleshooting
532
+ # Import session
533
+ npx monomind hive-mind import backup.json
534
+ ```
535
+
536
+ ## API Reference
537
+
538
+ ### HiveMindCore
539
+
540
+ ```javascript
541
+ const hiveMind = new HiveMindCore({
542
+ objective: 'Build system',
543
+ queenType: 'strategic',
544
+ maxWorkers: 8,
545
+ consensusAlgorithm: 'byzantine'
546
+ });
547
+
548
+ await hiveMind.initialize();
549
+ await hiveMind.spawnQueen(queenData);
550
+ await hiveMind.spawnWorkers(['coder', 'tester']);
551
+ await hiveMind.createTask('Implement feature', 7);
552
+ const decision = await hiveMind.buildConsensus('topic', options);
553
+ const status = hiveMind.getStatus();
554
+ await hiveMind.shutdown();
555
+ ```
301
556
 
302
- ### "Hive-mind not initialized"
557
+ ### CollectiveMemory
558
+
559
+ ```javascript
560
+ const memory = new CollectiveMemory({
561
+ swarmId: 'hive-123',
562
+ maxSize: 100,
563
+ cacheSize: 1000
564
+ });
565
+
566
+ await memory.store(key, value, type, metadata);
567
+ const data = await memory.retrieve(key);
568
+ const results = await memory.search(pattern, options);
569
+ const related = await memory.getRelated(key, limit);
570
+ await memory.associate(key1, key2, strength);
571
+ const stats = memory.getStatistics();
572
+ const analytics = memory.getAnalytics();
573
+ const health = await memory.healthCheck();
574
+ ```
575
+
576
+ ### HiveMindSessionManager
303
577
 
304
- Run `mcp__monomind__hive-mind_init` first. The state file lives at `.monomind/hive-mind/state.json` — if it's missing or >10 MiB, the hive resets to the uninitialized default.
578
+ ```javascript
579
+ const sessionManager = new HiveMindSessionManager();
305
580
 
306
- ### "Consensus strategy X is not implemented"
581
+ const sessionId = await sessionManager.createSession(
582
+ swarmId, swarmName, objective, metadata
583
+ );
307
584
 
308
- `gossip` and `crdt` are rejected. Use `bft`, `raft`, or `quorum` (`byzantine` is accepted as an alias for `bft` at init time only).
585
+ await sessionManager.saveCheckpoint(sessionId, name, data);
586
+ const sessions = await sessionManager.getActiveSessions();
587
+ const session = await sessionManager.getSession(sessionId);
588
+ await sessionManager.pauseSession(sessionId);
589
+ await sessionManager.resumeSession(sessionId);
590
+ await sessionManager.stopSession(sessionId);
591
+ await sessionManager.completeSession(sessionId);
592
+ ```
309
593
 
310
- ### "Raft term N already has a pending proposal"
594
+ ## Examples
311
595
 
312
- Either wait for the current proposal in that term to resolve, re-propose with a higher `term`, or switch strategy. One pending raft proposal per term is allowed.
596
+ ### Full-Stack Development
313
597
 
314
- ### "Cannot gracefully shutdown with N pending consensus items"
598
+ ```bash
599
+ # Initialize hive mind
600
+ npx monomind hive-mind init
601
+
602
+ # Spawn full-stack hive
603
+ npx monomind hive-mind spawn "Build e-commerce platform" \
604
+ --queen-type strategic \
605
+ --max-workers 10 \
606
+ --consensus weighted \
607
+ --claude
608
+
609
+ # Output generates Claude Code commands:
610
+ # - Queen coordinator
611
+ # - Frontend developers (React)
612
+ # - Backend developers (Node.js)
613
+ # - Database architects
614
+ # - DevOps engineers
615
+ # - Security auditors
616
+ # - Test engineers
617
+ # - Documentation specialists
618
+ ```
315
619
 
316
- Resolve the proposals (vote them through or let them reject) or pass `force: true`.
620
+ ### Research and Analysis
317
621
 
318
- ### "Shared memory full (max 1000 keys)"
622
+ ```bash
623
+ # Spawn research hive
624
+ npx monomind hive-mind spawn "Research GraphQL vs REST" \
625
+ --queen-type adaptive \
626
+ --consensus byzantine
627
+
628
+ # Researchers gather data
629
+ # Analysts process findings
630
+ # Queen builds consensus on recommendation
631
+ # Results stored in collective memory
632
+ ```
319
633
 
320
- Delete unused keys with `hive-mind_memory delete`, or move bulk context to the regular memory store (`mcp__monomind__memory_store`) under a hive namespace.
634
+ ### Code Review
321
635
 
322
- ### Tool isn't visible
636
+ ```bash
637
+ # Review coordination
638
+ npx monomind hive-mind spawn "Review PR #456" \
639
+ --queen-type tactical \
640
+ --max-workers 6
641
+
642
+ # Spawns:
643
+ # - Code analyzers
644
+ # - Security reviewers
645
+ # - Performance reviewers
646
+ # - Test coverage analyzers
647
+ # - Documentation reviewers
648
+ # - Consensus on approval/changes
649
+ ```
323
650
 
324
- Set `MONOMIND_MCP_SPECULATIVE=1` on the MCP server process. Only `hive-mind_status` and `hive-mind_join` are unconditionally visible.
651
+ ## Skill Progression
652
+
653
+ ### Beginner
654
+ 1. Initialize hive mind
655
+ 2. Spawn basic swarms
656
+ 3. Monitor status
657
+ 4. Use majority consensus
658
+
659
+ ### Intermediate
660
+ 1. Configure queen types
661
+ 2. Implement session management
662
+ 3. Use weighted consensus
663
+ 4. Access collective memory
664
+ 5. Enable auto-scaling
665
+
666
+ ### Advanced
667
+ 1. Byzantine fault tolerance
668
+ 2. Memory optimization
669
+ 3. Custom worker types
670
+ 4. Multi-hive coordination
671
+ 5. Neural pattern training
672
+ 6. Session export/import
673
+ 7. Performance tuning
325
674
 
326
675
  ## Related Skills
327
676
 
328
- - `swarm-orchestration` — real CLI swarm coordination (the execution side)
329
- - `swarm-advanced` — advanced swarm patterns
330
- - `mastermind-debug` — systematic root-cause debugging protocol
331
- - `verification-quality` — truth scoring and rollback
677
+ - `swarm-orchestration`: Basic swarm coordination
678
+ - `consensus-mechanisms`: Distributed decision making
679
+ - `memory-systems`: Advanced memory management
680
+ - `github-integration`: Repository coordination
332
681
 
333
682
  ## References
334
683
 
335
- - Implementation: `packages/@monomind/cli/src/mcp-tools/hive-mind-tools.ts`
336
- - Honest scope note: `hive-mind-tools.ts:2-12`
337
- - Vote-threshold math: `hive-mind-tools.ts:98-124`
338
- - Consensus description: `hive-mind-tools.ts:662-663`
339
- - State file: `.monomind/hive-mind/state.json` (capped at 10 MiB)
340
- - Audit trail: `.monomind/consensus/` (HMAC-signed JSONL)
341
- - Concepts doc: `doc/concepts/swarm.md` (Hive-Mind Consensus section)
684
+ - [Hive Mind Documentation](https://github.com/monoes/monomind/docs/hive-mind)
685
+ - [Collective Intelligence Patterns](https://github.com/monoes/monomind/docs/patterns)
686
+ - [Byzantine Consensus](https://github.com/monoes/monomind/docs/consensus)
687
+ - [Memory Optimization](https://github.com/monoes/monomind/docs/memory)
342
688
 
343
689
  ---
344
690
 
345
- **Skill Version**: 2.0.0
346
- **Last Updated**: 2026-08-12
691
+ **Skill Version**: 1.0.0
692
+ **Last Updated**: 2025-10-19
347
693
  **Maintained By**: Monomind Team
694
+ **License**: MIT