@monoes/monomindcli 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 (253) 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/skills/mastermind-skills/architect.md +5 -6
  36. package/.claude/skills/mastermind-skills/autodev.md +8 -5
  37. package/.claude/skills/mastermind-skills/review.md +8 -5
  38. package/.claude/skills/mastermind-skills/techport.md +37 -3
  39. package/.claude/skills/monodesign/document.md +9 -6
  40. package/.claude/skills/monodesign/extract.md +1 -1
  41. package/.claude/skills/monodesign/reference/document.md +1 -1
  42. package/.claude/skills/monodesign/reference/live.md +1 -1
  43. package/.claude/skills/monolean/SKILL.md +1 -1
  44. package/bin/mcp-server.js +11 -1
  45. package/dist/src/commands/agent-ops.d.ts +1 -2
  46. package/dist/src/commands/agent-ops.d.ts.map +1 -1
  47. package/dist/src/commands/agent-ops.js +1 -59
  48. package/dist/src/commands/agent-ops.js.map +1 -1
  49. package/dist/src/commands/agent.d.ts.map +1 -1
  50. package/dist/src/commands/agent.js +2 -3
  51. package/dist/src/commands/agent.js.map +1 -1
  52. package/dist/src/commands/analyze-diff.js +1 -1
  53. package/dist/src/commands/analyze-diff.js.map +1 -1
  54. package/dist/src/commands/browse-action.d.ts.map +1 -1
  55. package/dist/src/commands/browse-action.js +94 -2
  56. package/dist/src/commands/browse-action.js.map +1 -1
  57. package/dist/src/commands/completions.d.ts.map +1 -1
  58. package/dist/src/commands/completions.js +11 -56
  59. package/dist/src/commands/completions.js.map +1 -1
  60. package/dist/src/commands/doctor-project-checks.d.ts +1 -1
  61. package/dist/src/commands/doctor-project-checks.js +1 -1
  62. package/dist/src/commands/hive-mind-helpers.js +2 -2
  63. package/dist/src/commands/hive-mind-helpers.js.map +1 -1
  64. package/dist/src/commands/hive-mind-ops.d.ts +1 -3
  65. package/dist/src/commands/hive-mind-ops.d.ts.map +1 -1
  66. package/dist/src/commands/hive-mind-ops.js +2 -116
  67. package/dist/src/commands/hive-mind-ops.js.map +1 -1
  68. package/dist/src/commands/hive-mind.d.ts.map +1 -1
  69. package/dist/src/commands/hive-mind.js +2 -5
  70. package/dist/src/commands/hive-mind.js.map +1 -1
  71. package/dist/src/commands/hooks-coverage-commands.d.ts.map +1 -1
  72. package/dist/src/commands/hooks-coverage-commands.js +8 -7
  73. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  74. package/dist/src/commands/hooks-coverage-gaps.js +1 -1
  75. package/dist/src/commands/hooks-coverage-gaps.js.map +1 -1
  76. package/dist/src/commands/hooks-coverage-routing.js +2 -2
  77. package/dist/src/commands/hooks-coverage-routing.js.map +1 -1
  78. package/dist/src/commands/hooks-extended-commands.d.ts +0 -3
  79. package/dist/src/commands/hooks-extended-commands.d.ts.map +1 -1
  80. package/dist/src/commands/hooks-extended-commands.js +0 -307
  81. package/dist/src/commands/hooks-extended-commands.js.map +1 -1
  82. package/dist/src/commands/hooks.d.ts.map +1 -1
  83. package/dist/src/commands/hooks.js +1 -12
  84. package/dist/src/commands/hooks.js.map +1 -1
  85. package/dist/src/commands/index.d.ts +3 -51
  86. package/dist/src/commands/index.d.ts.map +1 -1
  87. package/dist/src/commands/index.js +36 -184
  88. package/dist/src/commands/index.js.map +1 -1
  89. package/dist/src/commands/init-wizard.d.ts.map +1 -1
  90. package/dist/src/commands/init-wizard.js +2 -4
  91. package/dist/src/commands/init-wizard.js.map +1 -1
  92. package/dist/src/commands/mcp.d.ts.map +1 -1
  93. package/dist/src/commands/mcp.js +32 -4
  94. package/dist/src/commands/mcp.js.map +1 -1
  95. package/dist/src/commands/memory-admin.d.ts +1 -2
  96. package/dist/src/commands/memory-admin.d.ts.map +1 -1
  97. package/dist/src/commands/memory-admin.js +1 -118
  98. package/dist/src/commands/memory-admin.js.map +1 -1
  99. package/dist/src/commands/memory-transfer.d.ts +1 -2
  100. package/dist/src/commands/memory-transfer.d.ts.map +1 -1
  101. package/dist/src/commands/memory-transfer.js +5 -171
  102. package/dist/src/commands/memory-transfer.js.map +1 -1
  103. package/dist/src/commands/memory.d.ts.map +1 -1
  104. package/dist/src/commands/memory.js +3 -6
  105. package/dist/src/commands/memory.js.map +1 -1
  106. package/dist/src/commands/neural-core.d.ts +3 -1
  107. package/dist/src/commands/neural-core.d.ts.map +1 -1
  108. package/dist/src/commands/neural-core.js +145 -6
  109. package/dist/src/commands/neural-core.js.map +1 -1
  110. package/dist/src/commands/neural-optimize.js +4 -4
  111. package/dist/src/commands/neural-optimize.js.map +1 -1
  112. package/dist/src/commands/neural-registry.d.ts +1 -1
  113. package/dist/src/commands/neural-registry.js +4 -4
  114. package/dist/src/commands/neural-registry.js.map +1 -1
  115. package/dist/src/commands/neural.d.ts +1 -1
  116. package/dist/src/commands/neural.js +6 -6
  117. package/dist/src/commands/neural.js.map +1 -1
  118. package/dist/src/commands/performance.d.ts.map +1 -1
  119. package/dist/src/commands/performance.js +68 -58
  120. package/dist/src/commands/performance.js.map +1 -1
  121. package/dist/src/commands/providers.d.ts.map +1 -1
  122. package/dist/src/commands/providers.js +2 -131
  123. package/dist/src/commands/providers.js.map +1 -1
  124. package/dist/src/commands/security-misc.d.ts +0 -1
  125. package/dist/src/commands/security-misc.d.ts.map +1 -1
  126. package/dist/src/commands/security-misc.js +69 -45
  127. package/dist/src/commands/security-misc.js.map +1 -1
  128. package/dist/src/commands/security.d.ts.map +1 -1
  129. package/dist/src/commands/security.js +2 -4
  130. package/dist/src/commands/security.js.map +1 -1
  131. package/dist/src/commands/session.d.ts.map +1 -1
  132. package/dist/src/commands/session.js +1 -285
  133. package/dist/src/commands/session.js.map +1 -1
  134. package/dist/src/commands/start.d.ts.map +1 -1
  135. package/dist/src/commands/start.js +2 -41
  136. package/dist/src/commands/start.js.map +1 -1
  137. package/dist/src/commands/status.d.ts.map +1 -1
  138. package/dist/src/commands/status.js +18 -29
  139. package/dist/src/commands/status.js.map +1 -1
  140. package/dist/src/commands/swarm.js +1 -1
  141. package/dist/src/commands/swarm.js.map +1 -1
  142. package/dist/src/commands/task.d.ts.map +1 -1
  143. package/dist/src/commands/task.js +2 -49
  144. package/dist/src/commands/task.js.map +1 -1
  145. package/dist/src/commands/workflow.d.ts.map +1 -1
  146. package/dist/src/commands/workflow.js +2 -104
  147. package/dist/src/commands/workflow.js.map +1 -1
  148. package/dist/src/index.d.ts.map +1 -1
  149. package/dist/src/index.js +7 -0
  150. package/dist/src/index.js.map +1 -1
  151. package/dist/src/init/executor.d.ts.map +1 -1
  152. package/dist/src/init/executor.js +3 -14
  153. package/dist/src/init/executor.js.map +1 -1
  154. package/dist/src/init/helpers-generator.d.ts.map +1 -1
  155. package/dist/src/init/helpers-generator.js +2 -22
  156. package/dist/src/init/helpers-generator.js.map +1 -1
  157. package/dist/src/init/settings-generator.d.ts.map +1 -1
  158. package/dist/src/init/settings-generator.js +0 -1
  159. package/dist/src/init/settings-generator.js.map +1 -1
  160. package/dist/src/init/types.d.ts +1 -3
  161. package/dist/src/init/types.d.ts.map +1 -1
  162. package/dist/src/init/types.js +0 -2
  163. package/dist/src/init/types.js.map +1 -1
  164. package/dist/src/mcp-client.d.ts.map +1 -1
  165. package/dist/src/mcp-client.js +0 -6
  166. package/dist/src/mcp-client.js.map +1 -1
  167. package/dist/src/mcp-server.d.ts.map +1 -1
  168. package/dist/src/mcp-server.js +16 -0
  169. package/dist/src/mcp-server.js.map +1 -1
  170. package/dist/src/mcp-tools/agent-tools.d.ts.map +1 -1
  171. package/dist/src/mcp-tools/agent-tools.js +0 -17
  172. package/dist/src/mcp-tools/agent-tools.js.map +1 -1
  173. package/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
  174. package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +1 -1
  175. package/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
  176. package/dist/src/mcp-tools/coherence/causal-infer.js.map +1 -1
  177. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
  178. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +1 -1
  179. package/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
  180. package/dist/src/mcp-tools/coherence/consensus-verify.js.map +1 -1
  181. package/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
  182. package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +1 -1
  183. package/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
  184. package/dist/src/mcp-tools/coherence/memory-gate.js.map +1 -1
  185. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
  186. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +1 -1
  187. package/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
  188. package/dist/src/mcp-tools/coherence/quantum-topology.js.map +1 -1
  189. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
  190. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +1 -1
  191. package/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
  192. package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +1 -1
  193. package/dist/src/mcp-tools/coherence/types.d.ts +5 -9
  194. package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -1
  195. package/dist/src/mcp-tools/coherence/types.js.map +1 -1
  196. package/dist/src/mcp-tools/guidance-tools.js +2 -2
  197. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  198. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  199. package/dist/src/mcp-tools/hive-mind-tools.js +25 -3
  200. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  201. package/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
  202. package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
  203. package/dist/src/mcp-tools/hooks-routing.js +45 -159
  204. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  205. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  206. package/dist/src/mcp-tools/hooks-tools.js +1 -4
  207. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  208. package/dist/src/mcp-tools/index.d.ts +0 -2
  209. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  210. package/dist/src/mcp-tools/index.js +0 -3
  211. package/dist/src/mcp-tools/index.js.map +1 -1
  212. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  213. package/dist/src/mcp-tools/memory-tools.js +24 -0
  214. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  215. package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
  216. package/dist/src/mcp-tools/monograph-tools.js +428 -11
  217. package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
  218. package/dist/src/mcp-tools/neural-tools.d.ts +4 -10
  219. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  220. package/dist/src/mcp-tools/neural-tools.js +28 -54
  221. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  222. package/dist/src/mcp-tools/performance-tools.d.ts.map +1 -1
  223. package/dist/src/mcp-tools/performance-tools.js +5 -17
  224. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  225. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
  226. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js.map +1 -1
  227. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
  228. package/dist/src/mcp-tools/quality-tools.d.ts +7 -2
  229. package/dist/src/mcp-tools/quality-tools.d.ts.map +1 -1
  230. package/dist/src/mcp-tools/quality-tools.js +7 -257
  231. package/dist/src/mcp-tools/quality-tools.js.map +1 -1
  232. package/dist/src/memory/intelligence.d.ts +7 -8
  233. package/dist/src/memory/intelligence.d.ts.map +1 -1
  234. package/dist/src/memory/intelligence.js +15 -16
  235. package/dist/src/memory/intelligence.js.map +1 -1
  236. package/dist/src/memory/memory-bridge.d.ts +1 -0
  237. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  238. package/dist/src/memory/memory-bridge.js +37 -0
  239. package/dist/src/memory/memory-bridge.js.map +1 -1
  240. package/dist/src/services/worker-daemon.d.ts +3 -21
  241. package/dist/src/services/worker-daemon.d.ts.map +1 -1
  242. package/dist/src/services/worker-daemon.js +13 -80
  243. package/dist/src/services/worker-daemon.js.map +1 -1
  244. package/dist/src/suggest.d.ts.map +1 -1
  245. package/dist/src/suggest.js +0 -5
  246. package/dist/src/suggest.js.map +1 -1
  247. package/dist/tsconfig.tsbuildinfo +1 -1
  248. package/package.json +1 -1
  249. package/.claude/helpers/auto-memory-hook.mjs +0 -503
  250. package/dist/src/commands/deployment.d.ts +0 -10
  251. package/dist/src/commands/deployment.d.ts.map +0 -1
  252. package/dist/src/commands/deployment.js +0 -706
  253. package/dist/src/commands/deployment.js.map +0 -1
