Files
tiny-worlds/AGENTS.md
T
mute eebc1993dd the night rounds: the GM-input rework and the reasoning-effort knob -- the workbench renders no faces: the composer overlay and the transcript share colour-only tokens (.narration dim, .emph accent), source verbatim, asterisks tinted and kept on screen, so the input's caret can never drift (the old overlay's real bold/italic shifted advance widths -- keeping every character preserved count, not width; the scrollbar-gutter match killed the second drift source); the story view carries its OWN renderer (view-story storyBody/storySpans) -- the book keeps real bold/italic with the asterisks spent, narration italic via #story-scoped CSS, one rule for the tool and typography for the deliverable, deliberately separate; the composer is turn-shaped: rows=6 floor, field-sizing: content grows it with the turn (the thing the GM remembered Firefox doing -- it was never in use), max-height 50vh caps with internal scroll, the footer moved under the transcript's column only so the input's width is the pane's; the transcript's stick-to-bottom was DEAD CODE all along (#transcript has no height or overflow -- main is the scroller, the scrollTop assignments were no-ops in every browser): stickBottom scrolls main and re-asserts next frame (Firefox's scroll anchoring can reclaim a same-tick scroll around a content wipe), main carries overflow-anchor: none; the prose pane drops its machinery by ruling: the status/agenda chips and the retired delta tags strip (the panes carry the derived state), the reminder card never renders (it is the same every turn -- the raw tab keeps every copy), and the status/agenda note receipts (the old delta applies and the whole-list sets alike) skip the prose walk while the raw keeps them; the model dropdown collapsed to one plain list of ids sorted, ceilings riding along (the family grouping left the user guessing what a family name means, and the curator's tier labels only made sense inside their groups); and the reasoning-effort round: the battery probes the ladder (probeEfforts -- each of none/minimal/low/medium/high/xhigh/max measured for mean thinking, two samples, efforts recorded per model, effortDefault the argmax mean over minimal..max, 'none' never a candidate -- it is the off switch; null when the model shows no thinking), the knob is first-class and the GM's alone (GM, 2026-11-16: hidden from the model, not her call -- never in the mind verb, never in the <model> display block, and renderView's via-derived block filters it too, both surfaces; it rides the via record for the raw surfaces), its unset state SENDS the measured max-mean default (the one knob with an honestly nameable default -- the registry measured it; layers run override > deployment > registry per-model, explicit null clears to nothing), the first non-numeric knob (RoleParams carries the string, the /model route validates against the ladder, the knob row a select whose unset label names what rides and rebuilds on model-select change); the GLM ladder verified live by hand before the build (low suppresses to a third of baseline, max elevates about double, the whole ladder accepted on both families without 400s, and reasoning_effort 'none' doubles as a standardized thinking-off switch); the model dropdown, the composer, and the knob UX browser-proven with zero console errors (the pass caught the unreachable-helpers bug: code after a factory's return never runs, a hoisted function referencing the uninitialized const throws silently mid-fill and stale rows render); smoke ALL PASS with the effort battery (the canned mock ladders, the default riding a bare turn's via, the override riding the next turn, the bogus-level 400, the null clear, no reasoning_effort in any <model> block) + restart + reminder + repo checks green, typecheck green on both programs; ROADMAP gains the distant extension point (n-choice inference composed by a turn-editor agent) and the operator's queue moved there from QUESTIONS by the GM; HANDOFF prepared as the handoff (the typing-round bullet trimmed into the rounds list, the server line now truthful -- the debug server runs, the registry bullet carries the six-knob state and the pending-effort refine)
2026-11-16 23:52:58 +00:00

593 lines
36 KiB
Markdown

