v3/implementation/v3-migration/MIGRATION.md
Complete guide for upgrading from Claude Flow v2 to v3.0.0-alpha.1
Claude Flow v3 is a complete architectural overhaul based on 10 Architecture Decision Records (ADRs). The migration involves:
Medium: Breaking changes in API, configuration, and dependencies. Follow this guide carefully.
# Backup your v2 installation
cp -r ~/.claude-flow ~/.claude-flow.v2.backup
cp -r ./node_modules ./node_modules.v2.backup
cp package.json package.json.v2.backup
cp package-lock.json package-lock.json.v2.backup
# Export v2 memory (if using memory features)
npx agentic-flow memory export --output ./v2-memory-backup.json
# Save current configuration
cat ~/.claude-flow/config.json > v2-config-backup.json
# List installed agents
npx agentic-flow --list > v2-agents-list.txt
# Export environment variables
env | grep CLAUDE_FLOW > v2-env-backup.txt
# Check Node.js version (must be 20.x or higher)
node --version # Should be v20.x.x or higher
# Check npm version
npm --version # Should be 10.x.x or higher
# Check available disk space (need ~500MB for v3)
df -h
# Check platform compatibility
uname -a # Windows/macOS/Linux
# Check for conflicting dependencies
npm list agentic-flow
npm list agentdb
npm list @ruvector/attention
npm list @ruvector/sona
# Check for custom plugins or extensions
ls ~/.claude-flow/plugins/
- # v2: Deno support
- deno run --allow-all agentic-flow.ts
+ # v3: Node.js 20+ only
+ node --version # Must be v20.x.x+
Action Required: Migrate all Deno code to Node.js.
- # v2: Jest
- "test": "jest"
- "testMatch": ["**/*.test.js"]
+ # v3: Vitest (10x faster)
+ "test": "vitest"
+ "testMatch": ["**/*.test.ts"]
Action Required: Convert all Jest tests to Vitest format.
- # v2: Multiple memory backends
- npx agentic-flow memory --backend filesystem
- npx agentic-flow memory --backend redis
- npx agentic-flow memory --backend mongodb
+ # v3: Unified AgentDB
+ npx @claude-flow/memory unify --backend agentdb
Action Required: Migrate all memory data to AgentDB.
- # v2: 6+ different coordinators
- import { HierarchicalCoordinator } from './coordinators/hierarchical'
- import { MeshCoordinator } from './coordinators/mesh'
- import { AdaptiveCoordinator } from './coordinators/adaptive'
+ # v3: Single UnifiedSwarmCoordinator
+ import { SwarmCoordinator } from '@claude-flow/swarm'
Action Required: Update all coordinator imports and usage.
- # v2: Direct function calls
- const result = await agent.execute(task);
+ # v3: MCP protocol
+ const result = await mcp.call('agent_execute', { task });
- # v2: Direct state mutation
- agent.state.status = 'running';
- agent.save();
+ # v3: Event sourcing
+ await agent.emit('status_changed', {
+ from: 'idle',
+ to: 'running',
+ timestamp: Date.now()
+ });
- # v2: Monolithic imports
- import { Security, Memory, Swarm } from 'agentic-flow';
+ # v3: Module imports
+ import { SecurityModule } from '@claude-flow/security';
+ import { MemoryModule } from '@claude-flow/memory';
+ import { SwarmModule } from '@claude-flow/swarm';
- # v2: config.json
- {
- "memory": {
- "backend": "filesystem",
- "path": "./memory"
- }
- }
+ # v3: config.json
+ {
+ "memory": {
+ "backend": "hybrid",
+ "agentdb": {
+ "path": "./data/agentdb",
+ "hnsw": { "efConstruction": 200, "M": 16 }
+ },
+ "sqlite": {
+ "path": "./data/sqlite.db"
+ }
+ }
+ }
- # v2: Minimal security
- {
- "security": {
- "enabled": false
- }
- }
+ # v3: Security-first (strict by default)
+ {
+ "security": {
+ "strict": true,
+ "validation": { "maxInputSize": 10000 },
+ "paths": { "allowedDirectories": ["./src/", "./tests/"] },
+ "execution": { "shell": false, "timeout": 30000 }
+ }
+ }
# 1. Remove v2 (keep backups!)
npm uninstall agentic-flow
rm -rf node_modules
rm package-lock.json
# 2. Install v3 alpha
npm install [email protected]
# 3. Install required @claude-flow modules
npm install @claude-flow/security@latest
npm install @claude-flow/memory@latest
npm install @claude-flow/integration@latest
npm install @claude-flow/performance@latest
npm install @claude-flow/swarm@latest
npm install @claude-flow/cli@latest
# 4. Install peer dependencies
npm install [email protected]
npm install @ruvector/[email protected]
npm install @ruvector/[email protected]
# 5. Install dev dependencies
npm install --save-dev vitest@^2.1.8
npm install --save-dev @vitest/ui@^2.1.8
# 1. Initialize v3 configuration
npx [email protected] init --v3
# 2. Migrate v2 configuration (manual merge)
# Edit ~/.claude-flow/config.json with your v2 settings
# Follow new schema from v3/config/schema.json
# 3. Set environment variables
export CLAUDE_FLOW_VERSION=3
export CLAUDE_FLOW_MODE=production
export CLAUDE_FLOW_MEMORY_BACKEND=agentdb
# PowerShell
setx CLAUDE_FLOW_VERSION "3"
setx CLAUDE_FLOW_MODE "production"
setx CLAUDE_FLOW_MEMORY_BACKEND "agentdb"
# Update config path
$env:CLAUDE_FLOW_CONFIG = "$env:APPDATA\claude-flow\config.json"
# Bash/Zsh
export CLAUDE_FLOW_VERSION=3
export CLAUDE_FLOW_MODE=production
export CLAUDE_FLOW_MEMORY_BACKEND=agentdb
# Update config path
export CLAUDE_FLOW_CONFIG="$HOME/.claude-flow/config.json"
# Add to ~/.bashrc or ~/.zshrc for persistence
# 1. Export v2 memory
npx [email protected] memory export --output ./v2-memory.json
# 2. Initialize v3 memory backend
npx @claude-flow/memory init --backend agentdb
# 3. Import v2 memory into v3
npx @claude-flow/memory import ./v2-memory.json --format v2
# 4. Verify migration
npx @claude-flow/memory stats
# Should show: "Migrated X patterns from v2"
# 5. Optimize with HNSW indexing
npx @claude-flow/memory optimize --hnsw
// Before (v2)
import {
Agent,
Swarm,
Memory,
Security
} from 'agentic-flow';
// After (v3)
import { Agent } from 'agentic-flow';
import { SwarmCoordinator } from '@claude-flow/swarm';
import { MemoryModule } from '@claude-flow/memory';
import { SecurityModule } from '@claude-flow/security';
// Before (v2)
const agent = new Agent({
name: 'coder',
memory: new FileSystemMemory(),
coordinator: new HierarchicalCoordinator()
});
// After (v3)
const security = new SecurityModule({ strict: true });
const memory = new MemoryModule({ backend: 'agentdb' });
const swarm = new SwarmCoordinator({ topology: 'hierarchical-mesh' });
const agent = new Agent({
name: 'coder',
modules: { security, memory, swarm }
});
// Before (v2)
const swarm = new HierarchicalCoordinator({
agents: [agent1, agent2, agent3]
});
await swarm.execute(task);
// After (v3)
const swarm = new SwarmCoordinator({
topology: 'hierarchical-mesh',
agents: [agent1, agent2, agent3]
});
await swarm.coordinate(task);
// Before (v2)
await memory.store(key, value);
const result = await memory.retrieve(key);
// After (v3)
await memory.storePattern({
sessionId: 'session-1',
task: 'example',
input: 'data',
output: 'result',
reward: 0.95
});
const results = await memory.searchPatterns({
task: 'example',
k: 5,
minReward: 0.8
});
// Before (v2) - Jest
import { describe, it, expect } from '@jest/globals';
import { mock } from 'jest-mock';
describe('Agent Tests', () => {
it('should execute task', async () => {
const agent = new Agent();
const result = await agent.execute(task);
expect(result).toBeDefined();
});
});
// After (v3) - Vitest
import { describe, it, expect, vi } from 'vitest';
describe('Agent Tests', () => {
it('should execute task', async () => {
const agent = new Agent();
const result = await agent.execute(task);
expect(result).toBeDefined();
});
});
// Before (v2) - jest.config.js
module.exports = {
testEnvironment: 'node',
testMatch: ['**/*.test.js'],
collectCoverage: true
};
// After (v3) - vitest.config.ts
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node',
include: ['**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html']
}
}
});
{
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest --coverage",
"test:watch": "vitest --watch"
}
}
# 1. Run v3 security audit
npx @claude-flow/security audit --strict
# 2. Fix any CVEs automatically
npx @claude-flow/security fix --auto
# 3. Validate credentials
npx @claude-flow/security validate-credentials
# 4. Check path security
npx @claude-flow/security check-paths
# 5. Review security report
cat ~/.claude-flow/security-report.json
# 1. Run performance benchmarks
npx @claude-flow/performance benchmark
# 2. Compare with v2 baseline
npx @claude-flow/performance compare --baseline v2
# 3. Validate targets
# - Flash Attention: 2.49x-7.47x speedup
# - Vector Search: 150x-12,500x faster
# - Memory: 50-75% reduction
# - CLI Startup: <500ms
# 4. Profile memory usage
npx @claude-flow/performance profile --memory
# 5. Analyze bottlenecks
npx @claude-flow/performance analyze
# 1. Test agentic-flow integration
npx @claude-flow/integration test --agentic-flow-version alpha
# 2. Test all modules
npm run test:modules
# 3. Test cross-platform (if applicable)
npm run test:cross-platform
# 4. Test with real agents
npx agentic-flow --agent coder --task "Hello v3"
# 5. Test swarm coordination
npx @claude-flow/swarm test --agents 15
// No dedicated security module
// Security was ad-hoc
import { SecurityModule } from '@claude-flow/security';
const security = new SecurityModule({
strict: true,
validation: {
maxInputSize: 10000,
allowedChars: /^[a-zA-Z0-9._\-\s]+$/
},
paths: {
allowedDirectories: ['./src/', './tests/'],
blockedPatterns: ['../', '~/', '/etc/']
}
});
// Validate input
await security.validateInput(userInput);
// Sanitize output
const safe = await security.sanitizeOutput(output);
// Check credentials
await security.validateCredentials();
import { Memory } from 'agentic-flow';
const memory = new Memory({ backend: 'filesystem' });
await memory.store('key', value);
const result = await memory.retrieve('key');
import { MemoryModule } from '@claude-flow/memory';
const memory = new MemoryModule({
backend: 'hybrid', // SQLite + AgentDB
agentdb: {
path: './data/agentdb',
hnsw: { efConstruction: 200, M: 16 }
}
});
// Store with ReasoningBank pattern
await memory.storePattern({
sessionId: 'session-1',
task: 'code-implementation',
input: requirements,
output: code,
reward: 0.95,
success: true,
critique: 'Good test coverage'
});
// Search with vector similarity (150x faster)
const patterns = await memory.searchPatterns({
task: 'code-implementation',
k: 5,
minReward: 0.85
});
// GNN-enhanced retrieval (+12.4% accuracy)
const enhanced = await memory.gnnEnhancedSearch(embedding, {
k: 10,
graphContext: dependencyGraph
});
import {
HierarchicalCoordinator,
MeshCoordinator,
AdaptiveCoordinator
} from 'agentic-flow/coordinators';
// Multiple coordinator implementations
const coordinator = new HierarchicalCoordinator({
agents: [agent1, agent2]
});
import { SwarmCoordinator } from '@claude-flow/swarm';
// Single unified coordinator
const swarm = new SwarmCoordinator({
topology: 'hierarchical-mesh',
agents: [agent1, agent2, agent3],
consensus: 'attention', // or 'byzantine', 'raft'
selfHealing: true,
autoSpawn: true
});
// Coordinate with attention mechanisms
const result = await swarm.coordinate(task, {
attentionType: 'flash', // 2.49x-7.47x faster
consensusThreshold: 0.8
});
// Monitor swarm health
const status = await swarm.getStatus();
console.log(`Active: ${status.activeAgents}/${status.totalAgents}`);
// No dedicated performance module
// Manual benchmarking
import { PerformanceModule } from '@claude-flow/performance';
const perf = new PerformanceModule({
targets: {
flashAttention: '2.49x-7.47x',
vectorSearch: '150x-12500x',
memoryReduction: '50-75%'
}
});
// Run benchmarks
const results = await perf.benchmark({
tests: ['flash-attention', 'vector-search', 'memory-usage'],
iterations: 100
});
// Analyze bottlenecks
const analysis = await perf.analyzeBottlenecks();
console.log(`Slowest: ${analysis.bottlenecks[0].name}`);
// Profile memory
const profile = await perf.profileMemory();
console.log(`Peak usage: ${profile.peakMB}MB`);
{
"version": "2.0.1",
"memory": {
"backend": "filesystem",
"path": "./memory"
},
"agents": {
"default": "coder"
},
"swarm": {
"coordinator": "hierarchical",
"maxAgents": 10
}
}
{
"version": "3.0.0-alpha.1",
"modules": {
"security": {
"strict": true,
"validation": {
"maxInputSize": 10000,
"allowedChars": "^[a-zA-Z0-9._\\-\\s]+$"
},
"paths": {
"allowedDirectories": ["./src/", "./tests/"],
"blockedPatterns": ["../", "~/", "/etc/", "/tmp/"]
},
"execution": {
"shell": false,
"timeout": 30000,
"allowedCommands": ["npm", "npx", "node", "git"]
}
},
"memory": {
"backend": "hybrid",
"agentdb": {
"path": "./data/agentdb",
"hnsw": {
"efConstruction": 200,
"M": 16
},
"quantization": {
"enabled": true,
"bits": 8
}
},
"sqlite": {
"path": "./data/sqlite.db",
"maxSize": "1GB"
}
},
"swarm": {
"coordinator": "unified",
"topology": "hierarchical-mesh",
"maxAgents": 15,
"consensus": "attention",
"selfHealing": true,
"autoSpawn": true
},
"performance": {
"flashAttention": {
"enabled": true,
"runtime": "auto"
},
"sona": {
"enabled": true,
"adaptationTime": "0.05ms"
}
}
},
"platform": {
"node": "20.x",
"os": ["windows", "darwin", "linux"]
}
}
CLAUDE_FLOW_VERSION=2
CLAUDE_FLOW_MEMORY_PATH=./memory
CLAUDE_FLOW_COORDINATOR=hierarchical
# Core
CLAUDE_FLOW_VERSION=3
CLAUDE_FLOW_MODE=production
CLAUDE_FLOW_CONFIG=~/.claude-flow/config.json
# Memory
CLAUDE_FLOW_MEMORY_BACKEND=agentdb
CLAUDE_FLOW_MEMORY_PATH=./data
CLAUDE_FLOW_AGENTDB_HNSW=true
# Security
CLAUDE_FLOW_SECURITY_STRICT=true
CLAUDE_FLOW_SECURITY_MODE=strict
# Performance
CLAUDE_FLOW_FLASH_ATTENTION=true
CLAUDE_FLOW_SONA_LEARNING=true
# Platform-specific (Windows)
APPDATA=C:\Users\YourName\AppData\Roaming
CLAUDE_FLOW_CONFIG=%APPDATA%\claude-flow\config.json
# Platform-specific (macOS/Linux)
HOME=/home/yourname
CLAUDE_FLOW_CONFIG=$HOME/.claude-flow/config.json
// ❌ v2 Pattern
import { Agent } from 'agentic-flow';
const agent = new Agent({
name: 'coder',
role: 'implementation',
memory: new FileSystemMemory()
});
// ✅ v3 Pattern
import { Agent } from 'agentic-flow';
import { MemoryModule } from '@claude-flow/memory';
import { SecurityModule } from '@claude-flow/security';
const agent = new Agent({
name: 'coder',
role: 'implementation',
modules: {
memory: new MemoryModule({ backend: 'agentdb' }),
security: new SecurityModule({ strict: true })
}
});
// ❌ v2 Pattern
import { HierarchicalCoordinator } from 'agentic-flow/coordinators';
const swarm = new HierarchicalCoordinator({
agents: [coder, reviewer, tester]
});
const result = await swarm.execute(task);
// ✅ v3 Pattern
import { SwarmCoordinator } from '@claude-flow/swarm';
import { AttentionCoordinator } from '@claude-flow/swarm/attention';
const swarm = new SwarmCoordinator({
topology: 'hierarchical-mesh',
agents: [coder, reviewer, tester],
consensus: new AttentionCoordinator({
type: 'flash', // 2.49x-7.47x faster
threshold: 0.8
})
});
const result = await swarm.coordinate(task);
// ❌ v2 Pattern
import { Memory } from 'agentic-flow';
const memory = new Memory({ backend: 'filesystem' });
await memory.store('user-123', userData);
const user = await memory.retrieve('user-123');
// ✅ v3 Pattern
import { MemoryModule } from '@claude-flow/memory';
const memory = new MemoryModule({
backend: 'hybrid',
agentdb: { hnsw: true }
});
// Store with ReasoningBank pattern
await memory.storePattern({
sessionId: 'session-123',
task: 'user-management',
input: { userId: '123' },
output: userData,
reward: 0.95,
success: true,
critique: 'Successful user retrieval'
});
// Search with vector similarity
const results = await memory.searchPatterns({
task: 'user-management',
k: 5,
minReward: 0.8
});
// ❌ v2 Pattern
try {
const result = await agent.execute(task);
} catch (error) {
console.error('Error:', error);
throw error;
}
// ✅ v3 Pattern (Event Sourcing)
import { SecurityError, MemoryError } from '@claude-flow/shared';
try {
const result = await agent.execute(task);
// Emit success event
await agent.emit('task_completed', {
taskId: task.id,
result,
timestamp: Date.now()
});
} catch (error) {
// Emit failure event (audit trail)
await agent.emit('task_failed', {
taskId: task.id,
error: error.message,
timestamp: Date.now()
});
if (error instanceof SecurityError) {
// Handle security-specific errors
await security.logSecurityIncident(error);
} else if (error instanceof MemoryError) {
// Handle memory-specific errors
await memory.recover();
}
throw error;
}
// ❌ v2 Pattern (Jest)
import { describe, it, expect } from '@jest/globals';
import { mock } from 'jest-mock';
describe('Agent', () => {
it('should execute task', async () => {
const agent = new Agent();
const mockTask = mock();
const result = await agent.execute(mockTask);
expect(result).toBeDefined();
});
});
// ✅ v3 Pattern (Vitest)
import { describe, it, expect, vi } from 'vitest';
import { Agent } from 'agentic-flow';
import { MemoryModule } from '@claude-flow/memory';
describe('Agent', () => {
it('should execute task with memory', async () => {
const memory = new MemoryModule({ backend: 'agentdb' });
const agent = new Agent({
name: 'test-agent',
modules: { memory }
});
const task = { id: '1', type: 'test' };
const result = await agent.execute(task);
expect(result).toBeDefined();
expect(result.success).toBe(true);
// Verify event was emitted
const events = await agent.getEvents();
expect(events).toContainEqual(
expect.objectContaining({ type: 'task_completed' })
);
});
});
# 1. Uninstall Jest
npm uninstall jest @jest/globals jest-mock
rm jest.config.js
# 2. Install Vitest
npm install --save-dev vitest @vitest/ui
# 3. Create vitest.config.ts
cat > vitest.config.ts <<EOF
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'node',
include: ['**/*.test.ts', '**/*.spec.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: ['node_modules/', 'dist/', '**/*.test.ts']
},
globals: true,
testTimeout: 30000
}
});
EOF
# 4. Update package.json
npm pkg set scripts.test="vitest"
npm pkg set scripts.test:ui="vitest --ui"
npm pkg set scripts.test:coverage="vitest --coverage"
# 5. Run tests
npm test
Use this script to batch convert Jest tests to Vitest:
// scripts/convert-tests.ts
import fs from 'fs';
import path from 'path';
import { glob } from 'glob';
async function convertJestToVitest(filePath: string) {
let content = fs.readFileSync(filePath, 'utf-8');
// Update imports
content = content.replace(
/import\s+{\s*([^}]+)\s*}\s+from\s+['"]@jest\/globals['"]/g,
"import { $1 } from 'vitest'"
);
content = content.replace(
/import\s+{\s*mock\s*}\s+from\s+['"]jest-mock['"]/g,
"import { vi } from 'vitest'"
);
// Replace mock with vi
content = content.replace(/\bmock\(/g, 'vi.fn(');
// Save converted file
fs.writeFileSync(filePath, content);
console.log(`Converted: ${filePath}`);
}
async function main() {
const testFiles = await glob('**/*.test.{js,ts}', {
ignore: ['node_modules/**']
});
for (const file of testFiles) {
await convertJestToVitest(file);
}
console.log(`Converted ${testFiles.length} test files`);
}
main();
Run conversion:
npx ts-node scripts/convert-tests.ts
If migration fails, use this rollback procedure:
# 1. Restore v2 package.json
cp package.json.v2.backup package.json
cp package-lock.json.v2.backup package-lock.json
# 2. Restore node_modules
rm -rf node_modules
cp -r node_modules.v2.backup node_modules
# 3. Restore configuration
cp v2-config-backup.json ~/.claude-flow/config.json
# 4. Restore memory
npx [email protected] memory import ./v2-memory-backup.json
# 5. Verify v2 works
npx agentic-flow --version # Should show v2.x.x
npx agentic-flow --agent coder --task "Test rollback"
# 1. Uninstall v3 completely
npm uninstall agentic-flow
npm uninstall @claude-flow/security
npm uninstall @claude-flow/memory
npm uninstall @claude-flow/swarm
npm uninstall @claude-flow/integration
npm uninstall @claude-flow/performance
npm uninstall agentdb
npm uninstall @ruvector/attention
npm uninstall @ruvector/sona
# 2. Restore entire v2 environment
cp -r ~/.claude-flow.v2.backup ~/.claude-flow
rm -rf node_modules
cp package.json.v2.backup package.json
cp package-lock.json.v2.backup package-lock.json
# 3. Reinstall v2
npm install
# 4. Verify
npx agentic-flow --version
npx agentic-flow --list
Symptoms:
Error: Claude Flow v3 requires Node.js 20.x or higher
Current version: v18.x.x
Solution:
# Install Node.js 20.x using nvm
nvm install 20
nvm use 20
nvm alias default 20
# Verify
node --version # Should be v20.x.x
# Reinstall v3
rm -rf node_modules package-lock.json
npm install
Symptoms:
Error: Failed to migrate v2 memory to AgentDB
AgentDB not initialized
Solution:
# 1. Initialize AgentDB manually
npx @claude-flow/memory init --backend agentdb --force
# 2. Create data directory
mkdir -p ./data/agentdb
# 3. Import v2 memory with verbose logging
npx @claude-flow/memory import ./v2-memory-backup.json \
--format v2 \
--verbose \
--continue-on-error
# 4. Verify
npx @claude-flow/memory stats
Symptoms:
SecurityError: Input validation failed
Path traversal detected: ../../../etc/passwd
Solution:
# 1. Review security configuration
cat ~/.claude-flow/config.json | grep -A 10 security
# 2. Update allowedDirectories
npx @claude-flow/security configure \
--allowed-dirs "./src/,./tests/,./data/" \
--blocked-patterns "../,~/,/etc/,/tmp/"
# 3. Validate paths
npx @claude-flow/security check-paths --fix
# 4. Re-run with strict mode disabled (temporary)
export CLAUDE_FLOW_SECURITY_STRICT=false
Symptoms:
Error: Cannot find module '@jest/globals'
Solution:
# 1. Remove Jest completely
npm uninstall jest @jest/globals jest-mock
rm jest.config.js
# 2. Install Vitest
npm install --save-dev vitest @vitest/ui
# 3. Convert test imports
find . -name "*.test.ts" -exec sed -i \
's/@jest\/globals/vitest/g' {} +
# 4. Update mocks
find . -name "*.test.ts" -exec sed -i \
's/jest-mock/vitest/g' {} +
find . -name "*.test.ts" -exec sed -i \
's/mock(/vi.fn(/g' {} +
# 5. Run tests
npm test
Symptoms:
Error: Cannot find module '@claude-flow/security'
Module not found
Solution:
# 1. Install all v3 modules
npm install @claude-flow/security@latest
npm install @claude-flow/memory@latest
npm install @claude-flow/swarm@latest
npm install @claude-flow/integration@latest
npm install @claude-flow/performance@latest
# 2. Clear npm cache
npm cache clean --force
# 3. Reinstall node_modules
rm -rf node_modules package-lock.json
npm install
# 4. Verify modules
npm list @claude-flow/security
npm list @claude-flow/memory
# Error
npx : File cannot be loaded because running scripts is disabled
# Solution
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Error
"npx" cannot be opened because the developer cannot be verified
# Solution
xattr -d com.apple.quarantine /path/to/npx
spctl --add --label "Claude Flow" /path/to/npx
# Error
EACCES: permission denied, access '/usr/local/lib/node_modules'
# Solution
sudo chown -R $USER:$USER /usr/local/lib/node_modules
sudo chown -R $USER:$USER ~/.npm
npx agentic-flow --version shows 3.0.0-alpha.1)migration labelIf you encounter issues not covered in this guide:
Collect diagnostic information:
npx agentic-flow diagnose --output diagnostics.json
npx @claude-flow/security audit --report security-report.json
Create detailed issue:
Try safe mode:
export CLAUDE_FLOW_SAFE_MODE=true
npx agentic-flow --agent coder --task "Test safe mode"
Migration Benefits:
Migration Time:
Recommended Approach:
Next Steps:
Happy Migrating! Welcome to Claude Flow v3! 🚀