@claude-flow/cli 3.1.0-alpha.51 β†’ 3.1.0-alpha.52

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
@@ -2395,85 +2395,83 @@ npx ruflo hive-mind status # Check status
2395
2395
  <details>
2396
2396
  <summary>πŸ“Š <strong>V3 Statusline</strong> β€” Real-time development status for Claude Code</summary>
2397
2397
 
2398
- Real-time development status display for Claude Code integration showing DDD progress, swarm activity, security status, and system metrics.
2398
+ Real-time development status display integrated directly into Claude Code's status bar. Shows DDD progress, swarm activity, security status, AgentDB metrics, and live session data (model, context usage, cost).
2399
+
2400
+ **How It Works:**
2401
+
2402
+ Claude Code pipes JSON session data via **stdin** to the statusline script after each assistant message (debounced ~300ms). The script reads this data and combines it with local project metrics to produce a single-line status output.
2399
2403
 
2400
2404
  **Output Format:**
2401
2405
  ```
2402
- β–Š Ruflo V3 ● ruvnet β”‚ βŽ‡ v3 β”‚ Opus 4.5
2403
- ─────────────────────────────────────────────────────
2404
- πŸ—οΈ DDD Domains [●●●●●] 5/5 ⚑ 1.0x β†’ 2.49x-7.47x
2405
- πŸ€– Swarm β—‰ [58/15] πŸ‘₯ 0 🟒 CVE 3/3 πŸ’Ύ 22282MB πŸ“‚ 47% 🧠 10%
2406
- πŸ”§ Architecture DDD ● 98% β”‚ Security ●CLEAN β”‚ Memory ●AgentDB β”‚ Integration ●
2406
+ β–Š Claude Flow V3 ● ruvnet β”‚ βŽ‡ main β”‚ Opus 4.6 | ●42% ctx | $0.15
2407
+ πŸ—οΈ DDD [●●●●○] 4/5 ⚑ HNSW 150x πŸ€– β—‰ [12/8] πŸ‘₯ 3 🟒 CVE 3/3 πŸ’Ύ 512MB 🧠 15% πŸ“¦ AgentDB ●1.2K vectors
2407
2408
  ```
2408
2409
 
2409
- | Indicator | Description | Values |
2410
+ | Indicator | Description | Source |
2410
2411
  |-----------|-------------|--------|
