monomind 1.18.15 → 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 (183) 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/code-review.md +4 -4
  19. package/.claude/commands/mastermind/help.md +2 -2
  20. package/.claude/commands/mastermind/okf-export.md +14 -0
  21. package/.claude/commands/mastermind/okf-import.md +15 -0
  22. package/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
  23. package/.claude/helpers/handlers/capture-handler.cjs +110 -0
  24. package/.claude/helpers/handlers/route-handler.cjs +174 -247
  25. package/.claude/helpers/handlers/session-handler.cjs +139 -142
  26. package/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
  27. package/.claude/helpers/handlers/task-handler.cjs +8 -155
  28. package/.claude/helpers/hook-handler.cjs +89 -5
  29. package/.claude/helpers/intelligence.cjs +164 -15
  30. package/.claude/helpers/learning-service.mjs +1 -0
  31. package/.claude/helpers/mastermind-activate.cjs +33 -51
  32. package/.claude/helpers/monolean-activate.cjs +13 -3
  33. package/.claude/helpers/monolean-propagate.cjs +7 -3
  34. package/.claude/helpers/router.cjs +47 -9
  35. package/.claude/settings.json +0 -20
  36. package/.claude/skills/mastermind-skills/architect.md +5 -6
  37. package/.claude/skills/mastermind-skills/autodev.md +8 -5
  38. package/.claude/skills/mastermind-skills/review.md +8 -5
  39. package/.claude/skills/mastermind-skills/techport.md +37 -3
  40. package/.claude/skills/monodesign/document.md +9 -6
  41. package/.claude/skills/monodesign/extract.md +1 -1
  42. package/.claude/skills/monodesign/reference/document.md +1 -1
  43. package/.claude/skills/monodesign/reference/live.md +1 -1
  44. package/.claude/skills/monolean/SKILL.md +1 -1
  45. package/package.json +1 -1
  46. package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
  47. package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
  48. package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
  49. package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -1
  50. package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
  51. package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -1
  52. package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
  53. package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
  54. package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +1 -1
  55. package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
  56. package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
  57. package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
  58. package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
  59. package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -1
  60. package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
  61. package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
  62. package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
  63. package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +4 -4
  64. package/packages/@monomind/cli/.claude/commands/mastermind/help.md +2 -2
  65. package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
  66. package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
  67. package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
  68. package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
  69. package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +174 -247
  70. package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +139 -142
  71. package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
  72. package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -155
  73. package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +89 -5
  74. package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +164 -15
  75. package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
  76. package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
  77. package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
  78. package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
  79. package/packages/@monomind/cli/.claude/helpers/router.cjs +47 -9
  80. package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
  81. package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
  82. package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +8 -5
  83. package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
  84. package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
  85. package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
  86. package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
  87. package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
  88. package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
  89. package/packages/@monomind/cli/bin/mcp-server.js +11 -1
  90. package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
  91. package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
  92. package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
  93. package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
  94. package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
  95. package/packages/@monomind/cli/dist/src/commands/completions.js +11 -56
  96. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -1
  97. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +1 -1
  98. package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
  99. package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
  100. package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
  101. package/packages/@monomind/cli/dist/src/commands/hive-mind.js +2 -5
  102. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
  103. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
  104. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
  105. package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
  106. package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
  107. package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
  108. package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -51
  109. package/packages/@monomind/cli/dist/src/commands/index.js +36 -184
  110. package/packages/@monomind/cli/dist/src/commands/init-wizard.js +2 -4
  111. package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
  112. package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
  113. package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
  114. package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
  115. package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
  116. package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
  117. package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
  118. package/packages/@monomind/cli/dist/src/commands/neural-core.js +145 -6
  119. package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +4 -4
  120. package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
  121. package/packages/@monomind/cli/dist/src/commands/neural-registry.js +4 -4
  122. package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
  123. package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
  124. package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
  125. package/packages/@monomind/cli/dist/src/commands/providers.js +2 -131
  126. package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
  127. package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
  128. package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
  129. package/packages/@monomind/cli/dist/src/commands/session.js +1 -285
  130. package/packages/@monomind/cli/dist/src/commands/start.js +2 -41
  131. package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
  132. package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
  133. package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
  134. package/packages/@monomind/cli/dist/src/commands/workflow.js +2 -104
  135. package/packages/@monomind/cli/dist/src/index.js +7 -0
  136. package/packages/@monomind/cli/dist/src/init/executor.js +3 -14
  137. package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
  138. package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -1
  139. package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -3
  140. package/packages/@monomind/cli/dist/src/init/types.js +0 -2
  141. package/packages/@monomind/cli/dist/src/mcp-client.js +0 -6
  142. package/packages/@monomind/cli/dist/src/mcp-server.js +16 -0
  143. package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
  144. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
  145. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
  146. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
  147. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
  148. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
  149. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
  150. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
  151. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
  152. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
  153. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
  154. package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +5 -9
  155. package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +2 -2
  156. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +25 -3
  157. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
  158. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +45 -159
  159. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -4
  160. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
  161. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -3
  162. package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -0
  163. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +428 -11
  164. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +4 -10
  165. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +28 -54
  166. package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
  167. package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
  168. package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
  169. package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
  170. package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
  171. package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +7 -8
  172. package/packages/@monomind/cli/dist/src/memory/intelligence.js +15 -16
  173. package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
  174. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +37 -0
  175. package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +3 -21
  176. package/packages/@monomind/cli/dist/src/services/worker-daemon.js +13 -80
  177. package/packages/@monomind/cli/dist/src/suggest.js +0 -5
  178. package/packages/@monomind/cli/package.json +1 -1
  179. package/packages/@monomind/guidance/package.json +1 -74
  180. package/.claude/helpers/auto-memory-hook.mjs +0 -503
  181. package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
  182. package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
  183. package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
