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:
+10
-10
@@ -27,25 +27,25 @@ CREATE TABLE IF NOT EXISTS records (
|
||||
created TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- the player's piece of paper: freeform descriptions of her immediate
|
||||
-- her status: freeform descriptions of her immediate
|
||||
-- situation, admitted by the three-part gate (non-normal, acute,
|
||||
-- turn-affecting). No keys, no baselines — just what's true right now.
|
||||
-- the player mutates it with <lost>/<gained> deltas (exact match);
|
||||
-- the GM overrides out-of-band. Descriptions never contain commas:
|
||||
-- both the delta lists and the <status> block are comma-separated.
|
||||
CREATE TABLE IF NOT EXISTS paper (
|
||||
CREATE TABLE IF NOT EXISTS status (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
descr TEXT NOT NULL UNIQUE,
|
||||
added TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- her agenda: the hot queue of what drives her — intentions, not
|
||||
-- states (those live on the paper). Id order IS queue order:
|
||||
-- states (those live in her status). Id order IS queue order:
|
||||
-- newest-added at the top, the bottom evicted on overflow — a recency
|
||||
-- ring buffer for free. The player mutates it with <add>/<drop>
|
||||
-- deltas (comma-separated adds, index-based drops); the GM overrides
|
||||
-- with agenda-set. Items never contain commas: the add transport is
|
||||
-- comma-separated, same as the paper's descriptions.
|
||||
-- comma-separated, same as the status descriptions.
|
||||
CREATE TABLE IF NOT EXISTS agenda (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
descr TEXT NOT NULL UNIQUE,
|
||||
@@ -53,18 +53,18 @@ CREATE TABLE IF NOT EXISTS agenda (
|
||||
);
|
||||
|
||||
-- append-only audit journal; nothing here is ever updated or deleted.
|
||||
-- target is 'e<id>' for entries, 'r<id>' for records, 'p<id>' for paper
|
||||
-- rows, 'paper' for whole-paper replaces.
|
||||
-- target is 'e<id>' for entries, 'r<id>' for records, 'p<id>' for status
|
||||
-- rows, 'p' for whole-status replaces.
|
||||
-- prior captures the replaced state of a journaled mutator (the saga
|
||||
-- rule): amend/discard carry the old record content, paper ops carry
|
||||
-- rule): amend/discard carry the old record content, status ops carry
|
||||
-- what was lost — so turn surgery can compensate mechanically.
|
||||
CREATE TABLE IF NOT EXISTS events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
window TEXT NOT NULL,
|
||||
op TEXT NOT NULL CHECK (op IN ('insert', 'touch', 'promote', 'demote', 'reword', 'delete', 'evict', 'revive', 'record', 'archive', 'unarchive', 'amend', 'discard', 'paper-add', 'paper-drop', 'paper-set', 'agenda-add', 'agenda-drop', 'agenda-evict', 'agenda-set')),
|
||||
session TEXT NOT NULL,
|
||||
op TEXT NOT NULL CHECK (op IN ('insert', 'touch', 'promote', 'demote', 'reword', 'delete', 'evict', 'revive', 'record', 'archive', 'unarchive', 'amend', 'discard', 'status-add', 'status-drop', 'status-set', 'agenda-add', 'agenda-drop', 'agenda-evict', 'agenda-set')),
|
||||
target TEXT NOT NULL,
|
||||
reason TEXT NOT NULL DEFAULT '',
|
||||
prior TEXT NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS events_window ON events (window);
|
||||
CREATE INDEX IF NOT EXISTS events_session ON events (session);
|
||||
|
||||
Reference in New Issue
Block a user