moflo 4.6.12 → 4.7.1

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 (30) hide show
  1. package/.claude/settings.json +4 -4
  2. package/.claude/workflow-state.json +1 -5
  3. package/README.md +1 -1
  4. package/bin/hooks.mjs +7 -3
  5. package/bin/setup-project.mjs +1 -1
  6. package/package.json +1 -1
  7. package/src/@claude-flow/cli/README.md +452 -7536
  8. package/src/@claude-flow/cli/dist/src/commands/doctor.js +1 -1
  9. package/src/@claude-flow/cli/dist/src/commands/embeddings.js +4 -4
  10. package/src/@claude-flow/cli/dist/src/commands/init.js +35 -8
  11. package/src/@claude-flow/cli/dist/src/commands/swarm.js +2 -2
  12. package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +316 -294
  13. package/src/@claude-flow/cli/dist/src/init/executor.js +461 -465
  14. package/src/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +0 -36
  15. package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +146 -1124
  16. package/src/@claude-flow/cli/dist/src/init/index.d.ts +1 -1
  17. package/src/@claude-flow/cli/dist/src/init/index.js +1 -1
  18. package/src/@claude-flow/cli/dist/src/init/moflo-init.js +78 -5
  19. package/src/@claude-flow/cli/dist/src/init/settings-generator.js +50 -120
  20. package/src/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +275 -32
  21. package/src/@claude-flow/cli/dist/src/plugins/store/discovery.js +4 -204
  22. package/src/@claude-flow/cli/dist/src/plugins/tests/standalone-test.js +4 -4
  23. package/src/@claude-flow/cli/dist/src/runtime/headless.d.ts +3 -3
  24. package/src/@claude-flow/cli/dist/src/runtime/headless.js +31 -31
  25. package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts +3 -3
  26. package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.js +3 -1
  27. package/src/@claude-flow/cli/dist/src/services/headless-worker-executor.js +14 -0
  28. package/src/@claude-flow/cli/dist/src/services/workflow-gate.js +21 -1
  29. package/src/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.js +4 -4
  30. package/src/@claude-flow/cli/package.json +1 -1
@@ -14,7 +14,7 @@ import { detectPlatform, DEFAULT_INIT_OPTIONS } from './types.js';
14
14
  import { generateSettingsJson, generateSettings } from './settings-generator.js';
15
15
  import { generateMCPJson } from './mcp-generator.js';
16
16
  import { generateStatuslineScript } from './statusline-generator.js';
17
- import { generatePreCommitHook, generatePostCommitHook, generateSessionManager, generateAgentRouter, generateMemoryHelper, generateHookHandler, generateIntelligenceStub, generateAutoMemoryHook, } from './helpers-generator.js';
17
+ import { generatePreCommitHook, generatePostCommitHook, generateAutoMemoryHook, } from './helpers-generator.js';
18
18
  import { generateClaudeMd } from './claudemd-generator.js';
