moflo 4.8.31 → 4.8.33

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 (415) hide show
  1. package/package.json +13 -10
  2. package/src/@claude-flow/cli/dist/src/commands/doctor.js +1298 -1107
  3. package/src/@claude-flow/cli/dist/src/memory/memory-initializer.js +4 -7
  4. package/src/@claude-flow/cli/package.json +106 -106
  5. package/src/@claude-flow/neural/README.md +260 -0
  6. package/src/@claude-flow/neural/dist/algorithms/a2c.js +361 -0
  7. package/src/@claude-flow/neural/dist/algorithms/curiosity.js +392 -0
  8. package/src/@claude-flow/neural/dist/algorithms/decision-transformer.js +415 -0
  9. package/src/@claude-flow/neural/dist/algorithms/dqn.js +303 -0
  10. package/src/@claude-flow/neural/dist/algorithms/index.js +74 -0
  11. package/src/@claude-flow/neural/dist/algorithms/ppo.js +331 -0
  12. package/src/@claude-flow/neural/dist/algorithms/q-learning.js +259 -0
  13. package/src/@claude-flow/neural/dist/algorithms/sarsa.js +297 -0
  14. package/src/@claude-flow/neural/dist/application/index.js +7 -0
  15. package/src/@claude-flow/neural/dist/application/services/neural-application-service.js +161 -0
  16. package/src/@claude-flow/neural/dist/domain/entities/pattern.js +134 -0
  17. package/src/@claude-flow/neural/dist/domain/index.js +8 -0
  18. package/src/@claude-flow/neural/dist/domain/services/learning-service.js +195 -0
  19. package/src/@claude-flow/neural/dist/index.js +201 -0
  20. package/src/@claude-flow/neural/dist/modes/balanced.js +234 -0
  21. package/src/@claude-flow/neural/dist/modes/base.js +77 -0
  22. package/src/@claude-flow/neural/dist/modes/batch.js +316 -0
  23. package/src/@claude-flow/neural/dist/modes/edge.js +310 -0
  24. package/src/@claude-flow/neural/dist/modes/index.js +13 -0
  25. package/src/@claude-flow/neural/dist/modes/real-time.js +196 -0
  26. package/src/@claude-flow/neural/dist/modes/research.js +389 -0
  27. package/src/@claude-flow/neural/dist/pattern-learner.js +603 -0
  28. package/src/@claude-flow/neural/dist/reasoning-bank.js +993 -0
  29. package/src/@claude-flow/neural/dist/reasoningbank-adapter.js +463 -0
  30. package/src/@claude-flow/neural/dist/sona-integration.js +316 -0
  31. package/src/@claude-flow/neural/dist/sona-manager.js +695 -0
  32. package/src/@claude-flow/neural/dist/types.js +11 -0
  33. package/src/@claude-flow/neural/package.json +26 -0
  34. package/.claude/agents/browser/browser-agent.yaml +0 -182
  35. package/.claude/agents/database-specialist.yaml +0 -21
  36. package/.claude/agents/index.yaml +0 -17
  37. package/.claude/agents/project-coordinator.yaml +0 -15
  38. package/.claude/agents/python-specialist.yaml +0 -21
  39. package/.claude/agents/security-auditor.yaml +0 -20
  40. package/.claude/agents/typescript-specialist.yaml +0 -21
  41. package/.claude/checkpoints/1767754460.json +0 -8
  42. package/.claude/config/v3-dependency-optimization.json +0 -266
  43. package/.claude/config/v3-performance-targets.json +0 -251
  44. package/.claude/guidance/moflo-bootstrap.md +0 -129
  45. package/.claude/mcp.json +0 -13
  46. package/.claude/settings.json +0 -351
  47. package/.claude/settings.local.json +0 -18
  48. package/.claude/skills/agentdb-advanced/SKILL.md +0 -550
  49. package/.claude/skills/agentdb-learning/SKILL.md +0 -545
  50. package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -339
  51. package/.claude/skills/agentdb-optimization/SKILL.md +0 -509
  52. package/.claude/skills/agentdb-vector-search/SKILL.md +0 -339
  53. package/.claude/skills/browser/SKILL.md +0 -204
  54. package/.claude/skills/fl/SKILL.md +0 -583
  55. package/.claude/skills/flo/SKILL.md +0 -583
  56. package/.claude/skills/github-code-review/SKILL.md +0 -1140
  57. package/.claude/skills/github-multi-repo/SKILL.md +0 -874
  58. package/.claude/skills/github-project-management/SKILL.md +0 -1277
  59. package/.claude/skills/github-release-management/SKILL.md +0 -1081
  60. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1065
  61. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  62. package/.claude/skills/hooks-automation/SKILL.md +0 -1201
  63. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  64. package/.claude/skills/performance-analysis/SKILL.md +0 -563
  65. package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -446
  66. package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -201
  67. package/.claude/skills/skill-builder/SKILL.md +0 -910
  68. package/.claude/skills/sparc-methodology/SKILL.md +0 -1115
  69. package/.claude/skills/stream-chain/SKILL.md +0 -563
  70. package/.claude/skills/swarm-advanced/SKILL.md +0 -973
  71. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  72. package/.claude/skills/v3-cli-modernization/SKILL.md +0 -872
  73. package/.claude/skills/v3-core-implementation/SKILL.md +0 -797
  74. package/.claude/skills/v3-ddd-architecture/SKILL.md +0 -442
  75. package/.claude/skills/v3-integration-deep/SKILL.md +0 -241
  76. package/.claude/skills/v3-mcp-optimization/SKILL.md +0 -777
  77. package/.claude/skills/v3-memory-unification/SKILL.md +0 -174
  78. package/.claude/skills/v3-performance-optimization/SKILL.md +0 -390
  79. package/.claude/skills/v3-security-overhaul/SKILL.md +0 -82
  80. package/.claude/skills/v3-swarm-coordination/SKILL.md +0 -340
  81. package/.claude/skills/verification-quality/SKILL.md +0 -649
  82. package/.claude/skills/worker-benchmarks/skill.md +0 -135
  83. package/.claude/skills/worker-integration/skill.md +0 -154
  84. package/.claude/workflow-state.json +0 -9
  85. package/src/@claude-flow/cli/dist/src/appliance/gguf-engine.d.ts +0 -91
  86. package/src/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.d.ts +0 -102
  87. package/src/@claude-flow/cli/dist/src/appliance/rvfa-builder.d.ts +0 -44
  88. package/src/@claude-flow/cli/dist/src/appliance/rvfa-distribution.d.ts +0 -97
  89. package/src/@claude-flow/cli/dist/src/appliance/rvfa-format.d.ts +0 -111
  90. package/src/@claude-flow/cli/dist/src/appliance/rvfa-runner.d.ts +0 -69
  91. package/src/@claude-flow/cli/dist/src/appliance/rvfa-signing.d.ts +0 -123
  92. package/src/@claude-flow/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -58
  93. package/src/@claude-flow/cli/dist/src/commands/agent.d.ts +0 -8
  94. package/src/@claude-flow/cli/dist/src/commands/analyze.d.ts +0 -19
  95. package/src/@claude-flow/cli/dist/src/commands/appliance-advanced.d.ts +0 -9
  96. package/src/@claude-flow/cli/dist/src/commands/appliance.d.ts +0 -8
  97. package/src/@claude-flow/cli/dist/src/commands/benchmark.d.ts +0 -10
  98. package/src/@claude-flow/cli/dist/src/commands/claims.d.ts +0 -10
  99. package/src/@claude-flow/cli/dist/src/commands/completions.d.ts +0 -10
  100. package/src/@claude-flow/cli/dist/src/commands/config.d.ts +0 -8
  101. package/src/@claude-flow/cli/dist/src/commands/daemon.d.ts +0 -8
  102. package/src/@claude-flow/cli/dist/src/commands/deployment.d.ts +0 -10
  103. package/src/@claude-flow/cli/dist/src/commands/diagnose.d.ts +0 -16
  104. package/src/@claude-flow/cli/dist/src/commands/doctor.d.ts +0 -10
  105. package/src/@claude-flow/cli/dist/src/commands/embeddings.d.ts +0 -18
  106. package/src/@claude-flow/cli/dist/src/commands/gate.d.ts +0 -23
  107. package/src/@claude-flow/cli/dist/src/commands/github.d.ts +0 -12
  108. package/src/@claude-flow/cli/dist/src/commands/guidance.d.ts +0 -8
  109. package/src/@claude-flow/cli/dist/src/commands/hive-mind.d.ts +0 -11
  110. package/src/@claude-flow/cli/dist/src/commands/hooks.d.ts +0 -8
  111. package/src/@claude-flow/cli/dist/src/commands/index.d.ts +0 -115
  112. package/src/@claude-flow/cli/dist/src/commands/init.d.ts +0 -8
  113. package/src/@claude-flow/cli/dist/src/commands/issues.d.ts +0 -21
  114. package/src/@claude-flow/cli/dist/src/commands/mcp.d.ts +0 -11
  115. package/src/@claude-flow/cli/dist/src/commands/memory.d.ts +0 -8
  116. package/src/@claude-flow/cli/dist/src/commands/migrate.d.ts +0 -8
  117. package/src/@claude-flow/cli/dist/src/commands/neural.d.ts +0 -10
  118. package/src/@claude-flow/cli/dist/src/commands/orc.d.ts +0 -21
  119. package/src/@claude-flow/cli/dist/src/commands/performance.d.ts +0 -10
  120. package/src/@claude-flow/cli/dist/src/commands/plugins.d.ts +0 -11
  121. package/src/@claude-flow/cli/dist/src/commands/process.d.ts +0 -10
  122. package/src/@claude-flow/cli/dist/src/commands/progress.d.ts +0 -11
  123. package/src/@claude-flow/cli/dist/src/commands/providers.d.ts +0 -10
  124. package/src/@claude-flow/cli/dist/src/commands/route.d.ts +0 -16
  125. package/src/@claude-flow/cli/dist/src/commands/ruvector/backup.d.ts +0 -11
  126. package/src/@claude-flow/cli/dist/src/commands/ruvector/benchmark.d.ts +0 -11
  127. package/src/@claude-flow/cli/dist/src/commands/ruvector/import.d.ts +0 -18
  128. package/src/@claude-flow/cli/dist/src/commands/ruvector/index.d.ts +0 -29
  129. package/src/@claude-flow/cli/dist/src/commands/ruvector/init.d.ts +0 -11
  130. package/src/@claude-flow/cli/dist/src/commands/ruvector/migrate.d.ts +0 -11
  131. package/src/@claude-flow/cli/dist/src/commands/ruvector/optimize.d.ts +0 -11
  132. package/src/@claude-flow/cli/dist/src/commands/ruvector/setup.d.ts +0 -18
  133. package/src/@claude-flow/cli/dist/src/commands/ruvector/status.d.ts +0 -11
  134. package/src/@claude-flow/cli/dist/src/commands/security.d.ts +0 -10
  135. package/src/@claude-flow/cli/dist/src/commands/session.d.ts +0 -8
  136. package/src/@claude-flow/cli/dist/src/commands/start.d.ts +0 -8
  137. package/src/@claude-flow/cli/dist/src/commands/status.d.ts +0 -8
  138. package/src/@claude-flow/cli/dist/src/commands/swarm.d.ts +0 -8
  139. package/src/@claude-flow/cli/dist/src/commands/task.d.ts +0 -8
  140. package/src/@claude-flow/cli/dist/src/commands/transfer-store.d.ts +0 -13
  141. package/src/@claude-flow/cli/dist/src/commands/update.d.ts +0 -8
  142. package/src/@claude-flow/cli/dist/src/commands/workflow.d.ts +0 -8
  143. package/src/@claude-flow/cli/dist/src/config/moflo-config.d.ts +0 -93
  144. package/src/@claude-flow/cli/dist/src/config-adapter.d.ts +0 -15
  145. package/src/@claude-flow/cli/dist/src/index.d.ts +0 -81
  146. package/src/@claude-flow/cli/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
  147. package/src/@claude-flow/cli/dist/src/init/claudemd-generator.d.ts +0 -30
  148. package/src/@claude-flow/cli/dist/src/init/executor.d.ts +0 -41
  149. package/src/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +0 -51
  150. package/src/@claude-flow/cli/dist/src/init/index.d.ts +0 -13
  151. package/src/@claude-flow/cli/dist/src/init/mcp-generator.d.ts +0 -29
  152. package/src/@claude-flow/cli/dist/src/init/moflo-init.d.ts +0 -31
  153. package/src/@claude-flow/cli/dist/src/init/settings-generator.d.ts +0 -14
  154. package/src/@claude-flow/cli/dist/src/init/statusline-generator.d.ts +0 -28
  155. package/src/@claude-flow/cli/dist/src/init/types.d.ts +0 -285
  156. package/src/@claude-flow/cli/dist/src/mcp-client.d.ts +0 -92
  157. package/src/@claude-flow/cli/dist/src/mcp-server.d.ts +0 -161
  158. package/src/@claude-flow/cli/dist/src/mcp-tools/agent-tools.d.ts +0 -9
  159. package/src/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.d.ts +0 -30
  160. package/src/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.d.ts +0 -38
  161. package/src/@claude-flow/cli/dist/src/mcp-tools/auto-install.d.ts +0 -83
  162. package/src/@claude-flow/cli/dist/src/mcp-tools/browser-tools.d.ts +0 -13
  163. package/src/@claude-flow/cli/dist/src/mcp-tools/claims-tools.d.ts +0 -12
  164. package/src/@claude-flow/cli/dist/src/mcp-tools/config-tools.d.ts +0 -8
  165. package/src/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.d.ts +0 -13
  166. package/src/@claude-flow/cli/dist/src/mcp-tools/daa-tools.d.ts +0 -13
  167. package/src/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.d.ts +0 -9
  168. package/src/@claude-flow/cli/dist/src/mcp-tools/github-tools.d.ts +0 -13
  169. package/src/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +0 -8
  170. package/src/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.d.ts +0 -44
  171. package/src/@claude-flow/cli/dist/src/mcp-tools/index.d.ts +0 -23
  172. package/src/@claude-flow/cli/dist/src/mcp-tools/memory-tools.d.ts +0 -14
  173. package/src/@claude-flow/cli/dist/src/mcp-tools/neural-tools.d.ts +0 -16
  174. package/src/@claude-flow/cli/dist/src/mcp-tools/performance-tools.d.ts +0 -16
  175. package/src/@claude-flow/cli/dist/src/mcp-tools/progress-tools.d.ts +0 -14
  176. package/src/@claude-flow/cli/dist/src/mcp-tools/security-tools.d.ts +0 -18
  177. package/src/@claude-flow/cli/dist/src/mcp-tools/session-tools.d.ts +0 -8
  178. package/src/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.d.ts +0 -8
  179. package/src/@claude-flow/cli/dist/src/mcp-tools/system-tools.d.ts +0 -13
  180. package/src/@claude-flow/cli/dist/src/mcp-tools/task-tools.d.ts +0 -8
  181. package/src/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.d.ts +0 -13
  182. package/src/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.d.ts +0 -14
  183. package/src/@claude-flow/cli/dist/src/mcp-tools/types.d.ts +0 -31
  184. package/src/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
  185. package/src/@claude-flow/cli/dist/src/memory/ewc-consolidation.d.ts +0 -271
  186. package/src/@claude-flow/cli/dist/src/memory/intelligence.d.ts +0 -285
  187. package/src/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts +0 -413
  188. package/src/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +0 -405
  189. package/src/@claude-flow/cli/dist/src/memory/sona-optimizer.d.ts +0 -227
  190. package/src/@claude-flow/cli/dist/src/output.d.ts +0 -133
  191. package/src/@claude-flow/cli/dist/src/parser.d.ts +0 -51
  192. package/src/@claude-flow/cli/dist/src/plugins/manager.d.ts +0 -133
  193. package/src/@claude-flow/cli/dist/src/plugins/store/discovery.d.ts +0 -88
  194. package/src/@claude-flow/cli/dist/src/plugins/store/index.d.ts +0 -76
  195. package/src/@claude-flow/cli/dist/src/plugins/store/search.d.ts +0 -46
  196. package/src/@claude-flow/cli/dist/src/plugins/store/types.d.ts +0 -274
  197. package/src/@claude-flow/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
  198. package/src/@claude-flow/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
  199. package/src/@claude-flow/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
  200. package/src/@claude-flow/cli/dist/src/production/circuit-breaker.d.ts +0 -101
  201. package/src/@claude-flow/cli/dist/src/production/error-handler.d.ts +0 -92
  202. package/src/@claude-flow/cli/dist/src/production/index.d.ts +0 -23
  203. package/src/@claude-flow/cli/dist/src/production/monitoring.d.ts +0 -161
  204. package/src/@claude-flow/cli/dist/src/production/rate-limiter.d.ts +0 -80
  205. package/src/@claude-flow/cli/dist/src/production/retry.d.ts +0 -48
  206. package/src/@claude-flow/cli/dist/src/prompt.d.ts +0 -44
  207. package/src/@claude-flow/cli/dist/src/runtime/headless.d.ts +0 -60
  208. package/src/@claude-flow/cli/dist/src/ruvector/ast-analyzer.d.ts +0 -67
  209. package/src/@claude-flow/cli/dist/src/ruvector/coverage-router.d.ts +0 -160
  210. package/src/@claude-flow/cli/dist/src/ruvector/coverage-tools.d.ts +0 -33
  211. package/src/@claude-flow/cli/dist/src/ruvector/diff-classifier.d.ts +0 -175
  212. package/src/@claude-flow/cli/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
  213. package/src/@claude-flow/cli/dist/src/ruvector/flash-attention.d.ts +0 -195
  214. package/src/@claude-flow/cli/dist/src/ruvector/graph-analyzer.d.ts +0 -187
  215. package/src/@claude-flow/cli/dist/src/ruvector/index.d.ts +0 -34
  216. package/src/@claude-flow/cli/dist/src/ruvector/lora-adapter.d.ts +0 -218
  217. package/src/@claude-flow/cli/dist/src/ruvector/model-router.d.ts +0 -220
  218. package/src/@claude-flow/cli/dist/src/ruvector/moe-router.d.ts +0 -206
  219. package/src/@claude-flow/cli/dist/src/ruvector/q-learning-router.d.ts +0 -211
  220. package/src/@claude-flow/cli/dist/src/ruvector/semantic-router.d.ts +0 -77
  221. package/src/@claude-flow/cli/dist/src/ruvector/vector-db.d.ts +0 -69
  222. package/src/@claude-flow/cli/dist/src/services/agent-router.d.ts +0 -63
  223. package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts +0 -50
  224. package/src/@claude-flow/cli/dist/src/services/claim-service.d.ts +0 -204
  225. package/src/@claude-flow/cli/dist/src/services/container-worker-pool.d.ts +0 -197
  226. package/src/@claude-flow/cli/dist/src/services/daemon-lock.d.ts +0 -60
  227. package/src/@claude-flow/cli/dist/src/services/headless-worker-executor.d.ts +0 -304
  228. package/src/@claude-flow/cli/dist/src/services/index.d.ts +0 -13
  229. package/src/@claude-flow/cli/dist/src/services/learning-service.d.ts +0 -161
  230. package/src/@claude-flow/cli/dist/src/services/moflo-require.d.ts +0 -34
  231. package/src/@claude-flow/cli/dist/src/services/registry-api.d.ts +0 -58
  232. package/src/@claude-flow/cli/dist/src/services/ruvector-training.d.ts +0 -214
  233. package/src/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +0 -225
  234. package/src/@claude-flow/cli/dist/src/services/worker-queue.d.ts +0 -194
  235. package/src/@claude-flow/cli/dist/src/services/workflow-gate.d.ts +0 -88
  236. package/src/@claude-flow/cli/dist/src/suggest.d.ts +0 -53
  237. package/src/@claude-flow/cli/dist/src/transfer/anonymization/index.d.ts +0 -25
  238. package/src/@claude-flow/cli/dist/src/transfer/deploy-seraphine.d.ts +0 -13
  239. package/src/@claude-flow/cli/dist/src/transfer/export.d.ts +0 -25
  240. package/src/@claude-flow/cli/dist/src/transfer/index.d.ts +0 -12
  241. package/src/@claude-flow/cli/dist/src/transfer/ipfs/client.d.ts +0 -109
  242. package/src/@claude-flow/cli/dist/src/transfer/ipfs/upload.d.ts +0 -95
  243. package/src/@claude-flow/cli/dist/src/transfer/models/seraphine.d.ts +0 -72
  244. package/src/@claude-flow/cli/dist/src/transfer/serialization/cfp.d.ts +0 -49
  245. package/src/@claude-flow/cli/dist/src/transfer/storage/gcs.d.ts +0 -82
  246. package/src/@claude-flow/cli/dist/src/transfer/storage/index.d.ts +0 -6
  247. package/src/@claude-flow/cli/dist/src/transfer/store/discovery.d.ts +0 -84
  248. package/src/@claude-flow/cli/dist/src/transfer/store/download.d.ts +0 -70
  249. package/src/@claude-flow/cli/dist/src/transfer/store/index.d.ts +0 -84
  250. package/src/@claude-flow/cli/dist/src/transfer/store/publish.d.ts +0 -76
  251. package/src/@claude-flow/cli/dist/src/transfer/store/registry.d.ts +0 -58
  252. package/src/@claude-flow/cli/dist/src/transfer/store/search.d.ts +0 -54
  253. package/src/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
  254. package/src/@claude-flow/cli/dist/src/transfer/store/types.d.ts +0 -193
  255. package/src/@claude-flow/cli/dist/src/transfer/test-seraphine.d.ts +0 -6
  256. package/src/@claude-flow/cli/dist/src/transfer/tests/test-store.d.ts +0 -7
  257. package/src/@claude-flow/cli/dist/src/transfer/types.d.ts +0 -245
  258. package/src/@claude-flow/cli/dist/src/types.d.ts +0 -198
  259. package/src/@claude-flow/cli/dist/src/update/checker.d.ts +0 -34
  260. package/src/@claude-flow/cli/dist/src/update/executor.d.ts +0 -32
  261. package/src/@claude-flow/cli/dist/src/update/index.d.ts +0 -33
  262. package/src/@claude-flow/cli/dist/src/update/rate-limiter.d.ts +0 -20
  263. package/src/@claude-flow/cli/dist/src/update/validator.d.ts +0 -17
  264. package/src/@claude-flow/guidance/dist/adversarial.d.ts +0 -284
  265. package/src/@claude-flow/guidance/dist/analyzer.d.ts +0 -530
  266. package/src/@claude-flow/guidance/dist/artifacts.d.ts +0 -283
  267. package/src/@claude-flow/guidance/dist/authority.d.ts +0 -290
  268. package/src/@claude-flow/guidance/dist/capabilities.d.ts +0 -209
  269. package/src/@claude-flow/guidance/dist/coherence.d.ts +0 -233
  270. package/src/@claude-flow/guidance/dist/compiler.d.ts +0 -87
  271. package/src/@claude-flow/guidance/dist/conformance-kit.d.ts +0 -225
  272. package/src/@claude-flow/guidance/dist/continue-gate.d.ts +0 -214
  273. package/src/@claude-flow/guidance/dist/crypto-utils.d.ts +0 -17
  274. package/src/@claude-flow/guidance/dist/evolution.d.ts +0 -282
  275. package/src/@claude-flow/guidance/dist/gates.d.ts +0 -79
  276. package/src/@claude-flow/guidance/dist/gateway.d.ts +0 -206
  277. package/src/@claude-flow/guidance/dist/generators.d.ts +0 -153
  278. package/src/@claude-flow/guidance/dist/headless.d.ts +0 -177
  279. package/src/@claude-flow/guidance/dist/hooks.d.ts +0 -109
  280. package/src/@claude-flow/guidance/dist/index.d.ts +0 -205
  281. package/src/@claude-flow/guidance/dist/ledger.d.ts +0 -162
  282. package/src/@claude-flow/guidance/dist/manifest-validator.d.ts +0 -289
  283. package/src/@claude-flow/guidance/dist/memory-gate.d.ts +0 -222
  284. package/src/@claude-flow/guidance/dist/meta-governance.d.ts +0 -265
  285. package/src/@claude-flow/guidance/dist/optimizer.d.ts +0 -104
  286. package/src/@claude-flow/guidance/dist/persistence.d.ts +0 -189
  287. package/src/@claude-flow/guidance/dist/proof.d.ts +0 -185
  288. package/src/@claude-flow/guidance/dist/retriever.d.ts +0 -116
  289. package/src/@claude-flow/guidance/dist/ruvbot-integration.d.ts +0 -370
  290. package/src/@claude-flow/guidance/dist/temporal.d.ts +0 -426
  291. package/src/@claude-flow/guidance/dist/trust.d.ts +0 -283
  292. package/src/@claude-flow/guidance/dist/truth-anchors.d.ts +0 -276
  293. package/src/@claude-flow/guidance/dist/types.d.ts +0 -378
  294. package/src/@claude-flow/guidance/dist/uncertainty.d.ts +0 -372
  295. package/src/@claude-flow/guidance/dist/wasm-kernel.d.ts +0 -48
  296. package/src/@claude-flow/memory/dist/agent-memory-scope.d.ts +0 -131
  297. package/src/@claude-flow/memory/dist/agent-memory-scope.test.d.ts +0 -8
  298. package/src/@claude-flow/memory/dist/agentdb-adapter.d.ts +0 -165
  299. package/src/@claude-flow/memory/dist/agentdb-backend.d.ts +0 -212
  300. package/src/@claude-flow/memory/dist/agentdb-backend.test.d.ts +0 -7
  301. package/src/@claude-flow/memory/dist/application/commands/delete-memory.command.d.ts +0 -65
  302. package/src/@claude-flow/memory/dist/application/commands/store-memory.command.d.ts +0 -48
  303. package/src/@claude-flow/memory/dist/application/index.d.ts +0 -12
  304. package/src/@claude-flow/memory/dist/application/queries/search-memory.query.d.ts +0 -72
  305. package/src/@claude-flow/memory/dist/application/services/memory-application-service.d.ts +0 -121
  306. package/src/@claude-flow/memory/dist/auto-memory-bridge.d.ts +0 -226
  307. package/src/@claude-flow/memory/dist/auto-memory-bridge.test.d.ts +0 -8
  308. package/src/@claude-flow/memory/dist/benchmark.test.d.ts +0 -2
  309. package/src/@claude-flow/memory/dist/cache-manager.d.ts +0 -134
  310. package/src/@claude-flow/memory/dist/controller-registry.d.ts +0 -216
  311. package/src/@claude-flow/memory/dist/controller-registry.test.d.ts +0 -14
  312. package/src/@claude-flow/memory/dist/database-provider.d.ts +0 -87
  313. package/src/@claude-flow/memory/dist/database-provider.test.d.ts +0 -7
  314. package/src/@claude-flow/memory/dist/domain/entities/memory-entry.d.ts +0 -143
  315. package/src/@claude-flow/memory/dist/domain/index.d.ts +0 -11
  316. package/src/@claude-flow/memory/dist/domain/repositories/memory-repository.interface.d.ts +0 -102
  317. package/src/@claude-flow/memory/dist/domain/services/memory-domain-service.d.ts +0 -105
  318. package/src/@claude-flow/memory/dist/hnsw-index.d.ts +0 -111
  319. package/src/@claude-flow/memory/dist/hnsw-lite.d.ts +0 -23
  320. package/src/@claude-flow/memory/dist/hybrid-backend.d.ts +0 -245
  321. package/src/@claude-flow/memory/dist/hybrid-backend.test.d.ts +0 -8
  322. package/src/@claude-flow/memory/dist/index.d.ts +0 -204
  323. package/src/@claude-flow/memory/dist/infrastructure/index.d.ts +0 -17
  324. package/src/@claude-flow/memory/dist/infrastructure/repositories/hybrid-memory-repository.d.ts +0 -66
  325. package/src/@claude-flow/memory/dist/learning-bridge.d.ts +0 -137
  326. package/src/@claude-flow/memory/dist/learning-bridge.test.d.ts +0 -8
  327. package/src/@claude-flow/memory/dist/memory-graph.d.ts +0 -100
  328. package/src/@claude-flow/memory/dist/memory-graph.test.d.ts +0 -8
  329. package/src/@claude-flow/memory/dist/migration.d.ts +0 -68
  330. package/src/@claude-flow/memory/dist/persistent-sona.d.ts +0 -144
  331. package/src/@claude-flow/memory/dist/query-builder.d.ts +0 -211
  332. package/src/@claude-flow/memory/dist/rvf-backend.d.ts +0 -51
  333. package/src/@claude-flow/memory/dist/rvf-learning-store.d.ts +0 -139
  334. package/src/@claude-flow/memory/dist/rvf-migration.d.ts +0 -45
  335. package/src/@claude-flow/memory/dist/sqlite-backend.d.ts +0 -121
  336. package/src/@claude-flow/memory/dist/sqljs-backend.d.ts +0 -127
  337. package/src/@claude-flow/memory/dist/types.d.ts +0 -484
  338. package/src/@claude-flow/shared/dist/core/config/defaults.d.ts +0 -41
  339. package/src/@claude-flow/shared/dist/core/config/index.d.ts +0 -8
  340. package/src/@claude-flow/shared/dist/core/config/loader.d.ts +0 -45
  341. package/src/@claude-flow/shared/dist/core/config/schema.d.ts +0 -1134
  342. package/src/@claude-flow/shared/dist/core/config/validator.d.ts +0 -92
  343. package/src/@claude-flow/shared/dist/core/event-bus.d.ts +0 -31
  344. package/src/@claude-flow/shared/dist/core/index.d.ts +0 -15
  345. package/src/@claude-flow/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
  346. package/src/@claude-flow/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
  347. package/src/@claude-flow/shared/dist/core/interfaces/event.interface.d.ts +0 -224
  348. package/src/@claude-flow/shared/dist/core/interfaces/index.d.ts +0 -10
  349. package/src/@claude-flow/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
  350. package/src/@claude-flow/shared/dist/core/interfaces/task.interface.d.ts +0 -185
  351. package/src/@claude-flow/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
  352. package/src/@claude-flow/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
  353. package/src/@claude-flow/shared/dist/core/orchestrator/index.d.ts +0 -46
  354. package/src/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
  355. package/src/@claude-flow/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
  356. package/src/@claude-flow/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
  357. package/src/@claude-flow/shared/dist/events/domain-events.d.ts +0 -282
  358. package/src/@claude-flow/shared/dist/events/event-store.d.ts +0 -126
  359. package/src/@claude-flow/shared/dist/events/event-store.test.d.ts +0 -8
  360. package/src/@claude-flow/shared/dist/events/example-usage.d.ts +0 -10
  361. package/src/@claude-flow/shared/dist/events/index.d.ts +0 -21
  362. package/src/@claude-flow/shared/dist/events/projections.d.ts +0 -177
  363. package/src/@claude-flow/shared/dist/events/rvf-event-log.d.ts +0 -82
  364. package/src/@claude-flow/shared/dist/events/state-reconstructor.d.ts +0 -101
  365. package/src/@claude-flow/shared/dist/events.d.ts +0 -80
  366. package/src/@claude-flow/shared/dist/hooks/example-usage.d.ts +0 -42
  367. package/src/@claude-flow/shared/dist/hooks/executor.d.ts +0 -100
  368. package/src/@claude-flow/shared/dist/hooks/hooks.test.d.ts +0 -9
  369. package/src/@claude-flow/shared/dist/hooks/index.d.ts +0 -52
  370. package/src/@claude-flow/shared/dist/hooks/registry.d.ts +0 -133
  371. package/src/@claude-flow/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
  372. package/src/@claude-flow/shared/dist/hooks/safety/file-organization.d.ts +0 -144
  373. package/src/@claude-flow/shared/dist/hooks/safety/git-commit.d.ts +0 -158
  374. package/src/@claude-flow/shared/dist/hooks/safety/index.d.ts +0 -17
  375. package/src/@claude-flow/shared/dist/hooks/session-hooks.d.ts +0 -234
  376. package/src/@claude-flow/shared/dist/hooks/task-hooks.d.ts +0 -163
  377. package/src/@claude-flow/shared/dist/hooks/types.d.ts +0 -267
  378. package/src/@claude-flow/shared/dist/hooks/verify-exports.test.d.ts +0 -9
  379. package/src/@claude-flow/shared/dist/index.d.ts +0 -20
  380. package/src/@claude-flow/shared/dist/mcp/connection-pool.d.ts +0 -98
  381. package/src/@claude-flow/shared/dist/mcp/index.d.ts +0 -69
  382. package/src/@claude-flow/shared/dist/mcp/server.d.ts +0 -166
  383. package/src/@claude-flow/shared/dist/mcp/session-manager.d.ts +0 -136
  384. package/src/@claude-flow/shared/dist/mcp/tool-registry.d.ts +0 -178
  385. package/src/@claude-flow/shared/dist/mcp/transport/http.d.ts +0 -104
  386. package/src/@claude-flow/shared/dist/mcp/transport/index.d.ts +0 -102
  387. package/src/@claude-flow/shared/dist/mcp/transport/stdio.d.ts +0 -104
  388. package/src/@claude-flow/shared/dist/mcp/transport/websocket.d.ts +0 -133
  389. package/src/@claude-flow/shared/dist/mcp/types.d.ts +0 -438
  390. package/src/@claude-flow/shared/dist/plugin-interface.d.ts +0 -544
  391. package/src/@claude-flow/shared/dist/plugin-loader.d.ts +0 -139
  392. package/src/@claude-flow/shared/dist/plugin-registry.d.ts +0 -183
  393. package/src/@claude-flow/shared/dist/plugins/index.d.ts +0 -10
  394. package/src/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
  395. package/src/@claude-flow/shared/dist/plugins/official/index.d.ts +0 -10
  396. package/src/@claude-flow/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
  397. package/src/@claude-flow/shared/dist/plugins/types.d.ts +0 -93
  398. package/src/@claude-flow/shared/dist/resilience/bulkhead.d.ts +0 -105
  399. package/src/@claude-flow/shared/dist/resilience/circuit-breaker.d.ts +0 -132
  400. package/src/@claude-flow/shared/dist/resilience/index.d.ts +0 -19
  401. package/src/@claude-flow/shared/dist/resilience/rate-limiter.d.ts +0 -168
  402. package/src/@claude-flow/shared/dist/resilience/retry.d.ts +0 -91
  403. package/src/@claude-flow/shared/dist/security/index.d.ts +0 -10
  404. package/src/@claude-flow/shared/dist/security/input-validation.d.ts +0 -73
  405. package/src/@claude-flow/shared/dist/security/secure-random.d.ts +0 -92
  406. package/src/@claude-flow/shared/dist/services/index.d.ts +0 -7
  407. package/src/@claude-flow/shared/dist/services/v3-progress.service.d.ts +0 -124
  408. package/src/@claude-flow/shared/dist/types/agent.types.d.ts +0 -137
  409. package/src/@claude-flow/shared/dist/types/index.d.ts +0 -11
  410. package/src/@claude-flow/shared/dist/types/mcp.types.d.ts +0 -266
  411. package/src/@claude-flow/shared/dist/types/memory.types.d.ts +0 -236
  412. package/src/@claude-flow/shared/dist/types/swarm.types.d.ts +0 -186
  413. package/src/@claude-flow/shared/dist/types/task.types.d.ts +0 -178
  414. package/src/@claude-flow/shared/dist/types.d.ts +0 -197
  415. package/src/@claude-flow/shared/dist/utils/secure-logger.d.ts +0 -69
