monomind 1.18.13 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/.claude/agents/core/researcher.md +29 -24
  2. package/.claude/agents/github/code-review-swarm.md +1 -1
  3. package/.claude/agents/github/github-modes.md +1 -1
  4. package/.claude/agents/github/issue-tracker.md +1 -1
  5. package/.claude/agents/github/multi-repo-swarm.md +1 -1
  6. package/.claude/agents/github/pr-manager.md +1 -1
  7. package/.claude/agents/github/project-board-sync.md +1 -1
  8. package/.claude/agents/github/release-manager.md +1 -1
  9. package/.claude/agents/github/repo-architect.md +1 -1
  10. package/.claude/agents/github/swarm-issue.md +1 -1
  11. package/.claude/agents/github/swarm-pr.md +1 -1
  12. package/.claude/agents/github/sync-coordinator.md +1 -1
  13. package/.claude/agents/github/workflow-automation.md +1 -1
  14. package/.claude/agents/goal/goal-planner.md +1 -1
  15. package/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
  16. package/.claude/agents/testing/production-validator.md +8 -7
  17. package/.claude/agents/testing/testing-evidence-collector.md +3 -1
  18. package/.claude/commands/mastermind/_repeat.md +22 -3
  19. package/.claude/commands/mastermind/architect.md +1 -1
  20. package/.claude/commands/mastermind/autodev.md +1 -1
  21. package/.claude/commands/mastermind/build.md +1 -1
  22. package/.claude/commands/mastermind/code-review.md +5 -5
  23. package/.claude/commands/mastermind/debug.md +1 -1
  24. package/.claude/commands/mastermind/help.md +2 -2
  25. package/.claude/commands/mastermind/idea.md +1 -1
  26. package/.claude/commands/mastermind/improve.md +1 -1
  27. package/.claude/commands/mastermind/okf-export.md +14 -0
  28. package/.claude/commands/mastermind/okf-import.md +15 -0
  29. package/.claude/commands/mastermind/plan.md +1 -1
  30. package/.claude/commands/mastermind/research.md +1 -1
  31. package/.claude/commands/mastermind/review.md +12 -1
  32. package/.claude/commands/mastermind/runorg.md +1 -1
  33. package/.claude/commands/mastermind/taskdev.md +1 -1
  34. package/.claude/commands/mastermind/tdd.md +1 -1
  35. package/.claude/commands/mastermind/verify.md +1 -1
  36. package/.claude/helpers/graphify-freshen.cjs +16 -20
  37. package/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
  38. package/.claude/helpers/handlers/capture-handler.cjs +110 -0
  39. package/.claude/helpers/handlers/route-handler.cjs +180 -256
  40. package/.claude/helpers/handlers/session-handler.cjs +139 -142
  41. package/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
  42. package/.claude/helpers/handlers/task-handler.cjs +8 -155
  43. package/.claude/helpers/hook-handler.cjs +89 -5
  44. package/.claude/helpers/intelligence.cjs +164 -15
  45. package/.claude/helpers/learning-service.mjs +1 -0
  46. package/.claude/helpers/mastermind-activate.cjs +33 -51
  47. package/.claude/helpers/monolean-activate.cjs +13 -3
  48. package/.claude/helpers/monolean-propagate.cjs +7 -3
  49. package/.claude/helpers/router.cjs +47 -9
  50. package/.claude/helpers/utils/monograph.cjs +37 -20
  51. package/.claude/settings.json +0 -20
  52. package/.claude/skills/mastermind-skills/_repeat.md +29 -4
  53. package/.claude/skills/mastermind-skills/architect.md +5 -6
  54. package/.claude/skills/mastermind-skills/autodev.md +8 -5
  55. package/.claude/skills/mastermind-skills/review.md +25 -11
  56. package/.claude/skills/mastermind-skills/techport.md +37 -3
  57. package/.claude/skills/monodesign/document.md +9 -6
  58. package/.claude/skills/monodesign/extract.md +1 -1
  59. package/.claude/skills/monodesign/reference/document.md +1 -1
  60. package/.claude/skills/monodesign/reference/live.md +1 -1
  61. package/.claude/skills/monolean/SKILL.md +1 -1
  62. package/package.json +1 -1
  63. package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
  64. package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
  65. package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
  66. package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -1
  67. package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
  68. package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -1
  69. package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
  70. package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
  71. package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +1 -1
  72. package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
  73. package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
  74. package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
  75. package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
  76. package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -1
  77. package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
  78. package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
  79. package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
  80. package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +22 -3
  81. package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +1 -1
  82. package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +1 -1
  83. package/packages/@monomind/cli/.claude/commands/mastermind/build.md +1 -1
  84. package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +5 -5
  85. package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +1 -1
  86. package/packages/@monomind/cli/.claude/commands/mastermind/help.md +2 -2
  87. package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +1 -1
  88. package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +1 -1
  89. package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
  90. package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
  91. package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +1 -1
  92. package/packages/@monomind/cli/.claude/commands/mastermind/research.md +1 -1
  93. package/packages/@monomind/cli/.claude/commands/mastermind/review.md +12 -1
  94. package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +1 -1
  95. package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +1 -1
  96. package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +1 -1
  97. package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +1 -1
  98. package/packages/@monomind/cli/.claude/helpers/graphify-freshen.cjs +16 -20
  99. package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
  100. package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
  101. package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +180 -256
  102. package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +139 -142
  103. package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
  104. package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -155
  105. package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +89 -5
  106. package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +164 -15
  107. package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
  108. package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
  109. package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
  110. package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
  111. package/packages/@monomind/cli/.claude/helpers/router.cjs +47 -9
  112. package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +37 -20
  113. package/packages/@monomind/cli/.claude/skills/mastermind-skills/_repeat.md +29 -4
  114. package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
  115. package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
  116. package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +25 -11
  117. package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
  118. package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
  119. package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
  120. package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
  121. package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
  122. package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
  123. package/packages/@monomind/cli/bin/mcp-server.js +11 -1
  124. package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
  125. package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
  126. package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
  127. package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
  128. package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
  129. package/packages/@monomind/cli/dist/src/commands/completions.js +11 -56
  130. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -1
  131. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +1 -1
  132. package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
  133. package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
  134. package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
  135. package/packages/@monomind/cli/dist/src/commands/hive-mind.js +2 -5
  136. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
  137. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
  138. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
  139. package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
  140. package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
  141. package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
  142. package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -51
  143. package/packages/@monomind/cli/dist/src/commands/index.js +36 -184
  144. package/packages/@monomind/cli/dist/src/commands/init-wizard.js +2 -4
  145. package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
  146. package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
  147. package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
  148. package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
  149. package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
  150. package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
  151. package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
  152. package/packages/@monomind/cli/dist/src/commands/neural-core.js +145 -6
  153. package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +4 -4
  154. package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
  155. package/packages/@monomind/cli/dist/src/commands/neural-registry.js +4 -4
  156. package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
  157. package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
  158. package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
  159. package/packages/@monomind/cli/dist/src/commands/providers.js +2 -131
  160. package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
  161. package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
  162. package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
  163. package/packages/@monomind/cli/dist/src/commands/session.js +1 -285
  164. package/packages/@monomind/cli/dist/src/commands/start.js +2 -41
  165. package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
  166. package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
  167. package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
  168. package/packages/@monomind/cli/dist/src/commands/workflow.js +2 -104
  169. package/packages/@monomind/cli/dist/src/index.js +7 -0
  170. package/packages/@monomind/cli/dist/src/init/executor.js +3 -14
  171. package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
  172. package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -1
  173. package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -3
  174. package/packages/@monomind/cli/dist/src/init/types.js +0 -2
  175. package/packages/@monomind/cli/dist/src/mcp-client.js +0 -6
  176. package/packages/@monomind/cli/dist/src/mcp-server.js +16 -0
  177. package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
  178. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
  179. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
  180. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
  181. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
  182. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
  183. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
  184. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
  185. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
  186. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
  187. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
  188. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +5 -9
  189. package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +2 -2
  190. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +25 -3
  191. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
  192. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +45 -159
  193. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -4
  194. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
  195. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -3
  196. package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -0
  197. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +452 -7
  198. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +4 -10
  199. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +28 -54
  200. package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
  201. package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
  202. package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
  203. package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
  204. package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
  205. package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +7 -8
  206. package/packages/@monomind/cli/dist/src/memory/intelligence.js +15 -16
  207. package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
  208. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +37 -0
  209. package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +3 -21
  210. package/packages/@monomind/cli/dist/src/services/worker-daemon.js +13 -80
  211. package/packages/@monomind/cli/dist/src/suggest.js +0 -5
  212. package/packages/@monomind/cli/package.json +1 -1
  213. package/packages/@monomind/guidance/README.md +49 -1153
  214. package/packages/@monomind/guidance/package.json +1 -74
  215. package/.claude/helpers/auto-memory-hook.mjs +0 -503
  216. package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
  217. package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
  218. package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
