Asking for shape agreement before writing code (same as I should have done on #200).
Where the game layer is today. Growth is raw token volume: UsageStore feeds today.totalTokens (cache reads count the same as fresh input) into CompanionStore.applyUsage. The one reward tied to limits is Rare Candy on hitting 100% of a window, which rewards burning the limit. There is no consecutive-day concept and no efficiency signal. #244, #248 and #254 all route thresholds through a growth multiplier, so there is now a clean composition point for anything below.
1. Daily streak multiplier. Consecutive days with at least N tokens (default 10M, a setting) earn a growth multiplier: x1.10 at 3 days, x1.25 at 7, x1.50 at 30. Missing a day resets it. Persisted in CompanionState as streak: {days, lastDay} with legacy-save defaults; applied at the same eggHatchThreshold / stageThreshold helpers #244 introduced, multiplicative with the other multipliers; header badge in the style of #254's 2x badge; day boundary is the existing midnight bucket rollover. Streaks reward showing up; the current Rare Candy rule rewards running out. Both can coexist.
2. Efficiency bonus, two variants, your call.
Variant A, local only: a day whose cache-read share is at least 90% earns x1.25 on that day's growth delta. Honest caveat: cache reads already count as tokens, so this double-rewards large contexts.
Variant B, truer: when official limits are available, compute tokens per utilization point for the day and compare to the user's 14-day median. Above-median days earn the bonus. Plan-agnostic, and it measures the thing people actually mean by "using it well". From my own logs today: Fable 5.1 on Max 5x consumed about 5.5 points of the 5-hour window per million tokens; that is the number this variant would track over time. I would build B and keep A as a fallback if you would rather not couple growth to the limits fetch.
3. Shareable companion card. Opt-in PNG export from the popover: sprite, stage, streak, today's tokens, plan leverage once #249 lands. No network, in line with the README's "the app never uploads usage". A leaderboard needs a backend this project has never had, so I would only propose that as a separate opt-in web page fed by pasted cards, not in-app. On trading: the existing SaveEnvelope export/import is already a trade-code shape. Is a guarded import-as-swap welcome, or out of scope?
Proposed order: 1 first (smallest, self-contained), then 2 once you pick the variant, then 3. Happy to drop any piece.
Asking for shape agreement before writing code (same as I should have done on #200).
Where the game layer is today. Growth is raw token volume:
UsageStorefeedstoday.totalTokens(cache reads count the same as fresh input) intoCompanionStore.applyUsage. The one reward tied to limits is Rare Candy on hitting 100% of a window, which rewards burning the limit. There is no consecutive-day concept and no efficiency signal. #244, #248 and #254 all route thresholds through a growth multiplier, so there is now a clean composition point for anything below.1. Daily streak multiplier. Consecutive days with at least N tokens (default 10M, a setting) earn a growth multiplier: x1.10 at 3 days, x1.25 at 7, x1.50 at 30. Missing a day resets it. Persisted in
CompanionStateasstreak: {days, lastDay}with legacy-save defaults; applied at the sameeggHatchThreshold/stageThresholdhelpers #244 introduced, multiplicative with the other multipliers; header badge in the style of #254's 2x badge; day boundary is the existing midnight bucket rollover. Streaks reward showing up; the current Rare Candy rule rewards running out. Both can coexist.2. Efficiency bonus, two variants, your call.
Variant A, local only: a day whose cache-read share is at least 90% earns x1.25 on that day's growth delta. Honest caveat: cache reads already count as tokens, so this double-rewards large contexts.
Variant B, truer: when official limits are available, compute tokens per utilization point for the day and compare to the user's 14-day median. Above-median days earn the bonus. Plan-agnostic, and it measures the thing people actually mean by "using it well". From my own logs today: Fable 5.1 on Max 5x consumed about 5.5 points of the 5-hour window per million tokens; that is the number this variant would track over time. I would build B and keep A as a fallback if you would rather not couple growth to the limits fetch.
3. Shareable companion card. Opt-in PNG export from the popover: sprite, stage, streak, today's tokens, plan leverage once #249 lands. No network, in line with the README's "the app never uploads usage". A leaderboard needs a backend this project has never had, so I would only propose that as a separate opt-in web page fed by pasted cards, not in-app. On trading: the existing
SaveEnvelopeexport/import is already a trade-code shape. Is a guarded import-as-swap welcome, or out of scope?Proposed order: 1 first (smallest, self-contained), then 2 once you pick the variant, then 3. Happy to drop any piece.