Skip to content

v0.21.0: check + session-summary — the advisor, wired into your world - #7

Open
lroolle wants to merge 2 commits into
feat/waste-ledgerfrom
feat/check-session-summary
Open

v0.21.0: check + session-summary — the advisor, wired into your world#7
lroolle wants to merge 2 commits into
feat/waste-ledgerfrom
feat/check-session-summary

Conversation

@lroolle

@lroolle lroolle commented Jul 29, 2026

Copy link
Copy Markdown
Member

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:

$ statusline.sh check
+ 7d resets @00:00, 50% unused — ~49% expires even at full burn
$ echo $?
1    # 0 calm | 1 opportunity (+) | 2 pressure (!) | 3 unknown/stale

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 widened model field.

statusline.sh session-summary — one-line session retrospectives, designed as a SessionEnd hook (hook JSON on stdin; bare runs summarize the last logged session):

session 8f3c02aa: 3h12m, 5h +34pts, 7d +4pts, claude-fable-5

Window deltas are positive-delta sums (the profile builder's rule), so sessions straddling a 5h reset report what they actually consumed.

Verification

  • 334/334 bats (7 new: 4 check exit paths, 2 session-summary, 1 end-to-end integration), shellcheck at baseline (0 new warnings)
  • README gains a "Scripting" section with cron/tmux/hook recipes

🤖 Generated with Claude Code

lroolle and others added 2 commits July 28, 2026 23:05
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
lroolle force-pushed the feat/check-session-summary branch from cccc810 to 88dd3dd Compare July 29, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant