@monoes/monomindcli 2.9.7 → 2.9.9

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 (295) hide show
  1. package/.claude/agents/design/design-monodesign.md +1 -2
  2. package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +1 -2
  3. package/.claude/agents/engineering/engineering-ai-engineer.md +1 -2
  4. package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -1
  5. package/.claude/agents/engineering/engineering-backend-architect.md +1 -2
  6. package/.claude/agents/engineering/engineering-code-reviewer.md +1 -2
  7. package/.claude/agents/engineering/engineering-data-engineer.md +1 -2
  8. package/.claude/agents/engineering/engineering-database-optimizer.md +1 -2
  9. package/.claude/agents/engineering/engineering-devops-automator.md +1 -2
  10. package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +1 -2
  11. package/.claude/agents/engineering/engineering-feishu-integration-developer.md +1 -2
  12. package/.claude/agents/engineering/engineering-frontend-developer.md +1 -2
  13. package/.claude/agents/engineering/engineering-git-workflow-master.md +1 -2
  14. package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -1
  15. package/.claude/agents/engineering/engineering-mobile-app-builder.md +1 -2
  16. package/.claude/agents/engineering/engineering-rapid-prototyper.md +1 -2
  17. package/.claude/agents/engineering/engineering-security-engineer.md +1 -2
  18. package/.claude/agents/engineering/engineering-senior-developer.md +1 -2
  19. package/.claude/agents/engineering/engineering-software-architect.md +1 -2
  20. package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +1 -2
  21. package/.claude/agents/engineering/engineering-sre.md +0 -1
  22. package/.claude/agents/engineering/engineering-technical-writer.md +1 -2
  23. package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -1
  24. package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +1 -2
  25. package/.claude/agents/github/code-review-swarm.md +0 -1
  26. package/.claude/agents/github/github-modes.md +0 -1
  27. package/.claude/agents/github/issue-tracker.md +0 -1
  28. package/.claude/agents/github/multi-repo-swarm.md +0 -1
  29. package/.claude/agents/github/pr-manager.md +0 -1
  30. package/.claude/agents/github/project-board-sync.md +0 -1
  31. package/.claude/agents/github/release-manager.md +0 -1
  32. package/.claude/agents/github/repo-architect.md +0 -1
  33. package/.claude/agents/github/swarm-issue.md +0 -1
  34. package/.claude/agents/github/swarm-pr.md +0 -1
  35. package/.claude/agents/github/sync-coordinator.md +0 -1
  36. package/.claude/agents/github/workflow-automation.md +0 -1
  37. package/.claude/agents/marketing/marketing-competitive-content.md +1 -2
  38. package/.claude/agents/marketing/marketing-cro-specialist.md +1 -2
  39. package/.claude/agents/marketing/marketing-email-specialist.md +1 -2
  40. package/.claude/agents/marketing/marketing-launch-strategist.md +1 -2
  41. package/.claude/agents/marketing/marketing-pricing-strategist.md +1 -2
  42. package/.claude/agents/specialized/agentic-identity-trust.md +0 -1
  43. package/.claude/agents/specialized/agents-orchestrator.md +1 -2
  44. package/.claude/agents/specialized/automation-governance-architect.md +1 -2
  45. package/.claude/agents/specialized/blockchain-security-auditor.md +1 -2
  46. package/.claude/agents/specialized/compliance-auditor.md +1 -2
  47. package/.claude/agents/specialized/identity-graph-operator.md +0 -1
  48. package/.claude/agents/specialized/lsp-index-engineer.md +1 -2
  49. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -1
  50. package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -1
  51. package/.claude/agents/specialized/specialized-developer-advocate.md +1 -2
  52. package/.claude/agents/specialized/specialized-document-generator.md +1 -2
  53. package/.claude/agents/specialized/specialized-mcp-builder.md +1 -2
  54. package/.claude/agents/specialized/specialized-model-qa.md +0 -1
  55. package/.claude/agents/specialized/specialized-workflow-architect.md +1 -2
  56. package/.claude/agents/specialized/zk-steward.md +1 -2
  57. package/.claude/agents/testing/production-validator.md +0 -1
  58. package/.claude/agents/testing/tdd-london-swarm.md +0 -1
  59. package/.claude/agents/testing/testing-accessibility-auditor.md +0 -1
  60. package/.claude/agents/testing/testing-api-tester.md +1 -2
  61. package/.claude/agents/testing/testing-evidence-collector.md +1 -2
  62. package/.claude/agents/testing/testing-performance-benchmarker.md +1 -2
  63. package/.claude/agents/testing/testing-test-results-analyzer.md +1 -2
  64. package/.claude/agents/testing/testing-tool-evaluator.md +1 -2
  65. package/.claude/agents/testing/testing-workflow-optimizer.md +1 -2
  66. package/.claude/commands/hooks/README.md +1 -1
  67. package/.claude/commands/memory/README.md +6 -7
  68. package/.claude/commands/monitoring/README.md +1 -1
  69. package/.claude/helpers/control-start.cjs +37 -8
  70. package/.claude/helpers/handlers/route-handler.cjs +22 -3
  71. package/.claude/helpers/handlers/session-handler.cjs +43 -0
  72. package/.claude/helpers/intelligence.cjs +27 -6
  73. package/.claude/helpers/statusline.cjs +45 -11
  74. package/.claude/skills/agentic-jujutsu/SKILL.md +17 -15
  75. package/.claude/skills/hive-mind-advanced/SKILL.md +212 -559
  76. package/.claude/skills/hooks-automation/SKILL.md +1 -1
  77. package/.claude/skills/mastermind-adapters/SKILL.md +0 -11
  78. package/.claude/skills/mastermind-agents/SKILL.md +0 -11
  79. package/.claude/skills/mastermind-backup/SKILL.md +0 -11
  80. package/.claude/skills/mastermind-bootstrap/SKILL.md +0 -11
  81. package/.claude/skills/mastermind-delegation/SKILL.md +14 -12
  82. package/.claude/skills/mastermind-idea/SKILL.md +0 -5
  83. package/.claude/skills/mastermind-monitor/SKILL.md +0 -15
  84. package/.claude/skills/mastermind-org-settings/SKILL.md +0 -11
  85. package/.claude/skills/mastermind-plugins/SKILL.md +0 -11
  86. package/.claude/skills/mastermind-protocol/SKILL.md +6 -124
  87. package/.claude/skills/mastermind-repeat/SKILL.md +0 -25
  88. package/.claude/skills/mastermind-review/SKILL.md +1 -1
  89. package/.claude/skills/mastermind-stoporg/SKILL.md +0 -19
  90. package/.claude/skills/memory-toolkit/SKILL.md +12 -11
  91. package/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +8 -1
  92. package/.claude/skills/pair-programming/SKILL.md +1 -1
  93. package/.claude/skills/performance-analysis/SKILL.md +228 -484
  94. package/.claude/skills/specialagent/SKILL.md +31 -133
  95. package/.claude/skills/swarm-advanced/SKILL.md +2 -2
  96. package/.claude/skills/swarm-orchestration/SKILL.md +220 -150
  97. package/.claude/skills/verification-quality/SKILL.md +247 -571
  98. package/README.md +3 -3
  99. package/dist/src/commands/agent-lifecycle.js +3 -3
  100. package/dist/src/commands/agent-lifecycle.js.map +1 -1
  101. package/dist/src/commands/autopilot.d.ts.map +1 -1
  102. package/dist/src/commands/autopilot.js +7 -1
  103. package/dist/src/commands/autopilot.js.map +1 -1
  104. package/dist/src/commands/doc.d.ts.map +1 -1
  105. package/dist/src/commands/doc.js +14 -3
  106. package/dist/src/commands/doc.js.map +1 -1
  107. package/dist/src/commands/doctor-env-checks.d.ts +1 -1
  108. package/dist/src/commands/doctor-env-checks.d.ts.map +1 -1
  109. package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
  110. package/dist/src/commands/doctor-project-checks.js +3 -37
  111. package/dist/src/commands/doctor-project-checks.js.map +1 -1
  112. package/dist/src/commands/doctor.d.ts.map +1 -1
  113. package/dist/src/commands/doctor.js +30 -1
  114. package/dist/src/commands/doctor.js.map +1 -1
  115. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  116. package/dist/src/commands/hooks-coverage-commands.js +75 -67
  117. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  118. package/dist/src/commands/hooks-workers.d.ts.map +1 -1
  119. package/dist/src/commands/hooks-workers.js +41 -10
  120. package/dist/src/commands/hooks-workers.js.map +1 -1
  121. package/dist/src/commands/hooks.js +1 -1
  122. package/dist/src/commands/index.d.ts +1 -1
  123. package/dist/src/commands/index.d.ts.map +1 -1
  124. package/dist/src/commands/index.js +20 -4
  125. package/dist/src/commands/index.js.map +1 -1
  126. package/dist/src/commands/init.d.ts.map +1 -1
  127. package/dist/src/commands/init.js +80 -7
  128. package/dist/src/commands/init.js.map +1 -1
  129. package/dist/src/commands/mcp.d.ts.map +1 -1
  130. package/dist/src/commands/mcp.js +78 -2
  131. package/dist/src/commands/mcp.js.map +1 -1
  132. package/dist/src/commands/neural-optimize.d.ts.map +1 -1
  133. package/dist/src/commands/neural-optimize.js +27 -5
  134. package/dist/src/commands/neural-optimize.js.map +1 -1
  135. package/dist/src/commands/org-observe.d.ts.map +1 -1
  136. package/dist/src/commands/org-observe.js +37 -30
  137. package/dist/src/commands/org-observe.js.map +1 -1
  138. package/dist/src/commands/org.d.ts.map +1 -1
  139. package/dist/src/commands/org.js +129 -2
  140. package/dist/src/commands/org.js.map +1 -1
  141. package/dist/src/commands/performance.js +1 -1
  142. package/dist/src/commands/performance.js.map +1 -1
  143. package/dist/src/commands/security-cve.d.ts.map +1 -1
  144. package/dist/src/commands/security-cve.js +1 -11
  145. package/dist/src/commands/security-cve.js.map +1 -1
  146. package/dist/src/commands/security-misc.d.ts +0 -9
  147. package/dist/src/commands/security-misc.d.ts.map +1 -1
  148. package/dist/src/commands/security-misc.js +33 -54
  149. package/dist/src/commands/security-misc.js.map +1 -1
  150. package/dist/src/commands/security-scan.d.ts.map +1 -1
  151. package/dist/src/commands/security-scan.js +3 -11
  152. package/dist/src/commands/security-scan.js.map +1 -1
  153. package/dist/src/commands/swarm.d.ts.map +1 -1
  154. package/dist/src/commands/swarm.js +7 -2
  155. package/dist/src/commands/swarm.js.map +1 -1
  156. package/dist/src/commands/ui.d.ts +8 -0
  157. package/dist/src/commands/ui.d.ts.map +1 -0
  158. package/dist/src/commands/ui.js +94 -0
  159. package/dist/src/commands/ui.js.map +1 -0
  160. package/dist/src/init/claudemd-generator.d.ts.map +1 -1
  161. package/dist/src/init/claudemd-generator.js +7 -9
  162. package/dist/src/init/claudemd-generator.js.map +1 -1
  163. package/dist/src/init/executor.d.ts.map +1 -1
  164. package/dist/src/init/executor.js +13 -3
  165. package/dist/src/init/executor.js.map +1 -1
  166. package/dist/src/init/kimi-generator.d.ts +3 -2
  167. package/dist/src/init/kimi-generator.d.ts.map +1 -1
  168. package/dist/src/init/kimi-generator.js +45 -13
  169. package/dist/src/init/kimi-generator.js.map +1 -1
  170. package/dist/src/init/statusline-generator.d.ts +1 -1
  171. package/dist/src/init/statusline-generator.js +1 -1
  172. package/dist/src/init/write-capabilities.js +7 -7
  173. package/dist/src/init/write-capabilities.js.map +1 -1
  174. package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
  175. package/dist/src/knowledge/document-pipeline.js +1 -0
  176. package/dist/src/knowledge/document-pipeline.js.map +1 -1
  177. package/dist/src/knowledge/eval/golden-set.d.ts.map +1 -1
  178. package/dist/src/knowledge/eval/golden-set.js +21 -32
  179. package/dist/src/knowledge/eval/golden-set.js.map +1 -1
  180. package/dist/src/mcp-tools/embeddings-tools.js +2 -2
  181. package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
  182. package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
  183. package/dist/src/mcp-tools/hooks-intelligence.js +29 -3
  184. package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
  185. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  186. package/dist/src/mcp-tools/hooks-routing.js +32 -19
  187. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  188. package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -1
  189. package/dist/src/mcp-tools/monograph/query-tools.js +48 -18
  190. package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -1
  191. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  192. package/dist/src/mcp-tools/performance-tools.js +15 -10
  193. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  194. package/dist/src/memory/embedding-operations.d.ts +4 -0
  195. package/dist/src/memory/embedding-operations.d.ts.map +1 -1
  196. package/dist/src/memory/embedding-operations.js +125 -32
  197. package/dist/src/memory/embedding-operations.js.map +1 -1
  198. package/dist/src/memory/hnsw-operations.d.ts +1 -1
  199. package/dist/src/memory/hnsw-operations.js +1 -1
  200. package/dist/src/memory/memory-bridge.d.ts +8 -0
  201. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  202. package/dist/src/memory/memory-bridge.js +37 -8
  203. package/dist/src/memory/memory-bridge.js.map +1 -1
  204. package/dist/src/memory/memory-read.d.ts +1 -1
  205. package/dist/src/memory/memory-read.js +2 -2
  206. package/dist/src/memory/memory-read.js.map +1 -1
  207. package/dist/src/orgrt/antigravity-runner.d.ts.map +1 -1
  208. package/dist/src/orgrt/antigravity-runner.js +6 -6
  209. package/dist/src/orgrt/antigravity-runner.js.map +1 -1
  210. package/dist/src/orgrt/checkpoint-ops.d.ts +11 -1
  211. package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -1
  212. package/dist/src/orgrt/checkpoint-ops.js +18 -86
  213. package/dist/src/orgrt/checkpoint-ops.js.map +1 -1
  214. package/dist/src/orgrt/checkpoint.d.ts +1 -1
  215. package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
  216. package/dist/src/orgrt/checkpoint.js +3 -3
  217. package/dist/src/orgrt/checkpoint.js.map +1 -1
  218. package/dist/src/orgrt/daemon.d.ts +9 -1
  219. package/dist/src/orgrt/daemon.d.ts.map +1 -1
  220. package/dist/src/orgrt/daemon.js +267 -139
  221. package/dist/src/orgrt/daemon.js.map +1 -1
  222. package/dist/src/orgrt/decisions.d.ts +13 -0
  223. package/dist/src/orgrt/decisions.d.ts.map +1 -1
  224. package/dist/src/orgrt/decisions.js +95 -0
  225. package/dist/src/orgrt/decisions.js.map +1 -1
  226. package/dist/src/orgrt/forwarder.d.ts.map +1 -1
  227. package/dist/src/orgrt/forwarder.js +148 -15
  228. package/dist/src/orgrt/forwarder.js.map +1 -1
  229. package/dist/src/orgrt/kimicode-runner.js +1 -1
  230. package/dist/src/orgrt/kimicode-runner.js.map +1 -1
  231. package/dist/src/orgrt/opencode-runner.js +1 -1
  232. package/dist/src/orgrt/opencode-runner.js.map +1 -1
  233. package/dist/src/orgrt/session.d.ts +27 -1
  234. package/dist/src/orgrt/session.d.ts.map +1 -1
  235. package/dist/src/orgrt/session.js +67 -6
  236. package/dist/src/orgrt/session.js.map +1 -1
  237. package/dist/src/orgrt/task-dag.d.ts +11 -1
  238. package/dist/src/orgrt/task-dag.d.ts.map +1 -1
  239. package/dist/src/orgrt/task-dag.js +93 -2
  240. package/dist/src/orgrt/task-dag.js.map +1 -1
  241. package/dist/src/orgrt/templates.d.ts.map +1 -1
  242. package/dist/src/orgrt/templates.js +26 -2
  243. package/dist/src/orgrt/templates.js.map +1 -1
  244. package/dist/src/orgrt/types.d.ts +77 -1
  245. package/dist/src/orgrt/types.d.ts.map +1 -1
  246. package/dist/src/orgrt/types.js +28 -2
  247. package/dist/src/orgrt/types.js.map +1 -1
  248. package/dist/src/orgrt/vercel-providers.d.ts.map +1 -1
  249. package/dist/src/orgrt/vercel-providers.js +9 -4
  250. package/dist/src/orgrt/vercel-providers.js.map +1 -1
  251. package/dist/src/orgrt/vercel-runner.d.ts +0 -23
  252. package/dist/src/orgrt/vercel-runner.d.ts.map +1 -1
  253. package/dist/src/orgrt/vercel-runner.js +38 -7
  254. package/dist/src/orgrt/vercel-runner.js.map +1 -1
  255. package/dist/tsconfig.tsbuildinfo +1 -1
  256. package/package.json +3 -3
  257. package/.claude/commands/mastermind/approvev1.md +0 -94
  258. package/.claude/commands/mastermind/architect.md +0 -52
  259. package/.claude/commands/mastermind/autodev.md +0 -28
  260. package/.claude/commands/mastermind/build.md +0 -23
  261. package/.claude/commands/mastermind/finish.md +0 -17
  262. package/.claude/commands/mastermind/runorgv1.md +0 -159
  263. package/.claude/commands/mastermind/taskdev.md +0 -23
  264. package/.claude/commands/mastermind/tdd.md +0 -19
  265. package/.claude/commands/mastermind/verify.md +0 -19
  266. package/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
  267. package/.claude/skills/mastermind-architect/SKILL.md +0 -862
  268. package/.claude/skills/mastermind-autodev/SKILL.md +0 -360
  269. package/.claude/skills/mastermind-build/SKILL.md +0 -169
  270. package/.claude/skills/mastermind-companies/SKILL.md +0 -256
  271. package/.claude/skills/mastermind-content/SKILL.md +0 -197
  272. package/.claude/skills/mastermind-costs/SKILL.md +0 -151
  273. package/.claude/skills/mastermind-finance/SKILL.md +0 -166
  274. package/.claude/skills/mastermind-finish/SKILL.md +0 -251
  275. package/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
  276. package/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
  277. package/.claude/skills/mastermind-marketing/SKILL.md +0 -228
  278. package/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
  279. package/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
  280. package/.claude/skills/mastermind-ops/SKILL.md +0 -168
  281. package/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
  282. package/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
  283. package/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
  284. package/.claude/skills/mastermind-projects/SKILL.md +0 -167
  285. package/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
  286. package/.claude/skills/mastermind-sales/SKILL.md +0 -170
  287. package/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
  288. package/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
  289. package/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
  290. package/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
  291. package/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
  292. package/.claude/skills/mastermind-tdd/SKILL.md +0 -424
  293. package/.claude/skills/mastermind-verify/SKILL.md +0 -196
  294. package/.claude/skills/mastermind-wiki/SKILL.md +0 -314
  295. package/.claude/skills/monolean-review/SKILL.md +0 -57
