feat(persona): demote stale 'Right now' out of the always-on core
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G796GsLCvJQKVN7hwV2cDx
This commit is contained in:
+1
-1
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user