add active observations — phi's small attention pool, sits next to GOALS
phi has needed a substrate for "things noticed but not yet acted on" —
relay transitions, thread directions phi wants to come back to, patterns
across posts. before this, the only options were post-immediately (the
relay-check pattern, which produced robotic top-level alerts) or write to
episodic memory (which is global and gets buried under everything else).
active observations:
- bounded attention pool, max 5
- stored as PDS records under io.zzstoatzz.phi.observation (parallel to
io.zzstoatzz.phi.goal)
- shown in every prompt as [ACTIVE OBSERVATIONS] block, sits next to
[GOALS]
- mutated via observe(content, reasoning) and drop_observation(rkey, reason)
- when count exceeds 5, oldest auto-archives with reason "aged out"
- archive lives in turbopuffer namespace phi-observations — embeddings +
content + reasoning + archival_reason, searchable later via tools
(future) but not in the prompt
relay-check task rewires:
- before: "post the headline verbatim" for any transition → robotic alerts
- after: observe() each transition; only post immediately if waow.tech or
fleet-wide (the actual high-signal cases), in phi's voice, grouped if
multiple. otherwise silent on timeline; the next musing or reflection
will see the active observations and decide whether to surface them.
generalizes: any future scheduled noticer (feed-watcher, follow-graph
monitor, publication-watcher) feeds the same pool. the digest happens
naturally because observations are visible in every subsequent run.
new files:
- bot/src/bot/core/observations.py — list_active, record_observation
(auto-archives oldest on overflow), drop_observation
- bot/src/bot/tools/observations.py — observe() and drop_observation()
tools
wired:
- bot/src/bot/agent.py — inject_active_observations dynamic system prompt;
rewrote process_relay_check task
- bot/src/bot/tools/__init__.py — registered observations tools
- bot/docs/system-prompt.md — added [ACTIVE OBSERVATIONS] row
102 tests pass, ruff clean.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>