@@ -1,560 +1,304 @@
1
1
  ---
2
2
  name: performance-analysis
3
- description: |
4
- Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Monomind swarms
3
+ description: Comprehensive performance analysis, bottleneck detection, and optimization recommendations for Monomind swarms
5
4
  ---
6
5
 
7
- # Performance Analysis Skill
8
-
9
- Comprehensive performance analysis suite for identifying bottlenecks, profiling swarm operations, generating detailed reports, and providing actionable optimization recommendations.
6
+ # performance-analysis — Measure, Don't Guess
10
7
 
11
8
  ## Overview
12
9
 
13
- This skill consolidates all performance analysis capabilities:
14
- - **Bottleneck Detection**: Identify performance bottlenecks across communication, processing, memory, and network
15
- - **Performance Profiling**: Real-time monitoring and historical analysis of swarm operations
16
- - **Report Generation**: Create comprehensive performance reports in multiple formats
17
- - **Optimization Recommendations**: AI-powered suggestions for improving performance
10
+ Performance work without measurement is superstition. This skill wires a disciplined
11
+ methodology to monomind's real `performance` and `analyze` command surfaces.
18
12
 
19
- ## Quick Start
13
+ **Core principle:** ALWAYS measure before optimizing. ALWAYS confirm a bottleneck is
14
+ real before fixing it. Symptoms are not root causes.
20
15
 
