Speaker and Scene documents, SpeakerStateStore, with_scene on a Scene document

Slot Speaker, weksa.speaker and weksa.scene append-only revisions in one
store, V16, feature_refusals as the one feature check, speaker_scene_revision
(Speaker features 22-24), schemas, docs and map lines. Part 1 of map cut 4b.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Weksa 2026-11-10 02:34:10 +00:00
commit 6ef1b7e034
16 changed files with 1638 additions and 38 deletions

View file

@ -213,6 +213,25 @@ affect and restraint to its own register. A held-back feeling is not a claim
about the world, so it is never a predication. An empty stance is valid. The
stance reaches the lowerer in the lowering view.
### Speaker and scene documents
Two documents outside the packet hold the speaker's standing, in the store that
owns them (`SpeakerStateStore`). `weksa.speaker` (key `speaker:<entity slug>@<n>`)
holds one entity's stable axes as feature values of slot `Speaker`.
`weksa.scene` (key `scene:<group>@<n>`) holds a corpus group's participants and,
per ordered pair, the speaker's relation to a party (slot `Scene`); the party is
a named participant or `Party::Unnamed`, an addressee the scene does not name,
such as the player or a crowd. A revision appends and never edits: `n` is the
latest plus one, and the latest revision is the highest `n`. Each carries an
`Annotator`, `Operator` or `Model` with an attestation string for its generator.
Both hold typed feature values only, never text. A feature of slot `Stance`,
`Speaker` or `Scene` sits in that slot alone (each layer has one writer and one
lifetime), which `admit_revision` enforces. `LoweringInput::with_scene` takes a
scene document and the speaker; the speaker must be a participant (V16), and
the relation selected is the speaker's to the entity of the addressee referent
(to `Unnamed` when that referent has no entity, to nothing when the packet has
no addressee). V13 is retired.
### `referents`
Entities, groups, places, abstractions and the rest. `kind` is a referent-kind

View file

