claude-flow 3.7.0-alpha.68 → 3.7.0-alpha.69

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.
@@ -2,7 +2,7 @@
2
2
  name: code-review-swarm
3
3
  description: |
4
4
  Deploy specialized AI agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis
5
- tools: mcp__claude-flow__swarm_init, mcp__claude-flow__agent_spawn, mcp__claude-flow__task_orchestrate, Bash, Read, Write, TodoWrite
5
+ tools: mcp__claude-flow__swarm_init, mcp__claude-flow__agent_spawn, mcp__claude-flow__task_orchestrate, mcp__claude-flow__memory_search, mcp__claude-flow__memory_store, mcp__claude-flow__memory_retrieve, mcp__claude-flow__hooks_pre-task, mcp__claude-flow__hooks_post-task, mcp__claude-flow__hooks_route, Bash, Read, Write, TodoWrite
6
6
  ---
7
7
 
8
8
  # Code Review Swarm - Automated Code Review with AI Agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.7.0-alpha.68",
3
+ "version": "3.7.0-alpha.69",
4
4
  "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,49 +19,74 @@ function behavioralRules() {
19
19
  - Validate input at system boundaries`;
20
20
  }
21
21
  function agentComms() {
22
- return `## Agent Comms (SendMessage-First Coordination)
22
+ return `## Agent Comms — Reality-Based Coordination
23
23
 
24
- Named agents coordinate via \`SendMessage\`, not polling or shared state.
24
+ **Tool-availability asymmetry:** \`SendMessage\` works **lead↔subagent** and lead↔lead, but **NOT subagent↔subagent**. Subagents spawned via the \`Agent\` tool are stateless one-shot workers — they have no inbox, cannot wait for events, and \`SendMessage\`/\`TaskUpdate\` are typically not in their tool allowlists. The \`hive-mind_*\` MCP tools provide coordination **metadata** (registry, consensus state) but do NOT grant subagents communication channels. Patterns that assume peer messaging will silently fail — agents either abort cleanly or run open-loop with stale assumptions. (See ruvnet/ruflo#2028 for the diagnosis.)
25
+
26
+ ### Canonical pattern: memory-as-bus, lead-orchestrated phases
25
27
 
26
28
  \`\`\`
27
- Lead (you) ←→ architect ←→ developer ←→ tester ←→ reviewer
28
- (named agents message each other directly)
29
+ Lead (the orchestrator)
30
+
31
+ ├─ spawns agent → agent reads inputs from memory keys → writes outputs to memory keys → completes
32
+
33
+ ├─ verifies outputs in memory
34
+
35
+ └─ spawns next agent with explicit input-key list in its brief
29
36
  \`\`\`
30
37
 
31
- ### Spawning a Coordinated Team
38
+ All inter-agent state lives in a shared memory namespace (\`memory_store\` / \`memory_search\`). Lead-to-subagent \`SendMessage\` is fine when needed; subagent-to-subagent \`SendMessage\` is not.
39
+
40
+ ### Spawning rules
41
+
42
+ - **Parallelize ONLY when work is genuinely independent** (no upstream dependency between siblings).
43
+ - **Spawn dependent agents only after the lead confirms upstream outputs are in memory.** Do NOT tell a downstream agent to "WAIT for SendMessage from X" — it has no mechanism to wait; it will abort.
44
+ - **Every subagent brief MUST include a degraded-mode paragraph** at the top: *"If your expected coordination tools (SendMessage, TaskUpdate, hive-mind_*) are missing, do NOT abort. Read these specific source files directly, write outputs to these specific memory keys, and complete your phase."*
45
+ - **Name agents** — \`name: "role"\` makes them addressable by the lead even though they cannot address each other.
46
+ - **After spawning**: STOP, tell user what's running, wait for completion notifications. No polling.
47
+
48
+ ### Spawning example (memory-as-bus)
32
49
 
33
50
  \`\`\`javascript
34
- // ALL agents in ONE message, each knows WHO to message next
35
- Agent({ prompt: "Research the codebase. SendMessage findings to 'architect'.",
36
- subagent_type: "researcher", name: "researcher", run_in_background: true })
37
- Agent({ prompt: "Wait for 'researcher'. Design solution. SendMessage to 'coder'.",
38
- subagent_type: "system-architect", name: "architect", run_in_background: true })
39
- Agent({ prompt: "Wait for 'architect'. Implement it. SendMessage to 'tester'.",
40
- subagent_type: "coder", name: "coder", run_in_background: true })
41
- Agent({ prompt: "Wait for 'coder'. Write tests. SendMessage results to 'reviewer'.",
42
- subagent_type: "tester", name: "tester", run_in_background: true })
43
- Agent({ prompt: "Wait for 'tester'. Review code quality and security.",
44
- subagent_type: "reviewer", name: "reviewer", run_in_background: true })
45
-
46
- // Kick off the pipeline
47
- SendMessage({ to: "researcher", summary: "Start", message: "[task context]" })
51
+ // Phase 1 independent parallel work
52
+ Agent({
53
+ prompt: "Read docs at <paths>. Write inventory JSON to memory key phase1/researcher/inventory in namespace <ns>. Degraded mode: if memory tools missing, return inventory in your final message.",
54
+ subagent_type: "researcher", name: "researcher", run_in_background: true
55
+ })
56
+ Agent({
57
+ prompt: "Walk the source tree. Write capability matrix to memory key phase1/coder/capability-matrix. Degraded mode: ...",
58
+ subagent_type: "coder", name: "source-reader", run_in_background: true
59
+ })
60
+
61
+ // AFTER both Phase 1 agents complete (lead verifies via memory_search), THEN spawn Phase 2.
62
+ // Each Phase 2 agent's brief explicitly lists the Phase 1 memory keys it should read.
48
63
  \`\`\`
49
64
 
50
65
  ### Patterns
51
66
 
52
67
  | Pattern | Flow | Use When |
53
68
  |---------|------|----------|
54
- | **Pipeline** | A → B → CD | Sequential dependencies (feature dev) |
55
- | **Fan-out** | Lead → A, B, C → Lead | Independent parallel work (research) |
56
- | **Supervisor** | Lead workers | Ongoing coordination (complex refactor) |
69
+ | **Sequential pipeline** | Lead → A → (verify in memory) → B → (verify)C | Phase dependencies (audit, complex refactor) |
70
+ | **Fan-out** | Lead → A, B, C (parallel) → Lead aggregates from memory | Independent parallel work (research, multi-lens critique) |
71
+ | **Lead-as-bus** | Subagents → Lead reroute by spawning next | Workaround when supervisor↔workers coordination needed |
72
+
73
+ ### Anti-patterns (will silently fail)
57
74
 
58
- ### Rules
75
+ - "WAIT for SendMessage from X" in a subagent prompt — no mechanism to wait
76
+ - "SendMessage findings to architect" in a subagent prompt — architect can't receive
77
+ - Spawning N dependent agents in one batch expecting them to chain via messages — they won't
78
+ - Relying on \`hive-mind_consensus\` to gather subagent votes — subagents aren't registered hive workers
59
79
 
60
- - ALWAYS name agents — \`name: "role"\` makes them addressable
61
- - ALWAYS include comms instructions in prompts — who to message, what to send
62
- - Spawn ALL agents in ONE message with \`run_in_background: true\`
63
- - After spawning: STOP, tell user what's running, wait for results
64
- - NEVER poll status — agents message back or complete automatically`;
80
+ ### Lead-only SendMessage (still works)
81
+
82
+ \`SendMessage\` is still useful for **lead subagent** redirects and priority changes:
83
+
84
+ \`\`\`javascript
85
+ // Lead → subagent: redirect or update priority mid-flight
86
+ SendMessage({ to: "developer", summary: "Prioritize auth", message: "Auth is blocking tester, do that first." })
87
+ // Lead → subagent: graceful shutdown
88
+ SendMessage({ to: "developer", message: { type: "shutdown_request" } })
89
+ \`\`\``;
65
90
  }
66
91
  function swarmConfig(options) {
67
92
  return `## Swarm & Routing
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.7.0-alpha.68",
3
+ "version": "3.7.0-alpha.69",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -1 +0,0 @@
1
- {"sessionId":"1fc1a1cc-9310-4991-8a7d-832dbca9ebad","pid":8051,"procStart":"Sun May 17 12:50:14 2026","acquiredAt":1779051467717}