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