cc-context-stats 1.6.2 → 1.8.0

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 (37) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/CLAUDE.md +12 -0
  3. package/README.md +34 -24
  4. package/docs/ARCHITECTURE.md +52 -25
  5. package/docs/CSV_FORMAT.md +2 -0
  6. package/docs/DEPLOYMENT.md +19 -8
  7. package/docs/DEVELOPMENT.md +48 -12
  8. package/docs/MODEL_INTELLIGENCE.md +396 -0
  9. package/docs/configuration.md +35 -0
  10. package/docs/context-stats.md +12 -1
  11. package/docs/installation.md +82 -22
  12. package/docs/scripts.md +47 -23
  13. package/docs/troubleshooting.md +93 -4
  14. package/package.json +1 -1
  15. package/pyproject.toml +1 -1
  16. package/scripts/statusline-full.sh +171 -37
  17. package/scripts/statusline.js +214 -32
  18. package/scripts/statusline.py +195 -47
  19. package/src/claude_statusline/__init__.py +1 -1
  20. package/src/claude_statusline/cli/context_stats.py +85 -13
  21. package/src/claude_statusline/cli/explain.py +228 -0
  22. package/src/claude_statusline/cli/statusline.py +41 -30
  23. package/src/claude_statusline/core/colors.py +78 -9
  24. package/src/claude_statusline/core/config.py +68 -9
  25. package/src/claude_statusline/core/git.py +16 -5
  26. package/src/claude_statusline/graphs/intelligence.py +162 -0
  27. package/src/claude_statusline/graphs/renderer.py +38 -3
  28. package/tests/bash/test_statusline_full.bats +5 -5
  29. package/tests/fixtures/mi_test_vectors.json +140 -0
  30. package/tests/node/intelligence.test.js +98 -0
  31. package/tests/node/statusline.test.js +4 -4
  32. package/tests/python/test_colors.py +105 -0
  33. package/tests/python/test_config_colors.py +78 -0
  34. package/tests/python/test_explain.py +177 -0
  35. package/tests/python/test_intelligence.py +314 -0
  36. package/tests/python/test_layout.py +4 -4
  37. package/tests/python/test_statusline.py +4 -4
package/CHANGELOG.md CHANGED
@@ -7,6 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.8.0] - 2026-03-15
11
+
12
+ ### Added
13
+
14
+ - **Model Intelligence (MI) score** — Heuristic quality score estimating answer quality based on context utilization, cache efficiency, and output productivity. Inspired by the Michelangelo paper (arXiv:2409.12640). Displayed as `MI:X.XX` in the statusline with green/yellow/red color coding
15
+ - **MI score in all implementations** — MI computation available across Python package, standalone Python, Node.js, and Bash (via `awk`) statusline scripts with full cross-implementation parity
16
+ - **MI timeseries graph** — `context-stats --type mi` renders MI score trajectory over time as an ASCII graph with decimal Y-axis labels
17
+ - **MI in session summary** — `context-stats` summary now shows MI score with sub-component breakdown (CPS, ES, PS) and interpretation text
18
+ - **Shared test vectors** — `tests/fixtures/mi_test_vectors.json` with 6 vectors ensuring Python and Node.js produce identical MI scores within ±0.01 tolerance
19
+ - **`label_fn` parameter for `render_timeseries()`** — Optional custom Y-axis label formatter, used by MI graph to display decimals instead of token counts
20
+ - **Bash feature parity** — `statusline-full.sh` now supports custom color overrides, state file rotation, MI score display, and all config keys (`show_mi`, `mi_curve_beta`, `reduced_motion`, `show_io_tokens`)
21
+ - **Config: `show_mi`** — Toggle MI score display (default: `true`)
22
+ - **Config: `mi_curve_beta`** — Adjust MI degradation curve shape (default: `1.5`)
23
+
24
+ ### Changed
25
+
26
+ - **Compact context display** — Removed "free" word from context info (`872,748 (87.3%)` instead of `872,748 free (87.3%)`) across all implementations
27
+ - **Decoupled state reads from `show_delta`** — State file is now read when either `show_delta` or `show_mi` is enabled, allowing MI to work independently of delta display
28
+ - **Node.js terminal width default** — Changed from `80` to `200` when no TTY is detected (matching Python behavior), preventing `fitToWidth` from dropping statusline parts in Claude Code's subprocess
29
+
30
+ ### Fixed
31
+
32
+ - **Node.js terminal width** — Fixed `getTerminalWidth()` defaulting to 80 in Claude Code's subprocess, which caused MI, delta, AC, and session parts to be silently dropped
33
+
34
+ ## [1.7.0] - 2026-03-14
35
+
36
+ ### Added
37
+
38
+ - **Configurable colors** - Custom color themes via `~/.claude/statusline.conf` using named colors (`bright_cyan`) or hex codes (`#7dcfff`). Six configurable slots: `color_green`, `color_yellow`, `color_red`, `color_blue`, `color_magenta`, `color_cyan`
39
+ - **`context-stats explain` command** - Diagnostic dump that pretty-prints Claude Code's JSON context with derived values (free tokens, autocompact buffer, effective free), active config, vim/agent/output_style extensions, and raw JSON. Supports `--no-color` flag
40
+ - **24-bit true color support** - Hex color codes (`#rrggbb`) are converted to ANSI 24-bit escape sequences for full RGB color customization
41
+ - **Cross-implementation sync documentation** - Added sync points table to CLAUDE.md documenting triplicated logic across Python, Node.js, and Bash implementations
42
+
43
+ ### Changed
44
+
45
+ - **ColorManager accepts overrides** - `ColorManager` now takes an optional `overrides` dict, allowing config-driven color customization throughout the package
46
+ - **Git info uses configurable colors** - Branch and change count colors now respect user color overrides in all three implementations
47
+ - **Config parsing preserves raw values** - Config reader now preserves case for color values while lowercasing only for boolean comparison
48
+
10
49
  ## [1.6.2] - 2026-03-13
