@claude-flow/cli 3.0.0-alpha.26 → 3.0.0-alpha.28

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.
package/README.md CHANGED
@@ -5,16 +5,16 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
7
7
  [![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)
8
- [![Commands](https://img.shields.io/badge/Commands-26-orange.svg)](https://github.com/ruvnet/claude-flow)
9
- [![Subcommands](https://img.shields.io/badge/Subcommands-140+-purple.svg)](https://github.com/ruvnet/claude-flow)
8
+ [![Commands](https://img.shields.io/badge/Commands-29-orange.svg)](https://github.com/ruvnet/claude-flow)
9
+ [![Subcommands](https://img.shields.io/badge/Subcommands-170+-purple.svg)](https://github.com/ruvnet/claude-flow)
10
10
 
11
- > Modern CLI module for Claude Flow V3 - comprehensive command-line interface with 26 commands, 140+ subcommands, interactive prompts, self-learning hooks, background workers, hive-mind coordination, smart error suggestions, and beautiful output formatting.
11
+ > Modern CLI module for Claude Flow V3 - comprehensive command-line interface with 29 commands, 170+ subcommands, interactive prompts, self-learning hooks, background workers, hive-mind coordination, Q-Learning agent routing, code analysis, collaborative issue claims, smart error suggestions, and beautiful output formatting.
12
12
 
13
13
  ## Features
14
14
 
15
15
  ### Core Capabilities
16
- - **26 Main Commands** - Complete CLI coverage for all Claude Flow operations
17
- - **140+ Subcommands** - Fine-grained control over every aspect of the system
16
+ - **29 Main Commands** - Complete CLI coverage for all Claude Flow operations
17
+ - **170+ Subcommands** - Fine-grained control over every aspect of the system
18
18
  - **Advanced Argument Parsing** - Full support for flags, options, subcommands, and positional arguments
19
19
  - **Interactive Prompts** - Rich interactive mode with confirmations, selections, and input validation
20
20
  - **Beautiful Output** - Colored output, tables, progress bars, spinners, and multiple formats (text, JSON, table)
@@ -26,6 +26,9 @@
26
26
  - **15-Agent Swarm** - V3 hierarchical mesh coordination with domain specialization
27
27
  - **AgentDB Integration** - 150x-12,500x faster vector search with HNSW indexing
28
28
  - **SONA Learning** - Sub-0.05ms adaptation with Mixture of Experts routing
29
+ - **Q-Learning Routing** - Intelligent task-to-agent routing with reinforcement learning
30
+ - **Code Analysis** - AST analysis, diff classification, complexity metrics, boundary detection
31
+ - **Issue Claims (ADR-016)** - Collaborative human-agent issue management with work stealing
29
32
 
30
33
  ### Developer Experience
31
34
  - **Type-Safe** - Full TypeScript support with comprehensive type definitions
@@ -65,6 +68,15 @@ claude-flow swarm init --v3-mode
65
68
  # Search memory
66
69
  claude-flow memory search -q "authentication patterns"
67
70
 
71
+ # Route task to optimal agent (Q-Learning)
72
+ claude-flow route task "Implement OAuth2 authentication"
73
+
74
+ # Analyze code complexity
75
+ claude-flow analyze complexity ./src
76
+
77
+ # Claim an issue
78
+ claude-flow issues claim ISSUE-123
79
+
68
80
  # Check system status
69
81
  claude-flow status --watch
70
82
  ```
@@ -99,6 +111,9 @@ claude-flow status --watch
99
111
  | `deployment` | 5 | Deployment management (deploy, rollback, status, environments, release) |
100
112
  | `embeddings` | 4 | Vector embeddings (embed, batch, search, init) - 75x faster with agentic-flow |
101
113
  | `claims` | 4 | Claims-based authorization (check, grant, revoke, list) |
114
+ | `issues` | 10 | Collaborative issue claims with work stealing (ADR-016) |
115
+ | `route` | 7 | Q-Learning agent routing with reinforcement learning |
116
+ | `analyze` | 11 | Code analysis (AST, diff, complexity, boundaries, dependencies) |
102
117
  | `doctor` | 1 | System diagnostics with health checks and suggested fixes |
103
118
  | `completions` | 4 | Shell completions for bash, zsh, fish, and PowerShell |
104
119
 
@@ -1043,6 +1058,247 @@ All checks passed with some warnings.
1043
1058
 
1044
1059
  ---
1045
1060
 
1061
+ ### `route` - Q-Learning Agent Router
1062
+
1063
+ Intelligent task-to-agent routing using reinforcement learning.
1064
+
1065
+ ```bash
1066
+ claude-flow route <subcommand> [options]
1067
+ ```
1068
+
1069
+ #### Subcommands
1070
+
1071
+ | Subcommand | Description |
1072
+ |------------|-------------|
1073
+ | `task` | Route a task to optimal agent using Q-Learning |
1074
+ | `list-agents` | List available agent types with capabilities |
1075
+ | `stats` | Show router statistics and learning metrics |
1076
+ | `feedback` | Provide routing feedback for continuous learning |
1077
+ | `reset` | Reset Q-Learning router state |
1078
+ | `export` | Export Q-table for persistence |
1079
+ | `import` | Import Q-table from file |
1080
+
1081
+ #### Agent Types
1082
+
1083
+ | Type | Description |
1084
+ |------|-------------|
1085
+ | `coder` | Code implementation and debugging |
1086
+ | `tester` | Testing and quality assurance |
1087
+ | `reviewer` | Code review and quality checks |
1088
+ | `architect` | System design and architecture |
1089
+ | `researcher` | Research and information gathering |
1090
+ | `optimizer` | Performance optimization |
1091
+ | `debugger` | Bug fixing and troubleshooting |
1092
+ | `documenter` | Documentation and comments |
1093
+
1094
+ #### How It Works
1095
+
1096
+ 1. **State Encoding** - Analyzes task description using hash-based feature extraction
1097
+ 2. **Q-Learning** - Uses Q-table to map (state, action) pairs to expected rewards
1098
+ 3. **Epsilon-Greedy** - Balances exploration (try new agents) vs exploitation (use best known)
1099
+ 4. **Feedback Loop** - Learns from success/failure outcomes to improve routing
1100
+
1101
+ #### Examples
1102
+
1103
+ ```bash
1104
+ # Route a task to optimal agent
1105
+ claude-flow route task "Implement user authentication with JWT"
1106
+
1107
+ # Route with verbose output showing decision process
1108
+ claude-flow route task "Fix memory leak in API handler" --verbose
1109
+
1110
+ # List available agent types
1111
+ claude-flow route list-agents
1112
+
1113
+ # View router statistics
1114
+ claude-flow route stats
1115
+
1116
+ # Provide feedback (reward: -1 to 1)
1117
+ claude-flow route feedback --agent coder --reward 0.8 --task "auth implementation"
1118
+
1119
+ # Export Q-table for backup
1120
+ claude-flow route export -o ./q-table.json
1121
+
1122
+ # Import Q-table
1123
+ claude-flow route import -i ./q-table.json
1124
+
1125
+ # Reset router (start fresh)
1126
+ claude-flow route reset --confirm
1127
+ ```
1128
+
1129
+ ---
1130
+
1131
+ ### `analyze` - Code Analysis
1132
+
1133
+ Comprehensive code analysis with AST parsing, diff classification, complexity metrics, and dependency analysis.
1134
+
1135
+ ```bash
1136
+ claude-flow analyze <subcommand> [options]
1137
+ ```
1138
+
1139
+ #### Subcommands
1140
+
1141
+ | Subcommand | Description | Algorithm |
1142
+ |------------|-------------|-----------|
1143
+ | `ast` | AST analysis with symbol extraction | tree-sitter (regex fallback) |
1144
+ | `complexity` | Cyclomatic and cognitive complexity | McCabe + cognitive metrics |
1145
+ | `symbols` | Extract functions, classes, types | AST parsing |
1146
+ | `imports` | Import dependency analysis | Static analysis |
1147
+ | `diff` | Diff classification and risk assessment | Pattern matching |
1148
+ | `boundaries` | Code boundaries detection | MinCut algorithm |
1149
+ | `modules` | Module community detection | Louvain algorithm |
1150
+ | `dependencies` | Full dependency graph | Graph building |
1151
+ | `circular` | Circular dependency detection | Tarjan's SCC |
1152
+ | `deps` | Project dependency analysis | npm/yarn |
1153
+ | `code` | Static code quality analysis | Multi-metric |
1154
+
1155
+ #### Diff Risk Levels
1156
+
1157
+ | Risk | Color | Description |
1158
+ |------|-------|-------------|
1159
+ | `critical` | Red | Breaking changes, security-sensitive |
1160
+ | `high` | Orange | Core logic, API changes |
1161
+ | `medium` | Yellow | Feature additions, significant refactoring |
1162
+ | `low` | Green | Documentation, tests, formatting |
1163
+
1164
+ #### Examples
1165
+
1166
+ ```bash
1167
+ # Analyze AST of a file
1168
+ claude-flow analyze ast ./src/auth/login.ts
1169
+
1170
+ # Analyze with symbol extraction
1171
+ claude-flow analyze symbols ./src/services/ --recursive
1172
+
1173
+ # Check cyclomatic complexity
1174
+ claude-flow analyze complexity ./src --threshold 10
1175
+
1176
+ # Classify a git diff
1177
+ claude-flow analyze diff HEAD~1
1178
+
1179
+ # Classify staged changes
1180
+ claude-flow analyze diff --staged
1181
+
1182
+ # Find code boundaries (module splits)
1183
+ claude-flow analyze boundaries ./src --min-cut
1184
+
1185
+ # Detect module communities
1186
+ claude-flow analyze modules ./src --algorithm louvain
1187
+
1188
+ # Find circular dependencies
1189
+ claude-flow analyze circular ./src
1190
+
1191
+ # Full dependency graph
1192
+ claude-flow analyze dependencies ./src -o ./deps.dot --format dot
1193
+
1194
+ # Project dependency analysis
1195
+ claude-flow analyze deps --outdated
1196
+ ```
1197
+
1198
+ ---
1199
+
1200
+ ### `issues` - Collaborative Issue Claims (ADR-016)
1201
+
1202
+ Human-agent collaborative issue management with work stealing, load balancing, and handoffs.
1203
+
1204
+ ```bash
1205
+ claude-flow issues <subcommand> [options]
1206
+ ```
1207
+
1208
+ #### Subcommands
1209
+
1210
+ | Subcommand | Description |
1211
+ |------------|-------------|
1212
+ | `list` | List all active claims |
1213
+ | `claim` | Claim an issue for yourself or an agent |
1214
+ | `release` | Release a claim |
1215
+ | `handoff` | Request handoff to another agent/user |
1216
+ | `status` | Update claim status and progress |
1217
+ | `stealable` | List issues available for work stealing |
1218
+ | `steal` | Steal an issue from overloaded/stale claimant |
1219
+ | `load` | View agent load distribution |
1220
+ | `rebalance` | Rebalance claims across swarm |
1221
+ | `board` | Visual Kanban-style claim board |
1222
+
1223
+ #### Claim Status
1224
+
1225
+ | Status | Description |
1226
+ |--------|-------------|
1227
+ | `active` | Actively being worked on |
1228
+ | `paused` | Temporarily paused |
1229
+ | `blocked` | Blocked by dependency |
1230
+ | `stealable` | Available for work stealing |
1231
+ | `completed` | Work completed |
1232
+ | `handoff-pending` | Awaiting handoff acceptance |
1233
+ | `review-requested` | Needs review |
1234
+
1235
+ #### Work Stealing
1236
+
1237
+ Issues can be marked stealable when:
1238
+ - **Overloaded** - Claimant has too many active claims
1239
+ - **Stale** - No progress for extended period
1240
+ - **Blocked** - Blocked beyond timeout threshold
1241
+ - **Voluntary** - Claimant voluntarily releases
1242
+
1243
+ #### Examples
1244
+
1245
+ ```bash
1246
+ # List all claims
1247
+ claude-flow issues list
1248
+
1249
+ # List with status filter
1250
+ claude-flow issues list --status active
1251
+
1252
+ # Claim an issue
1253
+ claude-flow issues claim ISSUE-123
1254
+
1255
+ # Claim as agent
1256
+ claude-flow issues claim ISSUE-123 --as-agent --type coder
1257
+
1258
+ # Update progress
1259
+ claude-flow issues status ISSUE-123 --progress 50
1260
+
1261
+ # Mark as blocked
1262
+ claude-flow issues status ISSUE-123 --set blocked --note "Waiting for API"
1263
+
1264
+ # Request handoff to another user
1265
+ claude-flow issues handoff ISSUE-123 --to user:alice:Alice
1266
+
1267
+ # Request handoff to agent
1268
+ claude-flow issues handoff ISSUE-123 --to agent:coder:coder-001
1269
+
1270
+ # View stealable issues
1271
+ claude-flow issues stealable
1272
+
1273
+ # Steal an issue
1274
+ claude-flow issues steal ISSUE-123 --reason overloaded
1275
+
1276
+ # View agent load
1277
+ claude-flow issues load
1278
+
1279
+ # Rebalance swarm
1280
+ claude-flow issues rebalance --strategy even
1281
+
1282
+ # Visual board view
1283
+ claude-flow issues board
1284
+ ```
1285
+
1286
+ #### Board View
1287
+
1288
+ ```
1289
+ 📋 Issue Claims Board
1290
+ ────────────────────────────────────────────────────────────────
1291
+
1292
+ ACTIVE (3) PAUSED (1) BLOCKED (1)
1293
+ ──────────────── ──────────────── ────────────────
1294
+ │ ISSUE-123 │ │ ISSUE-456 │ │ ISSUE-789 │
1295
+ │ 🤖 coder │ │ 👤 alice │ │ 🤖 tester │
1296
+ │ 75% ████░░░ │ │ 30% ██░░░░░ │ │ 50% ███░░░░ │
1297
+ └──────────────┘ └──────────────┘ └──────────────┘
1298
+ ```
1299
+
1300
+ ---
1301
+
1046
1302
  ### `completions` - Shell Completions
1047
1303
 
1048
1304
  Generate shell completion scripts for tab completion of commands.
@@ -1081,7 +1337,7 @@ claude-flow completions powershell >> $PROFILE
1081
1337
 
1082
1338
  #### Completion Features
1083
1339
 
1084
- - All 26 top-level commands
1340
+ - All 29 top-level commands
1085
1341
  - Full subcommand completion for each command
1086
1342
  - Flag and option completion
1087
1343
  - Dynamic suggestions based on context
@@ -9,6 +9,8 @@ import type { Command } from '../types.js';
9
9
  export { initCommand } from './init.js';
10
10
  export { startCommand } from './start.js';
11
11
  export { statusCommand } from './status.js';
12
+ export { taskCommand } from './task.js';
13
+ export { sessionCommand } from './session.js';
12
14
  export { agentCommand } from './agent.js';
13
15
  export { swarmCommand } from './swarm.js';
14
16
  export { memoryCommand } from './memory.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAwH3C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,wBAAsB,gBAAgB,iCAAoC;AAC1E,wBAAsB,iBAAiB,iCAAqC;AAC5E,wBAAsB,kBAAkB,iCAAsC;AAC9E,wBAAsB,kBAAkB,iCAAuC;AAC/E,wBAAsB,iBAAiB,iCAAqC;AAC5E,wBAAsB,cAAc,iCAAkC;AACtE,wBAAsB,iBAAiB,iCAAqC;AAC5E,wBAAsB,gBAAgB,iCAAoC;AAC1E,wBAAsB,kBAAkB,iCAAsC;AAC9E,wBAAsB,qBAAqB,iCAAyC;AACpF,wBAAsB,mBAAmB,iCAAu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xE,wBAAsB,kBAAkB,iCAAsC;AAC9E,wBAAsB,gBAAgB,iCAAoC;AAE1E;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,EAc7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,sBAA6B,CAAC;AAY1D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE5D;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAWhF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAO1C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,EAAE,CAE7C;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAa1D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GAAG,IAAI,CAI5E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9F"}
@@ -85,6 +85,8 @@ async function loadCommand(name) {
85
85
  import { initCommand } from './init.js';
86
86
  import { startCommand } from './start.js';
87
87
  import { statusCommand } from './status.js';
88
+ import { taskCommand } from './task.js';
89
+ import { sessionCommand } from './session.js';
88
90
  import { agentCommand } from './agent.js';
89
91
  import { swarmCommand } from './swarm.js';
90
92
  import { memoryCommand } from './memory.js';
@@ -96,6 +98,8 @@ import { doctorCommand } from './doctor.js';
96
98
  loadedCommands.set('init', initCommand);
97
99
  loadedCommands.set('start', startCommand);
98
100
  loadedCommands.set('status', statusCommand);
101
+ loadedCommands.set('task', taskCommand);
102
+ loadedCommands.set('session', sessionCommand);
99
103
  loadedCommands.set('agent', agentCommand);
100
104
  loadedCommands.set('swarm', swarmCommand);
101
105
  loadedCommands.set('memory', memoryCommand);
@@ -110,6 +114,8 @@ loadedCommands.set('doctor', doctorCommand);
110
114
  export { initCommand } from './init.js';
111
115
  export { startCommand } from './start.js';
112
116
  export { statusCommand } from './status.js';
117
+ export { taskCommand } from './task.js';
118
+ export { sessionCommand } from './session.js';
113
119
  export { agentCommand } from './agent.js';
114
120
  export { swarmCommand } from './swarm.js';
115
121
  export { memoryCommand } from './memory.js';
@@ -147,6 +153,8 @@ export const commands = [
147
153
  initCommand,
148
154
  startCommand,
149
155
  statusCommand,
156
+ taskCommand,
157
+ sessionCommand,
150
158
  agentCommand,
151
159
  swarmCommand,
152
160
  memoryCommand,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH;;;GAGG;AACH,MAAM,cAAc,GAAkC;IACpD,kDAAkD;IAClD,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC;IAC/B,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACjC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;IACnC,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC;IAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;IACrC,oBAAoB;IACpB,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACjC,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;IACjC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;IACnC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,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAwC;IAC7E,MAAM,WAAW,GAAG,MAAM,eAAe,EAAE,CAAC;IAC5C,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/commands/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AA8jB1E,eAAO,MAAM,YAAY,EAAE,OAuF1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/commands/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAiyB1E,eAAO,MAAM,YAAY,EAAE,OAwF1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -516,6 +516,215 @@ const importCommand = {
516
516
  },
517
517
  };
518
518
  // ============================================================================
519
+ // Coverage-Aware Routing Subcommand
520
+ // ============================================================================
521
+ const coverageRouteCommand = {
522
+ name: 'coverage',
523
+ aliases: ['cov'],
524
+ description: 'Route tasks based on test coverage analysis (ADR-017)',
525
+ options: [
526
+ {
527
+ name: 'path',
528
+ short: 'p',
529
+ description: 'Path to analyze for coverage',
530
+ type: 'string',
531
+ },
532
+ {
533
+ name: 'threshold',
534
+ short: 't',
535
+ description: 'Coverage threshold percentage (default: 80)',
536
+ type: 'number',
537
+ default: 80,
538
+ },
539
+ {
540
+ name: 'suggest',
541
+ short: 's',
542
+ description: 'Get suggestions for improving coverage',
543
+ type: 'boolean',
544
+ default: false,
545
+ },
546
+ {
547
+ name: 'gaps',
548
+ short: 'g',
549
+ description: 'List coverage gaps with agent assignments',
550
+ type: 'boolean',
551
+ default: false,
552
+ },
553
+ {
554
+ name: 'json',
555
+ short: 'j',
556
+ description: 'Output in JSON format',
557
+ type: 'boolean',
558
+ default: false,
559
+ },
560
+ ],
561
+ examples: [
562
+ { command: 'claude-flow route coverage', description: 'Analyze coverage and suggest routing' },
563
+ { command: 'claude-flow route coverage --suggest', description: 'Get improvement suggestions' },
564
+ { command: 'claude-flow route coverage --gaps', description: 'List coverage gaps by agent' },
565
+ { command: 'claude-flow route coverage -p src/auth -t 90', description: 'Analyze specific path with threshold' },
566
+ ],
567
+ action: async (ctx) => {
568
+ const path = ctx.flags.path || '';
569
+ const threshold = ctx.flags.threshold || 80;
570
+ const suggestMode = ctx.flags.suggest;
571
+ const gapsMode = ctx.flags.gaps;
572
+ const jsonOutput = ctx.flags.json;
573
+ const spinner = output.createSpinner({ text: 'Analyzing coverage...', spinner: 'dots' });
574
+ spinner.start();
575
+ try {
576
+ // Lazy load coverage router
577
+ const { coverageRoute, coverageSuggest, coverageGaps } = await import('../ruvector/coverage-router.js');
578
+ if (gapsMode) {
579
+ // List coverage gaps with agent assignments
580
+ const result = await coverageGaps({ threshold, groupByAgent: true });
581
+ spinner.succeed(`Found ${result.totalGaps} coverage gaps`);
582
+ if (jsonOutput) {
583
+ output.printJson(result);
584
+ }
585
+ else {
586
+ output.writeln();
587
+ output.writeln(output.bold('Coverage Gaps by Agent'));
588
+ output.writeln(output.dim(result.summary));
589
+ output.writeln();
590
+ if (Object.keys(result.byAgent).length > 0) {
591
+ for (const [agent, files] of Object.entries(result.byAgent)) {
592
+ output.writeln(`${output.highlight(agent)} (${files.length} files)`);
593
+ for (const file of files.slice(0, 5)) {
594
+ output.writeln(` ${output.dim('•')} ${file}`);
595
+ }
596
+ if (files.length > 5) {
597
+ output.writeln(output.dim(` ... and ${files.length - 5} more`));
598
+ }
599
+ output.writeln();
600
+ }
601
+ }
602
+ else {
603
+ output.printSuccess('No coverage gaps found!');
604
+ }
605
+ output.writeln();
606
+ output.writeln(output.bold('Top Gaps:'));
607
+ output.printTable({
608
+ columns: [
609
+ { key: 'file', header: 'File', width: 50 },
610
+ { key: 'coverage', header: 'Coverage', width: 12, align: 'right' },
611
+ { key: 'gap', header: 'Gap', width: 10, align: 'right' },
612
+ { key: 'agent', header: 'Agent', width: 15 },
613
+ ],
614
+ data: result.gaps.slice(0, 10).map(g => ({
615
+ file: g.file.length > 48 ? '...' + g.file.slice(-45) : g.file,
616
+ coverage: `${g.currentCoverage.toFixed(1)}%`,
617
+ gap: `${g.gap.toFixed(1)}%`,
618
+ agent: g.suggestedAgent,
619
+ })),
620
+ });
621
+ }
622
+ return { success: true, data: result };
623
+ }
624
+ if (suggestMode || path) {
625
+ // Suggest improvements for path
626
+ const result = await coverageSuggest(path || '.', { threshold, limit: 20 });
627
+ spinner.succeed(`Found ${result.suggestions.length} coverage suggestions`);
628
+ if (jsonOutput) {
629
+ output.printJson(result);
630
+ }
631
+ else {
632
+ output.writeln();
633
+ output.writeln(output.bold('Coverage Improvement Suggestions'));
634
+ output.writeln(output.dim(`Path: ${result.path}, Threshold: ${threshold}%`));
635
+ output.writeln();
636
+ if (result.suggestions.length === 0) {
637
+ output.printSuccess('All files meet coverage threshold!');
638
+ }
639
+ else {
640
+ output.writeln(`Total Gap: ${output.warning(`${result.totalGap.toFixed(1)}%`)}`);
641
+ output.writeln(`Estimated Effort: ${output.dim(`${result.estimatedEffort.toFixed(1)} hours`)}`);
642
+ output.writeln();
643
+ output.printTable({
644
+ columns: [
645
+ { key: 'file', header: 'File', width: 45 },
646
+ { key: 'current', header: 'Current', width: 10, align: 'right' },
647
+ { key: 'target', header: 'Target', width: 10, align: 'right' },
648
+ { key: 'priority', header: 'Priority', width: 10, align: 'right' },
649
+ ],
650
+ data: result.suggestions.slice(0, 15).map(s => ({
651
+ file: s.file.length > 43 ? '...' + s.file.slice(-40) : s.file,
652
+ current: `${s.currentCoverage.toFixed(1)}%`,
653
+ target: `${s.targetCoverage.toFixed(1)}%`,
654
+ priority: String(s.priority),
655
+ })),
656
+ });
657
+ // Show test suggestions for top file
658
+ if (result.suggestions.length > 0 && result.suggestions[0].suggestedTests.length > 0) {
659
+ output.writeln();
660
+ output.writeln(output.bold('Suggested Tests for Top Priority File:'));
661
+ output.printList(result.suggestions[0].suggestedTests);
662
+ }
663
+ }
664
+ }
665
+ return { success: true, data: result };
666
+ }
667
+ // Default: Route based on coverage analysis
668
+ const routeResult = await coverageRoute('', { threshold });
669
+ spinner.succeed('Coverage analysis complete');
670
+ if (jsonOutput) {
671
+ output.printJson(routeResult);
672
+ }
673
+ else {
674
+ output.writeln();
675
+ output.writeln(output.bold('Coverage-Aware Routing'));
676
+ output.writeln();
677
+ const actionColors = {
678
+ 'add-tests': (s) => output.error(s),
679
+ 'review-coverage': (s) => output.warning(s),
680
+ 'prioritize': (s) => output.error(s),
681
+ 'skip': (s) => output.success(s),
682
+ };
683
+ const colorFn = actionColors[routeResult.action] || ((s) => s);
684
+ output.printBox([
685
+ `Action: ${colorFn(routeResult.action.toUpperCase())}`,
686
+ `Priority: ${routeResult.priority}/10`,
687
+ `Impact Score: ${routeResult.impactScore}%`,
688
+ `Estimated Effort: ${routeResult.estimatedEffort} hours`,
689
+ ``,
690
+ `Test Types: ${routeResult.testTypes.join(', ')}`,
691
+ `Target Files: ${routeResult.targetFiles.length}`,
692
+ ].join('\n'), 'Coverage Analysis');
693
+ if (routeResult.targetFiles.length > 0) {
694
+ output.writeln();
695
+ output.writeln(output.bold('Target Files:'));
696
+ output.printList(routeResult.targetFiles.slice(0, 5).map(f => f.length > 60 ? '...' + f.slice(-57) : f));
697
+ if (routeResult.targetFiles.length > 5) {
698
+ output.writeln(output.dim(` ... and ${routeResult.targetFiles.length - 5} more`));
699
+ }
700
+ }
701
+ if (routeResult.gaps.length > 0) {
702
+ output.writeln();
703
+ output.writeln(output.bold('Coverage Gaps:'));
704
+ output.printTable({
705
+ columns: [
706
+ { key: 'file', header: 'File', width: 40 },
707
+ { key: 'current', header: 'Current', width: 10, align: 'right' },
708
+ { key: 'gap', header: 'Gap', width: 10, align: 'right' },
709
+ ],
710
+ data: routeResult.gaps.slice(0, 5).map(g => ({
711
+ file: g.file.length > 38 ? '...' + g.file.slice(-35) : g.file,
712
+ current: `${g.currentCoverage.toFixed(1)}%`,
713
+ gap: `${g.gap.toFixed(1)}%`,
714
+ })),
715
+ });
716
+ }
717
+ }
718
+ return { success: true, data: routeResult };
719
+ }
720
+ catch (error) {
721
+ spinner.fail('Coverage analysis failed');
722
+ output.printError(error instanceof Error ? error.message : String(error));
723
+ return { success: false, exitCode: 1 };
724
+ }
725
+ },
726
+ };
727
+ // ============================================================================
519
728
  // Main Route Command
520
729
  // ============================================================================
521
730
  export const routeCommand = {
@@ -529,6 +738,7 @@ export const routeCommand = {
529
738
  resetCommand,
530
739
  exportCommand,
531
740
  importCommand,
741
+ coverageRouteCommand,
532
742
  ],
533
743
  options: [
534
744
  {