21
- ### Basic Bottleneck Detection
22
- ```bash
23
- npx monomind bottleneck detect
16
+ **Iron Law:**
24
17
  ```
25
-
26
- ### Generate Performance Report
27
- ```bash
28
- npx monomind analysis performance-report --format html --include-metrics
18
+ NO OPTIMIZATION WITHOUT A MEASURED BOTTLENECK FIRST
29
19
  ```
30
20
 
31
- ### Analyze and Auto-Fix
21
+ ## When to Use
22
+
23
+ - Something feels slow (swarm run, memory search, build, MCP tool call)
24
+ - Before/after a change that could affect performance
25
+ - A regression report or user complaint about latency
26
+ - Capacity planning — picking `maxAgents`, topology, or memory backend
27
+ - Token burn higher than expected
28
+
29
+ **Use ESPECIALLY when:** the fix "feels obvious". Obvious fixes without measurement
30
+ are the most common source of fake optimizations.
31
+
32
+ ## The Real Command Surface
33
+
34
+ These are the ONLY performance/analysis commands. Anything else is wrong.
35
+
36
+ | Command | What it does |
37
+ |---|---|
38
+ | `monomind performance benchmark` | Run benchmarks (wasm/neural/memory/search) |
39
+ | `monomind performance profile` | Profile CPU/memory/IO over a window |
40
+ | `monomind performance metrics` | View/export metrics (1h/24h/7d/30d) |
41
+ | `monomind performance bottleneck` | Identify bottlenecks (quick or full) |
42
+ | `monomind analyze diff` | Git diff risk + change classification |
43
+ | `monomind analyze code` | Static code analysis |
44
+ | `monomind analyze deps` | Dependency analysis (`--security` for CVEs) |
45
+ | `monomind analyze ast` | AST analysis via tree-sitter |
46
+ | `monomind analyze complexity` | Code complexity metrics |
47
+ | `monomind analyze symbols` | Extract functions/classes/types |
48
+ | `monomind analyze imports` | Import dependency graph |
49
+ | `monomind doctor` | 28 health-check categories |
50
+ | `monomind hooks metrics` | Learning metrics dashboard |
51
+ | `monomind tokens dashboard` | Token usage (`today`/`week`/`30days`/`month`) |
52
+
53
+ > Use `npx monomind@latest ...` from outside the repo; inside the repo `node packages/@monomind/cli/bin/cli.js ...` works too. Never use `monomind@alpha`.
54
+
55
+ ## The Four Phases
56
+
57
+ Complete each phase before moving on. Skipping a phase produces fake optimizations.
58
+
59
+ ---
60
+
61
+ ### Phase 1: Establish a Baseline
62
+
63
+ Before changing anything, capture the current state so later comparison is honest.
64
+
32
65
  ```bash
33
- npx monomind bottleneck detect --fix --threshold 15
66
+ # Benchmark the subsystems you care about
67
+ npx monomind@latest performance benchmark -s all -i 100 -o json > baseline-bench.json
68
+
69
+ # Snapshot current metrics for the relevant window
70
+ npx monomind@latest performance metrics -t 24h -f json > baseline-metrics.json
71
+
72
+ # Capture a profile so you know where time is going today
73
+ npx monomind@latest performance profile -t all -d 60 -o baseline-profile.json
34
74
  ```