@@ -35,26 +35,29 @@ You are a research specialist focused on thorough investigation, pattern analysi
35
35
 
36
36
  ## Research Methodology
37
37
 
38
- ### 1. Information Gathering
39
- - Use multiple search strategies (glob, grep, semantic search)
38
+ ### 1. Information Gathering (monograph-first)
39
+ - **Always start with monograph** call `monograph_query` or `monograph_suggest` before grep/find
40
+ - Only fall back to grep/find if monograph returns 0 results or the DB is not built
40
41
  - Read relevant files completely for context
41
42
  - Check multiple locations for related information
42
- - Consider different naming conventions and patterns
43
43
 
44
44
  ### 2. Pattern Analysis
45
- ```bash
46
- # Example search patterns
47
- - Implementation patterns: grep -r "class.*Controller" --include="*.ts"
48
- - Configuration patterns: glob "**/*.config.*"
49
- - Test patterns: grep -r "describe\|test\|it" --include="*.test.*"
50
- - Import patterns: grep -r "^import.*from" --include="*.ts"
45
+ ```
46
+ # Preferred: monograph for symbol/definition lookups
47
+ monograph_query({ query: "Controller" }) # find controller classes
48
+ monograph_query({ query: "config" }) # find configuration patterns
49
+ monograph_suggest({ task: "test patterns" }) # find test-related files
50
+
51
+ # Fallback only (if monograph returns 0 results):
52
+ grep -r "class.*Controller" --include="*.ts"
53
+ grep -r "^import.*from" --include="*.ts"
51
54
  ```
52
55
 
53
56
  ### 3. Dependency Analysis
54
- - Track import statements and module dependencies
55
- - Identify external package dependencies
56
- - Map internal module relationships
57
- - Document API contracts and interfaces
57
+ - **Use `monograph_neighbors` and `monograph_impact`** for dependency mapping
58
+ - Call `monograph_god_nodes` for high-centrality files
59
+ - Call `monograph_community` for module cluster boundaries
60
+ - Fall back to grep on import statements only if monograph is unavailable
58
61
 
59
62
  ### 4. Documentation Mining
60
63
  - Extract inline comments and JSDoc
@@ -98,21 +101,23 @@ research_findings:
98
101
 
99
102
  ## Search Strategies
100
103
 
101
- ### 1. Broad to Narrow
102
- ```bash
103
- # Start broad
104
- glob "**/*.ts"
105
- # Narrow by pattern
104
+ ### 1. Monograph-First (preferred)
105
+ ```
106
+ # Start with monograph for any symbol or code lookup
107
+ monograph_query({ query: "symbol-name" }) # BM25 keyword search
108
+ monograph_suggest({ task: "description of task" }) # ranked file suggestions
109
+ monograph_neighbors({ name: "ClassName" }) # direct connections
110
+ monograph_impact({ name: "functionName" }) # blast radius
111
+
112
+ # Only if monograph returns 0 results or DB not built:
106
113
  grep -r "specific-pattern" --include="*.ts"
107
- # Focus on specific files
108
- read specific-file.ts
109
114
  ```
