claude-flow 3.63.5 → 3.63.7

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 (42) hide show
  1. package/.claude/agents/github/github-modes.md +3 -3
  2. package/.claude/agents/github/issue-tracker.md +6 -6
  3. package/.claude/agents/github/pr-manager.md +6 -6
  4. package/.claude/agents/github/release-manager.md +11 -11
  5. package/.claude/agents/github/repo-architect.md +9 -9
  6. package/.claude/agents/github/swarm-issue.md +4 -4
  7. package/.claude/agents/github/swarm-pr.md +5 -5
  8. package/.claude/agents/github/sync-coordinator.md +18 -18
  9. package/.claude/agents/github/workflow-automation.md +7 -7
  10. package/.claude/agents/goal/code-goal-planner.md +2 -2
  11. package/.claude/commands/agents/agent-spawning.md +1 -1
  12. package/.claude/commands/github/github-modes.md +3 -3
  13. package/.claude/commands/github/issue-tracker.md +6 -6
  14. package/.claude/commands/github/pr-manager.md +6 -6
  15. package/.claude/commands/github/release-manager.md +11 -11
  16. package/.claude/commands/github/repo-architect.md +9 -9
  17. package/.claude/commands/github/sync-coordinator.md +9 -9
  18. package/.claude/commands/sparc/orchestrator.md +1 -1
  19. package/.claude/commands/sparc/sparc-modes.md +1 -1
  20. package/.claude/proven-config.json +1 -1
  21. package/.claude/skills/github-code-review/SKILL.md +3 -3
  22. package/.claude/skills/github-multi-repo/SKILL.md +6 -9
  23. package/.claude/skills/github-project-management/SKILL.md +7 -7
  24. package/.claude/skills/github-release-management/SKILL.md +12 -14
  25. package/.claude/skills/github-workflow-automation/SKILL.md +7 -7
  26. package/.claude/skills/hooks-automation/SKILL.md +121 -151
  27. package/.claude/skills/sparc-methodology/SKILL.md +11 -11
  28. package/.claude/skills/swarm-advanced/SKILL.md +5 -5
  29. package/.claude-plugin/marketplace.json +3 -3
  30. package/README.md +1 -1
  31. package/package.json +1 -1
  32. package/v3/@claude-flow/cli/README.md +179 -63
  33. package/v3/@claude-flow/cli/catalog-manifest.json +5 -5
  34. package/v3/@claude-flow/cli/dist/src/commands/hooks.js +7 -0
  35. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js +19 -5
  36. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.js +5 -1
  37. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js +10 -12
  38. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +11 -2
  39. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js +13 -23
  40. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.js +25 -8
  41. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js +11 -4
  42. package/v3/@claude-flow/cli/package.json +2 -1