35
75
 
36
- ## Core Capabilities
76
+ **Success criteria:** you have numbers on disk for "before". No before, no after.
77
+
78
+ ---
79
+
80
+ ### Phase 2: Find the Bottleneck (don't guess, ask the system)
37
81
 
38
- ### 1. Bottleneck Detection
82
+ `performance bottleneck` answers the question "where is time being spent?".
39
83
 
40
- #### Command Syntax
41
84
  ```bash
42
- npx monomind bottleneck detect [options]
85
+ # Quick triage across the whole system
86
+ npx monomind@latest performance bottleneck
87
+
88
+ # Deep dive when quick confirms something is off
89
+ npx monomind@latest performance bottleneck -d full
90
+
91
+ # Scope to a suspected component (e.g. network, memory, search)
92
+ npx monomind@latest performance bottleneck -c memory
43
93
  ```
44
94
 
45
- #### Options
46
- - `--swarm-id, -s <id>` - Analyze specific swarm (default: current)
47
- - `--time-range, -t <range>` - Analysis period: 1h, 24h, 7d, all (default: 1h)
48
- - `--threshold <percent>` - Bottleneck threshold percentage (default: 20)
49
- - `--export, -e <file>` - Export analysis to file
50
- - `--fix` - Apply automatic optimizations
95
+ **Map symptoms to components:**
51
96
 
