runs: per-story state, prisoners and boutique interleaved
This commit is contained in:
@@ -35,12 +35,28 @@ 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.
|
||||
|
||||
## Runs
|
||||
|
||||
Two interleaved stories calibrate the memory system against itself:
|
||||
|
||||
| | `prisoners` | `boutique` |
|
||||
|---|---|---|
|
||||
| entries per window | few — tiny cast, deep history | many — the customer parade |
|
||||
| dominant ops | touch, reword | insert, gate, demote/retire |
|
||||
| ring A pressure | staleness — standings shift on hot entries | clutter — obligations accrete |
|
||||
| player agency | constrained — reactive creativity | full — proactive creativity |
|
||||
|
||||
`node tool/memory.mjs runs` shows fill levels; `--run <name>` overrides the
|
||||
`config.json` default for any command.
|
||||
|
||||
## The protocol
|
||||
|
||||
1. **Refresh the views:** `node tool/memory.mjs render`
|
||||
2. **Open a window:** send `system.md`, then `character.md`, then
|
||||
`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.)
|
||||
1. **Refresh the views:** `node tool/memory.mjs render` (default run comes
|
||||
from `config.json`; `--run <name>` overrides)
|
||||
2. **Open a window:** send `system.md`, then `runs/<story>/character.md`,
|
||||
then `runs/<story>/canon/ring-a.md` and `ring-b.md`, then narrate the
|
||||
first beat. (On a tight window, ring B is optional loading — ring A is
|
||||
the spine.)
|
||||
3. **In play:** `((double parentheses))` is the out-of-character channel —
|
||||
points of order, canon questions, proposals, vetoes. Both sides use it.
|
||||
Entries carry stable ids (`[e17]`); citing one is the precise way to
|
||||
@@ -48,11 +64,12 @@ explicit and logged.
|
||||
4. **Close a window:** just stop. No in-band ritual; the player-model has no
|
||||
end-of-session duties.
|
||||
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.
|
||||
the run's `character.md`, then both ring views, then the session
|
||||
transcript. Save its manifest to `runs/<story>/manifests/<window>.json`.
|
||||
6. **Apply:** `node tool/memory.mjs apply runs/<story>/manifests/<window>.json`
|
||||
— the tool validates, applies, handles overflow, writes the run's
|
||||
`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.
|
||||
|
||||
@@ -141,7 +158,7 @@ minors, gratuitous violence. These live in `system.md`; edit them there.
|
||||
## Housekeeping
|
||||
|
||||
This directory is a git repo. Every housekeeping pass should end in a commit.
|
||||
The **primary audit surface is `dumps/memory.sql`** — the canonical dump:
|
||||
The **primary audit surface is `runs/<story>/dumps/memory.sql`** — the canonical dump:
|
||||
id-ordered, one row per line, auto-written by every mutation. Because the
|
||||
ordering is by id, diffs are position-stable — a touch is one changed line,
|
||||
a promotion is one changed line, an eviction is one changed line. Diffing
|
||||
@@ -156,10 +173,10 @@ the db with a sqlite browser, run `dump` afterwards and confess in the
|
||||
commit message.)
|
||||
|
||||
The dump is restorable SQL and the **committed truth**; the binary
|
||||
`db/memory.db` is a gitignored local cache — fresh clone:
|
||||
`node tool/memory.mjs restore`. The `canon/` views stay committed as
|
||||
provenance — exactly what the models were sent — and `log/` + `manifests/`
|
||||
remain the human-readable record.
|
||||
`runs/<story>/db/memory.db` is a gitignored local cache — fresh clone:
|
||||
`node tool/memory.mjs restore` (per run). The `canon/` views stay committed
|
||||
as provenance — exactly what the models were sent — and `log/` +
|
||||
`manifests/` remain the human-readable record.
|
||||
|
||||
The housekeeper may be a different model than the player — cheaper, or more
|
||||
pedantic, whatever housekeeping needs. The two prompts are independent.
|
||||
|
||||
Reference in New Issue
Block a user