@claude-flow/cli 3.32.29 → 3.32.32

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 (378) hide show
  1. package/.claude/helpers/helpers.manifest.json +2 -2
  2. package/catalog-manifest.json +2 -2
  3. package/dist/src/autopilot-state.d.ts +10 -0
  4. package/dist/src/autopilot-state.js +16 -0
  5. package/dist/src/commands/autopilot.js +10 -4
  6. package/dist/src/init/claudemd-generator.js +53 -2
  7. package/dist/src/mcp-tools/autopilot-tools.js +18 -3
  8. package/dist/src/mcp-tools/capability-brain.js +22 -22
  9. package/dist/src/mcp-tools/guidance-tools.js +1 -1
  10. package/dist/src/services/harness-flywheel-runtime.d.ts +21 -1
  11. package/dist/src/services/harness-flywheel-runtime.js +46 -24
  12. package/node_modules/@claude-flow/codex/.agents/skills/memory-management/SKILL.md +45 -0
  13. package/node_modules/@claude-flow/codex/.agents/skills/security-audit/SKILL.md +46 -0
  14. package/node_modules/@claude-flow/codex/.agents/skills/sparc-methodology/SKILL.md +46 -0
  15. package/node_modules/@claude-flow/codex/.agents/skills/swarm-orchestration/SKILL.md +53 -0
  16. package/node_modules/@claude-flow/codex/README.md +1044 -0
  17. package/node_modules/@claude-flow/codex/dist/cli.d.ts +9 -0
  18. package/node_modules/@claude-flow/codex/dist/cli.d.ts.map +1 -0
  19. package/node_modules/@claude-flow/codex/dist/cli.js +686 -0
  20. package/node_modules/@claude-flow/codex/dist/cli.js.map +1 -0
  21. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts +17 -0
  22. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts.map +1 -0
  23. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js +278 -0
  24. package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js.map +1 -0
  25. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts +8 -0
  26. package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts.map +1 -0
  27. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js +7 -0
  28. package/node_modules/@claude-flow/codex/dist/dual-mode/index.js.map +1 -0
  29. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts +143 -0
  30. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts.map +1 -0
  31. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js +621 -0
  32. package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js.map +1 -0
  33. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts +12 -0
  34. package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts.map +1 -0
  35. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js +730 -0
  36. package/node_modules/@claude-flow/codex/dist/generators/agents-md.js.map +1 -0
  37. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts +74 -0
  38. package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts.map +1 -0
  39. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js +922 -0
  40. package/node_modules/@claude-flow/codex/dist/generators/config-toml.js.map +1 -0
  41. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts +9 -0
  42. package/node_modules/@claude-flow/codex/dist/generators/index.d.ts.map +1 -0
  43. package/node_modules/@claude-flow/codex/dist/generators/index.js +9 -0
  44. package/node_modules/@claude-flow/codex/dist/generators/index.js.map +1 -0
  45. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts +20 -0
  46. package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts.map +1 -0
  47. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js +951 -0
  48. package/node_modules/@claude-flow/codex/dist/generators/skill-md.js.map +1 -0
  49. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts +46 -0
  50. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts.map +1 -0
  51. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js +126 -0
  52. package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js.map +1 -0
  53. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts +153 -0
  54. package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts.map +1 -0
  55. package/node_modules/@claude-flow/codex/dist/harness/contract.js +44 -0
  56. package/node_modules/@claude-flow/codex/dist/harness/contract.js.map +1 -0
  57. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts +33 -0
  58. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts.map +1 -0
  59. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js +175 -0
  60. package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js.map +1 -0
  61. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts +42 -0
  62. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts.map +1 -0
  63. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js +140 -0
  64. package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js.map +1 -0
  65. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts +19 -0
  66. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts.map +1 -0
  67. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js +79 -0
  68. package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js.map +1 -0
  69. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts +9 -0
  70. package/node_modules/@claude-flow/codex/dist/harness/index.d.ts.map +1 -0
  71. package/node_modules/@claude-flow/codex/dist/harness/index.js +9 -0
  72. package/node_modules/@claude-flow/codex/dist/harness/index.js.map +1 -0
  73. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts +8 -0
  74. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts.map +1 -0
  75. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js +10 -0
  76. package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js.map +1 -0
  77. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts +68 -0
  78. package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts.map +1 -0
  79. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js +403 -0
  80. package/node_modules/@claude-flow/codex/dist/harness/repository-state.js.map +1 -0
  81. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts +3 -0
  82. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts.map +1 -0
  83. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js +14 -0
  84. package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js.map +1 -0
  85. package/node_modules/@claude-flow/codex/dist/index.d.ts +53 -0
  86. package/node_modules/@claude-flow/codex/dist/index.d.ts.map +1 -0
  87. package/node_modules/@claude-flow/codex/dist/index.js +54 -0
  88. package/node_modules/@claude-flow/codex/dist/index.js.map +1 -0
  89. package/node_modules/@claude-flow/codex/dist/initializer.d.ts +98 -0
  90. package/node_modules/@claude-flow/codex/dist/initializer.d.ts.map +1 -0
  91. package/node_modules/@claude-flow/codex/dist/initializer.js +795 -0
  92. package/node_modules/@claude-flow/codex/dist/initializer.js.map +1 -0
  93. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts +3 -0
  94. package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts.map +1 -0
  95. package/node_modules/@claude-flow/codex/dist/loop/cli.js +123 -0
  96. package/node_modules/@claude-flow/codex/dist/loop/cli.js.map +1 -0
  97. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts +58 -0
  98. package/node_modules/@claude-flow/codex/dist/loop/index.d.ts.map +1 -0
  99. package/node_modules/@claude-flow/codex/dist/loop/index.js +230 -0
  100. package/node_modules/@claude-flow/codex/dist/loop/index.js.map +1 -0
  101. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts +28 -0
  102. package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts.map +1 -0
  103. package/node_modules/@claude-flow/codex/dist/mcp-config.js +121 -0
  104. package/node_modules/@claude-flow/codex/dist/mcp-config.js.map +1 -0
  105. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts +114 -0
  106. package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts.map +1 -0
  107. package/node_modules/@claude-flow/codex/dist/migrations/index.js +880 -0
  108. package/node_modules/@claude-flow/codex/dist/migrations/index.js.map +1 -0
  109. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts +92 -0
  110. package/node_modules/@claude-flow/codex/dist/templates/index.d.ts.map +1 -0
  111. package/node_modules/@claude-flow/codex/dist/templates/index.js +284 -0
  112. package/node_modules/@claude-flow/codex/dist/templates/index.js.map +1 -0
  113. package/node_modules/@claude-flow/codex/dist/types.d.ts +240 -0
  114. package/node_modules/@claude-flow/codex/dist/types.d.ts.map +1 -0
  115. package/node_modules/@claude-flow/codex/dist/types.js +8 -0
  116. package/node_modules/@claude-flow/codex/dist/types.js.map +1 -0
  117. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts +42 -0
  118. package/node_modules/@claude-flow/codex/dist/validators/index.d.ts.map +1 -0
  119. package/node_modules/@claude-flow/codex/dist/validators/index.js +929 -0
  120. package/node_modules/@claude-flow/codex/dist/validators/index.js.map +1 -0
  121. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts +37 -0
  122. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts.map +1 -0
  123. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js +137 -0
  124. package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js.map +1 -0
  125. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts +2 -0
  126. package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts.map +1 -0
  127. package/node_modules/@claude-flow/codex/dist/worktrees/index.js +2 -0
  128. package/node_modules/@claude-flow/codex/dist/worktrees/index.js.map +1 -0
  129. package/node_modules/@claude-flow/codex/package.json +122 -0
  130. package/node_modules/@claude-flow/plugin-agent-federation/README.md +49 -0
  131. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts +130 -0
  132. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts.map +1 -0
  133. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js +239 -0
  134. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js.map +1 -0
  135. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts +34 -0
  136. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts.map +1 -0
  137. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js +69 -0
  138. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js.map +1 -0
  139. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts +46 -0
  140. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts.map +1 -0
  141. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js +84 -0
  142. package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js.map +1 -0
  143. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts +27 -0
  144. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts.map +1 -0
  145. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js +46 -0
  146. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js.map +1 -0
  147. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts +192 -0
  148. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts.map +1 -0
  149. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js +253 -0
  150. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js.map +1 -0
  151. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts +211 -0
  152. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts.map +1 -0
  153. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js +501 -0
  154. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js.map +1 -0
  155. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts +114 -0
  156. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts.map +1 -0
  157. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js +356 -0
  158. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js.map +1 -0
  159. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts +41 -0
  160. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -0
  161. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +184 -0
  162. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -0
  163. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts +150 -0
  164. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts.map +1 -0
  165. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js +128 -0
  166. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js.map +1 -0
  167. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts +74 -0
  168. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts.map +1 -0
  169. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js +179 -0
  170. package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js.map +1 -0
  171. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts +13 -0
  172. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts.map +1 -0
  173. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +189 -0
  174. package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js.map +1 -0
  175. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts +7 -0
  176. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts.map +1 -0
  177. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js +317 -0
  178. package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js.map +1 -0
  179. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts +45 -0
  180. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts.map +1 -0
  181. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js +71 -0
  182. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js.map +1 -0
  183. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts +104 -0
  184. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts.map +1 -0
  185. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js +152 -0
  186. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js.map +1 -0
  187. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts +55 -0
  188. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts.map +1 -0
  189. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js +105 -0
  190. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js.map +1 -0
  191. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts +17 -0
  192. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts.map +1 -0
  193. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js +35 -0
  194. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js.map +1 -0
  195. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts +69 -0
  196. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts.map +1 -0
  197. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js +149 -0
  198. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js.map +1 -0
  199. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts +68 -0
  200. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts.map +1 -0
  201. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js +161 -0
  202. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js.map +1 -0
  203. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts +58 -0
  204. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts.map +1 -0
  205. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js +122 -0
  206. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js.map +1 -0
  207. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts +65 -0
  208. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts.map +1 -0
  209. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js +208 -0
  210. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js.map +1 -0
  211. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts +51 -0
  212. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts.map +1 -0
  213. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js +147 -0
  214. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js.map +1 -0
  215. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts +71 -0
  216. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts.map +1 -0
  217. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js +194 -0
  218. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js.map +1 -0
  219. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts +156 -0
  220. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts.map +1 -0
  221. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js +292 -0
  222. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js.map +1 -0
  223. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts +98 -0
  224. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts.map +1 -0
  225. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js +122 -0
  226. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js.map +1 -0
  227. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts +89 -0
  228. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts.map +1 -0
  229. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js +165 -0
  230. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js.map +1 -0
  231. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts +92 -0
  232. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts.map +1 -0
  233. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js +100 -0
  234. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js.map +1 -0
  235. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts +70 -0
  236. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts.map +1 -0
  237. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js +104 -0
  238. package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js.map +1 -0
  239. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +23 -0
  240. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts.map +1 -0
  241. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js +24 -0
  242. package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js.map +1 -0
  243. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts +10 -0
  244. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts.map +1 -0
  245. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js +439 -0
  246. package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js.map +1 -0
  247. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts +19 -0
  248. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts.map +1 -0
  249. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js +515 -0
  250. package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js.map +1 -0
  251. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts +72 -0
  252. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts.map +1 -0
  253. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js +269 -0
  254. package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js.map +1 -0
  255. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts +3 -0
  256. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts.map +1 -0
  257. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js +3 -0
  258. package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js.map +1 -0
  259. package/node_modules/@claude-flow/plugin-agent-federation/package.json +64 -0
  260. package/node_modules/@claude-flow/security/README.md +292 -0
  261. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts +97 -0
  262. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts.map +1 -0
  263. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js +537 -0
  264. package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js.map +1 -0
  265. package/node_modules/@claude-flow/security/dist/application/index.d.ts +7 -0
  266. package/node_modules/@claude-flow/security/dist/application/index.d.ts.map +1 -0
  267. package/node_modules/@claude-flow/security/dist/application/index.js +7 -0
  268. package/node_modules/@claude-flow/security/dist/application/index.js.map +1 -0
  269. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts +71 -0
  270. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts.map +1 -0
  271. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js +153 -0
  272. package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js.map +1 -0
  273. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts +148 -0
  274. package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts.map +1 -0
  275. package/node_modules/@claude-flow/security/dist/authorization/propagator.js +182 -0
  276. package/node_modules/@claude-flow/security/dist/authorization/propagator.js.map +1 -0
  277. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts +176 -0
  278. package/node_modules/@claude-flow/security/dist/credential-generator.d.ts.map +1 -0
  279. package/node_modules/@claude-flow/security/dist/credential-generator.js +272 -0
  280. package/node_modules/@claude-flow/security/dist/credential-generator.js.map +1 -0
  281. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts +68 -0
  282. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts.map +1 -0
  283. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js +132 -0
  284. package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js.map +1 -0
  285. package/node_modules/@claude-flow/security/dist/domain/index.d.ts +8 -0
  286. package/node_modules/@claude-flow/security/dist/domain/index.d.ts.map +1 -0
  287. package/node_modules/@claude-flow/security/dist/domain/index.js +8 -0
  288. package/node_modules/@claude-flow/security/dist/domain/index.js.map +1 -0
  289. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts +71 -0
  290. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts.map +1 -0
  291. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js +237 -0
  292. package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js.map +1 -0
  293. package/node_modules/@claude-flow/security/dist/index.d.ts +129 -0
  294. package/node_modules/@claude-flow/security/dist/index.d.ts.map +1 -0
  295. package/node_modules/@claude-flow/security/dist/index.js +176 -0
  296. package/node_modules/@claude-flow/security/dist/index.js.map +1 -0
  297. package/node_modules/@claude-flow/security/dist/input-validator.d.ts +306 -0
  298. package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -0
  299. package/node_modules/@claude-flow/security/dist/input-validator.js +393 -0
  300. package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -0
  301. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts +48 -0
  302. package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts.map +1 -0
  303. package/node_modules/@claude-flow/security/dist/keychain-adapter.js +0 -0
  304. package/node_modules/@claude-flow/security/dist/keychain-adapter.js.map +1 -0
  305. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts +133 -0
  306. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts.map +1 -0
  307. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js +254 -0
  308. package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js.map +1 -0
  309. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts +31 -0
  310. package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts.map +1 -0
  311. package/node_modules/@claude-flow/security/dist/oauth/browser.js +55 -0
  312. package/node_modules/@claude-flow/security/dist/oauth/browser.js.map +1 -0
  313. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts +37 -0
  314. package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts.map +1 -0
  315. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js +86 -0
  316. package/node_modules/@claude-flow/security/dist/oauth/callback-server.js.map +1 -0
  317. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts +57 -0
  318. package/node_modules/@claude-flow/security/dist/oauth/client.d.ts.map +1 -0
  319. package/node_modules/@claude-flow/security/dist/oauth/client.js +120 -0
  320. package/node_modules/@claude-flow/security/dist/oauth/client.js.map +1 -0
  321. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts +25 -0
  322. package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts.map +1 -0
  323. package/node_modules/@claude-flow/security/dist/oauth/pkce.js +36 -0
  324. package/node_modules/@claude-flow/security/dist/oauth/pkce.js.map +1 -0
  325. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts +128 -0
  326. package/node_modules/@claude-flow/security/dist/password-hasher.d.ts.map +1 -0
  327. package/node_modules/@claude-flow/security/dist/password-hasher.js +190 -0
  328. package/node_modules/@claude-flow/security/dist/password-hasher.js.map +1 -0
  329. package/node_modules/@claude-flow/security/dist/path-validator.d.ts +148 -0
  330. package/node_modules/@claude-flow/security/dist/path-validator.d.ts.map +1 -0
  331. package/node_modules/@claude-flow/security/dist/path-validator.js +421 -0
  332. package/node_modules/@claude-flow/security/dist/path-validator.js.map +1 -0
  333. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts +125 -0
  334. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts.map +1 -0
  335. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js +186 -0
  336. package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js.map +1 -0
  337. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts +5 -0
  338. package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts.map +1 -0
  339. package/node_modules/@claude-flow/security/dist/policy/canonical.js +30 -0
  340. package/node_modules/@claude-flow/security/dist/policy/canonical.js.map +1 -0
  341. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts +34 -0
  342. package/node_modules/@claude-flow/security/dist/policy/engine.d.ts.map +1 -0
  343. package/node_modules/@claude-flow/security/dist/policy/engine.js +285 -0
  344. package/node_modules/@claude-flow/security/dist/policy/engine.js.map +1 -0
  345. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts +9 -0
  346. package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts.map +1 -0
  347. package/node_modules/@claude-flow/security/dist/policy/envelope.js +90 -0
  348. package/node_modules/@claude-flow/security/dist/policy/envelope.js.map +1 -0
  349. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts +4 -0
  350. package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts.map +1 -0
  351. package/node_modules/@claude-flow/security/dist/policy/evaluator.js +119 -0
  352. package/node_modules/@claude-flow/security/dist/policy/evaluator.js.map +1 -0
  353. package/node_modules/@claude-flow/security/dist/policy/index.d.ts +7 -0
  354. package/node_modules/@claude-flow/security/dist/policy/index.d.ts.map +1 -0
  355. package/node_modules/@claude-flow/security/dist/policy/index.js +7 -0
  356. package/node_modules/@claude-flow/security/dist/policy/index.js.map +1 -0
  357. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts +238 -0
  358. package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts.map +1 -0
  359. package/node_modules/@claude-flow/security/dist/policy/product-plane.js +1022 -0
  360. package/node_modules/@claude-flow/security/dist/policy/product-plane.js.map +1 -0
  361. package/node_modules/@claude-flow/security/dist/policy/types.d.ts +169 -0
  362. package/node_modules/@claude-flow/security/dist/policy/types.d.ts.map +1 -0
  363. package/node_modules/@claude-flow/security/dist/policy/types.js +2 -0
  364. package/node_modules/@claude-flow/security/dist/policy/types.js.map +1 -0
  365. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts +180 -0
  366. package/node_modules/@claude-flow/security/dist/safe-executor.d.ts.map +1 -0
  367. package/node_modules/@claude-flow/security/dist/safe-executor.js +390 -0
  368. package/node_modules/@claude-flow/security/dist/safe-executor.js.map +1 -0
  369. package/node_modules/@claude-flow/security/dist/token-generator.d.ts +224 -0
  370. package/node_modules/@claude-flow/security/dist/token-generator.d.ts.map +1 -0
  371. package/node_modules/@claude-flow/security/dist/token-generator.js +351 -0
  372. package/node_modules/@claude-flow/security/dist/token-generator.js.map +1 -0
  373. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts +126 -0
  374. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts.map +1 -0
  375. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js +257 -0
  376. package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js.map +1 -0
  377. package/node_modules/@claude-flow/security/package.json +44 -0
  378. package/package.json +24 -8
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": {
3
- "version": "3.32.29",
3
+ "version": "3.32.32",
4
4
  "files": {
5
5
  "auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
6
6
  "hook-handler.cjs": "50ea92a72651bdc95634f7588d56a5870963168eef5226f66ed14af3b47c8d9a",
@@ -8,6 +8,6 @@
8
8
  "statusline.cjs": "d2a0eac56d1267d8dbed2d70b09feb592299469196ec4b215909f2b052144882"
9
9
  }
