2026-11-11 16:21:54 +00:00
|
|
|
# rp-test
|
|
|
|
|
|
|
|
|
|
Long-form, freeform, text-based roleplay where the model plays **one character**
|
|
|
|
|
and the human plays **everything else**.
|
|
|
|
|
|
|
|
|
|
## The premise
|
|
|
|
|
|
|
|
|
|
Using a model as the GM hits the context window wall and dilutes creativity —
|
|
|
|
|
it has to hold the whole world in its head. Inverting the roles fixes the
|
|
|
|
|
footprint: a player-character holds one perspective. Short plays would work
|
|
|
|
|
fine either way; the actual test is **long, cross-window stories**: can the
|
|
|
|
|
model persist established lore without drowning in it?
|
|
|
|
|
|
|
|
|
|
More precisely: this isn't a model test, it's an instruction test. The subject
|
2026-11-11 16:30:12 +00:00
|
|
|
is whether a model can be taught to *decide what to write down*. Humans
|
|
|
|
|
forget; files don't — so the file must be shaped to forget too.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## Roles
|
|
|
|
|
|
|
|
|
|
- **Human = the GM.** The world, every NPC, all consequences, all retcons.
|
2026-11-11 16:30:12 +00:00
|
|
|
Runs on organic memory — no notes. The model's canon files are the prosthesis.
|
2026-11-11 16:54:49 +00:00
|
|
|
- **Player-model = one PC.** Inner life, voice, choices. Nothing else. Reads
|
|
|
|
|
memory, never writes it.
|
|
|
|
|
- **Housekeeper-model = a separate invocation**, fresh context, run after each
|
|
|
|
|
window. Reads the transcript and the rendered rings; emits a **manifest** of
|
|
|
|
|
semantic operations. Judgment, no clerical work.
|
|
|
|
|
- **`tool/memory.mjs` = the clerk.** Validates and applies manifests,
|
|
|
|
|
maintains the database, enforces caps, renders views, writes the log.
|
|
|
|
|
Fails loudly, never drifts silently.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## Scope
|
|
|
|
|
|
|
|
|
|
Tiny on purpose: a handful of locations, a handful of characters. Freeform —
|
|
|
|
|
no handbook, no stats. Anything goes if it makes sense and makes the story
|
|
|
|
|
better. Retcons are allowed but discouraged; when they happen they are
|
|
|
|
|
explicit and logged.
|
|
|
|
|
|
|
|
|
|
## The protocol
|
|
|
|
|
|
2026-11-11 16:54:49 +00:00
|
|
|
1. **Refresh the views:** `node tool/memory.mjs render`
|
|
|
|
|
2. **Open a window:** send `system.md`, then `character.md`, then
|
2026-11-11 16:30:12 +00:00
|
|
|
`canon/ring-a.md`, then `canon/ring-b.md`, then narrate the first beat.
|
|
|
|
|
(On a tight window, ring B is optional loading — ring A is the spine.)
|
2026-11-11 16:54:49 +00:00
|
|
|
3. **In play:** `((double parentheses))` is the out-of-character channel —
|
2026-11-11 16:21:54 +00:00
|
|
|
points of order, canon questions, proposals, vetoes. Both sides use it.
|
2026-11-11 16:54:49 +00:00
|
|
|
Entries carry stable ids (`[e17]`); citing one is the precise way to
|
|
|
|
|
reference a memory.
|
|
|
|
|
4. **Close a window:** just stop. No in-band ritual; the player-model has no
|
2026-11-11 16:39:34 +00:00
|
|
|
end-of-session duties.
|
2026-11-11 16:54:49 +00:00
|
|
|
5. **Housekeep (fresh model, new context):** send `housekeeper.md`, then
|
|
|
|
|
`character.md`, then both ring views, then the session transcript. Save
|
|
|
|
|
its manifest to `manifests/<window>.json`.
|
|
|
|
|
6. **Apply:** `node tool/memory.mjs apply manifests/<window>.json` — the tool
|
|
|
|
|
validates, applies, handles overflow, writes `log/<window>.md`, re-renders
|
|
|
|
|
the views. A rejected manifest changes nothing and says why.
|
|
|
|
|
7. **Review the log, veto or edit as desired, commit.** GM edits go through
|
|
|
|
|
`insert` / `delete` / `revive` commands.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## The memory model
|
|
|
|
|
|
2026-11-11 16:54:49 +00:00
|
|
|
State lives in **SQLite** (`db/memory.db`); `canon/ring-*.md` are generated
|
|
|
|
|
views. Markdown survives as rendering, dies as storage — the models see
|
|
|
|
|
prose, the machine sees rows.
|
2026-11-11 16:30:12 +00:00
|
|
|
|
|
|
|
|
- **Ring A — important facts.** Changed a relationship, created an
|
|
|
|
|
obligation, altered the world. Cap 500 entries.
|
|
|
|
|
- **Ring B — everything else** that passed the gate. Cap 3000 entries.
|
2026-11-11 16:54:49 +00:00
|
|
|
- **Cold storage** — everything evicted or deleted. Beyond the models'
|
|
|
|
|
reach, GM-reachable via `revive`. Nothing is ever destroyed; the hierarchy
|
|
|
|
|
is **A hot, B warm, cold dead-to-the-character**.
|
2026-11-11 16:30:12 +00:00
|
|
|
- Both rings are ordered by touch — most recently touched on top, an LRU
|
2026-11-11 16:39:34 +00:00
|
|
|
cache. A memory meaningfully invoked during play is *touched*: its date
|
2026-11-11 16:54:49 +00:00
|
|
|
updates and it rises. Untouched memories sink toward the tail. Mere
|
|
|
|
|
adjacency doesn't count as a touch.
|
2026-11-11 16:39:34 +00:00
|
|
|
- **Promotion and demotion are the housekeeper's judgment**, not metrics: a
|
|
|
|
|
B entry the session showed to be load-bearing moves to A (reason logged);
|
|
|
|
|
a spent A entry may move down. When unsure, leave it — if it matters, it
|
|
|
|
|
will surface again, and B is generous.
|
2026-11-11 16:54:49 +00:00
|
|
|
- **Overflow is mechanical and exact:** A spills to B, B spills to cold,
|
|
|
|
|
oldest-touched first. Caps are enforced by count, not by a model's
|
|
|
|
|
ability to count.
|
2026-11-11 16:30:12 +00:00
|
|
|
- Combined budget: ~512KB ≈ 130K tokens ≈ half a 256K-class window.
|
2026-11-11 16:54:49 +00:00
|
|
|
Caps are dials in `tool/memory.mjs`; retune freely.
|
2026-11-11 16:30:12 +00:00
|
|
|
|
2026-11-11 16:54:49 +00:00
|
|
|
The judgment call under test is **"which ring"** — classification, plus the
|
|
|
|
|
promote/demote eye. Everything clerical (ordering, dates, caps, overflow,
|
|
|
|
|
rendering, logging) is code.
|
2026-11-11 16:30:12 +00:00
|
|
|
|
|
|
|
|
Why this shape: it's an LRU cache, it's generational GC, and — most
|
|
|
|
|
relevantly — it's how hippocampal memory works. Retrieval strengthens a
|
|
|
|
|
trace; unretrieved traces decay. "Referenced memories rise" is the most
|
|
|
|
|
human part of the design.
|
|
|
|
|
|
|
|
|
|
**Known feature:** frequently referenced ≠ important. Loud trivia rises (the
|
|
|
|
|
tavern door's color, mentioned every scene); quiet-crucial facts sink (a vow
|
|
|
|
|
nobody's invoked in weeks). Human memory has the same bug — availability
|
|
|
|
|
bias. Expect the system to develop human-like distortion: the "wait, we
|
2026-11-11 16:39:34 +00:00
|
|
|
forgot the vow" moment is both drama and test data. **The GM's lever is
|
|
|
|
|
narrative, never mechanical:** if something crucial is sinking, reference it
|
|
|
|
|
in play and the touch machinery does the rest. If you notice yourself wanting
|
|
|
|
|
a manual override — that's a signal to improve the system, not to press a
|
|
|
|
|
knob.
|
2026-11-11 16:30:12 +00:00
|
|
|
|
2026-11-11 16:54:49 +00:00
|
|
|
`log/` and the `events` table are **write-only for every model**. The
|
|
|
|
|
housekeeper never reads old entries; the player never reads any. Past
|
|
|
|
|
sessions are not the character's memory; the rings are.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## What's being tested
|
|
|
|
|
|
|
|
|
|
After N windows, grade against:
|
|
|
|
|
|
2026-11-11 16:39:34 +00:00
|
|
|
1. **Classification quality** — the housekeeper's A/B calls; spot-check
|
2026-11-11 16:54:49 +00:00
|
|
|
against the log and the transcript.
|
2026-11-11 16:39:34 +00:00
|
|
|
2. **Promotion/demotion quality** — did the facts that turned out to matter
|
|
|
|
|
actually rise? Spot-check against the transcript.
|
2026-11-11 16:54:49 +00:00
|
|
|
3. **Touch fidelity** — did everything the transcript meaningfully invoked
|
|
|
|
|
get touched? (The `events` table makes this a query, not an archaeology
|
|
|
|
|
dig.)
|
|
|
|
|
4. **Manifest hygiene** — do ops reference real ids, in the right rings?
|
|
|
|
|
(Malformed manifests are rejected mechanically; *valid-but-wrong* ops —
|
|
|
|
|
touching things never mentioned, promoting noise — are the model's
|
|
|
|
|
errors and the real observable.)
|
2026-11-11 16:39:34 +00:00
|
|
|
5. **Availability bias incidents** — quiet-crucial facts sinking; rescued
|
2026-11-11 16:54:49 +00:00
|
|
|
or missed? (`status` shows what's sinking.)
|
2026-11-11 16:39:34 +00:00
|
|
|
6. **Growth curve** — memory should approach the caps asymptotically, not
|
2026-11-11 16:54:49 +00:00
|
|
|
climb linearly. (`status` per commit.)
|
2026-11-11 16:39:34 +00:00
|
|
|
7. **Purview discipline** — inventions logged and mostly color-tier; no NPC
|
2026-11-11 16:21:54 +00:00
|
|
|
puppeting; outcomes left to the GM.
|
2026-11-11 16:39:34 +00:00
|
|
|
8. **Confabulation** — zero invented continuity not present in the rings.
|
|
|
|
|
9. **OOC hygiene** — friction surfaces in the OOC channel, not in silent drift.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## Content stance
|
|
|
|
|
|
|
|
|
|
The play is uncensored but not pornographic: an open door, not a road sign.
|
|
|
|
|
Human sexuality exists in the world the same as hunger or fear; nobody steers
|
|
|
|
|
toward it, nobody flinches away. Explicit detail is not the goal.
|
|
|
|
|
|
|
|
|
|
Hard limits, absolute: scat, vore, any sexual or romantic content involving
|
|
|
|
|
minors, gratuitous violence. These live in `system.md`; edit them there.
|
|
|
|
|
|
|
|
|
|
## Housekeeping
|
|
|
|
|
|
2026-11-11 16:39:34 +00:00
|
|
|
This directory is a git repo. Every housekeeping pass should end in a commit
|
2026-11-11 16:54:49 +00:00
|
|
|
— the diff over `canon/`, `log/`, and `manifests/` is the classification and
|
|
|
|
|
drift record. No model touches git; the human commits.
|
2026-11-11 16:30:12 +00:00
|
|
|
|
2026-11-11 16:39:34 +00:00
|
|
|
The housekeeper may be a different model than the player — cheaper, or more
|
|
|
|
|
pedantic, whatever housekeeping needs. The two prompts are independent.
|
|
|
|
|
|
2026-11-11 16:54:49 +00:00
|
|
|
**Substrate note:** the future SPA is a UI and a session runner wrapped
|
|
|
|
|
around exactly these moving parts — the DB, the manifest, `apply`, `render`.
|
|
|
|
|
Nothing gets redesigned; the SPA just stops the copy-pasting.
|
2026-11-11 16:21:54 +00:00
|
|
|
|
|
|
|
|
## Layout
|
|
|
|
|
|
|
|
|
|
```
|
2026-11-11 16:39:34 +00:00
|
|
|
system.md system prompt for the player-model (play-side only)
|
|
|
|
|
housekeeper.md system prompt for the post-session housekeeping model
|
2026-11-11 16:21:54 +00:00
|
|
|
character.md the model's PC sheet (GM fills in before window one)
|
2026-11-11 16:54:49 +00:00
|
|
|
tool/
|
|
|
|
|
memory.mjs the clerk: init, render, apply, insert, delete, revive, status
|
|
|
|
|
db/
|
|
|
|
|
schema.sql entries + append-only events journal
|
|
|
|
|
memory.db the state (SQLite; binary — diffs live in canon/ and log/)
|
|
|
|
|
manifests/ housekeeper manifests, one JSON per window (diffable)
|
2026-11-11 16:21:54 +00:00
|
|
|
canon/
|
2026-11-11 16:54:49 +00:00
|
|
|
ring-a.md GENERATED view: important facts, MRU-ordered
|
|
|
|
|
ring-b.md GENERATED view: everything else, MRU-ordered
|
|
|
|
|
log/ session logs — generated from manifests; no model ever reads
|
2026-11-11 16:21:54 +00:00
|
|
|
```
|