feat: dollar-denominated budget gate, layered on the token cap - #20
Merged
Conversation
…metrics, fix budget-message wording
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.
Closes BACKLOG.md 1.1.
Lets each brain (admin/ambient/digest/gigabrain) optionally cap daily spend
in real USD (
DAILY_USD_<BRAIN>), layered on top of the existing dailytoken cap rather than replacing it. Token cap keeps enforcing
unconditionally; if a
$cap is also set, it's a second independent tripwire, whichever fires first wins. Applied consistently across the LLM gate,
the ops-channel alert, and
/status.Design rationale:
docs/superpowers/specs/2026-08-18-dollar-budget-gate-design.mdPlan:
docs/superpowers/plans/2026-08-18-dollar-budget-gate.mdSupersedes ADR-0001's predicted "dollars-primary, tokens-fallback" mechanism — see ADR-0010 for why layering was chosen instead.
Built via subagent-driven-development: 7 tasks, each independently
implemented, tested, and reviewed; plus a final whole-branch review that
caught two doc-consistency gaps (stale ADR, stale README metrics table),
fixed and re-reviewed clean.
264 tests pass, 82% coverage, ruff clean.