Simplify glossary adoption for v4.3.0

This commit is contained in:
2026-11-29 15:34:04 +00:00
parent 0b9c7912c2
commit 5a842f6a7f

View File

@@ -1,17 +1,20 @@
# Shared Glossary Adoption
**Status:** Proposed; application configuration layout and version remain open below.
**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. Separate reusable domain data from
Audita's correction instructions without requiring duplicate vocabulary files.
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 after the open decisions are resolved.
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
@@ -79,9 +82,12 @@ adding a dependency. Party and campaign schema adoption is outside this work.
### Shared documents and native composition
`--glossary-file PATH` accepts the shared `schema_version` and `collections`
envelope in YAML or equivalent JSON. Preserve repeated arguments, paths relative
to the invocation working directory, and separate collection-selection controls.
Narratio's prepared document needs no envelope removal or field renaming.
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
@@ -99,34 +105,23 @@ 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.
The recommended application layout is a shared envelope under `glossary`, with
shared companion documents mounted there and Audita instructions stored
separately. This layout, including its effect on inline configuration, is the
open decision below. Whichever layout is selected, validate the effective shared
vocabulary before deriving processing views and use the same acquisition path
for all commands accepting runtime glossary files.
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.
### Configuration-owned instructions
Provide an application-owned instruction map keyed by collection name; the
recommended field is `glossary_instructions`. A configuration can attach guidance
to `spells`, for example, without containing or copying any spell entries.
Ordinary ConfigKit configuration, overlays, inheritance, and overrides govern
these settings. The map is independent of shared vocabulary assignment.
Retain existing prompt behavior for configured guidance: selected context
collections contribute their instructions in selection order, protection-only
collections do not contribute instructions, and guidance remains available
during correction repair. Instructions do not become deterministic validation
rules. A configured instruction association alone does not require its collection
to be present or selected; existing task selections determine required vocabulary.
A shared extension named `instruction`, at collection or entry level, is inert
domain data. It cannot supply, replace, or clear configured guidance. Preserve it
where a shared document is retained or forwarded, while allowing prompt-specific
views to omit it. Move existing executable collection instructions into application
configuration as part of migration. This separation does not promise that an LLM
can never misinterpret arbitrary domain text.
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
@@ -192,27 +187,26 @@ not part of adoption.
- 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 mounting, runtime composition,
and native sequence-identity selectors to the selected layout. Add structural
- 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.
- Separate configured instructions from vocabulary and update selected prompt
context and repair wiring. Retain one shared implementation for processing,
preflight, and configuration-consuming native commands.
- 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 examples and embedded-instruction examples with
shared inputs and configuration-owned instruction associations. Include a
generic-domain example and a Narratio-style composition without requiring
- 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, readiness, and guidance
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 format handling rather than adding compatibility shims,
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
@@ -226,9 +220,9 @@ 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. Equivalent shared YAML and JSON documents are accepted directly, and selected
entries reach correction and protection views. Generic collections work, and
unrelated collections need not exist or be selected.
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
@@ -241,9 +235,9 @@ Evidence should establish that:
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. Configured instructions survive vocabulary replacement, reach the selected
proposal and repair context, and can be changed through native configuration.
Shared `instruction` extensions neither supply nor clear guidance.
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
@@ -258,17 +252,19 @@ wording, or formatting of preserved data.
## Compatibility and Scope
Plan an intentional breaking release. The recommended application-layout change
breaks existing valid configurations, so a new major release is appropriate under
the [release policy](../policy/release.md). Follow the existing major-module
migration steps in the [release runbook](../release.md) when preparing that release.
The shared document generation does not itself dictate Audita's configuration
version; set any application version change deliberately when finalizing the
layout rather than matching unrelated version numbers.
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.
Migration must explain the shared envelope, retained runtime flag, companion
format and inline configuration changes, instruction relocation, and retained
selection/composition behavior. Narratio's adapter migration and the separate
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.
@@ -277,46 +273,3 @@ acceptance, retry or repair budgets, chunk scheduling, report formats, or provid
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.
## Open Decisions
### Should the shared envelope also become the application vocabulary format?
**Recommendation:** Replace operator-facing `glossary_collections` with a shared
envelope under application `glossary`. Mount automatic shared glossary companions
at that namespace and assign composed runtime shared data there through native
CLI overrides. Keep instructions in the separate `glossary_instructions` map,
and retain root/stage `glossaries` and `protected_terms` as selections. This
provides one vocabulary contract across runtime files, companions, inline
configuration, and effective inspection, preserves envelope-level extensions,
and reduces parallel validation and translation paths. It requires a broader
configuration/example migration, which fits the requested direct cutover.
**Viable alternative:** Adopt the envelope only at external glossary-file
boundaries, project its validated collections into the existing application
vocabulary model, and keep configured instructions isolated from that projection.
This reduces changes to inline application configuration and existing selections.
It also retains two public vocabulary representations and needs explicit handling
for envelope metadata, extension preservation in shared-document views, and
validation differences between inline and shared data. It is viable if minimizing
configuration churn outweighs the maintenance benefit of a unified model; the
unified approach is preferred for long-term consistency.
### Should the recommended layout advance the application configuration version?
**Recommendation:** If the unified layout is selected, advance Audita's
application configuration version from 3 to 4. Update the existing native version
check and migration guidance for the new shape, preserving the current ability
to omit the version and use the current schema. This makes explicitly versioned
old configurations fail with a useful migration diagnostic and gives the
application-format change a clear identity. It adds a small migration step; it
does not require a legacy reader or imply any relationship to the shared marker
or Audita's release major.
**Viable alternative:** Retain application configuration version 3 and document
the new layout as part of the breaking Audita release. This avoids changing
version declarations and is feasible because the application supports one
current configuration shape. However, the same explicit version would describe
incompatible layouts, making wrong-version diagnostics less useful. If adoption
is limited to external files and the application shape remains unchanged, keeping
version 3 is preferable to advancing it solely for a new external document format.