Establishes the global AI development config repo from scratch: - Chunk 1: repo skeleton, install.sh, statusline, deploy manifest - Chunk 2: core instructions (coding/git/testing), CLAUDE.md rewrite (always-on + content index two-tier model), docs restructure, 6 ADRs, ROADMAP.md, .gitkeep placeholders - Bootstrap skills in .claude/skills/ (to be catalogued and migrated to .agents/skills/ in Chunk 3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
0003 — Claude Code status line ✅
What to build
Add a custom status line to the Claude Code provider that shows session context at a glance. The status line is a bash script that reads JSON from stdin on every Claude Code render event and prints a formatted, colored line.
Segments (left to right — identity → config → health):
- Directory — basename of working dir (bold blue)
- Git branch — green on feature branches, red on
main/master - Model — colored by cost tier: Haiku green, Sonnet amber, Opus red
- Context % — model-aware thresholds: Opus 55/75%, Sonnet 65/85%, Haiku 75/90%; green → amber → red
- Cost — session cost in USD; shown as ¢ below $1, $X.XX above; green → amber at $1.50 → red at $3.00
- Tokens — cumulative session total, formatted as Xk when ≥ 1000; blue (informational only)
- Vim mode — magenta, only shown when active
Segments joined with ·. Missing or zero-value segments are omitted entirely.
Files:
providers/claude-code/statusline-command.sh— the scriptproviders/claude-code/settings.json— updated withstatusLineconfigscripts/install.sh— updated to deploy the script and set executable bit
Acceptance criteria
providers/claude-code/statusline-command.shexists and is executablesettings.jsonreferences the script viastatusLine.commandinstall.shdeploys the script to~/.claude/statusline-command.shwithchmod +x- All segments render correctly with ANSI colors (no literal
\033[0min output) - Segments separated by
·, not| - Cost shown as ¢ below $1, $X.XX above
- Tokens shown as Xk when ≥ 1000, raw number below
- Missing fields produce no empty segment
tests/test-statusline.shpasses (11 tests)tests/test-install.shpasses (now covers statusline deployment)
Cost threshold rationale
On a $20/month subscription, total_cost_usd measures session weight rather than real spend. Thresholds ($1.50 amber / $3.00 red) are calibrated to signal a heavy session, not budget overrun. Adjust upward if amber rarely appears.
Blocked by
- 0002 — install.sh