v0.21.0: check + session-summary — the advisor, wired into your world - #7
Closed
lroolle wants to merge 7 commits into
Closed
v0.21.0: check + session-summary — the advisor, wired into your world#7lroolle wants to merge 7 commits into
lroolle wants to merge 7 commits into
Conversation
…input jq's `catch .` binds the error MESSAGE as the value, not the original input. Snapshots with an empty or unparseable five_hour.resets_at all normalized to the same error string — one shared fake window identity — so the pct_per_window pair walk could pair samples across real windows. Observed on real data: phantom window transitions and a skewed ratio (9.91 -> 10.06 after the fix on the same log). Normalize via a named def that treats empty as empty and falls back to the raw string on parse failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`statusline.sh report [--days N]` replays usage.jsonl and ledgers every closed window: 7d closes as used%/expired% (converted to 5h-windows-worth via the learned pct_per_window ratio), 5h closes as count/avg/capped, plus the week in progress projected with the same learned walk the advisor uses — the surfaces cannot disagree. A window closes when consecutive samples disagree on resets_at, normalized to the minute (the ratio learner's identity rule). The advisor prevents waste prospectively; this proves it retroactively. Every usage snapshot now also logs limits[] (scoped weekly caps, verbatim), model (id active in the logging session), and predicted_end — the learned walk's projection at sample time, the calibration seed that lets closed windows score the forecast later. Learning lags logging by weeks; a field absent today is a pattern that can't be learned next month. Subcommands dispatch after all function definitions, take no stdin, and are read-only against the state dir. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CHANGELOG entry, README section with a real ledger example, state-dir contract gains the widened usage.jsonl fields (limits, model, predicted_end) and names report as the reference consumer, counts synced to 327 tests across README / llms.txt / site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stacked PRs (base = a feature branch) got no checks under the branches:[main] filter; judgment should not depend on where a PR points. Push triggers stay main-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The statusline never runs when you're away — exactly when expiring capacity needs a voice. Instead of a daemon, `check` exposes the advisor's judgment as an exit code (0 calm / 1 opportunity / 2 pressure / 3 unknown-or-stale) with the plain verdict on stdout, for tmux segments, cron notifiers, and scripts. Model context for the scoped clauses comes from the last logged snapshot — the first consumer of the widened `model` field. `session-summary` gives one-line session retrospectives from the usage log, designed as a SessionEnd hook (hook JSON on stdin, only session_id read; bare runs fall back to the last logged session). Window deltas are positive-delta sums — the profile builder's rule — so a session straddling a 5h reset still reports what it consumed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README scripting section (cron + tmux + SessionEnd hook recipes), CHANGELOG entry, counts synced to 334 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lroolle
force-pushed
the
feat/check-session-summary
branch
from
July 29, 2026 06:05
cccc810 to
88dd3dd
Compare
Three layers, one source of truth: line 1 shows the numbers, the advisor row says the one sentence, and this skill carries the full conversation — should I start a heavy task, which account has headroom, what did I waste this week. It encodes the state-dir contract, the learned-forecast semantics, and the advisor's judgment rules (feasibility before advice, facts only while unlearned, staleness said out loud), and runs the same report/check subcommands instead of re-mining — so the layers cannot disagree. Install: cp -r skills/usage-insight ~/.claude/skills/ Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
lroolle
added a commit
that referenced
this pull request
Aug 10, 2026
Squashed recovery of the stacked train after #8 landed on its parent branch instead of main: check + session-summary advisor integration (v0.21.0) and the usage-insight skill / agent surface (v0.22.0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #6 (merge that first; this PR's base is
feat/waste-ledger).What
Two subcommands that take the advisor beyond the render loop — the statusline never runs when you're away, which is exactly when expiring capacity needs a voice. Still no daemon: we provide the judgment, the host provides the plumbing.
statusline.sh check— the advisor as an exit code:Wire it into tmux (
status-right '#(statusline.sh check)'), cron notifiers, or CI. Staleness guard follows the state-dir contract (>1h = "unknown", not stale numbers presented as now). Model context for scoped clauses comes from the last logged snapshot — the first consumer of #6's widenedmodelfield.statusline.sh session-summary— one-line session retrospectives, designed as aSessionEndhook (hook JSON on stdin; bare runs summarize the last logged session):Window deltas are positive-delta sums (the profile builder's rule), so sessions straddling a 5h reset report what they actually consumed.
Verification
🤖 Generated with Claude Code