moflo 4.10.23 → 4.10.25-rc.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 (109) hide show
  1. package/.claude/guidance/shipped/moflo-yaml-reference.md +5 -5
  2. package/bin/cli-hooks/statusline.js +12 -8
  3. package/bin/cli.js +1 -1
  4. package/bin/hooks.mjs +1 -1
  5. package/bin/lib/pii-scrub.mjs +2 -5
  6. package/dist/src/cli/commands/agent.js +14 -14
  7. package/dist/src/cli/commands/analyze.js +52 -52
  8. package/dist/src/cli/commands/benchmark.js +14 -14
  9. package/dist/src/cli/commands/claims.js +15 -15
  10. package/dist/src/cli/commands/completions.js +40 -40
  11. package/dist/src/cli/commands/config.js +8 -8
  12. package/dist/src/cli/commands/daemon.js +28 -27
  13. package/dist/src/cli/commands/deployment.js +15 -15
  14. package/dist/src/cli/commands/doctor-checks-config.js +6 -6
  15. package/dist/src/cli/commands/doctor-checks-deep.js +2 -2
  16. package/dist/src/cli/commands/doctor-checks-swarm.js +122 -13
  17. package/dist/src/cli/commands/doctor.js +10 -10
  18. package/dist/src/cli/commands/embeddings.js +49 -49
  19. package/dist/src/cli/commands/guidance.js +22 -22
  20. package/dist/src/cli/commands/hive-mind.js +21 -21
  21. package/dist/src/cli/commands/hooks.js +97 -113
  22. package/dist/src/cli/commands/init.js +18 -18
  23. package/dist/src/cli/commands/issues.js +6 -6
  24. package/dist/src/cli/commands/mcp.js +12 -11
  25. package/dist/src/cli/commands/memory.js +56 -47
  26. package/dist/src/cli/commands/migrate.js +5 -5
  27. package/dist/src/cli/commands/neural.js +31 -31
  28. package/dist/src/cli/commands/performance.js +13 -13
  29. package/dist/src/cli/commands/plugins.js +26 -26
  30. package/dist/src/cli/commands/process.js +32 -32
  31. package/dist/src/cli/commands/progress.js +5 -5
  32. package/dist/src/cli/commands/providers.js +13 -13
  33. package/dist/src/cli/commands/route.js +26 -26
  34. package/dist/src/cli/commands/security.js +19 -19
  35. package/dist/src/cli/commands/session.js +14 -14
  36. package/dist/src/cli/commands/start.js +12 -12
  37. package/dist/src/cli/commands/status.js +9 -9
  38. package/dist/src/cli/commands/swarm.js +7 -7
  39. package/dist/src/cli/commands/task.js +10 -10
  40. package/dist/src/cli/commands/update.js +14 -14
  41. package/dist/src/cli/guidance/analyzer.js +3 -3
  42. package/dist/src/cli/guidance/gates.js +1 -1
  43. package/dist/src/cli/guidance/hooks.js +1 -1
  44. package/dist/src/cli/guidance/meta-governance.js +1 -1
  45. package/dist/src/cli/hooks/index.js +1 -1
  46. package/dist/src/cli/hooks/reasoningbank/guidance-provider.js +1 -1
  47. package/dist/src/cli/hooks/statusline/index.js +3 -3
  48. package/dist/src/cli/hooks/workers/index.js +1 -1
  49. package/dist/src/cli/hooks/workers/session-hook.js +0 -40
  50. package/dist/src/cli/index.js +2 -2
  51. package/dist/src/cli/init/executor.js +42 -26
  52. package/dist/src/cli/init/helpers-generator.js +4 -4
  53. package/dist/src/cli/init/mcp-generator.js +10 -8
  54. package/dist/src/cli/init/settings-generator.js +10 -7
  55. package/dist/src/cli/init/types.js +2 -2
  56. package/dist/src/cli/mcp-server.js +2 -1
  57. package/dist/src/cli/mcp-tools/hooks-tools.js +1 -1
  58. package/dist/src/cli/memory/auto-memory-bridge.js +1 -1
  59. package/dist/src/cli/memory/memory-initializer.js +1 -1
  60. package/dist/src/cli/movector/index.js +1 -1
  61. package/dist/src/cli/plugins/store/discovery.js +9 -9
  62. package/dist/src/cli/{transfer/ipfs/client.js → plugins/store/ipfs-client.js} +4 -1
  63. package/dist/src/cli/plugins/tests/demo-plugin-store.js +7 -7
  64. package/dist/src/cli/plugins/tests/standalone-test.js +1 -1
  65. package/dist/src/cli/runtime/headless.js +5 -4
  66. package/dist/src/cli/scripts/publish-registry.js +6 -6
  67. package/dist/src/cli/services/daemon-readiness.js +1 -1
  68. package/dist/src/cli/services/daemon-service.js +1 -1
  69. package/dist/src/cli/services/env-compat.js +29 -0
  70. package/dist/src/cli/services/hook-block-hash.js +5 -6
  71. package/dist/src/cli/services/registry-api.js +1 -1
  72. package/dist/src/cli/shared/core/config/loader.js +19 -11
  73. package/dist/src/cli/shared/events/example-usage.js +2 -2
  74. package/dist/src/cli/shared/events/index.js +1 -1
  75. package/dist/src/cli/shared/index.js +1 -1
  76. package/dist/src/cli/shared/mcp/index.js +1 -1
  77. package/dist/src/cli/shared/mcp/server.js +3 -3
  78. package/dist/src/cli/shared/plugin-interface.js +1 -1
  79. package/dist/src/cli/shared/plugins/index.js +1 -1
  80. package/dist/src/cli/shared/plugins/official/index.js +1 -1
  81. package/dist/src/cli/shared/security/index.js +1 -1
  82. package/dist/src/cli/shared/services/v3-progress.service.js +40 -29
  83. package/dist/src/cli/shared/types.js +1 -1
  84. package/dist/src/cli/swarm/coordination/swarm-hub.js +1 -1
  85. package/dist/src/cli/update/index.js +1 -1
  86. package/dist/src/cli/update/rate-limiter.js +3 -2
  87. package/dist/src/cli/version.js +1 -1
  88. package/package.json +2 -2
  89. package/dist/src/cli/commands/transfer-store.js +0 -428
  90. package/dist/src/cli/transfer/anonymization/index.js +0 -281
  91. package/dist/src/cli/transfer/deploy-seraphine.js +0 -205
  92. package/dist/src/cli/transfer/export.js +0 -113
  93. package/dist/src/cli/transfer/index.js +0 -31
  94. package/dist/src/cli/transfer/ipfs/upload.js +0 -411
  95. package/dist/src/cli/transfer/models/seraphine.js +0 -373
  96. package/dist/src/cli/transfer/serialization/cfp.js +0 -184
  97. package/dist/src/cli/transfer/storage/gcs.js +0 -242
  98. package/dist/src/cli/transfer/storage/index.js +0 -6
  99. package/dist/src/cli/transfer/store/discovery.js +0 -382
  100. package/dist/src/cli/transfer/store/download.js +0 -334
  101. package/dist/src/cli/transfer/store/index.js +0 -153
  102. package/dist/src/cli/transfer/store/publish.js +0 -294
  103. package/dist/src/cli/transfer/store/registry.js +0 -285
  104. package/dist/src/cli/transfer/store/search.js +0 -232
  105. package/dist/src/cli/transfer/store/tests/standalone-test.js +0 -190
  106. package/dist/src/cli/transfer/store/types.js +0 -6
  107. package/dist/src/cli/transfer/test-seraphine.js +0 -105
  108. package/dist/src/cli/transfer/tests/test-store.js +0 -214
  109. package/dist/src/cli/transfer/types.js +0 -6
