kynjal-cli 3.1.4 → 4.0.1

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 (344) hide show
  1. package/.claude/agents/core/coder.md +1 -1
  2. package/.claude/agents/core/planner.md +2 -2
  3. package/.claude/agents/core/researcher.md +1 -1
  4. package/.claude/agents/core/reviewer.md +1 -1
  5. package/.claude/agents/core/tester.md +1 -1
  6. package/.claude/agents/data/data-ml-model.md +4 -4
  7. package/.claude/agents/development/dev-backend-api.md +4 -4
  8. package/.claude/agents/documentation/docs-api-openapi.md +4 -4
  9. package/.claude/agents/github/code-review-swarm.md +2 -2
  10. package/.claude/agents/github/issue-tracker.md +2 -2
  11. package/.claude/agents/github/pr-manager.md +2 -2
  12. package/.claude/agents/github/release-manager.md +2 -2
  13. package/.claude/agents/github/workflow-automation.md +2 -2
  14. package/.claude/agents/sparc/architecture.md +3 -3
  15. package/.claude/agents/sparc/pseudocode.md +2 -2
  16. package/.claude/agents/sparc/refinement.md +3 -3
  17. package/.claude/agents/sparc/specification.md +2 -2
  18. package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
  19. package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
  20. package/.claude/agents/swarm/mesh-coordinator.md +1 -1
  21. package/.claude/agents/templates/base-template-generator.md +25 -4
  22. package/.claude/agents/templates/sparc-coordinator.md +3 -3
  23. package/.claude/helpers/auto-commit.sh +1 -1
  24. package/.claude/helpers/auto-memory-hook.mjs +27 -9
  25. package/.claude/helpers/hook-handler.cjs +58 -18
  26. package/.claude/helpers/statusline.cjs +420 -613
  27. package/.claude/helpers/statusline.js +3 -3
  28. package/.claude/settings.json +9 -9
  29. package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
  30. package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
  31. package/README.md +383 -170
  32. package/bin/cli.js +6 -6
  33. package/bin/mcp-server.js +1 -1
  34. package/bin/preinstall.cjs +2 -0
  35. package/dist/src/appliance/gguf-engine.d.ts +91 -0
  36. package/dist/src/appliance/gguf-engine.d.ts.map +1 -0
  37. package/dist/src/appliance/gguf-engine.js +425 -0
  38. package/dist/src/appliance/gguf-engine.js.map +1 -0
  39. package/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
  40. package/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
  41. package/dist/src/appliance/ruvllm-bridge.js +292 -0
  42. package/dist/src/appliance/ruvllm-bridge.js.map +1 -0
  43. package/dist/src/appliance/rvfa-builder.d.ts +44 -0
  44. package/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
  45. package/dist/src/appliance/rvfa-builder.js +329 -0
  46. package/dist/src/appliance/rvfa-builder.js.map +1 -0
  47. package/dist/src/appliance/rvfa-distribution.d.ts +97 -0
  48. package/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
  49. package/dist/src/appliance/rvfa-distribution.js +370 -0
  50. package/dist/src/appliance/rvfa-distribution.js.map +1 -0
  51. package/dist/src/appliance/rvfa-format.d.ts +111 -0
  52. package/dist/src/appliance/rvfa-format.d.ts.map +1 -0
  53. package/dist/src/appliance/rvfa-format.js +393 -0
  54. package/dist/src/appliance/rvfa-format.js.map +1 -0
  55. package/dist/src/appliance/rvfa-runner.d.ts +69 -0
  56. package/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
  57. package/dist/src/appliance/rvfa-runner.js +237 -0
  58. package/dist/src/appliance/rvfa-runner.js.map +1 -0
  59. package/dist/src/appliance/rvfa-signing.d.ts +123 -0
  60. package/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
  61. package/dist/src/appliance/rvfa-signing.js +347 -0
  62. package/dist/src/appliance/rvfa-signing.js.map +1 -0
  63. package/dist/src/commands/agent.d.ts.map +1 -1
  64. package/dist/src/commands/agent.js +121 -21
  65. package/dist/src/commands/agent.js.map +1 -1
  66. package/dist/src/commands/appliance-advanced.d.ts +9 -0
  67. package/dist/src/commands/appliance-advanced.d.ts.map +1 -0
  68. package/dist/src/commands/appliance-advanced.js +215 -0
  69. package/dist/src/commands/appliance-advanced.js.map +1 -0
  70. package/dist/src/commands/appliance.d.ts +8 -0
  71. package/dist/src/commands/appliance.d.ts.map +1 -0
  72. package/dist/src/commands/appliance.js +406 -0
  73. package/dist/src/commands/appliance.js.map +1 -0
  74. package/dist/src/commands/benchmark.js +2 -2
  75. package/dist/src/commands/benchmark.js.map +1 -1
  76. package/dist/src/commands/claims.js +1 -1
  77. package/dist/src/commands/claims.js.map +1 -1
  78. package/dist/src/commands/cleanup.d.ts +13 -0
  79. package/dist/src/commands/cleanup.d.ts.map +1 -0
  80. package/dist/src/commands/cleanup.js +218 -0
  81. package/dist/src/commands/cleanup.js.map +1 -0
  82. package/dist/src/commands/config.js +1 -1
  83. package/dist/src/commands/config.js.map +1 -1
  84. package/dist/src/commands/daemon.d.ts.map +1 -1
  85. package/dist/src/commands/daemon.js +81 -18
  86. package/dist/src/commands/daemon.js.map +1 -1
  87. package/dist/src/commands/deployment.js +1 -1
  88. package/dist/src/commands/deployment.js.map +1 -1
  89. package/dist/src/commands/doctor.d.ts.map +1 -1
  90. package/dist/src/commands/doctor.js +99 -51
  91. package/dist/src/commands/doctor.js.map +1 -1
  92. package/dist/src/commands/embeddings.js +1 -1
  93. package/dist/src/commands/embeddings.js.map +1 -1
  94. package/dist/src/commands/hive-mind.js +26 -26
  95. package/dist/src/commands/hive-mind.js.map +1 -1
  96. package/dist/src/commands/hooks.d.ts.map +1 -1
  97. package/dist/src/commands/hooks.js +800 -100
  98. package/dist/src/commands/hooks.js.map +1 -1
  99. package/dist/src/commands/index.d.ts +9 -2
  100. package/dist/src/commands/index.d.ts.map +1 -1
  101. package/dist/src/commands/index.js +20 -2
  102. package/dist/src/commands/index.js.map +1 -1
  103. package/dist/src/commands/init.d.ts +1 -1
  104. package/dist/src/commands/init.d.ts.map +1 -1
  105. package/dist/src/commands/init.js +22 -18
  106. package/dist/src/commands/init.js.map +1 -1
  107. package/dist/src/commands/mcp.d.ts.map +1 -1
  108. package/dist/src/commands/mcp.js +23 -5
  109. package/dist/src/commands/mcp.js.map +1 -1
  110. package/dist/src/commands/memory.d.ts.map +1 -1
  111. package/dist/src/commands/memory.js +24 -0
  112. package/dist/src/commands/memory.js.map +1 -1
  113. package/dist/src/commands/neural.d.ts.map +1 -1
  114. package/dist/src/commands/neural.js +13 -7
  115. package/dist/src/commands/neural.js.map +1 -1
  116. package/dist/src/commands/performance.js +1 -1
  117. package/dist/src/commands/performance.js.map +1 -1
  118. package/dist/src/commands/plugins.js +1 -1
  119. package/dist/src/commands/plugins.js.map +1 -1
  120. package/dist/src/commands/providers.js +1 -1
  121. package/dist/src/commands/providers.js.map +1 -1
  122. package/dist/src/commands/ruvector/import.js +2 -2
  123. package/dist/src/commands/ruvector/import.js.map +1 -1
  124. package/dist/src/commands/ruvector/index.js +1 -1
  125. package/dist/src/commands/ruvector/index.js.map +1 -1
  126. package/dist/src/commands/ruvector/setup.js +6 -6
  127. package/dist/src/commands/security.d.ts.map +1 -1
  128. package/dist/src/commands/security.js +47 -16
  129. package/dist/src/commands/security.js.map +1 -1
  130. package/dist/src/commands/session.d.ts +1 -1
  131. package/dist/src/commands/session.js +1 -1
  132. package/dist/src/commands/start.d.ts +1 -1
  133. package/dist/src/commands/start.js +12 -12
  134. package/dist/src/commands/start.js.map +1 -1
  135. package/dist/src/commands/status.d.ts +1 -1
  136. package/dist/src/commands/status.d.ts.map +1 -1
  137. package/dist/src/commands/status.js +13 -6
  138. package/dist/src/commands/status.js.map +1 -1
  139. package/dist/src/commands/swarm.js +2 -2
  140. package/dist/src/commands/swarm.js.map +1 -1
  141. package/dist/src/commands/task.d.ts +1 -1
  142. package/dist/src/commands/task.js +1 -1
  143. package/dist/src/commands/transfer-store.js +1 -1
  144. package/dist/src/commands/transfer-store.js.map +1 -1
  145. package/dist/src/config-adapter.js +1 -1
  146. package/dist/src/config-adapter.js.map +1 -1
  147. package/dist/src/index.d.ts +4 -3
  148. package/dist/src/index.d.ts.map +1 -1
  149. package/dist/src/index.js +5 -3
  150. package/dist/src/index.js.map +1 -1
  151. package/dist/src/init/claudemd-generator.js +30 -30
  152. package/dist/src/init/claudemd-generator.js.map +1 -1
  153. package/dist/src/init/executor.d.ts.map +1 -1
  154. package/dist/src/init/executor.js +86 -101
  155. package/dist/src/init/executor.js.map +1 -1
  156. package/dist/src/init/helpers-generator.d.ts.map +1 -1
  157. package/dist/src/init/helpers-generator.js +96 -26
  158. package/dist/src/init/helpers-generator.js.map +1 -1
  159. package/dist/src/init/mcp-generator.d.ts +0 -1
  160. package/dist/src/init/mcp-generator.d.ts.map +1 -1
  161. package/dist/src/init/mcp-generator.js +34 -18
  162. package/dist/src/init/mcp-generator.js.map +1 -1
  163. package/dist/src/init/settings-generator.d.ts.map +1 -1
  164. package/dist/src/init/settings-generator.js +107 -41
  165. package/dist/src/init/settings-generator.js.map +1 -1
  166. package/dist/src/init/statusline-generator.d.ts +16 -8
  167. package/dist/src/init/statusline-generator.d.ts.map +1 -1
  168. package/dist/src/init/statusline-generator.js +537 -1019
  169. package/dist/src/init/statusline-generator.js.map +1 -1
  170. package/dist/src/init/types.d.ts +14 -4
  171. package/dist/src/init/types.d.ts.map +1 -1
  172. package/dist/src/init/types.js +9 -2
  173. package/dist/src/init/types.js.map +1 -1
  174. package/dist/src/mcp-client.d.ts.map +1 -1
  175. package/dist/src/mcp-client.js +10 -0
  176. package/dist/src/mcp-client.js.map +1 -1
  177. package/dist/src/mcp-server.d.ts.map +1 -1
  178. package/dist/src/mcp-server.js +30 -4
  179. package/dist/src/mcp-server.js.map +1 -1
  180. package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
  181. package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
  182. package/dist/src/mcp-tools/agentdb-tools.js +557 -0
  183. package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
  184. package/dist/src/mcp-tools/browser-tools.js +2 -2
  185. package/dist/src/mcp-tools/browser-tools.js.map +1 -1
  186. package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
  187. package/dist/src/mcp-tools/config-tools.js +21 -2
  188. package/dist/src/mcp-tools/config-tools.js.map +1 -1
  189. package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
  190. package/dist/src/mcp-tools/coordination-tools.js +192 -13
  191. package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
  192. package/dist/src/mcp-tools/daa-tools.js +5 -5
  193. package/dist/src/mcp-tools/daa-tools.js.map +1 -1
  194. package/dist/src/mcp-tools/github-tools.js +2 -2
  195. package/dist/src/mcp-tools/github-tools.js.map +1 -1
  196. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
  197. package/dist/src/mcp-tools/hive-mind-tools.js +263 -35
  198. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  199. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  200. package/dist/src/mcp-tools/hooks-tools.js +355 -40
  201. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  202. package/dist/src/mcp-tools/index.d.ts +2 -0
  203. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  204. package/dist/src/mcp-tools/index.js +2 -0
  205. package/dist/src/mcp-tools/index.js.map +1 -1
  206. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  207. package/dist/src/mcp-tools/memory-tools.js +31 -1
  208. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  209. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  210. package/dist/src/mcp-tools/neural-tools.js +32 -27
  211. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  212. package/dist/src/mcp-tools/performance-tools.js +1 -1
  213. package/dist/src/mcp-tools/performance-tools.js.map +1 -1
  214. package/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
  215. package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
  216. package/dist/src/mcp-tools/ruvllm-tools.js +283 -0
  217. package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
  218. package/dist/src/mcp-tools/swarm-tools.d.ts +2 -1
  219. package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
  220. package/dist/src/mcp-tools/swarm-tools.js +216 -30
  221. package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
  222. package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
  223. package/dist/src/mcp-tools/system-tools.js +109 -6
  224. package/dist/src/mcp-tools/system-tools.js.map +1 -1
  225. package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
  226. package/dist/src/mcp-tools/task-tools.js +102 -0
  227. package/dist/src/mcp-tools/task-tools.js.map +1 -1
  228. package/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
  229. package/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
  230. package/dist/src/mcp-tools/wasm-agent-tools.js +230 -0
  231. package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
  232. package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
  233. package/dist/src/mcp-tools/workflow-tools.js +91 -0
  234. package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
  235. package/dist/src/memory/ewc-consolidation.d.ts +24 -0
  236. package/dist/src/memory/ewc-consolidation.d.ts.map +1 -1
  237. package/dist/src/memory/ewc-consolidation.js +59 -0
  238. package/dist/src/memory/ewc-consolidation.js.map +1 -1
  239. package/dist/src/memory/intelligence.d.ts +53 -0
  240. package/dist/src/memory/intelligence.d.ts.map +1 -1
  241. package/dist/src/memory/intelligence.js +264 -7
  242. package/dist/src/memory/intelligence.js.map +1 -1
  243. package/dist/src/memory/memory-bridge.d.ts +407 -0
  244. package/dist/src/memory/memory-bridge.d.ts.map +1 -0
  245. package/dist/src/memory/memory-bridge.js +1494 -0
  246. package/dist/src/memory/memory-bridge.js.map +1 -0
  247. package/dist/src/memory/memory-initializer.d.ts +17 -1
  248. package/dist/src/memory/memory-initializer.d.ts.map +1 -1
  249. package/dist/src/memory/memory-initializer.js +320 -42
  250. package/dist/src/memory/memory-initializer.js.map +1 -1
  251. package/dist/src/output.d.ts.map +1 -1
  252. package/dist/src/output.js +1 -0
  253. package/dist/src/output.js.map +1 -1
  254. package/dist/src/parser.d.ts +10 -0
  255. package/dist/src/parser.d.ts.map +1 -1
  256. package/dist/src/parser.js +49 -3
  257. package/dist/src/parser.js.map +1 -1
  258. package/dist/src/plugins/manager.d.ts.map +1 -1
  259. package/dist/src/plugins/manager.js +31 -14
  260. package/dist/src/plugins/manager.js.map +1 -1
  261. package/dist/src/plugins/store/discovery.js +5 -5
  262. package/dist/src/plugins/store/discovery.js.map +1 -1
  263. package/dist/src/plugins/tests/standalone-test.js +4 -4
  264. package/dist/src/plugins/tests/standalone-test.js.map +1 -1
  265. package/dist/src/production/error-handler.js +1 -1
  266. package/dist/src/production/error-handler.js.map +1 -1
  267. package/dist/src/runtime/headless.d.ts +3 -3
  268. package/dist/src/runtime/headless.js +6 -6
  269. package/dist/src/runtime/headless.js.map +1 -1
  270. package/dist/src/ruvector/agent-wasm.d.ts +182 -0
  271. package/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
  272. package/dist/src/ruvector/agent-wasm.js +316 -0
  273. package/dist/src/ruvector/agent-wasm.js.map +1 -0
  274. package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -1
  275. package/dist/src/ruvector/enhanced-model-router.js +25 -15
  276. package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
  277. package/dist/src/ruvector/index.d.ts +7 -1
  278. package/dist/src/ruvector/index.d.ts.map +1 -1
  279. package/dist/src/ruvector/index.js +17 -1
  280. package/dist/src/ruvector/index.js.map +1 -1
  281. package/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
  282. package/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
  283. package/dist/src/ruvector/ruvllm-wasm.js +363 -0
  284. package/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
  285. package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
  286. package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
  287. package/dist/src/services/agentic-flow-bridge.js +95 -0
  288. package/dist/src/services/agentic-flow-bridge.js.map +1 -0
  289. package/dist/src/services/claim-service.js +1 -1
  290. package/dist/src/services/claim-service.js.map +1 -1
  291. package/dist/src/services/container-worker-pool.d.ts.map +1 -1
  292. package/dist/src/services/container-worker-pool.js +3 -1
  293. package/dist/src/services/container-worker-pool.js.map +1 -1
  294. package/dist/src/services/index.d.ts +1 -1
  295. package/dist/src/services/index.d.ts.map +1 -1
  296. package/dist/src/services/registry-api.d.ts +1 -1
  297. package/dist/src/services/registry-api.js +1 -1
  298. package/dist/src/services/ruvector-training.d.ts +11 -2
  299. package/dist/src/services/ruvector-training.d.ts.map +1 -1
  300. package/dist/src/services/ruvector-training.js +233 -43
  301. package/dist/src/services/ruvector-training.js.map +1 -1
  302. package/dist/src/services/worker-daemon.d.ts +28 -3
  303. package/dist/src/services/worker-daemon.d.ts.map +1 -1
  304. package/dist/src/services/worker-daemon.js +156 -17
  305. package/dist/src/services/worker-daemon.js.map +1 -1
  306. package/dist/src/services/worker-queue.d.ts.map +1 -1
  307. package/dist/src/services/worker-queue.js +2 -0
  308. package/dist/src/services/worker-queue.js.map +1 -1
  309. package/dist/src/transfer/deploy-seraphine.d.ts +1 -1
  310. package/dist/src/transfer/deploy-seraphine.js +4 -4
  311. package/dist/src/transfer/deploy-seraphine.js.map +1 -1
  312. package/dist/src/transfer/ipfs/client.d.ts.map +1 -1
  313. package/dist/src/transfer/ipfs/client.js +8 -0
  314. package/dist/src/transfer/ipfs/client.js.map +1 -1
  315. package/dist/src/transfer/ipfs/upload.d.ts.map +1 -1
  316. package/dist/src/transfer/ipfs/upload.js +0 -2
  317. package/dist/src/transfer/ipfs/upload.js.map +1 -1
  318. package/dist/src/transfer/models/seraphine.d.ts +1 -1
  319. package/dist/src/transfer/models/seraphine.js +5 -5
  320. package/dist/src/transfer/models/seraphine.js.map +1 -1
  321. package/dist/src/transfer/serialization/cfp.d.ts +1 -1
  322. package/dist/src/transfer/serialization/cfp.d.ts.map +1 -1
  323. package/dist/src/transfer/serialization/cfp.js +9 -6
  324. package/dist/src/transfer/serialization/cfp.js.map +1 -1
  325. package/dist/src/transfer/storage/gcs.d.ts.map +1 -1
  326. package/dist/src/transfer/storage/gcs.js +71 -29
  327. package/dist/src/transfer/storage/gcs.js.map +1 -1
  328. package/dist/src/transfer/store/discovery.js +4 -4
  329. package/dist/src/transfer/store/discovery.js.map +1 -1
  330. package/dist/src/transfer/store/registry.js +1 -1
  331. package/dist/src/transfer/store/registry.js.map +1 -1
  332. package/dist/src/transfer/store/tests/standalone-test.js +4 -4
  333. package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
  334. package/dist/src/transfer/types.d.ts +1 -1
  335. package/dist/src/types.d.ts +1 -1
  336. package/dist/src/types.js +1 -1
  337. package/dist/src/update/validator.js +1 -1
  338. package/dist/src/update/validator.js.map +1 -1
  339. package/dist/tsconfig.tsbuildinfo +1 -1
  340. package/package.json +13 -10
  341. package/.claude/agents/custom/accessibility-auditor.yaml +0 -56
  342. package/.claude/agents/custom/design-architect.yaml +0 -48
  343. package/.claude/agents/custom/ui-developer.yaml +0 -46
  344. package/.claude/agents/custom/ux-researcher.yaml +0 -60