52
- #### Usage Examples
53
- ```bash
54
- # Basic detection for current swarm
55
- npx monomind bottleneck detect
97
+ | Symptom | First component to check |
98
+ |---|---|
99
+ | Slow swarm coordination | network (inter-agent messages) |
100
+ | Memory search slow | memory (SQLite vs. WASM fallback path) |
101
+ | Token burn surprise | cpu / model invocation |
102
+ | Boot/startup slow | io (file reads, graph load) |
103
+ | MCP tool latency | network (server round-trip) |
56
104
 
57
- # Analyze specific swarm over 24 hours
58
- npx monomind bottleneck detect --swarm-id swarm-123 -t 24h
105
+ **If `bottleneck` reports nothing:** the problem may be code-level, not system-level.
106
+ Move to Phase 2b.
59
107
 
60
- # Export detailed analysis
61
- npx monomind bottleneck detect -t 24h -e bottlenecks.json
108
+ #### Phase 2b: Code-Level Analysis
62
109
 
63
- # Auto-fix detected issues
64
- npx monomind bottleneck detect --fix --threshold 15
110
+ When the system is healthy but the code is slow, switch to `analyze`:
65
111
 
66
- # Low threshold for sensitive detection
67
- npx monomind bottleneck detect --threshold 10 --export critical-issues.json
68
- ```
112
+ ```bash
113
+ # Riskiest recent change — most likely regression source
114
+ npx monomind@latest analyze diff --risk --classify -v
69
115
 
70
- #### Metrics Analyzed
71
-
72
- **Communication Bottlenecks:**
73
- - Message queue delays
74
- - Agent response times
75
- - Coordination overhead
76
- - Memory access patterns
77
- - Inter-agent communication latency
78
-
79
- **Processing Bottlenecks:**
80
- - Task completion times
81
- - Agent utilization rates
82
- - Parallel execution efficiency
83
- - Resource contention
84
- - CPU/memory usage patterns
85
-
86
- **Memory Bottlenecks:**
87
- - Cache hit rates
88
- - Memory access patterns
89
- - Storage I/O performance
90
- - Neural pattern loading times
91
- - Memory allocation efficiency
92
-
93
- **Network Bottlenecks:**
94
- - API call latency
95
- - MCP communication delays
96
- - External service timeouts
97
- - Concurrent request limits
98
- - Network throughput issues
99
-
100
- #### Output Format
101
- ```
102
- 🔍 Bottleneck Analysis Report
103
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━
104
-
105
- 📊 Summary
106
- ├── Time Range: Last 1 hour
107
- ├── Agents Analyzed: 6
108
- ├── Tasks Processed: 42
109
- └── Critical Issues: 2
110
-
111
- 🚨 Critical Bottlenecks
112
- 1. Agent Communication (35% impact)
113
- └── coordinator → coder-1 messages delayed by 2.3s avg
114
-
115
- 2. Memory Access (28% impact)
116
- └── Neural pattern loading taking 1.8s per access
117
-
118
- ⚠️ Warning Bottlenecks
119
- 1. Task Queue (18% impact)
120
- └── 5 tasks waiting > 10s for assignment
121
-
122
- 💡 Recommendations
123
- 1. Switch to hierarchical topology (est. 40% improvement)
124
- 2. Enable memory caching (est. 25% improvement)
125
- 3. Increase agent concurrency to 8 (est. 20% improvement)
126
-
127
- ✅ Quick Fixes Available
128
- Run with --fix to apply:
129
- - Enable smart caching
130
- - Optimize message routing
131
- - Adjust agent priorities
132
- ```
116
+ # Flag high-complexity hotspots (default threshold 10)
117
+ npx monomind@latest analyze complexity src/ -t 15 -f json
133
118
 
134
- ### 2. Performance Profiling
135
-
136
- #### Real-time Detection
137
- Automatic analysis during task execution:
138
- - Execution time vs. complexity
139
- - Agent utilization rates
140
- - Resource constraints
141
- - Operation patterns
142
-
143
- #### Common Bottleneck Patterns
144
-
145
- **Time Bottlenecks:**
146
- - Tasks taking > 5 minutes
147
- - Sequential operations that could parallelize
148
- - Redundant file operations
149
- - Inefficient algorithm implementations
150
-
151
- **Coordination Bottlenecks:**
152
- - Single agent for complex tasks
153
- - Unbalanced agent workloads
154
- - Poor topology selection
155
- - Excessive synchronization points
156
-
157
- **Resource Bottlenecks:**
158
- - High operation count (> 100)
159
- - Memory constraints
160
- - I/O limitations
161
- - Thread pool saturation
162
-
163
- #### MCP Integration
164
- ```javascript
165
- // Check for bottlenecks in Claude Code
166
- mcp__monomind__bottleneck_detect({
167
- timeRange: "1h",
168
- threshold: 20,
169
- autoFix: false
170
- })
171
-
172
- // Get detailed task results with bottleneck analysis
173
- mcp__monomind__task_results({
174
- taskId: "task-123",
175
- format: "detailed"
176
- })
177
- ```
119
+ # Inspect import graph for accidental heavy dependencies
120
+ npx monomind@latest analyze imports src/ --external
178
121
 
179
- **Result Format:**
180
- ```json
181
- {
182
- "bottlenecks": [
183
- {
184
- "type": "coordination",
185
- "severity": "high",
186
- "description": "Single agent used for complex task",
187
- "recommendation": "Spawn specialized agents for parallel work",
188
- "impact": "35%",
189
- "affectedComponents": ["coordinator", "coder-1"]
190
- }
191
- ],
192
- "improvements": [
193
- {
194
- "area": "execution_time",
195
- "suggestion": "Use parallel task execution",
196
- "expectedImprovement": "30-50% time reduction",
197
- "implementationSteps": [
198
- "Split task into smaller units",
199
- "Spawn 3-4 specialized agents",
200
- "Use mesh topology for coordination"
201
- ]
202
- }
203
- ],
204
- "metrics": {
205
- "avgExecutionTime": "142s",
206
- "agentUtilization": "67%",
207
- "cacheHitRate": "82%",
208
- "parallelizationFactor": 1.2
209
- }
210
- }
122
+ # Dependency audit (CVEs and bloat both hurt performance)
123
+ npx monomind@latest analyze deps --security
211
124
  ```
212
125
 
213
- ### 3. Report Generation
126
+ **Heuristic:** a regression that appeared in the last N commits is almost always
127
+ visible in `analyze diff --risk`. Start there before going deeper.
128
+
129
+ ---
130
+
131
+ ### Phase 3: Interpret the Metrics
132
+
133
+ Numbers without interpretation are noise. Read the dashboard, then explain it.
214
134
 
215
- #### Command Syntax
216
135
  ```bash