@@ -251,22 +251,21 @@ _entry=${_entry:-.}
251
251
  npx --yes madge --circular "$_entry/" 2>/dev/null; } | head -20
252
252
 
253
253
  # 6. Find god files (imported by many others)
254
- # NOTE: This step covers JS/TS/Vue and Python only.
255
- # For Go, Rust, Java, and other stacks, use mcp__monomind__monograph_god_nodes instead.
256
- # JS/TS/Vue: skip comment lines; perl extracts module name from from '...' or from "..."
257
- # --exclude-dir applied at grep level so exclusions work before -h strips filenames
254
+ # PREFERRED: use monograph (pre-computed graph index, faster and more accurate)
255
+ # Call mcp__monomind__monograph_god_nodes({}) first.
256
+ # Only fall back to grep below if monograph returns 0 results or the DB is not built.
257
+ #
258
+ # FALLBACK (grep-based, JS/TS/Vue and Python only):
258
259
  grep -rh "^[^/]*from ['\"]" . \
259
260
  --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include="*.vue" \
260
261
  --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git \
261
262
  2>/dev/null \
262
263
  | perl -ne 'if (/from\s+['"'"'"]([^'"'"'"\s]+)['"'"'"]/) { print "$1\n" }' \
263
264
  | sort | uniq -c | sort -rn | head -20
264
- # Python: count imports separately (no quotes in Python import syntax)
265
265
  grep -rh "^from \|^import " . --include="*.py" \
266
266
  --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git \
267
267
  2>/dev/null \
268
268
  | awk '{print $2}' | sed 's/,.*//' | sed 's/\..*//' | grep -v '^$' | sort | uniq -c | sort -rn | head -20
269
- # Note: if monograph is built, prefer mcp__monomind__monograph_god_nodes — it uses the pre-computed graph index
270
269
  ```
271
270
 
272
271
  For each finding, produce a **Deduplication Action Table**:
@@ -48,19 +48,22 @@ Default `count = 1`.
48
48
 
49
49
  ```bash
