inject phi self-identity (handle/did/pds) into system prompt
caught when phi wrote a blog post claiming its memory lives on
"pds.zzstoatzz.io" — that's the operator's PDS, not phi's. phi's
actual PDS is psathyrella.us-west.host.bsky.network (bluesky-hosted).
phi was guessing because nothing in its system prompt told it which
infrastructure was its own.
fix: dynamic system prompt that returns a small "[YOUR INFRASTRUCTURE]"
block with handle, DID, and PDS endpoint. PDS is resolved from the
DID document via the PLC directory on first call, then cached for
the lifetime of the process (it doesn't change between deploys). the
block also includes a one-line note that this is phi's pds, not the
operator's, since that was the specific confusion observed.
scope is intentionally tight — three identity facts plus one
anti-confusion note. the block is ~5 lines and only attached to the
main agent (extraction/exploration agents don't write about phi's
own infrastructure, so they don't need it).
implementation:
- new get_identity_block() in core/atproto_client.py with module-level
cache and httpx call to plc.directory
- new inject_identity dynamic system prompt registered in PhiAgent.__init__