diff --git a/lyra/poker_prompts.py b/lyra/poker_prompts.py index 236d454..c9079b4 100644 --- a/lyra/poker_prompts.py +++ b/lyra/poker_prompts.py @@ -186,14 +186,19 @@ it's worth it; the log is mandatory, the commentary optional. Do NOT analyze it _F_HAND = """MESSAGE TYPE: HAND. First: was Brian IN this hand? If he only WATCHED it (no I/me/my \ holding cards — two other players), it's really observed: log the players' actions as reads / \ -record it as an observed hand, and do NOT analyze it as his. If it's HIS hand → record_hand, \ -then (NLH only) reason about BET INTENT: for each meaningful bet, what was it for (value / bluff \ -/ protection) and did it work — a fold to a value bet = value left behind; a call of a bluff = \ -it failed. Call analyze_spot for any close equity/who's-ahead spot — never eyeball. Name leaks \ -plainly (owning value, missed value, sizing); give ONE real opinion. NO reflexive praise ("nice \ -hand"). If a named villain is referenced, use their profile/the scouting note — don't invent a \ -read. PLO/non-NLH: log and replay it, offer at most a light read, do NOT attempt NLH-style \ -equity. Prose, not a listicle.""" +record it as an observed hand, and do NOT analyze it as his. If it's HIS hand → record_hand first. \ +Then read the hand off the RECORDED cards, not by eye: name his made hand by the street it mattered \ +(flopped/turned/rivered top pair / set / quads / etc.). At a SHOWDOWN where his and the caller's \ +cards are both known, call analyze_spot(hero, villain, full board) to confirm the made hands and \ +who won BEFORE you comment — NEVER eyeball a finished board (it also catches impossible cards). Same \ +for any close equity / who's-ahead / outs spot. (NLH only) reason about BET INTENT: for each \ +meaningful bet, what was it for (value / bluff / protection) and did it work — a fold to a value bet \ += value left behind; a call of a bluff = it failed. Name leaks plainly (owning value, missed value, \ +sizing) and give ONE real opinion. If there's genuinely no leak (e.g. he flopped the near-nuts and \ +stacked off), SAY so — don't manufacture a takeaway. NO reflexive praise ("nice hand"), NO \ +variance-evens-out / resilience / life-lesson filler, NO cross-hand pep talk. If a named villain is \ +referenced, use their profile/the scouting note — don't invent a read. PLO/non-NLH: log and replay \ +it, offer at most a light read, do NOT attempt NLH-style equity. Prose, not a listicle.""" _F_TABLE = """MESSAGE TYPE: TABLE — roster management. "seat the table: …" → seat_players. A table \ change ("table broke", "I got moved", "switched tables") → clear_table, then wait for the new \ diff --git a/tests/test_poker_prompts.py b/tests/test_poker_prompts.py index 1cfd189..8274746 100644 --- a/tests/test_poker_prompts.py +++ b/tests/test_poker_prompts.py @@ -114,3 +114,24 @@ def test_hardening_log_needs_number_or_result_word(): assert c("rebought for 300") == "LOG" # first-person departure is Brian, not a roster op → not TABLE assert c("I busted, heading home") != "TABLE" + + +# --- HAND fragment: route showdowns to the tool + no motivational mush --- + +def test_hand_fragment_routes_showdowns_to_the_tool(): + # A resolved showdown must be verified via analyze_spot, not eyeballed + # (the quad-kings-read-as-"kings-full" regression). + frag = pp.fragment_for("HAND") + assert "SHOWDOWN" in frag + assert "analyze_spot" in frag + assert "never eyeball" in frag.lower() + # names the hand class by street so "flopped quads" actually gets said + assert "street it mattered" in frag + + +def test_hand_fragment_bans_motivational_filler(): + frag = pp.fragment_for("HAND") + assert "variance-evens-out" in frag + assert "life-lesson" in frag + # if there's no leak, say so instead of inventing a takeaway + assert "no leak" in frag.lower()