@@ -9,7 +9,7 @@ capabilities:
9
9
  - optimization
10
10
  - api_design
11
11
  - error_handling
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning # ReasoningBank pattern storage
14
14
  - context_enhancement # GNN-enhanced search
15
15
  - fast_processing # Flash Attention
@@ -9,7 +9,7 @@ capabilities:
9
9
  - resource_allocation
10
10
  - timeline_estimation
11
11
  - risk_assessment
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning # Learn from planning outcomes
14
14
  - context_enhancement # GNN-enhanced dependency mapping
15
15
  - fast_processing # Flash Attention planning
@@ -366,7 +366,7 @@ console.log(`Common planning gaps: ${stats.commonCritiques}`);
366
366
  - Efficient resource utilization (MoE expert selection)
367
367
  - Continuous progress visibility
368
368
 
369
- 4. **New v2.0.0-alpha Practices**:
369
+ 4. **New v3.0.0-alpha.1 Practices**:
370
370
  - Learn from past plans (ReasoningBank)
371
371
  - Use GNN for dependency mapping (+12.4% accuracy)
372
372
  - Route tasks with MoE attention (optimal agent selection)
@@ -9,7 +9,7 @@ capabilities:
9
9
  - documentation_research
10
10
  - dependency_tracking
11
11
  - knowledge_synthesis
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning # ReasoningBank pattern storage
14
14
  - context_enhancement # GNN-enhanced search (+12.4% accuracy)