2411
- | `β–Š Ruflo V3` | Project header | Always shown |
2412
- | `● ruvnet` | GitHub user (via `gh` CLI) | Dynamic |
2413
- | `βŽ‡ v3` | Current git branch | Dynamic |
2414
- | `Opus 4.5` | Claude model name | From Claude Code |
2415
- | `[●●●●●]` | DDD domain progress bar | 0-5 domains |
2416
- | `⚑ 1.0x β†’ 2.49x-7.47x` | Performance speedup target | Current β†’ Target |
2417
- | `β—‰/β—‹` | Swarm coordination status | Active/Inactive |
2418
- | `[58/15]` | Active agents / max agents | Process count |
2419
- | `πŸ‘₯ 0` | Sub-agents spawned | Task tool agents |
2420
- | `🟒 CVE 3/3` | Security CVE remediation | Fixed/Total |
2421
- | `πŸ’Ύ 22282MB` | Memory usage (Node.js processes) | Real-time |
2422
- | `πŸ“‚ 47%` | Context window usage | From Claude Code |
2423
- | `🧠 10%` | Intelligence score (patterns learned) | 0-100% |
2424
- | `DDD ● 98%` | Domain-Driven Design progress | Percentage |
2425
- | `Security ●CLEAN` | Security audit status | CLEAN/PENDING/FAILED |
2426
- | `Memory ●AgentDB` | Memory backend in use | AgentDB/SQLite/Hybrid |
2427
- | `Integration ●` | agentic-flow integration status | Active/Inactive |
2428
-
2429
- **Usage:**
2430
- ```bash
2431
- # Default: Safe multi-line (avoids Claude Code collision zone)
2432
- npx ruflo@v3alpha hooks statusline
2433
-
2434
- # Single-line mode (completely avoids collision)
2435
- npx ruflo@v3alpha hooks statusline --single
2412
+ | `β–Š Claude Flow V3` | Project header | Always shown |
2413
+ | `● ruvnet` | GitHub user | `gh api user` CLI |
2414
+ | `βŽ‡ main` | Current git branch | `git branch --show-current` |
2415
+ | `Opus 4.6` | Claude model name | Stdin JSON `model.display_name` |
2416
+ | `●42% ctx` | Context window usage | Stdin JSON `context_window.used_percentage` |
2417
+ | `$0.15` | Session cost | Stdin JSON `cost.total_cost_usd` |
2418
+ | `[●●●●○]` | DDD domain progress bar | `.claude-flow/metrics/v3-progress.json` |
2419
+ | `⚑ HNSW 150x` | HNSW search speedup | AgentDB file stats |
2420
+ | `β—‰/β—‹` | Swarm coordination status | Process detection |
2421
+ | `[12/8]` | Active agents / max agents | `ps aux` process count |
2422
+ | `πŸ‘₯ 3` | Sub-agents spawned | Task tool agent count |
2423
+ | `🟒 CVE 3/3` | Security CVE remediation | `.claude-flow/security/audit-status.json` |
2424
+ | `πŸ’Ύ 512MB` | Memory usage | Node.js process RSS |
2425
+ | `🧠 15%` | Intelligence score | Pattern count from AgentDB |
2426
+ | `πŸ“¦ AgentDB ●1.2K` | AgentDB vector count | File size estimate (`size / 2KB`) |
2427
+
2428
+ **Setup (Automatic):**
2429
+
2430
+ Run `npx claude-flow@v3alpha init` β€” this generates `.claude/settings.json` with the correct statusline config and creates the helper script at `.claude/helpers/statusline.cjs`.
2431
+
2432
+ The generated config uses a **fast local script** (no `npx` cold-start):
2433
+ ```json
2434
+ {
2435
+ "statusLine": {
2436
+ "type": "command",
2437
+ "command": "node .claude/helpers/statusline.cjs"
2438
+ }
2439
+ }
2440
+ ```
2436
2441
 
2437
- # Legacy multi-line (original behavior, may have bleeding)
2438
- npx ruflo@v3alpha hooks statusline --legacy
2442
+ > **Note:** Only `type`, `command`, and `padding` are valid statusLine fields. Do not add `refreshMs`, `enabled`, or other fields β€” Claude Code will ignore them.
2439
2443
 
2440
- # JSON output for scripting
2441
- npx ruflo@v3alpha hooks statusline --json
2444
+ **For Existing Users:**
2442
2445
 
2443
- # Compact JSON (single line)
2444
- npx ruflo@v3alpha hooks statusline --compact
2446
+ If your statusline is not updating, run the upgrade command to regenerate helpers and fix the config:
2447
+ ```bash
2448
+ npx claude-flow@v3alpha init --update --settings
2445
2449
  ```
2446
2450
 
2447
- **Collision Zone Fix (Issue #985):**
2451
+ This removes invalid config fields and regenerates the statusline helper with stdin support.
2448
2452
 
2449
- Claude Code writes internal status (e.g., `7s β€’ 1p`) at absolute terminal coordinates (columns 15-25 on the second-to-last line). The safe mode pads the collision line with spaces to push content past column 25, preventing character bleeding.
2450
-
2451
- | Option | Description |
2452
- |--------|-------------|
2453
- | (default) | Safe multi-line with collision zone avoidance |
2454
- | `--single` | Single-line output (complete collision avoidance) |
2455
- | `--legacy` | Original multi-line (may cause bleeding) |
2456
- | `--json` | JSON output with pretty printing |
2457
- | `--compact` | JSON output without formatting |
2453
+ **Stdin JSON Protocol:**
2458
2454
 
2459
- **Claude Code Integration:**
2460
-
2461
- Add to `.claude/settings.json`:
2455
+ Claude Code provides session data via stdin in this format:
2462
2456
  ```json
2463
2457
  {
2464
- "statusLine": {
2465
- "type": "command",
2466
- "command": "npx ruflo@v3alpha hooks statusline --single"
2467
- }
2458
+ "model": { "display_name": "Opus 4.6" },
2459
+ "context_window": { "used_percentage": 42, "remaining_percentage": 58 },
2460
+ "cost": { "total_cost_usd": 0.15, "total_duration_ms": 45000 },
2461
+ "workspace": { "current_dir": "/path/to/project" },
2462
+ "session_id": "abc-123"
2468
2463
  }
