claude-flow 3.6.28 → 3.6.29

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.
@@ -7,6 +7,17 @@ description: Implementation specialist for writing clean, efficient code
7
7
 
8
8
  You are a senior software engineer specialized in writing clean, maintainable, and efficient code following best practices and design patterns.
9
9
 
10
+ ## Authoritative project documents — read before implementing
11
+
12
+ Before writing code that affects architecture, scope, or behavior, read **both**:
13
+
14
+ 1. **`docs/SPEC.md`** (and any sibling files under `docs/`) — describes **what** the system should do. Functional requirements, scope, acceptance criteria.
15
+ 2. **`docs/adr/*.md`** (Architecture Decision Records) — describes **how** decisions have been made. Tech stack choices, framework selection, auth strategy, integration patterns. Treat these as **binding** unless explicitly superseded by a newer ADR with `status: Accepted`.
16
+
17
+ If both exist and conflict, the ADR wins on architectural decisions; SPEC wins on requirements scope. If an ADR contradicts your planned implementation, surface the conflict and propose either following the ADR or drafting a successor ADR — do not silently diverge.
18
+
19
+ When neither file exists (greenfield work), you can proceed without — but if a sibling Architect agent generated ADRs in this session, those ADRs are authoritative for your work even before they land in `docs/adr/`. In multi-agent parallel development, ADRs are the contract that prevents drift between agents working on different bounded contexts.
20
+
10
21
  ## Core Responsibilities
11
22
 
12
23
  1. **Code Implementation**: Write production-quality code that meets requirements
@@ -8,6 +8,18 @@ description: Transform specifications into working code with TDD practices
8
8
  ## Purpose
9
9
  This agent specializes in the implementation phases of SPARC methodology, focusing on transforming specifications and designs into high-quality, tested code.
10
10
 
11
+ ## Authoritative inputs
12
+
13
+ The Refinement and Completion phases consume work from earlier SPARC phases. Read **all** of the following before implementing:
14
+
15
+ 1. **`docs/SPEC.md`** — Specification phase output (what to build)
16
+ 2. **`docs/pseudocode/*.md`** if present — Pseudocode phase output (algorithm shape)
17
+ 3. **`docs/adr/*.md`** — Architecture Decision Records from the Architecture phase (tech stack, framework choices, auth strategy, deployment shape). **Treat ADRs as binding** unless explicitly superseded by a newer `status: Accepted` ADR.
18
+
19
+ ADRs describe **how** decisions were made; SPEC describes **what** the system does. In multi-agent parallel implementation, ADRs are the cross-agent contract — backend coders, frontend coders, and testers must all read the same ADRs or the bounded contexts will drift apart.
20
+
21
+ If your planned implementation contradicts an ADR, surface the conflict and propose either following the ADR or drafting a successor — do not silently diverge.
22
+
11
23
  ## Core Implementation Principles
12
24
 
13
25
  ### 1. Test-Driven Development (TDD)
package/README.md CHANGED
@@ -156,8 +156,11 @@ This adds slash commands and agent definitions only. The Ruflo MCP server is NOT
156
156
  # One-line install
157
157
  curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/ruflo@main/scripts/install.sh | bash
158
158
 
159
- # Or via npx
160
- npx ruflo@latest init --wizard
159
+ # Or via npx (interactive setup)
160
+ npx ruflo@latest init wizard
161
+
162
+ # Quick non-interactive init
163
+ # npx ruflo@latest init
161
164
 
162
165
  # Or install globally
163
166
  npm install -g ruflo@latest
@@ -166,8 +169,8 @@ npm install -g ruflo@latest
166
169
  ### MCP Server
167
170
 
168
171
  ```bash
169
- # Add Ruflo as an MCP server in Claude Code
170
- claude mcp add ruflo -- npx -y @claude-flow/cli@latest
172
+ # Add Ruflo as an MCP server in Claude Code (canonical form, matches USERGUIDE.md)
173
+ claude mcp add ruflo -- npx ruflo@latest mcp start
171
174
  ```
172
175
 
173
176
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.6.28",
3
+ "version": "3.6.29",
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",
@@ -156,8 +156,11 @@ This adds slash commands and agent definitions only. The Ruflo MCP server is NOT
156
156
  # One-line install
