substrate: paper model in the clerk, preset/run split, harness decisions

- clerk phase 0: the paper replaces key/value status - a description set with exact-match lost/gained delta apply (paper-apply), non-blocking, misses relayed back as conflict strings; paper / paper-set (GM override) / paper-ingest (a file's status block at new-game); amend and discard journal prior content and the paper ops journal what they replace (events.prior, the saga rule); seed rejects a status key loudly. Smoke-tested end to end
- preset/run split: packages are presets (authored content only - the six state dirs are gone from both), runs are per-deployment instances under runs/ (gitignored); create <package> <run-id> copies the package wholesale (shared prompts included, run.json lineage plus optional model override) and inits state; --run addresses runs; packages and runs list them; config.json names the default package. The seed applies lazily at a fresh run's first window-open
- bridge retired before ever going live: bridge.json became server.json (bind, endpoint, models, contextWindow, params - steal #4), example committed, bridge.mjs stays as the loop donor until server mock-parity
- prelude.md renamed turn-0.md (GM); mechanical feeders, pink ice as licensed corpo firewall, slop section, Pinky treatment pinned (GM)
- harness decisions (ROADMAP The harness): stated goal - a usable RP harness, clone-and-run or invited instance, key on the backend, no secrets in the repo; repo ships code and authored content only; copy-at-creation, editable everything, discipline on the GM; per-run model selection with an upstream models listing; audit as per-wrap dump snapshots inside the run (commit-per-wrap retired); zero-dep stack (#4 resolved, #7 dissolved with the bridge, #21 by default)
- system.md split ruled (#20): substrate facts / per-project guards / per-run craft, hard limits in the craft copy; name call resolved - keep Rell (#19a)
- docs: README gains the goal and deployment model, booting rewritten for the create flow; ROADMAP phasing 0-1 done; HANDOFF and the decision queue current
This commit is contained in:
2026-11-13 23:40:33 +00:00
parent 7ed729e294
commit 530170224f
29 changed files with 772 additions and 538 deletions
+19 -12
View File
@@ -18,7 +18,7 @@ CREATE INDEX IF NOT EXISTS entries_ring_touch
-- the character's files: cards, ledgers, manifests.
-- detailed, queryable, never bulk-loaded into context.
-- access is diegetic and per-run: packages/<story>/settings.json {"records": bool}
-- access is diegetic and per-run: settings.json {"records": bool}
CREATE TABLE IF NOT EXISTS records (
id INTEGER PRIMARY KEY AUTOINCREMENT,
kind TEXT NOT NULL,
@@ -27,24 +27,31 @@ CREATE TABLE IF NOT EXISTS records (
created TEXT NOT NULL
);
-- the player's own piece of paper: baselines (the "what would make sense"
-- default — a decision already made) plus excursions (declared only when a
-- value leaves its baseline, cleared when it returns). exception reporting.
CREATE TABLE IF NOT EXISTS status (
key TEXT PRIMARY KEY,
normal TEXT NOT NULL DEFAULT '',
value TEXT NOT NULL DEFAULT '',
updated TEXT NOT NULL
-- the player's piece of paper: 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 (
id INTEGER PRIMARY KEY AUTOINCREMENT,
descr TEXT NOT NULL UNIQUE,
added TEXT NOT NULL
);
-- append-only audit journal; nothing here is ever updated or deleted.
-- target is 'e<id>' for entries, 'r<id>' for records, 's:<key>' for status.
-- target is 'e<id>' for entries, 'r<id>' for records, 'p<id>' for paper
-- rows, 'paper' for whole-paper replaces.
-- prior captures the replaced state of a journaled mutator (the saga
-- rule): amend/discard carry the old record content, paper 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', 'status')),
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')),
target TEXT NOT NULL,
reason TEXT NOT NULL DEFAULT ''
reason TEXT NOT NULL DEFAULT '',
prior TEXT NOT NULL DEFAULT ''
);
CREATE INDEX IF NOT EXISTS events_window ON events (window);