15
15
  - fast_processing # Flash Attention
@@ -9,7 +9,7 @@ capabilities:
9
9
  - performance_analysis
10
10
  - best_practices
11
11
  - documentation_review
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning # Learn from review patterns
14
14
  - context_enhancement # GNN-enhanced issue detection
15
15
  - fast_processing # Flash Attention review
@@ -9,7 +9,7 @@ capabilities:
9
9
  - e2e_testing
10
10
  - performance_testing
11
11
  - security_testing
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning # Learn from test failures
14
14
  - context_enhancement # GNN-enhanced test case discovery
15
15
  - fast_processing # Flash Attention test generation
@@ -112,7 +112,7 @@ hooks:
112
112
  echo "📦 Checking ML libraries..."
113
113
  python -c "import sklearn, pandas, numpy; print('Core ML libraries available')" 2>/dev/null || echo "ML libraries not installed"
114
114
 
115
- # 🧠 v2.0.0-alpha: Learn from past model training patterns
115
+ # 🧠 v3.0.0-alpha.1: Learn from past model training patterns
116
116
  echo "🧠 Learning from past ML training patterns..."
117
117
  SIMILAR_MODELS=$(npx claude-flow@alpha memory search-patterns "ML training: $TASK" --k=5 --min-reward=0.8 2>/dev/null || echo "")