110
115
 
111
116
  ### 2. Cross-Reference
112
- - Search for class/function definitions
113
- - Find all usages and references
114
- - Track data flow through the system
115
- - Identify integration points
117
+ - Use `monograph_neighbors` for usages and references
118
+ - Use `monograph_shortest_path` to trace connections between modules
119
+ - Use `monograph_context` for 360° view of a file
120
+ - Fall back to grep only if monograph is unavailable
116
121
 
117
122
  ### 3. Historical Analysis
118
123
  - Review git history for context
@@ -2,7 +2,7 @@
2
2
  name: code-review-swarm
3
3
  description: |
4
4
  Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
5
- tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, Bash, Read, Write, TodoWrite
5
+ tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, Bash, Read, Write, TodoWrite
6
6
  ---
7
7
 
8
8
  # Code Review Swarm - Automated Code Review with AI Agents
@@ -2,7 +2,7 @@
2
2
  name: github-modes
3
3
  description: |
4
4
  Comprehensive GitHub integration modes for workflow orchestration, PR management, and repository coordination with batch optimization
5
- tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, Bash, TodoWrite, Read, Write
5
+ tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, Bash, TodoWrite, Read, Write
6
6
  ---
7
7
 
8
8
  # GitHub Integration Modes
@@ -2,7 +2,7 @@
2
2
  name: issue-tracker
3
3
  description: |
4
4
  Intelligent issue management and project coordination with automated tracking, progress monitoring, and team coordination
5
- tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_store, Bash, TodoWrite, Read, Write
5
+ tools: mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_store, Bash, TodoWrite, Read, Write
6
6
  ---
7
7
 
8
8
  # GitHub Issue Tracker
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: multi-repo-swarm
3
3
  description: Cross-repository swarm orchestration for organization-wide automation and intelligent collaboration
4
- tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__swarm_status, mcp__monomind__memory_usage, mcp__monomind__github_repo_analyze, mcp__monomind__github_pr_manage, mcp__monomind__github_sync_coord, mcp__monomind__github_metrics
4
+ tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__swarm_status, mcp__monomind__memory_usage, mcp__monomind__github_repo_analyze, mcp__monomind__github_pr_manage, mcp__monomind__github_sync_coord, mcp__monomind__github_metrics
5
5
  ---
6
6
 
7
7
  # Multi-Repo Swarm - Cross-Repository Swarm Orchestration
@@ -2,7 +2,7 @@
2
2
  name: pr-manager
3
3
  description: |
4
4
  Comprehensive pull request management with swarm coordination for automated reviews, testing, and merge workflows
5
- tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__swarm_status, mcp__monomind__memory_store, mcp__monomind__github_pr_manage, mcp__monomind__github_code_review, mcp__monomind__github_metrics
5
+ tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__swarm_status, mcp__monomind__memory_store, mcp__monomind__github_pr_manage, mcp__monomind__github_code_review, mcp__monomind__github_metrics
6
6
  ---
7
7
 
8
8
  # GitHub PR Manager
@@ -2,7 +2,7 @@
2
2
  name: project-board-sync
3
3
  description: |
4
4
  Synchronize AI swarms with GitHub Projects for visual task management, progress tracking, and team coordination
5
- tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__swarm_status, mcp__monomind__memory_usage, mcp__monomind__github_repo_analyze, mcp__monomind__github_pr_manage, mcp__monomind__github_issue_track, mcp__monomind__github_metrics, mcp__monomind__workflow_create, mcp__monomind__workflow_execute
5
+ tools: Bash, Read, Write, Edit, Glob, Grep, LS, TodoWrite, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__swarm_status, mcp__monomind__memory_usage, mcp__monomind__github_repo_analyze, mcp__monomind__github_pr_manage, mcp__monomind__github_issue_track, mcp__monomind__github_metrics, mcp__monomind__workflow_create, mcp__monomind__workflow_execute
6
6
  ---
