ruflo

๐Ÿ“Š V3 Statusline

/docs/core-features/v3-statusline

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).

How It Works:

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.

Output Format:

โ–Š Ruflo V3 โ— ruvnet  โ”‚  โއ main  โ”‚  Opus 4.6  | โ—42% ctx  | $0.15
๐Ÿ—๏ธ DDD [โ—โ—โ—โ—โ—‹] 4/5  โšก HNSW 150x  ๐Ÿค– โ—‰ [12/8]  ๐Ÿ‘ฅ 3  ๐ŸŸข CVE 3/3  ๐Ÿ’พ 512MB  ๐Ÿง  15%  ๐Ÿ“ฆ AgentDB โ—1.2K vectors
IndicatorDescriptionSource
โ–Š Ruflo V3Project headerAlways shown
โ— ruvnetGitHub usergh api user CLI
โއ mainCurrent git branchgit branch --show-current
Opus 4.6Claude model nameStdin JSON model.display_name
โ—42% ctxContext window usageStdin JSON context_window.used_percentage
$0.15Session costStdin JSON cost.total_cost_usd
[โ—โ—โ—โ—โ—‹]DDD domain progress bar.claude-flow/metrics/v3-progress.json
โšก HNSW 150xHNSW search speedupAgentDB file stats
โ—‰/โ—‹Swarm coordination statusProcess detection
[12/8]Active agents / max agentsps aux process count
๐Ÿ‘ฅ 3Sub-agents spawnedTask tool agent count
๐ŸŸข CVE 3/3Security CVE remediation.claude-flow/security/audit-status.json
๐Ÿ’พ 512MBMemory usageNode.js process RSS
๐Ÿง  15%Intelligence scorePattern count from AgentDB
๐Ÿ“ฆ AgentDB โ—1.2KAgentDB vector countFile size estimate (size / 2KB)

Customizing the cost segment:

cost.total_cost_usd is a client-side estimate from Claude Code that may differ from your actual bill and, on subscription plans, does not reflect out-of-pocket spend. Two environment variables let you relabel or remove the segment (the default is unchanged):

VariableEffectExample
RUFLO_STATUSLINE_COST_SYMBOLOverrides the leading $. Set to an empty string to show the number alone.RUFLO_STATUSLINE_COST_SYMBOL=โšก โ†’ โšก1.30
RUFLO_STATUSLINE_HIDE_COST1/true/yes/on removes the segment entirely.RUFLO_STATUSLINE_HIDE_COST=1

Set them in the env block of .claude/settings.json โ€” Claude Code applies it to every session and to the statusline subprocess, and unlike hand-editing the helper it survives npx ruflo@latest init --update:

json
{
  "statusLine": { "type": "command", "command": "node .claude/helpers/statusline.cjs" },
  "env": { "RUFLO_STATUSLINE_COST_SYMBOL": "โšก" }
}

Or export them in your shell profile before launching Claude Code:

bash
export RUFLO_STATUSLINE_COST_SYMBOL=โšก   # or: export RUFLO_STATUSLINE_HIDE_COST=1

Setup (Automatic):

Run npx ruflo@latest init โ€” this generates .claude/settings.json with the correct statusline config and creates the helper script at .claude/helpers/statusline.cjs.

The generated config uses a fast local script (no npx cold-start):

json
{
  "statusLine": {
    "type": "command",
    "command": "node .claude/helpers/statusline.cjs"
  }
}

Note: Only type, command, and padding are valid statusLine fields. Do not add refreshMs, enabled, or other fields โ€” Claude Code will ignore them.

For Existing Users:

If your statusline is not updating, run the upgrade command to regenerate helpers and fix the config:

bash
npx ruflo@latest init --update --settings

This removes invalid config fields and regenerates the statusline helper with stdin support.

Stdin JSON Protocol:

Claude Code provides session data via stdin in this format:

json
{
  "model": { "display_name": "Opus 4.6" },
  "context_window": { "used_percentage": 42, "remaining_percentage": 58 },
  "cost": { "total_cost_usd": 0.15, "total_duration_ms": 45000 },
  "workspace": { "current_dir": "/path/to/project" },
  "session_id": "abc-123"
}

The statusline script reads stdin synchronously, falls back to local detection when run manually (TTY mode).

Data Sources:

  • Stdin JSON โ€” Model name, context %, cost, duration (from Claude Code)
  • .claude-flow/metrics/v3-progress.json โ€” DDD domain progress
  • .claude-flow/metrics/swarm-activity.json โ€” Active agent counts
  • .claude-flow/security/audit-status.json โ€” CVE remediation status
  • AgentDB files โ€” Vector count (estimated from file size), HNSW index status
  • Process detection via ps aux โ€” Real-time memory and agent counts
  • Git branch via git branch --show-current
  • GitHub user via gh api user