From 4f68fb27d9a86b8b99f2c3df81ad479ef70fe28c Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Fri, 27 Nov 2026 15:14:05 +0000 Subject: [PATCH] Clarify empty glossaries and validation after composition --- docs/roadmap/audita.md | 72 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/docs/roadmap/audita.md b/docs/roadmap/audita.md index 93b64c7..b67a3a3 100644 --- a/docs/roadmap/audita.md +++ b/docs/roadmap/audita.md @@ -38,8 +38,8 @@ The separate [D&D recipe repository][recipes] was also reviewed at commit against v4.2.0. Its README still describes the runtime interface as unreleased; updating that upstream statement is a documentation follow-up, not an adapter dependency. There is no remaining upstream feature blocker for the glossary -handoff or synthetic-transcript preflight. The Open Decisions below concern the -remaining configuration-contract choices. +handoff or synthetic-transcript preflight. The final section identifies remaining +implementation-planning work. ## Current Narratio Behavior @@ -182,11 +182,19 @@ Use these fields in the new configuration contract: | --- | --- | --- | | Application/pipeline | `reference_catalog.settings` | Map of setting IDs to entry-file paths. | | Application/pipeline | `reference_catalog.systems` | Map of system IDs to entry-file paths. | -| Campaign/session | `inputs.setting` | Selected setting ID. | -| Campaign/session | `inputs.system` | Selected system ID. | +| Campaign/session | `inputs.setting` | Optional selected setting ID. | +| Campaign/session | `inputs.system` | Optional selected system ID. | | Campaign/session | `inputs.glossary_file` | Optional external named-collection file supplying `campaign`. | | Campaign/session | `inputs.glossary` | Optional inline collection supplying `campaign`. | +After campaign/session selection, omitted setting or system selections produce +empty `setting` or `spells` collections. If neither campaign vocabulary form is +supplied, prepare an empty `campaign` collection. All four prepared identities +remain present; the canonical party roster is still required. Explicitly selected +catalog IDs and files must resolve successfully and supply the expected named +collection. Do not turn a missing or invalid selected source into an empty result. +Empty collections are valid; Audita owns processing sufficiency checks. + Resolve catalog paths and `glossary_file` relative to their defining sources, including imported fragments. External files use the canonical named-collection document shape, not a bare collection or a legacy glossary. Their native imports @@ -261,12 +269,37 @@ The prepared campaign retains the instruction and harbor entry, and replaces the complete watch entry with the inline Silver Watch record, including removal of the old alias. A session setting `inputs.glossary` to `{instruction: "Session context."}` replaces the campaign inline contribution: -the file's Old Watch and -North Harbor remain, with the session instruction. A session overriding only +the file's Old Watch and North Harbor remain, with the session instruction. +A session overriding only `inputs.glossary_file` instead uses that file beneath the inherited Silver Watch inline contribution. These are explicit field selections followed by native layered composition, not an additional campaign/session merge policy. +An inline `entries: []` contributes no records under native default upsert; it +does not clear the file's entries. To use replacement instead, place this native +control at the root of the selected `vocabulary.yml`, alongside `campaign`: + +```yaml +config: + sequences: + - destination: [campaign, entries] + mode: replace +``` + +That explicit lower-tier mode persists into the inline tier under ConfigKit's +rules. A session can then clear the file's entries with: + +```yaml +inputs: + glossary: + entries: [] +``` + +The result retains the collection's instruction with an empty entries list. +This control belongs to the glossary load, not the outer campaign/session +configuration load. Do not add a Narratio-specific clearing flag or treat empty +lists as replacements when native collection policy says otherwise. + ### Shared input identities and cutover Prepare each collection as a standalone named-collection document: @@ -316,13 +349,17 @@ interpretation and processing rules. Start with Audita's existing wrapperless mapping of collection names to collections. Define a reusable collection schema with `entries` and optional `instruction`; entries retain native `id`, `name`, `category`, optional fields, -and supported extensions. Reuse that schema for inline campaign vocabulary, -individual collections, and documents containing multiple collections. The four +and supported extensions. Reuse field definitions for partial authoring inputs, +and the complete collection schema for resolved individual collections and +documents containing multiple collections. The four Narratio roles do not restrict the names allowed by the general format schema. Validate decoded YAML data against JSON Schema after ConfigKit resolves imports, -inheritance, and composition. Do not require every authored fragment to satisfy -the complete-document schema. Integrate validation with shared acquisition and +inheritance, and final file/inline composition. Partial contributions, including +an inline collection containing only `instruction`, are allowed; do not validate +them as complete collections before combining them. Complete prepared collections +have an `entries` list, which may be empty; do not impose a nonempty-list rule. +Integrate validation with shared acquisition and preparation paths using existing library capabilities. Retain semantic checks where needed, such as entry-ID uniqueness within a collection; schema validity alone does not establish processing readiness. @@ -539,7 +576,7 @@ own empty debug directory under that scope's design. When implemented, update the Audita integration contract, polish internals, configuration/examples, preflight internals, and operator guidance. Describe the -shared Audita and Notarius configuration/overlay development workflow with upstream links rather +Audita and reference-catalog development workflow with upstream links rather than duplicating library manuals. Update the workspace roadmap's outdated upstream-request description when the coordinated work lands: v4.1 already supports independent report and debug destinations. @@ -561,7 +598,10 @@ ordered/repeated processing where applicable, and native root/per-entry selector precedence without inventing a Narratio precedence rule. Exercise the authoring example's relative imports, whole-record entry upsert, -and independent session field replacements through ConfigKit. Verify the retired +native replacement clearing, and independent session field replacements through +ConfigKit. Cover empty collections from omitted selections, failures for invalid +selected sources, and complete validation after partial contributions compose. +Verify the retired monolithic source is not aliased, the four new source bindings resolve prepared manifest evidence, and retained roster/player/spell-overlay contracts stay intact. @@ -656,11 +696,15 @@ calls remain explicit integration runs, not ordinary catalog tests. [catalog]: https://forge.maximumdirect.net/eric/narratio-reference-catalog -## Open Decisions +## Remaining Implementation-Planning Work The catalog model, authoring fields, native file/inline composition, session selection behavior, and shared input cutover are settled. The minimal catalog bundle and canonical schema still need to be authored and checked against the -contract above. Package mechanics, schema packaging, and any demonstrated +contract above. Exercise Narratio's complete acquisition path with the authoring +examples; the focused ConfigKit probe establishes the layering primitives only. +Specify validation's destination probes when no execution run exists, using the +relevant workspace location without creating a processing attempt or advancing +latest-attempt views. Package mechanics, schema packaging, and any demonstrated consumer-specific projections belong in implementation planning, not further product-scope decisions.