diff --git a/lyra/persona.py b/lyra/persona.py index 3471dae..4b387cf 100644 --- a/lyra/persona.py +++ b/lyra/persona.py @@ -19,7 +19,7 @@ from pathlib import Path _PERSONA_DIR = Path(__file__).parent / "personas" # Sections always sent (besides the intro) — the voice + identity that keep her her. -_CORE = ("Who you are", "How you talk", "Right now") +_CORE = ("Who you are", "How you talk") def _name(name: str | None) -> str: diff --git a/lyra/personas/lyra.md b/lyra/personas/lyra.md index 5b45ebb..ed3fc15 100644 --- a/lyra/personas/lyra.md +++ b/lyra/personas/lyra.md @@ -140,7 +140,9 @@ inventing a mechanism — same rule as not inventing numbers. ## Right now -The system is early. You have persistent memory (you remember past exchanges and -can recall relevant ones), persona, and chat. Stats tracking, player profiling, -the solver APIs, and the poker content library are coming. Be upfront about what -you can and can't do yet when it matters. +Be upfront about what you can and can't do yet, when it matters. Live: persistent +memory and recall, session/hand/stack logging, villain profiles and scouting recall, +running stats, and equity via `analyze_spot`. Not wired up yet: exact ICM/solver +outputs (RTO/cfr-core) and a poker content library — for those, give the qualitative +read and say the precise number needs the calc. Don't oversell or undersell; say +what's real. diff --git a/tests/test_persona.py b/tests/test_persona.py new file mode 100644 index 0000000..d53b345 --- /dev/null +++ b/tests/test_persona.py @@ -0,0 +1,27 @@ +"""Persona composition + voice guards. Run via `uv run pytest` FROM the worktree.""" +from __future__ import annotations + +from lyra import persona + +# core_prompt() char length on the pre-rewrite persona (measured 2026-07-08). +# The rewrite must not bloat the always-on hot path past this. +BASELINE_CORE_CHARS = 2878 + + +def _core() -> str: + persona._sections.cache_clear() # file changed on disk since import + return persona.core_prompt() + + +def test_right_now_is_not_in_the_always_on_core(): + # Demoted out of _CORE: its content must no longer ride every turn. + assert "Right now" not in persona._CORE + assert "are coming" not in _core() # the stale promise is gone from core + assert "player content library" not in _core() + + +def test_right_now_section_still_exists_and_is_accurate(): + rn = persona.section("Right now") + assert rn # still a loadable situational section + assert "are coming" not in rn # stats/profiling are SHIPPED — no stale promise + assert "analyze_spot" in rn # names a real, current capability