@@ -164,17 +164,17 @@ Config is loaded from `moflo.yaml` at the project root — there is no env var t
164
164
 
165
165
  ```bash
166
166
  # Logging
167
- CLAUDE_FLOW_LOG_LEVEL=info # debug | info | warn | error
167
+ MOFLO_LOG_LEVEL=info # debug | info | warn | error
168
168
 
169
169
  # MCP Server (stdio transport — no port)
170
- CLAUDE_FLOW_MCP_TRANSPORT=stdio
170
+ MOFLO_MCP_TRANSPORT=stdio
171
171
 
172
172
  # Memory backend (legacy SystemConfig env vars — moflo.yaml `memory.backend` is the modern surface)
173
- CLAUDE_FLOW_MEMORY_BACKEND=sqlite # informational only; not consumed by selectProvider
174
- CLAUDE_FLOW_MEMORY_TYPE=sqlite # SystemConfig override (legacy)
173
+ MOFLO_MEMORY_BACKEND=sqlite # informational only; not consumed by selectProvider
174
+ MOFLO_MEMORY_TYPE=sqlite # SystemConfig override (legacy)
175
175
  ```
176
176
 
177
- Variable names retain the `CLAUDE_FLOW_` prefix for backward compatibility with consumers upgraded from claude-flow.
177
+ These use the canonical `MOFLO_` prefix. The pre-rebrand `CLAUDE_FLOW_` names are still read as a fallback for one deprecation cycle, so consumers upgraded from `claude-flow` keep working without a manual rename.
178
178
 
179
179
  ---
180
180
 
@@ -36,10 +36,10 @@ Usage:
36
36
  statusline --help Show this help
37
37
 
38
38
  Environment Variables:
39
- CLAUDE_FLOW_STATUSLINE_REFRESH Refresh interval in ms
40
- CLAUDE_FLOW_SHOW_HOOKS_METRICS Show hooks metrics (true/false)
41
- CLAUDE_FLOW_SHOW_SWARM_ACTIVITY Show swarm activity (true/false)
42
- CLAUDE_FLOW_SHOW_PERFORMANCE Show performance targets (true/false)
39
+ MOFLO_STATUSLINE_REFRESH Refresh interval in ms
40
+ MOFLO_SHOW_HOOKS_METRICS Show hooks metrics (true/false)
41
+ MOFLO_SHOW_SWARM_ACTIVITY Show swarm activity (true/false)
42
+ MOFLO_SHOW_PERFORMANCE Show performance targets (true/false)
43
43
 
44
44
  Examples:
45
45
  statusline # Display formatted status
@@ -49,13 +49,17 @@ Examples:
49
49
  process.exit(0);
50
50
  }
51
51
 
