feat: poker-session notes are session narration, tagged by construction

The HUD's "her notes" panel showed any journal/note entry in the session's time
window — which swept in her *autonomous* journaling (dream-cycle reflections,
thought loop, existential musings) that merely overlapped in time. So a poker
session displayed her feelings, not the night.

Fix both halves:
- Identity: the `note` tool stamps `source=poker:{id}` when a session is live, so
  a session note is identifiable by construction. The HUD filters on that tag
  (kind='note' only) instead of a time window — her journaling has a different
  source and can never leak onto the poker HUD. `journal_write` stays her private
  journal and never shows here.
- Behavior: the Cash card now tells her to use `note` as a running SESSION LOG —
  factual beats a hand/stack log misses (table dynamics, Brian's arc, momentum),
  beat-reporter not diarist — and explicitly keeps feelings/reflection off the
  table. The note tool spec echoes this for the live-session case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 19:41:35 +00:00
parent 71bbe07220
commit 7f23aeae17
4 changed files with 49 additions and 26 deletions
+10 -2
View File
@@ -30,8 +30,13 @@ def _note(args: dict, ctx: dict) -> str:
return "Nothing to note — content was empty."
tag = (args.get("tag") or "").strip()
stored = f"[{tag}] {content}" if tag else content
memory.add_journal_entry("note", stored, source="chat")
logbus.log("info", "Lyra noted (tool)", tag=tag or None)
# A note taken while a poker session is live is session narration — stamp it
# with the session so the HUD shows *only* these, never her autonomous
# journaling (dream-cycle musings, thought loop). Correctness by construction.
live = poker.live_session()
source = f"poker:{live['id']}" if live else "chat"
memory.add_journal_entry("note", stored, source=source)
logbus.log("info", "Lyra noted (tool)", tag=tag or None, poker=bool(live))
return "Noted."
@@ -114,6 +119,9 @@ TOOLS: dict[str, dict] = {
"description": (
"Jot down a note to remember later — an observation, an idea, a "
"reminder, a read on a poker spot or opponent, anything worth keeping. "
"During a live poker session this is your session log: a factual beat "
"about how the night is going (table dynamics, Brian's arc, momentum) — "
"it shows on his HUD. Not for your own feelings or reflection. "
"Optionally tag it (e.g. 'poker', 'idea', 'reminder')."
),
"parameters": {