Ballmer: always-on BAC agent with interactive dashboard controls#13
Open
jberm236-98 wants to merge 8 commits into
Open
Ballmer: always-on BAC agent with interactive dashboard controls#13jberm236-98 wants to merge 8 commits into
jberm236-98 wants to merge 8 commits into
Conversation
The coordinator was instructed to spawn exactly one specialist per ticket, causing it to silently abandon any issue beyond the primary one. Removed the one-specialist constraint and added explicit rules to spawn per category and withhold resolved status until all issues are actioned. Validated: 0/5 → 1/1 on T-4471, 3/3 on holdout (T-4490, T-4503). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
A scheduled-agent demo built on the Always-On Ops construct (tick -> read state -> reason vs policy -> write action), with a real Widmark/Watson pharmacokinetic engine underneath. - Pure BAC engine (bac_model.py): Widmark + Watson TBW with blood-water correction (r=TBW/(0.806*kg) ~ 0.649 for the demo profile), zero-order elimination, first-order absorption with food modifier. 14 hand-calc unit tests against the brief's anchors. - Recipe-level ethanol library (~20 drinks, JSON, recipe-defined). - Recommendation: dwell-in-window minus overshoot penalty, plus a climb gradient so the agent builds the multi-drink staircase to the band; soft nudge past a configurable safety ceiling. - Always-on tick loop over fast-forwarded simulated time; writes transcripts to state/log/. Burndown = (BAC - target_low)/beta projects time to leave the range. - Local live web dashboard (stdlib http.server + vanilla-JS canvas, no pip installs, offline): in-range indicator, gauge, BAC curve, burndown line. - Prominent safety framing throughout: the band is a comic-strip joke, above every legal driving limit, not health/safety advice. Note: deliberately corrects the brief's r=TBW/weight to the blood-water form to hit the brief's own stated anchors (documented in config.py/bac_model.py). TODO: validate against published BAC time-course data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds start time, food state, auto-consume, speed, and loop toggles to the left panel. POST /api/config re-runs the simulation for physiology changes; speed/loop update instantly without re-simulation. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Fix time_to_leave_window to use ODE integration instead of the naive linear formula (current - low) / beta, which ignores residual absorption from drinks still being absorbed and can underestimate burndown by 2-3x immediately after a drink - Fix burndown projection line in web_data.py to use the same ODE forward curve rather than a straight linear decline - Add weight (lb), height (in), and age inputs to controls panel; changes trigger re-simulation with updated Widmark r-factor - Add 0.08% US legal driving limit as a dashed reference line on chart Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Adds the actual agent intelligence that transforms Ballmer from a scoring script into an LLM-powered agent: - drink-library.json: each drink now has a vibe score (1-10) reflecting its character for a Ballmer Peak coding session (dry martini=10, long island=2, etc.) - ballmer/drinks.py: Drink dataclass gains vibe_score field - ballmer/llm_agent.py: new module — llm_reason() calls Claude Haiku with current BAC state, the drink menu with vibe scores, and the math model's recommendation, and uses tool use to return a structured pick + 2-3 sentence reasoning - serve_dashboard.py: POST /api/llm_reason calls the LLM for the current tick state and returns the recommendation as JSON - web/dashboard.html: "Ask Claude" button + response panel shows Claude's recommended drink (with color-coded pill), vibe score, and reasoning Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Updates the LLM system prompt to speak in authentic Boston dialect: dropped R's, local slang (wicked pissa, no suh, kid, chief), strong opinions, and gruff Southie attitude — while still delivering correct BAC reasoning and drink recommendations. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…hiskey - Remove the disclaimer warning banner from the dashboard header - Y-axis now uses fixed 0.02 increments with light gridlines instead of dividing yTop into 5 uneven parts - Add Double whiskey, rocks (4 oz) to drink library (vibe 8) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ab KPI - Rename "dashboard" to "model" throughout (title, sub-header, browser tab) - Add explainer callout box below title explaining the XKCD #323 joke - Add price field to every drink in the library (realistic bar prices) - Thread price through Drink dataclass and web_data frame pipeline - Add bac_delta (Widmark contribution per drink) and price columns to tick log - Add live running tab KPI ($X.XX) in the header, updating each tick Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
serve_dashboard.py+web/dashboard.html) that plays back the session tick-by-tick with a real-time BAC chart, gauge, and burndown projectionPOST /api/configendpoint re-runs the simulation for physiology-affecting changes; speed/loop update the playback in-placeTest plan
python serve_dashboard.py— dashboard opens at http://127.0.0.1:8765, BAC curve animates tick-by-tick🤖 Generated with Claude Code