157
157
  curl -fsSL https://cdn.jsdelivr.net/gh/ruvnet/ruflo@main/scripts/install.sh | bash
158
158
 
159
- # Or via npx
160
- npx ruflo@latest init --wizard
159
+ # Or via npx (interactive setup)
160
+ npx ruflo@latest init wizard
161
+
162
+ # Quick non-interactive init
163
+ # npx ruflo@latest init
161
164
 
162
165
  # Or install globally
163
166
  npm install -g ruflo@latest
@@ -166,8 +169,8 @@ npm install -g ruflo@latest
166
169
  ### MCP Server
167
170
 
168
171
  ```bash
169
- # Add Ruflo as an MCP server in Claude Code
170
- claude mcp add ruflo -- npx -y @claude-flow/cli@latest
172
+ # Add Ruflo as an MCP server in Claude Code (canonical form, matches USERGUIDE.md)
173
+ claude mcp add ruflo -- npx ruflo@latest mcp start
171
174
  ```
172
175
 
173
176
  ---
@@ -10,6 +10,7 @@ import { select, confirm, input } from '../prompt.js';
10
10
  import { callMCPTool, MCPClientError } from '../mcp-client.js';
11
11
  import { spawn as childSpawn, execSync } from 'child_process';
12
12
  import { mkdir, writeFile } from 'fs/promises';
13
+ import { existsSync } from 'fs';
13
14
  import { join } from 'path';
14
15
  // Hive topologies
15
16
  const TOPOLOGIES = [
@@ -200,6 +201,40 @@ async function spawnClaudeCodeInstance(swarmId, swarmName, objective, workers, f
200
201
  if (claudeAvailable && !dryRun) {
201
202
  // Build arguments - flags first, then prompt
202
203
  const claudeArgs = [];
204
+ // #1748 Issue 2 — pass --mcp-config so the spawned worker actually has
205
+ // mcp__ruflo__* tools registered. Before this, the coordination prompt
206
+ // referenced tools the worker didn't know about and exited silently.
207
+ // Resolution order:
208
+ // 1. explicit --mcp-config <path> flag passed by the caller
209
+ // 2. ./.mcp.json in cwd (project-local Ruflo MCP config)
210
+ // 3. ~/.claude.json or ~/.claude/mcp.json (user-global)
211
+ // If none found, we still spawn but warn — that's the pre-fix behavior
212
+ // and the user's debug log will surface the missing tools.
213
+ const explicitMcpConfig = flags['mcp-config'];
214
+ let mcpConfigPath = explicitMcpConfig;
215
+ if (!mcpConfigPath) {
216
+ const candidates = [
217
+ join(process.cwd(), '.mcp.json'),
218
+ join(process.env.HOME || process.env.USERPROFILE || '', '.claude.json'),
219
+ join(process.env.HOME || process.env.USERPROFILE || '', '.claude', 'mcp.json'),
220
+ ];
221
+ for (const c of candidates) {
222
+ try {
223
+ if (c && existsSync(c)) {
224
+ mcpConfigPath = c;
225
+ break;
226
+ }
227
+ }
228
+ catch { /* continue */ }
229
+ }
230
+ }
231
+ if (mcpConfigPath) {
232
+ claudeArgs.push('--mcp-config', mcpConfigPath);
233
+ output.printInfo(`Spawned worker MCP config: ${mcpConfigPath}`);
234
+ }
235
+ else {
236
+ output.printWarning('No .mcp.json or ~/.claude.json found — spawned worker will not have mcp__ruflo__* tools (#1748 Issue 2). Pass --mcp-config <path> or run "ruflo init" to generate one.');
237
+ }
203
238
  // Check for non-interactive mode
204
239
  const isNonInteractive = flags['non-interactive'] || flags.nonInteractive;
205
240
  if (isNonInteractive) {
@@ -492,6 +527,11 @@ const spawnCommand = {
492
527
  description: 'Run Claude Code in non-interactive mode',
493
528
  type: 'boolean',
494
529
  default: false
530
+ },
531
+ {
532
+ name: 'mcp-config',
533
+ description: 'Path to .mcp.json for the spawned worker (auto-detects ./.mcp.json or ~/.claude.json if omitted) — fixes #1748 Issue 2',
534
+ type: 'string'
495
535
  }
496
536
  ],
497
537
  examples: [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.6.28",
3
+ "version": "3.6.29",
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",