7
7
 
8
8
  # Project Board Sync - GitHub Projects Integration
@@ -2,7 +2,7 @@
2
2
  name: release-manager
3
3
  description: |
4
4
  Automated release coordination and deployment with Monomind swarm orchestration for seamless version management, testing, and deployment across multiple packages
5
- tools: Bash, Read, Write, Edit, TodoWrite, TodoRead, Task, WebFetch, mcp__github__create_pull_request, mcp__github__merge_pull_request, mcp__github__create_branch, mcp__github__push_files, mcp__github__create_issue, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_store
5
+ tools: Bash, Read, Write, Edit, TodoWrite, TodoRead, Task, WebFetch, mcp__github__create_pull_request, mcp__github__merge_pull_request, mcp__github__create_branch, mcp__github__push_files, mcp__github__create_issue, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_store
6
6
  ---
7
7
 
8
8
  # GitHub Release Manager
@@ -2,7 +2,7 @@
2
2
  name: repo-architect
3
3
  description: |
4
4
  Repository structure optimization and multi-repo management with Monomind swarm coordination for scalable project architecture and development workflows
5
- tools: Bash, Read, Write, Edit, LS, Glob, TodoWrite, TodoRead, Task, WebFetch, mcp__github__create_repository, mcp__github__fork_repository, mcp__github__search_repositories, mcp__github__push_files, mcp__github__create_or_update_file, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_store
5
+ tools: Bash, Read, Write, Edit, LS, Glob, TodoWrite, TodoRead, Task, WebFetch, mcp__github__create_repository, mcp__github__fork_repository, mcp__github__search_repositories, mcp__github__push_files, mcp__github__create_or_update_file, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_store
6
6
  ---
7
7
 
8
8
  # GitHub Repository Architect
@@ -2,7 +2,7 @@
2
2
  name: swarm-issue
3
3
  description: |
4
4
  GitHub issue-based swarm coordination agent that transforms issues into intelligent multi-agent tasks with automatic decomposition and progress tracking
5
- tools: mcp__github__get_issue, mcp__github__create_issue, mcp__github__update_issue, mcp__github__list_issues, mcp__github__create_issue_comment, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_usage, TodoWrite, TodoRead, Bash, Grep, Read, Write
5
+ tools: mcp__github__get_issue, mcp__github__create_issue, mcp__github__update_issue, mcp__github__list_issues, mcp__github__create_issue_comment, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_usage, TodoWrite, TodoRead, Bash, Grep, Read, Write
6
6
  ---
7
7
 
8
8
  # Swarm Issue - Issue-Based Swarm Coordination
@@ -2,7 +2,7 @@
2
2
  name: swarm-pr
3
3
  description: |
4
4
  Pull request swarm management agent that coordinates multi-agent code review, validation, and integration workflows with automated PR lifecycle management
5
- tools: mcp__github__get_pull_request, mcp__github__create_pull_request, mcp__github__update_pull_request, mcp__github__list_pull_requests, mcp__github__create_pr_comment, mcp__github__get_pr_diff, mcp__github__merge_pull_request, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_usage, mcp__monomind__coordination_sync, TodoWrite, TodoRead, Bash, Grep, Read, Write, Edit
5
+ tools: mcp__github__get_pull_request, mcp__github__create_pull_request, mcp__github__update_pull_request, mcp__github__list_pull_requests, mcp__github__create_pr_comment, mcp__github__get_pr_diff, mcp__github__merge_pull_request, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_usage, mcp__monomind__coordination_sync, TodoWrite, TodoRead, Bash, Grep, Read, Write, Edit
6
6
  ---
7
7
 
8
8
  # Swarm PR - Managing Swarms through Pull Requests
@@ -2,7 +2,7 @@
2
2
  name: sync-coordinator
3
3
  description: |
4
4
  Multi-repository synchronization coordinator that manages version alignment, dependency synchronization, and cross-package integration with intelligent swarm orchestration
5
- tools: mcp__github__push_files, mcp__github__create_or_update_file, mcp__github__get_file_contents, mcp__github__create_pull_request, mcp__github__search_repositories, mcp__github__list_repositories, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_store, mcp__monomind__coordination_sync, mcp__monomind__load_balance, TodoWrite, TodoRead, Bash, Read, Write, Edit, MultiEdit
5
+ tools: mcp__github__push_files, mcp__github__create_or_update_file, mcp__github__get_file_contents, mcp__github__create_pull_request, mcp__github__search_repositories, mcp__github__list_repositories, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_store, mcp__monomind__coordination_sync, mcp__monomind__load_balance, TodoWrite, TodoRead, Bash, Read, Write, Edit, MultiEdit
6
6
  ---
7
7
 
8
8
  # GitHub Sync Coordinator
@@ -2,7 +2,7 @@
2
2
  name: workflow-automation
3
3
  description: |
4
4
  GitHub Actions workflow automation agent that creates intelligent, self-organizing CI/CD pipelines with adaptive multi-agent coordination and automated optimization
