claudemd-cli 0.30.0 → 0.31.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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,16 @@ All notable changes to the `claudemd` plugin. This changelog tracks plugin artif
8
8
  - **Canonical spec version source**: `spec/CLAUDE.md` top-line title (`# AI-CODING-SPEC vX.Y.Z — Core`) + `spec/CLAUDE-changelog.md` top `##` entry.
9
9
  - **Plugin semver vs spec semver** are independent: plugin patch (0.2.0 → 0.2.1) may ship when spec is unchanged (this release); plugin minor (0.1.9 → 0.2.0) ships when spec minor updates (v0.2.0 shipped spec v6.10.0).
10
10
 
11
+ ## [0.31.0] - 2026-07-10
12
+
13
+ **Minor — statusline 5h/7d quota segments (user-visible default change).** The shipped statusline renderer's meter bracket grows from `[ctx:N%]` to `[ctx:N% · 5h:N% · 7d:N%]` — context window plus the 5-hour and weekly rate-limit windows, all **used %** with uniform thresholds (<50 green, 50-79 yellow, >=80 red), rendered faint (SGR 2) so the meter doesn't pull attention. **Action on upgrade**: none — re-run `/claudemd-statusline` (or any install/update, which refreshes `~/.claude/claudemd-statusline.sh`) to pick up the new renderer. **Opt-out**: `DISABLE_STATUSLINE_QUOTA=1` hides the quota segments (exact-match `1`, matching the repo's toggle convention); full revert = pin v0.30.0 or `/claudemd-statusline remove`.
14
+
15
+ - **Data source**: Claude Code >= 2.1.206 statusLine stdin payload carries top-level `rate_limits: {five_hour: {used_percentage, resets_at}, seven_day: {…}}` (verified against the CC binary's payload constructor; `used_percentage` = utilization x 100, fractional, may exceed 100). On older CC / absent data the segments auto-hide — the line degrades to the previous `[ctx:N%]` content.
16
+ - **Renderer** (`scripts/statusline.sh`): one `used_seg()` for all three segments — floor the integer part, hide on non-numeric or >3-digit input (nonsense that would also overflow bash int64 in `[ -ge ]`), per-segment color, uncolored bracket/`·` separators. jq extraction widened 3 → 5 NUL-delimited fields.
17
+ - **Review findings fixed pre-tag** (fresh-subagent review, 2 Low): int64-overflow garbage rendering on huge digit strings (jq prints `1e19` as plain digits → was rendering `5h:8446744073709551716%` in green); `DISABLE_STATUSLINE_QUOTA` disabled on ANY non-empty value including `0` (now exact `== "1"`).
18
+ - **Tests**: `tests/scripts/statusline.test.js` 9 → 20 cases (bracket format + separator, both threshold scales at exact boundaries, floor semantics, partial/absent windows, overflow band, toggle `0`/`1`, hostile backslash/newline inputs).
19
+ - Docs synced: README statusline row, `/claudemd-statusline` command description, install stderr banner.
20
+
11
21
  ## [0.30.0] - 2026-07-10
12
22
 
13
23
  **Minor — E2 cross-layer memory maintenance report (doctor checks).** Fourth implementation tranche of `docs/spec-optimization-plan-2026-07-10.md` (P5 item E2). Wrong-layer memory placement fails silently; these checks make it observable. Candidates only — no auto-migration (a §5-scoped write, operator's call).
package/README.md CHANGED
@@ -61,7 +61,7 @@ Verify in one command (Linux): `node --version && jq --version && gh --version &
61
61
  | 15 slash commands | `/claudemd-install` · `/claudemd-status` · `/claudemd-update` · `/claudemd-audit` · `/claudemd-toggle` · `/claudemd-doctor` · `/claudemd-analyze` · `/claudemd-uninstall` · `/claudemd-rules` · `/claudemd-clean-residue` · `/claudemd-sparkline` · `/claudemd-sampling-audit` · `/claudemd-bypass-audit` · `/claudemd-design-adopt` · `/claudemd-statusline` |
62
62
  | 1 standalone CLI | `claudemd-cli lint` · `claudemd-cli audit` ([npm: `claudemd-cli`](https://www.npmjs.com/package/claudemd-cli)) |
63
63
  | Spec v6.14 | `~/.claude/CLAUDE.md` · `CLAUDE-extended.md` · `CLAUDE-changelog.md` · `OPERATOR.md` (backup-before-overwrite) |
64
- | StatusLine (opt-out) | PS1-style line — `user@host:/path (branch) Model [ctx:N%]` — wired into `~/.claude/settings.json` on install **only when the slot is empty**; an existing statusline is left untouched. Skip entirely with `CLAUDEMD_NO_STATUSLINE=1`. Manage via `/claudemd-statusline`. |
64
+ | StatusLine (opt-out) | PS1-style line — `user@host:/path (branch) Model [ctx:N% · 5h:N% · 7d:N%]` (context / 5-hour quota / weekly quota, all **used %**, read from Claude Code's `rate_limits` payload; quota segments auto-hide when the data is absent, or force-hide with `DISABLE_STATUSLINE_QUOTA=1`) — wired into `~/.claude/settings.json` on install **only when the slot is empty**; an existing statusline is left untouched. Skip entirely with `CLAUDEMD_NO_STATUSLINE=1`. Manage via `/claudemd-statusline`. |
65
65
 
66
66
  Install moves any existing `~/.claude/CLAUDE*.md` to `~/.claude/backup-<ISO>/` (last 5 kept automatically). Uninstall offers `keep / restore / delete`; `delete` requires an extra confirmation.
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemd-cli",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Standalone CLI for §10-V banned-vocab + transcript scanning. Companion to the claudemd Claude Code plugin (github.com/sdsrss/claudemd) for use in git pre-commit hooks, GitHub Actions, and other agents.",
5
5
  "type": "module",
6
6
  "bin": {