add [SELF STATE] block — fresh-observer haiku summary + canonical PDS pointers
phi now sees its own posting pattern from outside on every tick. the
characterization is generated by a haiku-pass over the last 10 top-level
posts framed as if from a stranger reading the timeline cold — same voice
that lands on people who don't already know phi.
sources are canonical:
- posts: app.bsky.feed.post on phi's PDS (haiku derives summary)
- last follow: app.bsky.graph.follow on phi's PDS
- queue depth: io.zzstoatzz.phi.curiosityQueue on phi's PDS
the haiku summary is *derived* (not duplicated state) and cached in
memory: 1h TTL, invalidated when the latest post URI changes. the whole
block is also block-cached at 5min so notification polls (10s) don't
hammer PDS.
groundwork for collapsing trigger paths into a single tick loop where
phi can see its balance — concentration, gaps, recent action distribution
— and decide what's worth doing without each behavior being baked in as
a separate scheduled prompt.
also: hoist fetch_relay_names + get_state_block imports to module scope
(no circular deps; deferred imports were just habit).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>