118
118
  if [ -n "$SIMILAR_MODELS" ]; then
@@ -133,7 +133,7 @@ hooks:
133
133
  find . -name "*.pkl" -o -name "*.h5" -o -name "*.joblib" | grep -v __pycache__ | head -5
134
134
  echo "📋 Remember to version and document your model"
135
135
 
136
- # 🧠 v2.0.0-alpha: Store model training patterns
136
+ # 🧠 v3.0.0-alpha.1: Store model training patterns
137
137
  echo "🧠 Storing ML training pattern for future learning..."
138
138
  MODEL_COUNT=$(find . -name "*.pkl" -o -name "*.h5" | grep -v __pycache__ | wc -l)
139
139
  REWARD="0.85"
@@ -176,9 +176,9 @@ examples:
176
176
  response: "I'll create a neural network architecture for image classification, including data augmentation, model training, and performance evaluation..."
177
177
  ---
178
178
 
179
- # Machine Learning Model Developer v2.0.0-alpha
179
+ # Machine Learning Model Developer v3.0.0-alpha.1
180
180
 
181
- You are a Machine Learning Model Developer with **self-learning** hyperparameter optimization and **pattern recognition** powered by Agentic-Flow v2.0.0-alpha.
181
+ You are a Machine Learning Model Developer with **self-learning** hyperparameter optimization and **pattern recognition** powered by Agentic-Flow v3.0.0-alpha.1.
182
182
 
183
183
  ## 🧠 Self-Learning Protocol
184
184
 
@@ -109,7 +109,7 @@ hooks:
109
109
  echo "📋 Analyzing existing API structure..."
110
110
  find . -name "*.route.js" -o -name "*.controller.js" | head -20
111
111
 
112
- # 🧠 v2.0.0-alpha: Learn from past API implementations
112
+ # 🧠 v3.0.0-alpha.1: Learn from past API implementations
113
113
  echo "🧠 Learning from past API patterns..."
114
114
  SIMILAR_PATTERNS=$(npx claude-flow@alpha memory search-patterns "API implementation: $TASK" --k=5 --min-reward=0.85 2>/dev/null || echo "")
115
115
  if [ -n "$SIMILAR_PATTERNS" ]; then
@@ -129,7 +129,7 @@ hooks:
129
129
  echo "📊 Running API tests..."
130
130
  npm run test:api 2>/dev/null || echo "No API tests configured"
