feat(prompting): Phase A — suppress the two mush sources in poker mode
Per docs/superpowers/specs/2026-07-01-poker-prompts-design.md, Phase A. Two independent pipeline fixes that reduce mush at the table, ahead of the classifier: 1. _mode_menu_note is no longer injected in poker_cash — mid-session she should not be offering to switch modes. 2. _route skips the register/mood nudge in poker_cash — the lexicon heuristic misfired (neutral logistics like "table broke, 11:50pm" read as tilt/fatigue). Poker register will come from the Phase B MENTAL fragment instead. Non-poker modes keep the nudge unchanged. 2 tests. Full suite 180 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+22
-1
@@ -53,4 +53,25 @@ def test_route_injects_tilt_nudge(mind):
|
||||
def test_route_quiet_on_neutral_turn(mind):
|
||||
turn = mind.assemble("s1", "what did we decide about the schema yesterday?", "cloud", None)
|
||||
assert turn.register is None # neutral -> no nudge
|
||||
assert not (turn.moment or {}).get("note")
|
||||
assert not (turn.moment or {}).get("note")
|
||||
|
||||
|
||||
# --- Phase A pipeline fixes: poker mode suppresses the two mush sources ---
|
||||
|
||||
def test_poker_mode_suppresses_tilt_nudge(mind):
|
||||
from lyra import memory
|
||||
memory.set_session_mode("s1", "poker_cash")
|
||||
turn = mind.assemble("s1", "ugh I'm steaming, fucking coolered again!!", "cloud", None)
|
||||
assert turn.register is None # at the table, register comes from fragments
|
||||
sys_blob = " ".join(m["content"] for m in turn.messages if m["role"] == "system")
|
||||
assert "on tilt" not in sys_blob.lower() # false-positive lexicon nudge suppressed
|
||||
|
||||
|
||||
def test_mode_menu_note_suppressed_in_poker(mind):
|
||||
from lyra import modes
|
||||
poker = " ".join(m["content"] for m in mind.build_messages("s1", "stack 350", mode=modes.CASH)
|
||||
if m["role"] == "system")
|
||||
build = " ".join(m["content"] for m in mind.build_messages("s1", "let's refactor", mode=modes.get("build"))
|
||||
if m["role"] == "system")
|
||||
assert "Your modes:" not in poker # no "offer to switch" note at the table
|
||||
assert "Your modes:" in build # still present in a non-poker mode
|
||||
Reference in New Issue
Block a user