# memory where each thing phi remembers lives, who is allowed to write it, and which key unlocks it when she reads. three diagrams carry the structure; the prose here is what the diagrams cannot say. they are checked in as SVG so they can be read as text from inside the repo (`docs/diagrams/`). ## one loop, ten rows ![every store, who writes it, which block reads it](diagrams/memory-map.svg) every memory surface is a row with the same three cells: something writes it, it lives in a store, a prompt block reads it. there are ten rows in three stores: | store | visibility | what lives there | |---|---|---| | turbopuffer namespaces | private to phi | `phi-users-{handle}` (interaction · observation · summary), `phi-episodic` (notes · run summaries), `phi-own-posts` (every post, id = rkey) | | phi's PDS | public | `io.zzstoatzz.phi.{self,goal,persona}` (intent), `.atlas` / `.docket` (daily derived blobs), `network.cosmik.*` (her library, indexed by semble) | | the fly volume | local | `ops_log.jsonl` — a 48h jetstream tail of her own repo; `own_posts_watermark.json` | | row | written by | read as | trust | |---|---|---|---| | interaction | phi's reply inside a batch — `after_interaction`, verbatim user/bot pair | `[PAST EXCHANGES WITH @h]` | high | | observation | daily extraction at 19:00 UTC → `phi-extractor` → `observation-reconciler` | `[OBSERVATIONS ABOUT @h]` — 10 nearest the batch text | medium | | summary | prefect `phi-memory-synthesis` (`compact.py`), hourly, from observations + interactions | `[PHI'S SYNTHESIZED IMPRESSION OF @h]` | low — labeled *may hallucinate* | | note | `save_memory`, `publish_blog` — deliberate | `[RELEVANT MEMORIES: selected saved accounts]` — top-10 → ID selection → exact text | medium | | run summary | every scheduled run, unconditionally (`tags=[run-summary,