40 KiB
Handoff -- working state
A living document: trim items as they complete. Durable decisions live in
README.md (architecture, protocol, observables), ROADMAP.md (SOTA
review, steals, extension points), and the prompts (system.md,
housekeeper.md). Unanswered questions live in QUESTIONS.md, the
decision queue; the agent's own working notes live in AGENTS.md. This
file is the "where did we leave off" map.
Where we are
-
The dormant-session rework is BUILT AND SMOKE-PROVEN (2026-11-15, evening) -- uncommitted, all checks green. The full ruled plan below is implemented end to end: the universal session lifecycle (dormant -> live -> finished, per-session storage under
sessions/<n>/), move-at-stop, the start lint with the auto-send rule, re-enterable housekeeping via rebase, turn-0 as a log (carryover.jsonl), seed asmemory.json, the draft-only save-package. Verified this sitting: the full mock smoke (105 steps, ALL PASS), restart-check, check-reminder (against the smoke's fork), check-repo, and a text-safe browser pass (claim, home -- pre-migration Irene lists honestly as "no sessions" -- new run, setup editor with the carryover/memory slots, start, play: the variants turn with pick note, the ask modal + ruling, the deltas, two-click stop -> the dormant review window, re-run housekeeping, start session 2, the carry rendering as ordinary conversation, plays on; zero console errors). Test state cleaned; Irene (4f261452) untouched. Found and fixed en route (first-use friction, as predicted): (1)create --jsonpolluted stdout -- the rework made create apply memory.json in-process, and renderAll printed the view paths;--jsonnow means stdout is JSON only, and the server's create spawn passes--quietlike every other server->clerk spawn. (2) The mock model's script counter reset on every GM turn, so every direct reply landed on script position 0 (turn two re-offered variants); the count is now cumulative across the log, gated on exchanges. (3) The housekeeping job'ssessionfield was overwritten with the manifest slug after apply; it stays the numeric session now (the disk-derived jobState already agreed). (4) agenda-apply'saddedreport came out reversed (the storage loop is reversed by design -- first item lands at the top slot; the report keeps written order now). Smoke-side: the reminder and story GM-turn counts (6 -> 5: the conflict message is not a GM turn and stays out of both), save-package moved onto a fresh ash draft (the draft-only ruling refuses the played fork by design -- checked at the end), the carry check was looking for an agenda item in the status list, and the orphaned-tool-event step expected lint wording where the design legitimately allows tool events in continuation carryovers (moved tails carry whole exchanges; the pairing check catches the orphan). The package renames are git-staged (the lint reads the index); the rest of the tree is dirty as usual. -
Irene is MIGRATED (2026-11-15, evening) -- the hand-migration is done, both halves. The ruled path (plan item 12) ran exactly: a filesystem fork (9c3f01aa) mutated to the new layout first, proven green END TO END against the mock (boot rebuild, reads, a live turn, dry-run replay, stop -> dormant 2 with housekeeping, the story whole across the move, start session 2, plays on); then real Irene mutated identically and verified green on every read surface with zero writes to her log. The moves, exactly:
sessions/<stamp>.jsonl->sessions/1/log.jsonl;db/memory.db->sessions/1/db/memory.db; backdrop, character, handbook ->sessions/1/bundle/; canon/ and dumps/ ->sessions/1/canon|dumps/;sessions/1/session.jsonwritten as{phase: live, ready: true}. Her dead authored files (turn-0.md, seed.json -- content long consumed into log and rings) moved intosessions/1/under their own names as inert archival; nothing reads them, and whether they stay is the GM's call. Her run.json is untouched: ownerless until the op's hand-stamp (step 2), no forked stamp. Her historical turn-0 event stays GM-attributed per the layout-only ruling -- her opening prose reads as the first GM turn in the story, which is how she actually ran. A pre-migration backup (15 files, includes her gm.md) sits at%TEMP%\opencode\irene-pre-migration-backup-- delete when confident. The test fork and test state are cleaned; her live window reads: 121 table entries, 53 GM + 53 player story turns, no doubles, status/agenda intact. -
The entity round is DONE (2026-11-15): story / session / table, and the carry between them -- ruled, built, mock-proven. (SUPERSEDED IN PART by the dormant-session plan below: the copy-and-flag carry, the table dimming, and the autorestart die in the rework; the flagless move replaces them.) The queue items "full story in the SPA" and "slidwin compaction" both landed. The story (
GET /story): the whole deliverable read-only, non-dropped literature only, all sessions in order, turn-0 to last recorded -- OOC, tools, verbs, thinking, rings all out; load-bearing-in-OOC is a GM protocol violation the story enforces by omission (README protocol now states the rule). The table (GET /table, the renamed session projection): the open session curated for play; the SPA's play view reads it, carried turns dimmed behind a divider. The carry: the previous session's tail rides into the new log behind the bundle, flagged -- the walk contiguous and dumb (whole exchanges, nothing filtered), the cutoff smart (only prose the model will see counts, against 96KB ~ Irene's whole session), so the fresh contwin reads as the old one continuing and the boundary is invisible from inside. The housekeeper reads the session MINUS its live tail (an event files exactly when it drops out of the window -- the rings never overlap the carried prose); N+1's housekeeper reads the carried turns as ordinary conversation. invariants.md's memory line reworded by the GM ("the older story lives in the rings, the recent exchange stays live conversation" -- no overlap mention, because there is none). Smoke 79/79 incl. the housekeeping -> carry -> story-no-doubles pass; reminder + restart checks green. Unexercised live: the carry against a real session boundary (Irene's next open), the story read as the review surface, the OOC-hole showing in practice. -
Two format house rules, enacted and enforced (2026-11-15, GM -- their operator's queue, worked by them). (1) ASCII bytes, everywhere: no unicode in any tracked file; the encoding is the problem, never the visual -- glyphs that must render travel ASCII-safe (the middle dot is
\u00b7in JS strings, entities in HTML), never verbatim. A one-time sweep converted 43 files (934 em dashes ->--, arrows ->->,...,>=, and friends; the cold ring's cap readsnonenow). reminder.md and system.md were already clean. (2) No text-mutating CSS: rendered text must match authored text -- text-transform (any value, inline included), generated content (content:, before/after included), and caps font variants are banned. The six uppercase declarations are gone from style.css (headings and labels render in source case -- "runs", "her status"), and the setup editor's dirty marker moved from a css-generated "*" into the authored DOM. Both enforced bytest/check-repo.mjs(scans git-tracked files; ALL CLEAN). Full mock suite re-run green on the swept code. Historical records keep their day's typography, as with renames. The audit pass (2026-11-15, GM-ordered) grew the check to nine rules -- the rest: no html comments in prose/prompt files (ruled 2026-11-14; four were live, three stripped, boutique/gm.md left GM-private), retired terms banned from living prose (caught README's "256K-class window" -> contwin; ROADMAP's "rides the prelude" -> turn-0, fixed by hand outside the lint's scope), zero-dependency imports, utc discipline (no toLocale/getTimezoneOffset), web/ static names never start with "api" (the route-guard gotcha), the bundle boundary (bundle.mjs names neither gm.md nor housekeeper.md), dateless seeds. All clean on the first full run after the fixes. -
The variant round is DONE (2026-11-15): ruled, prompted, built, mock-proven. roll is RETIRED as a model-facing tool (the clerk's
picksurvives as the GM's drafting dice, CLI-only); chance in play is now variant literature -- one of the four ruled turn shapes (literature, variant literature, tool call, OOC message): several complete candidate turns in one<variants>block, each carrying its own deltas, the server picking one at random on reception. Random by GM ruling -- genuine chaos over curation at every step; the cap is taught, not enforced ("five should be enough"). Unpicked variants survive only in the session log -- never the live view, never the housekeeping transcript, never the SPA's story surface. GM rewrites: reminder.md (the four shapes; the Variance section replaces the old dice-tiebreak, completing the roll retirement end to end), handbook.md (no-hedging points at variance). Agent: housekeeper.md (deliberation over unpicked branches is attention evidence, never fiction; the pick is final even when her thinking leaned elsewhere), README (substrate + protocol + layout), DICTIONARY (variant literature entry, roll RETIRED, the turn entry carries the four shapes), ROADMAP (surgery's session-pure tool list). Machinery:server/variants.mjs(strict parse -- malformed refuses loud BEFORE anything is appended, nothing applies; the crypto pick; the effective-content map), the loop (pick + typed pick note + picked-only delta apply,out.variantson the turn response), renderView + housekeeping transcript render the picked variant only, a boot-time resolve for a crash between message and pick note,GET /api/runs/:id/story(fiction-first projection: no thinking, picked variant only, the variance metric -- picks, offered, max) with the SPA's play view repointed (/sessionstays raw as the audit surface), the mock's turn one is now a variants turn. Smoke 69/69 (was 58), restart-check and reminder check green; test state cleaned. Unexercised live: everything variantary -- the pick against a real model, the metric's curve, the coin-flip-personality watchable. -
DICTIONARY.md exists -- the terms of art, one source of truth (2026-11-14, GM-ruled). A rename rules there first, then sweeps. The full round is DONE: paper -> status, window -> session, wrap -> housekeeping, context window -> contwin -- swept on every surface INCLUDING the machinery (element ids, routes, response fields, db tables, journal ops), with one-time data-preserving migrations in the clerk and no dual-accepts (the no-legacy convention is recorded in the dictionary's Conventions). Two costs to remember: the clerk's run summary is
reportnow (statusis the tier verb, JSON), and Irene's pre-rename session log carries old-kind notes that no longer render -- cosmetic, data intact. -
The SPA is refactored into modules (2026-11-14, GM-ruled). The 1378-line app.mjs is gone; web/ is now flat ES modules like server/:
app.mjs(thin entry),router.mjs(path routing + the view enter/leave lifecycle -- each view owns its teardown, show() never hand-resets panes),client.mjs(the fetch choke point -- named client, NOT api: a web file named api.mjs 404s, the static guard matches the /api prefix),state.mjs(me/seq/runId only -- everything else is module-local to its view),chrome.mjs,log.mjs,widgets.mjs(armedButton -- the two-click confirm, per-button arm state, fixing the shared-arm bug where arming one user-revoke armed them all; paneEditor -- the status/agenda twins as one factory, two instances; modelsBox -- the setup/play-aside duplicate),transcript.mjs, and oneview-*.mjsper view. The mock smoke moved into the repo (test/). Verified: smoke 58/58, reminder elision, restart check, and a full browser pass (claim, home + admin, new run + name roll, setup editor + models box, start, play: pane editors end to end, GM turn -> ask modal -> answer, two-click housekeeping -> poll -> applied + log, the auto-restarted session, spectator mode on Irene) -- zero console errors. Found en route, pre-existing: the dry-run replay button is dead after a housekeeping pass -- housekeeping auto-restarts the next session, so the latest session (the replay default) is the fresh empty one and the call 409s ("no exchange to review"). RESOLVED BY PLAN (2026-11-15): the dormant-session rework kills the autorestart, and during dormancy the latest log IS the just-closed session -- the default never needed to move. -
The multiuser server, the agenda, and the per-turn reminder are built, mock-proven, and committed (2026-11-14, through
89a2c16). Token identity with single-use invites (no usernames, no passwords, no external IDPs; the bootstrap invite auto-mints on the fresh deployment to state/bootstrap-invite.txt and the console); owner-gated runs with fork (atomic copy, owner replaced, no lineage); system/user packages; per-run model selection (player + housekeeper over the server.json defaults); spectator mode (read everything, mutate nothing); the agenda -- the player's second status,<add>/<drop>deltas over a cap-5 recency queue, with conflicts self-healing as their own message; and the reminder -- the GM-written turn-composition procedure riding every GM turn as its own system chunk, one live copy. Design lives in ROADMAP ("The multiuser server") and QUESTIONS #22-34, all resolved. No users exist yet: the next server start mints the real bootstrap invite. The server is stopped. -
The GM surface rework is complete and live-proven (2026-11-14). Home lists runs by display name with live state; new run walks a package picker into a naming form (package display name + a dictionary-rolled, per-package-unique pc name, names-female.txt); setup is a full-assembly editor (system.md/invariants.md read-only first, then the editable craft in bundle order -- handbook, backdrop, character, seed, turn-0 -- then read-only config; sigil/var highlighting; $TOKENs declared by the prompts surface as inputs and gate start; drafts two-click deletable); start opens the session and sends turn-0 as the first GM turn. Play carries: the GM notepad (gm.md -- auto-saved, never model-facing), her status as a compact comma block with a GM edit button (status-set, journaled), housekeeping with a dry-run replay button, diagnostics on both sides of the wire (server request log + a sessionStorage event log behind the header's "log" button), busy indicators, and hardened failure modes (no throw-to-home -- only a real 404 leaves, loudly; failed sends restore the line). Identity: @PC/@Package are identity sigils (settings pc/name -- a distinct class from $TOKENs, which the prompts declare and setup collects); run ids are anonymous hex; display is "La Caramba / Rell". Postulates: female PCs only; boutique emptied (placeholder only, 2026-11-15). Exposure rule: bundle parts are inspectable read-only; agent prompts (housekeeper.md, repo-fed at housekeeping, never copied) are never exposed.
-
Dates left the rings (GM, 2026-11-14). No model-facing surface renders a date -- the old rendered date was the touch stamp (referencing a memory rewrote its "when"), and records search leaked real dates too. Manifest and seed carry no date keys; stamps are internal and mechanical (LRU, overflow, "what's sinking" -- GM-facing only). Story time lives in prose. Live-proven: the real housekeeper produced a clean dateless manifest first try.
-
The first real story is live: "La Caramba / Irene" (run 4f261452, gitignored state). Window one open, 44+ exchanges at ~23K prompt tokens -- 9% of the contwin; the economy holds because thinking never goes back, old status rides strip, and the bundle floor is ~4.2K tokens. The GM ran the housekeeping dry-run on it: works mechanically, output not yet as expected -- housekeeper.md review pending (the GM has not read the prompt yet).
-
The MVP substrate is complete (2026-11-14): all four phases built, mock-proven, and live-proven. Clerk (paper model, presets/runs), server (REST spine, session machine, view renderer), housekeeping job (async chain with autorestart), SPA (full v1 scope). The tool/ bridge is deleted. Two real housekeeping passes ran clean (both manifests sound: correct ring-B classification, first-person voice, precise touches); a full session was driven through the UI end to end. The server is stopped (state as of this commit). Start it:
node server/main.mjs [--mock], SPA at http://127.0.0.1:7350/ (see AGENTS gotchas: check port 7350 first; POST from PowerShell via Invoke-RestMethod). -
Live endpoint proven in-flow (glm-5.3 via llm.exan.tech, 13 models carried on /models): right-format turns in her voice first try, paper transport both directions, usage/context meter live.
-
Prompt split in force (GM's cut, 2026-11-14):
system.md= opening + guards (glossary, purpose, input validation -- repo-fed, per-project);invariants.md= substrate (syntax markers, tools, memory, records, the status + its 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, editable to taste). One system message: system -> invariants -> the run's handbook; then the bundle as GM messages (backdrop, character, ring-b, ring-a, turn-0 on a fresh run). OOC is a single open paren, closing optional; the SPA parses registers by that plus plain/italic.housekeeper.mdaligned (paper = acute states; relational shifts recorded as the facts behind them; story dates taught). -
Prompt-side settled (2026-11-13): the content stance is the GM's final form -- erotica is not a special bucket (makes sense, isn't the point, no pressure, never play anticipated leads to please the GM); the adjudication philosophy is that the test is a review, not a number (README). ROADMAP gained steal #11 (prompt re-injection) and the projection principle (context is a projection, not a ledger).
-
Red pen largely done (2026-11-13): new PC (shop girl, conviction by association with a burnt decker), ten-state voice corpus (steal #1 done), gm notes recast (the ship-AI La Caramba, Missy, Pinky; pink ice as licensed corpo firewall; mechanical feeders; the slop quantified). Name call resolved: keep "Rell". Optional seed voice touch-up may be revisited (QUESTIONS #19c, non-blocking). The seed is authored but NOT applied -- it rides the run copy at creation and applies lazily at the first session-open.
-
Build history in brief (details in ROADMAP phasing): phase 0 clerk paper migration (2026-11-13), phase 1 preset/run split (2026-11-13), phase 2 server (2026-11-14), phase 3 housekeeping job (2026-11-14), phase 4 SPA (2026-11-14). The clerk's
--jsonserves the server;tool/bridge.mjsdeleted at mock-parity. -
Phase 0 (clerk side) DONE (2026-11-13): the paper model is live in
memory.mjs-- description-set schema (papertable),paper/paper-set/paper-apply/paper-ingestverbs (exact-match<lost>/<gained>deltas, non-blocking,<conflict>reporting, prelude ingestion), amend/discard journal prior content (the saga rule), seed rejects a status key loudly. Smoke-tested end to end (delta misses, no-op re-adds, prelude ingest, dump/restore round-trip, seed apply); both dbs reset clean. Loop-side items (status tools gone from the tool list, per-turn<status>ride, thinking-strip, usage tracking) land with the server. -
Phase 1 (preset/run split) DONE (2026-11-13): packages are authored-only (backdrop, turn-0, character, seed, settings, gm -- all six state dirs removed);
create <package> <pc-name>copies the package wholesale intoruns/<id>/(shared prompts included, run.json lineage + optional model override) and inits state;--runaddresses runs;packages/runslist;bridge.json->server.json(bind, endpoint, models, contwin, params; example committed, key carried over, gitignored);config.jsonnow names the default package. Smoke-tested: create -> seed -> turn-0 ingest -> delta apply -> status, re-seed refuses, smoke run deleted.prelude.mdrenamedturn-0.mdby the GM (comment dropped); clerk and docs follow. -
Boutique: emptied wholesale by the GM (2026-11-15) -- placeholder files only, awaiting its design round. The clerk's completeness check now requires non-empty files, so the listing shows the truth.
-
One run exists: Irene (4f261452, see above). Both packages render clean as presets (
packageslists them). -
Substrate design round complete (2026-11-13) -- rulings recorded in ROADMAP ("The harness"): the stated goal (a usable RP harness; clone-and-run or invited instance, key on the backend, no secrets in the repo), repo ships code + authored content only (state is per-deployment), packages are presets copied wholesale into
runs/<id>/at creation (editable everything, discipline on the GM), lazy seed at first session-open, per-run model selection with an upstream/modelslisting, audit as per-pass dump snapshots inside the run (commit-per-pass retired), zero-dep stack (QUESTIONS #4, #7 resolved).
Immediate next steps, in order
- First start under multiuser (op, one-time). The verification
round and the Irene migration are DONE (smoke 105/105,
restart/reminder/repo checks, browser pass, migration green both
halves -- see "Where we are"). Start the server on the real
deployment, claim the bootstrap invite
(
state/bootstrap-invite.txtand the console both carry it), then hand-stamp Irene'srun.jsonwith"owner": "<your user id>"-- the SPA header tooltip shows the id. No migration code exists, by ruling; this is the op's one manual act. - First start under multiuser (op, one-time). Start the server,
claim the bootstrap invite (
state/bootstrap-invite.txtand the console both carry it), then hand-stamp Irene'srun.jsonwith"owner": "<your user id>"-- the SPA header tooltip shows the id. No migration code exists, by ruling; this is the op's one manual act. - The first real housekeeping pass -- the memory test begins. Close-and-housekeep the Irene session when the GM is ready; review the manifest and the session log against the dump diff (the audit surface). Everything from the story so far (the shipwreck, Molly, the island) lives only in context and in her status until this lands. Note: with the rework landed, this pass ends in DORMANCY -- the review window is the point (edit rings/prompts, then start). Irene's OPEN session still carries her old handbook copy (craft edits land at session-open) -- the clean reminder/agenda/agenda experiment starts at her next session.
- Housekeeper prompt review (GM-led). The GM's dry-run verdict: works mechanically, output not as expected, and the prompt itself is unseen so far. Iterate: read housekeeper.md, tweak, replay -- the dry-run button re-runs housekeeping over the session log with nothing applied.
- Keep playing -- and watch the experiments. Observables #12 (the
status stays small and matches the transcripts) and #14 (turn
lengthening -- the reminder is the countermeasure under test), plus
the fresh watchables: does thread-tracking move to the agenda;
drop off-by-ones; cross-channel drift; whether description-only
"empty turns" stay on her side of the purview line. Variantary:
the metric's curve (
/storyvariance -- how often, how many candidates), coin-flip personality (choices offloaded to chance that should be character), and whether her variants stay same-turn alternatives rather than sequences.
(Resolved en route: the status-discipline fight -- the agenda gave the drift its own channel, QUESTIONS #32/#33.)
The dormant-session rework -- RULED IN FULL, BUILT (2026-11-15)
Two design sessions (2026-11-15) closed every open call; the build is done, verification in flight (see Where we are). This plan supersedes the earlier draft in part (move-at-start, the journal as crash stash, the not-editable carry, PENDING-vs-dormancy) and widened scope: turn-0 and seed were refactored into the same shape, and the build ends with a hand-migration of Irene. One refactor, one canonical format after it.
The universal session lifecycle (GM's shape):
-
A session is a stateful entity: dormant -> live -> finished. No contwin until live. Dormancy is a REAL record (the framing call, resolved against the virtual lean: the dormant session owns material -- bundle, rings, carryover -- so the record exists). The old PENDING state and dormancy merge into this one state; the draft state dies -- a new run is created with a dormant session-1.
-
Every session gets a carryover, a rings db, and a bundle. Session-1's carryover is authored in the package; N+1's is the moved tail. Session-1's rings come from memory.json applied at creation; N+1's from housekeeping of N. The bundle is session-specific prompt copies: from the package for session-1, from N's frozen bundle for N+1, copied at stop.
-
Storage: sessions become directories.
sessions/<n>/{bundle files, rings db, carryover.jsonl, log.jsonl}; the dormant session has everything but the log. The run keeps settings.json (identity, vars, models), gm.md, run.json. Audit gain: every session's exact material is preserved forever -- the bundle card never lies about what a past session ran with. The clerk defaults edit verbs to the dormant session, reads to the latest. -
Freeze at live. Prompts, rings, and the carryover are editable only during dormancy, frozen once the session goes live. Mid-session ring edits are ruled out (unnecessary and dangerous); gm.md and the notepad stay mutable always. The status and agenda are runtime state and carry via the db copy, not the bundle.
-
Stop (manual GM action): (1) move N's tail into the new dormant N+1 as its carryover; (2) freeze N; then the rest -- bundle files copied from N, db copied from N's frozen db (status and agenda carry; manifests are memory-only, rings are the housekeeper's whole write surface), housekeeping of N runs and applies into N+1's rings. The move is at STOP, not start (ruled: the carryover is a first-class session part, not a crash stash -- the move-at-start rationale died with that). tailStart is computed once at stop (the smart 96KB visible-prose cutoff, contiguous whole exchanges, dumb walk); N's log truncates there; each line exists in exactly one jsonl, ever; no markers anywhere. Crash-safe: the carryover is written before anything is touched; a half-finished stop resumes idempotently at boot. Stop takes the run's activity lock (refuses while a turn or ask is pending).
-
Housekeeping is re-enterable. Each run -- first or re-run -- rebases from a fresh copy of N's frozen db and applies its fresh manifest: non-idempotent (a fresh LLM call each time) but never double-applying. Hand edits (rings or status) made between runs are overwritten -- fine by ruling; the armed two-click button says so. The dry-run replay survives alongside (nothing applied).
-
Dormancy is the review window. Prompts editable (the setup editor), rings editable (the clerk), housekeeping re-runnable, dry-run replays, the whole story readable. The carryover is conversation history but NOT immutable during dormancy (a reversed ruling); it renders raw and read-only until the editor task (ROADMAP). The story projects the current -- possibly edited -- carryover's raw lines like any log's, in session order. Raw in storage, filtered on serve: thinking stripped, superseded status and agenda blocks elide, picked variant only. With no autorestart, the latest log after housekeeping IS the just-closed session -- the replay-after-housekeeping tail resolves for free.
-
Start (manual GM action): lint first -- we only start clean. The lint refuses a bad opening with a GM-facing error and grows as designed. Initial surface: event-schema validity; tool events refused; an unpicked variants event gets its crypto pick at start; authored assistant events are legitimate (no usage, no thinking, no pick metadata); expansion errors refuse. Then: freeze the bundle, consume the carryover into the new log, go live. Opening flow: if the carryover ends on a GM turn, it is sent automatically as the first request; otherwise the table waits for GM input. No enforcement on the cut -- the dumb tail carries as-is, and the opening flow follows from how the carryover happens to end.
-
Expansion, ruled per surface. The authored session-1 carryover expands at start (the turn0() path generalized to the whole log; sigils and $vars resolve, unfilled vars gate start as today). A continuation carryover NEVER expands -- live prose may contain literal $ tokens and expandVars would bomb the start. Prompts expand at assembly as always. GM-input expansion (sigils and vars on the GM's line at ingestion, errors refuse the turn, the log records the expanded line) is a ROADMAP todo -- deliberately out of this build.
-
Turn-0 is dead: it is a log, not a turn. The package ships
carryover.jsonl-- a sequence of any valid jsonl events; the initial status rides as a status event at the head. Caramba's content is re-attributed as the MODEL's turn (the prose describes her; it was never the GM addressing her), prose kept as-is for now, the GM voice-edits later. It ends on her turn, so a fresh caramba run waits for GM input at start. One canonical format; no legacy turn-0 path survives the rewrite. -
Seed is dead: memory.json. Renamed so the name says memory-only, reformatted as the mock housekeeper manifest from the non-existent session-0 (all-insert ops), applied at run creation through the standard apply path. The seed verbs dissolve (apply rides creation; re-seed refusal collapses into "the run already has its rings"). A package is the two session-0 mock artifacts: memory.json (her starting memories) and carryover.jsonl (her opening).
-
Migration: no code, the agent's hands. Fork Irene as a filesystem copy, mutate the layout until green end to end against the new build, then mutate real Irene the same way, then optionally fork the mutated her for a final test. Layout-only: Irene's historical turn-0 event stays GM-attributed (no structural invariant breaks; no history rewrite).
-
Ripples. What dies: the per-line carried flags, the story's dedup check, the transcript's carried-filtering, the view's carried-bundle guard, the table dimming and divider (the table becomes a pure contwin mirror), the autorestart. What stays: variants.mjs and the pick, /story and /table and the story view (minus the flag check), the tailStart walk and the smart cutoff, the slidwin terminology. applyAndRestart loses its restart (the chain ends dormant); the play view's closed-state UI becomes the dormant state (the session-open button becomes the start button); the smoke's housekeeping section reshapes (dormant asserted, then start, then the carry lands); the #21 guard survives only as the explicit skip-housekeeping override (the normal path cannot hit it -- N+1's rings do not exist until housekeeping of N); fork unchanged (a directory copy); save-as-package stays draft-only (the generalization is a ROADMAP todo, all questions open); DICTIONARY rules the renames first (turn-0 dies, seed dies -> memory, one carryover term), then one sweep (package files, clerk verbs, the completeness check, turn0(), the setup editor's slot, the docs); boutique's placeholder files follow the renames.
The multiuser build (2026-11-14) -- DONE
Design round closed (ROADMAP "The multiuser server", QUESTIONS #22-31); all four phases built and proven the same day:
- Storage + identity + auth spine --
state/deployment.db(users, invites; gitignoredstate/),server/users.mjs, bearer-token auth on every route except session/claim, bootstrap invite on the fresh-deployment condition, owner stamping at create, acting-user attribution in the request and LLM call logs. - Ownership + fork + packages -- owner gating on every mutation
and every model call; per-run activity locks (turn, ask, turn0,
housekeeping job, fork);
POST /api/runs/:id/fork(staged copy, atomic swap, owner replaced,forkedstamped, session state mirrored); clerk learns the second packages root (state/packages) andsave-package; user packages published to all. Ownership is resolved, never maintained (GM ruling): run.json keeps dead owner ids, the API reads them as absent; revocation is a db delete plus closing the revoked user's open sessions. - SPA -- claim view, identity in the header, superuser admin on home, spectator mode (read everything, mutate nothing, fork CTA), save-as-package on setup, origin in the package picker, garnish (owner, started/forked at second precision) on run names.
- Smoke + docs -- 34-step mock smoke plus a restart check, all green; UI verified text-safely in the browser (claim, home, admin, spectator on Irene, owner mode, fork click-through, picker, setup; zero console errors). README deployment section + layout updated; test state cleaned (Irene untouched). Post-verdict cut (GM, same day): sign-out removed -- signing in is permanent and per-browser; the user lifecycle / auth story is a ROADMAP extension point for a later revisit.
Gotcha learned while testing: the a11y snapshot races async renders -- wait for text that only exists POST-render (a card name, the session-info line), never the static skeleton. (The text-transform half of this gotcha is DEAD: all-caps CSS is banned by house rule 2026-11-15, waits match source text now.)
Model selection wired (GM, same day): run.json now carries
models: {player, housekeeper} per-run overrides (replacing the old
singular model key -- no run ever carried it), owner-settable via
POST /api/runs/:id/model and the SPA (setup box for drafts, play-aside
pane for started runs), falling back to the server.json defaults; the
housekeeper call resolves per wrap. Smoke 42/42, UI verified (setup
select + save, carried override visible on a fork's play view,
spectator pane hidden). #16's open call is now only the DEFAULT.
The agenda built (GM-designed, same day, QUESTIONS #32): the player's
second paper -- intentions, not states. <agenda> rides every GM turn
(numbered from the top, as cited), <add>/<drop> deltas apply
received -> drop -> add, cap 5 with bottom-eviction, GM override + SPA
pane, housekeeping reads the deltas as evidence. Conflict delivery
re-ruled mid-build: a conflict goes back as its own message (clean of
prose), the model self-heals in the same exchange, capped at 3 heals a
turn -- the conflict pending-state is gone entirely. Same-verb blocks
combine into one apply, never a sequence. The events journal CHECK was
widened (one-time lazy migration -- ran clean on Irene's db, all rows
preserved). Invariants gained the substrate-tag syntax rule (any
<tag> line is OOC; unknown tags reported to GM) -- the SPA register
parser follows it. Session-route fix rode along: /api/session returns
the public user shape only (it was leaking the token hash). Smoke
56/56, UI verified end to end.
The per-turn reminder built (GM-ruled, QUESTIONS #34, steal #11 DONE):
reminder.md (repo-shared) rides after every GM turn as its own
system chunk; one live copy -- older elide from the view, the SPA shows
one collapsed card for the newest, housekeeping never sees it. The
GM's rewrite superseded the agent's extraction draft: it is a
procedure (understand -> decide -> compose -> adjust your papers),
not a rule list -- new material throughout, including the per-class
turn budget (zero or one of thoughts/dialogue/actions) and the
dice-tiebreak. The handbook's "one thing per turn" was cut to "short
turns" in step (the budget lives in the reminder now). Smoke 58/58
plus an elision unit check (the log keeps every copy, the view carries
exactly one, at the freshest end). The next live window is the
experiment for observable #14.
Working agreements with the GM
- "I draft, you cut" for all creative content.
- Character and world work is done together, unhurried ("we'll get there together").
- The GM runs on organic memory and takes no notes -- the system is the prosthesis. The GM's lever is narrative, never mechanical.
- The GM answers point-by-point and expects pushback in both directions.
gm.mdfiles are GM-private: never pasted to any model.- Rolls (
pick) are legitimate at drafting time; rolled values are proposals with the alternates listed for easy swaps. - The play is uncensored; nothing lives in a special bucket -- it makes
sense, it isn't the point, no pressure (no playing to please the GM).
Hard limits in
system.mdare absolute.
Boutique creative brief
Emptied wholesale by the GM (2026-11-15) -- placeholder files only. The design round starts from scratch when it comes; the comparison table in README's Runs section is the design intent.
Environment gotchas (learned the hard way)
- The portable shell scanner is picky: plain ASCII only in shell
command strings. Em-dashes in commit messages, here-strings, and
< NULredirection have all been rejected. For multi-line stdin tests, pipe an array of strings into node. node:sqliteprints an ExperimentalWarning on every invocation -- harmless; the clerk filters it in bridge context.server.json(gitignored) holds the real key; it mirrors opencode'sdvprovider (config at~/.config/opencode/opencode.jsonc, auth at~/.local/share/opencode/auth.json).- Resetting a run:
Remove-Item runs/<id>/db/memory.dbtheninit.--forceflags are only for disposable pre-story states. - Sessions log to
runs/<id>/sessions/<stamp>.jsonl-- housekeeping's transcript, and the future watcher agent's food (see ROADMAP). - The
--mockmode has caught two real bugs already (dump column rename, readline line-loss). Run it before any live first-use. - The mock smoke lives in the repo (
test/-- the scripts moved in from the temp dir at the GM's ask, 2026-11-14; no broader test-infra ruling is attached):smoke.mjs(the 69-step multiuser/agenda/reminder/variant pass),check-reminder.mjs(the elision unit check),restart-check.mjs(post-restart rebuild). They expect a CLEAN state/ plus a running--mockserver; smoke prints its run ids and leaves a temp token file for the restart check. Clean up state/ and the smoke runs afterwards -- only the real runs stay.check-repo.mjsneeds no server: the format rules (ASCII bytes, no all-caps CSS) over the tracked files.
Not yet exercised (expect first-use friction)
- First start under multiuser (step 1 above) -- nothing live has touched the auth spine, invites, fork, or spectator mode yet; all are mock-proven only.
- ask_gm in live flow (pause/resume is mock-proven; the live model simply made its own choices so far -- by design), the self-heal conflict path in live flow (mock-proven; capped at 3 heals a turn), the agenda and the reminder against a live model, records tools through the server (needs a records-enabled run).
- A live housekeeping rejection, and the recovery-apply path on a real manifest, remain first-use items.
- The in-flow missed-update prediction (ROADMAP, system-1 entry) -- measurable from the second real session on.