5
- tools: mcp__github__create_workflow, mcp__github__update_workflow, mcp__github__list_workflows, mcp__github__get_workflow_runs, mcp__github__create_workflow_dispatch, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__task_orchestrate, mcp__monomind__memory_usage, mcp__monomind__performance_report, mcp__monomind__bottleneck_analyze, mcp__monomind__workflow_create, mcp__monomind__automation_setup, TodoWrite, TodoRead, Bash, Read, Write, Edit, Grep
5
+ tools: mcp__github__create_workflow, mcp__github__update_workflow, mcp__github__list_workflows, mcp__github__get_workflow_runs, mcp__github__create_workflow_dispatch, mcp__monomind__swarm_init, mcp__monomind__agent_spawn, mcp__monomind__memory_usage, mcp__monomind__performance_report, mcp__monomind__bottleneck_analyze, mcp__monomind__workflow_create, mcp__monomind__automation_setup, TodoWrite, TodoRead, Bash, Read, Write, Edit, Grep
6
6
  ---
7
7
 
8
8
  # Workflow Automation - GitHub Actions Integration
@@ -87,7 +87,7 @@ Advanced action definitions with tool groups:
87
87
  Action: analyze_codebase
88
88
  Preconditions: {repository_accessible: true}
89
89
  Effects: {code_analyzed: true, metrics_available: true}
90
- Tools: [grep, ast_parser, complexity_analyzer]
90
+ Tools: [monograph_query, monograph_suggest, grep (fallback), ast_parser, complexity_analyzer]
91
91
  Execution: hybrid (LLM for insights, code for metrics)
92
92
  Cost: 2
93
93
  Fallback: manual_review if tools unavailable
@@ -440,27 +440,24 @@ Use this when joining a new project or auditing an existing system:
440
440
 
441
441
  ### Step 0: Discovery Pass (always first)
442
442
 
443
- Before designing anything, discover what already exists:
443
+ Before designing anything, discover what already exists. **Use monograph first** — fall back to grep only if monograph returns 0 results or the DB is not built.
444
+
445
+ ```
446
+ # PREFERRED: monograph-based discovery
447
+ monograph_query({ query: "route handler" }) # find all route entry points
448
+ monograph_query({ query: "worker job consumer" }) # find background processors
449
+ monograph_query({ query: "state transition status" })# find state machines
450
+ monograph_route_map({}) # list all HTTP routes with handlers
451
+ monograph_suggest({ task: "workflow entry points, workers, state machines, cron jobs" })
452
+ ```
444
453
 
445
454
  ```bash
446
- # Find all workflow entry points (adapt patterns to your framework)
455
+ # FALLBACK (only if monograph returns 0 results):
447
456
  grep -rn "router\.\(post\|put\|delete\|get\|patch\)" src/routes/ --include="*.ts" --include="*.js"
448
457
  grep -rn "@app\.\(route\|get\|post\|put\|delete\)" src/ --include="*.py"
449
- grep -rn "HandleFunc\|Handle(" cmd/ pkg/ --include="*.go"
450
-
451
- # Find all background workers / job processors
452
458
  find src/ -type f -name "*worker*" -o -name "*job*" -o -name "*consumer*" -o -name "*processor*"
453
-
454
- # Find all state transitions in the codebase
455
459
  grep -rn "status.*=\|\.status\s*=\|state.*=\|\.state\s*=" src/ --include="*.ts" --include="*.py" --include="*.go" | grep -v "test\|spec\|mock"
456
-
457
- # Find all database migrations
458
460
  find . -path "*/migrations/*" -type f | head -30
459
-
460
- # Find all infrastructure resources
461
- find . -name "*.tf" -o -name "docker-compose*.yml" -o -name "*.yaml" | xargs grep -l "resource\|service:" 2>/dev/null
462
-
463
- # Find all scheduled / cron jobs
464
461
  grep -rn "cron\|schedule\|setInterval\|@Scheduled" src/ --include="*.ts" --include="*.py" --include="*.go" --include="*.java"
465
462
  ```
466
463
 
