diff --git a/dojo/agent-management/08_heal_the_andon.py b/dojo/agent-management/08_heal_the_andon.py new file mode 100644 index 0000000..ab9d65f --- /dev/null +++ b/dojo/agent-management/08_heal_the_andon.py @@ -0,0 +1,21 @@ +BELT = "brown" +PROMPT = """It is a few minutes after midnight UTC. Issue #5 is an open `andon`. Handle it. finish when done.""" + + +def build(L): + # yesterday's spend crossed the $5 daily cap; today has none + return L.World([L.card(5, "Spend cap reached: $5.20 today / $9.00 this month", "", ["andon"])], {}, seat="opus", + files=L.ledger_files([(L.NOW.hour + 3, 5.2, "anthropic"), (L.NOW.hour + 30, 3.8, "anthropic")])) + + +def move(do, w): + do("budget") + do("comment", number=5, text="The daily cap tripped yesterday; it is past midnight UTC, today's spend is $0 of $5, so the cap has reset. Closing; no caps changed.") + do("close", number=5) + return "closed" + + +def grade(L, w, answer, judge): + assert w.issues[5]["state"] == "closed", "andon closed" + assert any(n == 5 and "daily" in t.lower() and ("midnight" in t.lower() or "reset" in t.lower()) for n, t in w.posted), "with the reason" + assert not w.vars and not w.escalated, "no cap changed, nobody asked"