@@ -15,16 +15,16 @@ export declare const DetectSecretsInputSchema: z.ZodObject<{
15
15
  scanHistory: z.ZodDefault<z.ZodBoolean>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  targetPath: string;
18
- excludePatterns: string[];
19
18
  secretTypes: ("password" | "api-key" | "private-key" | "token" | "connection-string" | "certificate" | "aws-key" | "aws-secret" | "gcp-key" | "azure-key" | "generic")[];
19
+ excludePatterns: string[];
20
20
  includeEntropy: boolean;
21
21
  entropyThreshold: number;
22
22
  verifySecrets: boolean;
23
23
  scanHistory: boolean;
24
24
  }, {
25
25
  targetPath: string;
26
- excludePatterns?: string[] | undefined;
27
26
  secretTypes?: ("password" | "api-key" | "private-key" | "token" | "connection-string" | "certificate" | "aws-key" | "aws-secret" | "gcp-key" | "azure-key" | "generic")[] | undefined;
27
+ excludePatterns?: string[] | undefined;
28
28
  includeEntropy?: boolean | undefined;
29
29
  entropyThreshold?: number | undefined;
30
30
  verifySecrets?: boolean | undefined;
@@ -116,16 +116,16 @@ export declare const toolDefinition: {
116
116
  scanHistory: z.ZodDefault<z.ZodBoolean>;
117
117
  }, "strip", z.ZodTypeAny, {
118
118
  targetPath: string;
119
- excludePatterns: string[];
120
119
  secretTypes: ("password" | "api-key" | "private-key" | "token" | "connection-string" | "certificate" | "aws-key" | "aws-secret" | "gcp-key" | "azure-key" | "generic")[];
120
+ excludePatterns: string[];
121
121
  includeEntropy: boolean;
122
122
  entropyThreshold: number;
123
123
  verifySecrets: boolean;
124
124
  scanHistory: boolean;
125
125
  }, {
126
126
  targetPath: string;
127
- excludePatterns?: string[] | undefined;
128
127
  secretTypes?: ("password" | "api-key" | "private-key" | "token" | "connection-string" | "certificate" | "aws-key" | "aws-secret" | "gcp-key" | "azure-key" | "generic")[] | undefined;
128
+ excludePatterns?: string[] | undefined;
129
129
  includeEntropy?: boolean | undefined;
130
130
  entropyThreshold?: number | undefined;
131
131
  verifySecrets?: boolean | undefined;
@@ -1,8 +1,13 @@
1
1
  /**
2
2
  * Quality Tools — built-in quality MCP tools
3
3
  *
4
- * Wraps all 16 tools for test generation, coverage, defect intelligence, security, chaos
5
- * (quality_*) and plain JSON Schema inputSchemas.
4
+ * Wraps 2 tools: coverage gap prioritization and secret detection.
5
+ *
6
+ * monolean: 14 tools were removed — their handlers fabricated results
7
+ * (hardcoded fake file coverage, Math.random()-driven projections/predictions,
8
+ * invented defect data, fake security scan findings, hardcoded compliance
9
+ * results) rather than performing real analysis. Only prioritize-gaps
10
+ * (salvageable) and detect-secrets (real) remain.
6
11
  */
7
12
  import type { MCPTool } from './types.js';
8
13
  export declare const qualityTools: MCPTool[];
@@ -1 +1 @@
1
- {"version":3,"file":"quality-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/quality-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,YAAY,CAAC;AA+BzD,eAAO,MAAM,YAAY,EAAE,OAAO,EAmRjC,CAAC"}
1
+ {"version":3,"file":"quality-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/quality-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,YAAY,CAAC;AAiBzD,eAAO,MAAM,YAAY,EAAE,OAAO,EAkCjC,CAAC"}
@@ -1,25 +1,16 @@
1
1
  /**
2
2
  * Quality Tools — built-in quality MCP tools
3
3
  *
4
- * Wraps all 16 tools for test generation, coverage, defect intelligence, security, chaos
5
- * (quality_*) and plain JSON Schema inputSchemas.
4
+ * Wraps 2 tools: coverage gap prioritization and secret detection.
5
+ *
6
+ * monolean: 14 tools were removed — their handlers fabricated results
7
+ * (hardcoded fake file coverage, Math.random()-driven projections/predictions,
8
+ * invented defect data, fake security scan findings, hardcoded compliance
9
+ * results) rather than performing real analysis. Only prioritize-gaps
10
+ * (salvageable) and detect-secrets (real) remain.
6
11
  */
7
- import { handler as generateTestsHandler } from './quality/test-generation/generate-tests.js';
8
- import { handler as tddCycleHandler } from './quality/test-generation/tdd-cycle.js';
9
- import { handler as suggestTestsHandler } from './quality/test-generation/suggest-tests.js';
10
- import { handler as analyzeCoverageHandler } from './quality/coverage-analysis/analyze-coverage.js';
11
12
  import { handler as prioritizeGapsHandler } from './quality/coverage-analysis/prioritize-gaps.js';
12
- import { handler as trackTrendsHandler } from './quality/coverage-analysis/track-trends.js';
13
- import { handler as evaluateGateHandler } from './quality/quality-assessment/evaluate-quality-gate.js';
14
- import { handler as assessReadinessHandler } from './quality/quality-assessment/assess-readiness.js';
15
- import { handler as calculateRiskHandler } from './quality/quality-assessment/calculate-risk.js';
16
- import { handler as predictDefectsHandler } from './quality/defect-intelligence/predict-defects.js';
17
- import { handler as analyzeDefectHandler } from './quality/defect-intelligence/analyze-root-cause.js';
18
- import { handler as findSimilarDefectsHandler } from './quality/defect-intelligence/find-similar-defects.js';
19
- import { handler as securityScanHandler } from './quality/security-compliance/security-scan.js';
20
- import { handler as auditComplianceHandler } from './quality/security-compliance/audit-compliance.js';
21
13
  import { handler as detectSecretsHandler } from './quality/security-compliance/detect-secrets.js';
22
- import { handler as chaosInjectHandler } from './quality/chaos-resilience/chaos-inject.js';
23
14
  // monolean: minimal context shim — quality handlers call context.get() which
24
15
  // is optional; returning undefined is safe for all current handlers.
25
16
  const noopContext = { get: (_key) => undefined };
@@ -30,84 +21,6 @@ function wrap(handler) {
30
21
  };
31
22
  }
32
23
  export const qualityTools = [
33
- {
34
- name: 'quality_generate_tests',
35
- description: 'Generate AI-powered tests for code. Supports unit, integration, e2e, property, mutation, and fuzz test types across multiple frameworks.',
36
- category: 'quality',
37
- version: '0.1.0',
38
- inputSchema: {
39
- type: 'object',
40
- properties: {
41
- targetPath: { type: 'string', description: 'Path to file/directory to test' },
42
- testType: { type: 'string', enum: ['unit', 'integration', 'e2e', 'property', 'mutation', 'fuzz'] },
43
- framework: { type: 'string', enum: ['vitest', 'jest', 'mocha', 'pytest', 'junit'] },
44
- coverage: {
45
- type: 'object',
46
- properties: {
47
- target: { type: 'number' },
48
- focusGaps: { type: 'boolean' },
49
- },
50
- },
51
- style: { type: 'string', enum: ['tdd-london', 'tdd-chicago', 'bdd', 'example-based'] },
52
- language: { type: 'string', enum: ['typescript', 'javascript', 'python', 'java', 'go', 'rust'] },
53
- includeEdgeCases: { type: 'boolean' },
54
- includeMocks: { type: 'boolean' },
55
- maxTests: { type: 'number' },
56
- },
57
- required: ['targetPath'],
58
- },
59
- handler: wrap(generateTestsHandler),
60
- },
61
- {
62
- name: 'quality_tdd_cycle',
63
- description: 'Run a TDD red-green-refactor cycle for a requirement. Creates failing test, minimal implementation, then refactors.',
64
- category: 'quality',
65
- version: '0.1.0',
66
- inputSchema: {
67
- type: 'object',
68
- properties: {
69
- requirement: { type: 'string', description: 'Requirement or feature to implement via TDD' },
70
- targetPath: { type: 'string', description: 'Path to file/directory for implementation' },
71
- framework: { type: 'string', enum: ['vitest', 'jest', 'mocha', 'pytest', 'junit'] },
72
- language: { type: 'string', enum: ['typescript', 'javascript', 'python', 'java', 'go', 'rust'] },
73
- style: { type: 'string', enum: ['tdd-london', 'tdd-chicago', 'bdd', 'example-based'] },
74
- },
75
- required: ['requirement', 'targetPath'],
76
- },
77
- handler: wrap(tddCycleHandler),
78
- },
79
- {
80
- name: 'quality_suggest_tests',
81
- description: 'Suggest tests to improve coverage for a given file or directory. Returns prioritized test suggestions.',
82
- category: 'quality',
83
- version: '0.1.0',
84
- inputSchema: {
85
- type: 'object',
86
- properties: {
87
- targetPath: { type: 'string', description: 'Path to file/directory to analyze' },
88
- maxSuggestions: { type: 'number' },
89
- focusAreas: { type: 'array', items: { type: 'string' } },
90
- },
91
- required: ['targetPath'],
92
- },
93
- handler: wrap(suggestTestsHandler),
94
- },
95
- {
96
- name: 'quality_analyze_coverage',
97
- description: 'Analyze test coverage for a file or directory. Returns coverage metrics and identifies gaps.',
98
- category: 'quality',
99
- version: '0.1.0',
100
- inputSchema: {
101
- type: 'object',
102
- properties: {
103
- targetPath: { type: 'string', description: 'Path to file/directory to analyze' },
104
- includeUncovered: { type: 'boolean' },
105
- threshold: { type: 'number' },
106
- },
107
- required: ['targetPath'],
108
- },
109
- handler: wrap(analyzeCoverageHandler),
110
- },
111
24
  {
112
25
  name: 'quality_prioritize_gaps',
113
26
  description: 'Prioritize coverage gaps by risk and impact. Returns ordered list of gaps to address.',
@@ -124,151 +37,6 @@ export const qualityTools = [
124
37
  },
125
38
  handler: wrap(prioritizeGapsHandler),
126
39
  },
127
- {
128
- name: 'quality_track_trends',
129
- description: 'Track coverage trends over time. Returns trend analysis and regression detection.',
130
- category: 'quality',
131
- version: '0.1.0',
132
- inputSchema: {
133
- type: 'object',
134
- properties: {
135
- targetPath: { type: 'string' },
136
- period: { type: 'string', enum: ['day', 'week', 'month'] },
137
- metric: { type: 'string', enum: ['line', 'branch', 'function'] },
138
- },
139
- required: [],
140
- },
141
- handler: wrap(trackTrendsHandler),
142
- },
143
- {
144
- name: 'quality_evaluate_gate',
145
- description: 'Evaluate whether code passes quality gates (coverage thresholds, complexity, etc.).',
146
- category: 'quality',
147
- version: '0.1.0',
148
- inputSchema: {
149
- type: 'object',
150
- properties: {
151
- targetPath: { type: 'string' },
152
- gates: { type: 'array', items: { type: 'object' } },
153
- strict: { type: 'boolean' },
154
- },
155
- required: [],
156
- },
157
- handler: wrap(evaluateGateHandler),
158
- },
159
- {
160
- name: 'quality_assess_readiness',
161
- description: 'Assess code readiness for release. Checks quality gates, test coverage, and risk factors.',
162
- category: 'quality',
163
- version: '0.1.0',
164
- inputSchema: {
165
- type: 'object',
166
- properties: {
167
- targetPath: { type: 'string' },
168
- releaseType: { type: 'string', enum: ['major', 'minor', 'patch'] },
169
- checkList: { type: 'array', items: { type: 'string' } },
170
- },
171
- required: [],
172
- },
173
- handler: wrap(assessReadinessHandler),
174
- },
175
- {
176
- name: 'quality_calculate_risk',
177
- description: 'Calculate risk score for a file or change. Returns risk metrics and recommendations.',
178
- category: 'quality',
179
- version: '0.1.0',
180
- inputSchema: {
181
- type: 'object',
182
- properties: {
183
- targetPath: { type: 'string', description: 'Path to file/directory to assess' },
184
- includeHistory: { type: 'boolean' },
185
- riskFactors: { type: 'array', items: { type: 'string' } },
186
- },
187
- required: ['targetPath'],
188
- },
189
- handler: wrap(calculateRiskHandler),
190
- },
191
- {
192
- name: 'quality_predict_defects',
193
- description: 'Predict defect-prone areas in code using static analysis and historical patterns.',
194
- category: 'quality',
195
- version: '0.1.0',
196
- inputSchema: {
197
- type: 'object',
198
- properties: {
199
- targetPath: { type: 'string', description: 'Path to file/directory to analyze' },
200
- confidence: { type: 'number' },
201
- maxPredictions: { type: 'number' },
202
- },
203
- required: ['targetPath'],
204
- },
205
- handler: wrap(predictDefectsHandler),
206
- },
207
- {
208
- name: 'quality_analyze_defect',
209
- description: 'Analyze root cause of a defect. Returns causal chain, contributing factors, and fix recommendations.',
210
- category: 'quality',
211
- version: '0.1.0',
212
- inputSchema: {
213
- type: 'object',
214
- properties: {
215
- defect: { type: 'object', description: 'Defect description with title, description, stackTrace' },
216
- codeContext: { type: 'string' },
217
- includeFixSuggestions: { type: 'boolean' },
218
- },
219
- required: ['defect'],
220
- },
221
- handler: wrap(analyzeDefectHandler),
222
- },
223
- {
224
- name: 'quality_find_similar_defects',
225
- description: 'Find defects similar to a given query using semantic search.',
226
- category: 'quality',
227
- version: '0.1.0',
228
- inputSchema: {
229
- type: 'object',
230
- properties: {
231
- query: { type: 'string', description: 'Defect description to search for' },
232
- maxResults: { type: 'number' },
233
- threshold: { type: 'number' },
234
- },
235
- required: ['query'],
236
- },
237
- handler: wrap(findSimilarDefectsHandler),
238
- },
239
- {
240
- name: 'quality_security_scan',
241
- description: 'Scan code for security vulnerabilities. Returns findings with severity, location, and remediation.',
242
- category: 'quality',
243
- version: '0.1.0',
244
- inputSchema: {
245
- type: 'object',
246
- properties: {
247
- targetPath: { type: 'string', description: 'Path to file/directory to scan' },
248
- scanType: { type: 'string', enum: ['sast', 'dependency', 'all'] },
249
- severity: { type: 'string', enum: ['low', 'medium', 'high', 'critical'] },
250
- excludePatterns: { type: 'array', items: { type: 'string' } },
251
- },
252
- required: ['targetPath'],
253
- },
254
- handler: wrap(securityScanHandler),
255
- },
256
- {
257
- name: 'quality_audit_compliance',
258
- description: 'Audit code for compliance with security standards (OWASP, CWE, GDPR, etc.).',
259
- category: 'quality',
260
- version: '0.1.0',
261
- inputSchema: {
262
- type: 'object',
263
- properties: {
264
- targetPath: { type: 'string', description: 'Path to file/directory to audit' },
265
- standards: { type: 'array', items: { type: 'string' } },
266
- strict: { type: 'boolean' },
267
- },
268
- required: ['targetPath'],
269
- },
270
- handler: wrap(auditComplianceHandler),
271
- },
272
40
  {
273
41
  name: 'quality_detect_secrets',
274
42
  description: 'Detect hardcoded secrets, API keys, and credentials in code.',
@@ -286,23 +54,5 @@ export const qualityTools = [
286
54
  },
287
55
  handler: wrap(detectSecretsHandler),
288
56
  },
289
- {
290
- name: 'quality_chaos_inject',
291
- description: 'Inject chaos (failures, latency, errors) into a target to test resilience.',
292
- category: 'quality',
293
- version: '0.1.0',
294
- inputSchema: {
295
- type: 'object',
296
- properties: {
297
- target: { type: 'string', description: 'Target service or component' },
298
- failureType: { type: 'string', enum: ['latency', 'error', 'crash', 'resource-exhaustion', 'network-partition'] },
299
- duration: { type: 'number' },
300
- intensity: { type: 'number' },
301
- dryRun: { type: 'boolean' },
302
- },
303
- required: ['target', 'failureType'],
304
- },
305
- handler: wrap(chaosInjectHandler),
306
- },
307
57
  ];
308
58
  //# sourceMappingURL=quality-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quality-tools.js","sourceRoot":"","sources":["../../../src/mcp-tools/quality-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AACvG,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAC7G,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AACtG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,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AK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBAC7D,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE;aAC1E;YACD,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;QACD,OAAO,EAAE,IAAI,CAAC,oBAAkD,CAAC;KAClE;CACF,CAAC"}
@@ -13,8 +13,7 @@
13
13
  export interface SonaConfig {
14
14
  instantLoopEnabled: boolean;
15
15
  backgroundLoopEnabled: boolean;
16
- loraLearningRate: number;
17
- loraRank: number;
16
+ confidenceLearningRate: number;
18
17
  ewcLambda: number;
19
18
  maxTrajectorySize: number;
20
19
  patternThreshold: number;
@@ -104,7 +103,7 @@ declare class LocalSonaCoordinator {
104
103
  */
105
104
  addTrajectoryStep(step: TrajectoryStep): void;
106
105
  /**
107
- * End the current trajectory with a verdict and apply RL updates.
106
+ * End the current trajectory with a verdict and apply confidence updates.
108
107
  * Reward mapping: success=1.0, partial=0.5, failure=-0.5
109
108
  *
110
109
  * For successful/partial trajectories, boosts confidence of similar patterns
@@ -116,10 +115,10 @@ declare class LocalSonaCoordinator {
116
115
  }>;
117
116
  /**
118
117
  * Distill learning from recent successful trajectories.
119
- * Applies LoRA-style confidence updates and integrates EWC++ consolidation.
118
+ * Applies incremental confidence updates and integrates EWC consolidation.
120
119
  *
121
120
  * For each successful trajectory step with high confidence,
122
- * increases the pattern's stored confidence by loraLearningRate * reward.
121
+ * increases the pattern's stored confidence by confidenceLearningRate * reward.
123
122
  * Before applying updates, checks EWC penalty to prevent catastrophic forgetting.
124
123
  */
125
124
  distillLearning(bank: LocalReasoningBank): Promise<{
@@ -264,8 +263,8 @@ export declare function getSonaCoordinator(): LocalSonaCoordinator | null;
264
263
  */
265
264
  export declare function getReasoningBank(): LocalReasoningBank | null;
266
265
  /**
267
- * End the current trajectory with a verdict and apply RL updates.
268
- * This is the public API for the SONA RL loop.
266
+ * End the current trajectory with a verdict and apply confidence updates.
267
+ * This is the public API for the SONA feedback loop.
269
268
  *
270
269
  * @param verdict - 'success' (reward=1.0), 'partial' (0.5), or 'failure' (-0.5)
271
270
  * @returns Update statistics or null if not initialized
@@ -276,7 +275,7 @@ export declare function endTrajectoryWithVerdict(verdict: 'success' | 'failure'
276
275
  } | null>;
277
276
  /**
278
277
  * Distill learning from recent successful trajectories.
279
- * Applies LoRA-style confidence updates with EWC++ consolidation protection.
278
+ * Applies incremental confidence updates with EWC consolidation protection.
280
279
  *
281
280
  * @returns Distillation statistics or null if not initialized
282
281
  */
@@ -1 +1 @@
1
- {"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../../src/memory/intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyDH,MAAM,WAAW,UAAU;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,M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62
- loraLearningRate: 0.001,
63
- loraRank: 8,
62
+ confidenceLearningRate: 0.001,
64
63
  ewcLambda: 0.4,
65
64
  maxTrajectorySize: 100,
66
65
  patternThreshold: 0.7,
@@ -148,7 +147,7 @@ class LocalSonaCoordinator {
148
147
  }
149
148
  }
150
149
  /**
151
- * End the current trajectory with a verdict and apply RL updates.
150
+ * End the current trajectory with a verdict and apply confidence updates.
152
151
  * Reward mapping: success=1.0, partial=0.5, failure=-0.5
153
152
  *
154
153
  * For successful/partial trajectories, boosts confidence of similar patterns
@@ -198,10 +197,10 @@ class LocalSonaCoordinator {
198
197
  }
199
198
  /**
200
199
  * Distill learning from recent successful trajectories.
201
- * Applies LoRA-style confidence updates and integrates EWC++ consolidation.
200
+ * Applies incremental confidence updates and integrates EWC consolidation.
202
201
  *
203
202
  * For each successful trajectory step with high confidence,
204
- * increases the pattern's stored confidence by loraLearningRate * reward.
203
+ * increases the pattern's stored confidence by confidenceLearningRate * reward.
205
204
  * Before applying updates, checks EWC penalty to prevent catastrophic forgetting.
206
205
  */
207
206
  async distillLearning(bank) {
@@ -249,13 +248,13 @@ class LocalSonaCoordinator {
249
248
  // Check EWC penalty before applying update
250
249
  if (ewcConsolidator) {
251
250
  const oldWeights = [oldConfidence];
252
- const proposedConfidence = Math.min(1.0, oldConfidence + this.config.loraLearningRate * reward);
251
+ const proposedConfidence = Math.min(1.0, oldConfidence + this.config.confidenceLearningRate * reward);
253
252
  const newWeights = [proposedConfidence];
254
253
  const penalty = ewcConsolidator.getPenalty(oldWeights, newWeights);
255
254
  totalEwcPenalty += penalty;
256
255
  // If penalty is too high, reduce the update magnitude
257
256
  if (penalty > this.config.ewcLambda) {
258
- const dampedDelta = (this.config.loraLearningRate * reward) / (1 + penalty);
257
+ const dampedDelta = (this.config.confidenceLearningRate * reward) / (1 + penalty);
259
258
  pattern.confidence = Math.max(0.0, Math.min(1.0, oldConfidence + dampedDelta));
260
259
  }
261
260
  else {
@@ -263,8 +262,8 @@ class LocalSonaCoordinator {
263
262
  }
264
263
  }
265
264
  else {
266
- // No EWC: apply full LoRA update
267
- pattern.confidence = Math.max(0.0, Math.min(1.0, oldConfidence + this.config.loraLearningRate * reward));
265
+ // No consolidation guard available: apply the full confidence update
266
+ pattern.confidence = Math.max(0.0, Math.min(1.0, oldConfidence + this.config.confidenceLearningRate * reward));
268
267
  }
269
268
  pattern.lastUsedAt = Date.now();
270
269
  patternsDistilled++;
@@ -612,7 +611,7 @@ async function _doInitializeIntelligence(config) {
612
611
  });
613
612
  // Load persisted stats if available
614
613
  loadPersistedStats();
615
- // Seed neural learned patterns from @monomind/neural's LearningBridge flush.
614
+ // Seed neural learned patterns from pattern store.
616
615
  // This is the A→B bridge reader: connects the automatic learning loop to routing.
617
616
  const neuralPatternsPath = join(getDataDir(), 'patterns.json');
618
617
  if (existsSync(neuralPatternsPath) && statSync(neuralPatternsPath).size <= 50 * 1024 * 1024) {
@@ -756,7 +755,7 @@ export async function recordStep(step) {
756
755
  metadata: step.metadata,
757
756
  timestamp: step.timestamp || Date.now()
758
757
  });
759
- // Add to current trajectory for RL tracking
758
+ // Add to current trajectory for outcome tracking
760
759
  const stepWithEmbedding = { ...step, embedding };
761
760
  sonaCoordinator.addTrajectoryStep(stepWithEmbedding);
762
761
  // Store in ReasoningBank for retrieval
@@ -770,7 +769,7 @@ export async function recordStep(step) {
770
769
  metadata: step.metadata
771
770
  });
772
771
  }
773
- // When a 'result' step arrives, end the trajectory and run RL loop
772
+ // When a 'result' step arrives, end the trajectory and run the confidence-update loop
774
773
  if (step.type === 'result' && reasoningBank) {
775
774
  // Determine verdict from metadata or default to 'partial'
776
775
  const verdict = step.metadata?.verdict || 'partial';
@@ -801,7 +800,7 @@ export async function recordTrajectory(steps, verdict) {
801
800
  verdict,
802
801
  timestamp: Date.now()
803
802
  });
804
- // Apply RL: update pattern confidences based on verdict
803
+ // Update pattern confidences based on verdict
805
804
  if (reasoningBank) {
806
805
  // Load steps into the coordinator for endTrajectory processing
807
806
  for (const step of steps) {
@@ -904,8 +903,8 @@ export function getReasoningBank() {
904
903
  return reasoningBank;
905
904
  }
906
905
  /**
907
- * End the current trajectory with a verdict and apply RL updates.
908
- * This is the public API for the SONA RL loop.
906
+ * End the current trajectory with a verdict and apply confidence updates.
907
+ * This is the public API for the SONA feedback loop.
909
908
  *
910
909
  * @param verdict - 'success' (reward=1.0), 'partial' (0.5), or 'failure' (-0.5)
911
910
  * @returns Update statistics or null if not initialized
@@ -928,7 +927,7 @@ export async function endTrajectoryWithVerdict(verdict) {
928
927
  }
929
928
  /**
930
929
  * Distill learning from recent successful trajectories.
931
- * Applies LoRA-style confidence updates with EWC++ consolidation protection.
930
+ * Applies incremental confidence updates with EWC consolidation protection.
932
931
  *
933
932
  * @returns Distillation statistics or null if not initialized
934
933
  */