boot: backdrop tier, one-time seed migration, init stubs

This commit is contained in:
2026-11-11 18:52:04 +00:00
parent f5aa09c686
commit 25469b934c
6 changed files with 173 additions and 15 deletions
+31 -10
View File
@@ -50,14 +50,32 @@ Two interleaved stories calibrate the memory system against itself:
`node tool/memory.mjs runs` shows fill levels; `--run <name>` overrides the
`config.json` default for any command.
## Booting a run
1. **Backdrop** — write `runs/<story>/backdrop.md`: the world as everyone
in it knows it. Public knowledge, general setting. Neither memory nor
state — never touches the rings, never decays, always in the bundle.
The housekeeper is instructed to keep it out of the rings.
2. **Character** — write `runs/<story>/character.md`: starting identity.
Blanks are the player's to invent through play (their past is their
purview); the GM ratifies notable inventions into the card afterward.
That's the freeform version of a random roll — no tables.
3. **Seed** — write `runs/<story>/seed.json` and run
`node tool/memory.mjs seed`. A one-time, all-or-nothing migration:
`entries` → the rings (initial memories), `status` → starting values,
`records` → pre-existing files (gated by `settings.json`). Refuses if
the run has any history; `--force` only on a disposable db. Everything
is journaled under window `seed`.
4. **First window** — `render`, paste the bundle, narrate.
## The protocol
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/status.md`, then `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.)
2. **Open a window:** send `system.md`, then `runs/<story>/backdrop.md`,
then `character.md`, then `canon/status.md`, then `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
@@ -68,8 +86,9 @@ Two interleaved stories calibrate the memory system against itself:
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
the run's `character.md`, then both ring views, then the session
transcript. Save its manifest to `runs/<story>/manifests/<window>.json`.
the run's `backdrop.md` and `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
@@ -83,11 +102,12 @@ State lives in **SQLite** (`runs/<story>/db/memory.db`); `canon/ring-*.md`
are generated views. Markdown survives as rendering, dies as storage — the
models see prose, the machine sees rows.
Memory is **five tiers**:
Memory is **six tiers**:
| tier | what | in context | who writes it |
|---|---|---|---|
| **identity** | the character sheet — concept, drives, skills, voice; changes rarely | always | GM, rarely; housekeeper may propose via open questions |
| **backdrop** | the world as everyone knows it — public knowledge, the general setting; never memory, never forgotten | always | GM, rarely (retcons) |
| **identity** | the character sheet — concept, drives, skills, voice; changes rarely | always | GM, rarely; housekeeper may propose via open questions; blanks are the player's to invent |
| **status** | her current self — mood, outfit, condition, stances toward people. State, not memory: no history, no decay, updated in place | always | **the player** (`((status key: value))`); GM override exceptional and journaled |
| **rings A/B** | salient memory — facts, on her mind, MRU-evicted | always | housekeeper manifest |
| **records** | her files — the card index, the ledger. Narrow query only, hard cap 10 (in the tool, not the prompt), never bulk-loaded | never — on demand | **the player** (`file`/`amend`/`discard` at her desk); GM seeds; housekeeper only `archive`s |
@@ -246,7 +266,8 @@ tool/
db/
schema.sql entries, records, status, events journal (shared)
runs/
prisoners/ one story: character.md, settings.json, db/, dumps/, canon/
(status.md, ring-a.md, ring-b.md), log/, manifests/
prisoners/ one story: backdrop.md, character.md, seed.json, settings.json,
db/, dumps/, canon/ (status.md, ring-a.md, ring-b.md),
log/, manifests/
boutique/ same shape — records enabled (the shopkeep's PC)
```