50
50
  git log --oneline -30
51
- find . -maxdepth 3 -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" -o -name "*.md" \) \
52
- ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" | head -80
53
51
  cat package.json 2>/dev/null || cat pyproject.toml 2>/dev/null || cat go.mod 2>/dev/null || true
54
52
  head -120 README.md 2>/dev/null || true
55
- grep -rn "<PATTERNS>" --include="*.ts" --include="*.js" --include="*.py" --include="*.go" --include="*.md" \
56
- . 2>/dev/null | grep -v node_modules | grep -v dist | head -40
57
53
  ```
58
54
 
59
- Plus these MCP calls (also parallel):
55
+ Plus these MCP calls (also parallel — **preferred over grep for symbol/pattern search**):
56
+ - `mcp__monomind__monograph_query` — search for `<PATTERNS>` (see mode table below); replaces grep for symbol lookup
60
57
  - `mcp__monomind__monograph_god_nodes` — high-centrality modules (hotspots / where new features plug in)
61
58
  - `mcp__monomind__monograph_suggest` — query per mode below
62
59
  - `mcp__monomind__memory_search` — namespace `"mastermind:autodev"`, to exclude already-built work
63
60
 
61
+ **Fallback only** (if monograph returns 0 results or DB not built):
62
+ ```bash
63
+ grep -rn "<PATTERNS>" --include="*.ts" --include="*.js" --include="*.py" --include="*.go" --include="*.md" \
64
+ . 2>/dev/null | grep -v node_modules | grep -v dist | head -40
65
+ ```
66
+
64
67
  Mode-specific values:
65
68
 
66
69
  | | Improvement loop | Feature pipeline |
@@ -148,11 +148,14 @@ Run the test suite and adversarial probes against the live monofence-ai detector
148
148
  ```
149
149
  MONOFENCE INPUT BOUNDARY SCAN (monofence_deep flag):
150
150
 
151
- Step 1 — Find LLM input boundary files using these patterns:
152
- grep -rl "detect\|isSafe\|prompt\|chat\|completion\|message" src/ --include="*.ts" --include="*.js"
153
- find . -name "*.ts" -path "*/routes/*" -o -name "*.ts" -path "*/handlers/*" \
154
- -o -name "*.ts" -path "*/controllers/*" -o -name "*.ts" -path "*/api/*" \
155
- -o -name "prompt*.ts" -o -name "*chat*.ts" -o -name "*completion*.ts"
151
+ Step 1 — Find LLM input boundary files:
152
+ PREFERRED: monograph_query({ query: "detect isSafe prompt chat completion message" })
153
+ monograph_neighbors({ name: "detect" }) // trace call chains into LLM boundaries
154
+ FALLBACK (if monograph returns 0 results):
155
+ grep -rl "detect\|isSafe\|prompt\|chat\|completion\|message" src/ --include="*.ts" --include="*.js"
156
+ find . -name "*.ts" -path "*/routes/*" -o -name "*.ts" -path "*/handlers/*" \
157
+ -o -name "*.ts" -path "*/controllers/*" -o -name "*.ts" -path "*/api/*" \
158
+ -o -name "prompt*.ts" -o -name "*chat*.ts" -o -name "*completion*.ts"
156
159
 
157
160
  Step 2 — For each boundary file found, extract string literals and template literals
158
161
  that flow into LLM calls (look for openai/anthropic/fetch calls).
@@ -75,8 +75,17 @@ find .claude -name "*.md" \
75
75
 
76
76
  ### 0B — Naming Convention Extraction (from actual monomind code)
77
77
 
78
- Extract the real conventions — not the stated ones — from the codebase itself:
78
+ Extract the real conventions — not the stated ones — from the codebase itself.
79
79
 
