Files
tiny-worlds/ROADMAP.md
T
mute eefb721675 the sheet round: the GM's ledger of arbitrated run state -- the second state channel, split from status and agenda by truth model (GM, 2026-11-17). The rulings first: status and agenda are narrative self-report (their truth is "she said so", the scan caches her latest words); the sheet is actual run state (its truth is "the GM set so", the record IS the truth event -- nothing cached from anyone's words). The override channel promoted to a standing section, and that precedent decided the presentation: the sheet renders as its OWN authoritative system chunk at the freshest end, never a canon-point stamp, which would read as her words -- the same reason the override composes as hers and the sheet never does. Schemaless JSON in the tag (the mind-verb philosophy: the substrate teaches the channel, the package teaches the vocabulary -- the invariants rule the GM wrote is one universal paragraph with deliberately non-box examples, clothes and grades, and the propose-additions line as her schema-evolution channel); details learnt in-place; NO package gating -- the channel is universal and "optional, if given" makes the invariant forward-compatible in every bundle that never sets one. The build: a sheet record rides the GM turn like the override (readSheet: object-ness is the route's only law, 400 loud on arrays and scalars, nothing appended; OOC turns refuse it exactly like block edits); scanState derives newest-wins whole-set -- an absent key drops, never keeps, and {} is a live empty ledger (a truthy check, never falsy); the boundary state note carries it across stops and the dormant read path serves it; renderView appends the chunk once per assembly so one live copy holds by construction; the guard is the <model> sibling (an emitted <sheet> conflicts with "the GM's ledger -- propose changes in prose", healed in-turn, cap 3, and her emission never applies -- the scan holds the GM's record); every strip surface learned the tag (the view's STRIP_HERS, the story's verbs, the table's chip regex -- the standing grep-every-strip-list lesson, applied); and the web gains sheetEditor, the paneEditor's JSON sibling in widgets.mjs (same stage/pending/discard pattern, bad JSON refuses at the stage), the third pane in the aside, the send attaching body.sheet, and [sheet] machinery lines on both table and raw walks. The mock's sheet-guard branch is CUE-KEYED, not position-keyed: the carried tail shifts the script's counts (session 4's log starts the script over -- the battery's first attempt landed on the ask position and crashed renderView on the unpaired call; the battery now answers the script ask and moves on), while a marked GM turn is immune to every shift -- mockModel reads the view, the marked turn earns the emission, the conflict it earns earns the plain-prose heal. check-reminder is sheet-aware (the chunk is a legitimate third system surface; the count and freshest-end assertions tolerate exactly one, and the freshest-end check now allows her latest reply and/or the chunk to follow the reminder). Verified: smoke ALL PASS with +15 sheet assertions (newest-wins, whole-set semantics, the chunk one-live-copy -- ANCHORED with startsWith because the invariants bundle itself mentions the tag and a bare regex matches it twice, an honest test bug caught by an honest test), the guard's conflict and heal with her emission kept verbatim in the raw log and never applied, the view and story strips, the empty ledger rendering its chunk, the boundary note carrying the sheet, the dormant read deriving it, and session 5 deriving it from the carried note end to end), restart + reminder checks green, typecheck green on both programs, check-repo clean (it caught the round's own prose twice: "window" is a retired term in README, the contwin vocabulary wins), and a browser pass over the pane end to end with zero console errors -- staging, the pending marker, the ride, the scan re-render, and both machinery lines on the table. Docs: README's protocol passage carries the sheet with the numbers-live-on-the-sheet line (prose numbers die with the contwin; sheet numbers ride the scan forever) -- NOT in the memory tiers table, where the first draft wrongly put it (the GM's ruling: the sheet belongs in neither memories nor records); the identity tier lost its loose "character sheet" name now that the term is technical; DICTIONARY gains the sheet entry with the history line (dice retired into variant literature, sheets arrived as the state machinery -- the tabletop metaphor completing while its realism stays advisory, players hold their own pencils in the real thing and we don't, for drift); ROADMAP parks the bookkeeper extension (the housekeeper's arithmetic sibling: reads the setting's rules prose and the latest turns, computes the ledger delta from a purchase in her prose, lands it as a STAGED edit -- applied on the GM's next turn or discarded; sheet-only authority, curator fallback, per-package opt-in because an agent cannot bookkeep what is not arithmetic). The GM's prompt-side edits ride the same commit: invariants' "Character's sheet" section (the universal rule, the trailing-clause flag taken in review), the reminder's inventory line gaining "the sheet (optional)", and la caramba's gm.md lore updates. The box package (the first consumer) and detention stay untracked WIP, untouched. The 2026-11-17 roadmap audit rides the same commit (GM: "done items can retire"): retired outright -- the SPA-vs-bridge and voice-examples decisions (long resolved) and steal items #1, #3, #4, #8, #11 (done, or in #8's case never work -- the housekeeper model is per-run selection, built); retired with tombstones -- the multiuser section (built 2026-11-14, the rulings live in DECISIONS #22-31 and README, the lifecycle tail kept visible) and the SPA v1 section (all four phases done, the API sketch superseded by README's living API docs, the substrate doctrine in README), with the one unbuilt design it held -- the turn-surgery saga rule -- surviving as its own bullet cross-referenced at steal #2; amended in place, dated -- seed.json (dead, successors named: the authored carryover and memory.json), turn-0.md (dead: her authored opening turn), the upstream model listing (never queried in play since discovery), the delta-tag transport (the full-block protocol, the sheet named), the service step (multiuser built, hosting remains), the carryover editor (the raw file-editor surface exists, the purpose-built UI stays deferred); kept -- the operator's queue, the landscape and receipts, the live constraints, the open steals with numbering preserved so cross-references resolve, the deferred tasks, the distant points, the rejections, the notes. 582 lines to 338; the first deletion pass duplicated the steal-list header and the verification re-read caught it
2026-11-17 22:50:59 +00:00

339 lines
19 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)
- entirely safe-for-work package. space?
- revisit what fetch does and SPA reactivity
- 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)
- **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. (Amended 2026-11-16: the turn-0.md
opener is retired -- the opening is her authored turn in
carryover.jsonl, GM-written, whose authored blocks are the state
seed; the start gate lints it and the old opening event is inert
history.)
- **The seed is initial state of the run.** (Superseded 2026-11-15,
the dormant-session rework: seed.json is gone. Its successors are
carryover.jsonl -- the authored opening turn, whose authored blocks
are the state seed -- and memory.json, authored draft material
applied by the start gate's reapply over a fresh db.)
- **Per-run model selection.** `server.json` names one endpoint
(baseUrl, key) plus default models (player, housekeeper). A run
carries 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. (Amended
2026-11-16, model discovery: the upstream listing is never queried
in play -- state/models.json is the registry of selectable models,
written by the op's two-step discover/refine act and gating all
model use; server.json's explicit pick beats the registry's
discovered default.) 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 block transport
**and the status's three-part admission gate** (moved into the
substrate tier in the GM's cut). (Amended 2026-11-16, the
full-block protocol: the delta verbs retired -- the player emits
whole `<status>`/`<agenda>` lists, absent means unchanged, and
the `<sheet>` channel joined 2026-11-17.)
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.** (Amended
2026-11-14: the auth/invites/multiuser half is BUILT -- see DECISIONS
#22-31; the service step that remains is the hosting story alone --
clone-and-run already works, a running instance is one deployment
away.)
- **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)
BUILT (2026-11-14, mock-proven end to end) and retired from the
roadmap in the 2026-11-17 audit. The durable record: the rulings in
DECISIONS #22-31, the surface rules in README (ownership, the
story's public read, invites, forks, ownerless runs), the design
history in the git log. The one open tail from that round -- proper
user lifecycle and auth story (sign-out, token expiry, multiple
devices) -- remains a distant extension point: signing in is
permanent and per-browser, and revisit waits for a real need.
## SPA v1 -- substrate decisions (2026-11-12, GM)
BUILT, and retired from the roadmap in the 2026-11-17 audit: the
phasing completed 2026-11-14 (all four phases), the API sketch was
superseded by README's living API documentation, and the substrate
doctrine it fixed -- the log is truth and the context a projection,
thinking never returns, OOC is the paren channel, the context meter,
the reminder's single-copy policy -- lives in README. What the audit
kept from this section is the one design not yet built:
- **Turn surgery, when it earns its build:** rewrite-here, not
forks -- an unfortunate GM turn is edited and the session restarts
from there; all turns since leave the live context, the append-only
log keeps them for audit. Window-scoped only: after housekeeping
the story is consolidated, and corrections become proper retcons.
Tool discipline for the rewrite (the saga rule): every player tool
is either session-pure (ask_gm, records_search -- truncation
removes their effects wholesale) or a journaled mutator (the
records verbs; amend/discard journal prior content, so compensation
is mechanical). Variant turns need no compensation -- the pick note
sits adjacent to its message and only the picked variant ever
applied. See steal #2.
## The steal list (work point by point)
### 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.
### 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).
### 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.
## 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.** (Amended 2026-11-17: the raw surface
exists -- the file editor edits a continuation carryover during
dormancy, save-linted, blocks included.) What remains deferred is
the purpose-built editing surface over the dormant view's
read-only render.
## Distant extension points (someday, not scheduled)
- **the bookkeeper: a sheet-keeping agent.** The GM is the sheet's
author and its error model (GM, 2026-11-17: the counts are the
GM's job). When keeping the papers correct becomes unproductive
bother, an internal agent -- the housekeeper's arithmetic sibling,
never model-facing -- reads the setting's rules prose and the
latest turns, computes the ledger delta (a purchase in her prose
applied against the catalog), and lands it as a STAGED sheet edit
with a pending marker: applied when the GM's next turn rides, or
discarded. Sheet-only authority, strictly-validated output, a bad
day falls back to no-change (the curator pattern); per-package
opt-in, because an agent cannot bookkeep what is not arithmetic.
The tabletop metaphor bends here on purpose (players hold their
own pencils in the real thing): the deviation is substrate
pragmatism, drift-proofing, not realism.
- **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.