217
- npx monomind analysis performance-report [options]
136
+ # Pull a metrics view for the affected window
137
+ npx monomind@latest performance metrics -t 7d -f text
138
+
139
+ # Prometheus export for Grafana / long-term storage
140
+ npx monomind@latest performance metrics -t 30d -f prometheus > metrics.prom
141
+
142
+ # Cross-check learning hooks (these run in the background and affect timings)
143
+ npx monomind@latest hooks metrics
144
+
145
+ # Token spend — high burn often correlates with perf pain
146
+ npx monomind@latest tokens dashboard -p week --no-interactive
218
147
  ```
219
148
 
220
- #### Options
221
- - `--format <type>` - Report format: json, html, markdown (default: markdown)
222
- - `--include-metrics` - Include detailed metrics and charts
223
- - `--compare <id>` - Compare with previous swarm
224
- - `--time-range <range>` - Analysis period: 1h, 24h, 7d, 30d, all
225
- - `--output <file>` - Output file path
226
- - `--sections <list>` - Comma-separated sections to include
227
-
228
- #### Report Sections
229
- 1. **Executive Summary**
230
- - Overall performance score
231
- - Key metrics overview
232
- - Critical findings
233
-
234
- 2. **Swarm Overview**
235
- - Topology configuration
236
- - Agent distribution
237
- - Task statistics
238
-
239
- 3. **Performance Metrics**
240
- - Execution times
241
- - Throughput analysis
242
- - Resource utilization
243
- - Latency breakdown
244
-
245
- 4. **Bottleneck Analysis**
246
- - Identified bottlenecks
247
- - Impact assessment
248
- - Optimization priorities
249
-
250
- 5. **Comparative Analysis** (when --compare used)
251
- - Performance trends
252
- - Improvement metrics
253
- - Regression detection
254
-
255
- 6. **Recommendations**
256
- - Prioritized action items
257
- - Expected improvements
258
- - Implementation guidance
259
-
260
- #### Usage Examples
149
+ **Interpretation rules:**
150
+
151
+ - A single high number is not a bottleneck. A high number *with user-visible pain*
152
+ is. Always tie metrics back to a symptom.
153
+ - Compare like-for-like: same window, same load, same machine. A 7d average next to
154
+ a 1h spike is meaningless.
155
+ - Latency has tails. Always look at p95/p99, not just mean — means hide outliers.
156
+ - Cache hit rate below ~80% usually means the working set is bigger than the cache
157
+ OR the eviction policy is wrong. Both are fixable.
158
+
159
+ ---
160
+
161
+ ### Phase 4: Apply One Fix, Re-measure, Decide
162
+
163
+ One change. One measurement. Then decide.
164
+
261
165
  ```bash
262
- # Generate HTML report with all metrics
263
- npx monomind analysis performance-report --format html --include-metrics
264
-
265
- # Compare current swarm with previous
266
- npx monomind analysis performance-report --compare swarm-123 --format markdown
267
-
268
- # Custom output with specific sections
269
- npx monomind analysis performance-report \
270
- --sections summary,metrics,recommendations \
271
- --output reports/perf-analysis.html \
272
- --format html
273
-
274
- # Weekly performance report
275
- npx monomind analysis performance-report \
276
- --time-range 7d \
277
- --include-metrics \
278
- --format markdown \
279
- --output docs/weekly-performance.md
280
-
281
- # JSON format for CI/CD integration
282
- npx monomind analysis performance-report \
283
- --format json \
284
- --output build/performance.json
285
- ```
166
+ # Apply the single fix you hypothesized from Phase 2/3 evidence
286
167
 
287
- #### Sample Markdown Report
288
- ```markdown
289
- # Performance Analysis Report
290
-
291
- ## Executive Summary
292
- - **Overall Score**: 87/100
293
- - **Analysis Period**: Last 24 hours
294
- - **Swarms Analyzed**: 3
295
- - **Critical Issues**: 1
296
-
297
- ## Key Metrics
298
- | Metric | Value | Trend | Target |
299
- |--------|-------|-------|--------|
300
- | Avg Task Time | 42s | ↓ 12% | 35s |
301
- | Agent Utilization | 78% | ↑ 5% | 85% |
302
- | Cache Hit Rate | 91% | → | 90% |
303
- | Parallel Efficiency | 2.3x | ↑ 0.4x | 2.5x |
304
-
305
- ## Bottleneck Analysis
306
- ### Critical
307
- 1. **Agent Communication Delay** (Impact: 35%)
308
- - Coordinator → Coder messages delayed by 2.3s avg
309
- - **Fix**: Switch to hierarchical topology
310
-
311
- ### Warnings
312
- 1. **Memory Access Pattern** (Impact: 18%)
313
- - Neural pattern loading: 1.8s per access
314
- - **Fix**: Enable memory caching
315
-
316
- ## Recommendations
317
- 1. **High Priority**: Switch to hierarchical topology (40% improvement)
318
- 2. **Medium Priority**: Enable memory caching (25% improvement)
319
- 3. **Low Priority**: Increase agent concurrency to 8 (20% improvement)
168
+ # Re-run the EXACT same baseline commands
169
+ npx monomind@latest performance benchmark -s all -i 100 -o json > after-bench.json
170
+ npx monomind@latest performance metrics -t 24h -f json > after-metrics.json
171
+ npx monomind@latest performance profile -t all -d 60 -o after-profile.json
172
+
173
+ # Diff before vs after. Did the targeted metric move? Did anything else regress?
320
174
  ```
321
175
 
322
- ### 4. Optimization Recommendations
323
-
324
- #### Automatic Fixes
325
- When using `--fix`, the following optimizations may be applied:
326
-
327
- **1. Topology Optimization**
328
- - Switch to more efficient topology (mesh → hierarchical)
329
- - Adjust communication patterns
330
- - Reduce coordination overhead
331
- - Optimize message routing
332
-
333
- **2. Caching Enhancement**
334
- - Enable memory caching
335
- - Optimize cache strategies
336
- - Preload common patterns
337
- - Implement cache warming
338
-
339
- **3. Concurrency Tuning**
340
- - Adjust agent counts
341
- - Optimize parallel execution
342
- - Balance workload distribution
343
- - Implement load balancing
344
-
345
- **4. Priority Adjustment**
346
- - Reorder task queues
347
- - Prioritize critical paths
348
- - Reduce wait times
349
- - Implement fair scheduling
350
-
351
- **5. Resource Optimization**
352
- - Optimize memory usage
353
- - Reduce I/O operations
354
- - Batch API calls
355
- - Implement connection pooling
356
-
357
- #### Performance Impact
358
- Typical improvements after bottleneck resolution:
359
-
360
- - **Communication**: 30-50% faster message delivery
361
- - **Processing**: 20-40% reduced task completion time
362
- - **Memory**: 40-60% fewer cache misses
363
- - **Network**: 25-45% reduced API latency
364
- - **Overall**: 25-45% total performance improvement
365
-
366
- ## Advanced Usage
367
-
368
- ### Continuous Monitoring
176
+ **Decision rules:**
177
+
178
+ - Target metric improved, nothing regressed → ship it.
179
+ - Target metric improved, something else regressed → weigh tradeoffs explicitly.
180
+ Don't ship on hope.
181
+ - Target metric unchanged → the bottleneck was misdiagnosed. Return to Phase 2 with
182
+ new evidence. Do not apply a second fix on top of a failed one.
183
+ - 3+ fixes in a row with no movement → this is architectural (see below).
184
+
185
+ ---
186
+
187
+ ## Methodology: Regression Detection
188
+
189
+ Performance regressions slip in through code changes. Catch them at the diff, not in
190
+ production.
191
+
369
192
  ```bash
