# Shared Glossary Adoption **Status:** Targeted for Audita v4.3.0. ## Purpose Adopt the Maximum Direct shared glossary contract so Narratio can pass prepared vocabulary directly to Audita, and operators can reuse that vocabulary with Notarius and relevant Scriptorium prompts without requiring duplicate vocabulary files. This roadmap responds to the [Narratio feature request](narratio-shared-glossary-feature-request.md). It defines the target and work areas; a subsequent implementation plan will specify ordered implementation steps. The user's subsequent direction governs release selection and scope: release as v4.3.0, expect standard-schema glossary files, support one or multiple files, and spend no effort preserving glossary-file instruction workflows. Initial shared-schema support is partial, bounded by the capabilities of the adopted ConfigKit version. ## Current Baseline The baseline is Audita v4.2.0, with the feature request recorded at repository commit `4c2b11aa45579d89f04ac2ab4903c7cb036bef72`. - Application configuration uses version 3. `glossary_collections` contains named collections with `entries` and an optional executable `instruction` string. Automatic `glossary.yml` and recursive `glossary/` YAML companions supply wrapperless collections through ConfigKit imports. - Repeated `--glossary-file` arguments compose wrapperless YAML mappings in a preliminary ConfigKit load, in argument order, using native imports, inheritance, and entry identities. The resolved mapping becomes one CLI assignment to `glossary_collections` in the application load. Supplied entry lists replace configured lists at that boundary; unrelated configured collections and omitted fields remain subject to native assignment semantics. - Runtime collection instructions currently reach proposal prompts and remain in correction-repair conversations. Entry extensions are accepted, but the collection type does not represent arbitrary collection extensions or defined provenance. There is no shared envelope or shared-schema validation boundary. - Typed validation checks several glossary values, but does not fully express shared required-field and null distinctions. Selection also deduplicates collection/entry identities; that is not a substitute for validating completed shared inputs. - Root and per-stage `glossaries` and `protected_terms` select vocabulary independently. Loading collections does not select them. Glossary correction requires at least one selected entry at processing readiness; empty collections remain valid configuration. - Processing, standalone preflight, and native configuration-consuming commands share application acquisition. Preflight and processing share local readiness planning; native inspection does not require a processing-ready pipeline. The current [input](../integrations/transcript-glossary-files.md), [configuration](../config.md), and [CLI](../cli.md) documents own the implemented contracts. Main implementation boundaries are `internal/appconfig`, `internal/core/config`, `internal/core/glossary`, framework preflight and prompt context, and CLI acquisition. ## Target Upstream Contract Target `glossary@0.1.0` from schemas distribution `2026.11.0`, whose tagged source is commit `1b8430bdcbf04eb98c8d45c98a1cb986a9e6d477`. The operator document marker is `maximumdirect.glossary.v1`; it is distinct from both version numbers and from Audita's application configuration version. Use the versioned schema and semantics together: - [Canonical schema](https://schemas.maximumdirect.net/glossary/v0.1.0/schema.json) and [semantics](https://schemas.maximumdirect.net/glossary/v0.1.0/semantics.md). - [Published source](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/glossary/v0.1.0), [inventory](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/catalog.json), [validation profile](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/docs/validation.md), and [compatibility guidance](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/docs/compatibility.md). The supported input range is the intersection of this shared contract and what ConfigKit can parse, compose, and decode. A schema-valid document may therefore remain unsupported because of a native ConfigKit limitation. Full compatibility with the upstream YAML decoding profile is not required for this adoption. Audita should describe this as partial support rather than claim unrestricted shared-schema conformance. Bundle the selected glossary schema and adjacent semantic document from that distribution, with their provenance and applicable licensing material. Register the schema locally so ordinary validation works offline. No schema-registry lookup, moving latest inventory, or dependency on the schemas repository's internal Go validation harness is needed. Audita already imports JSON Schema and YAML libraries; assess their use at the existing adapter boundary before adding a dependency. Party and campaign schema adoption is outside this work. ## Targeted End State ### Three separate boundaries - **Operator-provided glossary files:** Use the shared envelope and its collection and entry definitions. There is no legacy glossary-file compatibility requirement. The ConfigKit limits described below bound which otherwise valid shared documents Audita can consume. - **Application configuration:** Plan additive changes where needed. Existing collection-selection settings already refer to names independently of how collections are distributed across files. Supporting the shared file format does not require a new application configuration namespace or version. - **Internal representation:** Choose the simplest maintainable representation, acquisition flow, and module-facing views. Existing Go types and loading phases have no compatibility requirement. A one-way projection into processing views is appropriate when useful; there is no need to retain a legacy vocabulary model or build conversion machinery to preserve it. ### Shared documents and native composition `--glossary-file PATH` accepts the shared `schema_version` and `collections` envelope in ConfigKit-supported YAML or equivalent JSON. Support one file with one or multiple collections, several files each containing one collection, and mixtures of files containing different numbers of collections. One flag occurrence supplies a single file; repeated occurrences supply files composed in argument order. Preserve paths relative to the invocation working directory and separate collection-selection controls. Narratio's prepared document needs no envelope removal or field renaming. Replace the standalone wrapperless file format directly; a legacy reader or conversion mode is not required. ConfigKit continues to own imports, layering, inheritance, entry identities, presence, overrides, and source evidence. Authoring fragments can contribute to a completed document without independently satisfying the complete schema. Validate completed shared documents at the composition boundary, before a typed projection can erase invalid field types or presence distinctions. Do not fill missing required shared fields merely to make a supplied document pass. Use ConfigKit's ordered layers for complete selected documents. Their repeated `schema_version` values must not be forced into a strict peer-import group, where ConfigKit would reject overlapping scalar definitions even when equal. Authoring fragments can still use native imports and their normal strict composition rules. Automatic glossary companions should also use the shared envelope; adapt their acquisition to complete-document layering rather than preserve the current import grouping mechanically. Preserve the runtime vocabulary's CLI priority over configured vocabulary, native entry-list replacement at the CLI assignment boundary, unrelated configured collections, and native handling of omitted, empty, and null values, subject to validity of the resulting shared data. No additional cross-source inheritance behavior or Narratio-specific merge policy is required. The current preliminary-load/final-load arrangement is an implementation starting point, not a required sequence of internal operations. Application configuration version 3 and its `glossary_collections` namespace remain the public starting point. Refactor the internal representation freely to avoid duplicate glossary models or awkward adapters. Use shared acquisition for all commands accepting runtime glossary files, and retain shared data where needed for validation or forwarding. Module-facing views may project only the fields they use. Shared inputs are domain data. An extension named `instruction` has no executable meaning. No consumers rely on instructions supplied through glossary files, so this work includes no instruction-compatibility machinery, replacement instruction map, or instruction-migration project. Ordinary application prompt configuration continues to own task instructions. ### Contract conformance and task readiness Apply the pinned structural schema and semantic rules to completed shared data within ConfigKit's supported input range. In particular: - Preserve the contract's required-field, omitted, null, and empty distinctions, including nullable aliases and plural forms. Do not trim, case-fold, coerce, or default shared values as a schema-repair step. - Accept permitted extensions at envelope, collection, provenance, and entry levels when their values are supported by ConfigKit. Retain those extensions when forwarding a shared document, subject to native value representation; internal task views can select only the fields they use. Acceptance does not imply interpretation, and serialization formatting need not be preserved. - Reject duplicate entry IDs within a completed collection using exact string comparison. IDs can repeat across different collections. Do not add uniqueness requirements for display names, aliases, or categories, or confuse legitimate native layering of an identity with duplicate final entries. - Use ConfigKit's parsing and decoding behavior, including its native failure diagnostics, rather than implementing the upstream harness's broader YAML profile locally. Schema validity alone does not override native limitations. Known differences in the currently adopted ConfigKit v1.4.0 include rejection of YAML anchors/aliases and some shared-profile scalar spellings, such as unquoted `yes` as a string. Generic numeric decoding is also bounded by native integer ranges and floating-point precision rather than the shared profile's precision-preserving number representation. The adopted [ConfigKit configuration reference](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/config.md) owns native behavior. Document the relevant limitations without adding a custom YAML parser, normalization workaround, arbitrary-precision codec, or fallback loader in Audita. An upstream fix is pending; it is not a prerequisite for this release. Future upstream changes can expand support without making today's limitations permanent Audita restrictions. Keep schema validity separate from Audita task readiness. Empty collections and an empty collection map are valid shared data. A selected glossary-correction stage still requires at least one selected entry; a selected missing collection still fails. Loading vocabulary does not select all collections. Preserve root and stage selection resolution, default protection derivation, and the glossary stage's active-spelling exemption. Collections and categories remain domain-defined strings. `party`, `campaign`, `setting`, and `spells` are Narratio conventions, not mandatory names or a fixed enumeration. Provenance is source metadata, not transcript evidence or processing guidance. Notarius-specific spell extensions can be accepted without being used. Shared-data identity and correction matching have different purposes. Exact ID validation does not require replacing Audita's existing spelling matching, protection, or editorial acceptance behavior with exact-string matching. ### Preflight and inspection Preflight and processing accept the same effective vocabulary, apply the same collection selections, and detect malformed shared documents, unsupported markers, missing selections, and determinable task-input failures before correction calls. Processing still checks its actual transcript and inputs. Narratio can continue to preflight its real prepared glossary files with a known-good synthetic transcript through the ordinary command. This adds no fixture mode or guarantee about a later transcript. Preserve existing provider smoke checks, local-only preflight, output-readiness behavior, and reporting scope. Native effective configuration, explanation, comparison, and other commands that accept glossary files use the shared acquisition semantics. Comparison continues to apply the same runtime file list to both sides. Inspection validates shared data but need not meet processing-only readiness requirements or contact a model. Preserve source paths needed for output collision checks, including imports. Diagnostics should identify an affected file, collection, or field where practical through existing native reporting; a new error taxonomy or report protocol is not part of adoption. ## Work Required - Incorporate the pinned contract assets and provenance. Add the appropriate component entry and license material under the [OSS policy](../policy/oss.md) when copying the upstream assets; the selected original material is CC0-1.0. - Adapt shared application acquisition, companion loading, runtime composition, and native sequence-identity selectors to the shared file envelope. Add structural and semantic validation at completed-document boundaries within ConfigKit's supported range, and derive consumer views after those checks. Refactor internal types and loading flow where that simplifies implementation. - Retain shared acquisition for processing, preflight, and configuration-consuming native commands. Treat glossary-file extensions as data without adding an instruction-preservation workflow. - Update glossary selection and protection integration for the new representation while preserving their existing behavior. Preserve source evidence and output collision protection across the adapted load path. - Replace maintained wrapperless glossary-file examples with shared inputs. Include a generic-domain example and a Narratio-style composition without requiring access to another application's installation. Cover single-file multi-collection and multiple-file arrangements. - Update the canonical [input contract](../integrations/transcript-glossary-files.md), [configuration](../config.md), [CLI](../cli.md), affected internal guides, and examples. Link upstream for schema and library definitions; document locally the Audita-specific mounting, precedence, selection, and readiness behavior. Clearly label partial support and native ConfigKit limitations. Update the deferred Narratio adoption description when this work lands. - Write migration guidance and release documentation for the intentional cutover. Retire superseded glossary-file format handling rather than adding compatibility shims, automatic legacy conversion, or a second operator-maintained vocabulary. These are work areas, not implementation stages. No package layout, additional framework, exact parser sequence, or intermediate compatibility mechanism is prescribed by this roadmap. ## Verification and Acceptance Use focused offline tests at the owning boundaries and representative assembled workflows under the [testing policy](../policy/testing.md). Control any model boundary; real Narratio, Notarius, or paid providers are not prerequisites. Evidence should establish that: 1. ConfigKit-supported shared YAML and equivalent JSON are accepted directly for one file with one collection, one file with multiple collections, multiple single-collection files, and mixed arrangements. Selected entries reach correction and protection views. Generic collections work, and unrelated collections need not exist or be selected. 2. A representative shared spell document can be consumed without an Audita-only vocabulary copy. Defined provenance and irrelevant permitted extensions are accepted within ConfigKit's value support. This demonstrates Audita's boundary, not completion of another application's adoption. 3. Required fields, nullable and empty cases, malformed known fields, unsupported markers, and exact final entry-ID uniqueness follow the adopted contract. Use representative cases within ConfigKit's supported range and verify that ordinary validation needs no network access. Schema-valid inputs unsupported by ConfigKit can fail with normal native diagnostics; tests must not require broader parsing or numeric support, or freeze those upstream limitations as permanent application behavior. 4. Repeated files, imports, inheritance, application vocabulary, overlays, and CLI assignment follow native composition. Partial contributions can produce a valid final document. Multiple complete files do not fail merely because they repeat the shared marker. Identity layering and invalid duplicate final entries are tested as distinct cases. 5. Permitted shared extensions remain data, including an extension named `instruction`; accepting a shared document does not promote them to executable prompt guidance. No legacy glossary-instruction behavior is a test requirement. 6. Empty shared data can be inspected; processing-only missing or empty glossary selections fail before correction calls in both preflight and processing. Native inspection and comparison expose consistent effective inputs, with supported extensions retained when exposing a shared document. 7. Maintained examples, supported-contract identification and limitations, migration guidance, and source/attribution records match the delivered interface. Existing transcript and corrected-output formats remain unchanged by this adoption. Consolidate coverage where one behavioral test protects multiple cases. Tests should not freeze incidental loader call order, private Go types, diagnostic wording, or formatting of preserved data. ## Compatibility and Scope The next release is **Audita v4.3.0**, by the user's explicit decision, regardless of compatibility changes or the existing SemVer policy. That direction takes precedence over the usual version-selection rules for this release. Document the glossary-file cutover and required consumer changes in its release notes; this decision does not establish a general exception for later releases. Retain the `/v4` Go module path. Expect additive application configuration changes where needed; the shared file format does not by itself require replacing existing public configuration fields or advancing configuration version 3. Internal representations and module interfaces can change freely as part of adoption. Migration guidance should explain the shared envelope, single and repeated runtime files, companion file changes, composition/selection behavior, and partial-support limits. No glossary-file instruction migration is required. Narratio's adapter migration and the separate `audita-pipelines-dnd` recipe updates belong to their own repositories and can target the resulting released interface. This work does not change transcript schemas, correction strategy, validator acceptance, retry or repair budgets, chunk scheduling, report formats, or provider readiness responsibilities. Forwarding extensions does not require adding a new export command. These boundaries keep adoption focused; they are not permanent prohibitions on later features.