11
50
 
12
51
  ### Fixed
package/CLAUDE.md CHANGED
@@ -47,6 +47,18 @@ pytest && npm test && bats tests/bash/*.bats
47
47
  - **5-second git command timeout** in both Python and Node.js implementations
48
48
  - **Config via `~/.claude/statusline.conf`** — simple key=value pairs
49
49
 
50
+ ## Cross-Implementation Sync Points
51
+
52
+ The following logic is duplicated across three implementations and **must be kept in sync** when modified:
53
+
54
+ | Logic | Package (`src/`) | Standalone Python (`scripts/statusline.py`) | Node.js (`scripts/statusline.js`) |
55
+ |---|---|---|---|
56
+ | Config parsing | `core/config.py` | `read_config()` | `readConfig()` |
57
+ | Color name map | `core/colors.py:COLOR_NAMES` | `_COLOR_NAMES` | `COLOR_NAMES` |
58
+ | Color parser | `core/colors.py:parse_color()` | `_parse_color()` | `parseColor()` |
59
+ | Git info | `core/git.py:get_git_info()` | `get_git_info()` | `getGitInfo()` |
60
+ | State rotation | `core/state.py` | `maybe_rotate_state_file()` | `maybeRotateStateFile()` |
61
+
50
62
  ## Cross-References
51
63
 
52
64
  - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — system architecture and data flow
package/README.md CHANGED
@@ -70,6 +70,21 @@ uv pip install cc-context-stats
70
70
 
71
71
  ## Quick Start
72
72
 
73
+ ### Status Line Integration
74
+
75
+ Add to `~/.claude/settings.json`:
76
+
77
+ ```json
78
+ {
79
+ "statusLine": {
80
+ "type": "command",
81
+ "command": "claude-statusline"
82
+ }
83
+ }
84
+ ```
85
+
86
+ Restart Claude Code to see real-time token stats in your status bar.
87
+
73
88
  ### Real-Time Monitoring
74
89
 
75
90
  Get your session ID from the status line (the last part after the pipe `|`), then run:
@@ -93,21 +108,6 @@ This opens a live dashboard that refreshes every 2 seconds, showing:
93
108
 
94
109
  Press `Ctrl+C` to exit.
95
110
 
96
- ### Status Line Integration
97
-
98
- Add to `~/.claude/settings.json`:
99
-
100
- ```json
101
- {
102
- "statusLine": {
103
- "type": "command",
104
- "command": "claude-statusline"
105
- }
106
- }
107
- ```
108
-
109
- Restart Claude Code to see real-time token stats in your status bar.
110
-
111
111
  ## Context Stats CLI
112
112
 
113
113
  ```bash
@@ -118,6 +118,8 @@ context-stats --type cumulative # Show cumulative context usage
118
118
  context-stats --type both # Show both graphs
119
119
  context-stats --type all # Show all graphs including I/O
120
120
  context-stats <session_id> # View specific session
121
+ context-stats explain # Diagnostic dump (pipe JSON to stdin)
122
+ context-stats --version # Show version
121
123
  ```
122
124
 
123
125
  ### Output Example
@@ -162,25 +164,33 @@ The status line shows at-a-glance metrics in your Claude Code interface:
162
164
  Create `~/.claude/statusline.conf`:
163
165
 
164
166
  ```bash
165
- token_detail=true # Show exact token counts (vs abbreviated like "12.5k")
166
- show_delta=true # Show token delta in status line
167
- show_session=true # Show session ID
168
- autocompact=true # Show autocompact buffer indicator
167
+ token_detail=true # Show exact token counts (vs abbreviated like "12.5k")
168
+ show_delta=true # Show token delta in status line
169
+ show_session=true # Show session ID
170
+ autocompact=true # Show autocompact buffer indicator
171
+ reduced_motion=false # Disable animations for accessibility
172
+
173
+ # Custom colors - named colors or hex (#rrggbb)
174
+ color_green=#7dcfff
175
+ color_red=#f7768e
176
+ color_yellow=bright_yellow
169
177
  ```
170
178
 
171
179
  ## How It Works
172
180
 
173
- Context Stats hooks into Claude Code's state files to track token usage across your sessions. Data is stored locally in `~/.claude/statusline/` and never sent anywhere.
181
+ Context Stats hooks into Claude Code's status line feature to track token usage across your sessions. The Python and Node.js statusline scripts write state data to local CSV files, which the context-stats CLI reads to render live graphs. Data is stored locally in `~/.claude/statusline/` and never sent anywhere.
174
182
 
175
183
  ## Documentation
176
184
 
177
- - [Context Stats Guide](docs/context-stats.md) - Detailed usage guide
185
+ - [Installation Guide](docs/installation.md) - Platform-specific setup (shell, pip, npm)
186
+ - [Context Stats Guide](docs/context-stats.md) - Detailed CLI usage guide
178
187
  - [Configuration Options](docs/configuration.md) - All settings explained
179
- - [Installation Guide](docs/installation.md) - Platform-specific setup
188
+ - [Available Scripts](docs/scripts.md) - Script variants and features
180
189
  - [Architecture](docs/ARCHITECTURE.md) - System design and components
181
- - [Development](docs/DEVELOPMENT.md) - Dev setup and debugging
190
+ - [CSV Format](docs/CSV_FORMAT.md) - State file field specification
191
+ - [Development](docs/DEVELOPMENT.md) - Dev setup, testing, and debugging
182
192
  - [Deployment](docs/DEPLOYMENT.md) - Publishing and release process
183
- - [Troubleshooting](docs/troubleshooting.md) - Common issues
193
+ - [Troubleshooting](docs/troubleshooting.md) - Common issues and solutions
184
194
  - [Changelog](CHANGELOG.md) - Version history
185
195
 
186
196
  ## Contributing
@@ -9,6 +9,16 @@ cc-context-stats provides real-time context monitoring for Claude Code sessions.
9
9
 
10
10
  ## System Architecture
11
11
 
12
+ ```mermaid
13
+ graph TD
14
+ CC[Claude Code Host] -->|JSON stdin| SL[Statusline Script]
15
+ SL -->|stdout text| CC
16
+ SL -->|writes CSV| SF[State Files<br/>~/.claude/statusline/]
17
+ SF -->|reads CSV| CS[Context Stats CLI]
18
+ CF[Config File<br/>~/.claude/statusline.conf] -->|reads| SL
19
+ GIT[Git Repository] -->|branch/status| SL
20
+ ```
21
+
12
22
  ```
13
23
  ┌─────────────┐ JSON stdin ┌──────────────────┐
14
24
  │ Claude Code │ ──────────────────> │ Statusline Script │
@@ -25,7 +35,7 @@ cc-context-stats provides real-time context monitoring for Claude Code sessions.
25
35
 
26
36
  ┌──────────────────┐
27
37
  │ Context Stats CLI │
28
- │ (Python)
38
+ │ (Python/Bash)
29
39
  └──────────────────┘
30
40
  ```
31
41
 
@@ -35,48 +45,61 @@ cc-context-stats provides real-time context monitoring for Claude Code sessions.
35
45
 
36
46
  Three implementation languages with identical output:
37
47
 
38
- | Script | Language | Dependencies |
39
- | --------------------- | ---------- | ------------ |
40
- | `statusline-full.sh` | Bash | `jq` |
41
- | `statusline-git.sh` | Bash | `jq` |
42
- | `statusline-minimal.sh` | Bash | `jq` |
43
- | `statusline.py` | Python 3 | None |
44
- | `statusline.js` | Node.js 18+| None |
48
+ | Script | Language | Dependencies | State Writes |
49
+ | ---------------------- | ---------- | ------------ | ------------ |
50
+ | `statusline-full.sh` | Bash | `jq` | No |
51
+ | `statusline-git.sh` | Bash | `jq` | No |
52
+ | `statusline-minimal.sh`| Bash | `jq` | No |
53
+ | `statusline.py` | Python 3 | None | Yes |
54
+ | `statusline.js` | Node.js 18+| None | Yes |
55
+
56
+ > **Note:** Only the Python and Node.js scripts write state files. The bash scripts provide status line display only, without persisting data for the context-stats CLI.
45
57
 
46
58
  **Data flow:**
47
59
  1. Claude Code pipes JSON state via stdin on each refresh
48
60
  2. Script parses model info, context tokens, session data
49
61
  3. Script reads `~/.claude/statusline.conf` for user preferences
50
- 4. Script checks git status for branch/changes info
51
- 5. Script writes state to `~/.claude/statusline/<session_id>.state`
62
+ 4. Script checks git status for branch/changes info (5-second timeout)
63
+ 5. Python/Node.js scripts write state to `~/.claude/statusline/<session_id>.state`
52
64
  6. Script outputs formatted ANSI text to stdout
53
65
 
66
+ ### Context Stats CLI
67
+
68
+ Two implementations of the live dashboard:
69
+
70
+ | Script | Language | Install Method |
71
+ | ------------------ | -------- | ------------------------- |
72
+ | `context-stats.sh` | Bash | Shell installer |
73
+ | `context_stats.py` | Python | `pip install cc-context-stats` |
74
+
75
+ The Python CLI (installed via pip or npm) is the primary implementation, providing live ASCII graphs with zone awareness. The bash script is a standalone alternative installed by the shell installer.
76
+
54
77
  ### Python Package (`src/claude_statusline/`)
55
78
 
56
79
  The pip-installable package provides both the statusline and context-stats CLI:
57
80
 
58
81
  ```
59
82
  src/claude_statusline/
60
- ├── __init__.py
61
- ├── __main__.py
83
+ ├── __init__.py # Package version and exports
84
+ ├── __main__.py # python -m claude_statusline entry
62
85
  ├── cli/
63
- │ ├── statusline.py # claude-statusline entry point
64
- │ └── context_stats.py # context-stats entry point
86
+ │ ├── statusline.py # claude-statusline entry point
87
+ │ └── context_stats.py # context-stats entry point
65
88
  ├── core/
66
- │ ├── colors.py # ANSI color management
67
- │ ├── config.py # Configuration loading
68
- │ ├── git.py # Git status detection
69
- │ └── state.py # State file reading/writing
89
+ │ ├── colors.py # ANSI color management
90
+ │ ├── config.py # Configuration loading
91
+ │ ├── git.py # Git status detection (5s timeout)
92
+ │ └── state.py # State file reading/writing/rotation
70
93
  ├── formatters/
71
- │ ├── layout.py # Output width/layout management
72
- │ ├── time.py # Duration formatting
73
- │ └── tokens.py # Token count formatting
94
+ │ ├── layout.py # Output width/layout management
95
+ │ ├── time.py # Duration formatting
96
+ │ └── tokens.py # Token count formatting
74
97
  ├── graphs/
75
- │ ├── renderer.py # ASCII graph rendering
76
- │ └── statistics.py # Data statistics
98
+ │ ├── renderer.py # ASCII graph rendering
99
+ │ └── statistics.py # Data statistics
77
100
  └── ui/
78
- ├── icons.py # Unicode icons
79
- └── waiting.py # Waiting animation
101
+ ├── icons.py # Unicode icons
102
+ └── waiting.py # Waiting animation
80
103
  ```
81
104
 
82
105
  ### State Files
@@ -89,6 +112,10 @@ State files persist token history between statusline refreshes:
89
112
 
90
113
  Each line is a CSV record with 14 comma-separated fields (timestamp, token counts, cost, session metadata, and context metrics). See [CSV_FORMAT.md](CSV_FORMAT.md) for the full field specification. The context-stats CLI reads these files to render graphs.
91
114
 
115
+ **Rotation:** Files are automatically rotated at 10,000 lines, keeping the most recent 5,000 entries. This prevents unbounded file growth during long sessions.
116
+
117
+ **Session ID validation:** IDs are validated to reject path-traversal characters (`/`, `\`, `..`, null bytes).
118
+
92
119
  ## Data Privacy
93
120
 
94
121
  All data stays local:
@@ -28,6 +28,8 @@ State files are stored at `~/.claude/statusline/statusline.<session_id>.state`.
28
28
  - Numeric fields default to `0` when absent. String fields default to empty string.
29
29
  - Lines are newline-terminated (`\n`).
30
30
  - Files are append-only.
31
+ - Files are automatically rotated at 10,000 lines (keeps most recent 5,000) by the Python and Node.js statusline scripts.
32
+ - Duplicate entries (same token count as previous line) are skipped to prevent file bloat.
31
33
 
32
34
  ## Legacy Format
33
35
 
@@ -10,6 +10,8 @@ cc-context-stats is distributed through three channels:
10
10
  | PyPI | `cc-context-stats`| `pip install cc-context-stats` |
11
11
  | npm | `cc-context-stats`| `npm install -g cc-context-stats` |
12
12
 
13
+ Both pip and npm installs provide the `claude-statusline` and `context-stats` CLI commands.
14
+
13
15
  ## Publishing to PyPI
14
16
 
15
17
  ```bash
@@ -40,21 +42,30 @@ npm publish
40
42
 
41
43
  The project uses GitHub Actions for automated releases (`.github/workflows/release.yml`):
42
44
 
43
- 1. Create and push a version tag: `git tag v1.x.x && git push --tags`
44
- 2. The release workflow automatically:
45
- - Runs the full test suite
45
+ 1. Update versions in all locations (see Version Management below)
46
+ 2. Update `CHANGELOG.md` with the new version entry
47
+ 3. Create and push a version tag: `git tag v1.x.x && git push --tags`
48
+ 4. The release workflow automatically:
49
+ - Runs the full test suite (Python, Node.js, Bash)
46
50
  - Builds Python and npm packages
47
51
  - Creates a GitHub Release with release notes
48
52
 
53
+ CI is also run on every push and PR via `.github/workflows/ci.yml`.
54
+
49
55
  ## Version Management
50
56
 
51
- Versions must be updated in sync across:
57
+ Versions must be updated in sync across these files:
52
58
 
53
- - `pyproject.toml` - `[project] version`
54
- - `package.json` - `version`
55
- - `CHANGELOG.md` - New version entry
56
- - `RELEASE_NOTES.md` - Current release notes
59
+ | File | Field |
60
+ | --- | --- |
61
+ | `pyproject.toml` | `[project] version` |
62
+ | `package.json` | `version` |
63
+ | `src/claude_statusline/__init__.py` | `__version__` |
64
+ | `CHANGELOG.md` | New version entry |
65
+ | `RELEASE_NOTES.md` | Current release notes |
57
66
 
58
67
  ## Install Script
59
68
 
60
69
  The `install.sh` script is fetched directly from the `main` branch on GitHub. Changes to the installer take effect immediately for new users running the curl one-liner.
70
+
71
+ The installer embeds the version from `package.json` and the current git commit hash into the installed scripts, preventing version drift between the repository and installed copies.
@@ -7,6 +7,7 @@
7
7
  - **Python 3.9+** - For Python package and testing
8
8
  - **Node.js 18+** - For Node.js script and testing
9
9
  - **Bats** - Bash Automated Testing System (optional, for bash tests)
10
+ - **pre-commit** - Git hook framework (optional, for automated code quality)
10
11
 
11
12
  ## Setup
12
13
 
@@ -24,7 +25,7 @@ pip install -e ".[dev]"
24
25
  # Node.js setup
25
26
  npm install
26
27
 
27
- # Install pre-commit hooks
28
+ # Install pre-commit hooks (optional but recommended)
28
29
  pre-commit install
29
30
  ```
30
31
 
@@ -33,30 +34,54 @@ pre-commit install
33
34
  ```
34
35
  cc-context-stats/
35
36
  ├── src/claude_statusline/ # Python package source
37
+ │ ├── cli/ # CLI entry points (statusline, context-stats)
38
+ │ ├── core/ # Config, state, git, colors
39
+ │ ├── formatters/ # Token, time, layout formatting
40
+ │ ├── graphs/ # ASCII graph rendering
41
+ │ └── ui/ # Icons, waiting animation
36
42
  ├── scripts/ # Standalone scripts (sh/py/js)
43
+ │ ├── statusline-full.sh # Full-featured bash statusline
44
+ │ ├── statusline-git.sh # Git-focused bash variant
45
+ │ ├── statusline-minimal.sh # Minimal bash variant
46
+ │ ├── statusline.py # Python standalone statusline
47
+ │ ├── statusline.js # Node.js standalone statusline
48
+ │ └── context-stats.sh # Bash context-stats CLI
37
49
  ├── tests/
38
50
  │ ├── bash/ # Bats tests
39
51
  │ ├── python/ # Pytest tests
40
52
  │ └── node/ # Jest tests
41
53
  ├── config/ # Configuration examples
42
54
  ├── docs/ # Documentation
43
- ├── .github/workflows/ # CI/CD
44
- ├── pyproject.toml # Python build config
55
+ ├── .github/workflows/ # CI/CD (ci.yml, release.yml)
56
+ ├── pyproject.toml # Python build config (hatchling)
45
57
  └── package.json # Node.js config
46
58
  ```
47
59
 
48
60
  ## Running Tests
49
61
 
50
62
  ```bash
63
+ # Python tests
64
+ source venv/bin/activate
65
+ pytest tests/python/ -v
66
+
67
+ # Node.js tests (Jest)
68
+ npm test
69
+
70
+ # Bash integration tests
71
+ bats tests/bash/*.bats
72
+
51
73
  # All tests
52
- npm test && pytest && bats tests/bash/*.bats
53
-
54
- # Individual suites
55
- pytest tests/python/ -v # Python
56
- pytest tests/python/ -v --cov=scripts --cov-report=html # Python + coverage
57
- npm test # Node.js (Jest)
58
- npm run test:coverage # Node.js + coverage
59
- bats tests/bash/*.bats # Bash
74
+ pytest && npm test && bats tests/bash/*.bats
75
+ ```
76
+
77
+ ### Coverage Reports
78
+
79
+ ```bash
80
+ # Python coverage
81
+ pytest tests/python/ -v --cov=scripts --cov-report=html
82
+
83
+ # Node.js coverage
84
+ npm run test:coverage
60
85
  ```
61
86
 
62
87
  ## Linting & Formatting
@@ -92,6 +117,9 @@ python -m build
92
117
 
93
118
  # Verify package
94
119
  twine check dist/*
120
+
121
+ # npm dry run
122
+ npm pack --dry-run
95
123
  ```
96
124
 
97
125
  ## Cross-Script Consistency
@@ -102,6 +130,8 @@ All three implementations (bash, Python, Node.js) must produce identical output
102
130
  2. Run integration tests to verify parity
103
131
  3. Test on multiple platforms if possible
104
132
 
133
+ The delta parity tests (`tests/bash/`) verify that Python and Node.js produce identical deltas for the same CSV state data.
134
+
105
135
  ## Debugging
106
136
 
107
137
  ### State files
@@ -110,8 +140,11 @@ All three implementations (bash, Python, Node.js) must produce identical output
110
140
  # View current state files
111
141
  ls -la ~/.claude/statusline/statusline.*.state
112
142
 
113
- # Inspect state content
143
+ # Inspect state content (14 CSV fields per line)
114
144
  cat ~/.claude/statusline/statusline.<session_id>.state
145
+
146
+ # Watch state file updates in real-time
147
+ watch -n 1 'tail -5 ~/.claude/statusline/statusline.*.state'
115
148
  ```
116
149
 
117
150
  ### Verbose testing
@@ -122,4 +155,7 @@ pytest tests/python/ -v -s
122
155
 
123
156
  # Node.js with verbose output
124
157
  npx jest --verbose
158
+
159
+ # Bats with verbose output
160
+ bats --verbose-run tests/bash/*.bats
125
161
  ```