@@ -1,446 +0,0 @@
1
- ---
2
- name: "ReasoningBank with AgentDB"
3
- description: "Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems."
4
- ---
5
-
6
- # ReasoningBank with AgentDB
7
-
8
- ## What This Skill Does
9
-
10
- Provides ReasoningBank adaptive learning patterns using AgentDB's high-performance backend (150x-12,500x faster). Enables agents to learn from experiences, judge outcomes, distill memories, and improve decision-making over time with 100% backward compatibility.
11
-
12
- **Performance**: 150x faster pattern retrieval, 500x faster batch operations, <1ms memory access.
13
-
14
- ## Prerequisites
15
-
16
- - Node.js 18+
17
- - AgentDB v1.0.7+ (via agentic-flow)
18
- - Understanding of reinforcement learning concepts (optional)
19
-
20
- ---
21
-
22
- ## Quick Start with CLI
23
-
24
- ### Initialize ReasoningBank Database
25
-
26
- ```bash
27
- # Initialize AgentDB for ReasoningBank
28
- npx agentdb@latest init ./.agentdb/reasoningbank.db --dimension 1536
29
-
30
- # Start MCP server for Claude Code integration
31
- npx agentdb@latest mcp
32
- claude mcp add agentdb npx agentdb@latest mcp
33
- ```
34
-
35
- ### Migrate from Legacy ReasoningBank
36
-
37
- ```bash
38
- # Automatic migration with validation
39
- npx agentdb@latest migrate --source .swarm/memory.db
40
-
41
- # Verify migration
42
- npx agentdb@latest stats ./.agentdb/reasoningbank.db
43
- ```
44
-
45
- ---
46
-
47
- ## Quick Start with API
48
-
49
- ```typescript
50
- import { createAgentDBAdapter, computeEmbedding } from 'agentic-flow/reasoningbank';
51
-
52
- // Initialize ReasoningBank with AgentDB
53
- const rb = await createAgentDBAdapter({
54
- dbPath: '.agentdb/reasoningbank.db',
55
- enableLearning: true, // Enable learning plugins
56
- enableReasoning: true, // Enable reasoning agents
57
- cacheSize: 1000, // 1000 pattern cache
58
- });
59
-
60
- // Store successful experience
61
- const query = "How to optimize database queries?";
62
- const embedding = await computeEmbedding(query);
63
-
64
- await rb.insertPattern({
65
- id: '',
66
- type: 'experience',
67
- domain: 'database-optimization',
68
- pattern_data: JSON.stringify({
69
- embedding,
70
- pattern: {
71
- query,
72
- approach: 'indexing + query optimization',
73
- outcome: 'success',
74
- metrics: { latency_reduction: 0.85 }
75
- }
76
- }),
77
- confidence: 0.95,
78
- usage_count: 1,
79
- success_count: 1,
80
- created_at: Date.now(),
81
- last_used: Date.now(),
82
- });
83
-
84
- // Retrieve similar experiences with reasoning
85
- const result = await rb.retrieveWithReasoning(embedding, {
86
- domain: 'database-optimization',
87
- k: 5,
88
- useMMR: true, // Diverse results
89
- synthesizeContext: true, // Rich context synthesis
90
- });
91
-
92
- console.log('Memories:', result.memories);
93
- console.log('Context:', result.context);
94
- console.log('Patterns:', result.patterns);
95
- ```
96
-
97
- ---
98
-
99
- ## Core ReasoningBank Concepts
100
-
101
- ### 1. Trajectory Tracking
102
-
103
- Track agent execution paths and outcomes:
104
-
105
- ```typescript
106
- // Record trajectory (sequence of actions)
107
- const trajectory = {
108
- task: 'optimize-api-endpoint',
109
- steps: [
110
- { action: 'analyze-bottleneck', result: 'found N+1 query' },
111
- { action: 'add-eager-loading', result: 'reduced queries' },
112
- { action: 'add-caching', result: 'improved latency' }
113
- ],
114
- outcome: 'success',
115
- metrics: { latency_before: 2500, latency_after: 150 }
116
- };
117
-
118
- const embedding = await computeEmbedding(JSON.stringify(trajectory));
119
-
120
- await rb.insertPattern({
121
- id: '',
122
- type: 'trajectory',
123
- domain: 'api-optimization',
124
- pattern_data: JSON.stringify({ embedding, pattern: trajectory }),
125
- confidence: 0.9,
126
- usage_count: 1,
127
- success_count: 1,
128
- created_at: Date.now(),
129
- last_used: Date.now(),
130
- });
131
- ```
132
-
133
- ### 2. Verdict Judgment
134
-
135
- Judge whether a trajectory was successful:
136
-
137
- ```typescript
138
- // Retrieve similar past trajectories
139
- const similar = await rb.retrieveWithReasoning(queryEmbedding, {
140
- domain: 'api-optimization',
141
- k: 10,
142
- });
143
-
144
- // Judge based on similarity to successful patterns
145
- const verdict = similar.memories.filter(m =>
146
- m.pattern.outcome === 'success' &&
147
- m.similarity > 0.8
148
- ).length > 5 ? 'likely_success' : 'needs_review';
149
-
150
- console.log('Verdict:', verdict);
151
- console.log('Confidence:', similar.memories[0]?.similarity || 0);
152
- ```
153
-
154
- ### 3. Memory Distillation
155
-
156
- Consolidate similar experiences into patterns:
157
-
158
- ```typescript
159
- // Get all experiences in domain
160
- const experiences = await rb.retrieveWithReasoning(embedding, {
161
- domain: 'api-optimization',
162
- k: 100,
163
- optimizeMemory: true, // Automatic consolidation
164
- });
165
-
166
- // Distill into high-level pattern
167
- const distilledPattern = {
168
- domain: 'api-optimization',
169
- pattern: 'For N+1 queries: add eager loading, then cache',
170
- success_rate: 0.92,
171
- sample_size: experiences.memories.length,
172
- confidence: 0.95
173
- };
174
-
175
- await rb.insertPattern({
176
- id: '',
177
- type: 'distilled-pattern',
178
- domain: 'api-optimization',
179
- pattern_data: JSON.stringify({
180
- embedding: await computeEmbedding(JSON.stringify(distilledPattern)),
181
- pattern: distilledPattern
182
- }),
183
- confidence: 0.95,
184
- usage_count: 0,
185
- success_count: 0,
186
- created_at: Date.now(),
187
- last_used: Date.now(),
188
- });
189
- ```
190
-
191
- ---
192
-
193
- ## Integration with Reasoning Agents
194
-
195
- AgentDB provides 4 reasoning modules that enhance ReasoningBank:
196
-
197
- ### 1. PatternMatcher
198
-
199
- Find similar successful patterns:
200
-
201
- ```typescript
202
- const result = await rb.retrieveWithReasoning(queryEmbedding, {
203
- domain: 'problem-solving',
204
- k: 10,
205
- useMMR: true, // Maximal Marginal Relevance for diversity
206
- });
207
-
208
- // PatternMatcher returns diverse, relevant memories
209
- result.memories.forEach(mem => {
210
- console.log(`Pattern: ${mem.pattern.approach}`);
211
- console.log(`Similarity: ${mem.similarity}`);
212
- console.log(`Success Rate: ${mem.success_count / mem.usage_count}`);
213
- });
214
- ```
215
-
216
- ### 2. ContextSynthesizer
217
-
218
- Generate rich context from multiple memories:
219
-
220
- ```typescript
221
- const result = await rb.retrieveWithReasoning(queryEmbedding, {
222
- domain: 'code-optimization',
223
- synthesizeContext: true, // Enable context synthesis
224
- k: 5,
225
- });
226
-
227
- // ContextSynthesizer creates coherent narrative
228
- console.log('Synthesized Context:', result.context);
229
- // "Based on 5 similar optimizations, the most effective approach
230
- // involves profiling, identifying bottlenecks, and applying targeted
231
- // improvements. Success rate: 87%"
232
- ```
233
-
234
- ### 3. MemoryOptimizer
235
-
236
- Automatically consolidate and prune:
237
-
238
- ```typescript
239
- const result = await rb.retrieveWithReasoning(queryEmbedding, {
240
- domain: 'testing',
241
- optimizeMemory: true, // Enable automatic optimization
242
- });
243
-
244
- // MemoryOptimizer consolidates similar patterns and prunes low-quality
245
- console.log('Optimizations:', result.optimizations);
246
- // { consolidated: 15, pruned: 3, improved_quality: 0.12 }
247
- ```
248
-
249
- ### 4. ExperienceCurator
250
-
251
- Filter by quality and relevance:
252
-
253
- ```typescript
254
- const result = await rb.retrieveWithReasoning(queryEmbedding, {
255
- domain: 'debugging',
256
- k: 20,
257
- minConfidence: 0.8, // Only high-confidence experiences
258
- });
259
-
260
- // ExperienceCurator returns only quality experiences
261
- result.memories.forEach(mem => {
262
- console.log(`Confidence: ${mem.confidence}`);
263
- console.log(`Success Rate: ${mem.success_count / mem.usage_count}`);
264
- });
265
- ```
266
-
267
- ---
268
-
269
- ## Legacy API Compatibility
270
-
271
- AgentDB maintains 100% backward compatibility with legacy ReasoningBank:
272
-
273
- ```typescript
274
- import {
275
- retrieveMemories,
276
- judgeTrajectory,
277
- distillMemories
278
- } from 'agentic-flow/reasoningbank';
279
-
280
- // Legacy API works unchanged (uses AgentDB backend automatically)
281
- const memories = await retrieveMemories(query, {
282
- domain: 'code-generation',
283
- agent: 'coder'
284
- });
285
-
286
- const verdict = await judgeTrajectory(trajectory, query);
287
-
288
- const newMemories = await distillMemories(
289
- trajectory,
290
- verdict,
291
- query,
292
- { domain: 'code-generation' }
293
- );
294
- ```
295
-
296
- ---
297
-
298
- ## Performance Characteristics
299
-
300
- - **Pattern Search**: 150x faster (100µs vs 15ms)
301
- - **Memory Retrieval**: <1ms (with cache)
302
- - **Batch Insert**: 500x faster (2ms vs 1s for 100 patterns)
303
- - **Trajectory Judgment**: <5ms (including retrieval + analysis)
304
- - **Memory Distillation**: <50ms (consolidate 100 patterns)
305
-
306
- ---
307
-
308
- ## Advanced Patterns
309
-
310
- ### Hierarchical Memory
311
-
312
- Organize memories by abstraction level:
313
-
314
- ```typescript
315
- // Low-level: Specific implementation
316
- await rb.insertPattern({
317
- type: 'concrete',
318
- domain: 'debugging/null-pointer',
319
- pattern_data: JSON.stringify({
320
- embedding,
321
- pattern: { bug: 'NPE in UserService.getUser()', fix: 'Add null check' }
322
- }),
323
- confidence: 0.9,
324
- // ...
325
- });
326
-
327
- // Mid-level: Pattern across similar cases
328
- await rb.insertPattern({
329
- type: 'pattern',
330
- domain: 'debugging',
331
- pattern_data: JSON.stringify({
332
- embedding,
333
- pattern: { category: 'null-pointer', approach: 'defensive-checks' }
334
- }),
335
- confidence: 0.85,
336
- // ...
337
- });
338
-
339
- // High-level: General principle
340
- await rb.insertPattern({
341
- type: 'principle',
342
- domain: 'software-engineering',
343
- pattern_data: JSON.stringify({
344
- embedding,
345
- pattern: { principle: 'fail-fast with clear errors' }
346
- }),
347
- confidence: 0.95,
348
- // ...
349
- });
350
- ```
351
-
352
- ### Multi-Domain Learning
353
-
354
- Transfer learning across domains:
355
-
356
- ```typescript
357
- // Learn from backend optimization
358
- const backendExperience = await rb.retrieveWithReasoning(embedding, {
359
- domain: 'backend-optimization',
360
- k: 10,
361
- });
362
-
363
- // Apply to frontend optimization
364
- const transferredKnowledge = backendExperience.memories.map(mem => ({
365
- ...mem,
366
- domain: 'frontend-optimization',
367
- adapted: true,
368
- }));
369
- ```
370
-
371
- ---
372
-
373
- ## CLI Operations
374
-
375
- ### Database Management
376
-
377
- ```bash
378
- # Export trajectories and patterns
379
- npx agentdb@latest export ./.agentdb/reasoningbank.db ./backup.json
380
-
381
- # Import experiences
382
- npx agentdb@latest import ./experiences.json
383
-
384
- # Get statistics
385
- npx agentdb@latest stats ./.agentdb/reasoningbank.db
386
- # Shows: total patterns, domains, confidence distribution
387
- ```
388
-
389
- ### Migration
390
-
391
- ```bash
392
- # Migrate from legacy ReasoningBank
393
- npx agentdb@latest migrate --source .swarm/memory.db --target .agentdb/reasoningbank.db
394
-
395
- # Validate migration
396
- npx agentdb@latest stats .agentdb/reasoningbank.db
397
- ```
398
-
399
- ---
400
-
401
- ## Troubleshooting
402
-
403
- ### Issue: Migration fails
404
- ```bash
405
- # Check source database exists
406
- ls -la .swarm/memory.db
407
-
408
- # Run with verbose logging
409
- DEBUG=agentdb:* npx agentdb@latest migrate --source .swarm/memory.db
410
- ```
411
-
412
- ### Issue: Low confidence scores
413
- ```typescript
414
- // Enable context synthesis for better quality
415
- const result = await rb.retrieveWithReasoning(embedding, {
416
- synthesizeContext: true,
417
- useMMR: true,
418
- k: 10,
419
- });
420
- ```
421
-
422
- ### Issue: Memory growing too large
423
- ```typescript
424
- // Enable automatic optimization
425
- const result = await rb.retrieveWithReasoning(embedding, {
426
- optimizeMemory: true, // Consolidates similar patterns
427
- });
428
-
429
- // Or manually optimize
430
- await rb.optimize();
431
- ```
432
-
433
- ---
434
-
435
- ## Learn More
436
-
437
- - **AgentDB Integration**: node_modules/agentic-flow/docs/AGENTDB_INTEGRATION.md
438
- - **GitHub**: https://github.com/ruvnet/agentic-flow/tree/main/packages/agentdb
439
- - **MCP Integration**: `npx agentdb@latest mcp`
440
- - **Website**: https://agentdb.ruv.io
441
-
442
- ---
443
-
444
- **Category**: Machine Learning / Reinforcement Learning
445
- **Difficulty**: Intermediate
446
- **Estimated Time**: 20-30 minutes
@@ -1,201 +0,0 @@
1
- ---
2
- name: "ReasoningBank Intelligence"
3
- description: "Implement adaptive learning with ReasoningBank for pattern recognition, strategy optimization, and continuous improvement. Use when building self-learning agents, optimizing workflows, or implementing meta-cognitive systems."
4
- ---
5
-
6
- # ReasoningBank Intelligence
7
-
8
- ## What This Skill Does
9
-
10
- Implements ReasoningBank's adaptive learning system for AI agents to learn from experience, recognize patterns, and optimize strategies over time. Enables meta-cognitive capabilities and continuous improvement.
11
-
12
- ## Prerequisites
13
-
14
- - agentic-flow v1.5.11+
15
- - AgentDB v1.0.4+ (for persistence)
16
- - Node.js 18+
17
-
18
- ## Quick Start
19
-
20
- ```typescript
21
- import { ReasoningBank } from 'agentic-flow/reasoningbank';
22
-
23
- // Initialize ReasoningBank
24
- const rb = new ReasoningBank({
25
- persist: true,
26
- learningRate: 0.1,
27
- adapter: 'agentdb' // Use AgentDB for storage
28
- });
29
-
30
- // Record task outcome
31
- await rb.recordExperience({
32
- task: 'code_review',
33
- approach: 'static_analysis_first',
34
- outcome: {
35
- success: true,
36
- metrics: {
37
- bugs_found: 5,
38
- time_taken: 120,
39
- false_positives: 1
40
- }
41
- },
42
- context: {
43
- language: 'typescript',
44
- complexity: 'medium'
45
- }
46
- });
47
-
48
- // Get optimal strategy
49
- const strategy = await rb.recommendStrategy('code_review', {
50
- language: 'typescript',
51
- complexity: 'high'
52
- });
53
- ```
54
-
55
- ## Core Features
56
-
57
- ### 1. Pattern Recognition
58
- ```typescript
59
- // Learn patterns from data
60
- await rb.learnPattern({
61
- pattern: 'api_errors_increase_after_deploy',
62
- triggers: ['deployment', 'traffic_spike'],
63
- actions: ['rollback', 'scale_up'],
64
- confidence: 0.85
65
- });
66
-
67
- // Match patterns
68
- const matches = await rb.matchPatterns(currentSituation);
69
- ```
70
-
71
- ### 2. Strategy Optimization
72
- ```typescript
73
- // Compare strategies
74
- const comparison = await rb.compareStrategies('bug_fixing', [
75
- 'tdd_approach',
76
- 'debug_first',
77
- 'reproduce_then_fix'
78
- ]);
79
-
80
- // Get best strategy
81
- const best = comparison.strategies[0];
82
- console.log(`Best: ${best.name} (score: ${best.score})`);
83
- ```
84
-
85
- ### 3. Continuous Learning
86
- ```typescript
87
- // Enable auto-learning from all tasks
88
- await rb.enableAutoLearning({
89
- threshold: 0.7, // Only learn from high-confidence outcomes
90
- updateFrequency: 100 // Update models every 100 experiences
91
- });
92
- ```
93
-
94
- ## Advanced Usage
95
-
96
- ### Meta-Learning
97
- ```typescript
98
- // Learn about learning
99
- await rb.metaLearn({
100
- observation: 'parallel_execution_faster_for_independent_tasks',
101
- confidence: 0.95,
102
- applicability: {
103
- task_types: ['batch_processing', 'data_transformation'],
104
- conditions: ['tasks_independent', 'io_bound']
105
- }
106
- });
107
- ```
108
-
109
- ### Transfer Learning
110
- ```typescript
111
- // Apply knowledge from one domain to another
112
- await rb.transferKnowledge({
113
- from: 'code_review_javascript',
114
- to: 'code_review_typescript',
115
- similarity: 0.8
116
- });
117
- ```
118
-
119
- ### Adaptive Agents
120
- ```typescript
121
- // Create self-improving agent
122
- class AdaptiveAgent {
123
- async execute(task: Task) {
124
- // Get optimal strategy
125
- const strategy = await rb.recommendStrategy(task.type, task.context);
126
-
127
- // Execute with strategy
128
- const result = await this.executeWithStrategy(task, strategy);
129
-
130
- // Learn from outcome
131
- await rb.recordExperience({
132
- task: task.type,
133
- approach: strategy.name,
134
- outcome: result,
135
- context: task.context
136
- });
137
-
138
- return result;
139
- }
140
- }
141
- ```
142
-
143
- ## Integration with AgentDB
144
-
145
- ```typescript
146
- // Persist ReasoningBank data
147
- await rb.configure({
148
- storage: {
149
- type: 'agentdb',
150
- options: {
151
- database: './reasoning-bank.db',
152
- enableVectorSearch: true
153
- }
154
- }
155
- });
156
-
157
- // Query learned patterns
158
- const patterns = await rb.query({
159
- category: 'optimization',
160
- minConfidence: 0.8,
161
- timeRange: { last: '30d' }
162
- });
163
- ```
164
-
165
- ## Performance Metrics
166
-
167
- ```typescript
168
- // Track learning effectiveness
169
- const metrics = await rb.getMetrics();
170
- console.log(`
171
- Total Experiences: ${metrics.totalExperiences}
172
- Patterns Learned: ${metrics.patternsLearned}
173
- Strategy Success Rate: ${metrics.strategySuccessRate}
174
- Improvement Over Time: ${metrics.improvement}
175
- `);
176
- ```
177
-
178
- ## Best Practices
179
-
180
- 1. **Record consistently**: Log all task outcomes, not just successes
181
- 2. **Provide context**: Rich context improves pattern matching
182
- 3. **Set thresholds**: Filter low-confidence learnings
183
- 4. **Review periodically**: Audit learned patterns for quality
184
- 5. **Use vector search**: Enable semantic pattern matching
185
-
186
- ## Troubleshooting
187
-
188
- ### Issue: Poor recommendations
189
- **Solution**: Ensure sufficient training data (100+ experiences per task type)
190
-
191
- ### Issue: Slow pattern matching
192
- **Solution**: Enable vector indexing in AgentDB
193
-
194
- ### Issue: Memory growing large
195
- **Solution**: Set TTL for old experiences or enable pruning
196
-
197
- ## Learn More
198
-
199
- - ReasoningBank Guide: agentic-flow/src/reasoningbank/README.md
200
- - AgentDB Integration: packages/agentdb/docs/reasoningbank.md
201
- - Pattern Learning: docs/reasoning/patterns.md