ba72d2ed1f
- prompt split, GM's cut: system.md = opening + guards (glossary, purpose, input validation; repo-fed, per-project); invariants.md = substrate (syntax markers, tools, memory, records, the paper + its three-part gate; repo-fed, travels with the code); handbook.md = craft copy (shape of play, thoughts, purview, time skips, continuity, stance, hard limits; copied per run). One system message: system -> invariants -> the run's handbook. OOC is a single open paren, closing optional, match the GM's style; a lone paren is an empty OOC line, skipped by the parser. housekeeper.md aligned: the paper holds acute states, relational shifts are recorded as the facts behind them, and dates are story dates (follow the rings' calendar, never the wall clock - the seed is 2069 now, per canon) - server/ (phase 2, zero-dep node:http): REST spine per the sketch, per-run session machine with ask_gm pause/resume (the whole tool-call batch waits, pairing stays sound), view renderer (thinking-strip, tool-result elision with ask answers exempt, old status/conflict blocks stripped), boot-rebuild from the typed jsonl, lazy seed + turn-0 ingestion at window-open with the unhousekept refuse-and-override guard, usage tracking + context meter, tool-pairing validation, scripted mock model. The clerk gained --json (packages/runs/status); tool/bridge.mjs deleted at mock-parity per the retirement decision - housekeeping job (phase 3, server/housekeeping.mjs): trigger ends the window and runs the chain async - transcript with labeled thinking, run-state injection (records availability; the ring views stay pure memory), housekeeper on a fresh context, manifest saved (raw output too if unparseable), clerk apply (writes the window log, snapshots dumps/<window>.sql), state.json lastHousekeptSession, autorestart. Rejection holds the restart and surfaces why; the apply endpoint is the recovery path and the manual-relay close. Live-proven twice: both manifests sound (ring-B classification, first-person voice, precise touches, story-dated) - spa (phase 4, web/ - no build, vanilla es modules, served at /): three-register transcript per the ruled markers incl. multi-line narration blocks, bundle as a collapsed card with turn-0 as the opening GM turn, paper tags as chips, status pane with conflict surfacing, context meter hot past 85 percent, gm line input, ask modal re-presented from pendingAsk, housekeeping button with two-click arm + poll + inline log. No js alert/confirm (they block the embedded pane) - in-page banner instead. Driven end to end through the ui on a disposable live run - seed: date fixed to the 2069 story calendar (was a real-world date; real dates never surface to the player) - docs: README goal states the mvp is complete, layout covers server/ and web/, protocol and substrate sections rewritten for the server; ROADMAP phases 0-4 done, harness decisions current; QUESTIONS #4 #7 #10 #12 #16-mechanism #19a #20 #21 resolved; HANDOFF is the handoff map; AGENTS carries the working lessons (tokens are free, no screenshots - not multimodal, no js dialogs, external state survives rewinds)
125 lines
6.7 KiB
Markdown
125 lines
6.7 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), 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.
|
|
|
|
## 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.
|
|
|
|
## 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.
|
|
- `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.
|
|
|
|
## State pointers
|
|
|
|
- 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-dep stack. 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]`; 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.
|
|
- 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: none on the prompt side — housekeeper aligned to the
|
|
invariants paper boundary (2026-11-14), assembly order confirmed
|
|
(system → invariants → the run's handbook, one system message).
|
|
- Dates principle (2026-11-14): dates in seeds/manifests/rings are
|
|
STORY dates; real dates never surface to the player (canon:
|
|
la-caramba is 2069). The seed was fixed to 2069-11-18 (day is the
|
|
GM's call).
|
|
- Watch: the "never open with world narration" rule was cut as
|
|
superfluous by the GM — reinstate only if testing shows drift.
|
|
- Defaults taken without asking (2026-11-13): #21 window-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. Remaining: #19c
|
|
(seed voice, GM may revisit — non-blocking, seed editable until first
|
|
window-open) and #16 (which model the housekeeper defaults to).
|
|
Resolved lately: #19a keep "Rell"; #20 system.md split (substrate
|
|
facts / per-project guards / per-run craft, hard limits in the craft
|
|
copy); #21 unhousekept-session guard (refuse with override).
|
|
- 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.
|