19
19
  /**
20
20
  * Skills to copy based on configuration
@@ -378,8 +378,6 @@ export async function executeUpgrade(targetDir, upgradeSettings = false) {
378
378
  else {
379
379
  // Source not found (npx with broken paths) — use generated fallbacks
380
380
  const generatedCritical = {
381
- 'hook-handler.cjs': generateHookHandler(),
382
- 'intelligence.cjs': generateIntelligenceStub(),
383
381
  'auto-memory-hook.mjs': generateAutoMemoryHook(),
384
382
  };
385
383
  for (const [helperName, content] of Object.entries(generatedCritical)) {
@@ -488,7 +486,7 @@ export async function executeUpgrade(targetDir, upgradeSettings = false) {
488
486
  cvesFixed: 0,
489
487
  totalCves: 3,
490
488
  lastScan: null,
491
- _note: 'Run: npx @claude-flow/cli@latest security scan'
489
+ _note: 'Run: npx moflo security scan'
492
490
  };
493
491
  fs.writeFileSync(auditPath, JSON.stringify(audit, null, 2), 'utf-8');
494
492
  result.created.push('.claude-flow/security/audit-status.json');
@@ -925,15 +923,13 @@ async function writeHelpers(targetDir, options, result) {
925
923
  return; // Skip generating if we copied from source
926
924
  }
927
925
  }
928
- // Fall back to generating helpers if source not available
926
+ // Fall back to generating helpers if source not available.
927
+ // Only generate actively used helpers — hooks now go through npx flo CLI,
928
+ // so hook-handler.cjs, router.js, session.js, memory.js, intelligence.cjs
929
+ // are no longer needed.
929
930
  const helpers = {
930
931
  'pre-commit': generatePreCommitHook(),
931
932
  'post-commit': generatePostCommitHook(),
932
- 'session.js': generateSessionManager(),
933
- 'router.js': generateAgentRouter(),
934
- 'memory.js': generateMemoryHelper(),
935
- 'hook-handler.cjs': generateHookHandler(),
936
- 'intelligence.cjs': generateIntelligenceStub(),
937
933
  'auto-memory-hook.mjs': generateAutoMemoryHook(),
938
934
  };
939
935
  for (const [name, content] of Object.entries(helpers)) {
@@ -1043,61 +1039,61 @@ async function writeRuntimeConfig(targetDir, options, result) {
1043
1039
  result.skipped.push('.claude-flow/config.yaml');
1044
1040
  return;
1045
1041
  }
1046
- const config = `# MoFlo V4 Runtime Configuration
1047
- # Generated: ${new Date().toISOString()}
1048
-
1049
- version: "3.0.0"
1050
-
1051
- swarm:
1052
- topology: ${options.runtime.topology}
1053
- maxAgents: ${options.runtime.maxAgents}
1054
- autoScale: true
1055
- coordinationStrategy: consensus
1056
-
1057
- memory:
1058
- backend: ${options.runtime.memoryBackend}
1059
- enableHNSW: ${options.runtime.enableHNSW}
1060
- persistPath: .claude-flow/data
1061
- cacheSize: 100
1062
- # ADR-049: Self-Learning Memory
1063
- learningBridge:
1064
- enabled: ${options.runtime.enableLearningBridge ?? options.runtime.enableNeural}
1065
- sonaMode: balanced
1066
- confidenceDecayRate: 0.005
1067
- accessBoostAmount: 0.03
1068
- consolidationThreshold: 10
1069
- memoryGraph:
1070
- enabled: ${options.runtime.enableMemoryGraph ?? true}
1071
- pageRankDamping: 0.85
1072
- maxNodes: 5000
1073
- similarityThreshold: 0.8
1074
- agentScopes:
1075
- enabled: ${options.runtime.enableAgentScopes ?? true}
1076
- defaultScope: project
1077
-
1078
- neural:
1079
- enabled: ${options.runtime.enableNeural}
1080
- modelPath: .claude-flow/neural
1081
-
1082
- hooks:
1083
- enabled: true
1084
- autoExecute: true
1085
-
1086
- mcp:
1087
- autoStart: ${options.mcp.autoStart}
1088
- port: ${options.mcp.port}
1042
+ const config = `# MoFlo V4 Runtime Configuration
1043
+ # Generated: ${new Date().toISOString()}
1044
+
1045
+ version: "3.0.0"
1046
+
1047
+ swarm:
1048
+ topology: ${options.runtime.topology}
1049
+ maxAgents: ${options.runtime.maxAgents}
1050
+ autoScale: true
1051
+ coordinationStrategy: consensus
1052
+
1053
+ memory:
1054
+ backend: ${options.runtime.memoryBackend}
1055
+ enableHNSW: ${options.runtime.enableHNSW}
1056
+ persistPath: .claude-flow/data
1057
+ cacheSize: 100
1058
+ # ADR-049: Self-Learning Memory
1059
+ learningBridge:
1060
+ enabled: ${options.runtime.enableLearningBridge ?? options.runtime.enableNeural}
1061
+ sonaMode: balanced
1062
+ confidenceDecayRate: 0.005
1063
+ accessBoostAmount: 0.03
1064
+ consolidationThreshold: 10
1065
+ memoryGraph:
1066
+ enabled: ${options.runtime.enableMemoryGraph ?? true}
1067
+ pageRankDamping: 0.85
1068
+ maxNodes: 5000
1069
+ similarityThreshold: 0.8
1070
+ agentScopes:
1071
+ enabled: ${options.runtime.enableAgentScopes ?? true}
1072
+ defaultScope: project
1073
+
1074
+ neural:
1075
+ enabled: ${options.runtime.enableNeural}
1076
+ modelPath: .claude-flow/neural
1077
+
1078
+ hooks:
1079
+ enabled: true
1080
+ autoExecute: true
1081
+
1082
+ mcp:
1083
+ autoStart: ${options.mcp.autoStart}
1084
+ port: ${options.mcp.port}
1089
1085
  `;
1090
1086
  fs.writeFileSync(configPath, config, 'utf-8');
1091
1087
  result.created.files.push('.claude-flow/config.yaml');
1092
1088
  // Write .gitignore
1093
1089
  const gitignorePath = path.join(targetDir, '.claude-flow', '.gitignore');
1094
- const gitignore = `# Claude Flow runtime files
1095
- data/
1096
- logs/
1097
- sessions/
1098
- neural/
1099
- *.log
1100
- *.tmp
1090
+ const gitignore = `# Claude Flow runtime files
1091
+ data/
1092
+ logs/
1093
+ sessions/
1094
+ neural/
1095
+ *.log
1096
+ *.tmp
1101
1097
  `;
1102
1098
  if (!fs.existsSync(gitignorePath) || options.force) {
1103
1099
  fs.writeFileSync(gitignorePath, gitignore, 'utf-8');
@@ -1147,7 +1143,7 @@ async function writeInitialMetrics(targetDir, options, result) {
1147
1143
  patternsLearned: 0,
1148
1144
  sessionsCompleted: 0
1149
1145
  },
1150
- _note: 'Metrics will update as you use Claude Flow. Run: npx @claude-flow/cli@latest daemon start'
1146
+ _note: 'Metrics will update as you use Claude Flow. Run: npx moflo daemon start'
1151
1147
  };
1152
1148
  fs.writeFileSync(progressPath, JSON.stringify(progress, null, 2), 'utf-8');
1153
1149
  result.created.files.push('.claude-flow/metrics/v3-progress.json');
@@ -1208,7 +1204,7 @@ async function writeInitialMetrics(targetDir, options, result) {
1208
1204
  cvesFixed: 0,
1209
1205
  totalCves: 3,
1210
1206
  lastScan: null,
1211
- _note: 'Run: npx @claude-flow/cli@latest security scan'
1207
+ _note: 'Run: npx moflo security scan'
1212
1208
  };
1213
1209
  fs.writeFileSync(auditPath, JSON.stringify(audit, null, 2), 'utf-8');
1214
1210
  result.created.files.push('.claude-flow/security/audit-status.json');
@@ -1223,409 +1219,409 @@ async function writeCapabilitiesDoc(targetDir, options, result) {
1223
1219
  result.skipped.push('.claude-flow/CAPABILITIES.md');
1224
1220
  return;
1225
1221
  }
1226
- const capabilities = `# MoFlo V4 - Complete Capabilities Reference
1227
- > Generated: ${new Date().toISOString()}
1228
- > Full documentation: https://github.com/eric-cielo/moflo
1229
-
1230
- ## 📋 Table of Contents
1231
-
1232
- 1. [Overview](#overview)
1233
- 2. [Swarm Orchestration](#swarm-orchestration)
1234
- 3. [Available Agents (60+)](#available-agents)
1235
- 4. [CLI Commands (26 Commands, 140+ Subcommands)](#cli-commands)
1236
- 5. [Hooks System (27 Hooks + 12 Workers)](#hooks-system)
1237
- 6. [Memory & Intelligence (RuVector)](#memory--intelligence)
1238
- 7. [Hive-Mind Consensus](#hive-mind-consensus)
1239
- 8. [Performance Targets](#performance-targets)
1240
- 9. [Integration Ecosystem](#integration-ecosystem)
1241
-
1242
- ---
1243
-
1244
- ## Overview
1245
-
1246
- MoFlo V4 is a domain-driven design architecture for multi-agent AI coordination with:
1247
-
1248
- - **15-Agent Swarm Coordination** with hierarchical and mesh topologies
1249
- - **HNSW Vector Search** - 150x-12,500x faster pattern retrieval
1250
- - **SONA Neural Learning** - Self-optimizing with <0.05ms adaptation
1251
- - **Byzantine Fault Tolerance** - Queen-led consensus mechanisms
1252
- - **MCP Server Integration** - Model Context Protocol support
1253
-
1254
- ### Current Configuration
1255
- | Setting | Value |
1256
- |---------|-------|
1257
- | Topology | ${options.runtime.topology} |
1258
- | Max Agents | ${options.runtime.maxAgents} |
1259
- | Memory Backend | ${options.runtime.memoryBackend} |
1260
- | HNSW Indexing | ${options.runtime.enableHNSW ? 'Enabled' : 'Disabled'} |
1261
- | Neural Learning | ${options.runtime.enableNeural ? 'Enabled' : 'Disabled'} |
1262
- | LearningBridge | ${options.runtime.enableLearningBridge ? 'Enabled (SONA + ReasoningBank)' : 'Disabled'} |
1263
- | Knowledge Graph | ${options.runtime.enableMemoryGraph ? 'Enabled (PageRank + Communities)' : 'Disabled'} |
1264
- | Agent Scopes | ${options.runtime.enableAgentScopes ? 'Enabled (project/local/user)' : 'Disabled'} |
1265
-
1266
- ---
1267
-
1268
- ## Swarm Orchestration
1269
-
1270
- ### Topologies
1271
- | Topology | Description | Best For |
1272
- |----------|-------------|----------|
1273
- | \`hierarchical\` | Queen controls workers directly | Anti-drift, tight control |
1274
- | \`mesh\` | Fully connected peer network | Distributed tasks |
1275
- | \`hierarchical-mesh\` | V3 hybrid (recommended) | 10+ agents |
1276
- | \`ring\` | Circular communication | Sequential workflows |
1277
- | \`star\` | Central coordinator | Simple coordination |
1278
- | \`adaptive\` | Dynamic based on load | Variable workloads |
1279
-
1280
- ### Strategies
1281
- - \`balanced\` - Even distribution across agents
1282
- - \`specialized\` - Clear roles, no overlap (anti-drift)
1283
- - \`adaptive\` - Dynamic task routing
1284
-
1285
- ### Quick Commands
1286
- \`\`\`bash
1287
- # Initialize swarm
1288
- npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized
1289
-
1290
- # Check status
1291
- npx @claude-flow/cli@latest swarm status
1292
-
1293
- # Monitor activity
1294
- npx @claude-flow/cli@latest swarm monitor
1295
- \`\`\`
1296
-
1297
- ---
1298
-
1299
- ## Available Agents
1300
-
1301
- ### Core Development (5)
1302
- \`coder\`, \`reviewer\`, \`tester\`, \`planner\`, \`researcher\`
1303
-
1304
- ### V3 Specialized (4)
1305
- \`security-architect\`, \`security-auditor\`, \`memory-specialist\`, \`performance-engineer\`
1306
-
1307
- ### Swarm Coordination (5)
1308
- \`hierarchical-coordinator\`, \`mesh-coordinator\`, \`adaptive-coordinator\`, \`collective-intelligence-coordinator\`, \`swarm-memory-manager\`
1309
-
1310
- ### Consensus & Distributed (7)
1311
- \`byzantine-coordinator\`, \`raft-manager\`, \`gossip-coordinator\`, \`consensus-builder\`, \`crdt-synchronizer\`, \`quorum-manager\`, \`security-manager\`
1312
-
1313
- ### Performance & Optimization (5)
1314
- \`perf-analyzer\`, \`performance-benchmarker\`, \`task-orchestrator\`, \`memory-coordinator\`, \`smart-agent\`
1315
-
1316
- ### GitHub & Repository (9)
1317
- \`github-modes\`, \`pr-manager\`, \`code-review-swarm\`, \`issue-tracker\`, \`release-manager\`, \`workflow-automation\`, \`project-board-sync\`, \`repo-architect\`, \`multi-repo-swarm\`
1318
-
1319
- ### SPARC Methodology (6)
1320
- \`sparc-coord\`, \`sparc-coder\`, \`specification\`, \`pseudocode\`, \`architecture\`, \`refinement\`
1321
-
1322
- ### Specialized Development (8)
1323
- \`backend-dev\`, \`mobile-dev\`, \`ml-developer\`, \`cicd-engineer\`, \`api-docs\`, \`system-architect\`, \`code-analyzer\`, \`base-template-generator\`
1324
-
1325
- ### Testing & Validation (2)
1326
- \`tdd-london-swarm\`, \`production-validator\`
1327
-
1328
- ### Agent Routing by Task
1329
- | Task Type | Recommended Agents | Topology |
1330
- |-----------|-------------------|----------|
1331
- | Bug Fix | researcher, coder, tester | mesh |
1332
- | New Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
1333
- | Refactoring | architect, coder, reviewer | mesh |
1334
- | Performance | researcher, perf-engineer, coder | hierarchical |
1335
- | Security | security-architect, auditor, reviewer | hierarchical |
1336
- | Docs | researcher, api-docs | mesh |
1337
-
1338
- ---
1339
-
1340
- ## CLI Commands
1341
-
1342
- ### Core Commands (12)
1343
- | Command | Subcommands | Description |
1344
- |---------|-------------|-------------|
1345
- | \`init\` | 4 | Project initialization |
1346
- | \`agent\` | 8 | Agent lifecycle management |
1347
- | \`swarm\` | 6 | Multi-agent coordination |
1348
- | \`memory\` | 11 | AgentDB with HNSW search |
1349
- | \`mcp\` | 9 | MCP server management |
1350
- | \`task\` | 6 | Task assignment |
1351
- | \`session\` | 7 | Session persistence |
1352
- | \`config\` | 7 | Configuration |
1353
- | \`status\` | 3 | System monitoring |
1354
- | \`workflow\` | 6 | Workflow templates |
1355
- | \`hooks\` | 17 | Self-learning hooks |
1356
- | \`hive-mind\` | 6 | Consensus coordination |
1357
-
1358
- ### Advanced Commands (14)
1359
- | Command | Subcommands | Description |
1360
- |---------|-------------|-------------|
1361
- | \`daemon\` | 5 | Background workers |
1362
- | \`neural\` | 5 | Pattern training |
1363
- | \`security\` | 6 | Security scanning |
1364
- | \`performance\` | 5 | Profiling & benchmarks |
1365
- | \`providers\` | 5 | AI provider config |
1366
- | \`plugins\` | 5 | Plugin management |
1367
- | \`deployment\` | 5 | Deploy management |
1368
- | \`embeddings\` | 4 | Vector embeddings |
1369
- | \`claims\` | 4 | Authorization |
1370
- | \`migrate\` | 5 | V2→V3 migration |
1371
- | \`process\` | 4 | Process management |
1372
- | \`doctor\` | 1 | Health diagnostics |
1373
- | \`completions\` | 4 | Shell completions |
1374
-
1375
- ### Example Commands
1376
- \`\`\`bash
1377
- # Initialize
1378
- npx @claude-flow/cli@latest init --wizard
1379
-
1380
- # Spawn agent
1381
- npx @claude-flow/cli@latest agent spawn -t coder --name my-coder
1382
-
1383
- # Memory operations
1384
- npx @claude-flow/cli@latest memory store --key "pattern" --value "data" --namespace patterns
1385
- npx @claude-flow/cli@latest memory search --query "authentication"
1386
-
1387
- # Diagnostics
1388
- npx @claude-flow/cli@latest doctor --fix
1389
- \`\`\`
1390
-
1391
- ---
1392
-
1393
- ## Hooks System
1394
-
1395
- ### 27 Available Hooks
1396
-
1397
- #### Core Hooks (6)
1398
- | Hook | Description |
1399
- |------|-------------|
1400
- | \`pre-edit\` | Context before file edits |
1401
- | \`post-edit\` | Record edit outcomes |
1402
- | \`pre-command\` | Risk assessment |
1403
- | \`post-command\` | Command metrics |
1404
- | \`pre-task\` | Task start + agent suggestions |
1405
- | \`post-task\` | Task completion learning |
1406
-
1407
- #### Session Hooks (4)
1408
- | Hook | Description |
1409
- |------|-------------|
1410
- | \`session-start\` | Start/restore session |
1411
- | \`session-end\` | Persist state |
1412
- | \`session-restore\` | Restore previous |
1413
- | \`notify\` | Cross-agent notifications |
1414
-
1415
- #### Intelligence Hooks (5)
1416
- | Hook | Description |
1417
- |------|-------------|
1418
- | \`route\` | Optimal agent routing |
1419
- | \`explain\` | Routing decisions |
1420
- | \`pretrain\` | Bootstrap intelligence |
1421
- | \`build-agents\` | Generate configs |
1422
- | \`transfer\` | Pattern transfer |
1423
-
1424
- #### Coverage Hooks (3)
1425
- | Hook | Description |
1426
- |------|-------------|
1427
- | \`coverage-route\` | Coverage-based routing |
1428
- | \`coverage-suggest\` | Improvement suggestions |
1429
- | \`coverage-gaps\` | Gap analysis |
1430
-
1431
- ### 12 Background Workers
1432
- | Worker | Priority | Purpose |
1433
- |--------|----------|---------|
1434
- | \`ultralearn\` | normal | Deep knowledge |
1435
- | \`optimize\` | high | Performance |
1436
- | \`consolidate\` | low | Memory consolidation |
1437
- | \`predict\` | normal | Predictive preload |
1438
- | \`audit\` | critical | Security |
1439
- | \`map\` | normal | Codebase mapping |
1440
- | \`preload\` | low | Resource preload |
1441
- | \`deepdive\` | normal | Deep analysis |
1442
- | \`document\` | normal | Auto-docs |
1443
- | \`refactor\` | normal | Suggestions |
1444
- | \`benchmark\` | normal | Benchmarking |
1445
- | \`testgaps\` | normal | Coverage gaps |
1446
-
1447
- ---
1448
-
1449
- ## Memory & Intelligence
1450
-
1451
- ### RuVector Intelligence System
1452
- - **SONA**: Self-Optimizing Neural Architecture (<0.05ms)
1453
- - **MoE**: Mixture of Experts routing
1454
- - **HNSW**: 150x-12,500x faster search
1455
- - **EWC++**: Prevents catastrophic forgetting
1456
- - **Flash Attention**: 2.49x-7.47x speedup
1457
- - **Int8 Quantization**: 3.92x memory reduction
1458
-
1459
- ### 4-Step Intelligence Pipeline
1460
- 1. **RETRIEVE** - HNSW pattern search
1461
- 2. **JUDGE** - Success/failure verdicts
1462
- 3. **DISTILL** - LoRA learning extraction
1463
- 4. **CONSOLIDATE** - EWC++ preservation
1464
-
1465
- ### Self-Learning Memory (ADR-049)
1466
-
1467
- | Component | Status | Description |
1468
- |-----------|--------|-------------|
1469
- | **LearningBridge** | ${options.runtime.enableLearningBridge ? '✅ Enabled' : '⏸ Disabled'} | Connects insights to SONA/ReasoningBank neural pipeline |
1470
- | **MemoryGraph** | ${options.runtime.enableMemoryGraph ? '✅ Enabled' : '⏸ Disabled'} | PageRank knowledge graph + community detection |
1471
- | **AgentMemoryScope** | ${options.runtime.enableAgentScopes ? '✅ Enabled' : '⏸ Disabled'} | 3-scope agent memory (project/local/user) |
1472
-
1473
- **LearningBridge** - Insights trigger learning trajectories. Confidence evolves: +0.03 on access, -0.005/hour decay. Consolidation runs the JUDGE/DISTILL/CONSOLIDATE pipeline.
1474
-
1475
- **MemoryGraph** - Builds a knowledge graph from entry references. PageRank identifies influential insights. Communities group related knowledge. Graph-aware ranking blends vector + structural scores.
1476
-
1477
- **AgentMemoryScope** - Maps Claude Code 3-scope directories:
1478
- - \`project\`: \`<gitRoot>/.claude/agent-memory/<agent>/\`
1479
- - \`local\`: \`<gitRoot>/.claude/agent-memory-local/<agent>/\`
1480
- - \`user\`: \`~/.claude/agent-memory/<agent>/\`
1481
-
1482
- High-confidence insights (>0.8) can transfer between agents.
1483
-
1484
- ### Memory Commands
1485
- \`\`\`bash
1486
- # Store pattern
1487
- npx @claude-flow/cli@latest memory store --key "name" --value "data" --namespace patterns
1488
-
1489
- # Semantic search
1490
- npx @claude-flow/cli@latest memory search --query "authentication"
1491
-
1492
- # List entries
1493
- npx @claude-flow/cli@latest memory list --namespace patterns
1494
-
1495
- # Initialize database
1496
- npx @claude-flow/cli@latest memory init --force
1497
- \`\`\`
1498
-
1499
- ---
1500
-
1501
- ## Hive-Mind Consensus
1502
-
1503
- ### Queen Types
1504
- | Type | Role |
1505
- |------|------|
1506
- | Strategic Queen | Long-term planning |
1507
- | Tactical Queen | Execution coordination |
1508
- | Adaptive Queen | Dynamic optimization |
1509
-
1510
- ### Worker Types (8)
1511
- \`researcher\`, \`coder\`, \`analyst\`, \`tester\`, \`architect\`, \`reviewer\`, \`optimizer\`, \`documenter\`
1512
-
1513
- ### Consensus Mechanisms
1514
- | Mechanism | Fault Tolerance | Use Case |
1515
- |-----------|-----------------|----------|
1516
- | \`byzantine\` | f < n/3 faulty | Adversarial |
1517
- | \`raft\` | f < n/2 failed | Leader-based |
1518
- | \`gossip\` | Eventually consistent | Large scale |
1519
- | \`crdt\` | Conflict-free | Distributed |
1520
- | \`quorum\` | Configurable | Flexible |
1521
-
1522
- ### Hive-Mind Commands
1523
- \`\`\`bash
1524
- # Initialize
1525
- npx @claude-flow/cli@latest hive-mind init --queen-type strategic
1526
-
1527
- # Status
1528
- npx @claude-flow/cli@latest hive-mind status
1529
-
1530
- # Spawn workers
1531
- npx @claude-flow/cli@latest hive-mind spawn --count 5 --type worker
1532
-
1533
- # Consensus
1534
- npx @claude-flow/cli@latest hive-mind consensus --propose "task"
1535
- \`\`\`
1536
-
1537
- ---
1538
-
1539
- ## Performance Targets
1540
-
1541
- | Metric | Target | Status |
1542
- |--------|--------|--------|
1543
- | HNSW Search | 150x-12,500x faster | ✅ Implemented |
1544
- | Memory Reduction | 50-75% | ✅ Implemented (3.92x) |
1545
- | SONA Integration | Pattern learning | ✅ Implemented |
1546
- | Flash Attention | 2.49x-7.47x | 🔄 In Progress |
1547
- | MCP Response | <100ms | ✅ Achieved |
1548
- | CLI Startup | <500ms | ✅ Achieved |
1549
- | SONA Adaptation | <0.05ms | 🔄 In Progress |
1550
- | Graph Build (1k) | <200ms | ✅ 2.78ms (71.9x headroom) |
1551
- | PageRank (1k) | <100ms | ✅ 12.21ms (8.2x headroom) |
1552
- | Insight Recording | <5ms/each | ✅ 0.12ms (41x headroom) |
1553
- | Consolidation | <500ms | ✅ 0.26ms (1,955x headroom) |
1554
- | Knowledge Transfer | <100ms | ✅ 1.25ms (80x headroom) |
1555
-
1556
- ---
1557
-
1558
- ## Integration Ecosystem
1559
-
1560
- ### Integrated Packages
1561
- | Package | Version | Purpose |
1562
- |---------|---------|---------|
1563
- | agentic-flow | 3.0.0-alpha.1 | Core coordination + ReasoningBank + Router |
1564
- | agentdb | 3.0.0-alpha.10 | Vector database + 8 controllers |
1565
- | @ruvector/attention | 0.1.3 | Flash attention |
1566
- | @ruvector/sona | 0.1.5 | Neural learning |
1567
-
1568
- ### Optional Integrations
1569
- | Package | Command |
1570
- |---------|---------|
1571
- | ruv-swarm | \`npx ruv-swarm mcp start\` |
1572
- | flow-nexus | \`npx flow-nexus@latest mcp start\` |
1573
- | agentic-jujutsu | \`npx agentic-jujutsu@latest\` |
1574
-
1575
- ### MCP Server Setup
1576
- \`\`\`bash
1577
- # Add Claude Flow MCP
1578
- claude mcp add claude-flow -- npx -y @claude-flow/cli@latest
1579
-
1580
- # Optional servers
1581
- claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start
1582
- claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start
1583
- \`\`\`
1584
-
1585
- ---
1586
-
1587
- ## Quick Reference
1588
-
1589
- ### Essential Commands
1590
- \`\`\`bash
1591
- # Setup
1592
- npx @claude-flow/cli@latest init --wizard
1593
- npx @claude-flow/cli@latest daemon start
1594
- npx @claude-flow/cli@latest doctor --fix
1595
-
1596
- # Swarm
1597
- npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8
1598
- npx @claude-flow/cli@latest swarm status
1599
-
1600
- # Agents
1601
- npx @claude-flow/cli@latest agent spawn -t coder
1602
- npx @claude-flow/cli@latest agent list
1603
-
1604
- # Memory
1605
- npx @claude-flow/cli@latest memory search --query "patterns"
1606
-
1607
- # Hooks
1608
- npx @claude-flow/cli@latest hooks pre-task --description "task"
1609
- npx @claude-flow/cli@latest hooks worker dispatch --trigger optimize
1610
- \`\`\`
1611
-
1612
- ### File Structure
1613
- \`\`\`
1614
- .claude-flow/
1615
- ├── config.yaml # Runtime configuration
1616
- ├── CAPABILITIES.md # This file
1617
- ├── data/ # Memory storage
1618
- ├── logs/ # Operation logs
1619
- ├── sessions/ # Session state
1620
- ├── hooks/ # Custom hooks
1621
- ├── agents/ # Agent configs
1622
- └── workflows/ # Workflow templates
1623
- \`\`\`
1624
-
1625
- ---
1626
-
1627
- **Full Documentation**: https://github.com/eric-cielo/moflo
1628
- **Issues**: https://github.com/eric-cielo/moflo/issues
1222
+ const capabilities = `# MoFlo V4 - Complete Capabilities Reference
1223
+ > Generated: ${new Date().toISOString()}
1224
+ > Full documentation: https://github.com/eric-cielo/moflo
1225
+
1226
+ ## 📋 Table of Contents
1227
+
1228
+ 1. [Overview](#overview)
1229
+ 2. [Swarm Orchestration](#swarm-orchestration)
1230
+ 3. [Available Agents (60+)](#available-agents)
1231
+ 4. [CLI Commands (26 Commands, 140+ Subcommands)](#cli-commands)
1232
+ 5. [Hooks System (27 Hooks + 12 Workers)](#hooks-system)
1233
+ 6. [Memory & Intelligence (RuVector)](#memory--intelligence)
1234
+ 7. [Hive-Mind Consensus](#hive-mind-consensus)
1235
+ 8. [Performance Targets](#performance-targets)
1236
+ 9. [Integration Ecosystem](#integration-ecosystem)
1237
+
1238
+ ---
1239
+
1240
+ ## Overview
1241
+
1242
+ MoFlo V4 is a domain-driven design architecture for multi-agent AI coordination with:
1243
+
1244
+ - **15-Agent Swarm Coordination** with hierarchical and mesh topologies
1245
+ - **HNSW Vector Search** - 150x-12,500x faster pattern retrieval
1246
+ - **SONA Neural Learning** - Self-optimizing with <0.05ms adaptation
1247
+ - **Byzantine Fault Tolerance** - Queen-led consensus mechanisms
1248
+ - **MCP Server Integration** - Model Context Protocol support
1249
+
1250
+ ### Current Configuration
1251
+ | Setting | Value |
1252
+ |---------|-------|
1253
+ | Topology | ${options.runtime.topology} |
1254
+ | Max Agents | ${options.runtime.maxAgents} |
1255
+ | Memory Backend | ${options.runtime.memoryBackend} |
1256
+ | HNSW Indexing | ${options.runtime.enableHNSW ? 'Enabled' : 'Disabled'} |
1257
+ | Neural Learning | ${options.runtime.enableNeural ? 'Enabled' : 'Disabled'} |
1258
+ | LearningBridge | ${options.runtime.enableLearningBridge ? 'Enabled (SONA + ReasoningBank)' : 'Disabled'} |
1259
+ | Knowledge Graph | ${options.runtime.enableMemoryGraph ? 'Enabled (PageRank + Communities)' : 'Disabled'} |
1260
+ | Agent Scopes | ${options.runtime.enableAgentScopes ? 'Enabled (project/local/user)' : 'Disabled'} |
1261
+
1262
+ ---
1263
+
1264
+ ## Swarm Orchestration
1265
+
1266
+ ### Topologies
1267
+ | Topology | Description | Best For |
1268
+ |----------|-------------|----------|
1269
+ | \`hierarchical\` | Queen controls workers directly | Anti-drift, tight control |
1270
+ | \`mesh\` | Fully connected peer network | Distributed tasks |
1271
+ | \`hierarchical-mesh\` | V3 hybrid (recommended) | 10+ agents |
1272
+ | \`ring\` | Circular communication | Sequential workflows |
1273
+ | \`star\` | Central coordinator | Simple coordination |
1274
+ | \`adaptive\` | Dynamic based on load | Variable workloads |
1275
+
1276
+ ### Strategies
1277
+ - \`balanced\` - Even distribution across agents
1278
+ - \`specialized\` - Clear roles, no overlap (anti-drift)
1279
+ - \`adaptive\` - Dynamic task routing
1280
+
1281
+ ### Quick Commands
1282
+ \`\`\`bash
1283
+ # Initialize swarm
1284
+ npx moflo swarm init --topology hierarchical --max-agents 8 --strategy specialized
1285
+
1286
+ # Check status
1287
+ npx moflo swarm status
1288
+
1289
+ # Monitor activity
1290
+ npx moflo swarm monitor
1291
+ \`\`\`
1292
+
1293
+ ---
1294
+
1295
+ ## Available Agents
1296
+
1297
+ ### Core Development (5)
1298
+ \`coder\`, \`reviewer\`, \`tester\`, \`planner\`, \`researcher\`
1299
+
1300
+ ### V3 Specialized (4)
1301
+ \`security-architect\`, \`security-auditor\`, \`memory-specialist\`, \`performance-engineer\`
1302
+
1303
+ ### Swarm Coordination (5)
1304
+ \`hierarchical-coordinator\`, \`mesh-coordinator\`, \`adaptive-coordinator\`, \`collective-intelligence-coordinator\`, \`swarm-memory-manager\`
1305
+
1306
+ ### Consensus & Distributed (7)
1307
+ \`byzantine-coordinator\`, \`raft-manager\`, \`gossip-coordinator\`, \`consensus-builder\`, \`crdt-synchronizer\`, \`quorum-manager\`, \`security-manager\`
1308
+
1309
+ ### Performance & Optimization (5)
1310
+ \`perf-analyzer\`, \`performance-benchmarker\`, \`task-orchestrator\`, \`memory-coordinator\`, \`smart-agent\`
1311
+
1312
+ ### GitHub & Repository (9)
1313
+ \`github-modes\`, \`pr-manager\`, \`code-review-swarm\`, \`issue-tracker\`, \`release-manager\`, \`workflow-automation\`, \`project-board-sync\`, \`repo-architect\`, \`multi-repo-swarm\`
1314
+
1315
+ ### SPARC Methodology (6)
1316
+ \`sparc-coord\`, \`sparc-coder\`, \`specification\`, \`pseudocode\`, \`architecture\`, \`refinement\`
1317
+
1318
+ ### Specialized Development (8)
1319
+ \`backend-dev\`, \`mobile-dev\`, \`ml-developer\`, \`cicd-engineer\`, \`api-docs\`, \`system-architect\`, \`code-analyzer\`, \`base-template-generator\`
1320
+
1321
+ ### Testing & Validation (2)
1322
+ \`tdd-london-swarm\`, \`production-validator\`
1323
+
1324
+ ### Agent Routing by Task
1325
+ | Task Type | Recommended Agents | Topology |
1326
+ |-----------|-------------------|----------|
1327
+ | Bug Fix | researcher, coder, tester | mesh |
1328
+ | New Feature | coordinator, architect, coder, tester, reviewer | hierarchical |
1329
+ | Refactoring | architect, coder, reviewer | mesh |
1330
+ | Performance | researcher, perf-engineer, coder | hierarchical |
1331
+ | Security | security-architect, auditor, reviewer | hierarchical |
1332
+ | Docs | researcher, api-docs | mesh |
1333
+
1334
+ ---
1335
+
1336
+ ## CLI Commands
1337
+
1338
+ ### Core Commands (12)
1339
+ | Command | Subcommands | Description |
1340
+ |---------|-------------|-------------|
1341
+ | \`init\` | 4 | Project initialization |
1342
+ | \`agent\` | 8 | Agent lifecycle management |
1343
+ | \`swarm\` | 6 | Multi-agent coordination |
1344
+ | \`memory\` | 11 | AgentDB with HNSW search |
1345
+ | \`mcp\` | 9 | MCP server management |
1346
+ | \`task\` | 6 | Task assignment |
1347
+ | \`session\` | 7 | Session persistence |
1348
+ | \`config\` | 7 | Configuration |
1349
+ | \`status\` | 3 | System monitoring |
1350
+ | \`workflow\` | 6 | Workflow templates |
1351
+ | \`hooks\` | 17 | Self-learning hooks |
1352
+ | \`hive-mind\` | 6 | Consensus coordination |
1353
+
1354
+ ### Advanced Commands (14)
1355
+ | Command | Subcommands | Description |
1356
+ |---------|-------------|-------------|
1357
+ | \`daemon\` | 5 | Background workers |
1358
+ | \`neural\` | 5 | Pattern training |
1359
+ | \`security\` | 6 | Security scanning |
1360
+ | \`performance\` | 5 | Profiling & benchmarks |
1361
+ | \`providers\` | 5 | AI provider config |
1362
+ | \`plugins\` | 5 | Plugin management |
1363
+ | \`deployment\` | 5 | Deploy management |
1364
+ | \`embeddings\` | 4 | Vector embeddings |
1365
+ | \`claims\` | 4 | Authorization |
1366
+ | \`migrate\` | 5 | V2→V3 migration |
1367
+ | \`process\` | 4 | Process management |
1368
+ | \`doctor\` | 1 | Health diagnostics |
1369
+ | \`completions\` | 4 | Shell completions |
1370
+
1371
+ ### Example Commands
1372
+ \`\`\`bash
1373
+ # Initialize
1374
+ npx moflo init --wizard
1375
+
1376
+ # Spawn agent
1377
+ npx moflo agent spawn -t coder --name my-coder
1378
+
1379
+ # Memory operations
1380
+ npx moflo memory store --key "pattern" --value "data" --namespace patterns
1381
+ npx moflo memory search --query "authentication"
1382
+
1383
+ # Diagnostics
1384
+ npx moflo doctor --fix
1385
+ \`\`\`
1386
+
1387
+ ---
1388
+
1389
+ ## Hooks System
1390
+
1391
+ ### 27 Available Hooks
1392
+
1393
+ #### Core Hooks (6)
1394
+ | Hook | Description |
1395
+ |------|-------------|
1396
+ | \`pre-edit\` | Context before file edits |
1397
+ | \`post-edit\` | Record edit outcomes |
1398
+ | \`pre-command\` | Risk assessment |
1399
+ | \`post-command\` | Command metrics |
1400
+ | \`pre-task\` | Task start + agent suggestions |
1401
+ | \`post-task\` | Task completion learning |
1402
+
1403
+ #### Session Hooks (4)
1404
+ | Hook | Description |
1405
+ |------|-------------|
1406
+ | \`session-start\` | Start/restore session |
1407
+ | \`session-end\` | Persist state |
1408
+ | \`session-restore\` | Restore previous |
1409
+ | \`notify\` | Cross-agent notifications |
1410
+
1411
+ #### Intelligence Hooks (5)
1412
+ | Hook | Description |
1413
+ |------|-------------|
1414
+ | \`route\` | Optimal agent routing |
1415
+ | \`explain\` | Routing decisions |
1416
+ | \`pretrain\` | Bootstrap intelligence |
1417
+ | \`build-agents\` | Generate configs |
1418
+ | \`transfer\` | Pattern transfer |
1419
+
1420
+ #### Coverage Hooks (3)
1421
+ | Hook | Description |
1422
+ |------|-------------|
1423
+ | \`coverage-route\` | Coverage-based routing |
1424
+ | \`coverage-suggest\` | Improvement suggestions |
1425
+ | \`coverage-gaps\` | Gap analysis |
1426
+
1427
+ ### 12 Background Workers
1428
+ | Worker | Priority | Purpose |
1429
+ |--------|----------|---------|
1430
+ | \`ultralearn\` | normal | Deep knowledge |
1431
+ | \`optimize\` | high | Performance |
1432
+ | \`consolidate\` | low | Memory consolidation |
1433
+ | \`predict\` | normal | Predictive preload |
1434
+ | \`audit\` | critical | Security |
1435
+ | \`map\` | normal | Codebase mapping |
1436
+ | \`preload\` | low | Resource preload |
1437
+ | \`deepdive\` | normal | Deep analysis |
1438
+ | \`document\` | normal | Auto-docs |
1439
+ | \`refactor\` | normal | Suggestions |
1440
+ | \`benchmark\` | normal | Benchmarking |
1441
+ | \`testgaps\` | normal | Coverage gaps |
1442
+
1443
+ ---
1444
+
1445
+ ## Memory & Intelligence
1446
+
1447
+ ### RuVector Intelligence System
1448
+ - **SONA**: Self-Optimizing Neural Architecture (<0.05ms)
1449
+ - **MoE**: Mixture of Experts routing
1450
+ - **HNSW**: 150x-12,500x faster search
1451
+ - **EWC++**: Prevents catastrophic forgetting
1452
+ - **Flash Attention**: 2.49x-7.47x speedup
1453
+ - **Int8 Quantization**: 3.92x memory reduction
1454
+
1455
+ ### 4-Step Intelligence Pipeline
1456
+ 1. **RETRIEVE** - HNSW pattern search
1457
+ 2. **JUDGE** - Success/failure verdicts
1458
+ 3. **DISTILL** - LoRA learning extraction
1459
+ 4. **CONSOLIDATE** - EWC++ preservation
1460
+
1461
+ ### Self-Learning Memory (ADR-049)
1462
+
1463
+ | Component | Status | Description |
1464
+ |-----------|--------|-------------|
1465
+ | **LearningBridge** | ${options.runtime.enableLearningBridge ? '✅ Enabled' : '⏸ Disabled'} | Connects insights to SONA/ReasoningBank neural pipeline |
1466
+ | **MemoryGraph** | ${options.runtime.enableMemoryGraph ? '✅ Enabled' : '⏸ Disabled'} | PageRank knowledge graph + community detection |
1467
+ | **AgentMemoryScope** | ${options.runtime.enableAgentScopes ? '✅ Enabled' : '⏸ Disabled'} | 3-scope agent memory (project/local/user) |
1468
+
1469
+ **LearningBridge** - Insights trigger learning trajectories. Confidence evolves: +0.03 on access, -0.005/hour decay. Consolidation runs the JUDGE/DISTILL/CONSOLIDATE pipeline.
1470
+
1471
+ **MemoryGraph** - Builds a knowledge graph from entry references. PageRank identifies influential insights. Communities group related knowledge. Graph-aware ranking blends vector + structural scores.
1472
+
1473
+ **AgentMemoryScope** - Maps Claude Code 3-scope directories:
1474
+ - \`project\`: \`<gitRoot>/.claude/agent-memory/<agent>/\`
1475
+ - \`local\`: \`<gitRoot>/.claude/agent-memory-local/<agent>/\`
1476
+ - \`user\`: \`~/.claude/agent-memory/<agent>/\`
1477
+
1478
+ High-confidence insights (>0.8) can transfer between agents.
1479
+
1480
+ ### Memory Commands
1481
+ \`\`\`bash
1482
+ # Store pattern
1483
+ npx moflo memory store --key "name" --value "data" --namespace patterns
1484
+
1485
+ # Semantic search
1486
+ npx moflo memory search --query "authentication"
1487
+
1488
+ # List entries
1489
+ npx moflo memory list --namespace patterns
1490
+
1491
+ # Initialize database
1492
+ npx moflo memory init --force
1493
+ \`\`\`
1494
+
1495
+ ---
1496
+
1497
+ ## Hive-Mind Consensus
1498
+
1499
+ ### Queen Types
1500
+ | Type | Role |
1501
+ |------|------|
1502
+ | Strategic Queen | Long-term planning |
1503
+ | Tactical Queen | Execution coordination |
1504
+ | Adaptive Queen | Dynamic optimization |
1505
+
1506
+ ### Worker Types (8)
1507
+ \`researcher\`, \`coder\`, \`analyst\`, \`tester\`, \`architect\`, \`reviewer\`, \`optimizer\`, \`documenter\`
1508
+
1509
+ ### Consensus Mechanisms
1510
+ | Mechanism | Fault Tolerance | Use Case |
1511
+ |-----------|-----------------|----------|
1512
+ | \`byzantine\` | f < n/3 faulty | Adversarial |
1513
+ | \`raft\` | f < n/2 failed | Leader-based |
1514
+ | \`gossip\` | Eventually consistent | Large scale |
1515
+ | \`crdt\` | Conflict-free | Distributed |
1516
+ | \`quorum\` | Configurable | Flexible |
1517
+
1518
+ ### Hive-Mind Commands
1519
+ \`\`\`bash
1520
+ # Initialize
1521
+ npx moflo hive-mind init --queen-type strategic
1522
+
1523
+ # Status
1524
+ npx moflo hive-mind status
1525
+
1526
+ # Spawn workers
1527
+ npx moflo hive-mind spawn --count 5 --type worker
1528
+
1529
+ # Consensus
1530
+ npx moflo hive-mind consensus --propose "task"
1531
+ \`\`\`
1532
+
1533
+ ---
1534
+
1535
+ ## Performance Targets
1536
+
1537
+ | Metric | Target | Status |
1538
+ |--------|--------|--------|
1539
+ | HNSW Search | 150x-12,500x faster | ✅ Implemented |
1540
+ | Memory Reduction | 50-75% | ✅ Implemented (3.92x) |
1541
+ | SONA Integration | Pattern learning | ✅ Implemented |
1542
+ | Flash Attention | 2.49x-7.47x | 🔄 In Progress |
1543
+ | MCP Response | <100ms | ✅ Achieved |
1544
+ | CLI Startup | <500ms | ✅ Achieved |
1545
+ | SONA Adaptation | <0.05ms | 🔄 In Progress |
1546
+ | Graph Build (1k) | <200ms | ✅ 2.78ms (71.9x headroom) |
1547
+ | PageRank (1k) | <100ms | ✅ 12.21ms (8.2x headroom) |
1548
+ | Insight Recording | <5ms/each | ✅ 0.12ms (41x headroom) |
1549
+ | Consolidation | <500ms | ✅ 0.26ms (1,955x headroom) |
1550
+ | Knowledge Transfer | <100ms | ✅ 1.25ms (80x headroom) |
1551
+
1552
+ ---
1553
+
1554
+ ## Integration Ecosystem
1555
+
1556
+ ### Integrated Packages
1557
+ | Package | Version | Purpose |
1558
+ |---------|---------|---------|
1559
+ | agentic-flow | 3.0.0-alpha.1 | Core coordination + ReasoningBank + Router |
1560
+ | agentdb | 3.0.0-alpha.10 | Vector database + 8 controllers |
1561
+ | @ruvector/attention | 0.1.3 | Flash attention |
1562
+ | @ruvector/sona | 0.1.5 | Neural learning |
1563
+
1564
+ ### Optional Integrations
1565
+ | Package | Command |
1566
+ |---------|---------|
1567
+ | ruv-swarm | \`npx ruv-swarm mcp start\` |
1568
+ | flow-nexus | \`npx flow-nexus@latest mcp start\` |
1569
+ | agentic-jujutsu | \`npx agentic-jujutsu@latest\` |
1570
+
1571
+ ### MCP Server Setup
1572
+ \`\`\`bash
1573
+ # Add Claude Flow MCP
1574
+ claude mcp add claude-flow -- npx -y @claude-flow/cli@latest
1575
+
1576
+ # Optional servers
1577
+ claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start
1578
+ claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start
1579
+ \`\`\`
1580
+
1581
+ ---
1582
+
1583
+ ## Quick Reference
1584
+
1585
+ ### Essential Commands
1586
+ \`\`\`bash
1587
+ # Setup
1588
+ npx moflo init --wizard
1589
+ npx moflo daemon start
1590
+ npx moflo doctor --fix
1591
+
1592
+ # Swarm
1593
+ npx moflo swarm init --topology hierarchical --max-agents 8
1594
+ npx moflo swarm status
1595
+
1596
+ # Agents
1597
+ npx moflo agent spawn -t coder
1598
+ npx moflo agent list
1599
+
1600
+ # Memory
1601
+ npx moflo memory search --query "patterns"
1602
+
1603
+ # Hooks
1604
+ npx moflo hooks pre-task --description "task"
1605
+ npx moflo hooks worker dispatch --trigger optimize
1606
+ \`\`\`
1607
+
1608
+ ### File Structure
1609
+ \`\`\`
1610
+ .claude-flow/
1611
+ ├── config.yaml # Runtime configuration
1612
+ ├── CAPABILITIES.md # This file
1613
+ ├── data/ # Memory storage
1614
+ ├── logs/ # Operation logs
1615
+ ├── sessions/ # Session state
1616
+ ├── hooks/ # Custom hooks
1617
+ ├── agents/ # Agent configs
1618
+ └── workflows/ # Workflow templates
1619
+ \`\`\`
1620
+
1621
+ ---
1622
+
1623
+ **Full Documentation**: https://github.com/eric-cielo/moflo
1624
+ **Issues**: https://github.com/eric-cielo/moflo/issues
1629
1625
  `;
1630
1626
  fs.writeFileSync(capabilitiesPath, capabilities, 'utf-8');
1631
1627
  result.created.files.push('.claude-flow/CAPABILITIES.md');