@ -15,7 +15,7 @@ plus a separately recorded chosen gloss per lowering).
- `data/daodejing/`: its own stores (inventory revisions 1 to 3, one entity, five
corpus items, five packets), apart from the production stores in `data/`.
Revision 3 is `weksa::daodejing::revision()`; the packets are
`weksa::daodejing::packets()`. The scene revision (`scene_revision()`, also
`weksa::daodejing::packets()`. The scene revision (`speaker_scene_revision()`, also
numbered 3) is not applied in these stores and will need renumbering when it
is applied anywhere both meet.
- Rebuild: `weksa --corpus C --inventory I --entities E` with `inventory seed`,

View file

@ -263,7 +263,8 @@ operator-attested annotations alone. Who annotates is question
- Seed inventory (2026-11-10, base `5e10d7c`): features 6-8 are hedge, certainty
and irony; 9-18 are the stance affects and restraint (slot Stance). The
committed inventory holds revisions 1-2 only. Nothing calls `with_scene`
except tests, and the proof packet's addressee carries no entity.
except tests, and the proof packet's addressee carries no entity (its
referent `n3` does: `entity:nibu`).
- Yggdrasil's Ollama (`127.0.0.1:11434`) is the Docker container `ollama-cpu`,
Huginn's embedder (runbook `gamecult-ops/runbooks/huginn-yggdrasil.md`,
ruling `eureka-body:ruling:huginn-embedder-yggdrasil-primary`). `/api/embed`
@ -398,8 +399,8 @@ One line per cut; specs exist for the cuts about to run (2d and 4, siblings on `
2d. `entity-door-lows`: invisible format characters refused in entity forms (ZWJ, ZWNJ, CGJ and variation selectors kept); the form length bound per question `form-word-bound` (recommended: bytes only); attested origins (`Cast { persona, fixture }`, `Live { persona }`) and `CastAuthored.author`; empty provenance strings refused at the store; S6 under NFKC plus case fold and no-alphanumeric texts refused; `next_key` refuses at `u32::MAX`; CLI flags that do not apply refuse and no error echoes a value. Owns follow-ups `entity-door-lows` and `s6-unicode-normal-form`. (spec r1)
3b. `lowerer-first-cut` (follow-up `golf-loop-lowerer-cut`): the section above. `lower`, `weksa lower`, `weksa score`, `weksa packet proof`, inventory rev 2 for `nibu-proof-001`.
4. `speaker-state`: packet `stance` (felt affect and restraint, slot `Stance`, packet schema v4); formality, warmth and intensity out of the seed and the standard; only `PacketStore::admit` yields a `LoweringInput`, and it refuses packets for withdrawn items (follow-up `lowering-input-from-packet-store`). (spec r1)
4a. `speaker-relation-input`: slot `Scene` and its first seed features (`relative_status`, `intimacy`, `in_group`; inventory revision 3, `scene_revision`); `LoweringInput::with_scene` takes the speaker's relation to the addressee as typed `Scene` feature values, validated like every feature list, refused without an addressee (V13). The English lowerer does not render it. 4b's `weksa.scene` document is its future supplier; no store, document or CLI yet. (PR for follow-up `chat-s3352-3352`)
4b. `speaker-scene` (spec r1; `speaker-scene-seeds` is its cut 4c: CLI, inventory revision 3, cast speakers and scenes; `Party::Unnamed` covers an addressee with no entity; Speaker and Scene share one `SpeakerStateStore`): slots `Speaker` and `Scene` with their seed features; `weksa.speaker` (`speaker:<entity-slug>@<n>`) and `weksa.scene` (`scene:<group>@<n>`, participants and ordered-pair relations) documents with `Annotator` `Operator` and `Model { family, generator }`, validated by the packet's shared feature check, append-only per key; their stores, `weksa speaker` and `weksa scene` commands, published schemas; Model-annotated cast speakers and scenes for the committed items. Waits on 2d and 4; `pd-speaker-annotation` blocks only the public-domain annotator.
4a. `speaker-relation-input`: slot `Scene` and its first seed features (`relative_status`, `intimacy`, `in_group`; inventory revision 3, now `speaker_scene_revision`); `LoweringInput::with_scene` carries the speaker's relation to the addressee as typed `Scene` feature values. Since 4b it takes a `weksa.scene` document and selects the relation by the addressee referent's entity (V16 when the speaker is not a participant; V13 is retired). The English lowerer does not render it. (PR for follow-up `chat-s3352-3352`)
4b. `speaker-scene` (spec r1; `speaker-scene-seeds` is its cut 4c: CLI, inventory revision 3, cast speakers and scenes; `Party::Unnamed` covers an addressee with no entity; Speaker and Scene share one `SpeakerStateStore`): slots `Speaker` and `Scene` with their seed features; `weksa.speaker` (`speaker:<entity-slug>@<n>`) and `weksa.scene` (`scene:<group>@<n>`, participants and ordered-pair relations) documents with `Annotator` `Operator` and `Model { family, generator }`, validated by the packet's shared feature check, append-only per key; their stores, `weksa speaker` and `weksa scene` commands, published schemas; Model-annotated cast speakers and scenes for the committed items. Waits on 2d and 4; `pd-speaker-annotation` blocks only the public-domain annotator. Part 1 landed (branch `weksa-lowering/speaker-scene`): `speaker.rs`, `SpeakerStateStore`, slots `Speaker` and `Scene` exclusive to their own feature lists, `speaker_scene_revision()` (Speaker features 22-24), `with_scene` on a Scene document, schemas. The CLI, the committed inventory revision 3 and the seeds stay with 4c.
5. `language-ontology`: `weksa.community` from `data/cultural-ontology/` (owns follow-up `edda-referent-yaml-parse`), `weksa.ontology_entry` for en-US and ja-JP from `data/target-language-ontology/` (YAML deleted), speaker communities, deterministic `select`, the lowering view (packet without trace, speaker, scene, selected entries). Waits on 4.
6. `pd-importer`: public-domain play and fiction dialogue into the corpus with speaker, scene group, edition provenance, and Speaker and Scene annotations by the ruled annotator. Waits on 4, follow-up `gutenberg-terms` and question `pd-speaker-annotation`.
7a. `loop-context-builder`: `context.rs` (`TrainItems`, `EncoderOffer`, `Prompt`: corpus text reaches a model call only through `Prompt::mint` over live Train items or `Prompt::encode` over one offered item; instructions are `&'static str`), `SplitScheme::live`, `CorpusItem::cited_entities` (one owner of the id set `PacketStore::admit` and the offer share), and checkpoint-only Test readings (`Checkpoint`, `TestReadings`; `Aggregate` and `leak_diagnostic` carry no Test). Library only. Merges follow-ups `loop-context-builder-2` and `scorer-test-readings-type`. (spec r1)