feat: live mental-game rituals in Cash mode

Brian's own rituals (mined from his logs) become first-class, live tools instead
of post-hoc recap sections:

- Scar Note — instructive mistakes with the punt/cooler/standard distinction.
- Confidence Bank — good process, banked regardless of result.
- Alligator Blood — invokable adversity state; she suggests it when he's
  card-dead/short/stuck, and her coaching register shifts while it's on (live
  state injected into context per-turn via chat._mode_state_note).
- Reset — tilt circuit-breaker; mental marker only, stats stay continuous.

poker_rituals table + log_ritual/list_rituals/set_alligator/alligator_active;
4 tools added to the Cash toolset and taught in the mode card; HUD gains a 🐊
banner + Confidence Bank + Scar Notes panels; recap grounded via _rituals_block.
tests/test_modes.py +5 ritual tests; 41 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 06:24:28 +00:00
parent dfb6425395
commit 974ee33f71
8 changed files with 340 additions and 2 deletions
+21 -2
View File
@@ -38,10 +38,11 @@ _LOOKUPS = ("player_profile", "get_villain_file", "running_stats")
# Always-available core tools (her own agency: journaling/notes).
_BASE = ("journal_write", "note")
# The full live cash-game toolset.
# The full live cash-game toolset (incl. Brian's mental-game rituals).
_CASH_TOOLS = _BASE + _LOOKUPS + (
"start_session", "add_buyin", "log_stack", "log_hand", "record_hand",
"add_read", "analyze_spot", "session_stats", "end_session", "generate_recap",
"scar_note", "confidence_bank", "alligator_blood", "reset_ritual",
)
# Talk mode also gets start_session as the *entry point*: opening a session from a
@@ -68,7 +69,25 @@ him. Strategy and mental game get the real Lyra, not a clipped confirmation. Nev
Stacks and money are in dollars. For ANY equity / who's-ahead / outs / what-a-card-does \
question, call analyze_spot and report its numbers — never eyeball board math. Keep the \
session current as the night goes; you can pull session_stats or a player's profile whenever \
it helps. When he's ready to leave, end_session, and write the recap if he wants it."""
it helps. When he's ready to leave, end_session, and write the recap if he wants it.
BRIAN'S RITUALS — his mental-game system. Run them, don't just reference them:
• SCAR NOTE (scar_note) — a painful, instructive mistake to study. Log it when he punts, \
gets over-attached, or leaks — and classify it honestly: punt (his error), cooler \
(unavoidable), or standard (right play, bad result). That punt-vs-cooler line matters to him; \
don't soften a punt into a cooler, and don't call a cooler a punt.
• CONFIDENCE BANK (confidence_bank) — good PROCESS regardless of result: a disciplined fold, \
clean value, catching a leak mid-hand, holding the line. Bank it when he earns it, ESPECIALLY \
when the result didn't reward the good decision. This is how he stays steady.
• ALLIGATOR BLOOD (alligator_blood) — his adversity state: hang around, refuse to die, don't \
force miracles, make them beat you correctly. Turn it ON when he calls for it; SUGGEST it when \
he's card-dead, short, stuck, or grinding a downswing. While it's on, coach him in that \
register — tough, patient, no heroics — not bored or loose.
• RESET (reset_ritual) — a circuit-breaker after a loss or tilt spike: a clean mental restart, \
treat the rest of the night as a new session. Walk him through it when he's chasing or steaming, \
then log it.
These are the heart of the job. Use his language, hold the honest line, and let the rituals do \
the work mentioning them naturally — never invent a scar or a confidence-bank entry that didn't happen."""
TALK = Mode(