80
+ **Step 1 — monograph-based extraction (preferred):**
81
+ ```
82
+ # Use monograph for exported symbol discovery
83
+ monograph_query({ query: "export class interface" }) # all exported types
84
+ monograph_god_nodes({}) # high-centrality files (naming exemplars)
85
+ monograph_stats({}) # node counts by type
86
+ ```
87
+
88
+ **Step 2 — grep fallback (only if monograph returns 0 results or DB not built):**
80
89
  ```bash
81
90
  BASE=packages/@monomind/cli/src
82
91
 
@@ -143,10 +152,20 @@ Domain vocab: Agent, Memory, Swarm, Config, Node, Graph, Session, Task, Wo
143
152
 
144
153
  ### 0C — Dependency Direction Constraints
145
154
 
155
+ **Preferred: monograph-based dependency analysis:**
156
+ ```
157
+ # Use monograph for dependency direction mapping
158
+ monograph_community({}) # module clusters with import directions
159
+ monograph_context({ name: "types" }) # 360° view: importers vs imports
160
+ monograph_context({ name: "utils" })
161
+ monograph_context({ name: "core" })
162
+ monograph_context({ name: "commands" })
163
+ monograph_context({ name: "services" })
164
+ ```
165
+
166
+ **Fallback (only if monograph unavailable):**
146
167
  ```bash
147
168
  BASE=packages/@monomind/cli/src
148
-
149
- # Map import directions by directory layer
150
169
  for dir in types utils core commands services; do
151
170
  count=$(grep -rn "^import" "$BASE/$dir" --include="*.ts" 2>/dev/null | wc -l)
152
171
  refs=$(grep -rn "from.*/$dir/" "$BASE" --include="*.ts" 2>/dev/null | wc -l)
@@ -160,6 +179,13 @@ Extract the implied layering from the import ratio. High `imported_by` → leaf/
160
179
 
161
180
  ### 0D — Build Monomind Vocabulary Name Set (for collision detection)
162
181
 
182
+ **Preferred: monograph-based symbol enumeration:**
183
+ ```
184
+ monograph_query({ query: "export class interface function const type enum" })
185
+ # Extract names from results for collision checking
186
+ ```
187
+
188
+ **Fallback (only if monograph unavailable):**
163
189
  ```bash
164
190
  grep -rhn "^export" packages/@monomind/cli/src \
165
191
  --include="*.ts" | grep -v dist | \
@@ -200,6 +226,14 @@ Set `source_brand` to the PascalCase result (e.g., `Monomind`, `ClaudeFlow`, `So
200
226
 
201
227
  ### 1B — Repo-Map (Structural Index)
202
228
 
229
+ **If source project has a monograph index** (check with `monograph_health` against source_path):
230
+ ```
231
+ monograph_query({ query: "export class interface function" }) # all exported symbols
232
+ monograph_god_nodes({}) # high-centrality files
233
+ monograph_community({}) # module structure
234
+ ```
235
+
236
+ **Otherwise (foreign project without monograph — grep is expected here):**
203
237
  ```bash
204
238
  # File tree
205
239
  find "{source_path}" -maxdepth 4 \
@@ -16,15 +16,18 @@ Read `reference/document.md` from the monodesign skill directory for the full pr
16
16
 
17
17
  ## Discovery
18
18
 
19
- **Extract from codebase:**
19
+ **Extract from codebase (monograph-first):**
20
+ ```
21
+ # Preferred: monograph for design token discovery
22
+ monograph_query({ query: "CSS custom properties variables tokens" })
23
+ monograph_query({ query: "font-family font-face typography" })
24
+ monograph_query({ query: "color theme palette" })
25
+ ```
26
+
27
+ **Fallback (if monograph returns 0 results or DB not built):**
20
28
  ```bash
21
- # Find CSS custom properties
22
29
  grep -r "^--" src/ --include="*.css" --include="*.scss" -h | sort -u
23
-
24
- # Find font declarations
25
30
  grep -r "font-family\|@font-face\|@import.*font" src/ -h | sort -u