52
- // Create generator with environment-based config
52
+ // Create generator with environment-based config.
53
+ // #1209 — prefer MOFLO_* toggles, fall back to the pre-rebrand CLAUDE_FLOW_*
54
+ // names so consumers who set the old vars keep their statusline preferences.
55
+ const showEnv = (suffix) =>
56
+ process.env['MOFLO_' + suffix] ?? process.env['CLAUDE_' + 'FLOW_' + suffix];
53
57
  const generator = new StatuslineGenerator({
54
58
  enabled: true,
55
59
  refreshOnHook: true,
56
- showHooksMetrics: process.env.CLAUDE_FLOW_SHOW_HOOKS_METRICS !== 'false',
57
- showSwarmActivity: process.env.CLAUDE_FLOW_SHOW_SWARM_ACTIVITY !== 'false',
58
- showPerformance: process.env.CLAUDE_FLOW_SHOW_PERFORMANCE !== 'false',
60
+ showHooksMetrics: showEnv('SHOW_HOOKS_METRICS') !== 'false',
61
+ showSwarmActivity: showEnv('SHOW_SWARM_ACTIVITY') !== 'false',
62
+ showPerformance: showEnv('SHOW_PERFORMANCE') !== 'false',
59
63
  });
60
64
 
61
65
  // Try to read from metrics database or files
package/bin/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @moflo/cli - CLI Entry Point
4
4
  *
5
- * Claude Flow V3 Command Line Interface
5
+ * MoFlo V3 Command Line Interface
6
6
  *
7
7
  * Auto-detects MCP mode when stdin is piped and no args provided.
8
8
  * This allows: echo '{"jsonrpc":"2.0",...}' | npx @moflo/cli
