572 lines
34 KiB
Markdown
572 lines
34 KiB
Markdown
# Roadmap -- SOTA review and steal list
|
|
|
|
Reviewed 2026-11-11 via web survey: consumer companion apps, power
|
|
frontends, agent RP frameworks, memory research. Items below are meant to
|
|
be worked through one by one; statuses in caps, decisions dated.
|
|
|
|
## Operator's queue (don't edit, don't work on)
|
|
|
|
- the model tends to summarise GM's turns or quote from them
|
|
- teach the model to stop using italics for emphasis
|
|
- revisit what fetch does and SPA reactivity
|
|
- calibration package: escape room
|
|
- calibration package: the detention
|
|
- user manual
|
|
- session rewind
|
|
|
|
## The landscape (what exists, as of the review)
|
|
|
|
| Family | Exemplars | Memory approach |
|
|
|---|---|---|
|
|
| Consumer companions | Character.AI, Nomi, Kindroid, Replika | Pinned facts + layered stores (Nomi short/med/long; Kindroid persistent + cascaded + retrieved, ~480K chars). Differentiator: visible, editable memory UIs (Nomi Mind Map, Kindroid Learned Context) |
|
|
| Power frontends | SillyTavern + extension ecosystem (CharMemory), RisuAI, Agnaistic | Four bolt-ons assembled by the user: lorebooks (keyword-triggered push), Summarize (rolling lossy flatten), Vector Storage / Data Bank (embedding-similarity pull RAG). ST's own docs hedge calling any of it "long-term memory" |
|
|
| Story platforms | AI Dungeon, DreamGen, NovelAI, LoreWeaver, aiga_ | Story Cards / Scenario Codex / lorebooks + auto-summaries; world state for multiplayer. Author-curated, static once written |
|
|
| Agent RP frameworks | Talemate, Letta | Multi-agent (narrator, summarizer, director, world-state, editor); Letta: agent-editable memory blocks, agent-immutable archival, and as of 2026 a git-backed markdown memory FS with a "dream" reorganization subagent |
|
|
| Memory research | Generative Agents (Stanford), Mem0, Zep/Graphiti, MemoryBank, AssoMem | Scored retrieval (recency x importance x relevance); ADD-only consolidation (Mem0 v3); bi-temporal fact invalidation (Zep); hybrid BM25+vector+graph retrieval |
|
|
|
|
Context: a 2026 25-platform rubric scored only Kindroid and AI Dungeon
|
|
4/4 on long-term recall; most consumer apps scored 1/4. The industry's
|
|
long-memory problem is unsolved. Our test aims at that gap.
|
|
|
|
## Validation receipts (we built it first or in parallel)
|
|
|
|
- Letta 2026 converged on our substrate: git-versioned markdown memory +
|
|
separate housekeeping subagent ("dream") + defragmentation passes.
|
|
- Generative Agents' retrieval score = recency x importance x relevance;
|
|
our rings encode recency (MRU) and importance (A/B) structurally,
|
|
relevance at query time. Their importance is LLM-rated 1-10 at write;
|
|
ours is the housekeeper's classify/promote judgment -- the harder version.
|
|
- Talemate mechanized our prompt-level guards: per-character knowledge
|
|
("characters know only the passages they were present for") and
|
|
per-character perspectives (their version of rings-as-her-memory).
|
|
- Mem0 v3 went ADD-only because reconciliation "destroyed context" -- the
|
|
same fear behind our verbatim-dump discipline. We keep reword (rings are
|
|
state) but with journal + git audit, so we get append-only history
|
|
without giving up state semantics. Their warning is our observable #3.
|
|
- Zep's fact invalidation ~ our reword-with-audit; their token-efficient
|
|
"Context Block" ~ our rendered views.
|
|
- Letta's tier guidance ("always visible -> blocks; changing state ->
|
|
blocks; query on demand -> archival") = our status/rings/records split,
|
|
discovered from the other direction.
|
|
|
|
## 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
|
|
memory. Revisit only if multi-PC play ever happens.
|
|
- **System-1 classification: extension point.** Prediction (2026-11-11):
|
|
models deep in roleplay flow won't spontaneously self-interrupt with
|
|
structure (JSON, classifications, status declarations) -- register
|
|
momentum eats it, and instruction weight decays with context distance.
|
|
Native tools remove the *format* barrier but not the *attention*
|
|
barrier; expect missed updates even in tool mode. Design principle:
|
|
**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 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 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.
|
|
- **Visuals: paperdoll engine, not diffusion -- much later**, when there
|
|
is a solid thing to visualize. Note the synergy: the status tier's
|
|
`outfit` key can drive paperdoll layers directly, same as it drives
|
|
prose. Procedural, state-driven, no model in the loop.
|
|
- **TTS: trivial add-on at any moment.** Park it.
|
|
|
|
## The harness -- product and deployment decisions (2026-11-13, GM)
|
|
|
|
The project's goal, stated for the first time (now also in README): the
|
|
memory test exists to arrive at a **usable roleplaying harness** people
|
|
can enjoy making stories on. End shape: clone and run it yourself, or an
|
|
invite to a running instance -- the LLM key lives on the backend, so
|
|
invited players need neither the host's secrets nor their own key. No
|
|
secret ever lives in the repo in cleartext (config pattern: committed
|
|
example, gitignored real file, env-var option).
|
|
|
|
- **The repo ships code and authored content, never run state.** Saved
|
|
state is per-deployment. Three layers: repo (code, prompts, packages)
|
|
-> deployment (a clone + server.json + runs/) -> run (a story). A fresh
|
|
clone boots with zero runs; the first act is creating one from a
|
|
package.
|
|
- **Packages are presets; runs are instances.** Creating a run copies
|
|
the package into `runs/<id>/` -- every file, `gm.md` and the shared
|
|
prompts included -- then inits the db. After creation the run directory
|
|
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 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.
|
|
- **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
|
|
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,
|
|
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 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.
|
|
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))`).
|
|
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`
|
|
included -- the user should understand how the model is prompted);
|
|
`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-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
|
|
(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.
|
|
- **Boutique is dormant** -- a stub that never reached its design step;
|
|
untouched until its drafting session.
|
|
- **Stack: zero-dependency runtime** (DECISIONS #4, amended
|
|
2026-11-15). `node:http` with a hand-rolled router, no-build
|
|
vanilla ES-module SPA; clone-and-run with node alone. Dev tooling
|
|
is exempt: `typescript` + `@types/node` type-check the JSDoc
|
|
annotations (`tsc` no-emit -- everything stays `.mjs`). The hard
|
|
parts of this project are prompt-side and clerk-side; the web side
|
|
at loopback single-user scale is the easy part.
|
|
|
|
## 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.
|
|
|
|
## 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.
|
|
|
|
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
|
|
|
|
## 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-
|
|
scoped only -- after a housekeeping run the story is consolidated and
|
|
corrections become proper retcons (the boundary falls out of the memory
|
|
model: pre-housekeeping events live in context only). Trivial typos are
|
|
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 +
|
|
label-match boosting (cheap, no embeddings -- our records are curated
|
|
one-liners, embeddings still solve a problem we don't have).
|
|
Cost: cheap. When: records > ~50 cards.
|
|
Status: OPEN (deferred until scale demands).
|
|
|
|
### 6. Context inspector -- OPEN (SPA)
|
|
CharMemory's Injection Viewer: per-category token breakdown of exactly
|
|
what the model sees (system, backdrop, card, status, rings, history,
|
|
tool results), stacked bar, actionable tips. Our audit is archaeology;
|
|
this is a glance.
|
|
Status: OPEN (SPA).
|
|
|
|
### 7. Memory browser -- OPEN (SPA)
|
|
Nomi Mind Map / Kindroid Learned Context: a browsable "what she
|
|
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.
|
|
Status: OPEN (low priority).
|
|
|
|
### 10. Mid-session housekeeping trigger -- DEFERRED
|
|
Talemate summarizes on token thresholds; Letta dreams on compaction.
|
|
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.
|
|
|
|
### 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
|
|
never-started runs. Opening it to any dormancy raises unanswered
|
|
questions: which carryover rides (the dormant session's story tail
|
|
vs session-1's spent authored opening), which memory (the authored
|
|
memory.json vs evolved rings -- needs a rings-to-manifest export),
|
|
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.
|
|
|
|
## Distant extension points (someday, not scheduled)
|
|
|
|
- **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
|
|
dice, where variant literature is her deliberate alternatives. The
|
|
composition: request n choices, hand them to a turn-editor agent
|
|
that splices/edits them into the one turn that lands. Open
|
|
questions if it ever earns a keep: who edits (the agent's brief,
|
|
the GM's veto), what the log keeps (every choice belongs on the
|
|
raw surface, and the variance metric wants them -- today the loop
|
|
reads choices[0] only), cost (every choice bills its completion
|
|
tokens), provider support (patchy outside the first-party APIs --
|
|
the discovery battery would need to probe it), and the knob
|
|
surface (`n` is not a named knob; whose is it to set?). Until
|
|
then, variant literature plus the crypto pick is the ruled
|
|
mechanism for chance in play.
|
|
|
|
## Rejected, with reasons
|
|
|
|
- **Keyword-triggered lorebook injection** -- push pollutes context and
|
|
breaks pull discipline; the "a miss is a miss" test depends on
|
|
deliberate lookup.
|
|
- **Vector embeddings over the rings** -- rings are small, curated,
|
|
always-in-context. Embeddings solve problems we don't have. (Records
|
|
tier may eventually want FTS5 -- see #5 -- still no embeddings.)
|
|
- **ADD-only housekeeping** -- we keep reword: rings are state, and
|
|
journal + git give the append-only audit Mem0 wanted without losing
|
|
state semantics. Their drift warning stays on the observables list.
|
|
- **Group chat / multi-character modes, "impersonation"** (model writes
|
|
the user's turn) -- antithetical to GM authority and the single-PC
|
|
premise.
|
|
- **Diffusion image generation** -- superseded by the paperdoll decision
|
|
above.
|
|
|
|
## Notes
|
|
|
|
- Web research goes stale; re-survey before acting on anything in the
|
|
landscape table. The steal list items stand on their own.
|
|
- The NSFW-preset body of prompt craft was deliberately not mined -- our
|
|
own substrate has no censor to engineer around.
|