# 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. Adopt the released ConfigKit-aligned glossary contract through its defined native loading boundary. ## 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 Adopt `glossary@0.2.0` from schemas distribution `2026.11.1`, whose tagged source is commit `f7e3cedeca11ed903311cdf29ca4d81fb1f216b7`. Its operator document marker remains `maximumdirect.glossary.v1`; it is distinct from both version numbers and from Audita's application configuration version. The marker alone does not identify the exact schema revision, so retain the explicit schema and distribution pins. Use the versioned schema and semantics together: - [Canonical schema](https://schemas.maximumdirect.net/glossary/v0.2.0/schema.json) and [semantics](https://schemas.maximumdirect.net/glossary/v0.2.0/semantics.md). - [Published source](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/glossary/v0.2.0), [inventory](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/catalog.json), [validation guide](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/validation.md), and [compatibility guidance](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/compatibility.md). The released semantics define ConfigKit v1.4.0's public mapping-root handoff as part of full conformance. Native acquisition and resolution precede JSON Schema validation and the applicable semantic checks. ConfigKit owns syntax, reserved controls, numeric binding, and resource limits; supported resolved values are preserved. Those rules are part of the selected contract, rather than exceptions to Audita's support. Audita already uses this ConfigKit version. Use this one selected published contract. Supporting older schema revisions is not required. The upstream developer validator's selection of the highest version in its local catalog does not change Audita's exact bundled pin or introduce runtime catalog discovery. 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. Native loading follows the ConfigKit boundary defined by the selected shared contract. - **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. File ordering, collection selection, and documented precedence are the operator-facing requirements. The particular ConfigKit calls used to achieve them are implementation choices. Reuse the two-load arrangement if it remains straightforward, or restructure it where that reduces complexity; forcing all inputs into one load is not an objective. 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 contract's native loading, structural schema, and semantic rules to completed shared data. 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. Structural schema validity alone does not establish full conformance; native loading and semantic checks are also part of the contract. Reuse the existing validation owners. ConfigKit's registered sequence identities provide exact string-ID uniqueness, including final-result checks; JSON Schema validation owns shared structural requirements. Audita owns processing readiness and any domain rule not already enforced by those mechanisms. Adapt native registrations to the selected paths and rely on them where they enforce the required semantics. Do not add a second handwritten glossary validator or repeat native uniqueness checks merely to give each requirement a local implementation. Extension retention applies wherever Audita actually exposes or forwards a shared document. It does not require an archive of loaded documents, a round-trip serializer, a new export interface, or a parallel representation retained solely for hypothetical forwarding. Module views can remain focused on useful vocabulary. The adopted [ConfigKit configuration reference](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/config.md) owns native behavior, including reserved controls and numeric representation. Link to that contract rather than reproduce its parser rules or introduce a custom parser, normalization workaround, arbitrary-precision codec, or fallback loader. Review future schema and ConfigKit updates deliberately against the selected contract. 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. Bundle the selected `glossary/v0.2.0/` assets from `2026.11.1` and use that version in maintained examples and references. - Adapt shared application acquisition, companion loading, runtime composition, and native sequence-identity selectors to the shared file envelope. Add schema validation at completed-document boundaries, reuse native identity checks, 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. Identify the selected contract and link its native ConfigKit boundary. 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. Verify that ordinary validation needs no network access and that native load failures use normal ConfigKit diagnostics. Tests should exercise the selected contract without adding broader parsing or numeric guarantees or turning upstream implementation details into 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, 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. Verify Audita's registration and schema integration at their boundaries without copying ConfigKit's parser or identity test suites, and retain distinct task-readiness coverage. ## 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 the selected contract's native loading boundary. 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.