@@ -455,7 +455,7 @@ mcp__claude-flow__swarm_init {
455
455
 
456
456
  // Spawn specialized agents
457
457
  mcp__claude-flow__agent_spawn {
458
- type: "<agent-type>",
458
+ agentType: "<agent-type>",
459
459
  capabilities: ["<capability1>", "<capability2>"]
460
460
  }
461
461
 
@@ -522,15 +522,15 @@ mcp__claude-flow__swarm_init {
522
522
 
523
523
  // Spawn coordinator
524
524
  mcp__claude-flow__agent_spawn {
525
- type: "coordinator",
525
+ agentType: "coordinator",
526
526
  capabilities: ["planning", "delegation", "monitoring"]
527
527
  }
528
528
 
529
529
  // Spawn specialized workers
530
- mcp__claude-flow__agent_spawn { type: "architect" }
531
- mcp__claude-flow__agent_spawn { type: "coder" }
532
- mcp__claude-flow__agent_spawn { type: "tester" }
533
- mcp__claude-flow__agent_spawn { type: "reviewer" }
530
+ mcp__claude-flow__agent_spawn { agentType: "architect" }
531
+ mcp__claude-flow__agent_spawn { agentType: "coder" }
532
+ mcp__claude-flow__agent_spawn { agentType: "tester" }
533
+ mcp__claude-flow__agent_spawn { agentType: "reviewer" }
534
534
  ```
535
535
 
536
536
  ### Pattern 2: Mesh Coordination
@@ -703,14 +703,14 @@ mcp__claude-flow__memory_usage {
703
703
  ```javascript
704
704
  // ✅ CORRECT: All operations together
705
705
  [Single Message]:
706
- mcp__claude-flow__agent_spawn { type: "researcher" }
707
- mcp__claude-flow__agent_spawn { type: "coder" }
708
- mcp__claude-flow__agent_spawn { type: "tester" }
706
+ mcp__claude-flow__agent_spawn { agentType: "researcher" }
707
+ mcp__claude-flow__agent_spawn { agentType: "coder" }
708
+ mcp__claude-flow__agent_spawn { agentType: "tester" }
709
709
  TodoWrite { todos: [8-10 todos] }
710
710
 
711
711
  // ❌ WRONG: Multiple messages
712
- Message 1: mcp__claude-flow__agent_spawn { type: "researcher" }
713
- Message 2: mcp__claude-flow__agent_spawn { type: "coder" }
712
+ Message 1: mcp__claude-flow__agent_spawn { agentType: "researcher" }
713
+ Message 2: mcp__claude-flow__agent_spawn { agentType: "coder" }
714
714
  Message 3: TodoWrite { todos: [...] }
715
715
  ```
716
716
 
@@ -25,7 +25,7 @@ claude mcp add claude-flow npx claude-flow@alpha mcp start
25
25
  mcp__claude-flow__swarm_init({ topology: "mesh", maxAgents: 6 })
26
26
 
27
27
  // 2. Spawn specialized agents
28
- mcp__claude-flow__agent_spawn({ type: "researcher", name: "Agent 1" })
28
+ mcp__claude-flow__agent_spawn({ agentType: "researcher", name: "Agent 1" })
29
29
 
30
30
  // 3. Orchestrate tasks
31
31
  mcp__claude-flow__task_orchestrate({ task: "...", strategy: "parallel" })
@@ -108,7 +108,7 @@ const researchAgents = [
108
108
  // Spawn all agents
109
109
  researchAgents.forEach(agent => {
110
110
  mcp__claude-flow__agent_spawn({
111
- type: agent.type,
111
+ agentType: agent.type,
112
112
  name: agent.name,
113
113
  capabilities: agent.capabilities
114
114
  })
@@ -274,7 +274,7 @@ const devTeam = [
274
274
  // Spawn all team members
275
275
  devTeam.forEach(member => {
276
276
  mcp__claude-flow__agent_spawn({
277
- type: member.type,
277
+ agentType: member.type,
278
278
  name: member.name,
279
279
  capabilities: member.capabilities,
280
280
  swarmId: "dev-swarm"
@@ -444,7 +444,7 @@ const testingTeam = [
444
444
  // Spawn all testers
445
445
  testingTeam.forEach(tester => {
446
446
  mcp__claude-flow__agent_spawn({
447
- type: tester.type,
447
+ agentType: tester.type,
448
448
  name: tester.name,
449
449
  capabilities: tester.capabilities,
450
450
  swarmId: "testing-swarm"
@@ -634,7 +634,7 @@ const analysisTeam = [
634
634
  // Spawn all analysts
635
635
  analysisTeam.forEach(analyst => {
636
636
  mcp__claude-flow__agent_spawn({
637
- type: analyst.type,
637
+ agentType: analyst.type,
638
638
  name: analyst.name,
639
639
  capabilities: analyst.capabilities
640
640
  })
@@ -57,10 +57,10 @@
57
57
  "source": "git-subdir",
58
58
  "url": "https://github.com/proffesor-for-testing/agentic-qe.git",
59
59
  "path": "plugins/agentic-qe-fleet",
60
- "ref": "v3.15.15",
61
- "sha": "1d0cc76632e8663ca2dffeaf3e000ef7baf3d481"
60
+ "ref": "v3.15.16",
61
+ "sha": "4edfa469d8f957b45bc0ea25424eb831b134f129"
62
62
  },
63
- "description": "Agentic QE (external: maintained in proffesor-for-testing/agentic-qe, pinned to v3.15.15): a quality-engineering fleet with 11 QE agents, 9 skills, 9 commands, the agentic-qe MCP server pinned to the plugin version, and the aqe-mod guard that refuses destructive operations on AQE learning data"
63
+ "description": "Agentic QE (external: maintained in proffesor-for-testing/agentic-qe, pinned to v3.15.16): a quality-engineering fleet with 11 QE agents, 9 skills, 9 commands, the agentic-qe MCP server pinned to the plugin version, and the aqe-mod guard that refuses destructive operations on AQE learning data"
64
64
  },
65
65
  {
66
66
  "name": "ruflo-docs",
package/README.md CHANGED
@@ -244,7 +244,7 @@ This adds slash commands and agent definitions. `ruflo-core` (installed above) d
244
244
  | [**ruflo-browser**](plugins/ruflo-browser/README.md) | Automate browser testing with Playwright |
245
245
  | [**ruflo-jujutsu**](plugins/ruflo-jujutsu/README.md) | Analyze git diffs, score risk, suggest reviewers |
246
246
  | [**ruflo-docs**](plugins/ruflo-docs/README.md) | Generate and maintain documentation automatically |
247
- | [**agentic-qe-fleet**](https://github.com/proffesor-for-testing/agentic-qe/tree/v3.15.15/plugins/agentic-qe-fleet) | External, maintained by [Agentic QE](https://github.com/proffesor-for-testing/agentic-qe): 11 QE agents, test generation, coverage, chaos and TDD skills, the `agentic-qe` MCP server, and a guard for AQE learning data (`/plugin install agentic-qe-fleet@ruflo`). Install it from one marketplace only, `agentic-qe` or `ruflo`: enabled from both, its mod and commands load twice |
247
+ | [**agentic-qe-fleet**](https://github.com/proffesor-for-testing/agentic-qe/tree/v3.15.16/plugins/agentic-qe-fleet) | External, maintained by [Agentic QE](https://github.com/proffesor-for-testing/agentic-qe): 11 QE agents, test generation, coverage, chaos and TDD skills, the `agentic-qe` MCP server, and a guard for AQE learning data (`/plugin install agentic-qe-fleet@ruflo`). Install it from one marketplace only, `agentic-qe` or `ruflo`: enabled from both, its mod and commands load twice |
248
248
 
249
249
  #### Security & Compliance
250
250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.63.5",
3
+ "version": "3.63.7",
4
4
  "workspaces": [
5
5
  "v3/@claude-flow/codex",
6
6
  "v3/@claude-flow/mcp",
@@ -1,22 +1,92 @@
1
1
  <div align="center">
2
2
 
3
- [![Ruflo Banner](ruflo/assets/ruflo-small.jpeg)](https://cognitum.one/agentic-engineering)
3
+ <a href="https://cognitum.one/agentic-engineering"><img src="ruflo/assets/ruflo-neon-flicker.gif" alt="Ruflo animated neon sign" width="100%"></a>
4
+
5
+ **An agent meta-harness for Claude Code and Codex.**
4
6
 
5
7
  <!-- Try Ruflo — the 3 badges first-time visitors actually act on -->
6
8
  [![npm version (ruflo)](https://img.shields.io/npm/v/ruflo?label=npx%20ruflo&style=for-the-badge&logo=npm&color=cb3837)](https://www.npmjs.com/package/ruflo)
7
9
  [![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](https://opensource.org/licenses/MIT)
8
10
  [![Star on GitHub](https://img.shields.io/github/stars/ruvnet/claude-flow?style=for-the-badge&logo=github&color=gold)](https://github.com/ruvnet/claude-flow)
11
+ [![Follow @rUv on X](https://img.shields.io/badge/Follow-@rUv-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/rUv)
12
+
13
+ <p align="center">
14
+ <a href="docs/harness-origins.md"><img src="https://raw.githubusercontent.com/ruvnet/ruflo/e69e4b95aa08d65ea0f7715489bbf8e62a83a0d2/docs/assets/readme/badges/first-commit.svg" width="300" height="76" alt="Claude Flow lineage: first commit June 2, 2025 by rUv; inspect the evidence"></a>
15
+ <a href="data/npm-downloads.latest.json"><img src="https://raw.githubusercontent.com/ruvnet/ruflo/275aff65a198af758923669acff36f03d1f41623/docs/assets/readme/badges/downloads.svg" width="300" height="76" alt="Illustrative download counter starts at 98,000,000 and adds varied amounts each second in a 30 second loop. Verified dataset: 97,022,120 download events."></a>
16
+ <br>
17
+ <a href="https://github.com/ruvnet/claude-flow"><img src="https://raw.githubusercontent.com/ruvnet/ruflo/d1e80400bdefe01d3b13e70395f88fffab76bb18/docs/assets/readme/badges/claude.svg" width="300" height="76" alt="Claude Code plugin"></a>
18
+ <a href="https://www.npmjs.com/package/@claude-flow/codex"><img src="https://raw.githubusercontent.com/ruvnet/ruflo/d1e80400bdefe01d3b13e70395f88fffab76bb18/docs/assets/readme/badges/codex.svg" width="300" height="76" alt="Codex plugin"></a>
19
+ <a href="https://chatgpt.com/plugins/plugin_asdk_app_6ab674ff53c48191bb37040c343e31f3"><img src="docs/assets/readme/badges/chatgpt.svg" width="300" height="76" alt="ChatGPT plugin: RuFlo Federation"></a>
20
+ </p>
21
+
22
+ </div>
23
+
24
+ <a id="start-here"></a>
25
+
26
+ ## <img src="docs/assets/readme/icons/terminal.svg" width="32" height="32" alt=""> Get started with Ruflo
27
+
28
+ <img src="docs/assets/readme/icons/plugins.svg" width="28" height="28" alt=""> **Start in Claude Code** with core tools, the visual console and runtime mods. Requires Claude Code **2.1.287 or later**. Run inside Claude Code:
29
+
30
+ ```text
31
+ /plugin marketplace add ruvnet/ruflo
32
+ /plugin install ruflo-core@ruflo
33
+ /plugin install ruflo-console@ruflo
34
+ /plugin install ruflo-mods@ruflo
35
+ /reload-plugins
36
+ /ruflo
37
+ ```
38
+
39
+ **Core** provides foundation tools. **Console** opens the agent cockpit. **Mods** add routing and policy enforcement inside Claude Code. Mods run with your account's permissions; review their code before installing.
40
+
41
+ <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> **Using Codex or another MCP enabled tool?** Use NPX for Ruflo project setup and connect your client to the Ruflo MCP server. Run the setup wizard in your project terminal:
42
+
43
+ ```bash
44
+ npx ruflo@latest init wizard
45
+ ```
46
+
47
+ For clients that support local stdio MCP servers, configure **command** `npx` and **arguments** `["-y", "ruflo@latest", "mcp", "start"]`. The equivalent server command is:
48
+
49
+ ```bash
50
+ npx -y ruflo@latest mcp start
51
+ ```
52
+
53
+ MCP exposes Ruflo tools to your client. The console and mods above are Claude Code integrations; hook support depends on the client.
54
+
55
+ <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> **Prefer a plain terminal? Optional.** The console also runs on its own, with no Claude Code: `npx ruflo tui` (add `--plain` to print one frame for scripts). It shows Overview, Cost, Swarm, Events and Missions, plus an optional AI page. [Terminal UI guide](docs/USERGUIDE.md#terminal-ui-optional)
56
+
57
+ <p align="center"><img src="docs/assets/ruflo-tui-compact.svg" width="640" alt="Looping recording of the optional ruflo terminal UI with its pictures: Overview in the Classic BBS look, the Orbital look with its moving globe, and the Swarm graph, in a sample project"></p>
58
+
59
+ [Compare install paths](#quick-start) · [Open the console](#console-walkthrough) · [User guide](docs/USERGUIDE.md)
60
+
61
+ <div align="center">
62
+
63
+
64
+ ### Optional: ruOS Desktop
65
+
66
+ <a href="https://ruos.cognitum.one"><img src="ruflo/assets/ruos-animated.svg" alt="ruOS — A desktop that runs itself" width="100%"></a>
67
+
68
+ **Connect ruOS to ChatGPT or Claude via MCP:**
69
+
70
+ ```text
71
+ https://ruos.cognitum.one/mcp
72
+ ```
73
+
74
+
75
+
76
+ <!-- RuVector promo -->
77
+ <a href="https://github.com/ruvnet/ruvector"><img src="docs/assets/readme/ruvector-promo-depth.svg" width="100%" alt="RuVector: Give your agents memory. Local vector search, persistent context, graph relationships and feedback learning. Explore RuVector."></a>
78
+
79
+ ```bash
80
+ npx ruvector
81
+ ```
82
+
83
+
9
84
 
10
- <!-- Ecosystem strip (collapsed visually with flat-square) -->
11
- [![🕸️ RuVector Agentic DB](https://img.shields.io/badge/RuVector_Agentic-DB-06b6d4?style=flat-square&logoColor=white&logo=graphql)](https://github.com/ruvnet/ruvector)
12
- [![Ecosystem downloads](https://img.shields.io/badge/ecosystem%20downloads-8.1M%2B-blue?style=flat-square&logo=npm)](https://github.com/ruvnet/ruflo/blob/main/data/clone-data.proof.json)
13
- [![Git clones (14d)](https://img.shields.io/badge/git%20clones%2014d-106k-blueviolet?style=flat-square&logo=github)](https://github.com/ruvnet/ruflo/blob/main/data/clone-data.ledger.json)
14
- [![Claude Code](https://img.shields.io/badge/Claude%20Code-Plugin-D97757?style=flat-square&logoColor=white&logo=anthropic)](https://github.com/ruvnet/claude-flow)
15
- [![Codex Plugin](https://img.shields.io/badge/Codex-Plugin-412991?style=flat-square&logoColor=white&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI%2BPHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0yMi4yODIgOS44MjFhNS45ODUgNS45ODUgMCAwIDAtLjUxNi00LjkxIDYuMDQ2IDYuMDQ2IDAgMCAwLTYuNTEtMi45QTYuMDY1IDYuMDY1IDAgMCAwIDQuOTgxIDQuMThhNS45ODUgNS45ODUgMCAwIDAtMy45OTggMi45IDYuMDQ2IDYuMDQ2IDAgMCAwIC43NDMgNy4wOTcgNS45OCA1Ljk4IDAgMCAwIC41MSA0LjkxMSA2LjA1MSA2LjA1MSAwIDAgMCA2LjUxNSAyLjlBNS45ODUgNS45ODUgMCAwIDAgMTMuMjYgMjRhNi4wNTYgNi4wNTYgMCAwIDAgNS43NzItNC4yMDYgNS45OSA1Ljk5IDAgMCAwIDMuOTk4LTIuOSA2LjA1NiA2LjA1NiAwIDAgMC0uNzQ3LTcuMDczek0xMy4yNiAyMi40M2E0LjQ3NiA0LjQ3NiAwIDAgMS0yLjg3Ni0xLjA0bC4xNDItLjA4IDQuNzc4LTIuNzU4YS43OTUuNzk1IDAgMCAwIC4zOTMtLjY4MXYtNi43MzdsMi4wMiAxLjE2OGEuMDcxLjA3MSAwIDAgMSAuMDM4LjA1MnY1LjU4M2E0LjUwNCA0LjUwNCAwIDAgMS00LjQ5NSA0LjQ5NHpNMy42IDE4LjMwNGE0LjQ3IDQuNDcgMCAwIDEtLjUzNS0zLjAxNGwuMTQyLjA4NSA0Ljc4MyAyLjc1OWEuNzcxLjc3MSAwIDAgMCAuNzgxIDBsNS44NDMtMy4zNjl2Mi4zMzJhLjA4LjA4IDAgMCAxLS4wMzMuMDYyTDkuNzQgMTkuOTVhNC41IDQuNSAwIDAgMS02LjE0LTEuNjQ2ek0yLjM0IDcuODk2YTQuNDg1IDQuNDg1IDAgMCAxIDIuMzY2LTEuOTczVjExLjZhLjc2Ni43NjYgMCAwIDAgLjM4OC42NzdsNS44MTUgMy4zNTQtMi4wMiAxLjE2OGEuMDc2LjA3NiAwIDAgMS0uMDcyIDBsLTQuODMtMi43ODZBNC41MDQgNC41MDQgMCAwIDEgMi4zNCA3Ljg3MnptMTYuNTk3IDMuODU1LTUuODMzLTMuMzg3IDIuMDE2LTEuMTY1YS4wNzYuMDc2IDAgMCAxIC4wNzEgMGw0LjgzIDIuNzkxYTQuNDk0IDQuNDk0IDAgMCAxLS42NzYgOC4xMDR2LTUuNjc3YS43OS43OSAwIDAgMC0uNDA3LS42Njd6bTIuMDEtMy4wMjMtLjE0MS0uMDg1LTQuNzc0LTIuNzgyYS43NzYuNzc2IDAgMCAwLS43ODUgMEw5LjQwOSA5LjIzVjYuODk3YS4wNjYuMDY2IDAgMCAxIC4wMjgtLjA2Mmw0LjgzLTIuNzg3YTQuNDk5IDQuNDk5IDAgMCAxIDYuNjggNC42NnpNOC4zMDcgMTIuODYzbC0yLjAyLTEuMTY0YS4wOC4wOCAwIDAgMS0uMDM4LS4wNTdWNi4wNzRhNC40OTkgNC40OTkgMCAwIDEgNy4zNzYtMy40NTRsLS4xNDIuMDgtNC43NzggMi43NThhLjc5NS43OTUgMCAwIDAtLjM5My42ODJ6bTEuMDk3LTIuMzY2IDIuNjAyLTEuNSAyLjYwNyAxLjV2Mi45OTlsLTIuNTk3IDEuNS0yLjYwNy0xLjVaIi8%2BPC9zdmc%2B)](https://www.npmjs.com/package/@claude-flow/codex)
16
85
 
17
86
  # Ruflo
18
87
 
19
- **An agent meta-harness for Claude Code and Codex.**
88
+ [English](README.md) · [简体中文](README.zh-CN.md)
89
+
20
90
 
21
91
  [![RuFlo Explained — build an AI team that plans, remembers, tests, and improves](docs/assets/ruflo-explained/ch14.jpg)](docs/ruflo-explained.md)
22
92
 
@@ -29,16 +99,29 @@ A 14-chapter guide: from the basic idea to a first useful task, then memory, age
29
99
 
30
100
  One `npx ruflo init` gives Claude Code a nervous system: agents self-organize into swarms, learn from every task, remember across sessions, and — with federation — securely talk to agents on other machines without leaking data. You keep writing code. Ruflo handles the coordination.
31
101
 
32
- ```
33
- Self-Learning / Self-Optimizing Agent Architecture
102
+ <p align="center"><img src="docs/assets/readme/learning-cinematic-compact.svg" width="100%" alt="Ruflo trajectory learning: branching memory paths, outcome feedback, contrastive AI and local learning. No LLM required for local vector retrieval and contrastive updates; agent execution may still use an LLM."></p>
34
103
 
35
- User --> Ruflo (CLI/MCP) --> Router --> Swarm --> Agents --> Memory --> LLM Providers
36
- ^ |
37
- +---- Learning Loop <-------+
38
- ```
104
+ <sub>Conceptual learning loop. Local vector retrieval and contrastive updates can run without an LLM; embeddings and configured learning modules are still required. See the <a href="v3/@claude-flow/cli/src/services/ruvector-training.ts">RuVector training integration</a> and <a href="v3/@claude-flow/neural/src/modes/balanced.ts">trajectory contrastive learning</a>.</sub>
105
+
106
+ <details>
107
+ <summary>Architecture in text</summary>
108
+
109
+ User → Ruflo (CLI/MCP) → Router → Swarm → Agents → Memory → LLM providers. Memory feeds useful experience back into routing. This is a conceptual flow, not a live execution trace.
110
+
111
+ </details>
39
112
 
40
113
  > **New to Ruflo?** You don't need to learn 314 MCP tools or 26 CLI commands. After `init`, just use Claude Code normally — the hooks system automatically routes tasks, learns from successful patterns, and coordinates agents in the background.
41
114
 
115
+ ### An origin you can inspect
116
+
117
+ [![Claude Flow to Ruflo: founding idea on June 2, 2025, orchestration source on June 10, and the continuing Ruflo lineage.](docs/assets/readme/harness-origins.svg)](docs/harness-origins.md)
118
+
119
+ **Built by [Reuven Cohen (rUv)](https://github.com/ruvnet), originally as Claude Flow.** The [first commit, June 2, 2025](https://github.com/ruvnet/ruflo/commit/7c1f9402d70e7af56c01a879073cbac92564dc4e), describes a code orchestration layer for recursive agent cycles: Claude writes, edits, tests and improves. The [June 10 source snapshot](https://github.com/ruvnet/ruflo/tree/dba545f012ea92a2375a26332bbf3797495e93c9) adds orchestration, task scheduling, memory and terminal modules.
120
+
121
+ A harness is the workbench around the model: it organizes tasks, carries context between steps and helps check results. **This establishes Ruflo's lineage, not a universal first across every Claude Code tool.** [See the illustrated explainer, exact commits and earlier ecosystem context](docs/harness-origins.md).
122
+
123
+ **Grok Build:** `npx ruflo init --grok` writes the project host surface (`.grok/`, the team bus, and the operator guide) and nothing outside the project; add `--dry-run` to preview. Setup, the `spawn_subagent` contract, the optional status row, and what to re-check when Grok updates: [the Grok operator guide](v3/@claude-flow/cli/templates/grok/docs/README.md).
124
+
42
125
  <details>
43
126
  <summary><strong>📖 Background — where the name comes from</strong></summary>
44
127
 
@@ -48,10 +131,52 @@ User --> Ruflo (CLI/MCP) --> Router --> Swarm --> Agents --> Memory --> LLM Prov
48
131
 
49
132
  ---
50
133
 
51
- ![Ruflo Plugins](./ruflo-plugins.gif)
134
+ <p align="center"><img src="docs/assets/readme/console.svg" alt="Mission control: inspect agent work" width="100%"></p>
135
+
136
+ <p align="center"><a href="https://raw.githubusercontent.com/ruvnet/ruflo/main/docs/assets/ruflo-console-theme-compact.svg"><img src="docs/assets/ruflo-console-theme-compact.svg" width="100%" alt="Ruflo Orbital theme: animated boot checks, block logo, menu icons, rotating globe, swarm routing, six color palettes and responsive Theme Studio"></a></p>
137
+
138
+ [Open animated demo](https://raw.githubusercontent.com/ruvnet/ruflo/main/docs/assets/ruflo-console-theme-compact.svg) · [Theme Studio guide](plugins/ruflo-console/README.md) · [Workflow demo](docs/assets/ruflo-console-workflows.svg)
139
+
140
+ <img src="docs/assets/readme/console-icon-workflows.svg" width="28" height="28" alt=""> **Your agent cockpit.** Track workflows, agents, models, tokens and cost beside Claude Code. The 38 second animation shows **Orbital and Theme Studio** through actual renderer frames, including boot checks, six palettes, customization, saved themes, JSON import and resizing. This compact 3.84 MB SVG retains all 456 frames. Native host and AI provider execution are not demonstrated.
141
+
142
+ <img src="docs/assets/readme/console-icon-inspect.svg" width="28" height="28" alt=""> **Inspect any run.** Open agent logs and results, search, triage failures, replay and compare. Start with `npx ruflo init`, restart Claude Code, then `/ruflo`. [Full console tour](docs/assets/ruflo-console-walkthrough-wide.gif).
143
+
144
+ <img src="docs/assets/readme/console-icon-control.svg" width="28" height="28" alt=""> **Let Claude drive. You set the limits.** Enable **Settings → Claude control** to navigate and run console actions. Choose `read`, `write`, `manage` or `full`, with `ask` or `auto` approval. The current default is **read + ask**; raising the level is your choice. Actions above your permission level are refused, and network, spending and destructive actions require confirmation even in `auto`. Review the live action log or press **Take back control** to stop Claude control. [Details](v3/docs/adr/ADR-444-claude-controls-the-console.md).
145
+
146
+ <a id="console-walkthrough"></a>
147
+
148
+ ### One task: create a mission with Claude
149
+
150
+ <img src="docs/assets/readme/console-icon-workflows.svg" width="28" height="28" alt=""> **Watch the recorded console session below.** Claude creates a mission, opens the Learning and Security pages, and reports its actions in Overview.
151
+
152
+ 1. **Set the boundary.** Install the console using the commands below, open `/ruflo`, then choose **Settings → Claude control → write + ask**.
153
+ 2. **Give a concrete request.** Try: “Create a mission to add a dark mode toggle. Show me the mission and its status.”
154
+ 3. **Approve creation.** Claude opens Missions and sets the goal. Confirm the pending create action in the console.
155
+ 4. **Verify the result.** Check that Missions contains the goal and Overview records the action. Creating a mission does not mean the feature has been implemented.
156
+ 5. **Keep control.** **Take back control** pauses Claude's console tools. A later call should be refused until you restore control.
157
+
158
+ **What the recording demonstrates:** a real Claude Haiku session with `write + auto`, mission creation, page navigation, a refused swarm stop, and control being taken back. The steps above use `ask` so you approve creation yourself. The linked workflow animation uses sample data, while the theme demo replays renderer frames. Neither is evidence of completed swarm work or memory recall.
159
+
160
+ [Implementation and recorded test findings](v3/docs/adr/ADR-444-claude-controls-the-console.md) · [Reproduction script](plugins/ruflo-console/scripts/e2e-control.sh)
161
+
162
+ <p align="center"><img src="docs/assets/ruflo-console-claude-control.gif" alt="Claude Code with the ruflo console beside it: Claude sets a mission goal, creates the mission and opens the Learning, Security and Overview pages through the console tools; the Claude control dashboard logs each action; swarm-stop is refused because it needs the full level; the person clicks Take back control and the next request is refused"></p>
163
+
164
+
165
+ **Install the mods from the ruflo marketplace** (Claude Code 2.1.287 or later; mods run with your account's permissions and are not sandboxed, so read the code first):
166
+
167
+ ```text
168
+ /plugin marketplace add ruvnet/ruflo
169
+ /plugin install ruflo-console@ruflo
170
+ /plugin install ruflo-mods@ruflo
171
+ /reload-plugins
172
+ ```
173
+
174
+ `ruflo-console` is the cockpit above, `ruflo-mods` routes prompts and enforces policy in-process, `ruflo-swarm` shows the swarm in a pane, and `ruflo-ruos` adds the ruOS status segment. Open `/plugin` to confirm they appear in the active mods line. Inside the console, `/ruflo market` is the Plugin Catalog: every ruflo plugin, mod and skill with what it ships, and buttons to install, enable, disable and update (each asks first).
52
175
 
53
176
  ## Quick Start
54
177
 
178
+ <p align="center"><img src="docs/assets/readme/quick-start.svg" alt="Start building with Ruflo" width="100%"></p>
179
+
55
180
  There are **two different install paths** with very different surface areas. Pick based on what you need (#1744):
56
181
 
57
182
  | | **Claude Code Plugin** | **CLI install (`npx ruflo init`)** |
@@ -119,6 +244,7 @@ This adds slash commands and agent definitions. `ruflo-core` (installed above) d
119
244
  | [**ruflo-browser**](plugins/ruflo-browser/README.md) | Automate browser testing with Playwright |
120
245
  | [**ruflo-jujutsu**](plugins/ruflo-jujutsu/README.md) | Analyze git diffs, score risk, suggest reviewers |
121
246
  | [**ruflo-docs**](plugins/ruflo-docs/README.md) | Generate and maintain documentation automatically |
247
+ | [**agentic-qe-fleet**](https://github.com/proffesor-for-testing/agentic-qe/tree/v3.15.16/plugins/agentic-qe-fleet) | External, maintained by [Agentic QE](https://github.com/proffesor-for-testing/agentic-qe): 11 QE agents, test generation, coverage, chaos and TDD skills, the `agentic-qe` MCP server, and a guard for AQE learning data (`/plugin install agentic-qe-fleet@ruflo`). Install it from one marketplace only, `agentic-qe` or `ruflo`: enabled from both, its mod and commands load twice |
122
248
 
123
249
  #### Security & Compliance
124
250
 
@@ -149,7 +275,7 @@ This adds slash commands and agent definitions. `ruflo-core` (installed above) d
149
275
 
150
276
  | Plugin | What it does |
151
277
  |--------|-------------|
152
- | [**ruflo-agent**](plugins/ruflo-agent/README.md) | Run agents — local WASM sandbox (rvagent) + Anthropic Claude Managed Agents (cloud) |
278
+ | [**ruflo-agent**](plugins/ruflo-agent/README.md) | Run agents — local WASM sandbox (rvagent) + Anthropic Claude Managed Agents (cloud), with opt-in bounded dynamic workflows, gated session controls and verified advisory learning |
153
279
  | [**ruflo-plugin-creator**](plugins/ruflo-plugin-creator/README.md) | Scaffold, validate, and publish your own plugins |
154
280
 
155
281
  #### Domain-Specific
@@ -162,7 +288,7 @@ This adds slash commands and agent definitions. `ruflo-core` (installed above) d
162
288
 
163
289
  </details>
164
290
 
165
- ### CLI Install
291
+ ### <img src="docs/assets/readme/icons/terminal.svg" width="28" height="28" alt=""> CLI Install
166
292
 
167
293
  **macOS / Linux / WSL / Git-Bash:**
168
294
 
@@ -186,68 +312,50 @@ npm install -g ruflo@latest
186
312
 
187
313
  > 💡 **Windows users:** the `curl ... | bash` form needs a POSIX shell (Git-Bash, WSL, MSYS). The `npx ruflo@latest init wizard` line works natively in PowerShell and cmd. If you hit an `'bash' is not recognized` error, use the `npx` line instead — both end up running the same init flow.
188
314
 
189
- ### MCP Server
315
+ ### <img src="docs/assets/readme/icons/network.svg" width="28" height="28" alt=""> MCP Server
190
316
 
191
317
  ```bash
192
318
  # Add Ruflo as an MCP server in Claude Code
193
319
  claude mcp add claude-flow -- npx ruflo@latest mcp start
194
320
  ```
195
321
 
196
- #### HTTP transport security
322
+ ---
197
323
 
198
- `ruflo mcp start -t http` exposes every registered tool over HTTP (`/rpc`, `/mcp`, `/ws`). The default `stdio` transport is not affected.
324
+ ## What You Get
199
325
 
200
- | Setting | Effect |
201
- |---|---|
202
- | `RUFLO_MCP_HTTP_TOKEN=<token>` | Require `Authorization: Bearer <token>` on every request. Failure is a bare `401`. The token is compared in constant time and is never logged. Prefer this over `--auth-token`, which is visible in `ps`. |
203
- | `--auth-token-file <path>` | Read the token from a file (one line). Takes precedence over the env var. |
204
- | `--auth-token <token>` | Same, on the command line (visible in argv; highest precedence). |
205
- | `RUFLO_MCP_ALLOW_UNAUTHENTICATED_HTTP=1` | Allow an unauthenticated bind to a non-loopback `--host`. Only for a trusted network boundary or an authenticating reverse proxy. |
326
+ <p align="center"><img src="docs/assets/readme/capabilities.svg" alt="Your agent toolkit" width="100%"></p>
206
327
 
207
- A token must be 16-512 printable ASCII characters (no spaces). `GET /health` stays public and returns only `{"status":"ok"}` when a token is set. Tokens are supported for `-t http` only; `-t websocket` rejects one.
328
+ <table>
329
+ <tr><td width="50%"><a href="plugins/ruflo-swarm/README.md"><img src="docs/assets/readme/card-swarm.svg" width="100%" alt="Agent teams"></a></td><td width="50%"><a href="plugins/ruflo-rag-memory/README.md"><img src="docs/assets/readme/card-memory.svg" width="100%" alt="Persistent memory"></a></td></tr>
330
+ <tr><td width="50%"><a href="plugins/ruflo-intelligence/README.md"><img src="docs/assets/readme/card-learning.svg" width="100%" alt="Learning loops"></a></td><td width="50%"><a href="plugins/ruflo-security-audit/README.md"><img src="docs/assets/readme/card-security.svg" width="100%" alt="Security controls"></a></td></tr>
331
+ <tr><td width="50%"><a href="https://ruvnet.github.io/ruflo"><img src="docs/assets/readme/card-plugins.svg" width="100%" alt="Plugin marketplace"></a></td><td width="50%"><a href="plugins/ruflo-ruvllm/README.md"><img src="docs/assets/readme/card-routing.svg" width="100%" alt="Models and routing"></a></td></tr>
332
+ </table>
208
333
 
209
- | `--host` | no token | token set |
210
- |---|---|---|
211
- | `localhost`, `127.0.0.1`, `::1` | starts, **unauthenticated** | starts, token required |
212
- | anything else (`0.0.0.0`, `::`, a LAN IP, `127.0.0.2`, `[::1]`, `LOCALHOST`) | **refuses to start** unless `RUFLO_MCP_ALLOW_UNAUTHENTICATED_HTTP=1` | starts, token required |
334
+ | Capability | Description |
335
+ |------------|-------------|
336
+ | <img src="docs/assets/readme/icons/agents.svg" width="28" height="28" alt=""> **100+ Agents** | Specialized agents for coding, testing, security, docs, architecture |
337
+ | <img src="docs/assets/readme/icons/network.svg" width="28" height="28" alt=""> **Comms Layer** | Zero-trust federation — agents across machines/orgs discover, authenticate, and exchange work securely |
338
+ | <img src="docs/assets/readme/icons/swarm.svg" width="28" height="28" alt=""> **Swarm Coordination** | Hierarchical, mesh, and adaptive topologies with consensus |
339
+ | <img src="docs/assets/readme/icons/learning.svg" width="28" height="28" alt=""> **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
340
+ | <img src="docs/assets/readme/icons/memory.svg" width="28" height="28" alt=""> **Vector Memory** | HNSW-indexed AgentDB — measured ~1.9x faster at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99); ANN wins above the crossover, ties/loses at small N. See [audit](docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](scripts/benchmark-intelligence.mjs) |
341
+ | <img src="docs/assets/readme/icons/workers.svg" width="28" height="28" alt=""> **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
342
+ | <img src="docs/assets/readme/icons/plugins.svg" width="28" height="28" alt=""> **Plugin Marketplace** | 33 native Claude Code plugins + 21 npm plugins |
343
+ | <img src="docs/assets/readme/icons/routing.svg" width="28" height="28" alt=""> **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
344
+ | <img src="docs/assets/readme/icons/security.svg" width="28" height="28" alt=""> **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
345
+ | <img src="docs/assets/readme/icons/federation.svg" width="28" height="28" alt=""> **Agent Federation** | Cross-installation agent collaboration with zero-trust security |
346
+ | <img src="docs/assets/readme/icons/audit.svg" width="28" height="28" alt=""> **[MetaHarness](docs/metaharness-user-guide.md)** | Audit your AI agent setup before you ship. Grade readiness (1-100), scan tool configs for security issues, snapshot the whole project to catch regressions over time, and find templates that match your repo. `ruflo eject` turns a ruflo project into a standalone agent toolkit with its own name. [Full guide](docs/metaharness-user-guide.md). |
213
347
 
214
- Without a token, a loopback server is still unauthenticated: any process on the machine, and any web page that can reach it via DNS rebinding, can call tools. Set `RUFLO_MCP_HTTP_TOKEN` whenever the HTTP transport is used.
348
+ ### <img src="docs/assets/readme/icons/learning.svg" width="28" height="28" alt=""> Learning from experience
215
349
 
216
- **Upgrading:** binding off loopback (for example `--host 0.0.0.0` in Docker) now needs a token or the opt-out above; otherwise the server exits with an error.
350
+ <p align="center"><img src="docs/assets/readme/learning-flow.svg" width="100%" alt="Recall, execute, evaluate, store, adapt and reuse: an illustrative agent learning cycle."></p>
217
351
 
218
- ---
219
-
220
- ## What You Get
221
-
222
- | Capability | Description |
223
- |------------|-------------|
224
- | 🤖 **100+ Agents** | Specialized agents for coding, testing, security, docs, architecture |
225
- | 📡 **Comms Layer** | Zero-trust federation — agents across machines/orgs discover, authenticate, and exchange work securely |
226
- | 🐝 **Swarm Coordination** | Hierarchical, mesh, and adaptive topologies with consensus |
227
- | 🧠 **Self-Learning** | SONA neural patterns, ReasoningBank, trajectory learning |
228
- | 💾 **Vector Memory** | HNSW-indexed AgentDB — measured ~1.9x faster at N=20k, ~3.2x–4.7x at N=5k vs brute force (recall@10 ~0.99); ANN wins above the crossover, ties/loses at small N. See [audit](docs/reviews/intelligence-system-audit-2026-05-29.md) + [`scripts/benchmark-intelligence.mjs`](scripts/benchmark-intelligence.mjs) |
229
- | ⚡ **Background Workers** | 12 auto-triggered workers (audit, optimize, testgaps, etc.) |
230
- | 🧩 **Plugin Marketplace** | 33 native Claude Code plugins + 21 npm plugins |
231
- | 🔌 **Multi-Provider** | Claude, GPT, Gemini, Cohere, Ollama with smart routing |
232
- | 🛡️ **Security** | AIDefence, input validation, CVE remediation, path traversal prevention |
233
- | 🌐 **Agent Federation** | Cross-installation agent collaboration with zero-trust security |
234
- | 🔬 **[MetaHarness](docs/metaharness-user-guide.md)** | Audit your AI agent setup before you ship. Grade readiness (1-100), scan tool configs for security issues, snapshot the whole project to catch regressions over time, and find templates that match your repo. `ruflo eject` turns a ruflo project into a standalone agent toolkit with its own name. [Full guide](docs/metaharness-user-guide.md). |
352
+ Useful trajectories and task feedback can inform future work. Results depend on the configured memory, learning components and quality of feedback. [Learning plugin](plugins/ruflo-intelligence/README.md).
235
353
 
236
354
  ### Agent Federation — Slack for Agents
237
355
 
238
- ```
239
- Your Agent --> [ Remove secrets ] --> [ Sign message ] --> [ Encrypted channel ]
240
- Emails, SSNs, Proves it came No one reads it
241
- keys stripped from you in transit
242
- |
243
- v
244
- Their Agent <-- [ Block attacks ] <-- [ Check identity ] <------+
245
- Stops prompt Rejects forgeries
246
- injection
247
-
248
- Audit trail on both sides.
249
- Trust builds over time. Bad behavior = instant downgrade.
250
- ```
356
+ <p align="center"><img src="docs/assets/readme/federation.svg" alt="Connected intelligence across machines" width="100%"></p>
357
+
358
+ <p align="center"><img src="docs/assets/readme/federation-flow.svg" width="100%" alt="Outbound agent, data filtering, signing and encryption, identity verification, input checks and receiving agent."></p>
251
359
 
252
360
  Slack gave teams channels. Federation gives agents the same thing — **shared workspaces across trust boundaries**, where agents on different machines, orgs, or cloud regions can discover each other, prove who they are, and collaborate on tasks.
253
361
 
@@ -349,6 +457,8 @@ User --> Claude Code / CLI
349
457
 
350
458
  ## Documentation
351
459
 
460
+ <p align="center"><img src="docs/assets/readme/documentation.svg" alt="Guides, architecture and verification" width="100%"></p>
461
+
352
462
  Four docs for four audiences:
353
463
 
354
464
  | Doc | When to read it |
@@ -379,6 +489,8 @@ User Guide section index:
379
489
 
380
490
  ## Support
381
491
 
492
+ <p align="center"><img src="docs/assets/readme/support.svg" alt="Build with the Ruflo community" width="100%"></p>
493
+
382
494
  | Resource | Link |
383
495
  |----------|------|
384
496
  | Documentation | [User Guide](docs/USERGUIDE.md) |
@@ -387,6 +499,10 @@ User Guide section index:
387
499
  | Community | [Agentics Foundation Discord](https://discord.com/invite/dfxmpwkG2D) |
388
500
  | Powered by | [Cognitum.one](https://cognitum.one) |
389
501
 
502
+ <p align="center"><img src="docs/assets/readme/signal-divider.svg" alt="Ruflo" width="100%"></p>
503
+
390
504
  ## License
391
505
 
392
506
  MIT - [RuvNet](https://github.com/ruvnet)
507
+
508
+ <a href="https://cognitum.one"><img src="docs/assets/readme/cognitum-banner-v2.svg" width="100%" alt="Cognitum One: Ambient Intelligence at the edge of the Physical World. Explore cognitum.one."></a>
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generation": 6,
4
- "generatedAt": "2026-09-17T21:28:47.530Z",
5
- "gitSha": "702d1461",
3
+ "generation": 7,
4
+ "generatedAt": "2026-10-28T15:08:17.042Z",
5
+ "gitSha": "8935d9a8",
6
6
  "catalog": {
7
- "agents": 167,
8
- "tools": 418,
7
+ "agents": 177,
8
+ "tools": 444,
9
9
  "skills": 34
10
10
  },
11
11
  "benchmark": null
@@ -967,6 +967,13 @@ const buildAgentsCommand = {
967
967
  format: configFormat,
968
968
  includePretrained: true,
969
969
  });
970
+ // #4558: the tool now rejects an invalid outputDir with { success: false, error }.
971
+ const failed = result;
972
+ if (failed.success === false) {
973
+ spinner.fail('Agent config generation failed');
974
+ output.printError(`Build agents error: ${failed.error}`);
975
+ return { success: false, exitCode: 1 };
976
+ }
970
977
  spinner.succeed(`Generated ${result.agents.length} agent configs`);
971
978
  if (ctx.flags.format === 'json') {
972
979
  output.printJson(result);
@@ -214,7 +214,7 @@ export const agentTools = [
214
214
  inputSchema: {
215
215
  type: 'object',
216
216
  properties: {
217
- agentType: { type: 'string', description: 'Type of agent to spawn' },
217
+ agentType: { type: 'string', description: 'Type of agent to spawn (a legacy `type` key is accepted as an alias)' },
218
218
  agentId: { type: 'string', description: 'Optional custom agent ID' },
219
219
  name: { type: 'string', description: 'Optional display name for the agent (shown by agent_list, agent_status and ruflo-console)' },
220
220
  // #2085 — accept swarmId so spawned agents register in the
@@ -234,7 +234,19 @@ export const agentTools = [
234
234
  },
235
235
  required: ['agentType'],
236
236
  },
237
- handler: async (input) => {
237
+ handler: async (rawInput) => {
238
+ // #4542: agent and command docs that `init` installed before 3.63.7 call
239
+ // agent_spawn with `type`. Accept it as an alias for `agentType`, and
240
+ // name the missing key ourselves: validateAgentSpawn maps agentType onto
241
+ // the security schema's `type` field and would report "type: Required".
242
+ let input = rawInput;
243
+ if (input.agentType === undefined && typeof input.type === 'string') {
244
+ const { type, ...rest } = input;
245
+ input = { ...rest, agentType: type };
246
+ }
247
+ if (typeof input.agentType !== 'string' || input.agentType === '') {
248
+ return { success: false, error: 'Input validation failed: agentType is required and must be a non-empty string (for example agentType: "coder")' };
249
+ }
238
250
  // Validate user-provided input (#1425: wire security validators to runtime)
239
251
  const validation = await validateAgentSpawn(input);
240
252
  if (!validation.valid) {
@@ -606,7 +618,7 @@ export const agentTools = [
606
618
  type: 'object',
607
619
  properties: {
608
620
  action: { type: 'string', enum: ['status', 'scale', 'drain', 'fill'], description: 'Pool action' },
609
- targetSize: { type: 'number', description: 'Target pool size (for scale action)' },
621
+ targetSize: { type: 'number', description: 'Target pool size (scale: grow or shrink to it; fill: grow to it, never shrink)' },
610
622
  agentType: { type: 'string', description: 'Agent type filter' },
611
623
  },
612
624
  required: ['action'],
@@ -653,7 +665,9 @@ export const agentTools = [
653
665
  avgHealth: agents.length > 0 ? agents.reduce((sum, a) => sum + a.health, 0) / agents.length : 0,
654
666
  };
655
667
  }
656
- if (action === 'scale') {
668
+ // #4555: fill was advertised in the enum but had no branch. It is scale
669
+ // without the shrink step: grow agentType's pool to targetSize, never terminate.
670
+ if (action === 'scale' || action === 'fill') {
657
671
  const targetSize = input.targetSize === undefined ? 5 : input.targetSize;
658
672
  if (typeof targetSize !== 'number' || !Number.isSafeInteger(targetSize) || targetSize < 0) {
659
673
  return { action, error: 'targetSize must be a non-negative safe integer' };
@@ -678,7 +692,7 @@ export const agentTools = [
678
692
  added.push(agentId);
679
693
  }
680
694
  }
681
- else if (delta < 0) {
695
+ else if (delta < 0 && action === 'scale') {
682
696
  const toRemove = agents.filter(a => a.agentType === agentType && a.status === 'idle').slice(0, -delta);
683
697
  for (const agent of toRemove) {
684
698
  store.agents[agent.agentId].status = 'terminated';
@@ -812,14 +812,18 @@ export const claimsTools = [
812
812
  const overloaded = loads.filter(l => l.claims.length > maxClaims * targetUtilization * 1.5);
813
813
  const underloaded = loads.filter(l => l.claims.length < maxClaims * targetUtilization * 0.5);
814
814
  const suggestions = [];
815
+ // Claim counts including moves suggested so far, so one target is not
816
+ // handed more claims than maxClaims allows.
817
+ const plannedCount = new Map(loads.map(l => [l.agentId, l.claims.length]));
815
818
  for (const over of overloaded) {
816
819
  // Find low-progress claims to redistribute
817
820
  const movable = over.claims
818
821
  .filter(c => c.progress < 25 && c.status === 'active')
819
822
  .slice(0, over.claims.length - Math.ceil(maxClaims * targetUtilization));
820
823
  for (const claim of movable) {
821
- const target = underloaded.find(u => u.agentType === over.agentType && u.claims.length < maxClaims);
824
+ const target = underloaded.find(u => u.agentType === over.agentType && plannedCount.get(u.agentId) < maxClaims);
822
825
  if (target) {
826
+ plannedCount.set(target.agentId, plannedCount.get(target.agentId) + 1);
823
827
  suggestions.push({
824
828
  issueId: claim.issueId,
825
829
  from: `agent:${over.agentId}:${over.agentType}`,