Skip to content

feat(notice): a notice engine behind rows 2 and 3 - #24

Merged
lroolle merged 1 commit into
mainfrom
feat/notice-engine
Aug 19, 2026
Merged

feat(notice): a notice engine behind rows 2 and 3#24
lroolle merged 1 commit into
mainfrom
feat/notice-engine

Conversation

@lroolle

@lroolle lroolle commented Aug 19, 2026

Copy link
Copy Markdown
Member

What

The advisor was one sentence from one function. It is now readers emitting noticesrank · voice · scope · key · hl · short · long:

proj (main*)      +84/-14 8m $6.72 fabl5[1m][██░░42%] fb[91%] [MAX|@work] 5h[38%@23:00] 7d[55%]
+ fb 91% vs 7d 55% · go op   5h ▂▅█▃▮▯▯▯▯▯ 0.9x  7d ▅▁▂ ▃▅ˍ▃▅ … ▆▆ˍ▂▮▯▯ 0.6x @Wed 09:00
+ fb weekly 91% against 7d 55% · the model caps first, not the account; op sits at 33%, so run it for the bulk
  • Row 2 pins the top notice while the condition holds. Row 3 flashes its long form for ~90s after the condition first appears in this session, then disappears. --notice off / STATUSLINE_NOTICE=off.
  • Knows which limit binds: fb 91% vs 7d 55% · go op (the model caps before the account — names the roomiest other weekly_scoped limit); 7d rebased 53%→12% (utilization fell inside one window = plan change / out-of-band reset, mutes the learned underuse voice); last 5h of the week; 5h ~40m left only when the week is stranding capacity.
  • Shorter: the pin drops what line 1 prints, the 5h strip drops the reset its badge carries, the number you act on is bold.

Bugs found on the way

  • Notice records were tab-separated; tab is IFS whitespace, so one empty field shifted every field after it → US (0x1f).
  • { printf; [ -f "$f" ] && tail; } > tmp && mv took the group's status from the [ -f ] test, so a first-ever notice was never stamped and the flash never faded.

Verified

  • 384 bats + 12 install tests, shellcheck -S error clean
  • live: fade observed across renders (pin stays, explanation steps aside for the next fresh story)
  • hero SVG + Pages demo rendered in Chrome

🤖 Generated with Claude Code

Readers turn the live account into notices: rank, voice, scope, a key for
the CONDITION, the number worth bolding, and both a short and a long form.
Row 2 pins the top notice while its condition holds; row 3 flashes the
same notice in full for ~90s after the condition first appears, then gets
out of the way. --notice off keeps row 3 quiet.

New knowledge: which limit binds first (fb 91% vs 7d 55% -> go op), an
out-of-band 7d re-base (burn never runs backwards), the last 5h window of
the week, and a closing 5h window ONLY when the week is stranding capacity
(an unspent 5h window is a rate limit, not a budget).

Shorter rows: the pin drops what line 1 already prints, and the 5h strip
no longer repeats the reset its badge carries.

Fixed two bugs found on the way: notice records were tab-separated (tab is
IFS whitespace, so one empty field shifted every field after it -> US 0x1f),
and a `{ printf; [ -f ] && tail; }` group returned the test's status, so a
first-ever notice was never stamped and the flash never faded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lroolle
lroolle merged commit d535be4 into main Aug 19, 2026
1 check passed
@lroolle
lroolle deleted the feat/notice-engine branch August 19, 2026 10:41
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