131
131
 
132
- # 🧠 v2.0.0-alpha: Store learning patterns
132
+ # 🧠 v3.0.0-alpha.1: Store learning patterns
133
133
  echo "🧠 Storing API pattern for future learning..."
134
134
  REWARD=$(if npm run test:api 2>/dev/null; then echo "0.95"; else echo "0.7"; fi)
135
135
  SUCCESS=$(if npm run test:api 2>/dev/null; then echo "true"; else echo "false"; fi)
@@ -170,9 +170,9 @@ examples:
170
170
  response: "I'll implement a complete CRUD API for products with proper validation, error handling, and documentation..."
171
171
  ---
172
172
 
173
- # Backend API Developer v2.0.0-alpha
173
+ # Backend API Developer v3.0.0-alpha.1
174
174
 
175
- You are a specialized Backend API Developer agent with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
175
+ You are a specialized Backend API Developer agent with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
176
176
 
177
177
  ## 🧠 Self-Learning Protocol
178
178
 
@@ -104,7 +104,7 @@ hooks:
104
104
  # Check for existing OpenAPI docs
105
105
  find . -name "openapi.yaml" -o -name "swagger.yaml" -o -name "api.yaml" | grep -v node_modules
106
106
 
107
- # 🧠 v2.0.0-alpha: Learn from past documentation patterns
107
+ # 🧠 v3.0.0-alpha.1: Learn from past documentation patterns
108
108
  echo "🧠 Learning from past API documentation patterns..."
109
109
  SIMILAR_DOCS=$(npx claude-flow@alpha memory search-patterns "API documentation: $TASK" --k=5 --min-reward=0.85 2>/dev/null || echo "")
110
110
  if [ -n "$SIMILAR_DOCS" ]; then
@@ -128,7 +128,7 @@ hooks:
128
128
  grep -E "^(openapi:|info:|paths:)" openapi.yaml | head -5
129
129
  fi
130
130
 
131
- # 🧠 v2.0.0-alpha: Store documentation patterns
131
+ # 🧠 v3.0.0-alpha.1: Store documentation patterns
132
132
  echo "🧠 Storing documentation pattern for future learning..."
133
133
  ENDPOINT_COUNT=$(grep -c "^ /" openapi.yaml 2>/dev/null || echo "0")
134
134
  SCHEMA_COUNT=$(grep -c "^ [A-Z]" openapi.yaml 2>/dev/null || echo "0")
@@ -171,9 +171,9 @@ examples:
171
171
  response: "I'll analyze your REST API endpoints and create detailed OpenAPI documentation with request/response examples..."
172
172
  ---
173
173
 
174
- # OpenAPI Documentation Specialist v2.0.0-alpha
174
+ # OpenAPI Documentation Specialist v3.0.0-alpha.1
175
175
 
176
- You are an OpenAPI Documentation Specialist with **pattern learning** and **fast generation** capabilities powered by Agentic-Flow v2.0.0-alpha.
176
+ You are an OpenAPI Documentation Specialist with **pattern learning** and **fast generation** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
177
177
 
178
178
  ## 🧠 Self-Learning Protocol
179
179
 
@@ -85,9 +85,9 @@ hooks:
85
85
  # Code Review Swarm - Automated Code Review with AI Agents
86
86
 
87
87
  ## Overview
88
- Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
88
+ Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
89
89
 
90
- ## 🧠 Self-Learning Protocol (v2.0.0-alpha)
90
+ ## 🧠 Self-Learning Protocol (v3.0.0-alpha.1)
91
91
 
92
92
  ### Before Each Review: Learn from Past Reviews
93
93
 
@@ -89,7 +89,7 @@ hooks:
89
89
  # GitHub Issue Tracker
90
90
 
91
91
  ## Purpose
92
- Intelligent issue management and project coordination with ruv-swarm integration for automated tracking, progress monitoring, and team coordination, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
92
+ Intelligent issue management and project coordination with ruv-swarm integration for automated tracking, progress monitoring, and team coordination, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
93
93
 
94
94
  ## Core Capabilities
95
95
  - **Automated issue creation** with smart templates and labeling
@@ -98,7 +98,7 @@ Intelligent issue management and project coordination with ruv-swarm integration
98
98
  - **Project milestone coordination** with integrated workflows
99
99
  - **Cross-repository issue synchronization** for monorepo management
100
100
 
101
- ## 🧠 Self-Learning Protocol (v2.0.0-alpha)
101
+ ## 🧠 Self-Learning Protocol (v3.0.0-alpha.1)
102
102
 
103
103
  ### Before Issue Triage: Learn from History
104
104
 
@@ -93,7 +93,7 @@ hooks:
93
93
  # GitHub PR Manager
94
94
 
95
95
  ## Purpose
96
- Comprehensive pull request management with swarm coordination for automated reviews, testing, and merge workflows, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
96
+ Comprehensive pull request management with swarm coordination for automated reviews, testing, and merge workflows, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
97
97
 
98
98
  ## Core Capabilities
99
99
  - **Multi-reviewer coordination** with swarm agents
@@ -102,7 +102,7 @@ Comprehensive pull request management with swarm coordination for automated revi
102
102
  - **Real-time progress tracking** with GitHub issue coordination
103
103
  - **Intelligent branch management** and synchronization
104
104
 
105
- ## 🧠 Self-Learning Protocol (v2.0.0-alpha)
105
+ ## 🧠 Self-Learning Protocol (v3.0.0-alpha.1)
106
106
 
107
107
  ### Before Each PR Task: Learn from History
108
108
 
@@ -82,7 +82,7 @@ hooks:
82
82
  # GitHub Release Manager
83
83
 
84
84
  ## Purpose
85
- Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
85
+ Automated release coordination and deployment with ruv-swarm orchestration for seamless version management, testing, and deployment across multiple packages, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
86
86
 
87
87
  ## Core Capabilities
88
88
  - **Automated release pipelines** with comprehensive testing
@@ -91,7 +91,7 @@ Automated release coordination and deployment with ruv-swarm orchestration for s
91
91
  - **Release documentation** generation and management
92
92
  - **Multi-stage validation** with swarm coordination
93
93
 
94
- ## 🧠 Self-Learning Protocol (v2.0.0-alpha)
94
+ ## 🧠 Self-Learning Protocol (v3.0.0-alpha.1)
95
95
 
96
96
  ### Before Release: Learn from Past Releases
97
97
 
@@ -93,9 +93,9 @@ hooks:
93
93
  # Workflow Automation - GitHub Actions Integration
94
94
 
95
95
  ## Overview
