Document shared glossaries and downstream preflight

This commit is contained in:
2026-11-27 17:09:21 +00:00
parent 8b9c0e664b
commit 0de73ba25f
22 changed files with 297 additions and 300 deletions

View File

@@ -124,10 +124,10 @@ remote state with an unsafe legacy identity must be migrated before use.
Explicit null optional stage sections stay absent, while required sections
fail validation.
- Campaign and session identities must agree.
- Required stable files (`speakers_file`, `autocorrect_file`, `glossary_file`,
`party_file`) are campaign-owned; the first three may be overridden by the
session. The optional `spell_catalog_file` also inherits a campaign value
when omitted by the session.
- The campaign supplies required speakers, autocorrect, and canonical party
files. Sessions may independently override speakers and autocorrect.
Optional glossary selections and the separate spell overlay inherit as
described under [glossary inputs](#glossary-inputs).
- The selected party is parsed when domain context or party inspection needs
it. It must be a versioned [canonical party](integrations/party.md). The
campaign supplies its default file; an explicit CLI selection replaces it
@@ -279,6 +279,8 @@ Rules:
| Field | Type | Required | Default / Rule |
| --- | --- | --- | --- |
| `config.imports` | list | No | native source-root import selections; see [imports and overlays](#pipeline-imports-and-overlays) |
| `pipeline.reference_catalog.settings` | map[string]string | No | setting IDs to source-relative vocabulary files |
| `pipeline.reference_catalog.systems` | map[string]string | No | system IDs to source-relative vocabulary files |
| `pipeline.workspace.root` | string | No | `/var/lib/narratio` |
| `pipeline.workspace.cleanup_after_publish` | bool | No | `false`; selects the published run's workspace target for final cleanup and requires effective `pipeline.publish.enabled=true` and `pipeline.publish.upload_run=true` |
| `pipeline.campaigns.root` | string | No | `/usr/local/share/narratio/campaigns` |
@@ -319,7 +321,6 @@ Rules:
| `pipeline.audita.binary` | string | No | `audita` |
| `pipeline.audita.timeout` | duration | No | `3h` |
| `pipeline.audita.credentials[]` | list[secret reference] | No | empty; exact environment-variable names forwarded to Audita |
| `pipeline.audita.modules[]` | list[string] | No | unset; omit to use Audita defaults, set `[]` for no modules |
| `pipeline.audita.overlay` | string | No | empty; no downstream overlay override |
| `pipeline.audita.proposal_profile` | string | No | empty; no downstream proposal-profile override |
| `pipeline.audita.validation_profile` | string | No | empty; no downstream validation-profile override |
@@ -368,29 +369,20 @@ Rules:
### Audita Selection and Credentials
`pipeline.audita.config_path` optionally passes an Audita v2 configuration file;
when empty, Audita uses its own native config discovery. `overlay`,
`proposal_profile`, and `validation_profile` are independent, optional Audita
selectors. Empty or omitted strings add no command-line override. Narratio's
selected pipeline overlay is never inferred as an Audita overlay, and Narratio
does not create or validate Audita's backend or PromptKit profile files. Prepare
them with [Audita's v2 migration guide](https://gitea.maximumdirect.net/eric/audita/src/tag/v2.0.0/docs/migrations/v2.md).
`pipeline.audita.config_path` optionally selects an Audita v4.2 configuration;
otherwise Audita uses native discovery. `overlay`, `proposal_profile`, and
`validation_profile` independently select downstream settings. Empty values
add no override. Narratio does not create Audita configuration or infer its
selectors from a Narratio overlay. Configure the ordered Audita pipeline in
Audita itself; the retired `pipeline.audita.modules` field is rejected. See
[Audita's configuration guide](https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md)
and the [integration contract](integrations/audita.md).
Omit `modules` or set it to `null` to use Audita's configured default sequence.
Set `modules: []` to run no correction modules. A nonempty list is passed in
order, including repetitions. Narratio does not add a reporting or debug flag;
Audita's external configuration controls those settings.
`pipeline.audita.credentials` lists secret-reference names, not values. Narratio
resolves every listed name during pipeline loading and forwards the captured
nonempty value under that exact name to Audita. It does not inspect Audita's
configuration to discover names or map them to aliases. Audita v2 resolves
credentials for **all configured backends**, even ones not selected by the
current profiles: list every named backend credential in the selected Audita
configuration. An unauthenticated backend needs no reference. Omission, `null`,
or `[]` forwards nothing. A Narratio overlay replaces the entire list, and
`[]` clears it. See the [Audita integration contract](./integrations/audita.md)
for the subprocess and redaction boundary.
`pipeline.audita.credentials` contains exact environment-variable references,
not values. Narratio resolves each name at pipeline load and forwards its value
under the same name. Supply every credential required by the selected Audita
configuration. Omission, `null`, or `[]` forwards nothing; a Narratio overlay
replaces the list. Captured diagnostics redact those values.
<a id="notarius-configuration-profile"></a>
@@ -479,14 +471,17 @@ Narratio source, not to a filesystem path:
```yaml
notarius:
references:
glossary: narratio.input.glossary
glossary: narratio.input.glossary.campaign
party: narratio.input.party
players: narratio.input.players
spell_catalog: narratio.input.spell_catalog
```
Supported sources are `narratio.input.party`, `narratio.input.players`,
`narratio.input.glossary`, and `narratio.input.spell_catalog`. Each map entry is
`narratio.input.glossary.party`, `narratio.input.glossary.campaign`,
`narratio.input.glossary.setting`, `narratio.input.glossary.spells`, and
`narratio.input.spell_catalog`. The retired `narratio.input.glossary` is not an
alias; update each binding explicitly. Each map entry is
required by its presence: omit a binding when the selected Notarius pipeline
does not need it. A spell-catalog binding additionally requires an effective
campaign or session `spell_catalog_file`.
@@ -665,10 +660,42 @@ integration.
| `session_template_file` | string | No | used by `session init` when set |
| `inputs.speakers_file` | string | Yes | stable input default |
| `inputs.autocorrect_file` | string | Yes | stable input default |
| `inputs.glossary_file` | string | Yes | stable input default |
| `inputs.setting` | string | No | selected setting ID in `reference_catalog.settings` |
| `inputs.system` | string | No | selected system ID in `reference_catalog.systems` |
| `inputs.glossary_file` | string | No | campaign vocabulary file |
| `inputs.glossary` | mapping | No | inline campaign collection contribution |
| `inputs.party_file` | string | Yes | stable campaign party source; relative paths resolve from their defining source |
| `inputs.spell_catalog_file` | string | No | optional spell-catalog overlay default; required when a Notarius reference selects `narratio.input.spell_catalog` |
### Glossary Inputs
Install an independently selected catalog locally and import its `catalog.yml`
into the pipeline; [the example](../examples/pipeline.catalog.yml) uses a small
synthetic bundle. Catalog IDs map to file paths relative to their defining
configuration sources. Only selected files are read; an unknown selected ID is
an error. Catalog files and their native imports are resolved with ConfigKit.
Campaigns can select `setting`, `system`, `glossary_file`, and inline `glossary`
independently. Session omissions inherit each campaign value independently;
null or empty optional selectors clear that selection. Session inline data
replaces the campaign inline contribution as a whole, and explicit null removes
it. The selected campaign file is composed below the effective inline
contribution using native ConfigKit entry identity and list controls.
Files contain named collections: campaign files provide `campaign`, selected
setting files provide `setting`, and system files provide `spells`. Preparation
derives `party` from the canonical roster and writes all four collections, even
when empty. The [catalog format](https://forge.maximumdirect.net/eric/narratio-reference-catalog/src/branch/main/FORMAT.md)
owns the shared schema; [examples](../examples/README.md#campaign-and-session-configuration)
show file-only, inline-only, and combined authoring. The former standalone
glossary format is not converted automatically.
All four prepared entry lists are supplied to Audita and replace the matching
Audita-configured lists, including when empty. Other collections and omitted
instruction fields follow Audita's native composition. The canonical roster,
players projection, and optional Notarius spell-catalog overlay remain separate
inputs. Configuration inspection preserves authored selections and inline data.
### Session
| Field | Type | Required in session file | Notes |
@@ -680,7 +707,10 @@ integration.
| `title` | string | No | metadata |
| `inputs.speakers_file` | string | No | overrides campaign stable input |
| `inputs.autocorrect_file` | string | No | overrides campaign stable input |
| `inputs.glossary_file` | string | No | overrides campaign stable input |
| `inputs.setting` | string | No | independently overrides the campaign setting selection |
| `inputs.system` | string | No | independently overrides the campaign system selection |
| `inputs.glossary_file` | string | No | independently overrides the campaign vocabulary file |
| `inputs.glossary` | mapping | No | replaces the campaign's inline contribution |
| `inputs.spell_catalog_file` | string | No | omission inherits the campaign spell catalog; an explicit empty string clears this optional input |
| `inputs.audio_dir` | string | Conditional | local audio mode |
| `inputs.audio_files[]` | list[string] | Conditional | local audio mode |