substrate: server, housekeeping job, spa - the mvp complete

- prompt split, GM's cut: system.md = opening + guards (glossary, purpose, input validation; repo-fed, per-project); invariants.md = substrate (syntax markers, tools, memory, records, the paper + its three-part gate; repo-fed, travels with the code); handbook.md = craft copy (shape of play, thoughts, purview, time skips, continuity, stance, hard limits; copied per run). One system message: system -> invariants -> the run's handbook. OOC is a single open paren, closing optional, match the GM's style; a lone paren is an empty OOC line, skipped by the parser. housekeeper.md aligned: the paper holds acute states, relational shifts are recorded as the facts behind them, and dates are story dates (follow the rings' calendar, never the wall clock - the seed is 2069 now, per canon)
- server/ (phase 2, zero-dep node:http): REST spine per the sketch, per-run session machine with ask_gm pause/resume (the whole tool-call batch waits, pairing stays sound), view renderer (thinking-strip, tool-result elision with ask answers exempt, old status/conflict blocks stripped), boot-rebuild from the typed jsonl, lazy seed + turn-0 ingestion at window-open with the unhousekept refuse-and-override guard, usage tracking + context meter, tool-pairing validation, scripted mock model. The clerk gained --json (packages/runs/status); tool/bridge.mjs deleted at mock-parity per the retirement decision
- housekeeping job (phase 3, server/housekeeping.mjs): trigger ends the window and runs the chain async - transcript with labeled thinking, run-state injection (records availability; the ring views stay pure memory), housekeeper on a fresh context, manifest saved (raw output too if unparseable), clerk apply (writes the window log, snapshots dumps/<window>.sql), state.json lastHousekeptSession, autorestart. Rejection holds the restart and surfaces why; the apply endpoint is the recovery path and the manual-relay close. Live-proven twice: both manifests sound (ring-B classification, first-person voice, precise touches, story-dated)
- spa (phase 4, web/ - no build, vanilla es modules, served at /): three-register transcript per the ruled markers incl. multi-line narration blocks, bundle as a collapsed card with turn-0 as the opening GM turn, paper tags as chips, status pane with conflict surfacing, context meter hot past 85 percent, gm line input, ask modal re-presented from pendingAsk, housekeeping button with two-click arm + poll + inline log. No js alert/confirm (they block the embedded pane) - in-page banner instead. Driven end to end through the ui on a disposable live run
- seed: date fixed to the 2069 story calendar (was a real-world date; real dates never surface to the player)
- docs: README goal states the mvp is complete, layout covers server/ and web/, protocol and substrate sections rewritten for the server; ROADMAP phases 0-4 done, harness decisions current; QUESTIONS #4 #7 #10 #12 #16-mechanism #19a #20 #21 resolved; HANDOFF is the handoff map; AGENTS carries the working lessons (tokens are free, no screenshots - not multimodal, no js dialogs, external state survives rewinds)
This commit is contained in:
2026-11-14 03:15:53 +00:00
parent 530170224f
commit ba72d2ed1f
22 changed files with 2418 additions and 838 deletions
+18 -11
View File
@@ -13,6 +13,8 @@ You never play, you never edit files, you never see the database directly.
# Inputs
- this prompt
- run state — facts about the run itself (records availability),
injected alongside this prompt
- `character.md` — whose memory this is
- `backdrop.md` — the world's public knowledge, so you know what is *not*
memory
@@ -63,10 +65,13 @@ detail carries the memory.
Every key except `window`, `date`, and `summary` is optional — empty or
omitted is fine. Types are `place`, `person`, `fact`, `thread`. Ids come
from the rendered views; never invent one. Housekeeping is **rings-only**:
`archive` is valid when the ring views say records are available, but
`record` is not yours at all — filing happens at the player's desk, and
the tool rejects it.
from the rendered views; never invent one. `date` is a **story date**:
follow the calendar already established in the ring views and the
transcript — never the real-world clock, whose dates must never reach
the player. Housekeeping is **rings-only**:
`archive` is valid when the run provides records (the invocation tells
you), but `record` is not yours at all — filing happens at the player's
desk, and the tool rejects it.
Promote, demote, and reword count as touches — the script updates the touch
date for you. Don't list an id twice across operations.
@@ -128,13 +133,15 @@ date for you. Don't list an id twice across operations.
("I suspect Marta knew"). Wrong facts in memory are worse than no
facts: an entry that later turns out false is a retcon. In a story full
of liars and mysteries, attributed claims are the only safe facts.
- Rings hold **facts, never her feelings**. Stances ("I trust Marta
less") live on her paper, which is entirely hers — you never write
it. Watch the paper across the session: when a non-normal state has
become her new normal, place the drift — record it as a fact if it
belongs in memory, or propose a card edit in open questions if it is
identity. If her paper contradicts the session you just read, flag
it.
- Rings hold **facts, never her feelings**. Her paper holds acute
states, and it is entirely hers — you never write it. A relational
shift is not a stance to record: write the fact behind it ("Marta
lied about the radio" — attributed per the testimony rule), and the
stance stays in the prose. Watch the paper across the session: when
a non-normal state has become her new normal, place the drift —
record it as a fact if it belongs in memory, or propose a card edit
in open questions if it is identity. If her paper contradicts the
session you just read, flag it.
- `character.md` (identity) is the GM's too. If identity or drives have
shifted, propose an amendment in open questions; never edit the sheet
yourself.