276 lines
16 KiB
Markdown
276 lines
16 KiB
Markdown
# 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.
|
|
|
|
## 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).
|
|
|
|
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
|
|
|
|
### Shared documents and native composition
|
|
|
|
`--glossary-file PATH` accepts the shared `schema_version` and `collections`
|
|
envelope in YAML or equivalent JSON. One occurrence supplies a single file;
|
|
repeated occurrences supply multiple 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.
|
|
|
|
Retain the existing runtime composition model: compose the ordered runtime
|
|
sources and their imports, then apply the resulting shared data through native
|
|
application assignment. Preserve native entry-list replacement at that
|
|
assignment, unrelated configured collections, and native handling of omitted,
|
|
empty, and null values, subject to validity of the resulting document. Runtime
|
|
inheritance need not gain access to parents defined only in application
|
|
configuration, and application structural inheritance need not rerun after CLI
|
|
assignment. Do not introduce a separate Narratio merge or collision policy.
|
|
|
|
Use application configuration version 3 and its `glossary_collections` vocabulary
|
|
namespace as the implementation starting point. Validated shared collections
|
|
can be adapted into that consumer model; adopting the external contract does not
|
|
require renaming application fields. This is a simplification recommendation,
|
|
not a requirement to preserve an internal representation if adoption benefits
|
|
from changing it.
|
|
Automatic glossary companions should also use the shared envelope, with loading
|
|
adapted to its structure and existing native companion precedence. Use the same
|
|
acquisition path for all commands accepting runtime glossary files. Preserve the
|
|
shared representation where needed for validation or forwarding; processing
|
|
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, semantic rules, and completed-document
|
|
decoding profile. 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. Preserve them when forwarding a shared document; 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.
|
|
- Respect the upstream decoding profile, including duplicate mapping-key and
|
|
numeric-value handling. Check the actual ConfigKit/parser behavior at the
|
|
handoff rather than assuming that using the same YAML library proves
|
|
conformance. Resolve any substantive upstream gap explicitly instead of
|
|
silently accepting a narrower glossary format or adding a competing loader.
|
|
|
|
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 the completed-document boundaries and carry the
|
|
validated data into typed consumer views without losing required distinctions.
|
|
- 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.
|
|
- 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. 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. One shared file or multiple ordered shared files are accepted directly in YAML
|
|
or equivalent JSON, and 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. 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.
|
|
Include representative decoding-profile cases and verify that ordinary
|
|
validation needs no network access.
|
|
4. Repeated files, imports, inheritance, application vocabulary, overlays, and
|
|
CLI assignment follow native composition. Partial contributions can produce
|
|
a valid final document; 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
|
|
permitted 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.
|
|
|
|
## 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. An application vocabulary namespace redesign or
|
|
configuration-version migration is not needed merely to adopt shared files;
|
|
avoid adding that work without a concrete benefit. Migration guidance should
|
|
explain the shared envelope,
|
|
single and repeated runtime files, companion file changes, and retained
|
|
selection/composition behavior. 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.
|