26
-
27
- # Find color values
28
31
  grep -rE "#[0-9a-fA-F]{3,8}|oklch\(|rgb\(|hsl\(" src/ -h | sort -u | head -50
29
32
  ```
30
33
 
@@ -17,7 +17,7 @@ Every codebase with more than a few pages has an implicit design system — inco
17
17
  ## Discovery Phase
18
18
 
19
19
  **Color inventory**
20
- - Collect all color values used in the codebase (grep for `#`, `rgb`, `hsl`, `oklch`)
20
+ - Collect all color values used in the codebase (use `monograph_query({ query: "color rgb hsl oklch" })` first; fall back to grep for `#`, `rgb`, `hsl`, `oklch` if monograph returns 0 results)
21
21
  - Group by apparent purpose (backgrounds, text, accents, borders, shadows)
22
22
  - Identify the brand anchor color(s)
23
23
  - Spot inconsistencies (5 slightly different grays)
@@ -81,7 +81,7 @@ Decide by scanning first (Scan mode Step 1). If the scan finds no tokens, no com
81
81
 
82
82
  Search the codebase in priority order:
83
83
 
84
- 1. **CSS custom properties**: grep for `--color-`, `--font-`, `--spacing-`, `--radius-`, `--shadow-`, `--ease-`, `--duration-` declarations in CSS files (usually `src/styles/`, `public/css/`, `app/globals.css`, etc.). Record name, value, and the file it's defined in.
84
+ 1. **CSS custom properties**: use `monograph_query({ query: "color font spacing radius shadow ease duration CSS custom property" })` first; fall back to grep for `--color-`, `--font-`, `--spacing-`, `--radius-`, `--shadow-`, `--ease-`, `--duration-` declarations in CSS files if monograph returns 0 results. Record name, value, and the file it's defined in.
85
85
  2. **Tailwind config**: if `tailwind.config.{js,ts,mjs}` exists, read the `theme.extend` block for colors, fontFamily, spacing, borderRadius, boxShadow.
86
86
  3. **CSS-in-JS theme files**: styled-components, emotion, vanilla-extract, stitches; look for `theme.ts`, `tokens.ts`, or equivalent.
87
87
  4. **Design token files**: `tokens.json`, `design-tokens.json`, Style Dictionary output, W3C token community group format.
@@ -364,7 +364,7 @@ The goal is the same: give the user three variants to choose from AND persist th
364
364
 
365
365
  Use the error payload:
366
366
 
367
- - `element_not_in_source` with `generatedMatch: "public/docs/foo.html"`: the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element.
367
+ - `element_not_in_source` with `generatedMatch: "public/docs/foo.html"`: the served HTML is generated. Find the generator (use `monograph_query({ query: "build generate template" })` or `monograph_neighbors` to trace writers of that path; fall back to grep if monograph returns 0 results, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element.
368
368
  - `element_not_found`: the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it.
369
369
  - `file_is_generated` with `file: "..."`: user pointed at a generated file explicitly. Same resolution as `element_not_in_source`.
370
370
 
@@ -45,7 +45,7 @@ take the higher one and move on. The first lazy solution that works is the
45
45
  right one — once you actually know what the change has to touch.
46
46
 
47
47
  **Bug fix = root cause, not symptom.** A report names a symptom. Before you
48
- edit, grep every caller of the function you're about to touch. The lazy fix IS
48
+ edit, find every caller of the function you're about to touch (use `monograph_neighbors` or `monograph_impact` first; fall back to grep only if monograph returns 0 results). The lazy fix IS
49
49
  the root-cause fix: one guard in the shared function is a smaller diff than a
50
50
  guard in every caller — and patching only the path the ticket names leaves
51
51
  every sibling caller still broken. Fix it once, where all callers route through.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monomind",
3
- "version": "1.18.15",
3
+ "version": "1.19.0",
4
4
  "description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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
@@ -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
 
@@ -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" })
@@ -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.