memory: two MRU ring buffers with cascading overflow, 512K budget

This commit is contained in:
2026-11-11 16:30:12 +00:00
parent 3be0e399e6
commit 8ce3239787
5 changed files with 158 additions and 81 deletions
+11
View File
@@ -0,0 +1,11 @@
<!-- RING A — important facts. Changed a relationship, created an obligation,
altered the world. Ordered by touch: top = most recently touched.
Tail demotes to ring B at overflow. Cap: 500 entries. [pinned] never demotes.
Policy lives in system.md; this file is pure memory.
GM seeds this before window one; a few lines suffice. -->
# Ring A — what matters
<!-- Entry format:
- [YYYY-MM-DD] [type] [×N] **Label** — details.
types: place | person | fact | thread -->
+9
View File
@@ -0,0 +1,9 @@
<!-- RING B — everything else that passed the gate anyway.
Ordered by touch: top = most recently touched.
Tail falls out at overflow — an eviction, always logged.
Cap: 3000 entries. Policy lives in system.md. -->
# Ring B — what stuck anyway
<!-- Same entry format as ring A:
- [YYYY-MM-DD] [type] [×N] **Label** — details. -->
-24
View File
@@ -1,24 +0,0 @@
<!-- Maintained by the player-model at ((wrap)).
Budget: one page (~600 words), hard cap.
This is <name>'s memory, not a chronicle — keep only what would change
a scene. Apply the graduation and eviction rules from system.md. -->
# The world
## Places
<!-- A handful at most. One line each. -->
## People
<!-- NPCs the character actually knows. One line each + standing toward the
character. Cut those the character would genuinely forget. -->
## Facts of note
<!-- World facts whose absence would embarrass the story. -->
## Threads
<!-- Open promises, debts, unresolved tensions. Cut when resolved or clearly
abandoned. -->
## Recently
<!-- Rolling tail of the latest window. On each ((wrap)): graduate what
qualifies, evict the rest. -->