the sheet round: the GM's ledger of arbitrated run state -- the second state channel, split from status and agenda by truth model (GM, 2026-11-17). The rulings first: status and agenda are narrative self-report (their truth is "she said so", the scan caches her latest words); the sheet is actual run state (its truth is "the GM set so", the record IS the truth event -- nothing cached from anyone's words). The override channel promoted to a standing section, and that precedent decided the presentation: the sheet renders as its OWN authoritative system chunk at the freshest end, never a canon-point stamp, which would read as her words -- the same reason the override composes as hers and the sheet never does. Schemaless JSON in the tag (the mind-verb philosophy: the substrate teaches the channel, the package teaches the vocabulary -- the invariants rule the GM wrote is one universal paragraph with deliberately non-box examples, clothes and grades, and the propose-additions line as her schema-evolution channel); details learnt in-place; NO package gating -- the channel is universal and "optional, if given" makes the invariant forward-compatible in every bundle that never sets one. The build: a sheet record rides the GM turn like the override (readSheet: object-ness is the route's only law, 400 loud on arrays and scalars, nothing appended; OOC turns refuse it exactly like block edits); scanState derives newest-wins whole-set -- an absent key drops, never keeps, and {} is a live empty ledger (a truthy check, never falsy); the boundary state note carries it across stops and the dormant read path serves it; renderView appends the chunk once per assembly so one live copy holds by construction; the guard is the <model> sibling (an emitted <sheet> conflicts with "the GM's ledger -- propose changes in prose", healed in-turn, cap 3, and her emission never applies -- the scan holds the GM's record); every strip surface learned the tag (the view's STRIP_HERS, the story's verbs, the table's chip regex -- the standing grep-every-strip-list lesson, applied); and the web gains sheetEditor, the paneEditor's JSON sibling in widgets.mjs (same stage/pending/discard pattern, bad JSON refuses at the stage), the third pane in the aside, the send attaching body.sheet, and [sheet] machinery lines on both table and raw walks. The mock's sheet-guard branch is CUE-KEYED, not position-keyed: the carried tail shifts the script's counts (session 4's log starts the script over -- the battery's first attempt landed on the ask position and crashed renderView on the unpaired call; the battery now answers the script ask and moves on), while a marked GM turn is immune to every shift -- mockModel reads the view, the marked turn earns the emission, the conflict it earns earns the plain-prose heal. check-reminder is sheet-aware (the chunk is a legitimate third system surface; the count and freshest-end assertions tolerate exactly one, and the freshest-end check now allows her latest reply and/or the chunk to follow the reminder). Verified: smoke ALL PASS with +15 sheet assertions (newest-wins, whole-set semantics, the chunk one-live-copy -- ANCHORED with startsWith because the invariants bundle itself mentions the tag and a bare regex matches it twice, an honest test bug caught by an honest test), the guard's conflict and heal with her emission kept verbatim in the raw log and never applied, the view and story strips, the empty ledger rendering its chunk, the boundary note carrying the sheet, the dormant read deriving it, and session 5 deriving it from the carried note end to end), restart + reminder checks green, typecheck green on both programs, check-repo clean (it caught the round's own prose twice: "window" is a retired term in README, the contwin vocabulary wins), and a browser pass over the pane end to end with zero console errors -- staging, the pending marker, the ride, the scan re-render, and both machinery lines on the table. Docs: README's protocol passage carries the sheet with the numbers-live-on-the-sheet line (prose numbers die with the contwin; sheet numbers ride the scan forever) -- NOT in the memory tiers table, where the first draft wrongly put it (the GM's ruling: the sheet belongs in neither memories nor records); the identity tier lost its loose "character sheet" name now that the term is technical; DICTIONARY gains the sheet entry with the history line (dice retired into variant literature, sheets arrived as the state machinery -- the tabletop metaphor completing while its realism stays advisory, players hold their own pencils in the real thing and we don't, for drift); ROADMAP parks the bookkeeper extension (the housekeeper's arithmetic sibling: reads the setting's rules prose and the latest turns, computes the ledger delta from a purchase in her prose, lands it as a STAGED edit -- applied on the GM's next turn or discarded; sheet-only authority, curator fallback, per-package opt-in because an agent cannot bookkeep what is not arithmetic). The GM's prompt-side edits ride the same commit: invariants' "Character's sheet" section (the universal rule, the trailing-clause flag taken in review), the reminder's inventory line gaining "the sheet (optional)", and la caramba's gm.md lore updates. The box package (the first consumer) and detention stay untracked WIP, untouched. The 2026-11-17 roadmap audit rides the same commit (GM: "done items can retire"): retired outright -- the SPA-vs-bridge and voice-examples decisions (long resolved) and steal items #1, #3, #4, #8, #11 (done, or in #8's case never work -- the housekeeper model is per-run selection, built); retired with tombstones -- the multiuser section (built 2026-11-14, the rulings live in DECISIONS #22-31 and README, the lifecycle tail kept visible) and the SPA v1 section (all four phases done, the API sketch superseded by README's living API docs, the substrate doctrine in README), with the one unbuilt design it held -- the turn-surgery saga rule -- surviving as its own bullet cross-referenced at steal #2; amended in place, dated -- seed.json (dead, successors named: the authored carryover and memory.json), turn-0.md (dead: her authored opening turn), the upstream model listing (never queried in play since discovery), the delta-tag transport (the full-block protocol, the sheet named), the service step (multiuser built, hosting remains), the carryover editor (the raw file-editor surface exists, the purpose-built UI stays deferred); kept -- the operator's queue, the landscape and receipts, the live constraints, the open steals with numbering preserved so cross-references resolve, the deferred tasks, the distant points, the rejections, the notes. 582 lines to 338; the first deletion pass duplicated the steal-list header and the verification re-read caught it

This commit is contained in:
2026-11-17 22:35:44 +00:00
parent 5279dd32e2
commit eefb721675
18 changed files with 491 additions and 348 deletions
+80 -311
View File
@@ -6,9 +6,8 @@ be worked through one by one; statuses in caps, decisions dated.
## Operator's queue (don't edit, don't work on)
- entirely safe-for-work package. space?
- revisit what fetch does and SPA reactivity
- calibration package: escape room
- calibration package: the detention
- user manual
- session rewind
@@ -49,13 +48,6 @@ long-memory problem is unsolved. Our test aims at that gap.
## Architectural decisions from the review (2026-11-11)
- **SPA: yes, eventually. The bridge is the MVP.** The SPA's defining
features per the review: fiction-first chat UI, GM console, context
inspector (steal #6), memory browser (steal #7), turn surgery buttons
(steal #2 with UI), housekeeping job runner.
(Superseded 2026-11-13: the bridge is retired before ever going live --
REST + SPA is the MVP. See "The harness" below.)
- **Voice examples: accepted** -- will be present (steal #1).
- **Single LLM player, for now at least.** Mechanical per-character data
separation (Talemate-style knowledge tracking, per-character
perspectives) is superfluous -- the run boundary already separates
@@ -107,25 +99,28 @@ example, gitignored real file, env-var option).
file land at the next session-open (no hot reload into an open
session). Packages carry authored content only -- `canon/`, `db/`,
`dumps/`, `log/`, `manifests/`, `sessions/` are all state and are
born in the run at creation. The new-game opener file is `turn-0.md`
(renamed from `prelude.md`, 2026-11-13) -- the GM's zeroth turn, same
semantics: sent once as the first GM message, `<status>` block
ingested.
- **The seed is initial state of the run.** `seed.json` rides the copy
like any other file. It applies lazily at the first session-open of a
fresh run, before render and bundle assembly; until then the run is
freely editable -- deleting or editing `seed.json` in the copy is the
generic opt-out, no flag. After application it is inert provenance:
the journal records the application and a re-apply refuses.
born in the run at creation. (Amended 2026-11-16: the turn-0.md
opener is retired -- the opening is her authored turn in
carryover.jsonl, GM-written, whose authored blocks are the state
seed; the start gate lints it and the old opening event is inert
history.)
- **The seed is initial state of the run.** (Superseded 2026-11-15,
the dormant-session rework: seed.json is gone. Its successors are
carryover.jsonl -- the authored opening turn, whose authored blocks
are the state seed -- and memory.json, authored draft material
applied by the start gate's reapply over a fresh db.)
- **Per-run model selection.** `server.json` names one endpoint
(baseUrl, key) plus default models (player, housekeeper).
`GET /api/models` asks the upstream what it carries; the user selects
from the list. A run may carry per-run overrides for both roles
(`run.json` `models: {player, housekeeper}`, wired in the SPA
2026-11-14 -- setup for drafts, the play aside for started runs;
each call resolves fresh, so a mid-session switch takes the next
turn) -- the comparison rig: same package, different models,
identical prompts. Which model the housekeeper DEFAULT points at
(baseUrl, key) plus default models (player, housekeeper). A run
carries per-run overrides for both roles (`run.json` `models:
{player, housekeeper}`, wired in the SPA 2026-11-14 -- setup for
drafts, the play aside for started runs; each call resolves fresh,
so a mid-session switch takes the next turn) -- the comparison rig:
same package, different models, identical prompts. (Amended
2026-11-16, model discovery: the upstream listing is never queried
in play -- state/models.json is the registry of selectable models,
written by the op's two-step discover/refine act and gating all
model use; server.json's explicit pick beats the registry's
discovered default.) Which model the housekeeper DEFAULT points at
stays open (#16); the mechanism is settled.
- **The player prompt is battery included, split along ownership seams
(ruled 2026-11-13; cut executed by the GM 2026-11-14).** Three tiers,
@@ -134,10 +129,13 @@ example, gitignored real file, env-var option).
copied, travels with the code: the syntax markers the renderer
parses registers by (plain = speech, *italic* = narration,
single-paren OOC), the tool-channel contract, the memory contract,
records availability via the tool list, the status tag transport
(`<status>`/`<gained>`/`<lost>`/`<conflict>`) **and the status's
three-part admission gate** (moved into the substrate tier in the
GM's cut). Implementation-agnostic by design: storage details
records availability via the tool list, the block transport
**and the status's three-part admission gate** (moved into the
substrate tier in the GM's cut). (Amended 2026-11-16, the
full-block protocol: the delta verbs retired -- the player emits
whole `<status>`/`<agenda>` lists, absent means unchanged, and
the `<sheet>` channel joined 2026-11-17.)
Implementation-agnostic by design: storage details
unimportant, the tool manifest is self-describing.
2. **Opening + guards** -- `system.md`, per-project, repo-fed, never
copied: the glossary, the purpose statement, the input-validation
@@ -173,10 +171,11 @@ example, gitignored real file, env-var option).
regenerated state, not provenance. A run may later self-version
(git init inside a run) as the service step's backup/export story --
designed for, not built.
- **The service step is later, with its own design round** (auth,
invites, multi-user). v1 stays single-GM loopback; nothing in the
design precludes it -- the self-contained run directory is the
per-user seam.
- **The service step is later, with its own design round.** (Amended
2026-11-14: the auth/invites/multiuser half is BUILT -- see DECISIONS
#22-31; the service step that remains is the hosting story alone --
clone-and-run already works, a running instance is one deployment
away.)
- **Boutique is dormant** -- a stub that never reached its design step;
untouched until its drafting session.
- **Stack: zero-dependency runtime** (DECISIONS #4, amended
@@ -189,244 +188,40 @@ example, gitignored real file, env-var option).
## The multiuser server (2026-11-14, GM)
The invited-instance half of the harness goal, designed in one round
(rulings DECISIONS #22-31). The LLM key stays on the backend; invited
users need neither the host's secrets nor their own key, and can play
without running anything locally.
- **Identity is a token, nothing else.** No usernames, no passwords, no
external IDPs. A single-use invite code is exchanged at claim time
for a persistent token (random hex; the server stores a hash, the
client keeps the token). Display names are freeform labels picked at
claim, collisions allowed. Recovery for a lost token is a new invite;
recovery for the superuser is filesystem access. Revocation destroys
the identity -- no suspend, no restore -- and that is cheap because
stories outlive identities by design (forking).
- **Bootstrap:** on the fresh-deployment condition (empty users table)
the server generates the initial superuser invite itself, writes it
to `state/bootstrap-invite.txt` and echoes it to the console. Exactly
one bootstrap invite exists until claimed, reused across restarts so
a restart never invalidates what the op saw; dead the moment any
superuser exists. Invite tokens are single-use with an explicit
spent record -- reuse is rejected loudly, never silently dropped.
- **Superuser powers:** mint/revoke invites, list/revoke users.
Nothing else -- no touching another user's runs or packages, no user
management beyond revocation.
- **gm.md is owner-only, and never model-facing.** The pad closed
with the table (2026-11-15 -- #28's human-side open read
overturned); the model boundary stands: no assembly path reads it.
Saving a draft as a package publishes its gm.md to everyone
(saving is the act of publishing). `housekeeper.md` stays
never-exposed (it prompts an internal agent).
- **Runs:** attributed to the starting user; every GM action and the
whole working surface (table, raw session, carryover, files,
status, notepad) is owner-only (including anything that spends a
model call); the story is the one public read. Any user can fork
any run, including their
own: a mechanical atomic copy -- staged, swapped in by same-volume
rename, taken under the run's activity lock so a mid-turn fork can't
torn-copy -- with the owner replaced. No lineage: runs are entirely
independent, and a fork's only mark is `forked: unixtime` beside the
carried-over `created`. Ownerless (pre-user or revoked-owner) is one
uniform runtime state: readable, forkable, no owner actions, no
re-claiming mechanism. No migration code -- pre-user runs stay as
they are until the op hand-stamps an owner id into run.json.
- **Packages split system and user.** System packages ship with the
repo (authored, read-only); a user can save their run's craft as a
new user package under `state/packages/`, published to everyone,
gm.md included. The saved package carries no pc -- the next create
asks for one; the display name is the save's one decision.
- **Display identity:** the run id is the identifier (strictly unique,
internal, factless, undecorated). The visible name is a content
descriptor -- "Package / PC" plus SPA garnish (owner, started or
forked) -- unique ENOUGH: collisions unlikely and harmless, never
load-bearing, never model-facing.
- **Every logged LLM call records the acting user.** Quotas and limits
are an extension point, not v1. Saved state lives gitignored
(`runs/`, `state/`) -- the repo stays clean by construction.
- **House rule: all dates and times are UTC everywhere.** No time
zones, ever.
- **Extension point (later): proper user lifecycle and auth story.**
Signing in is permanent and per-browser -- the token lives in the
client's localStorage, and sign-out is deliberately absent: less
functional, much easier to reason about. A user who loses their
browser storage is re-invited as a new identity (their old runs
stay owned by the old, unreachable one -- readable, forkable,
frozen). Revisit when a real need shows: sign-out/token
expiry/refresh, multiple devices per user, token backup
affordances.
BUILT (2026-11-14, mock-proven end to end) and retired from the
roadmap in the 2026-11-17 audit. The durable record: the rulings in
DECISIONS #22-31, the surface rules in README (ownership, the
story's public read, invites, forks, ownerless runs), the design
history in the git log. The one open tail from that round -- proper
user lifecycle and auth story (sign-out, token expiry, multiple
devices) -- remains a distant extension point: signing in is
permanent and per-browser, and revisit waits for a real need.
## SPA v1 -- substrate decisions (2026-11-12, GM)
- **The whole story is recorded; publishing is a someday option.**
Storage: backend, full stop -- `sessions/*.jsonl` already is the
complete record (bundle + exchange), git versions it, the SPA holds
nothing. Publishing is an export render that filters to fiction;
book formatting out of scope for v1.
- **Sessions outlive the browser; the server is the truth.** Live state
is in-memory and rebuilt from the jsonl on boot (messages, elision
view, pending ask_gm). The log is truth, the context is a view.
- **Single human: loopback bind, no cookies, no auth.** One active
session *per run* (amended 2026-11-13) -- several runs may hold live
sessions; nothing runs concurrently in practice, and API-driven tests
can proceed alongside a real session.
- **ask_gm surfaces as a modal**; the pending question survives a
browser refresh (the server holds the pause, the SPA re-presents it).
- **Status rides the GM turns.** The full status is attached to every
GM turn as a `<status>` block -- reads are state, writes are deltas:
the player mutates with `<lost>`/`<gained>` tags in its own turn,
exact-match, non-blocking, misses relayed back via `<conflict>`. Old
status blocks elide from the live context view like old tool results;
the log keeps them all. The initial status rides turn-0, ingested
at new-game. GM turns never carry deltas; GM override stays
out-of-band.
- **Status pane always visible** -- the current description set, live;
`<conflict>` reports surface there too.
- **OOC parsing (ruled 2026-11-14):** a line opening with `(` is OOC --
closing paren optional, per ecosystem convention; a lone `(` is an
empty OOC message and is skipped. The transcript renderer (SPA and
housekeeping render alike) parses registers by this rule plus the
italics/plain speech split.
- **Thinking blocks are logged but never sent back** -- the live context
strips `reasoning_content` (a delta from current bridge behavior,
phase 0); the housekeeping transcript labels them as `[thinking]`
attention evidence for touch/adjudication.
- **Context meter always visible, loud past 85%.** Exact, from the last
response's `usage.prompt_tokens` against a `contwin` value in
server.json. The 100% endgame is close-and-housekeep.
- **Housekeeping is the session-close ritual, and it autorestarts.** A
run always ends the session -- "any time" means the GM may close a
session early, not that housekeeping is a mid-session action. The
chain runs unattended: housekeeper -> manifest -> apply -> next
session opens with fresh views. Review is async, via the log and the
dump diff; GM edits and vetoes remain available through the clerk at
any time, including mid-next-session. A rejected manifest holds the
restart and surfaces the reason for a re-run.
- **Rewrite-here, not forks.** An unfortunate GM turn is edited and the
session restarts from there -- all turns since are lost from the live
context; the append-only log records the surgery and keeps them for
audit. The housekeeping transcript renders the effective view, so the
housekeeper never memorizes retconned-out turns. Window-scoped only:
after housekeeping the story is consolidated, and corrections become
proper retcons. Trivial typos are tolerated; the publishing pass
catches them. Tool side effects in the lost range are compensated
mechanically (see tool discipline below).
- **Tool discipline for rewrite (the saga rule).** Every player tool is
either **session-pure** -- ask_gm, records_search: effects live
in the conversation only, truncation removes them wholesale -- or a
**journaled mutator** -- the status and records verbs: the journal
must capture prior state, so compensation is mechanical. Clerk
amendment: amend and discard currently journal ids only; extend them
to record prior content, and every mutator becomes compensatable.
(Variant turns need no compensation: the pick note is adjacent to
its message, truncation takes both, and only the picked variant's
deltas were ever applied.)
- **The context is a projection, not a ledger.** The API is stateless:
every call ships a freshly rendered view, and nothing obliges the
view to grow mechanically turn by turn. The append-only jsonl is the
record; the view is a pure render of it under a policy. Soundness
invariants: (a) the view is always derivable from log + policy --
policies deterministic or logged, or "exactly what the model was
sent" provenance dies; (b) tool-call pairing is never broken -- the
endpoint silently tolerates orphaned tool results (probe 2026-11-12),
so this one fails quiet: stub or keep both; (c) elide only what is
durable elsewhere -- the current status block re-rides, tool results
are use-and-discard, the log keeps full prose; (d) order is preserved
-- salience is managed by repetition and compression, never by
shuffling time. Unlocked as policy rules: status re-riding (v1),
prompt re-injection (steal #11), mid-view prose compaction (the
marathon relief valve short of #10), history caps backed by the
rings.
- **REST is the full substrate; the SPA is strictly a client.**
Synchronous requests, no streaming -- single-human latency tolerates a
POST that runs the tool loop and returns.
BUILT, and retired from the roadmap in the 2026-11-17 audit: the
phasing completed 2026-11-14 (all four phases), the API sketch was
superseded by README's living API documentation, and the substrate
doctrine it fixed -- the log is truth and the context a projection,
thinking never returns, OOC is the paren channel, the context meter,
the reminder's single-copy policy -- lives in README. What the audit
kept from this section is the one design not yet built:
Phasing (amended 2026-11-13 -- bridge retired, SPA downstream):
0. clerk-side paper migration (substrate-independent): description-set
status schema, `<lost>`/`<gained>` delta apply (exact match,
`<conflict>` reporting), turn-0 ingestion at new-game, amend/discard
prior-content journaling (compensation-grade audit) -- DONE 2026-11-13
1. preset/run split: `runs/` dir, copy-at-creation, lazy seed at first
window-open, clerk re-addressing, config rename (bridge.json ->
server.json), packages cleaned to authored-only; the prompt split
rides here (system.md + invariants.md repo-fed, the handbook.md
craft copy rides the run) so no run ever copies what the substrate
feeds -- DONE 2026-11-13/14
2. loop core + REST spine: the loop extracted from the bridge (one
consumer -- the sharing question died with the bridge), `node:http`
server, per-run session machine with ask_gm pause/resume, the view
renderer (log + policy -> per-call context, elision as its first
rule), bundle assembly (system message = system.md + invariants.md,
repo-fed, then the run's handbook.md copy), boot-rebuild from jsonl,
thinking-strip and usage tracking land here, mock mode,
status/context endpoints; the API is testable standalone -- the
front end may wait -- DONE 2026-11-14: mock-proven end to end
(create -> window-open with lazy seed + turn-0 ingestion -> roll
round-trip -> ask_gm pause/resume -> paper deltas -> boot-rebuild ->
post-restart turn); tool/bridge.mjs deleted at mock-parity per the
retirement decision. Housekeeping endpoints answer 501 until
phase 3. Live-API first use still ahead.
3. housekeeping job: manual trigger (always ends the window), transcript
assembly with labeled thinking, run-state injection into the
housekeeper invocation (records availability first -- the ring views
carry pure memory, no meta), auto-apply, autorestart on success,
async log view; a rejection holds the restart and surfaces why;
per-wrap dump snapshots land with apply -- DONE 2026-11-14:
mock-proven (chain, rejection path, autorestart) and live-proven
same day on `live-smoke`: the housekeeper (glm-5.3) produced a
clean first manifest -- both inserts correctly ring B, first-person
voice, touches only what the transcript invoked, story-dated
(2026-11-18-beach-arrival)
4. SPA: transcript with three visual registers (voice / narration /
OOC), bundle as a collapsed "window opened" card, turn-0 as
fiction; GM line input; ask_gm modal; status pane; context meter --
DONE 2026-11-14: `web/` (no build, vanilla ES modules), served by
the server from `/`; register parsing per the ruled markers
(multi-line narration blocks included); the full v1 scope driven
end to end through the UI on a disposable live run (new-run form,
window open, GM turn, housekeeping chain with confirm + poll + log
display + autorestart). The ask modal rides detail.pendingAsk
(mock-proven logic, first live presentation pending).
Later: turn surgery (steal #2 with UI), memory browser (steal #7),
context inspector (steal #6), book export, the service step.
API sketch (the operable spine, amended per-run):
GET /api/models ask the upstream what it carries
GET /api/packages list presets (display name, pc default, records gate, turn-0, seed)
GET /api/prompts the repo-fed prompts (system, invariants) -- read-only
GET /api/names roll an unused dictionary name for a new main character
GET /api/runs list runs (display "La Caramba / Rell", fill, open session, draft/housekept state)
POST /api/runs create {package, pc, name?, model?} -- anonymous id, pc unique per package
GET /api/runs/<id> status tier, fill, context meter, pending ask_gm, draft, display
GET /api/runs/<id>/files run file contents -- craft rw, config ro, whitelisted
PUT /api/runs/<id>/files/<file> edit a run file (whitelist, JSON validated)
POST /api/runs/<id>/vars fill the $TOKENs the prompts declare (saved to settings vars)
POST /api/runs/<id>/sessions open a session (lazy seed, render, assemble)
POST /api/runs/<id>/turn0 send turn-0 as the first GM turn (fresh session)
GET /api/runs/<id>/notes the GM's notepad (gm.md) -- never sent to any model
PUT /api/runs/<id>/notes update the notepad
GET /api/runs/<id>/session transcript + pending ask_gm + usage
POST /api/runs/<id>/turn GM line -> runs the loop
POST /api/runs/<id>/ask answer a pending ask_gm
GET /api/runs/<id>/status the status tier, structured
POST /api/runs/<id>/status GM override: replace the whole status (empty = clear)
DELETE /api/runs/<id> delete a draft (no sessions); played runs refuse -- by hand
POST /api/runs/<id>/housekeeping run the chain (ends the session), async
POST /api/runs/<id>/housekeeping/replay dry-run the housekeeper over a session log -- nothing applied
GET /api/runs/<id>/housekeeping job state: idle | running | applied | rejected
GET /api/runs/<id>/housekeeping/log latest session log
POST /api/runs/<id>/housekeeping/apply apply a manifest directly
- **Turn surgery, when it earns its build:** rewrite-here, not
forks -- an unfortunate GM turn is edited and the session restarts
from there; all turns since leave the live context, the append-only
log keeps them for audit. Window-scoped only: after housekeeping
the story is consolidated, and corrections become proper retcons.
Tool discipline for the rewrite (the saga rule): every player tool
is either session-pure (ask_gm, records_search -- truncation
removes their effects wholesale) or a journaled mutator (the
records verbs; amend/discard journal prior content, so compensation
is mechanical). Variant turns need no compensation -- the pick note
sits adjacent to its message and only the picked variant ever
applied. See steal #2.
## The steal list (work point by point)
### 1. Voice examples in the character sheet -- DONE (2026-11-13)
`mes_example` from the character-card spec: 2-3 sample exchanges per
character. The strongest voice-calibration tool the RP community has.
Cost: zero (content). Add an example-dialogue block to the character.md
template and to both casts when drafting.
Status: DONE (2026-11-13) -- a ten-state voice corpus in the la-caramba
sheet; the backstory is first person to match the memory voice.
### 2. Turn surgery: /retry, /edit in the bridge -- DECIDED (2026-11-12)
Rewrite-here, not fork-here: an unfortunate GM turn is edited in place
and the session restarts from there, losing all turns since. Window-
@@ -437,24 +232,6 @@ tolerated as-is; the publishing pass catches them. Forks rejected as
unnecessary. The principle is DECISIONS #15; the open details ride in
QUESTIONS until the build.
### 3. Transient status digest injected post-history -- DECIDED (2026-11-12)
The Author's Note / `@@depth` / `post_history_instructions` pattern:
instructions placed after history get better adherence. Folded into the
SPA v1 substrate -- superseded by the status redesign (DECISIONS #17):
the full status rides every GM turn as a `<status>` block; reads are
state, writes are deltas (`<lost>`/`<gained>`). Old blocks elide from
the live context view like old tool results; the log keeps every
as-sent block (provenance, rewrite snapshots, status evolution for
observable #12). Status left the opening bundle. Adherence remains an
observable to measure once live.
### 4. Generation params passthrough -- DONE (2026-11-13)
Every frontend exposes sampler settings; the loop sends none by
default. `server.json` carries an optional `params` object spread into
the request body (temperature, top_p, etc.) -- in from day one, empty
by default.
Status: DONE (landed with the server config shape).
### 5. Hybrid retrieval for records_search -- OPEN, DEFERRED
SOTA baseline is BM25 + vector + entity-boost (Mem0 v3, Zep). Our
LIKE-only search is fine at boutique scale. Upgrade path: SQLite FTS5 +
@@ -476,13 +253,6 @@ remembers" view over rings, records, status, journal. The observability
feature for reviewers and for you as GM.
Status: OPEN (SPA).
### 8. Cheap-model housekeeping / decision oracle -- OPEN
Talemate runs each agent on its own model, including a small "decision
model" for oracle calls. The housekeeper can already run on any model
(it's a separate invocation); `ds4-flash` housekeeping is one config
away when cost matters. Same for a fast oracle in the SPA.
Status: OPEN.
### 9. Character-card V3 import/export -- OPEN (OPTIONAL)
Portability to/from the ST ecosystem (PNG-embedded cards, CCv3 spec).
Only if sharing characters with the outside world ever matters.
@@ -495,22 +265,6 @@ Current answer: close the session. Fine for the test; revisit if real
sessions regularly overflow.
Status: DEFERRED.
### 11. Periodic system-prompt re-injection -- DONE (2026-11-14)
Built as the per-turn reminder, GM-ruled: not the whole system header
re-sent (uncalled for), but the small "how to compose your turn"
protocol extracted into `reminder.md` (repo-shared, never copied into
a run). It rides after the GM's prose as its own `role: system`
session chunk on every turn; superseded copies elide from the live
view, so exactly one exists, always at the freshest position -- the
same single-copy policy as the riding blocks. Absent/empty file = no ride
(the feature sleeps). The measured trigger arrived first: observable
#14's completions lengthening across session one. The reminder is now
the experiment: does the lengthening flatten with it in the session.
Housekeeping never sees it (a fresh context each pass); the SPA shows one
collapsed card for the newest copy, mirroring the policy.
Status: DONE (content is the GM's, extracted from the handbook -- the
duplicate handbook cut is the GM's red pen).
## Deferred tasks (ruled out of the dormant-session rework, 2026-11-15)
- **Save-as-package beyond drafts.** Today it fires only from
@@ -521,13 +275,28 @@ duplicate handbook cut is the GM's red pen).
whether spent carryovers survive start. All questions open. The
principle proposed, not ruled: a package is a starting point, never
a snapshot -- fork is the continue-this-story verb.
- **The carryover editor.** The dormant session's carryover is
GM-editable in principle (conversation history, not immutable during
dormancy) but has no editing surface yet; the dormant view renders
it raw, read-only. The proper editor is its own task.
- **The carryover editor.** (Amended 2026-11-17: the raw surface
exists -- the file editor edits a continuation carryover during
dormancy, save-linted, blocks included.) What remains deferred is
the purpose-built editing surface over the dormant view's
read-only render.
## Distant extension points (someday, not scheduled)
- **the bookkeeper: a sheet-keeping agent.** The GM is the sheet's
author and its error model (GM, 2026-11-17: the counts are the
GM's job). When keeping the papers correct becomes unproductive
bother, an internal agent -- the housekeeper's arithmetic sibling,
never model-facing -- reads the setting's rules prose and the
latest turns, computes the ledger delta (a purchase in her prose
applied against the catalog), and lands it as a STAGED sheet edit
with a pending marker: applied when the GM's next turn rides, or
discarded. Sheet-only authority, strictly-validated output, a bad
day falls back to no-change (the curator pattern); per-package
opt-in, because an agent cannot bookkeep what is not arithmetic.
The tabletop metaphor bends here on purpose (players hold their
own pencils in the real thing): the deviation is substrate
pragmatism, drift-proofing, not realism.
- **n-choice inference composed by a turn-editor agent.** The
provider's `n` parameter asks for several statistically independent
completions of the same prompt -- the same moment re-rolled by the