spa modules and terminology: app.mjs split into flat es modules (router lifecycle, shared widgets, views own their state), mock smoke in test/; DICTIONARY.md rules the terms, four renames swept clean through the machinery - paper->status (run summary command is report now), window->session, wrap->housekeeping, context window->contwin; no dual-accepts by ruling, old data migrates once in the clerk (restore self-heals old dumps)
This commit is contained in:
+34
-34
@@ -61,11 +61,11 @@ long-memory problem is unsolved. Our test aims at that gap.
|
||||
**the flow is sacred** — anything mechanical rides a structural channel
|
||||
(tools) or lives outside the flow (housekeeper, GM, watcher);
|
||||
prompt-nagging mid-flow is the last resort. System-1's natural homes:
|
||||
(a) GM-side aids — salience pre-pass before wrap, quick oracle,
|
||||
(a) GM-side aids — salience pre-pass before housekeeping, quick oracle,
|
||||
transcript review helpers; (b) an auxiliary watcher agent — a cheap
|
||||
model reading the live session JSONL, flagging touches, stance drift,
|
||||
and status lag; it proposes, never writes, and its flags become hints
|
||||
the housekeeper verifies at wrap. Two-speed memory: watcher = salience
|
||||
the housekeeper verifies at housekeeping. Two-speed memory: watcher = salience
|
||||
capture (recall), housekeeper = consolidation (precision), GM =
|
||||
authority. The seam exists: sessions/*.jsonl is the watcher's food.
|
||||
Player-side missed-update rate becomes a testable observable.
|
||||
@@ -96,15 +96,15 @@ example, gitignored real file, env-var option).
|
||||
is the only truth: everything is editable at any time, and the
|
||||
discipline not to break a running narrative sits with the user/GM.
|
||||
`packages/` is read exactly once per run, ever. Edits to a copied
|
||||
file land at the next window-open (no hot reload into an open
|
||||
window). Packages carry authored content only — `canon/`, `db/`,
|
||||
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 window-open of a
|
||||
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:
|
||||
@@ -115,7 +115,7 @@ example, gitignored real file, env-var option).
|
||||
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-window switch takes the next
|
||||
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
|
||||
stays open (#16); the mechanism is settled.
|
||||
@@ -126,8 +126,8 @@ 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 paper tag transport
|
||||
(`<status>`/`<gained>`/`<lost>`/`<conflict>`) **and the paper's
|
||||
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
|
||||
unimportant, the tool manifest is self-describing.
|
||||
@@ -150,7 +150,7 @@ example, gitignored real file, env-var option).
|
||||
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))`).
|
||||
Amendment (GM, 2026-11-14): `housekeeper.md` is repo-fed at wrap,
|
||||
Amendment (GM, 2026-11-14): `housekeeper.md` is repo-fed at housekeeping,
|
||||
never copied into a run, never user-exposed. The seam is not
|
||||
machinery vs taste but the exposure rule: everything that enters
|
||||
the bundle is inspectable read-only (`system.md`, `invariants.md`
|
||||
@@ -158,8 +158,8 @@ example, gitignored real file, env-var option).
|
||||
`housekeeper.md` never enters the bundle — it prompts the separate
|
||||
internal housekeeper agent.
|
||||
- **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
|
||||
commit-per-pass ritual is retired. At apply time the clerk snapshots
|
||||
`dumps/w<N>.sql`; post-apply review is async — the session log against
|
||||
the snapshot diff. Provenance of what the model was sent is the
|
||||
session jsonl (it logs the as-sent bundle); the canon views are
|
||||
regenerated state, not provenance. A run may later self-version
|
||||
@@ -255,17 +255,17 @@ without running anything locally.
|
||||
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
|
||||
window *per run* (amended 2026-11-13) — several runs may hold live
|
||||
windows; nothing runs concurrently in practice, and API-driven tests
|
||||
can proceed alongside a real window.
|
||||
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 paper is attached to every
|
||||
- **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 paper rides the prelude, ingested
|
||||
the log keeps them all. The initial status rides the prelude, ingested
|
||||
at new-game. GM turns never carry deltas; GM override stays
|
||||
out-of-band.
|
||||
- **Status pane always visible** — the current description set, live;
|
||||
@@ -280,15 +280,15 @@ without running anything locally.
|
||||
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 `contextWindow` value in
|
||||
response's `usage.prompt_tokens` against a `contwin` value in
|
||||
server.json. The 100% endgame is close-and-housekeep.
|
||||
- **Housekeeping is the window-close ritual, and it autorestarts.** A
|
||||
- **Housekeeping is the session-close ritual, and it autorestarts.** A
|
||||
run always ends the session — "any time" means the GM may close a
|
||||
window early, not that housekeeping is a mid-session action. The
|
||||
session early, not that housekeeping is a mid-session action. The
|
||||
chain runs unattended: housekeeper -> manifest -> apply -> next
|
||||
window opens with fresh views. Review is async, via the log and the
|
||||
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-window. A rejected manifest holds the
|
||||
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
|
||||
@@ -380,26 +380,26 @@ API sketch (the operable spine, amended per-run):
|
||||
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 window, draft/housekept state)
|
||||
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>/windows open a window (lazy seed, render, assemble)
|
||||
POST /api/runs/<id>/turn0 send turn-0 as the first GM turn (fresh window)
|
||||
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>/paper GM override: replace the whole paper (empty = clear)
|
||||
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 window), async
|
||||
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 window log
|
||||
GET /api/runs/<id>/housekeeping/log latest session log
|
||||
POST /api/runs/<id>/housekeeping/apply apply a manifest directly
|
||||
|
||||
## The steal list (work point by point)
|
||||
@@ -426,7 +426,7 @@ the substrate.
|
||||
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 (QUESTIONS #17):
|
||||
the full paper rides every GM turn as a `<status>` block; reads are
|
||||
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
|
||||
@@ -475,8 +475,8 @@ Status: OPEN (low priority).
|
||||
|
||||
### 10. Mid-session housekeeping trigger — DEFERRED
|
||||
Talemate summarizes on token thresholds; Letta dreams on compaction.
|
||||
Our housekeeping is per-window; a marathon session has no relief valve.
|
||||
Current answer: close the window. Fine for the test; revisit if real
|
||||
Our housekeeping is per-session; a marathon session has no relief valve.
|
||||
Current answer: close the session. Fine for the test; revisit if real
|
||||
sessions regularly overflow.
|
||||
Status: DEFERRED.
|
||||
|
||||
@@ -487,11 +487,11 @@ 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 papers. Absent/empty file = no ride
|
||||
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 window one. The reminder is now
|
||||
the experiment: does the lengthening flatten with it in the window.
|
||||
Housekeeping never sees it (fresh context per wrap); the SPA shows one
|
||||
#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).
|
||||
|
||||
Reference in New Issue
Block a user