# 💾 Persistence Port used by [[▶️ Create Goal]] (and the sibling quantity / clear paths). The domain does not know where the plan is stored (ADR-004). Infrastructure answers. --- ## Shape ```text GoalStore all() / find / put / remove / clear ``` Play uses `PersistingGoalStore`: RAM plus a write after each change. `InMemoryGoalStore` remains for unit tests. --- ## Shipped implementation Player attachment in **this world's save** (ADR-017). | Event | Result | |-------|--------| | Join world | Load this player's goals | | Create / + / − / Clear | Write the attachment | | Leave world | Unload RAM. Do not write empty (that would wipe the save) | | Death | Plan is copied. It is not loot | Singleplayer and LAN host. Remote dedicated server: RAM-only this slice. Server save and cloud remain possible later. They do not change `GoalStore`. --- ## Related Documents [[🏛️ Architecture]] [[📦 Packages]] [[📝 Decisions]] [[▶️ Create Goal]] [[🎯 Goal]]