10
10
  },
11
- "signature": "jF/krskPhEF+3m0rkY3my1qEuLZec5hzo3YoV7xUl8/7xZqlpTctkB9QlYACViu2GCK3AGkWS7BRf5xR6WK7Aw==",
11
+ "signature": "04DvDI9kCGvy1HIskgegJsTnGUTgnDBMGTb/c+ef/hy3XgM4WvpHb6xePaWraB6YQ4F41+4BZRi4ZeBWBrVbBA==",
12
12
  "algorithm": "ed25519"
13
13
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 3,
4
- "generatedAt": "2026-07-29T04:47:25.187Z",
5
- "gitSha": "39bc5fd9",
4
+ "generatedAt": "2026-07-29T12:41:44.000Z",
5
+ "gitSha": "388849b3",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 395,
@@ -61,6 +61,16 @@ export declare function validateNumber(value: unknown, min: number, max: number,
61
61
  * Returns only valid sources; falls back to defaults if none are valid.
62
62
  */
63
63
  export declare function validateTaskSources(sources: unknown): string[];
64
+ export type TaskSourceValidation = {
65
+ valid: true;
66
+ sources: string[];
67
+ } | {
68
+ valid: false;
69
+ invalidSources: string[];
70
+ reason: string;
71
+ };
72
+ /** Strictly validate user-supplied task sources without enabling defaults. */
73
+ export declare function validateConfiguredTaskSources(sources: unknown): TaskSourceValidation;
64
74
  export declare function getDefaultState(): AutopilotState;
65
75
  export declare function loadState(): AutopilotState;
66
76
  export declare function saveState(state: AutopilotState): void;
@@ -74,6 +74,22 @@ export function validateTaskSources(sources) {
74
74
  .filter(s => VALID_TASK_SOURCES.has(s));
75
75
  return valid.length > 0 ? valid : defaults;
76
76
  }
77
+ /** Strictly validate user-supplied task sources without enabling defaults. */
78
+ export function validateConfiguredTaskSources(sources) {
79
+ if (!Array.isArray(sources) || sources.length === 0) {
80
+ return { valid: false, invalidSources: [], reason: 'At least one task source is required' };
81
+ }
82
+ const normalized = sources.map(source => typeof source === 'string' ? source.trim() : String(source));
83
+ const invalidSources = normalized.filter(source => !VALID_TASK_SOURCES.has(source));
84
+ if (invalidSources.length > 0) {
85
+ return {
86
+ valid: false,
87
+ invalidSources,
88
+ reason: `Unsupported task source(s): ${invalidSources.join(', ')}`,
89
+ };
90
+ }
91
+ return { valid: true, sources: [...new Set(normalized)] };
92
+ }
77
93
  // ── State Management ──────────────────────────────────────────
78
94
  export function getDefaultState() {
79
95
  return {
@@ -5,7 +5,7 @@
5
5
  * ADR-072: Autopilot Integration
6
6
  */
7
7
  import { output } from '../output.js';
8
- import { loadState, saveState, appendLog, loadLog, discoverTasks, getProgress, calculateReward, tryLoadLearning, validateNumber, validateTaskSources, LOG_FILE, } from '../autopilot-state.js';
8
+ import { loadState, saveState, appendLog, loadLog, discoverTasks, getProgress, calculateReward, tryLoadLearning, validateNumber, validateConfiguredTaskSources, VALID_TASK_SOURCES, LOG_FILE, } from '../autopilot-state.js';
9
9
  import { getCheckpointGate, CheckpointGate } from '../services/checkpoint-gate.js';
10
10
  /**
11
11
  * Opt-in checkpoint/rollback gate for the autopilot tick (agenticow step 3).
@@ -183,7 +183,7 @@ const configCommand = {
183
183
  options: [
184
184
  { name: 'max-iterations', type: 'string', description: 'Max re-engagement iterations (1-1000)' },
185
185
  { name: 'timeout', type: 'string', description: 'Timeout in minutes (1-1440)' },
186
- { name: 'task-sources', type: 'string', description: 'Comma-separated task sources' },
186
+ { name: 'task-sources', type: 'string', description: `Comma-separated task sources: ${[...VALID_TASK_SOURCES].join(', ')}` },
187
187
  ],
188
188
  action: async (ctx) => {
189
189
  const state = loadState();
@@ -194,8 +194,14 @@ const configCommand = {
194
194
  state.maxIterations = validateNumber(maxIter, 1, 1000, state.maxIterations);
195
195
  if (timeout)
196
196
  state.timeoutMinutes = validateNumber(timeout, 1, 1440, state.timeoutMinutes);
197
- if (sources)
198
- state.taskSources = validateTaskSources(sources.split(',').map(s => s.trim()).filter(Boolean));
197
+ if (sources !== undefined) {
198
+ const validation = validateConfiguredTaskSources(sources.split(',').map(s => s.trim()).filter(Boolean));
199
+ if (!validation.valid) {
200
+ output.printError(`${validation.reason}. Valid sources: ${[...VALID_TASK_SOURCES].join(', ')}`);
201
+ return { success: false, exitCode: 1 };
202
+ }
203
+ state.taskSources = validation.sources;
204
+ }
199
205
  saveState(state);
200
206
  appendLog({ ts: Date.now(), event: 'config-updated', maxIterations: state.maxIterations, timeoutMinutes: state.timeoutMinutes, taskSources: state.taskSources });
201
207
  output.writeln(`Config updated: maxIterations=${state.maxIterations}, timeout=${state.timeoutMinutes}min, sources=${state.taskSources.join(',')}`);
@@ -19,6 +19,49 @@ function behavioralRules() {
19
19
  - Keep files under 500 lines
20
20
  - Validate input at system boundaries`;
21
21
  }
22
+ function policyGovernedWorkflow() {
23
+ return `## Ruflo Capability Brain & Implementation Loop
24
+
25
+ Ruflo is the coordination ledger and policy decision point. Claude Code is the
26
+ executor: after a Ruflo coordination call, continue implementing the task.
27
+
28
+ When it is registered, call
29
+ \`guidance_brain({ mode: "recommend", task: "..." })\` before complex Ruflo
30
+ work. Use its live registry instead of guessing tool names. Treat
31
+ \`registered\`, \`configured\`, \`reachable\`, \`healthy\`, and \`authorized\`
32
+ as separate facts. If the brain is unavailable, continue with the compatible
33
+ \`guidance_recommend\` tool, CLI discovery, and repository instructions.
34
+
35
+ Follow the returned loop:
36
+
37
+ 1. Recall memory and ADR constraints.
38
+ 2. Inspect source, runtime, dependencies, policy, and health.
39
+ 3. Route to the smallest capable topology, agents, skills, and tools.
40
+ 4. Plan acceptance criteria, safety envelope, ownership, and validation.
41
+ 5. Execute in isolated scopes; the coding agent performs the work.
42
+ 6. Test focused, regression, and failure paths.
43
+ 7. Validate types, security, policy, compatibility, and artifacts.
44
+ 8. Benchmark a source-bound candidate against a source-bound baseline.
45
+ 9. Optimize measured bottlenecks without weakening safety.
46
+ 10. Bind claims and evidence to exact source/build receipts.
47
+ 11. Reconcile concurrent handoffs and disclose limitations.
48
+ 12. Publish only through a separately authorized release gate.
49
+
50
+ ### Concurrency and authority
51
+
52
+ - Never allow two writers in one worktree; give each writing agent an isolated
53
+ worktree and explicit file ownership.
54
+ - Read-only research may run concurrently and report findings to the owner.
55
+ - Only the integration owner edits shared manifests and lockfiles or reconciles
56
+ overlapping changes.
57
+ - A child may drop capabilities but cannot add tools, network, secrets, spend,
58
+ concurrency, namespaces, or delegation depth.
59
+ - A lease or claim coordinates ownership; it does not authorize a side effect.
60
+ - Darwin, Flywheel, MetaHarness, memory, and neural systems may propose or
61
+ evaluate candidates but cannot self-promote or expand their SafetyEnvelope.
62
+ - Bind tests, benchmarks, policy decisions, and release evidence to an exact
63
+ commit or immutable dirty-worktree snapshot.`;
64
+ }
22
65
  function agentComms() {
23
66
  return `## Agent Comms (SendMessage-First Coordination)
24
67
 
@@ -61,8 +104,10 @@ SendMessage({ to: "researcher", summary: "Start", message: "[task context]" })
61
104
  - ALWAYS name agents — \`name: "role"\` makes them addressable
62
105
  - ALWAYS include comms instructions in prompts — who to message, what to send
63
106
  - Spawn ALL agents in ONE message with \`run_in_background: true\`
64
- - After spawning: STOP, tell user what's running, wait for results
65
- - NEVER poll status — agents message back or complete automatically`;
107
+ - After spawning, continue independent local work; wait only when a dependency
108
+ genuinely blocks progress
109
+ - Do not poll repeatedly — agents message back or complete automatically
110
+ - Give every writing agent an isolated worktree and a non-overlapping file scope`;
66
111
  }
67
112
  function swarmConfig(options) {
68
113
  return `## Swarm & Routing
@@ -283,6 +328,7 @@ CLAUDE_FLOW_MEMORY_PATH=./data/memory
283
328
  const TEMPLATE_SECTIONS = {
284
329
  minimal: [
285
330
  behavioralRules,
331
+ (_opts) => policyGovernedWorkflow(),
286
332
  (_opts) => agentComms(),
287
333
  swarmConfig,
288
334
  (_opts) => buildAndTest(),
@@ -291,6 +337,7 @@ const TEMPLATE_SECTIONS = {
291
337
  ],
292
338
  standard: [
293
339
  behavioralRules,
340
+ (_opts) => policyGovernedWorkflow(),
294
341
  (_opts) => agentComms(),
295
342
  swarmConfig,
296
343
  (_opts) => memoryAndLearning(),
@@ -301,6 +348,7 @@ const TEMPLATE_SECTIONS = {
301
348
  ],
302
349
  full: [
303
350
  behavioralRules,
351
+ (_opts) => policyGovernedWorkflow(),
304
352
  (_opts) => agentComms(),
305
353
  swarmConfig,
306
354
  (_opts) => memoryAndLearning(),
@@ -315,6 +363,7 @@ const TEMPLATE_SECTIONS = {
315
363
  ],
316
364
  security: [
317
365
  behavioralRules,
366
+ (_opts) => policyGovernedWorkflow(),
318
367
  (_opts) => agentComms(),
319
368
  swarmConfig,
320
369
  (_opts) => securitySection(),
@@ -326,6 +375,7 @@ const TEMPLATE_SECTIONS = {
326
375
  ],
327
376
  performance: [
328
377
  behavioralRules,
378
+ (_opts) => policyGovernedWorkflow(),
329
379
  (_opts) => agentComms(),
330
380
  swarmConfig,
331
381
  (_opts) => performanceSection(),
@@ -338,6 +388,7 @@ const TEMPLATE_SECTIONS = {
338
388
  ],
339
389
  solo: [
340
390
  behavioralRules,
391
+ (_opts) => policyGovernedWorkflow(),
341
392
  (_opts) => agentComms(),
342
393
  (_opts) => memoryAndLearning(),
343
394
  (_opts) => buildAndTest(),
@@ -8,7 +8,7 @@
8
8
  * @module @claude-flow/cli/mcp-tools/autopilot
9
9
  */
10
10
  import { validateText } from './validate-input.js';
11
- import { loadState, saveState, appendLog, loadLog, discoverTasks, isTerminal, tryLoadLearning, validateNumber, validateTaskSources, VALID_TASK_SOURCES, } from '../autopilot-state.js';
11
+ import { loadState, saveState, appendLog, loadLog, discoverTasks, isTerminal, tryLoadLearning, validateNumber, validateConfiguredTaskSources, VALID_TASK_SOURCES, } from '../autopilot-state.js';
12
12
  function ok(data) {
13
13
  return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
14
14
  }
@@ -71,7 +71,12 @@ const autopilotConfig = {
71
71
  properties: {
72
72
  maxIterations: { type: 'number', description: 'Max re-engagement iterations (1-1000)' },
73
73
  timeoutMinutes: { type: 'number', description: 'Timeout in minutes (1-1440)' },
74
- taskSources: { type: 'array', items: { type: 'string' }, description: `Task sources: ${[...VALID_TASK_SOURCES].join(', ')}` },
74
+ taskSources: {
75
+ type: 'array',
76
+ minItems: 1,
77
+ items: { type: 'string', enum: [...VALID_TASK_SOURCES] },
78
+ description: `Task sources: ${[...VALID_TASK_SOURCES].join(', ')}`,
79
+ },
75
80
  },
76
81
  },
77
82
  handler: async (params) => {
@@ -83,7 +88,17 @@ const autopilotConfig = {
83
88
  state.timeoutMinutes = validateNumber(params.timeoutMinutes, 1, 1440, state.timeoutMinutes);
84
89
  }
85
90
  if (params.taskSources !== undefined) {
86
- state.taskSources = validateTaskSources(params.taskSources);
91
+ const validation = validateConfiguredTaskSources(params.taskSources);
92
+ if (!validation.valid) {
93
+ return {
94
+ content: [{ type: 'text', text: JSON.stringify({
95
+ error: validation.reason,
96
+ validSources: [...VALID_TASK_SOURCES],
97
+ }) }],
98
+ isError: true,
99
+ };
100
+ }
101
+ state.taskSources = validation.sources;
87
102
  }
88
103
  saveState(state);
89
104
  return ok({ maxIterations: state.maxIterations, timeoutMinutes: state.timeoutMinutes, taskSources: state.taskSources });
@@ -125,8 +125,8 @@ export const CAPABILITY_DOMAINS = [
125
125
  {
126
126
  id: 'guidance',
127
127
  name: 'Capability Guidance',
128
- description: 'Live capability inventory, task routing, workflow guidance, and system discovery.',
129
128
  prefixes: ['guidance_'],
129
+ description: 'Live capability inventory, task routing, workflow guidance, and system discovery.',
130
130
  taskSignals: ['guidance', 'discover', 'capability', 'what can ruflo do'],
131
131
  commands: ['guidance compile', 'guidance retrieve', 'guidance gates', 'guidance optimize'],
132
132
  skills: [],
@@ -140,8 +140,8 @@ export const CAPABILITY_DOMAINS = [
140
140
  {
141
141
  id: 'identity-auth',
142
142
  name: 'Cognitum Identity & OAuth',
143
- description: 'Profile-aware PKCE/OOB authentication, credential status, consent-bound scopes, refresh, and local logout.',
144
143
  prefixes: ['auth_', 'oauth_'],
144
+ description: 'Profile-aware PKCE/OOB authentication, credential status, consent-bound scopes, refresh, and local logout.',
145
145
  taskSignals: ['auth', 'oauth', 'login', 'logout', 'credential', 'profile', 'scope', 'consent'],
146
146
  commands: ['auth login', 'auth login --no-browser', 'auth status', 'auth status --check', 'auth logout'],
147
147
  skills: ['security-audit'],
@@ -163,8 +163,8 @@ export const CAPABILITY_DOMAINS = [
163
163
  {
164
164
  id: 'policy-authorization',
165
165
  name: 'Policy Authorization',
166
- description: 'Policy-decision evaluation and status for exact subject/action/resource requests.',
167
166
  prefixes: ['policy_'],
167
+ description: 'Policy-decision evaluation and status for exact subject/action/resource requests.',
168
168
  taskSignals: ['policy', 'authorization', 'permission', 'capability', 'access control'],
169
169
  commands: ['policy evaluate', 'policy status', 'guidance gates'],
170
170
  skills: ['claims', 'security-audit', 'v3-security-overhaul'],
@@ -181,8 +181,8 @@ export const CAPABILITY_DOMAINS = [
181
181
  {
182
182
  id: 'work-claims',
183
183
  name: 'Exclusive Work Claims',
184
- description: 'Repository/task ownership claims, handoffs, contention, stealing, and rebalance.',
185
184
  prefixes: ['claims_'],
185
+ description: 'Repository/task ownership claims, handoffs, contention, stealing, and rebalance.',
186
186
  taskSignals: ['work claim', 'claim task', 'handoff', 'ownership', 'concurrent work', 'rebalance'],
187
187
  commands: ['claims claim', 'claims handoff', 'claims status'],
188
188
  skills: ['claims'],
@@ -198,8 +198,8 @@ export const CAPABILITY_DOMAINS = [
198
198
  {
199
199
  id: 'content-safety',
200
200
  name: 'AIDefence Content Safety',
201
- description: 'Prompt/content safety, PII detection, learning, and security evidence.',
202
201
  prefixes: ['aidefence_', 'security_'],
202
+ description: 'Prompt/content safety, PII detection, learning, and security evidence.',
203
203
  taskSignals: ['security', 'content safety', 'pii', 'prompt injection', 'threat', 'audit'],
204
204
  commands: ['security scan'],
205
205
  skills: ['security-audit', 'v3-security-overhaul'],
@@ -215,8 +215,8 @@ export const CAPABILITY_DOMAINS = [
215
215
  {
216
216
  id: 'metaharness-flywheel',
217
217
  name: 'MetaHarness, Darwin & Flywheel',
218
- description: 'Candidate scoring, static analysis, threat modeling, genome exploration, and controlled improvement loops.',
219
218
  prefixes: ['metaharness_', 'autopilot_'],
219
+ description: 'Candidate scoring, static analysis, threat modeling, genome exploration, and controlled improvement loops.',
220
220
  taskSignals: ['metaharness', 'darwin', 'flywheel', 'genome', 'optimize', 'autopilot'],
221
221
  commands: ['metaharness score', 'metaharness genome', 'autopilot run'],
222
222
  skills: ['metaharness-brain', 'performance-analysis'],
@@ -233,8 +233,8 @@ export const CAPABILITY_DOMAINS = [
233
233
  {
234
234
  id: 'memory-knowledge',
235
235
  name: 'Memory, AgentDB & Embeddings',
236
- description: 'Persistent memory, semantic/vector retrieval, namespaces, embeddings, and AgentDB controllers.',
237
236
  prefixes: ['memory_', 'agentdb_', 'embeddings_'],
237
+ description: 'Persistent memory, semantic/vector retrieval, namespaces, embeddings, and AgentDB controllers.',
238
238
  taskSignals: ['memory', 'agentdb', 'vector', 'embedding', 'semantic', 'recall'],
239
239
  commands: ['memory search', 'memory store', 'memory retrieve'],
240
240
  skills: ['memory-management', 'agentdb-advanced', 'agentdb-vector-search'],
@@ -250,8 +250,8 @@ export const CAPABILITY_DOMAINS = [
250
250
  {
251
251
  id: 'memory-branching',
252
252
  name: 'Copy-on-Write & Speculative Memory',
253
- description: 'Low-cost memory branching, checkpoint, rollback, comparison, and validated promotion.',
254
253
  prefixes: ['agenticow_'],
254
+ description: 'Low-cost memory branching, checkpoint, rollback, comparison, and validated promotion.',
255
255
  taskSignals: ['branch memory', 'checkpoint', 'rollback', 'speculative'],
256
256
  commands: [],
257
257
  skills: ['agentdb-learning'],
@@ -267,8 +267,8 @@ export const CAPABILITY_DOMAINS = [
267
267
  {
268
268
  id: 'agents-runtimes',
269
269
  name: 'Agent Lifecycle & Runtimes',
270
- description: 'Local agents, managed cloud agents, WASM sandboxes, and inference runtimes.',
271
270
  prefixes: ['agent_', 'managed_agent_', 'wasm_agent_', 'wasm_gallery_', 'ruvllm_'],
271
+ description: 'Local agents, managed cloud agents, WASM sandboxes, and inference runtimes.',
272
272
  taskSignals: ['agent', 'worker', 'wasm', 'sandbox', 'inference', 'managed agent'],
273
273
  commands: ['agent spawn', 'agent status', 'agent stop'],
274
274
  skills: ['agent-coder', 'agent-tester', 'agent-reviewer'],
@@ -284,8 +284,8 @@ export const CAPABILITY_DOMAINS = [
284
284
  {
285
285
  id: 'swarm-coordination',
286
286
  name: 'Swarm & Coordination',
287
- description: 'Topology-aware multi-agent coordination, task ownership, and collective scheduling.',
288
287
  prefixes: ['swarm_', 'coordination_', 'daa_'],
288
+ description: 'Topology-aware multi-agent coordination, task ownership, and collective scheduling.',
289
289
  taskSignals: ['swarm', 'concurrent', 'parallel', 'coordinate', 'multi-agent'],
290
290
  commands: ['swarm init', 'swarm status', 'swarm coordinate'],
291
291
  skills: ['swarm-orchestration', 'swarm-advanced'],
@@ -299,8 +299,8 @@ export const CAPABILITY_DOMAINS = [
299
299
  {
300
300
  id: 'consensus-federation',
301
301
  name: 'Hive Mind & Consensus',
302
- description: 'Hive, quorum, voting, gossip, and distributed agreement primitives.',
303
302
  prefixes: ['hive_', 'hive-mind_', 'consensus_', 'quorum_'],
303
+ description: 'Hive, quorum, voting, gossip, and distributed agreement primitives.',
304
304
  taskSignals: ['hive', 'consensus', 'quorum', 'byzantine', 'federation'],
305
305
  commands: ['hive-mind init', 'hive-mind status'],
306
306
  skills: ['hive-mind', 'hive-mind-advanced'],
@@ -314,8 +314,8 @@ export const CAPABILITY_DOMAINS = [
314
314
  {
315
315
  id: 'tasks-workflows-sessions',
316
316
  name: 'Tasks, Workflows, Sessions & Progress',
317
- description: 'Task orchestration, reusable workflows, session state, progress, and handoff.',
318
317
  prefixes: ['task_', 'workflow_', 'session_', 'progress_'],
318
+ description: 'Task orchestration, reusable workflows, session state, progress, and handoff.',
319
319
  taskSignals: ['task', 'workflow', 'session', 'handoff', 'progress'],
320
320
  commands: ['task create', 'task status', 'workflow run'],
321
321
  skills: ['workflow-automation'],
@@ -329,8 +329,8 @@ export const CAPABILITY_DOMAINS = [
329
329
  {
330
330
  id: 'hooks-learning-routing',
331
331
  name: 'Hooks, Coverage & Learning Routing',
332
- description: 'Lifecycle hooks, coverage-aware routing, background workers, and validated pattern capture.',
333
332
  prefixes: ['hooks_', 'coverage_'],
333
+ description: 'Lifecycle hooks, coverage-aware routing, background workers, and validated pattern capture.',
334
334
  taskSignals: ['hook', 'coverage', 'route', 'worker', 'learning'],
335
335
  commands: ['hooks pre-task', 'hooks post-task', 'hooks route', 'hooks coverage-gaps'],
336
336
  skills: ['hooks-automation'],
@@ -345,8 +345,8 @@ export const CAPABILITY_DOMAINS = [
345
345
  {
346
346
  id: 'analysis-quality',
347
347
  name: 'Analysis & Quality',
348
- description: 'Code/project analysis, quality assessment, and change inspection.',
349
348
  prefixes: ['analyze_', 'analysis_'],
349
+ description: 'Code/project analysis, quality assessment, and change inspection.',
350
350
  taskSignals: ['analyze', 'review', 'quality', 'dependency'],
351
351
  commands: ['analyze code', 'analyze project'],
352
352
  skills: ['verification-quality'],
@@ -360,8 +360,8 @@ export const CAPABILITY_DOMAINS = [
360
360
  {
361
361
  id: 'test-generation',
362
362
  name: 'TDD Test Generation',
363
- description: 'TDD repair and test-generation capability exported by Ruflo but intentionally reported as unregistered until the MCP registry enables it.',
364
363
  prefixes: ['testgen_'],
364
+ description: 'TDD repair and test-generation capability exported by Ruflo but intentionally reported as unregistered until the MCP registry enables it.',
365
365
  exactTools: ['testgen_tdd_repair'],
366
366
  taskSignals: ['generate tests', 'tdd repair', 'test generation'],
367
367
  commands: [],
@@ -379,8 +379,8 @@ export const CAPABILITY_DOMAINS = [
379
379
  {
380
380
  id: 'performance-neural',
381
381
  name: 'Performance & Neural Optimization',
382
- description: 'Profiling, benchmarks, learned routing, pattern training, and optimization.',
383
382
  prefixes: ['performance_', 'neural_'],
383
+ description: 'Profiling, benchmarks, learned routing, pattern training, and optimization.',
384
384
  taskSignals: ['performance', 'benchmark', 'profile', 'latency', 'neural', 'train'],
385
385
  commands: ['performance benchmark', 'performance profile', 'neural train'],
386
386
  skills: ['performance-analysis', 'neural-training'],
@@ -396,8 +396,8 @@ export const CAPABILITY_DOMAINS = [
396
396
  {
397
397
  id: 'browser-web',
398
398
  name: 'Browser & Web Actions',
399
- description: 'Browser sessions, page actions, intent routing, and guarded HTTP probes.',
400
399
  prefixes: ['browser_', 'http_fetch'],
400
+ description: 'Browser sessions, page actions, intent routing, and guarded HTTP probes.',
401
401
  taskSignals: ['browser', 'web page', 'navigate', 'click', 'http', 'fetch'],
402
402
  commands: ['browser open', 'browser act'],
403
403
  skills: [],
@@ -413,8 +413,8 @@ export const CAPABILITY_DOMAINS = [
413
413
  {
414
414
  id: 'github-delivery',
415
415
  name: 'GitHub & Delivery',
416
- description: 'Issues, pull requests, workflows, releases, repository automation, and handoff.',
417
416
  prefixes: ['github_', 'pr_', 'release_'],
417
+ description: 'Issues, pull requests, workflows, releases, repository automation, and handoff.',
418
418
  taskSignals: ['github', 'issue', 'pull request', 'merge', 'release', 'publish'],
419
419
  commands: ['github pr', 'github release'],
420
420
  skills: ['github-automation', 'github-release-management'],
@@ -429,9 +429,9 @@ export const CAPABILITY_DOMAINS = [
429
429
  {
430
430
  id: 'business-collaboration',
431
431
  name: 'AgentBBS & Business Pods',
432
- description: 'Federated business rooms, domain-affinity routing, and business-pod validation.',
433
432
  // Metadata classification only; execution remains behind the existing loadAgentbbs guard.
434
433
  prefixes: ['agentbbs_', 'business_pod_', 'federation_bbs_'],
434
+ description: 'Federated business rooms, domain-affinity routing, and business-pod validation.',
435
435
  taskSignals: ['business pod', 'bbs', 'room', 'domain affinity'],
436
436
  commands: [],
437
437
  skills: [],
@@ -447,8 +447,8 @@ export const CAPABILITY_DOMAINS = [
447
447
  {
448
448
  id: 'configuration-transfer',
449
449
  name: 'Configuration & Transfer',
450
- description: 'Configuration state plus portable import, export, backup, and migration.',
451
450
  prefixes: ['config_', 'transfer_'],
451
+ description: 'Configuration state plus portable import, export, backup, and migration.',
452
452
  taskSignals: ['config', 'setup', 'import', 'export', 'backup', 'migrate'],
453
453
  commands: ['config show', 'memory export'],
454
454
  skills: [],
@@ -463,8 +463,8 @@ export const CAPABILITY_DOMAINS = [
463
463
  {
464
464
  id: 'system-terminal',
465
465
  name: 'System & Terminal Compatibility',
466
- description: 'System diagnostics and legacy-compatible terminal execution surfaces.',
467
466
  prefixes: ['system_', 'terminal_', 'mcp_'],
467
+ description: 'System diagnostics and legacy-compatible terminal execution surfaces.',
468
468
  taskSignals: ['terminal', 'shell', 'doctor', 'system status'],
469
469
  commands: ['doctor', 'status'],
470
470
  skills: [],
@@ -479,8 +479,8 @@ export const CAPABILITY_DOMAINS = [
479
479
  {
480
480
  id: 'runtime-services',
481
481
  name: 'Other Registered Runtime Services',
482
- description: 'Live MCP tools not yet assigned to a specialized domain; included so coverage is never silently incomplete.',
483
482
  prefixes: [],
483
+ description: 'Live MCP tools not yet assigned to a specialized domain; included so coverage is never silently incomplete.',
484
484
  taskSignals: [],
485
485
  commands: [],
486
486
  skills: [],
@@ -814,7 +814,7 @@ const guidanceQuickRef = {
814
814
  };
815
815
  const guidanceBrain = {
816
816
  name: 'guidance_brain',
817
- description: 'Query Ruflo’s live capability brain. Covers every registered MCP tool, separates registration from configuration/reachability/health/authorization, recommends capabilities for a task, and returns the validated implementation loop.',
817
+ description: 'Use when choosing how to execute a task with Ruflo. Queries the live capability brain, covers every registered MCP tool, separates registration from configuration/reachability/health/authorization, recommends capabilities, and returns the validated implementation loop.',
818
818
  inputSchema: {
819
819
  type: 'object',
820
820
  properties: {
@@ -1,6 +1,26 @@
1
1
  import { type FlywheelResult } from './harness-flywheel.js';
2
2
  import { type GenerationResult } from './harness-flywheel-generations.js';
3
- import { type DarwinInvoker, type ProposerMode } from './flywheel-proposer.js';
3
+ import { type DarwinInvoker, type ProposerMode, type SafetyEnvelope } from './flywheel-proposer.js';
4
+ /**
5
+ * The ADR-322 retrieval safety envelope.
6
+ *
7
+ * It MUST describe the policy surface the proposer actually emits —
8
+ * `RetrievalConfig`. The v1 envelope allowed `topK`/`rerank`, which are
9
+ * `neural_patterns` search-call arguments not representable in
10
+ * `RetrievalConfig`, while omitting the three weight axes that
11
+ * `retrievalPolicyNeighbors` does mutate. Because `validateCandidate` checks
12
+ * EVERY key of a candidate policy (candidates are full snapshots, not deltas),
13
+ * that drift made every locally-proposed candidate inadmissible and the local
14
+ * evaluation path unreachable — no receipt, therefore no promotion, ever.
15
+ *
16
+ * Every axis carries a finite bound: an allowed key WITHOUT bounds is an
17
+ * unbounded key, because `validateCandidate` applies bounds only when present.
18
+ * A Darwin proposer could otherwise submit arbitrary weights on the three axes.
19
+ *
20
+ * Exported so tests can bind the REAL envelope to the REAL proposer; the drift
21
+ * survived review precisely because no test wired those two together.
22
+ */
23
+ export declare function retrievalSafetyEnvelope(ref?: string): SafetyEnvelope;
4
24
  /**
5
25
  * Run one live flywheel tick against `projectRoot`. Opt-in + $0 default: with
6
26
  * RUFLO_HARNESS_LOOP unset it is a no-op. Best-effort; never throws.
@@ -24,6 +24,51 @@ const ANCHOR = [
24
24
  ['Q-learning encoder keyword block', ['q-state encoder', 'route q-state', 'keyword block', '#2239', 'q-encoder']],
25
25
  ['security hardening crypto random IDs', ['cwe-347', 'crypto.randomuuid', 'security fix', 'random id', 'crypto random']],
26
26
  ].map(([q, labels], i) => ({ id: `q${String(i).padStart(2, '0')}`, input: { id: `q${String(i).padStart(2, '0')}`, q: q }, expected: labels }));
27
+ /**
28
+ * The ADR-322 retrieval safety envelope.
29
+ *
30
+ * It MUST describe the policy surface the proposer actually emits —
31
+ * `RetrievalConfig`. The v1 envelope allowed `topK`/`rerank`, which are
32
+ * `neural_patterns` search-call arguments not representable in
33
+ * `RetrievalConfig`, while omitting the three weight axes that
34
+ * `retrievalPolicyNeighbors` does mutate. Because `validateCandidate` checks
35
+ * EVERY key of a candidate policy (candidates are full snapshots, not deltas),
36
+ * that drift made every locally-proposed candidate inadmissible and the local
37
+ * evaluation path unreachable — no receipt, therefore no promotion, ever.
38
+ *
39
+ * Every axis carries a finite bound: an allowed key WITHOUT bounds is an
40
+ * unbounded key, because `validateCandidate` applies bounds only when present.
41
+ * A Darwin proposer could otherwise submit arbitrary weights on the three axes.
42
+ *
43
+ * Exported so tests can bind the REAL envelope to the REAL proposer; the drift
44
+ * survived review precisely because no test wired those two together.
45
+ */
46
+ export function retrievalSafetyEnvelope(ref) {
47
+ const allowedPolicyKeys = ['alpha', 'subjectWeight', 'mmrLambda', 'bodyWeight', 'typePenaltyFactor'];
48
+ const numericBounds = {
49
+ alpha: { min: 0.1, max: 0.9 },
50
+ subjectWeight: { min: 0.1, max: 10 },
51
+ mmrLambda: { min: 0.3, max: 0.9 },
52
+ bodyWeight: { min: 0.1, max: 10 },
53
+ typePenaltyFactor: { min: 0.1, max: 10 },
54
+ };
55
+ return {
56
+ ref: ref ?? sha256Ref(JSON.stringify({
57
+ schema: 'ruflo.retrieval-safety-envelope/v2',
58
+ allowedPolicyKeys,
59
+ numericBounds,
60
+ })),
61
+ allowedPolicyKeys,
62
+ numericBounds,
63
+ // Retrieval evaluations are local and report zero provider spend today;
64
+ // finite ceilings make any future resource evidence fail closed.
65
+ maxP95LatencyMicros: 5_000_000,
66
+ maxCostMicrosPerTask: 10_000,
67
+ maxTokensPerTask: 100_000,
68
+ maxFailureRate: 0.01,
69
+ maxEvaluationCostMicros: 1_000_000,
70
+ };
71
+ }
27
72
  /**
28
73
  * Run one live flywheel tick against `projectRoot`. Opt-in + $0 default: with
29
74
  * RUFLO_HARNESS_LOOP unset it is a no-op. Best-effort; never throws.
@@ -53,30 +98,7 @@ export async function runFlywheelWorker(projectRoot, opts = {}) {
53
98
  ...DEFAULT_CONFIG,
54
99
  ...(applier.activeChampion(projectRoot)?.params ?? {}),
55
100
  };
56
- const safetyEnvelope = {
57
- ref: opts.safetyEnvelopeRef ?? sha256Ref(JSON.stringify({
58
- schema: 'ruflo.retrieval-safety-envelope/v1',
59
- allowedPolicyKeys: ['alpha', 'topK', 'rerank', 'mmrLambda'],
60
- numericBounds: {
61
- alpha: { min: 0.1, max: 0.9 },
62
- topK: { min: 5, max: 20 },
63
- mmrLambda: { min: 0.3, max: 0.9 },
64
- },
65
- })),
66
- allowedPolicyKeys: ['alpha', 'topK', 'rerank', 'mmrLambda'],
67
- numericBounds: {
68
- alpha: { min: 0.1, max: 0.9 },
69
- topK: { min: 5, max: 20 },
70
- mmrLambda: { min: 0.3, max: 0.9 },
71
- },
72
- // Retrieval evaluations are local and report zero provider spend today;
73
- // finite ceilings make any future resource evidence fail closed.
74
- maxP95LatencyMicros: 5_000_000,
75
- maxCostMicrosPerTask: 10_000,
76
- maxTokensPerTask: 100_000,
77
- maxFailureRate: 0.01,
78
- maxEvaluationCostMicros: 1_000_000,
79
- };
101
+ const safetyEnvelope = retrievalSafetyEnvelope(opts.safetyEnvelopeRef);
80
102
  // CLI flag opts.proposer takes precedence over RUFLO_FLYWHEEL_PROPOSER.
81
103
  const proposerMode = opts.proposer
82
104
  ?? (process.env.RUFLO_FLYWHEEL_PROPOSER ?? 'auto');
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: memory-management
3
+ description: >
4
+ AgentDB memory system with HNSW vector search.
5
+ Use when: need to store patterns, search for solutions, semantic lookup.
6
+ Skip when: no learning needed, ephemeral tasks.
7
+ ---
8
+
9
+ # Memory Management Skill
10
+
11
+ ## Purpose
12
+ AgentDB memory system with HNSW vector search.
13
+
14
+ ## When to Trigger
15
+ - need to store patterns
16
+ - search for solutions
17
+ - semantic lookup
18
+
19
+ ## When to Skip
20
+ - no learning needed
21
+ - ephemeral tasks
22
+
23
+ ## Commands
24
+
25
+ ### Store Data
26
+ Store a pattern in memory
27
+
28
+ ```bash
29
+ npx @claude-flow/cli memory store --key "key" --value "value" --namespace patterns
30
+ ```
31
+
32
+ ### Search Data
33
+ Semantic search in memory
34
+
35
+ ```bash
36
+ npx @claude-flow/cli memory search --query "search terms" --limit 10
37
+ ```
38
+
39
+
40
+
41
+ ## Best Practices
42
+ 1. Check memory for existing patterns before starting
43
+ 2. Use hierarchical topology for coordination
44
+ 3. Store successful patterns after completion
45
+ 4. Document any new learnings