package/bin/hooks.mjs CHANGED
@@ -510,7 +510,7 @@ function runBackgroundTraining() {
510
510
  // Falls back to a naive kill(0) check if the import fails (e.g. dist not built).
511
511
  let _getDaemonLockHolder = null;
512
512
  try {
513
- const daemonLockPath = resolve(__dirname, '..', 'src', '@claude-flow', 'cli', 'dist', 'src', 'services', 'daemon-lock.js');
513
+ const daemonLockPath = resolve(projectRoot, 'node_modules/moflo/dist/src/cli/services/daemon-lock.js');
514
514
  if (existsSync(daemonLockPath)) {
515
515
  const mod = await import(pathToFileURL(daemonLockPath).href);
516
516
  _getDaemonLockHolder = mod.getDaemonLockHolder;
@@ -1,17 +1,14 @@
1
1
  /**
2
2
  * Credential / secret scrubber for the session-continuity persist path (#1185).
3
3
  *
4
- * THREAT MODEL — this is deliberately NOT the transfer/anonymization pipeline
5
- * (`src/cli/transfer/anonymization/index.ts`). That module makes a CFP safe to
6
- * publish *externally* (aggressive, lossy, deterministic pseudonymisation of
7
- * emails / home paths / IPs). This module has a narrower job: a session digest
4
+ * THREAT MODEL — this scrubber has a deliberately narrow job: a session digest
8
5
  * is written to the user's OWN local `.moflo/moflo.db`, so the only thing we
9
6
  * must never persist is a literal *secret* that happened to appear in the
10
7
  * session (an API key, a JWT, a private-key block). We intentionally KEEP
11
8
  * benign context like file paths and branch names — they're the whole point of
12
9
  * a "where you left off" digest and are not sensitive on the user's own disk.
13
10
  *
14
- * Two different purposes two focused scrubbers, not one over-coupled one.
11
+ * Scope is intentionally minimal: persist useful context, never persist secrets.
15
12
  *
16
13
  * Pure + synchronous + dependency-free so a bin/*.mjs hook can call it on the
17
14
  * hot path without loading a model. Cross-platform (Rule #1): plain regex, no
@@ -121,8 +121,8 @@ const spawnCommand = {
121
121
  }
122
122
  ],
123
123
  examples: [
124
- { command: 'claude-flow agent spawn --type coder --name bot-1', description: 'Spawn a coder agent' },
125
- { command: 'claude-flow agent spawn -t researcher --task "Research React 19"', description: 'Spawn researcher with task' }
124
+ { command: 'flo agent spawn --type coder --name bot-1', description: 'Spawn a coder agent' },
125
+ { command: 'flo agent spawn -t researcher --task "Research React 19"', description: 'Spawn researcher with task' }
126
126
  ],
127
127
  action: async (ctx) => {
128
128
  let agentType = ctx.flags.type;
@@ -533,8 +533,8 @@ const poolCommand = {
533
533
  }
534
534
  ],
535
535
  examples: [
536
- { command: 'claude-flow agent pool --size 5', description: 'Set pool size' },
537
- { command: 'claude-flow agent pool --min 2 --max 15', description: 'Configure auto-scaling' }
536
+ { command: 'flo agent pool --size 5', description: 'Set pool size' },
537
+ { command: 'flo agent pool --min 2 --max 15', description: 'Configure auto-scaling' }
538
538
  ],
539
539
  action: async (ctx) => {
540
540
  try {
@@ -614,8 +614,8 @@ const healthCommand = {
614
614
  }
615
615
  ],
616
616
  examples: [
617
- { command: 'claude-flow agent health', description: 'Show all agents health' },
618
- { command: 'claude-flow agent health -i agent-001 -d', description: 'Detailed health for specific agent' }
617
+ { command: 'flo agent health', description: 'Show all agents health' },
618
+ { command: 'flo agent health -i agent-001 -d', description: 'Detailed health for specific agent' }
619
619
  ],
620
620
  action: async (ctx) => {
621
621
  const agentId = ctx.args[0] || ctx.flags.id;
@@ -737,9 +737,9 @@ const logsCommand = {
737
737
  }
738
738
  ],
739
739
  examples: [
740
- { command: 'claude-flow agent logs -i agent-001', description: 'Show agent logs' },
741
- { command: 'claude-flow agent logs -i agent-001 -f', description: 'Follow agent logs' },
742
- { command: 'claude-flow agent logs -l error --since 1h', description: 'Show errors from last hour' }
740
+ { command: 'flo agent logs -i agent-001', description: 'Show agent logs' },
741
+ { command: 'flo agent logs -i agent-001 -f', description: 'Follow agent logs' },
742
+ { command: 'flo agent logs -l error --since 1h', description: 'Show errors from last hour' }
743
743
  ],
744
744
  action: async (ctx) => {
745
745
  const agentId = ctx.args[0] || ctx.flags.id;
@@ -806,16 +806,16 @@ export const agentCommand = {
806
806
  subcommands: [spawnCommand, listCommand, statusCommand, stopCommand, metricsCommand, poolCommand, healthCommand, logsCommand],
807
807
  options: [],
808
808
  examples: [
809
- { command: 'claude-flow agent spawn -t coder', description: 'Spawn a coder agent' },
810
- { command: 'claude-flow agent list', description: 'List all agents' },
811
- { command: 'claude-flow agent status agent-001', description: 'Show agent status' }
809
+ { command: 'flo agent spawn -t coder', description: 'Spawn a coder agent' },
810
+ { command: 'flo agent list', description: 'List all agents' },
811
+ { command: 'flo agent status agent-001', description: 'Show agent status' }
812
812
  ],
813
813
  action: async (ctx) => {
814
814
  // Show help if no subcommand
815
815
  output.writeln();
816
816
  output.writeln(output.bold('Agent Management Commands'));
817
817
  output.writeln();
818
- output.writeln('Usage: claude-flow agent <subcommand> [options]');
818
+ output.writeln('Usage: flo agent <subcommand> [options]');
819
819
  output.writeln();
820
820
  output.writeln('Subcommands:');
821
821
  output.printList([
@@ -826,7 +826,7 @@ export const agentCommand = {
826
826
  `${output.highlight('metrics')} - Show agent metrics`
827
827
  ]);
828
828
  output.writeln();
829
- output.writeln('Run "claude-flow agent <subcommand> --help" for subcommand help');
829
+ output.writeln('Run "flo agent <subcommand> --help" for subcommand help');
830
830
  return { success: true };
831
831
  }
832
832
  };
@@ -80,10 +80,10 @@ const diffCommand = {
80
80
  },
81
81
  ],
82
82
  examples: [
83
- { command: 'claude-flow analyze diff --risk', description: 'Analyze current diff with risk assessment' },
84
- { command: 'claude-flow analyze diff HEAD~1 --classify', description: 'Classify changes from last commit' },
85
- { command: 'claude-flow analyze diff main..feature --format json', description: 'Compare branches with JSON output' },
86
- { command: 'claude-flow analyze diff --reviewers', description: 'Get recommended reviewers for changes' },
83
+ { command: 'flo analyze diff --risk', description: 'Analyze current diff with risk assessment' },
84
+ { command: 'flo analyze diff HEAD~1 --classify', description: 'Classify changes from last commit' },
85
+ { command: 'flo analyze diff main..feature --format json', description: 'Compare branches with JSON output' },
86
+ { command: 'flo analyze diff --reviewers', description: 'Get recommended reviewers for changes' },
87
87
  ],
88
88
  action: async (ctx) => {
89
89
  const ref = ctx.args[0] || 'HEAD';
@@ -248,8 +248,8 @@ const codeCommand = {
248
248
  { name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
249
249
  ],
250
250
  examples: [
251
- { command: 'claude-flow analyze code -p ./src', description: 'Analyze source directory' },
252
- { command: 'claude-flow analyze code --type complexity', description: 'Run complexity analysis' },
251
+ { command: 'flo analyze code -p ./src', description: 'Analyze source directory' },
252
+ { command: 'flo analyze code --type complexity', description: 'Run complexity analysis' },
253
253
  ],
254
254
  action: async (ctx) => {
255
255
  const path = ctx.flags.path || '.';
@@ -361,10 +361,10 @@ const astCommand = {
361
361
  },
362
362
  ],
363
363
  examples: [
364
- { command: 'claude-flow analyze ast src/', description: 'Analyze all files in src/' },
365
- { command: 'claude-flow analyze ast src/index.ts --complexity', description: 'Analyze with complexity' },
366
- { command: 'claude-flow analyze ast . --format json', description: 'JSON output' },
367
- { command: 'claude-flow analyze ast src/ --symbols', description: 'Extract symbols' },
364
+ { command: 'flo analyze ast src/', description: 'Analyze all files in src/' },
365
+ { command: 'flo analyze ast src/index.ts --complexity', description: 'Analyze with complexity' },
366
+ { command: 'flo analyze ast . --format json', description: 'JSON output' },
367
+ { command: 'flo analyze ast src/ --symbols', description: 'Extract symbols' },
368
368
  ],
369
369
  action: async (ctx) => {
370
370
  const targetPath = ctx.args[0] || ctx.cwd;
@@ -580,8 +580,8 @@ const complexityAstCommand = {
580
580
  },
581
581
  ],
582
582
  examples: [
583
- { command: 'claude-flow analyze complexity src/', description: 'Analyze complexity' },
584
- { command: 'claude-flow analyze complexity src/ --threshold 15', description: 'Flag high complexity' },
583
+ { command: 'flo analyze complexity src/', description: 'Analyze complexity' },
584
+ { command: 'flo analyze complexity src/ --threshold 15', description: 'Flag high complexity' },
585
585
  ],
586
586
  action: async (ctx) => {
587
587
  const targetPath = ctx.args[0] || ctx.cwd;
@@ -732,9 +732,9 @@ const symbolsCommand = {
732
732
  },
733
733
  ],
734
734
  examples: [
735
- { command: 'claude-flow analyze symbols src/', description: 'Extract all symbols' },
736
- { command: 'claude-flow analyze symbols src/ --type function', description: 'Only functions' },
737
- { command: 'claude-flow analyze symbols src/ --format json', description: 'JSON output' },
735
+ { command: 'flo analyze symbols src/', description: 'Extract all symbols' },
736
+ { command: 'flo analyze symbols src/ --type function', description: 'Only functions' },
737
+ { command: 'flo analyze symbols src/ --format json', description: 'JSON output' },
738
738
  ],
739
739
  action: async (ctx) => {
740
740
  const targetPath = ctx.args[0] || ctx.cwd;
@@ -872,8 +872,8 @@ const importsCommand = {
872
872
  },
873
873
  ],
874
874
  examples: [
875
- { command: 'claude-flow analyze imports src/', description: 'Analyze all imports' },
876
- { command: 'claude-flow analyze imports src/ --external', description: 'Only npm packages' },
875
+ { command: 'flo analyze imports src/', description: 'Analyze all imports' },
876
+ { command: 'flo analyze imports src/ --external', description: 'Only npm packages' },
877
877
  ],
878
878
  action: async (ctx) => {
879
879
  const targetPath = ctx.args[0] || ctx.cwd;
@@ -1101,8 +1101,8 @@ const depsCommand = {
1101
1101
  { name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
1102
1102
  ],
1103
1103
  examples: [
1104
- { command: 'claude-flow analyze deps --outdated', description: 'Show outdated dependencies' },
1105
- { command: 'claude-flow analyze deps --security', description: 'Check for vulnerabilities' },
1104
+ { command: 'flo analyze deps --outdated', description: 'Show outdated dependencies' },
1105
+ { command: 'flo analyze deps --security', description: 'Check for vulnerabilities' },
1106
1106
  ],
1107
1107
  action: async (ctx) => {
1108
1108
  const showOutdated = ctx.flags.outdated;
@@ -1158,9 +1158,9 @@ const boundariesCommand = {
1158
1158
  },
1159
1159
  ],
1160
1160
  examples: [
1161
- { command: 'claude-flow analyze boundaries src/', description: 'Find code boundaries in src/' },
1162
- { command: 'claude-flow analyze boundaries -p 3 src/', description: 'Find 3 partitions' },
1163
- { command: 'claude-flow analyze boundaries -f dot -o graph.dot src/', description: 'Export to DOT format' },
1161
+ { command: 'flo analyze boundaries src/', description: 'Find code boundaries in src/' },
1162
+ { command: 'flo analyze boundaries -p 3 src/', description: 'Find 3 partitions' },
1163
+ { command: 'flo analyze boundaries -f dot -o graph.dot src/', description: 'Export to DOT format' },
1164
1164
  ],
1165
1165
  action: async (ctx) => {
1166
1166
  const targetDir = ctx.args[0] || ctx.cwd;
@@ -1310,9 +1310,9 @@ const modulesCommand = {
1310
1310
  },
1311
1311
  ],
1312
1312
  examples: [
1313
- { command: 'claude-flow analyze modules src/', description: 'Detect module communities' },
1314
- { command: 'claude-flow analyze modules -f dot -o modules.dot src/', description: 'Export colored DOT graph' },
1315
- { command: 'claude-flow analyze modules -m 3 src/', description: 'Only show communities with 3+ files' },
1313
+ { command: 'flo analyze modules src/', description: 'Detect module communities' },
1314
+ { command: 'flo analyze modules -f dot -o modules.dot src/', description: 'Export colored DOT graph' },
1315
+ { command: 'flo analyze modules -m 3 src/', description: 'Only show communities with 3+ files' },
1316
1316
  ],
1317
1317
  action: async (ctx) => {
1318
1318
  const targetDir = ctx.args[0] || ctx.cwd;
@@ -1458,9 +1458,9 @@ const dependenciesCommand = {
1458
1458
  },
1459
1459
  ],
1460
1460
  examples: [
1461
- { command: 'claude-flow analyze dependencies src/', description: 'Build dependency graph' },
1462
- { command: 'claude-flow analyze dependencies -f dot -o deps.dot src/', description: 'Export to DOT' },
1463
- { command: 'claude-flow analyze dependencies -i .ts,.tsx src/', description: 'Only TypeScript files' },
1461
+ { command: 'flo analyze dependencies src/', description: 'Build dependency graph' },
1462
+ { command: 'flo analyze dependencies -f dot -o deps.dot src/', description: 'Export to DOT' },
1463
+ { command: 'flo analyze dependencies -i .ts,.tsx src/', description: 'Only TypeScript files' },
1464
1464
  ],
1465
1465
  action: async (ctx) => {
1466
1466
  const targetDir = ctx.args[0] || ctx.cwd;
@@ -1622,8 +1622,8 @@ const circularCommand = {
1622
1622
  },
1623
1623
  ],
1624
1624
  examples: [
1625
- { command: 'claude-flow analyze circular src/', description: 'Find circular dependencies' },
1626
- { command: 'claude-flow analyze circular -s high src/', description: 'Only high severity cycles' },
1625
+ { command: 'flo analyze circular src/', description: 'Find circular dependencies' },
1626
+ { command: 'flo analyze circular -s high src/', description: 'Only high severity cycles' },
1627
1627
  ],
1628
1628
  action: async (ctx) => {
1629
1629
  const targetDir = ctx.args[0] || ctx.cwd;
@@ -1765,16 +1765,16 @@ export const analyzeCommand = {
1765
1765
  },
1766
1766
  ],
1767
1767
  examples: [
1768
- { command: 'claude-flow analyze ast src/', description: 'Analyze code with AST parsing' },
1769
- { command: 'claude-flow analyze complexity src/ --threshold 15', description: 'Find high-complexity files' },
1770
- { command: 'claude-flow analyze symbols src/ --type function', description: 'Extract all functions' },
1771
- { command: 'claude-flow analyze imports src/ --external', description: 'List npm dependencies' },
1772
- { command: 'claude-flow analyze diff --risk', description: 'Analyze diff with risk assessment' },
1773
- { command: 'claude-flow analyze boundaries src/', description: 'Find code boundaries using MinCut' },
1774
- { command: 'claude-flow analyze modules src/', description: 'Detect module communities with Louvain' },
1775
- { command: 'claude-flow analyze dependencies src/ --format dot', description: 'Export dependency graph as DOT' },
1776
- { command: 'claude-flow analyze circular src/', description: 'Find circular dependencies' },
1777
- { command: 'claude-flow analyze deps --security', description: 'Check dependency vulnerabilities' },
1768
+ { command: 'flo analyze ast src/', description: 'Analyze code with AST parsing' },
1769
+ { command: 'flo analyze complexity src/ --threshold 15', description: 'Find high-complexity files' },
1770
+ { command: 'flo analyze symbols src/ --type function', description: 'Extract all functions' },
1771
+ { command: 'flo analyze imports src/ --external', description: 'List npm dependencies' },
1772
+ { command: 'flo analyze diff --risk', description: 'Analyze diff with risk assessment' },
1773
+ { command: 'flo analyze boundaries src/', description: 'Find code boundaries using MinCut' },
1774
+ { command: 'flo analyze modules src/', description: 'Detect module communities with Louvain' },
1775
+ { command: 'flo analyze dependencies src/ --format dot', description: 'Export dependency graph as DOT' },
1776
+ { command: 'flo analyze circular src/', description: 'Find circular dependencies' },
1777
+ { command: 'flo analyze deps --security', description: 'Check dependency vulnerabilities' },
1778
1778
  ],
1779
1779
  action: async (ctx) => {
1780
1780
  // If no subcommand, show help
@@ -1798,24 +1798,24 @@ export const analyzeCommand = {
1798
1798
  output.writeln();
1799
1799
  output.writeln(output.bold('AST Analysis Examples:'));
1800
1800
  output.writeln();
1801
- output.writeln(` ${output.dim('claude-flow analyze ast src/')} # Full AST analysis`);
1802
- output.writeln(` ${output.dim('claude-flow analyze ast src/index.ts -c')} # Include complexity`);
1803
- output.writeln(` ${output.dim('claude-flow analyze complexity src/ -t 15')} # Flag high complexity`);
1804
- output.writeln(` ${output.dim('claude-flow analyze symbols src/ --type fn')} # Extract functions`);
1805
- output.writeln(` ${output.dim('claude-flow analyze imports src/ --external')} # Only npm imports`);
1801
+ output.writeln(` ${output.dim('flo analyze ast src/')} # Full AST analysis`);
1802
+ output.writeln(` ${output.dim('flo analyze ast src/index.ts -c')} # Include complexity`);
1803
+ output.writeln(` ${output.dim('flo analyze complexity src/ -t 15')} # Flag high complexity`);
1804
+ output.writeln(` ${output.dim('flo analyze symbols src/ --type fn')} # Extract functions`);
1805
+ output.writeln(` ${output.dim('flo analyze imports src/ --external')} # Only npm imports`);
1806
1806
  output.writeln();
1807
1807
  output.writeln(output.bold('Graph Analysis Examples:'));
1808
1808
  output.writeln();
1809
- output.writeln(` ${output.dim('claude-flow analyze boundaries src/')} # Find natural code boundaries`);
1810
- output.writeln(` ${output.dim('claude-flow analyze modules src/')} # Detect module communities`);
1811
- output.writeln(` ${output.dim('claude-flow analyze dependencies -f dot src/')} # Export to DOT format`);
1812
- output.writeln(` ${output.dim('claude-flow analyze circular src/')} # Find circular deps`);
1809
+ output.writeln(` ${output.dim('flo analyze boundaries src/')} # Find natural code boundaries`);
1810
+ output.writeln(` ${output.dim('flo analyze modules src/')} # Detect module communities`);
1811
+ output.writeln(` ${output.dim('flo analyze dependencies -f dot src/')} # Export to DOT format`);
1812
+ output.writeln(` ${output.dim('flo analyze circular src/')} # Find circular deps`);
1813
1813
  output.writeln();
1814
1814
  output.writeln(output.bold('Diff Analysis Examples:'));
1815
1815
  output.writeln();
1816
- output.writeln(` ${output.dim('claude-flow analyze diff --risk')} # Risk assessment`);
1817
- output.writeln(` ${output.dim('claude-flow analyze diff HEAD~1 --classify')} # Classify changes`);
1818
- output.writeln(` ${output.dim('claude-flow analyze diff main..feature')} # Compare branches`);
1816
+ output.writeln(` ${output.dim('flo analyze diff --risk')} # Risk assessment`);
1817
+ output.writeln(` ${output.dim('flo analyze diff HEAD~1 --classify')} # Classify changes`);
1818
+ output.writeln(` ${output.dim('flo analyze diff main..feature')} # Compare branches`);
1819
1819
  output.writeln();
1820
1820
  return { success: true };
1821
1821
  },
@@ -22,9 +22,9 @@ const pretrainCommand = {
22
22
  { name: 'verbose', short: 'v', type: 'boolean', description: 'Verbose output', default: 'false' },
23
23
  ],
24
24
  examples: [
25
- { command: 'claude-flow benchmark pretrain', description: 'Run pre-training benchmarks' },
26
- { command: 'claude-flow benchmark pretrain -i 500 --save results.json', description: 'Extended benchmark with results saved' },
27
- { command: 'claude-flow benchmark pretrain -o json', description: 'Output results as JSON' },
25
+ { command: 'flo benchmark pretrain', description: 'Run pre-training benchmarks' },
26
+ { command: 'flo benchmark pretrain -i 500 --save results.json', description: 'Extended benchmark with results saved' },
27
+ { command: 'flo benchmark pretrain -o json', description: 'Output results as JSON' },
28
28
  ],
29
29
  action: async (ctx) => {
30
30
  const iterations = parseInt(ctx.flags.iterations || '100', 10);
@@ -85,8 +85,8 @@ const neuralCommand = {
85
85
  { name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
86
86
  ],
87
87
  examples: [
88
- { command: 'claude-flow benchmark neural', description: 'Run neural benchmarks' },
89
- { command: 'claude-flow benchmark neural -d 768 -n 5000', description: 'Higher dimension, more vectors' },
88
+ { command: 'flo benchmark neural', description: 'Run neural benchmarks' },
89
+ { command: 'flo benchmark neural -d 768 -n 5000', description: 'Higher dimension, more vectors' },
90
90
  ],
91
91
  action: async (ctx) => {
92
92
  const iterations = parseInt(ctx.flags.iterations || '100', 10);
@@ -243,7 +243,7 @@ const memoryCommand = {
243
243
  { name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
244
244
  ],
245
245
  examples: [
246
- { command: 'claude-flow benchmark memory', description: 'Run memory benchmarks' },
246
+ { command: 'flo benchmark memory', description: 'Run memory benchmarks' },
247
247
  ],
248
248
  action: async (ctx) => {
249
249
  const iterations = parseInt(ctx.flags.iterations || '100', 10);
@@ -358,8 +358,8 @@ const allCommand = {
358
358
  { name: 'save', short: 's', type: 'string', description: 'Save results to file' },
359
359
  ],
360
360
  examples: [
361
- { command: 'claude-flow benchmark all', description: 'Run all benchmarks' },
362
- { command: 'claude-flow benchmark all --save full-results.json', description: 'Run all and save results' },
361
+ { command: 'flo benchmark all', description: 'Run all benchmarks' },
362
+ { command: 'flo benchmark all --save full-results.json', description: 'Run all and save results' },
363
363
  ],
364
364
  action: async (ctx) => {
365
365
  output.writeln();
@@ -425,10 +425,10 @@ export const benchmarkCommand = {
425
425
  allCommand,
426
426
  ],
427
427
  examples: [
428
- { command: 'claude-flow benchmark pretrain', description: 'Benchmark pre-training system' },
429
- { command: 'claude-flow benchmark neural', description: 'Benchmark neural operations' },
430
- { command: 'claude-flow benchmark memory', description: 'Benchmark memory operations' },
431
- { command: 'claude-flow benchmark all', description: 'Run all benchmarks' },
428
+ { command: 'flo benchmark pretrain', description: 'Benchmark pre-training system' },
429
+ { command: 'flo benchmark neural', description: 'Benchmark neural operations' },
430
+ { command: 'flo benchmark memory', description: 'Benchmark memory operations' },
431
+ { command: 'flo benchmark all', description: 'Run all benchmarks' },
432
432
  ],
433
433
  action: async (_ctx) => {
434
434
  output.writeln();
@@ -442,8 +442,8 @@ export const benchmarkCommand = {
442
442
  output.writeln(` ${output.highlight('all')} - Run all benchmark suites`);
443
443
  output.writeln();
444
444
  output.writeln('Examples:');
445
- output.writeln(' claude-flow benchmark pretrain -i 200');
446
- output.writeln(' claude-flow benchmark all --save results.json');
445
+ output.writeln(' flo benchmark pretrain -i 200');
446
+ output.writeln(' flo benchmark all --save results.json');
447
447
  output.writeln();
448
448
  return { success: true, message: 'Use a subcommand to run benchmarks' };
449
449
  },
@@ -16,8 +16,8 @@ const listCommand = {
16
16
  { name: 'resource', type: 'string', description: 'Filter by resource' },
17
17
  ],
18
18
  examples: [
19
- { command: 'claude-flow claims list', description: 'List all claims' },
20
- { command: 'claude-flow claims list -u user123', description: 'List user claims' },
19
+ { command: 'flo claims list', description: 'List all claims' },
20
+ { command: 'flo claims list -u user123', description: 'List user claims' },
21
21
  ],
22
22
  action: async (ctx) => {
23
23
  output.writeln();
@@ -54,8 +54,8 @@ const checkCommand = {
54
54
  { name: 'resource', short: 'r', type: 'string', description: 'Resource context' },
55
55
  ],
56
56
  examples: [
57
- { command: 'claude-flow claims check -c swarm:create', description: 'Check swarm creation permission' },
58
- { command: 'claude-flow claims check -c admin:delete -u user123', description: 'Check user permission' },
57
+ { command: 'flo claims check -c swarm:create', description: 'Check swarm creation permission' },
58
+ { command: 'flo claims check -c admin:delete -u user123', description: 'Check user permission' },
59
59
  ],
60
60
  action: async (ctx) => {
61
61
  const claim = ctx.flags.claim;
@@ -186,8 +186,8 @@ const grantCommand = {
186
186
  { name: 'expires', short: 'e', type: 'string', description: 'Expiration time (e.g., 24h, 7d)' },
187
187
  ],
188
188
  examples: [
189
- { command: 'claude-flow claims grant -c swarm:create -u user123', description: 'Grant to user' },
190
- { command: 'claude-flow claims grant -c agent:spawn -r developer', description: 'Grant to role' },
189
+ { command: 'flo claims grant -c swarm:create -u user123', description: 'Grant to user' },
190
+ { command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant to role' },
191
191
  ],
192
192
  action: async (ctx) => {
193
193
  const claim = ctx.flags.claim;
@@ -227,8 +227,8 @@ const revokeCommand = {
227
227
  { name: 'role', short: 'r', type: 'string', description: 'Role name' },
228
228
  ],
229
229
  examples: [
230
- { command: 'claude-flow claims revoke -c swarm:delete -u user123', description: 'Revoke from user' },
231
- { command: 'claude-flow claims revoke -c admin:* -r guest', description: 'Revoke from role' },
230
+ { command: 'flo claims revoke -c swarm:delete -u user123', description: 'Revoke from user' },
231
+ { command: 'flo claims revoke -c admin:* -r guest', description: 'Revoke from role' },
232
232
  ],
233
233
  action: async (ctx) => {
234
234
  const claim = ctx.flags.claim;
@@ -255,8 +255,8 @@ const rolesCommand = {
255
255
  { name: 'name', short: 'n', type: 'string', description: 'Role name' },
256
256
  ],
257
257
  examples: [
258
- { command: 'claude-flow claims roles', description: 'List all roles' },
259
- { command: 'claude-flow claims roles -a show -n admin', description: 'Show role details' },
258
+ { command: 'flo claims roles', description: 'List all roles' },
259
+ { command: 'flo claims roles -a show -n admin', description: 'Show role details' },
260
260
  ],
261
261
  action: async (ctx) => {
262
262
  const action = ctx.flags.action || 'list';
@@ -308,8 +308,8 @@ const policiesCommand = {
308
308
  { name: 'name', short: 'n', type: 'string', description: 'Policy name' },
309
309
  ],
310
310
  examples: [
311
- { command: 'claude-flow claims policies', description: 'List policies' },
312
- { command: 'claude-flow claims policies -a create -n rate-limit', description: 'Create policy' },
311
+ { command: 'flo claims policies', description: 'List policies' },
312
+ { command: 'flo claims policies -a create -n rate-limit', description: 'Create policy' },
313
313
  ],
314
314
  action: async (ctx) => {
315
315
  output.writeln();
@@ -339,9 +339,9 @@ export const claimsCommand = {
339
339
  description: 'Claims-based authorization, permissions, and access control',
340
340
  subcommands: [listCommand, checkCommand, grantCommand, revokeCommand, rolesCommand, policiesCommand],
341
341
  examples: [
342
- { command: 'claude-flow claims list', description: 'List all claims' },
343
- { command: 'claude-flow claims check -c swarm:create', description: 'Check permission' },
344
- { command: 'claude-flow claims grant -c agent:spawn -r developer', description: 'Grant claim' },
342
+ { command: 'flo claims list', description: 'List all claims' },
343
+ { command: 'flo claims check -c swarm:create', description: 'Check permission' },
344
+ { command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant claim' },
345
345
  ],
346
346
  action: async () => {
347
347
  output.writeln();