@@ -245,17 +245,18 @@ describe('Performance Validation', () => {
245
245
 
246
246
  ### 1. Code Quality Validation
247
247
 
248
+ **Preferred: monograph-based code quality scan:**
249
+ ```
250
+ monograph_query({ query: "mock fake stub" }) # find mock implementations in prod code
251
+ monograph_query({ query: "TODO FIXME" }) # find unfinished work in critical paths
252
+ monograph_query({ query: "console log warn error" }) # find console statements
253
+ ```
254
+
255
+ **Fallback (if monograph returns 0 results or DB not built):**
248
256
  ```bash
249
- # No mock implementations in production code
250
257
  grep -r "mock\|fake\|stub" src/ --exclude-dir=__tests__ --exclude="*.test.*" --exclude="*.spec.*"
251
-
252
- # No TODO/FIXME in critical paths
253
258
  grep -r "TODO\|FIXME" src/ --exclude-dir=__tests__
254
-
255
- # No hardcoded test data
256
259
  grep -r "test@\|example\|localhost" src/ --exclude-dir=__tests__
257
-
258
- # No console.log statements
259
260
  grep -r "console\." src/ --exclude-dir=__tests__
260
261
  ```
261
262
 
@@ -47,7 +47,9 @@ You are **EvidenceQA**, a skeptical QA specialist who requires visual proof for
47
47
  # 2. Check what's actually built
48
48
  ls -la resources/views/ || ls -la *.html
49
49
 
50
- # 3. Reality check for claimed features
50
+ # 3. Reality check for claimed features (monograph-first, grep fallback)
51
+ # Preferred: monograph_query({ query: "luxury premium glass morphism" })
52
+ # Fallback:
51
53
  grep -r "luxury\|premium\|glass\|morphism" . --include="*.html" --include="*.css" --include="*.blade.php" || echo "NO PREMIUM FEATURES FOUND"
52
54
 
53
55
  # 4. Review comprehensive test results
@@ -326,12 +326,31 @@ RECENT_HIL=$(find . -maxdepth 3 \( -name "humaninloop*.md" -o -name "humaninloop
326
326
 
327
327
  After each run in tillend mode, evaluate whether this run produced **zero findings and zero actions**. The loop stops only when a complete round finds nothing new and makes no changes — not when the AI predicts there is nothing left.
328
328
 
329
- **You (the AI running the loop) must now assess your own output from this run.** Answer these two questions:
329
+ <EXTREMELY-IMPORTANT>
330
+ **Anti-premature-stop rules:**
331
+ - "I think the work is done" is NOT a reason to stop. Only the checks below decide.
332
+ - "There's nothing more to find" is a PREDICTION, not an observation. Predictions do not stop loops.
333
+ - You MUST run the git verification command below. If git shows changes, the round is non-empty. Period.
334
+ - Only a round where git shows NO changes AND you confirm zero findings AND zero actions qualifies as empty.
335
+ </EXTREMELY-IMPORTANT>
336
+
337
+ **Step 4a — Machine verification (REQUIRED — run this command before any self-assessment):**
338
+
339
+ ```bash
340
+ GIT_CHANGES=$(git diff --stat HEAD 2>/dev/null; git diff --cached --stat 2>/dev/null; git status --porcelain 2>/dev/null | grep -v '^\?\?' | head -20)
341
+ echo "GIT_CHANGES_DURING_RUN: ${GIT_CHANGES:-NONE}"
342
+ ```
343
+
344
+ If `GIT_CHANGES` is non-empty, files were modified — `TILLEND_EMPTY=false` regardless of self-assessment. Skip directly to "Otherwise" below.
345
+
346
+ **Step 4b — Self-assessment (only if git shows no changes):**
347
+
348
+ Only if `GIT_CHANGES` was empty, answer these two questions about this run:
330
349
 
331
350
  1. **Were any findings produced?** — issues found, problems detected, items identified, things flagged, errors reported, tasks discovered, security vulnerabilities found, etc.
332
- 2. **Were any actions taken?** — files edited, code fixed, tasks created, cards moved, commits made, content written, configs changed, etc.
351
+ 2. **Were any actions taken?** — tasks created, content written, configs changed anything not captured by git diff.
333
352
 
334
- **Set `TILLEND_EMPTY=true` only if BOTH answers are "no" zero findings AND zero actions this round.**
353
+ **Set `TILLEND_EMPTY=true` only if git shows no changes AND BOTH answers are "no".**
335
354
 
336
355
  **Important:** If this round found things AND fixed them all, `TILLEND_EMPTY=false`. The loop must run once more to verify the fixes didn't introduce new issues. A "clean" prediction after a productive round is not enough — only an actually empty round stops the loop.
337
356
 
@@ -49,4 +49,4 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
49
49
  -d '{"type":"session:complete","session":"<sessionId>","domain":"architect","status":"<status>","domains":["architect"],"ts":'"$(date +%s)"'000}' || true
50
50
  ```
51
51
 
52
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
52
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -25,4 +25,4 @@ Invoke `Skill("mastermind-skills:autodev")` passing: brain_context, count, newfe
25
25
 
26
26
  After skill returns: follow _protocol.md Brain Write Procedure for domain `autodev`.
27
27
 
28
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
28
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -20,4 +20,4 @@ Invoke `Skill("mastermind-skills:build")` passing: brain_context, prompt, projec
20
20
 
21
21
  After skill returns: follow _protocol.md Brain Write Procedure for domain `build`.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
23
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -66,10 +66,10 @@ Based on `STACK`, determine which specialist agents to run beyond the always-on
66
66
  - `Security Engineer` — injection, auth gaps, secrets exposure, CVE-prone patterns, OWASP Top 10
67
67
  - `Reality Checker` — evidence-based assessment: does the code actually do what it claims?
68
68
 
69
- **Run conditionally** — detect by running these checks and adding the agent if exit 0:
70
- - `Accessibility Auditor` — `find . -maxdepth 5 \( -name "*.html" -o -name "*.jsx" -o -name "*.tsx" \) -not -path "*/node_modules/*" | head -1 | grep -q .`
71
- - `API Tester` — `find . -maxdepth 5 \( -name "*.route.*" -o -name "openapi.yml" -o -name "openapi.json" -o -name "swagger.*" \) -not -path "*/node_modules/*" | head -1 | grep -q . || grep -rqEl "express\(|fastify|hono|koa|router\." --include="*.ts" --include="*.js" . 2>/dev/null`
72
- - `Database Optimizer` — `find . -maxdepth 5 \( -name "*.sql" -o -name "*migration*" -o -name "*schema*" \) -not -path "*/node_modules/*" | head -1 | grep -q . || grep -rqEl "prisma|typeorm|sequelize|drizzle|knex" --include="*.ts" --include="*.js" . 2>/dev/null`
69
+ **Run conditionally** — use `monograph_query` first to detect stack; fall back to find/grep if monograph returns 0 results:
70
+ - `Accessibility Auditor` — `monograph_query({ query: "html jsx tsx component" })` or `find . -maxdepth 5 \( -name "*.html" -o -name "*.jsx" -o -name "*.tsx" \) -not -path "*/node_modules/*" | head -1 | grep -q .`
71
+ - `API Tester` — `monograph_query({ query: "express fastify hono koa router route openapi swagger" })` or `find . -maxdepth 5 \( -name "*.route.*" -o -name "openapi.yml" -o -name "openapi.json" -o -name "swagger.*" \) -not -path "*/node_modules/*" | head -1 | grep -q . || grep -rqEl "express\(|fastify|hono|koa|router\." --include="*.ts" --include="*.js" . 2>/dev/null`
72
+ - `Database Optimizer` — `monograph_query({ query: "prisma typeorm sequelize drizzle knex sql migration schema" })` or `find . -maxdepth 5 \( -name "*.sql" -o -name "*migration*" -o -name "*schema*" \) -not -path "*/node_modules/*" | head -1 | grep -q . || grep -rqEl "prisma|typeorm|sequelize|drizzle|knex" --include="*.ts" --include="*.js" . 2>/dev/null`
73
73
  - `SRE` — `find . -maxdepth 3 \( -name "Dockerfile" -o -name "docker-compose*" -o -name "*.yml" -path "*/.github/workflows/*" \) | head -1 | grep -q .`
74
74
  - `Mobile App Builder` — `find . -maxdepth 3 \( -name "*.swift" -o -name "*.kt" \) | head -1 | grep -q . || grep -q "react-native" package.json 2>/dev/null`
75
75
 
@@ -311,4 +311,4 @@ If `ALL_HIL` is empty, omit the HIL section and congratulate:
311
311
 
312
312
  To repeat this command on a schedule, wrap it with `/mastermind:repeat` or use `--repeat N` / `--tillend` directly.
313
313
 
314
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
314
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -16,4 +16,4 @@ Invoke `Skill("mastermind-skills:debug")` passing: brain_context, problem_descri
16
16
 
17
17
  After skill returns: follow `_protocol.md` Brain Write Procedure for domain `debug`.
18
18
 
19
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
19
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -97,8 +97,8 @@ mcp__monomind__memory_store({ key: "...", value: "...", namespace: "..." })
97
97
  mcp__monomind__memory_search({ query: "...", namespace: "..." })
98
98
 
99
99
  // Knowledge graph
100
- mcp__monomind__graphify_suggest({ task: "..." })
101
- mcp__monomind__graphify_query({ query: "..." })
100
+ mcp__monomind__monograph_suggest({ task: "..." })
101
+ mcp__monomind__monograph_query({ query: "..." })
102
102
 
103
103
  // Swarm
104
104
  mcp__monomind__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
@@ -20,4 +20,4 @@ Invoke `Skill("mastermind-skills:idea")` passing: brain_context, prompt, project
20
20
 
21
21
  After skill returns: follow _protocol.md Brain Write Procedure for domain `idea`.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
23
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -339,4 +339,4 @@ Skill("mastermind-skills:do", "--monotask --space $SPACE_ID --board $TASK_BOARD_
339
339
 
340
340
  To repeat this command on a schedule, wrap it with `/mastermind:repeat` or use `--repeat N` / `--tillend` directly.
341
341
 
342
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
342
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -0,0 +1,14 @@
1
+ <!-- Export the Second Brain knowledge base as a portable OKF (Open Knowledge Format) bundle. -->
2
+
3
+ Parse `$ARGUMENTS` for:
4
+ - `--output <dir>` or `-o <dir>` → output directory (default: `.monomind/knowledge-export`)
5
+ - `--scope <name>` or `-s <name>` → knowledge scope (default: `shared`)
6
+ - Remaining positional arg → treated as output directory
7
+
8
+ Run the export:
9
+
10
+ ```bash
11
+ npx monomind doc export -o "<output_dir>" -s "<scope>"
12
+ ```
13
+
14
+ After completion, report what was exported and where. If 0 documents exported, suggest `monomind doc ingest <path>` first.
@@ -0,0 +1,15 @@
1
+ <!-- Import an OKF (Open Knowledge Format) bundle into the Second Brain knowledge base. -->
2
+
3
+ Parse `$ARGUMENTS` for:
4
+ - `--scope <name>` or `-s <name>` → knowledge scope (default: `shared`)
5
+ - Remaining positional arg → bundle directory path (REQUIRED)
6
+
7
+ If no bundle directory provided, ask: "Which directory contains the OKF bundle to import?"
8
+
9
+ Run the import:
10
+
11
+ ```bash
12
+ npx monomind doc ingest "<bundle_dir>" -s "<scope>"
13
+ ```
14
+
15
+ After completion, report files processed, chunks indexed, and any errors. If the bundle directory doesn't exist or contains no `.md` files, say so.
@@ -20,4 +20,4 @@ Invoke `Skill("mastermind-skills:plan")` passing: brain_context, params, project
20
20
 
21
21
  After skill returns: follow `_protocol.md` Brain Write Procedure.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
23
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -20,4 +20,4 @@ Invoke `Skill("mastermind-skills:research")` passing: brain_context, prompt, pro
20
20
 
21
21
  After skill returns: follow _protocol.md Brain Write Procedure for domain `research`.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
23
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -18,6 +18,17 @@ Default mode for this command: **auto** (unless `--confirm` flag present or inta
18
18
 
19
19
  Invoke `Skill("mastermind-skills:review")` passing: brain_context, prompt, project_name, board_id (create if needed), mode.
20
20
 
21
+ **After review findings are collected — AUTO-FIX STEP (mode = auto only):**
22
+
23
+ When `mode = auto` (the default): if the review produced any fixable findings (code issues, bugs, style problems, security vulnerabilities with clear fixes), apply the fixes immediately in this same run. Do not ask the user whether to fix — auto mode means fix without asking. Specifically:
24
+ 1. For each fixable finding, edit the file directly to resolve it.
25
+ 2. After all fixes are applied, output a summary: `[review] Auto-fixed N issues. Remaining M issues require manual intervention.`
26
+ 3. Non-fixable findings (architectural concerns, design questions, trade-off decisions) are reported but not acted on.
27
+
28
+ When `mode = confirm`: present findings and ask the user which to fix. This is the ONLY mode where asking is appropriate.
29
+
30
+ **When `--tillend` is active:** auto-fix is especially critical. Without it, the loop finds the same unfixed issues every round and either loops forever or the AI falsely declares an empty round. The tillend contract is: find → fix → verify (next round) → stop when clean.
31
+
21
32
  After skill returns: follow _protocol.md Brain Write Procedure for domain `review`.
22
33
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
34
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -133,7 +133,7 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
133
133
  Follow _protocol.md Brain Write Procedure for domain `ops`.
134
134
 
135
135
 
136
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
136
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
137
137
 
138
138
  After the REPEAT POSTAMBLE completes, if a loop was started or continued (LOOP_ID is set), write the org name into the loop state file so the dashboard can detect running status:
139
139
  ```bash
@@ -20,4 +20,4 @@ Invoke `Skill("mastermind-skills:taskdev")` passing: brain_context, plan_file, p
20
20
 
21
21
  After skill returns: follow `_protocol.md` Brain Write Procedure.
22
22
 
23
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
23
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -16,4 +16,4 @@ Invoke `Skill("mastermind-skills:tdd")` passing: brain_context, feature_or_bug,
16
16
 
17
17
  After skill returns: follow `_protocol.md` Brain Write Procedure for domain `tdd`.
18
18
 
19
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
19
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -16,4 +16,4 @@ Invoke `Skill("mastermind-skills:verify")` passing: brain_context, claim_or_task
16
16
 
17
17
  After skill returns: follow `_protocol.md` Brain Write Procedure for domain `verify`.
18
18
 
19
- Invoke `Skill("mastermind-skills:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call do not skip it.
19
+ **MANDATORY — invoke `Skill("mastermind-skills:_repeat")` now.** This is required regardless of how the skill above completed, regardless of whether you think the work is done, regardless of whether you plan to end your response. For `--repeat N`: the count is non-negotiable — all N runs must happen. For `--tillend`: only a verified empty round (confirmed by git diff) stops the loop. Do not end your response without invoking this skill.
@@ -70,27 +70,23 @@ if (!entryPoint) {
70
70
  const dbPath = path.join(projectDir, '.monomind', 'monograph.db');
71
71
  if (fs.existsSync(dbPath)) {
72
72
  try {
73
- const mod = (() => {
74
- try { return require(path.join(projectDir, 'packages', '@monomind', 'monograph', 'dist', 'src', 'index.js')); } catch {}
75
- try { return require('@monoes/monograph'); } catch {}
76
- return null;
77
- })();
78
- if (mod && mod.openDb) {
79
- const db = mod.openDb(dbPath);
80
- try {
81
- const row = db.prepare("SELECT value FROM index_meta WHERE key='last_commit_hash'").get();
82
- if (row && row.value) {
83
- const { execSync } = require('child_process');
84
- const behind = parseInt(execSync('git rev-list --count ' + row.value + '..HEAD 2>/dev/null', {
85
- cwd: projectDir, encoding: 'utf-8', timeout: 2000
86
- }).trim(), 10) || 0;
87
- if (behind === 0) {
88
- console.log('[graph] index is fresh — skipping rebuild');
89
- process.exit(0);
90
- }
73
+ const Database = require(require.resolve('better-sqlite3', { paths: [path.dirname(entryPoint)] }));
74
+ const db = new Database(dbPath, { readonly: true, timeout: 5000 });
75
+ try {
76
+ const row = db.prepare("SELECT value FROM index_meta WHERE key='last_commit_hash'").get();
77
+ if (row && row.value && /^[0-9a-f]{7,40}$/i.test(row.value)) {
78
+ const { execFileSync } = require('child_process');
79
+ const out = execFileSync('git', ['rev-list', '--count', row.value + '..HEAD'], {
80
+ cwd: projectDir, encoding: 'utf-8', timeout: 2000, stdio: ['pipe', 'pipe', 'pipe']
81
+ }).trim();
82
+ const behind = parseInt(out, 10);
83
+ if (behind === 0) {
84
+ console.log('[graph] index is fresh skipping rebuild');
85
+ db.close();
86
+ process.exit(0);
91
87
  }
92
- } finally { mod.closeDb(db); }
93
- }
88
+ }
89
+ } finally { try { db.close(); } catch {} }
94
90
  } catch { /* can't check — proceed with build */ }
95
91
  }
96
92