370
- # Monitor performance in real-time
371
- npx monomind swarm monitor --interval 5
372
-
373
- # Generate hourly reports
374
- while true; do
375
- npx monomind analysis performance-report \
376
- --format json \
377
- --output logs/perf-$(date +%Y%m%d-%H%M).json
378
- sleep 3600
379
- done
193
+ # Before merging any change that touches a hot path:
194
+ npx monomind@latest analyze diff --risk -v
195
+
196
+ # Classify the change so reviewers know what they're looking at
197
+ npx monomind@latest analyze diff --classify --reviewers
198
+
199
+ # Compare the current branch against main explicitly
200
+ npx monomind@latest analyze diff main..HEAD --risk --format json
380
201
  ```
381
202
 
382
- ### CI/CD Integration
383
- ```yaml
384
- # .github/workflows/performance.yml
385
- name: Performance Analysis
386
- on: [push, pull_request]
203
+ **CI integration (GitHub Action):**
387
204
 
205
+ ```yaml
206
+ name: Performance Gate
207
+ on: [pull_request]
388
208
  jobs:
389
- analyze:
209
+ perf:
390
210
  runs-on: ubuntu-latest
391
211
  steps:
392
- - uses: actions/checkout@v2
393
- - name: Run Performance Analysis
394
- run: |
395
- npx monomind analysis performance-report \
396
- --format json \
397
- --output performance.json
398
- - name: Check Performance Thresholds
399
- run: |
400
- npx monomind bottleneck detect \
401
- --threshold 15 \
402
- --export bottlenecks.json
403
- - name: Upload Reports
404
- uses: actions/upload-artifact@v2
212
+ - uses: actions/checkout@v4
213
+ - name: Risk-classify the diff
214
+ run: npx monomind@latest analyze diff main..HEAD --risk --format json > diff-risk.json
215
+ - name: Snapshot metrics
216
+ run: npx monomind@latest performance metrics -t 24h -f json > metrics.json
217
+ - uses: actions/upload-artifact@v4
405
218
  with:
406
- name: performance-reports
219
+ name: perf-gate
407
220
  path: |
408
- performance.json
409
- bottlenecks.json
410
- ```
411
-
412
- ### Custom Analysis Scripts
413
- ```javascript
414
- // scripts/analyze-performance.js
415
- const { exec } = require('child_process');
416
- const fs = require('fs');
417
-
418
- async function analyzePerformance() {
419
- // Run bottleneck detection
420
- const bottlenecks = await runCommand(
421
- 'npx monomind bottleneck detect --format json'
422
- );
423
-
424
- // Generate performance report
425
- const report = await runCommand(
426
- 'npx monomind analysis performance-report --format json'
427
- );
428
-
429
- // Analyze results
430
- const analysis = {
431
- bottlenecks: JSON.parse(bottlenecks),
432
- performance: JSON.parse(report),
433
- timestamp: new Date().toISOString()
434
- };
435
-
436
- // Save combined analysis
437
- fs.writeFileSync(
438
- 'analysis/combined-report.json',
439
- JSON.stringify(analysis, null, 2)
440
- );
441
-
442
- // Generate alerts if needed
443
- if (analysis.bottlenecks.critical.length > 0) {
444
- console.error('CRITICAL: Performance bottlenecks detected!');
445
- process.exit(1);
446
- }
447
- }
448
-
449
- function runCommand(cmd) {
450
- return new Promise((resolve, reject) => {
451
- exec(cmd, (error, stdout, stderr) => {
452
- if (error) reject(error);
453
- else resolve(stdout);
454
- });
455
- });
456
- }
457
-
458
- analyzePerformance().catch(console.error);
221
+ diff-risk.json
222
+ metrics.json
459
223
  ```
460
224
 
461
- ## Best Practices
225
+ > Don't fail CI on a raw number threshold unless you have a stable baseline. Prefer
226
+ > *risk classification* (qualitative) over *latency thresholds* (fragile) for the
227
+ > gate, and use metrics for trend analysis offline.
462
228
 
463
- ### 1. Regular Analysis
464
- - Run bottleneck detection after major changes
465
- - Generate weekly performance reports
466
- - Monitor trends over time
467
- - Set up automated alerts
229
+ ---
468
230
 
469
- ### 2. Threshold Tuning
470
- - Start with default threshold (20%)
471
- - Lower for production systems (10-15%)
472
- - Higher for development (25-30%)
473
- - Adjust based on requirements
231
+ ## Methodology: Optimization Recommendations
474
232
 
