Files
tiny-worlds/ROADMAP.md
T
mute 3d4c374894 substrate: spa v1 plan, rewrite-here surgery, status redesign
- ROADMAP: SPA v1 decisions recorded - the story lives in the session
  logs (publishing is a later export), sessions outlive the browser via
  boot-rebuild from the jsonl, loopback single-human, ask_gm as a modal
  that survives refresh, context meter loud past 85 percent, status pane
  always visible, housekeeping is the window-close ritual with
  autorestart (rejection holds the restart; review is async via logs),
  synchronous REST as the full substrate with the SPA strictly a
  client; phasing 0-3 and the API spine; steals #2 and #3 decided
- rewrite-here turn surgery: an unfortunate GM turn is edited and the
  session restarts from there; window-scoped only (post-housekeeping
  edits are retcons); the saga rule - every player tool is either
  session-pure or a journaled mutator with recorded prior state, so
  compensation is mechanical; trivial typos tolerated
- status redesign (QUESTIONS #17): the paper holds freeform
  descriptions admitted by a three-part gate (non-normal, acute,
  turn-affecting); the full paper rides every GM turn as a status
  block - reads are state, writes are deltas via lost/gained tags in
  the player's turn, exact match, non-blocking, misses relayed back as
  conflict blocks; no cap; normalization drift is the housekeeper's to
  place; status leaves the opening bundle and the bundle copy of old
  blocks elides from the live view; the initial paper rides the prelude
- system.md: Status section rewritten for the paper model; records
  cross-reference fixed
- housekeeper.md: entries are personal memories now - first person, her
  voice, labels stay terse handles; status blocks and player thinking
  named as inputs, evidence never fiction; the paper watch rule (place
  drift: facts to rings, identity to open questions)
- la-caramba: GM red-pen of the seed (first-person sensory entries,
  status key dropped, typo fixed) and prelude (trailing status block
  seeds the paper at new-game)
- QUESTIONS: queue churn throughout - items 5, 6, 8, 15, 17, 18
  resolved; 15 through 18 added
2026-11-12 13:42:37 +00:00

15 KiB
Raw Blame History

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.

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 × importance × 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 × importance × 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.
  • 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 wrap, 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 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.

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 window.
  • 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 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 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.
  • 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 contextWindow value in bridge.json. The 100% endgame is close-and-housekeep.
  • Housekeeping is the window-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 chain runs unattended: housekeeper -> manifest -> apply -> next window 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 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 — roll, 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.
  • 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: 0. pre-substrate deltas: strip reasoning_content from the live context (log keeps it); usage tracking; contextWindow in bridge.json; clerk journals prior content on amend/discard (compensation-grade audit); status migration — description-set schema, <lost>/<gained> delta apply (exact match, <conflict> reporting), prelude ingestion at new-game, bridge loses the status tools

  1. shared loop core (bridge + server); node:http server; REST spine; session state machine with ask_gm pause/resume; boot-rebuild from jsonl; status/usage endpoints
  2. SPA: transcript with three visual registers (voice / narration / OOC), bundle as a collapsed "window opened" card, prelude as fiction; GM line input; ask_gm modal; status pane; context meter
  3. housekeeping job: manual trigger (always ends the window), transcript assembly with labeled thinking, auto-apply, autorestart on success, async log view; a rejection holds the restart and surfaces why Later: turn surgery (steal #2 with UI), memory browser (steal #7), context inspector (steal #6), book export.

API sketch (the operable spine): GET /api/runs list (fill, records, new-game flag) POST /api/windows open a window for a run GET /api/session transcript + pending ask_gm + usage POST /api/turn GM line -> runs the loop POST /api/session/rewrite edit a turn, drop everything after, restart the live context from there POST /api/ask answer a pending ask_gm GET /api/status the status tier, structured POST /api/housekeeping run the housekeeper — ends the window, auto-applies, restarts on success POST /api/housekeeping/apply apply a manifest directly (re-runs, hand-edited manifests) GET /api/housekeeping/log the latest window log (async review)

The steal list (work point by point)

1. Voice examples in the character sheet — ACCEPTED

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: ACCEPTED (2026-11-11).

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. Remaining details in QUESTIONS #15; implementation with the substrate.

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 (QUESTIONS #17): the full paper 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 — OPEN

Every frontend exposes sampler settings; the bridge sends none. bridge.json gains an optional params object spread into the request body (temperature, top_p, etc.). Cost: trivial. Status: OPEN.

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-window; a marathon session has no relief valve. Current answer: close the window. Fine for the test; revisit if real sessions regularly overflow. Status: DEFERRED.

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.