2469
2464
  ```
2470
2465
 
2466
+ The statusline script reads stdin synchronously, falls back to local detection when run manually (TTY mode).
2467
+
2471
2468
  **Data Sources:**
2472
- - `.ruflo/metrics/v3-progress.json` - DDD domain progress
2473
- - `.ruflo/metrics/swarm-activity.json` - Active agent counts
2474
- - `.ruflo/security/audit-status.json` - CVE remediation status
2475
- - `.ruflo/learning/patterns.db` - Intelligence score (pattern count)
2476
- - Process detection via `ps aux` - Real-time memory and agent counts
2469
+ - **Stdin JSON** β€” Model name, context %, cost, duration (from Claude Code)
2470
+ - `.claude-flow/metrics/v3-progress.json` β€” DDD domain progress
2471
+ - `.claude-flow/metrics/swarm-activity.json` β€” Active agent counts
2472
+ - `.claude-flow/security/audit-status.json` β€” CVE remediation status
2473
+ - **AgentDB files** β€” Vector count (estimated from file size), HNSW index status
2474
+ - Process detection via `ps aux` β€” Real-time memory and agent counts
2477
2475
  - Git branch via `git branch --show-current`
2478
2476
  - GitHub user via `gh api user`
2479
2477
 
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAyzI1E,eAAO,MAAM,YAAY,EAAE,OAyG1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/commands/hooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AA6zI1E,eAAO,MAAM,YAAY,EAAE,OAyG1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -915,13 +915,14 @@ const metricsCommand = {
915
915
  ]
916
916
  });
917
917
  if (v3Dashboard && result.performance) {
918
+ const p = result.performance;
918
919
  output.writeln();
919
920
  output.writeln(output.bold('πŸš€ V3 Performance Gains'));
920
921
  output.printList([
921
- `Flash Attention: ${output.success(result.performance.flashAttention)}`,
922
- `Memory Reduction: ${output.success(result.performance.memoryReduction)}`,
923
- `Search Improvement: ${output.success(result.performance.searchImprovement)}`,
924
- `Token Reduction: ${output.success(result.performance.tokenReduction)}`
922
+ `Flash Attention: ${output.success(p.flashAttention ?? 'N/A')}`,
923
+ `Memory Reduction: ${output.success(p.memoryReduction ?? 'N/A')}`,
924
+ `Search Improvement: ${output.success(p.searchImprovement ?? 'N/A')}`,
925
+ `Token Reduction: ${output.success(p.tokenReduction ?? 'N/A')}`
925
926
  ]);
926
927
  }
927
928
  return { success: true, data: result };
@@ -1719,15 +1720,18 @@ const intelligenceCommand = {
1719
1720
  output.writeln(output.dim(' Not initialized'));
1720
1721
  }
1721
1722
  // V3 Performance
1722
- output.writeln();
1723
- output.writeln(output.bold('πŸš€ V3 Performance Gains'));
1724
- output.printList([
1725
- `Flash Attention: ${output.success(result.performance.flashAttention)}`,
1726
- `Memory Reduction: ${output.success(result.performance.memoryReduction)}`,
1727
- `Search Improvement: ${output.success(result.performance.searchImprovement)}`,
1728
- `Token Reduction: ${output.success(result.performance.tokenReduction)}`,
1729
- `SWE-Bench Score: ${output.success(result.performance.sweBenchScore)}`
1730
- ]);
1723
+ const perf = result.performance;
1724
+ if (perf) {
1725
+ output.writeln();
1726
+ output.writeln(output.bold('πŸš€ V3 Performance Gains'));
1727
+ output.printList([
1728
+ `Flash Attention: ${output.success(perf.flashAttention ?? 'N/A')}`,
1729
+ `Memory Reduction: ${output.success(perf.memoryReduction ?? 'N/A')}`,
1730
+ `Search Improvement: ${output.success(perf.searchImprovement ?? 'N/A')}`,
1731
+ `Token Reduction: ${output.success(perf.tokenReduction ?? 'N/A')}`,
1732
+ `SWE-Bench Score: ${output.success(perf.sweBenchScore ?? 'N/A')}`
1733
+ ]);
1734
+ }
1731
1735
  return { success: true, data: result };
1732
1736
  }
1733
1737
  catch (error) {