substrate: server, housekeeping job, spa - the mvp complete
- prompt split, GM's cut: system.md = opening + guards (glossary, purpose, input validation; repo-fed, per-project); invariants.md = substrate (syntax markers, tools, memory, records, the paper + its three-part gate; repo-fed, travels with the code); handbook.md = craft copy (shape of play, thoughts, purview, time skips, continuity, stance, hard limits; copied per run). One system message: system -> invariants -> the run's handbook. OOC is a single open paren, closing optional, match the GM's style; a lone paren is an empty OOC line, skipped by the parser. housekeeper.md aligned: the paper holds acute states, relational shifts are recorded as the facts behind them, and dates are story dates (follow the rings' calendar, never the wall clock - the seed is 2069 now, per canon) - server/ (phase 2, zero-dep node:http): REST spine per the sketch, per-run session machine with ask_gm pause/resume (the whole tool-call batch waits, pairing stays sound), view renderer (thinking-strip, tool-result elision with ask answers exempt, old status/conflict blocks stripped), boot-rebuild from the typed jsonl, lazy seed + turn-0 ingestion at window-open with the unhousekept refuse-and-override guard, usage tracking + context meter, tool-pairing validation, scripted mock model. The clerk gained --json (packages/runs/status); tool/bridge.mjs deleted at mock-parity per the retirement decision - housekeeping job (phase 3, server/housekeeping.mjs): trigger ends the window and runs the chain async - transcript with labeled thinking, run-state injection (records availability; the ring views stay pure memory), housekeeper on a fresh context, manifest saved (raw output too if unparseable), clerk apply (writes the window log, snapshots dumps/<window>.sql), state.json lastHousekeptSession, autorestart. Rejection holds the restart and surfaces why; the apply endpoint is the recovery path and the manual-relay close. Live-proven twice: both manifests sound (ring-B classification, first-person voice, precise touches, story-dated) - spa (phase 4, web/ - no build, vanilla es modules, served at /): three-register transcript per the ruled markers incl. multi-line narration blocks, bundle as a collapsed card with turn-0 as the opening GM turn, paper tags as chips, status pane with conflict surfacing, context meter hot past 85 percent, gm line input, ask modal re-presented from pendingAsk, housekeeping button with two-click arm + poll + inline log. No js alert/confirm (they block the embedded pane) - in-page banner instead. Driven end to end through the ui on a disposable live run - seed: date fixed to the 2069 story calendar (was a real-world date; real dates never surface to the player) - docs: README goal states the mvp is complete, layout covers server/ and web/, protocol and substrate sections rewritten for the server; ROADMAP phases 0-4 done, harness decisions current; QUESTIONS #4 #7 #10 #12 #16-mechanism #19a #20 #21 resolved; HANDOFF is the handoff map; AGENTS carries the working lessons (tokens are free, no screenshots - not multimodal, no js dialogs, external state survives rewinds)
This commit is contained in:
+66
-37
@@ -116,32 +116,37 @@ example, gitignored real file, env-var option).
|
||||
the comparison rig: same package, different models, identical
|
||||
prompts. The housekeeper's model choice stays open (#16); the
|
||||
mechanism is settled.
|
||||
- **`system.md` is battery included, split along ownership seams
|
||||
(ruled 2026-11-13).** Three tiers:
|
||||
1. **Substrate facts** (proposed `invariants.md`, repo-fed at
|
||||
assembly, never copied): the mechanical contracts the substrate
|
||||
depends on — the IC/OOC channel distinction, the `((...))`
|
||||
syntax, the format markers the SPA parses registers by (plain =
|
||||
speech, *italic* = narration), the memory contract (rings are
|
||||
read-only generated views with stable ids, never written by the
|
||||
player; the ring header announcing records availability), the
|
||||
status tag transport (`<status>`/`<lost>`/`<gained>`/`<conflict>`
|
||||
semantics), the tool-mode addendum. Editing these breaks
|
||||
machinery; they travel with the code.
|
||||
2. **Common security guards** (proposed `guards.md`, per-project,
|
||||
repo-fed, never copied): the input-validation bucket model,
|
||||
injection guards, the addresses-the-model rule, the Refuse
|
||||
cases. The deployment owner tunes the house security posture;
|
||||
individual runs never carry it.
|
||||
3. **Craft** (the `system.md` copy, per-run, freely editable):
|
||||
purpose framing, style coaching, purview, the status gate,
|
||||
records discipline, content stance — **hard limits included**.
|
||||
Different people have different content they don't want to deal
|
||||
with and different styles of preferred RP; we ship what works
|
||||
for us, users adjust to taste.
|
||||
Assembly: system message = invariants + guards + the run's
|
||||
`system.md` copy. The payoff: repo-level harness tweaks to tiers
|
||||
1–2 reach existing runs; craft edits are per-run.
|
||||
- **The player prompt is battery included, split along ownership seams
|
||||
(ruled 2026-11-13; cut executed by the GM 2026-11-14).** Three tiers,
|
||||
three files:
|
||||
1. **Substrate facts** — `invariants.md`, repo-fed at assembly, never
|
||||
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 paper tag transport
|
||||
(`<status>`/`<gained>`/`<lost>`/`<conflict>`) **and the paper's
|
||||
three-part admission gate** (moved into the substrate tier in the
|
||||
GM's cut). 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
|
||||
bucket model, the four communication layers, the addresses-the-
|
||||
model rule, the Refuse cases. The deployment owner tunes the house
|
||||
security posture; individual runs never carry it. (`guards.md` as
|
||||
a separate file is dead — the guards live in system.md.)
|
||||
3. **Craft** — `handbook.md`, copied per run at creation, freely
|
||||
editable: the shape of play, thoughts, purview, time skips,
|
||||
continuity, content stance — **hard limits included**. Different
|
||||
people have different content they don't want to deal with and
|
||||
different styles of preferred RP; we ship what works for us,
|
||||
users adjust to taste.
|
||||
Assembly (confirmed 2026-11-14): one system-role message, assembled
|
||||
in order — `system.md`, `invariants.md` (both repo-fed), then the
|
||||
run's `handbook.md` copy — then the rest of the bundle as GM
|
||||
messages. The payoff: repo-level tweaks to the opening, guards, and
|
||||
substrate reach existing runs; craft edits are per-run. The GM's cut
|
||||
also resolved the OOC syntax conflict (system.md no longer teaches
|
||||
`((double parens))`).
|
||||
- **The audit moved into the run.** Runs are gitignored, so the
|
||||
commit-per-wrap ritual is retired. At apply time the clerk snapshots
|
||||
`dumps/w<N>.sql`; post-wrap review is async — the window log against
|
||||
@@ -188,6 +193,11 @@ example, gitignored real file, env-var option).
|
||||
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]`
|
||||
@@ -246,26 +256,45 @@ Phasing (amended 2026-11-13 — bridge retired, SPA downstream):
|
||||
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 system.md
|
||||
split lands here too (invariants.md + guards.md repo-fed, the
|
||||
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 except the system.md split (prose, GM's
|
||||
red pen; must land before the first run is created)
|
||||
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 = invariants + guards + the
|
||||
run's system.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
|
||||
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, auto-apply, autorestart on success,
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user