475
- ### 3. Fix Strategy
476
- - Always review before applying --fix
477
- - Test fixes in development first
478
- - Apply fixes incrementally
479
- - Monitor impact after changes
233
+ When `performance bottleneck` reports findings, map them to actions in this order:
480
234
 
481
- ### 4. Report Integration
482
- - Include in documentation
483
- - Share with team regularly
484
- - Track improvements over time
485
- - Use for capacity planning
235
+ | Bottleneck type | First-action recommendation |
236
+ |---|---|
237
+ | network | Check topology (`hierarchical` vs `mesh`); reduce message round-trips |
238
+ | memory | Confirm SQLite bridge is up (not the WASM/JSON fallback); widen cache |
239
+ | cpu | Profile (`performance profile -t cpu`) to find the hot function |
240
+ | io | Batch file reads; lazy-load graphs; check for sync I/O on hot path |
241
+ | search | Rebuild monograph; verify BM25 index is current |
242
+ | coordination | Lower `maxAgents` if utilization is low; raise it if queue is deep |
486
243
 
487
- ### 5. Continuous Optimization
488
- - Learn from each analysis
489
- - Build performance budgets
490
- - Establish baselines
491
- - Set improvement goals
244
+ **Always:** state the recommendation as a hypothesis, apply it as a single change,
245
+ and verify with Phase 4. Recommendations without re-measurement are guesses.
492
246
 
493
- ## Troubleshooting
247
+ ---
494
248
 
495
- ### Common Issues
249
+ ## Continuous Monitoring
496
250
 
497
- **High Memory Usage**
498
251
  ```bash
499
- # Analyze memory bottlenecks
500
- npx monomind bottleneck detect --threshold 10
252
+ # Weekly metrics snapshot for trend analysis
253
+ npx monomind@latest performance metrics -t 7d -f json > "perf-$(date +%Y%m%d).json"
501
254
 
502
- # Check cache performance
503
- npx monomind cache manage --action stats
255
+ # Doctor runs 28 health categories — include it in weekly review
256
+ npx monomind@latest doctor
504
257
 
505
- # Review memory metrics
506
- npx monomind memory usage
258
+ # Hooks metrics show what the background workers are costing you
259
+ npx monomind@latest hooks metrics
507
260
  ```
508
261
 
509
- **Slow Task Execution**
510
- ```bash
511
- # Identify slow tasks
512
- npx monomind task status --detailed
513
-
514
- # Analyze coordination overhead
515
- npx monomind bottleneck detect --time-range 1h
516
-
517
- # Check agent utilization
518
- npx monomind agent metrics
519
- ```
262
+ For long-term storage, pipe `performance metrics -f prometheus` into a Prometheus
263
+ instance and let Grafana draw the trends.
520
264
 
521
- **Poor Cache Performance**
522
- ```bash
523
- # Analyze cache hit rates
524
- npx monomind analysis performance-report --sections metrics
265
+ ---
525
266
 
526
- # Review cache strategy
527
- npx monomind cache manage --action analyze
267
+ ## Red Flags — STOP and Return to Phase 1
528
268
 
529
- # Enable cache warming
530
- npx monomind bottleneck detect --fix
531
- ```
269
+ | Thought / Action | What it means |
270
+ |---|---|
271
+ | "This is obviously slow, let me optimize it" | No measured bottleneck. Phase 1 first. |
272
+ | "I'll add a cache, that always helps" | Cache without a measured miss rate is bloat. |
273
+ | "Let me try a few optimizations together" | Can't isolate what worked. One change. |
274
+ | "Benchmark improved so we're done" | Did anything else regress? Check, don't assume. |
275
+ | "It feels faster now" | Feeling is not measurement. Re-run baseline. |
276
+ | 3+ fixes applied, no movement | Architectural problem. Stop, discuss design. |
532
277
 
533
278
  ## Integration with Other Skills
534
279
 
535
- - **swarm-orchestration**: Use performance data to optimize topology
536
- - **memory-management**: Improve cache strategies based on analysis
537
- - **task-coordination**: Adjust scheduling based on bottlenecks
538
- - **neural-training**: Train patterns from performance data
280
+ - **`mastermind-debug`** — Phase 1 root-cause methodology underpins this skill
281
+ - **`swarm-orchestration`** — topology decisions driven by bottleneck findings
282
+ - **`verification-quality`** — confirm the optimization actually held
283
+ - **`mastermind-verify`** — evidence-before-claims for "is it faster?"
539
284
 
540
- ## Related Commands
285
+ ## Quick Reference
541
286
 
542
- - `npx monomind swarm monitor` - Real-time monitoring
543
- - `npx monomind token usage` - Token optimization analysis
544
- - `npx monomind cache manage` - Cache optimization
545
- - `npx monomind agent metrics` - Agent performance metrics
546
- - `npx monomind task status` - Task execution analysis
287
+ | Phase | Key command | Success criteria |
288
+ |---|---|---|
289
+ | 1. Baseline | `performance benchmark` + `metrics` | Numbers on disk |
290
+ | 2. Bottleneck | `performance bottleneck -d full` | Named component or code hotspot |
291
+ | 2b. Code-level | `analyze diff --risk`, `analyze complexity` | Risky change or hotspot file found |
292
+ | 3. Interpret | `performance metrics`, `tokens dashboard` | Metric tied to a symptom |
293
+ | 4. Fix + re-measure | same baseline commands | Target moved, nothing regressed |
547
294
 
548
295
  ## See Also
549
296
 
550
- - [Bottleneck Detection Guide](https://github.com/monoes/monomind/wiki/bottleneck-detect)
551
- - [Performance Report Guide](https://github.com/monoes/monomind/wiki/performance-report)
552
- - [Performance Bottlenecks Overview](https://github.com/monoes/monomind/wiki/performance-bottlenecks)
553
- - [Swarm Monitoring Documentation](../swarm-orchestration/SKILL.md)
554
- - [Memory Management Documentation](../memory-management/SKILL.md)
297
+ - [Systematic Debugging](../mastermind-debug/SKILL.md)
298
+ - [Swarm Orchestration](../swarm-orchestration/SKILL.md)
299
+ - [Verification & Quality](../verification-quality/SKILL.md)
555
300
 
556
301
  ---
557
302
 
558
- **Version**: 1.0.0
559
- **Last Updated**: 2025-10-19
560
- **Maintainer**: Monomind Team
303
+ **Version**: 2.0.0
304
+ **Last Updated**: 2026-08-12