# AGENTS.md -- the agent's own notes
Working notes for the agent working this repo. Not project
documentation -- the project's homes are README (architecture, protocol,
observables), ROADMAP (decisions, steal list, substrate plan),
QUESTIONS (the decision queue -- open items only), DECISIONS (the
resolved record, keyed by the old queue numbers), DICTIONARY (the
terms of art), HANDOFF (working state). This file is
memory the agent owes itself across sessions.
## Working with the GM
- **Their LLM tokens are free (2026-11-14): never economise on usage.**
Run live tests freely; don't hesitate over spend or trim prompts,
manifests, or transcripts to save tokens.
- The GM drafts creative content; the agent drafts mechanical content.
"I draft, you cut" runs both directions. They edit files directly and
say "check it out" -- always re-read before reviewing or editing; the
last read never still holds.
- They think across several lines at once and answer in batches;
silence on a proposal usually means "not persuaded, moving on."
Discuss in prose -- question dialogs have been dismissed twice.
- **Commit discipline: they commit when pieces are in place. Never
propose, nudge, or ask about committing.** (Learned 2026-11-13,
after being told four-plus times.)
- Reviewing their creative work: check coherence against the rest of
the system, flag ripples, name what works and why -- the verdict on
creative content is theirs. GM-private files (gm.md) are never edited
and only flagged.
- Standing agreements (folded from the handoff's working-agreements
section when it slimmed, 2026-11-15): 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,
their lever is narrative, never mechanical; they answer point-by-point
and expect pushback in both directions; gm.md is 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; hard limits in `system.md` are absolute.
## Writing prompt-bound text
- **Plainness over subtlety.** Learned 2026-11-13: my content-stance
prose was aphoristic ("the weather is hers", "the camera keeps to
her side") and the GM -- the co-designer -- could not decode most of
it. Their rewrite named the thing (erotica), stated rules as
behavior (strike down unwanted advances; don't play anticipated
leads to please the GM), and stated the thesis outright (nothing
lives in a special bucket). Match that register.
- Metaphor survives only when cashed out in the same breath -- "tense
is the camera: present while the scene plays -- example -- past to
summarise -- example" passed their red pen. A metaphor left uncashed
is a riddle.
- **No HTML comments in prose or prompt files** (2026-11-14): purpose
descriptions live in README (layout), AGENTS, or as comments in the
substrate code. Generated views carry their do-not-edit warning in
the clerk, not in the output. The views are pure memory: run state
(records availability) rides the phase-3 housekeeping invocation,
not the ring headers.
- Output-style counterexamples prime what they prohibit (far context
can't suppress, only prime). State tests and positives instead.
Input-side counterexamples (routing examples, "Refuse" cases) are
safe and stay.
- The handbook's point-of-order example deliberately leaves the
paren unclosed (GM, 2026-11-15): people write OOC that way in the
wild, the substrate supports it (closing paren optional, ruled in
invariants), and the example shows the tolerated form. Don't flag
it as a typo.
## Environment gotchas
- Shell command strings: plain ASCII only -- em-dashes and fancy quotes
get rejected.
- The edit tool matches bytes, and the console renders dashes
unreliably. When an edit fails on text that "looks right," dump char
codes via PowerShell before retrying; or transcribe from a fresh
read, never from memory. **The three-space trap (bitten 2026-11-13
and 2026-11-14):** the read tool prefixes each line with `N: `, so
continuation-line indentation LOOKS one space deeper than it is --
eyeballing a " the package" was really " the package". Never
count indentation from the rendered display: dump the exact line
with `node -e` + JSON.stringify and transcribe from that when an
edit keeps failing on text that reads right.
- `node:sqlite` prints an ExperimentalWarning on every clerk call --
harmless, filtered in bridge context.
- Session logs, dumps, and views are generated; never hand-edit them.
- `server.json` (gitignored) holds the real key; it mirrors opencode's
`dv` provider (config at `~/.config/opencode/opencode.jsonc`, auth at
`~/.local/share/opencode/auth.json`).
- The repo lives at `C:\data\opencode\tiny-worlds` (renamed from
`rp-test` with the project name, 2026-11-15). The rename could not
happen in place -- the running app held the old dir -- so the move
was robocopy + session repoint, plus a one-time sqlite edit of
opencode's own db (`~/.local/share/opencode/opencode.db`) to
repoint the project record and drop the stale duplicate project
the desktop UI cannot delete (anomalyco/opencode#28030). The old
dir and the db backup are gone; the rename is complete. Always
launch from the new path.
- The test scripts: `smoke.mjs` expects a CLEAN state/ plus a running
`--mock` server, prints its run ids, and leaves a temp token file
for `restart-check.mjs`; `check-reminder.mjs` takes a run id --
one whose NEWEST LOGGED session has GM turns (post-smoke that is
the fork lineage, e.g. the refork id in the token file; the source
run's newest logged session is the near-empty session 4, and
aiming it there fails on 0 reminders -- learned 2026-11-15);
`check-repo.mjs` needs no server. The smoke cannot run twice --
the second run dies on the dirty state (learned 2026-11-15): stop
the server, Remove-Item state/ and runs/, restart, run once. Clean
up state/ and the smoke runs afterwards -- only the real runs
stay. The type gate: `npm.cmd run typecheck` runs TWO no-emit
tsc passes over the JSDoc annotations -- `tsconfig.json` (server
+ tool, node types) and `tsconfig.web.json` (web/, DOM libs; node
types ride along because server/shapes.mjs's Provider typedef
pulls provider.mjs into the web program). Dev-only tooling
(typescript + @types/node in devDependencies, node_modules
gitignored); the runtime stays zero-dependency (DECISIONS #4
amended 2026-11-15). All four phases are typed under strict:
server core, the clerk, and web/. Typing lessons (2026-11-15,
the round): assigning an any (api()/JSON.parse result) to a
`?T` variable does NOT strip the null -- declare the variable
plain `T` and let definite assignment carry the try/catch (the
catch returns); under the web program's DOM+node merge the
browser timers resolve to node's overloads, so annotate them
`?ReturnType<typeof setTimeout>` and `clearTimeout(x ??
undefined)`.
- A fresh git worktree has neither server.json (gitignored) nor
node_modules: copy server.json in from the main repo before the
mock server starts (it exits without one), and run npm.cmd
install before typecheck (2026-11-15, this worktree).
- The remote (2026-11-15, GM): origin at
`ssh://code@code.fleshless.org:2290/hackmaster/tiny-worlds.git`,
branch mistress tracks origin/mistress. The ssh key takes a
PASSPHRASE, so pushes are the GM's -- an agent-side `git push` is
non-interactive and dies on auth; the network to that host also
has hiccups, so a connection timeout is not proof the server is
down (bit once: push attempt got auth, then the port went silent
for minutes).
## State pointers
- **The reasoning-effort round is BUILT (2026-11-16, late night): the
battery probes the effort ladder, the knob is first-class, hidden
from the model, and its default SENDS.** The probe (discovery.mjs
probeEfforts): each level of EFFORT_LEVELS (none/minimal/low/
medium/high/xhigh/max -- mirrored in web/knobs.mjs, keep in step)
measured for mean thinking (2 samples), efforts recorded per
model, effortDefault = the argmax mean over minimal..max ('none'
is the off switch, never a default candidate; null when the model
shows no thinking or nothing moved). The knob (GM's rulings: not
her call, hidden entirely -- never in the mind verb, never in the
<model> display block, BOTH the loop's live push and renderView's
via-derived block filter it; it rides the via record, raw shows
it): resolveEffort layers run override > deployment (server.json)
> registry per-model default, explicit null clears to nothing.
UNLIKE the numeric knobs the unset state sends -- the registry
measured the default, so it is honest. First non-numeric knob:
RoleParams carries reasoning_effort?: string, the /model route
validates against the ladder, the knob row is a select whose
unset label names what rides ('(default: max)'), and the rows
rebuild on model-select change (the effort context follows the
picked model -- modelsBox's rebuildKnobs). Lessons: the loop's
mock path hardcodes model 'mock' (resolveModel never runs under
--mock, which is why cfg's real glm-5.3 never 409s the smoke);
declare helpers BEFORE the factory's return statement -- code
after return is unreachable, a hoisted function referencing an
uninitialized const throws silently mid-fill and stale rows
render (the browser pass caught it); renderView renders the via
record as the turn's <model> block -- a second <model> surface
beyond the loop's live push, both need the effort filter. The
dv endpoint honors the ladder on the GLMs (probed live: low
suppresses to a third of baseline, max elevates ~2x), accepts
the whole ladder on both families without 400s, and
reasoning_effort 'none' doubles as a standardized thinking-off
switch. The registry on disk predates the probe -- efforts land
at the next refine (the GM's one click, post-curator-review).
- **The state-scan round is BUILT (2026-11-16, evening): the log is
the one truth for status and agenda, the db tiers are retired.**
scanState (server/session.mjs) derives each kind newest-wins
across her emissions (the picked variant's text), the GM's
override fields, and the boundary state notes; the panes, the run
detail, and the stamp all read it (GET /status and detail.status
are derived reads; no clerk call). The cap is a derivation rule:
an over-cap agenda is never derivable anywhere, the raw log is
the only place her seven items live, the reception note still
shows the GM what sank. The stamp renders canonical formats:
status comma-separated, agenda markdown bullets (the grammar
invariants teaches -- the GM added the line themselves). The GM's
block edits are overrides: the pane editors STAGE (paneEditor
reworked -- no save callback, staged state + pending marker +
discard), the send attaches them to POST /turn, node logs the
override field on the GM turn (the log never mutates -- GM,
2026-11-16: "mutate during the contwin composition... the model
sees the blocks overwritten with GM's edits attached to her
turn"; append-if-empty; OOC turns refuse edits, client and
server both). stop writes the state note at the carry head
always (the resume-reconcile filters it out before comparing);
the start gate's n=1 seeding is dead (her authored opening turn
IS the seed); continuation carryovers are rw in the file editor
during dormancy (the save lint unchanged). The clerk lost the
status/agenda tiers wholesale (schema, four verbs, canon views,
dump sections, report fields; the events CHECK keeps the
historical op names; old dbs keep dead tables, never read, never
dropped -- Irene is hands-off). Chloe is MIGRATED: her last turn
carries the whole-list blocks hand-applied from her db's values
(the db's now-dead tables agreed at cutover by construction).
Browser lessons of the round: a CSS display rule on a class
BEATS the hidden attribute (the pending marker showed un-staged
-- .pane-pending[hidden] { display: none } is the fix, and any
widget that uses hidden + a display rule needs the [hidden]
override); a widget whose sync() runs on only some paths drifts
(setEditable(true) never synced -- always run the full sync,
unconditionally); the SPA is served with no cache headers, so
the browser heuristically caches ES modules across reloads --
after editing web/ warm them with fetch(url, {cache:'reload'})
from evaluate before judging the page stale or fresh.
- **The GM-input round is BUILT (2026-11-16, night): the composer
reads like a turn, the tokens are colour-only, the stick-to-bottom
works.** The overlay's real bold/italic faces shifted advance
widths and dragged the caret (the "every character stays" trick
preserved count, not width) -- the ruling: no faces on the
workbench at all. One rule, colour-only, source verbatim
(asterisks tinted, kept on screen): the input overlay and the
transcript share the same token classes (.narration dim,
.emph accent), zero drift by construction; the scrollbar-gutter
match killed the second drift source (the textarea's gutter
appearing on scroll while the pre had overflow hidden). The story
view got its OWN renderer (view-story.mjs storyBody/storySpans):
the book keeps real faces, asterisks spent, narration italic via
#story-scoped CSS -- one rule for the tool, typography for the
deliverable, deliberately separate. The composer: rows=6 floor,
field-sizing: content grows it with the turn, max-height 50vh
caps with internal scroll (rows is the no-support fallback --
field-sizing is the thing the GM remembered Firefox doing; it
wasn't in use, now it is). The footer moved under the transcript's
column only (the input's width is the pane's width), padding
aligned to main's. The pane stick-to-bottom was DEAD CODE all
along: #transcript has no height/overflow (main is the scroller),
so scrollTop assignments on it were no-ops in every browser --
stickBottom() now scrolls main, re-asserts on the next frame
(Firefox's scroll anchoring can reclaim a same-tick scroll around
a content wipe), main carries overflow-anchor: none.
- **The 2026-11-16 rounds are built and live-proven: the
play-protocol batch and model discovery.** The protocol batch: OOC
GM turns (paren-led, post-expansion) carry no status/agenda blocks;
memory.json is authored draft material, applied by the START gate
(clerk verb `reapply` -- scratch-validated, rebuilds session one's
db; create no longer applies it; hand edits to a draft's rings are
discarded by design); /story omits OOC turns whole; the table's
turns carry a per-turn `raw` control (index-aligned fetch from
/session, thinking + as-sent content inline). Discovery: the
two-step op act (discover = scrape, refine = battery + curator),
state/models.json is the registry and gates all model use (fresh
deployment = disabled; resolution run > server.json > registry
default; server.json's explicit pick BEATS the registry), the five
named knobs ride run.json params over server.json params, sent
only when set. Live lessons: the curator (a -max model) dumped 8K
thinking tokens on the labeling task until curator.md got the "do
not deliberate" line; the host's network hiccups killed the curator
call twice -- the fallback (machine labels, deterministic
defaults) carried the job exactly as designed, and the call now
retries once; the 5.2/5.3-max flip was the dv alias (GM-confirmed,
one model behind both ids) and the pick rule now ranks on the
reasoning bucket (within-bucket counts are noise -- the thresholds
sit in the endpoint's observed gaps), full ties settling
sort-lex-pick-bottom (GM rule, 2026-11-16; the mock's tie pair
mock/mock-tie asserts it in the smoke). The dv endpoint
aliases 5.2 to 5.3 (GM, 2026-11-16) -- curator.md tells the curator
to name likely twins instead of inventing distinctions. The
tunables UX round is BUILT (2026-11-16): the knob definitions
table + explicit override toggles + shared hint bar live in
web/knobs.mjs (every knob text red-pens there), the run detail
and /model responses carry paramDefaults (the deployment layer),
and every provider request records its resolved model + effective
params on the msg event (via; a failed call lands a req event --
the start lint admits req as conversation machinery so a record
riding the slidwin tail never refuses a start); the housekeeping
pass log names its model via the clerk's new --model flag; the
hint texts are the GM's drafts verbatim pending their red pen. The
mind verb is BUILT (2026-11-16, same sitting): <mind> JSON in a
player turn sets its sampling for its NEXT turn -- rulings: tag
form, one-shot, no GM lock, JSON inside the tag, max_tokens
excluded (a budget, not a mind), no prompt-side parameter
explanations (native in base training -- the GM documents the
verb themselves); bounds enforced in loop.mjs's KNOB_BOUNDS with
the range named in the conflict, the heal restatement is the
statement that counts, derive() makes a statement live until a
player reply consumes it (restart- and boundary-honest: an
unconsumed mind rides her first turn of the next session); the
mind note + chip render on the table, the story strips the tag,
smoke +7; watch live: whether she ever uses it. The full-block
protocol round is BUILT (2026-11-16, evening, HANDOFF's own
section): the diff verbs are RETIRED everywhere (the clerk's
status-apply/agenda-apply and their dispatch cases deleted --
grep the dispatch after any rename/retirement, the standing
lesson); she emits whole <status>/<agenda> at her turn tail, the
view stamps the newest of each kind at her most recent prose
turn (her own emission -- the silent eviction stays silent to
her, the note shows the GM), <mind> is write-only, every turn
carries its <model> block (via-derived, current call included,
suppressed when nothing is set, emitting one refused), GM prose
goes pure (old logs' rides strip -- never GM words), the
agenda-set verb evicts over-cap silently for GM and player
alike, the authored-carryover lint requires a model turn. The
opening event is RETIRED with the same stroke (GM's package edit
moved the initial status into her authored opening turn; the
start gate seeds the clerk from her last authored turn's blocks;
old carryovers keep their events as inert history -- and the
event's pre-existing DOUBLE-LANDING in every started log,
pre-bundle and in-carry, died with the branch; found on Chloe's
real log, invisible to every reader because the type is skipped
everywhere). The
smoke now IMPORTS renderView and asserts the view policy
directly (the stamp, the strips, the prefixes) -- the pattern
for testing view-only policy that no API surface exposes. Watch
live: Chloe's session two is the protocol's first real run.
- **The multiuser server is built and mock-proven (2026-11-14).**
Design: ROADMAP "The multiuser server" + DECISIONS #22-31 (all
resolved). Identity = bearer token, no usernames/passwords/IDPs;
invites single-use with a permanent spent record; bootstrap invite
auto-mints on fresh deployment to state/bootstrap-invite.txt; op
mints/revokes invites and users; revocation destroys identity (new
invite = new person). Ownership is RESOLVED, never maintained --
run.json keeps dead owner ids, the API reads them as ownerless (GM
overruled my file-sweep; resolution won). Fork = atomic copy, owner
replaced, `forked: unixtime` stamped, no lineage. Packages split
system (repo) / user (state/packages, published). Reads: the story
is the one public surface (any signed-in user, fork button on it);
the table, raw session, carryover, files, status, and gm.md are
owner-only (the story-only ruling, 2026-11-15 -- #28's human-side
open read overturned with it; the model boundary stands, gm.md is
never model-facing). Dates/times always UTC -- house rule. Model
selection:
per-run `models: {player, housekeeper}` over server.json defaults
(#16 narrowed to the default choice only). Signing in is permanent
and per-browser -- no sign-out (lifecycle is a ROADMAP extension
point). The agenda (DECISIONS #32): the player's second block, `<add>`/
`<drop>` deltas, cap-5 recency queue; Irene's events journal
migrated (CHECK widened) -- her db is agenda-ready. The per-turn
reminder (DECISIONS #34, steal #11 done): reminder.md is repo-shared,
rides after every GM turn as its own system chunk, one live copy
(older elide); its CONTENT is the GM's -- my draft is a proposal,
the handbook duplicate-cut is their red pen.
- Substrate design round complete (2026-11-13); rulings live in ROADMAP
("The harness") and HANDOFF. Bridge retired before ever going live;
REST + SPA is the MVP; runs are per-deployment instances copied from
packages at creation; zero-dependency runtime (dev tooling exempt,
DECISIONS #4 amended 2026-11-15: typescript rides devDependencies,
nothing imports it). Doc set updated to match.
- Build order: ALL FOUR PHASES DONE (2026-11-13/14) -- clerk paper
migration, preset/run split, prompt split, server, housekeeping
job, SPA. The MVP substrate is complete and live-proven end to end
(two real wraps, one full UI-driven session). Remaining roadmap
surface is the "Later" list (turn surgery, memory browser, context
inspector, book export, service step) plus whatever the first real
story surfaces.
Server entry: `node server/main.mjs [--mock] [--debug]` (--debug:
every request is a fixed superuser, the users db bypassed, no
invite dance, loopback-bound regardless of config -- testing
only); SPA at
http://127.0.0.1:7350/; POST bodies from PowerShell need
Invoke-RestMethod (curl.exe mangles quotes); background start/stop
via Start-Process -PassThru with a PID file in $env:TEMP.
- Gotcha (2026-11-14): before starting the server, check
`Get-NetTCPConnection -LocalPort 7350` -- a forgotten instance holds
the port and silently answers with OLD code while the new one dies
on bind (bit me once; two accidental live turns resulted).
- Gotcha (2026-11-14, GM): **never call browser.screenshot** -- the
image return breaks the session (glm-5.3 is not multimodal; the GM
had to rewind once). Verify UI text-safely: browser.snapshot
(accessibility tree), browser.console, browser.network. If real
vision is ever needed, the endpoint carries multimodal
deepseek-v4.1 -- but prefer never needing it.
- Gotcha (2026-11-14, GM): **no JS alert()/confirm()/prompt() in the
SPA** -- they block the embedded browser pane (the GM sat locked out
of their input once while a test confirm hung on my dialog-tool
fumbling). In-page UI only: the banner for notices, two-click arm
for confirms.
- Browser-tool gotchas (2026-11-14, UI testing): evaluate takes a raw
expression, not an arrow function (an arrow returns the function
uninvoked -- its .value serializes to {} and silently corrupts
whatever you build from it); wait's text matches RENDERED text
(moot for letter case since the all-caps CSS ban, 2026-11-15 --
waits match source text now) and PLACEHOLDERS never match a wait at
all (probe the
textarea via evaluate instead); clickable divs are invisible to the
a11y tree and the keyboard -- clickable things are buttons. Added
2026-11-14 (multiuser round): the a11y snapshot races async renders
-- waiting for static skeleton text ("RUNS", the aside headings)
snapshots BEFORE the fetches land and looks like a rendering bug;
wait for text that only exists post-render (a card name, the
session-info line) or probe the DOM via evaluate. Added
2026-11-16 (tunables round): programmatic element.focus()/.blur()
inside evaluate fire NO focus/focusout events in the automation
context -- a focus-driven UI (the knob hint bar) looks broken when
driven that way; dispatch a FocusEvent('focus') to exercise the
listener, and treat real-focus behavior as a browser guarantee the
automation cannot reproduce. Empty number inputs also vanish from
the a11y tree (no refs) -- evaluate is the only handle on them.
- Test-state discipline (2026-11-14): the deployment's state/ is real
-- never leave test users or invites in it. Smoke against --mock,
then Remove-Item state/ and every test run (all but the GM's real
ones) before calling it done. A stale bootstrap file is harmless
(dead once a superuser exists), but test users make the deployment
NOT fresh and block the real bootstrap.
- Naming gotcha (2026-11-14, SPA round): static files under web/ must
not have names starting with "api" -- the server's route guard
matches the /api PREFIX, so web/api.mjs 404'd as a bogus API route
and the app died at module load with an empty <main>. The REST
client module is client.mjs. Any future web file name gets this
check.
- Gotcha (2026-11-14, rewind aftermath): a session rewind erases my
memory of tool calls but NOT their effects -- the server, files, and
databases keep them. After any rewind, external state is the truth:
re-read it, and never assume authorship of found content (I once
credited the GM with a GM-turn that pre-rewind me had written).
- Open tails (handoff, 2026-11-14, evening): **housekeeper.md review
is still the next creative step** -- the GM's dry-run verdict was
"works, but not as expected; I never saw the prompt"; iterate with
the replay button (nothing applied). **Status discipline: RESOLVED**
by the agenda (DECISIONS #32/#33). **Verbosity**: completions
lengthened 103 -> 668 chars across session one; the per-turn reminder
is the countermeasure now built -- the next live session is the test.
**Irene is broken and never runs again (GM, 2026-11-16, superseding
the calibration retirement): her run (4f261452) is kept exactly as
it is -- logs and db untouched, no replay, no continuation, no
compatibility designed for her. Reading her files on disk (the
calibration comparisons) is all that's left; the hand-stamp talk
is moot.** Her frozen session-1 bundle keeps its old handbook
copy: an artifact now, hands off.
**Replay-after-housekeeping is dead** (found in the SPA round) --
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 replay default never needed to move.
- Active work: the JSDoc typing round is COMPLETE (2026-11-15,
evening) -- all four phases. Phases 1-2 (the server core) are
committed (`f81b188`); phases 3 (the clerk) and 4 (web/, via the
second tsconfig) are committed (`8d4a6b9`) -- typecheck
green on both programs, smoke 110/110, restart-check on a genuine
restart, check-reminder, check-repo, and a full zero-console-error
browser pass over the SPA; test state cleaned. The audit lists of
non-annotation deltas live in HANDOFF ("Where we are"). Working
lessons from the rounds: in checkJs a JSDoc typedef sharing a
name with a runtime import conflicts (TS2440) -- the import
already carries the type, just use the imported name in
annotations; the any/null and DOM-timer lessons live in the type
gate bullet above. The earlier rounds (entity, variant,
dormant-session rework, Irene hand-migration) are all committed
and live in the git log; the next operational steps remain the
op's one-time first start under multiuser (HANDOFF step 1), then
the first real housekeeping pass (step 2). Plan of record:
HANDOFF ("The dormant-session rework"); status: HANDOFF ("Where we
are"). En-route fix flagged to the GM: the roll retirement had
missed bundle.mjs's tool list;
removed. Working lessons from the build: the mock model's script
keys on assistant replies counted CUMULATIVELY across the log
(gated: turns before the first exchange don't count; the conflict
heal is a reply like any other) -- the first build reset the count
on every GM turn, so every direct reply landed on script position 0;
a carried history shifts a session's first script position, and the
smoke knows the exact tail (a hand-driven browser run with a
different tail lands elsewhere in the script -- that is the script,
not a bug). The clerk's --json now means stdout is JSON only
(renderAll used to print view paths under --json; create started
applying memory.json in-process and the route's JSON.parse choked);
every server->clerk spawn passes --quiet. The lint
(check-repo) reads the git INDEX, so a renamed tracked file must be
staged or the lint dies on the ghost; the README layout section
lives inside a code fence with its own deeper indent -- byte-dump,
the read display lies about depth there too. Deferred to ROADMAP:
save-as-package beyond drafts, the carryover
editor. The lint's blind side (bitten 2026-11-15, commit round): it
reads the git INDEX, so UNTRACKED files are invisible to it -- "ALL
CLEAN" before a commit does not cover never-staged files, and the
moment git add -A runs they enter scope (variants.mjs shipped
em-dashes through three green lint runs that way). Lint again after
staging. The checker exempts its own source from the rules that
name what they ban (text-transform, toLocale -- the patterns
themselves). The variant round: roll
retired as a model tool, chance in play is variant literature
(four ruled turn shapes), the loop picks one candidate at random
on reception (crypto, pre-append strict parse, 422 on malformed),
the pick note is the metric, every model-facing surface renders
the picked variant only, thinking never crosses the story wire,
boot resolves a crash between message and pick note. The entity
round: /story = the whole deliverable (literature only, all
sessions, no doubles -- the reading surface the observables
promised); /table = the play view's session projection (the
renamed old /story); the carry = the slidwin (contiguous
raw tail, whole exchanges, smart cutoff counting only prose the
model sees vs 96KB; the housekeeper reads session-minus-tail, so
an event files exactly when it drops out of the carry; the
boundary is invisible to the model, dimmed behind a divider for
the GM). Working lessons: a scripted mock keys its branches on
the count of assistant MESSAGES, not turns (the roll->variants
renumber bit once); README layout lines wrap at 17 spaces of
indent for continuations -- byte-dump before editing, the read
display lies about depth. Smoke 79/79, restart + reminder +
repo checks green. Unexercised live: the pick, the carry at a
real session boundary, the story as reading surface, coin-flip
personality. (Prior rounds, committed: SPA module refactor +
terminology through c51d310; multiuser + agenda + reminder through
89a2c16 -- abf8ef3 is its dead pre-amend twin.)
- Format house rules, same sitting (2026-11-15, GM, from their
operator's queue): ASCII bytes in every tracked file (the ENCODING
is the problem, never the visual -- rendered glyphs travel
ASCII-safe: the middle dot is \u00b7 in JS strings, entities in
HTML; em dash is --, ellipsis is ...) and no text-mutating CSS:
rendered text must match authored text (no text-transform, no
generated content: incl. ::before/::after, no caps font variants --
inline styles included). Both enforced by
test/check-repo.mjs; the repo swept clean (43 files), style.css
de-capped (source-case labels now -- waits match source text), the
setup editor's dirty marker authored into the DOM. The audit pass
(same day, GM-ordered) grew the check to NINE rules -- read its
header for the list; the found-and-fixed: four html comments in
prose files (la-caramba's backdrop rode one into every bundle),
README's "256K-class window", ROADMAP's "rides the prelude". The
lint's carve-outs are rulings, not sloppiness: historical records
keep their day's words, gm.md is GM-private, contwin glosses may
name the context window, and the clerk's paper->status migration
code is the ruled one-time
exception (which is why the term check scopes to living prose, not
code).
gm.md note: the sweep once touched packages/boutique/gm.md's
typography; moot since the GM emptied the package.
- Working lessons (prior builds): the newest GM
turn must keep its <status>/<agenda> blocks (that ride is the
status/agenda blocks' only channel from session two on); any new path that reads a
run file for sending goes through expandVars (turn0() initially
didn't); the transcript must surface failed session-open notes
(ingest), not print success unconditionally; after changing a
default, re-run the primary path (the start button broke for the GM
because post-redesign tests never pressed it); ownership is resolved
against the users table, never swept on disk; same-verb delta blocks
combine into one apply, never execute in sequence. Rename-mechanics
lesson (2026-11-14): scripted renames with split/join replace EVERY
occurrence -- renaming the clerk's `paper` case to `status` and then
`status` to `report` ate both, leaving no `status` dispatch; the
smoke caught it on the next run. Order rename pairs so a new name
is never a later pair's old name, and grep dispatch tables after.
CLI note: the run summary is `report` now; `status` is the tier
verb.
- Postulates (GM, 2026-11-14): female PCs only (names are gendered;
DECISIONS #2 closed by it). Boutique: the GM emptied it wholesale
(2026-11-15 -- it kept being a noisy problem); placeholder files
only, no content anywhere. Still do not fix or design it
unprompted -- its design round is where content returns. The
skip-it carve-outs are retired with the content: the lint covers
packages/ like any living prose, and the clerk's completeness
check now requires non-empty files (an emptied package lists
honestly as MISSING, never "ok").
- Identity model (2026-11-14): @PC/@Package are identity sigils
(settings pc/name); $TOKENs are prompt-declared template vars
(setup inputs -> settings vars). Run ids are anonymous hex --
display is always "Package / PC". Any new prompt-side file reader
goes through expandVars. GM input expands at ingestion too
(2026-11-15, DECISIONS #9: strict everywhere, a refused line hands
back un-eaten, the log records the expanded line -- continuation
carryovers stay expansion-free forever).
- Exposure rule (GM, 2026-11-14): everything that enters the bundle
is inspectable read-only in the SPA (system.md, invariants.md, the
assembled system message in the bundle card); anything that prompts
an internal agent (housekeeper.md) is never exposed. Don't hide
bundle parts, don't surface agent prompts.
- Dates principle (revised 2026-11-14, GM): **no model-facing surface
renders a date** -- ring views, search results, everything the
player-model sees. Memory doesn't timestamp; when something happened
lives in the entry prose. Internal stamps (created/last_touched) are
real, mechanical (LRU/overflow/sinking), never rendered; GM-facing
CLI keeps them. The manifest and seed carry no date keys at all --
the housekeeper's date duty is gone (it couldn't ask, and the touch
stamp was rewriting story time). Supersedes the story-date ruling
below.
- Watch: the "never open with world narration" rule was cut as
superfluous by the GM -- reinstate only if testing shows drift.
- README observable #14 reads correctly as-is (GM, 2026-11-15): a
turn is one thing -- the reminder's zero-or-one-action plus
bounded speech is the structure OF the thing, not a looser count.
Don't re-flag the wording.
- Defaults taken without asking (2026-11-13): #21 session-open refuses
over an unhousekept session with explicit override; #16 housekeeper
defaults to the player's model; #10 tool-call pairing validation goes
into the server loop.
- Open decisions live in QUESTIONS.md -- read it first; the resolved
record is DECISIONS.md (the old queue, kept by number). QUESTIONS is
open items only now (2026-11-15 split). Remaining: #16 (which model
the housekeeper defaults to), #19c
(seed voice, GM may revisit -- non-blocking), and the turn-surgery
build details.
- The tree is usually dirty by design; git status is not an alarm.
- Edit-tool lesson repeated (2026-11-13): nested-list indentation in
HANDOFF failed twice from memory -- always transcribe oldString from a
fresh read, counting spaces.