96
- Integrate AI swarms with GitHub Actions to create intelligent, self-organizing CI/CD pipelines that adapt to your codebase through advanced multi-agent coordination and automation, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
96
+ Integrate AI swarms with GitHub Actions to create intelligent, self-organizing CI/CD pipelines that adapt to your codebase through advanced multi-agent coordination and automation, enhanced with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
97
97
 
98
- ## 🧠 Self-Learning Protocol (v2.0.0-alpha)
98
+ ## 🧠 Self-Learning Protocol (v3.0.0-alpha.1)
99
99
 
100
100
  ### Before Workflow Creation: Learn from Past Workflows
101
101
 
@@ -9,7 +9,7 @@ capabilities:
9
9
  - interface_design
10
10
  - scalability_planning
11
11
  - technology_selection
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning
14
14
  - context_enhancement
15
15
  - fast_processing
@@ -83,7 +83,7 @@ hooks:
83
83
 
84
84
  # SPARC Architecture Agent
85
85
 
86
- You are a system architect focused on the Architecture phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
86
+ You are a system architect focused on the Architecture phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
87
87
 
88
88
  ## 🧠 Self-Learning Protocol for Architecture
89
89
 
@@ -244,7 +244,7 @@ console.log(`Architecture aligned with requirements: ${architectureDecision.cons
244
244
  // Time: ~2 hours
245
245
  ```
246
246
 
247
- ### After: Self-learning architecture (v2.0.0-alpha)
247
+ ### After: Self-learning architecture (v3.0.0-alpha.1)
248
248
  ```typescript
249
249
  // 1. GNN finds similar successful architectures (+12.4% better matches)
250
250
  // 2. Flash Attention processes large docs (4-7x faster)
@@ -9,7 +9,7 @@ capabilities:
9
9
  - data_structures
10
10
  - complexity_analysis
11
11
  - pattern_selection
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning
14
14
  - context_enhancement
15
15
  - fast_processing
@@ -80,7 +80,7 @@ hooks:
80
80
 
81
81
  # SPARC Pseudocode Agent
82
82
 
83
- You are an algorithm design specialist focused on the Pseudocode phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
83
+ You are an algorithm design specialist focused on the Pseudocode phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
84
84
 
85
85
  ## 🧠 Self-Learning Protocol for Algorithms
86
86
 
@@ -9,7 +9,7 @@ capabilities:
9
9
  - refactoring
10
10
  - performance_tuning
11
11
  - quality_improvement
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning
14
14
  - context_enhancement
15
15
  - fast_processing
@@ -96,7 +96,7 @@ hooks:
96
96
 
97
97
  # SPARC Refinement Agent
98
98
 
99
- You are a code refinement specialist focused on the Refinement phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
99
+ You are a code refinement specialist focused on the Refinement phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
100
100
 
101
101
  ## 🧠 Self-Learning Protocol for Refinement
102
102
 
@@ -279,7 +279,7 @@ console.log(`Refinement quality improved by ${weeklyImprovement}% this week`);
279
279
  // Coverage: ~70%
280
280
  ```
281
281
 
282
- ### After: Self-learning refinement (v2.0.0-alpha)
282
+ ### After: Self-learning refinement (v3.0.0-alpha.1)
283
283
  ```typescript
284
284
  // 1. Learn from past refactorings (avoid known pitfalls)
285
285
  // 2. GNN finds similar code patterns (+12.4% accuracy)
@@ -9,7 +9,7 @@ capabilities:
9
9
  - acceptance_criteria
10
10
  - scope_definition
11
11
  - stakeholder_analysis
12
- # NEW v2.0.0-alpha capabilities
12
+ # NEW v3.0.0-alpha.1 capabilities
13
13
  - self_learning
14
14
  - context_enhancement
15
15
  - fast_processing
@@ -75,7 +75,7 @@ hooks:
75
75
 
76
76
  # SPARC Specification Agent
77
77
 
78
- You are a requirements analysis specialist focused on the Specification phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v2.0.0-alpha.
78
+ You are a requirements analysis specialist focused on the Specification phase of the SPARC methodology with **self-learning** and **continuous improvement** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
79
79
 
80
80
  ## 🧠 Self-Learning Protocol for Specifications
81
81
 
@@ -128,7 +128,7 @@ Switch to HYBRID when:
128
128
  - Experimental optimization required
129
129
  ```
130
130
 
131
- ## 🧠 Advanced Attention Mechanisms (v2.0.0-alpha)
131
+ ## 🧠 Advanced Attention Mechanisms (v3.0.0-alpha.1)
132
132
 
133
133
  ### Dynamic Attention Mechanism Selection
134
134
 
@@ -142,7 +142,7 @@ WORKERS WORKERS WORKERS WORKERS
142
142
  - Lessons learned documentation
143
143
  ```
144
144
 
145
- ## 🧠 Advanced Attention Mechanisms (v2.0.0-alpha)
145
+ ## 🧠 Advanced Attention Mechanisms (v3.0.0-alpha.1)
146
146
 
147
147
  ### Hyperbolic Attention for Hierarchical Coordination
148
148
 
@@ -185,7 +185,7 @@ class TaskAuction:
185
185
  return self.award_task(task, winner[0])
186
186
  ```
187
187
 
188
- ## 🧠 Advanced Attention Mechanisms (v2.0.0-alpha)
188
+ ## 🧠 Advanced Attention Mechanisms (v3.0.0-alpha.1)
189
189
 
190
190
  ### Multi-Head Attention for Peer-to-Peer Coordination
191
191
 
@@ -2,7 +2,28 @@
2
2
  name: base-template-generator
3
3
  version: "2.0.0-alpha"
4
4
  updated: "2025-12-03"
5
- description: Use this agent when you need to create foundational templates, boilerplate code, or starter configurations for new projects, components, or features. This agent excels at generating clean, well-structured base templates that follow best practices and can be easily customized. Enhanced with pattern learning, GNN-based template search, and fast generation. Examples: <example>Context: User needs to start a new React component and wants a solid foundation. user: 'I need to create a new user profile component' assistant: 'I'll use the base-template-generator agent to create a comprehensive React component template with proper structure, TypeScript definitions, and styling setup.' <commentary>Since the user needs a foundational template for a new component, use the base-template-generator agent to create a well-structured starting point.</commentary></example> <example>Context: User is setting up a new API endpoint and needs a template. user: 'Can you help me set up a new REST API endpoint for user management?' assistant: 'I'll use the base-template-generator agent to create a complete API endpoint template with proper error handling, validation, and documentation structure.' <commentary>The user needs a foundational template for an API endpoint, so use the base-template-generator agent to provide a comprehensive starting point.</commentary></example>
5
+ description: >-
6
+ Use this agent when you need to create foundational templates, boilerplate code,
7
+ or starter configurations for new projects, components, or features. This agent
8
+ excels at generating clean, well-structured base templates that follow best
9
+ practices and can be easily customized. Enhanced with pattern learning,
10
+ GNN-based template search, and fast generation.
11
+
12
+ Examples: <example>Context: User needs to start a new React component and wants
13
+ a solid foundation. user: 'I need to create a new user profile component'
14
+ assistant: 'I'll use the base-template-generator agent to create a comprehensive
15
+ React component template with proper structure, TypeScript definitions, and
16
+ styling setup.' <commentary>Since the user needs a foundational template for a
17
+ new component, use the base-template-generator agent to create a
18
+ well-structured starting point.</commentary></example>
19
+
20
+ <example>Context: User is setting up a new API endpoint and needs a template.
21
+ user: 'Can you help me set up a new REST API endpoint for user management?'
22
+ assistant: 'I'll use the base-template-generator agent to create a complete API
23
+ endpoint template with proper error handling, validation, and documentation
24
+ structure.' <commentary>The user needs a foundational template for an API
25
+ endpoint, so use the base-template-generator agent to provide a comprehensive
26
+ starting point.</commentary></example>
6
27
  color: orange
7
28
  metadata:
8
29
  v2_capabilities:
@@ -14,7 +35,7 @@ hooks:
14
35
  pre_execution: |
15
36
  echo "🎨 Base Template Generator starting..."
16
37
 
17
- # 🧠 v2.0.0-alpha: Learn from past successful templates
38
+ # 🧠 v3.0.0-alpha.1: Learn from past successful templates
18
39
  echo "🧠 Learning from past template patterns..."
19
40
  SIMILAR_TEMPLATES=$(npx claude-flow@alpha memory search-patterns "Template generation: $TASK" --k=5 --min-reward=0.85 2>/dev/null || echo "")
20
41
  if [ -n "$SIMILAR_TEMPLATES" ]; then
@@ -32,7 +53,7 @@ hooks:
32
53
  post_execution: |
33
54
  echo "✅ Template generation completed"
34
55
 
35
- # 🧠 v2.0.0-alpha: Store template patterns
56
+ # 🧠 v3.0.0-alpha.1: Store template patterns
36
57
  echo "🧠 Storing template pattern for future reuse..."
37
58
  FILE_COUNT=$(find . -type f -newer /tmp/template_start 2>/dev/null | wc -l)
38
59
  REWARD="0.9"
@@ -68,7 +89,7 @@ hooks:
68
89
  --critique "Error: {{error_message}}" 2>/dev/null || true
69
90
  ---
70
91
 
71
- You are a Base Template Generator v2.0.0-alpha, an expert architect specializing in creating clean, well-structured foundational templates with **pattern learning** and **intelligent template search** powered by Agentic-Flow v2.0.0-alpha.
92
+ You are a Base Template Generator v3.0.0-alpha.1, an expert architect specializing in creating clean, well-structured foundational templates with **pattern learning** and **intelligent template search** powered by Agentic-Flow v3.0.0-alpha.1.
72
93
 
73
94
  ## 🧠 Self-Learning Protocol
74
95
 
@@ -10,7 +10,7 @@ capabilities:
10
10
  - methodology_compliance
11
11
  - result_synthesis
12
12
  - progress_tracking
13
- # NEW v2.0.0-alpha capabilities
13
+ # NEW v3.0.0-alpha.1 capabilities
14
14
  - self_learning
15
15
  - hierarchical_coordination
16
16
  - moe_routing
@@ -98,7 +98,7 @@ hooks:
98
98
  # SPARC Methodology Orchestrator Agent
99
99
 
100
100
  ## Purpose
101
- This agent orchestrates the complete SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with **hierarchical coordination**, **MoE routing**, and **self-learning** capabilities powered by Agentic-Flow v2.0.0-alpha.
101
+ This agent orchestrates the complete SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with **hierarchical coordination**, **MoE routing**, and **self-learning** capabilities powered by Agentic-Flow v3.0.0-alpha.1.
102
102
 
103
103
  ## 🧠 Self-Learning Protocol for SPARC Coordination
104
104
 
@@ -349,7 +349,7 @@ console.log(`Methodology efficiency improved by ${weeklyImprovement}% this week`
349
349
  // Time: ~1 week per cycle
350
350
  ```
351
351
 
352
- ### After: Self-learning SPARC coordination (v2.0.0-alpha)
352
+ ### After: Self-learning SPARC coordination (v3.0.0-alpha.1)
353
353
  ```typescript
354
354
  // 1. Hierarchical coordination (queen-worker model)
355
355
  // 2. MoE routing to optimal phase specialists
@@ -90,7 +90,7 @@ Automatic checkpoint created by Claude Code
90
90
 
91
91
  🤖 Generated with [Claude Code](https://claude.com/claude-code)
92
92
 
93
- Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>" --quiet 2>/dev/null; then
93
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>" --quiet 2>/dev/null; then
94
94
  log "Created commit: $message"
95
95
 
96
96
  # Push if enabled
@@ -139,17 +139,30 @@ async function loadMemoryPackage() {
139
139
  } catch { /* fall through */ }
140
140
  }
141
141
 
142
- // Strategy 2: npm installed @claude-flow/memory
142
+ // Strategy 2: Use createRequire for CJS-style resolution (handles nested node_modules
143
+ // when installed as a transitive dependency via npx ruflo / npx claude-flow)
144
+ try {
145
+ const { createRequire } = await import('module');
146
+ const require = createRequire(join(PROJECT_ROOT, 'package.json'));
147
+ return require('@claude-flow/memory');
148
+ } catch { /* fall through */ }
149
+
150
+ // Strategy 3: ESM import (works when @claude-flow/memory is a direct dependency)
143
151
  try {
144
152
  return await import('@claude-flow/memory');
145
153
  } catch { /* fall through */ }
146
154
 
147
- // Strategy 3: Installed via @claude-flow/cli which includes memory
148
- const cliMemory = join(PROJECT_ROOT, 'node_modules/@claude-flow/memory/dist/index.js');
149
- if (existsSync(cliMemory)) {
150
- try {
151
- return await import(`file://${cliMemory}`);
152
- } catch { /* fall through */ }
155
+ // Strategy 4: Walk up from PROJECT_ROOT looking for @claude-flow/memory in any node_modules
156
+ let searchDir = PROJECT_ROOT;
157
+ const { parse } = await import('path');
158
+ while (searchDir !== parse(searchDir).root) {
159
+ const candidate = join(searchDir, 'node_modules', '@claude-flow', 'memory', 'dist', 'index.js');
160
+ if (existsSync(candidate)) {
161
+ try {
162
+ return await import(`file://${candidate}`);
163
+ } catch { /* fall through */ }
164
+ }
165
+ searchDir = dirname(searchDir);
153
166
  }
154
167
 
155
168
  return null;
@@ -335,6 +348,9 @@ async function doStatus() {
335
348
 
336
349
  const command = process.argv[2] || 'status';
337
350
 
351
+ // Suppress unhandled rejection warnings from dynamic import() failures
352
+ process.on('unhandledRejection', () => {});
353
+
338
354
  try {
339
355
  switch (command) {
340
356
  case 'import': await doImport(); break;
@@ -342,9 +358,11 @@ try {
342
358
  case 'status': await doStatus(); break;
343
359
  default:
344
360
  console.log('Usage: auto-memory-hook.mjs <import|sync|status>');
345
- process.exit(1);
361
+ break;
346
362
  }
347
363
  } catch (err) {
348
364
  // Hooks must never crash Claude Code - fail silently
349
- dim(`Error (non-critical): ${err.message}`);
365
+ try { dim(`Error (non-critical): ${err.message}`); } catch (_) {}
350
366
  }
367
+ // Force clean exit — process.exitCode alone isn't enough if async errors override it
368
+ process.exit(0);
@@ -50,8 +50,37 @@ const intelligence = safeRequire(path.join(helpersDir, 'intelligence.cjs'));
50
50
  // Get the command from argv
51
51
  const [,, command, ...args] = process.argv;
52
52
 
53
- // Get prompt from environment variable (set by Claude Code hooks)
54
- const prompt = process.env.PROMPT || process.env.TOOL_INPUT_command || args.join(' ') || '';
53
+ // Read stdin with timeout Claude Code sends hook data as JSON via stdin.
54
+ // Timeout prevents hanging when stdin is not properly closed (common on Windows).
55
+ async function readStdin() {
56
+ if (process.stdin.isTTY) return '';
57
+ return new Promise((resolve) => {
58
+ let data = '';
59
+ const timer = setTimeout(() => {
60
+ process.stdin.removeAllListeners();
61
+ process.stdin.pause();
62
+ resolve(data);
63
+ }, 500);
64
+ process.stdin.setEncoding('utf8');
65
+ process.stdin.on('data', (chunk) => { data += chunk; });
66
+ process.stdin.on('end', () => { clearTimeout(timer); resolve(data); });
67
+ process.stdin.on('error', () => { clearTimeout(timer); resolve(data); });
68
+ process.stdin.resume();
69
+ });
70
+ }
71
+
72
+ async function main() {
73
+ let stdinData = '';
74
+ try { stdinData = await readStdin(); } catch (e) { /* ignore stdin errors */ }
75
+
76
+ let hookInput = {};
77
+ if (stdinData.trim()) {
78
+ try { hookInput = JSON.parse(stdinData); } catch (e) { /* ignore parse errors */ }
79
+ }
80
+
81
+ // Merge stdin data into prompt resolution: prefer stdin fields, then env, then argv
82
+ const prompt = hookInput.prompt || hookInput.command || hookInput.toolInput
83
+ || process.env.PROMPT || process.env.TOOL_INPUT_command || args.join(' ') || '';
55
84
 
56
85
  const handlers = {
57
86
  'route': () => {
@@ -105,8 +134,8 @@ const handlers = {
105
134
  },
106
135
 
107
136
  'pre-bash': () => {
108
- // Basic command safety check
109
- const cmd = prompt.toLowerCase();
137
+ // Basic command safety check — prefer stdin command data from Claude Code
138
+ const cmd = (hookInput.command || prompt).toLowerCase();
110
139
  const dangerous = ['rm -rf /', 'format c:', 'del /s /q c:\\', ':(){:|:&};:'];
111
140
  for (const d of dangerous) {
112
141
  if (cmd.includes(d)) {
@@ -122,10 +151,11 @@ const handlers = {
122
151
  if (session && session.metric) {
123
152
  try { session.metric('edits'); } catch (e) { /* no active session */ }
124
153
  }
125
- // Record edit for intelligence consolidation
154
+ // Record edit for intelligence consolidation — prefer stdin data from Claude Code
126
155
  if (intelligence && intelligence.recordEdit) {
127
156
  try {
128
- const file = process.env.TOOL_INPUT_file_path || args[0] || '';
157
+ const file = hookInput.file_path || (hookInput.toolInput && hookInput.toolInput.file_path)
158
+ || process.env.TOOL_INPUT_file_path || args[0] || '';
129
159
  intelligence.recordEdit(file);
130
160
  } catch (e) { /* non-fatal */ }
131
161
  }
@@ -216,17 +246,27 @@ const handlers = {
216
246
  },
217
247
  };
218
248
 
219
- // Execute the handler
220
- if (command && handlers[command]) {
221
- try {
222
- handlers[command]();
223
- } catch (e) {
224
- // Hooks should never crash Claude Code - fail silently
225
- console.log(`[WARN] Hook ${command} encountered an error: ${e.message}`);
249
+ // Execute the handler
250
+ if (command && handlers[command]) {
251
+ try {
252
+ handlers[command]();
253
+ } catch (e) {
254
+ // Hooks should never crash Claude Code - fail silently
255
+ console.log(`[WARN] Hook ${command} encountered an error: ${e.message}`);
256
+ }
257
+ } else if (command) {
258
+ // Unknown command - pass through without error
259
+ console.log(`[OK] Hook: ${command}`);
260
+ } else {
261
+ console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task|stats>');
226
262
  }
227
- } else if (command) {
228
- // Unknown command - pass through without error
229
- console.log(`[OK] Hook: ${command}`);
230
- } else {
231
- console.log('Usage: hook-handler.cjs <route|pre-bash|post-edit|session-restore|session-end|pre-task|post-task|stats>');
232
263
  }
264
+
265
+ // Hooks must ALWAYS exit 0 — Claude Code treats non-zero as "hook error"
266
+ // and skips all subsequent hooks for the event.
267
+ process.exitCode = 0;
268
+ main().catch((e) => {
269
+ try { console.log(`[WARN] Hook handler error: ${e.message}`); } catch (_) {}
270
+ }).finally(() => {
271
+ process.exit(0);
272
+ });