Document the shared pipeline and verify the cutover
This commit is contained in:
208
docs/config.md
208
docs/config.md
@@ -146,7 +146,7 @@ shows a complete Narratio configuration. Only the pipeline selects an overlay;
|
||||
Narratio validates the resulting effective domain entries.
|
||||
|
||||
Relative host-resource paths, including integration configuration files,
|
||||
workspace/campaign/spool/cache roots, campaign template and stable inputs, and
|
||||
workspace/campaign roots, campaign template and stable inputs, and
|
||||
session stable inputs and local audio references, resolve from the effective
|
||||
value's defining source. Inherited values follow their origin. When no distinct
|
||||
usable source context exists, the main source is the fallback; if it too is
|
||||
@@ -157,8 +157,8 @@ IDs, and binary names retain their domain meanings.
|
||||
The effective digest excludes source layout, overlay identity, and secret values;
|
||||
credential reference names and resolved resource paths participate. Prepared
|
||||
campaign, session, and party documents contain effective standalone values rather
|
||||
than authored import directives. Session fields omitted by the author remain
|
||||
eligible to inherit the receiving campaign's values.
|
||||
than authored import directives. A prepared session snapshot carries the resolved
|
||||
values used for that session; retain authored files for future edits.
|
||||
|
||||
### Upgrade from earlier configuration
|
||||
|
||||
@@ -194,12 +194,12 @@ whisperx:
|
||||
`campaign.yml`
|
||||
|
||||
```yaml
|
||||
campaign_id: sample-campaign
|
||||
inputs:
|
||||
speakers_file: ./speakers.yml
|
||||
autocorrect_file: ./autocorrect.yml
|
||||
glossary_file: ./glossary.yml
|
||||
party_file: ./party.yml
|
||||
schema_version: maximumdirect.rpg.campaign.v1
|
||||
id: sample-campaign
|
||||
references: {party: ./party.yml}
|
||||
narratio:
|
||||
inputs:
|
||||
speakers_file: ./speakers.yml
|
||||
```
|
||||
|
||||
`session.yml` (local audio)
|
||||
@@ -266,7 +266,7 @@ Rules:
|
||||
- `outputs[].source` is required.
|
||||
- `outputs[].dest` may be omitted when derivable from source.
|
||||
- extraction sources require an explicit `outputs[].dest` and publish only when
|
||||
a rule names that source; the Notarius index and complete bundle are not
|
||||
a rule names that source; the Notarius bundle is not
|
||||
publish sources.
|
||||
- `outputs[].required` defaults to `true`.
|
||||
- publish locks are independent remote session objects managed with
|
||||
@@ -285,6 +285,7 @@ Rules:
|
||||
| `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` |
|
||||
| `pipeline.campaigns.default_campaign_id` | string | No | empty |
|
||||
| `pipeline.campaigns.session_template_file` | string | No | installation session template; built-in default when absent |
|
||||
| `pipeline.storage.backend` | string | No | `local`; supported values are `local` and `s3` (case-insensitive) |
|
||||
| `pipeline.storage.s3.bucket` | string | Conditional | required when backend is `s3` and S3 session-audio or publish upload is enabled |
|
||||
| `pipeline.storage.s3.root_prefix` | string | No | `dnd` |
|
||||
@@ -293,10 +294,6 @@ Rules:
|
||||
| `pipeline.storage.s3.force_path_style` | bool | No | `false` |
|
||||
| `pipeline.storage.s3.access_key_id` | secret reference | Conditional | unset; must be paired with `secret_access_key` |
|
||||
| `pipeline.storage.s3.secret_access_key` | secret reference | Conditional | unset; must be paired with `access_key_id` |
|
||||
| `pipeline.spool.root` | string | No | `/var/spool/narratio` |
|
||||
| `pipeline.spool.delete_audio_after_publish` | bool | No | `false`; selects the published run's spool-audio target for final cleanup and requires effective `pipeline.publish.enabled=true` and `pipeline.publish.upload_run=true` |
|
||||
| `pipeline.cache.root` | string | No | `/var/cache/narratio` |
|
||||
| `pipeline.cache.s3_audio` | bool | No | `true` |
|
||||
| `pipeline.publish.enabled` | bool | No | `true` |
|
||||
| `pipeline.publish.upload_run` | bool | No | `true` |
|
||||
| `pipeline.publish.outputs[]` | list | No | defaults to final trimmed JSON plus final and final-trimmed Markdown outputs |
|
||||
@@ -349,8 +346,8 @@ Rules:
|
||||
| `pipeline.notarius.pipeline_id` | string | Conditional | required when enabled |
|
||||
| `pipeline.notarius.timeout` | duration | No | `3h`; must be positive |
|
||||
| `pipeline.notarius.working_directory` | string | No | directory containing resolved `config_path`; relative paths resolve from their defining source |
|
||||
| `pipeline.notarius.resume` | bool | No | `false`; request compatible Notarius checkpoint reuse during ordinary executed extraction |
|
||||
| `pipeline.notarius.chunk_cache` | string | No | empty; when set, exactly `auto`, `bypass`, or `refresh` |
|
||||
| `pipeline.notarius.cache` | string | No | unset; when set, `auto`, `bypass`, or `refresh` |
|
||||
| `pipeline.notarius.debug` | bool | No | `false`; true requests debug capture |
|
||||
| `pipeline.notarius.references` | map[string]string | No | empty; maps normalized Notarius selectors to supported prepared Narratio source IDs; maximum 256 entries |
|
||||
| `pipeline.notarius.outputs` | map | Conditional | at least one entry when enabled |
|
||||
| `pipeline.render.enabled` | bool | No | `true` |
|
||||
@@ -370,13 +367,13 @@ Rules:
|
||||
|
||||
### Audita Selection and Credentials
|
||||
|
||||
`pipeline.audita.config_path` optionally selects an Audita v4.2 configuration;
|
||||
`pipeline.audita.config_path` optionally selects an Audita v4.3.0 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)
|
||||
[Audita's configuration guide](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/config.md)
|
||||
and the [integration contract](integrations/audita.md). `debug: true` requests
|
||||
Audita debug capture; false or omission adds no debug override. Debug alone does
|
||||
not invalidate a completed polish result.
|
||||
@@ -392,9 +389,8 @@ replaces the list. Captured diagnostics redact those values.
|
||||
### Notarius Configuration Overlay
|
||||
|
||||
Migration: rename `pipeline.notarius.config_profile` to `config_overlay`.
|
||||
The old field is rejected; there is no compatibility alias. For Notarius v0.8+
|
||||
move selected downstream files from `profiles/` to `overlays/` beside its root
|
||||
configuration. This does not rename PromptKit LLM profiles.
|
||||
The old field is rejected; there is no compatibility alias. For current Notarius versions, move selected downstream files from `profiles/`
|
||||
to `overlays/` beside its root configuration. This does not rename PromptKit LLM profiles.
|
||||
The renamed selector also changes extraction resume evidence for named
|
||||
selections: their existing extraction is regenerated on the next applicable
|
||||
run, with normal dependent invalidation. Omitted/base selections do not acquire
|
||||
@@ -454,78 +450,38 @@ delivery and redaction boundary.
|
||||
|
||||
### Notarius Cache Controls
|
||||
|
||||
`pipeline.notarius.resume` defaults to `false`. When true, an executed ordinary
|
||||
extraction passes `--resume`; the deployed Notarius configuration must already
|
||||
enable checkpoint recording and should select an explicit persistent checkpoint
|
||||
root. Narratio does not inspect or generate that configuration.
|
||||
|
||||
`pipeline.notarius.chunk_cache` is empty by default, leaving Notarius's
|
||||
configured mode in control. A nonempty value must be `auto`, `bypass`, or
|
||||
`refresh` and is passed as `--chunk_cache`. Forced extraction takes precedence
|
||||
over both fields: it omits `--resume` and passes `--chunk_cache refresh`.
|
||||
Neither field changes Narratio's semantic extraction fingerprint, so changing
|
||||
them alone does not rerun an otherwise complete durable extraction.
|
||||
`pipeline.notarius.cache` is optional; omission leaves the Notarius configuration
|
||||
in control. Supply `auto`, `bypass`, or `refresh` to select native cache behavior.
|
||||
Forced extraction uses `refresh`. Narratio's own completed-stage reuse is separate;
|
||||
changing cache or debug selection alone does not invalidate completed products.
|
||||
Notarius owns its configuration, pipeline, and cache storage.
|
||||
|
||||
### Notarius Reference Bindings
|
||||
|
||||
`pipeline.notarius.references` maps a Notarius CLI selector to a prepared
|
||||
Narratio source, not to a filesystem path:
|
||||
Map selectors to prepared source IDs, for example:
|
||||
|
||||
```yaml
|
||||
notarius:
|
||||
references:
|
||||
glossary: narratio.input.glossary.campaign
|
||||
party: narratio.input.party
|
||||
players: narratio.input.players
|
||||
spell_catalog: narratio.input.spell_catalog
|
||||
glossary: narratio.input.glossary.combined
|
||||
spell_catalog: narratio.input.glossary.combined
|
||||
```
|
||||
|
||||
Supported sources are `narratio.input.party`, `narratio.input.players`,
|
||||
`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`.
|
||||
|
||||
Selectors accept Notarius's `slot`, `chunk.slot`, `lane.slot`,
|
||||
`lane.extract.slot`, `lane.merge.slot`, and `lane.normalize.slot` forms.
|
||||
Narratio trims whitespace around
|
||||
selectors and their dot-separated components, rejects empty components and
|
||||
`=`, rejects duplicate normalized selectors, and limits the map to 256 entries.
|
||||
It validates only selector structure and the prepared source vocabulary;
|
||||
Notarius owns target-slot declarations and media compatibility.
|
||||
|
||||
Before extraction, Narratio resolves every binding from the current prepared
|
||||
session manifest and streams it into a verified, content-addressed session
|
||||
snapshot whose absolute path is passed to Notarius. Missing, unsafe, empty,
|
||||
changed-during-copy, or checksum-inconsistent prepared evidence fails with
|
||||
guidance to force `prepare`. Bindings are sorted by normalized selector and are
|
||||
part of extraction fingerprint and resume identity. See the
|
||||
[Notarius integration contract](./integrations/notarius.md) for the subprocess
|
||||
boundary and the [complete example](../examples/pipeline.full.annotated.yml)
|
||||
for a copyable configuration.
|
||||
Supported IDs are `narratio.input.party`, `narratio.input.players`, and
|
||||
`narratio.input.glossary.{party,campaign,setting,spells,combined}`. Every
|
||||
configured binding is required; omit unused bindings. Selectors use Notarius's
|
||||
native slot forms. Narratio verifies and snapshots the prepared files before
|
||||
passing them to the subprocess. See the [Notarius contract](integrations/notarius.md)
|
||||
and [complete example](../examples/pipeline.full.annotated.yml).
|
||||
|
||||
### Notarius Output Entries
|
||||
|
||||
For each `pipeline.notarius.outputs.<name>`:
|
||||
|
||||
| Field | Type | Required | Rule |
|
||||
| --- | --- | --- | --- |
|
||||
| `lane_id` | string | Yes | unique Notarius lane ID |
|
||||
| `media_type` | string | Yes | exact accepted descriptor media type |
|
||||
| `schema_id` | string | Yes | exact accepted descriptor schema ID |
|
||||
| `schema_version` | string | Yes | exact accepted descriptor schema version |
|
||||
| `module_key` | string | No | exact accepted module key when set |
|
||||
|
||||
Output names must match `^[a-z][a-z0-9_]*$` and become selectable sources named
|
||||
`narratio.extraction.<name>`. Lane IDs must be unique. Every declared output is
|
||||
required from a successful Notarius result; a missing, rejected, duplicate, or
|
||||
contract-incompatible lane fails extraction. See the
|
||||
[complete maintained example](../examples/pipeline.full.annotated.yml) for the
|
||||
current ten-lane D&D mapping and the [Notarius contract](./integrations/notarius.md)
|
||||
for compatibility ownership.
|
||||
Each `pipeline.notarius.outputs.<name>` requires a unique `lane_id` and may set
|
||||
`filename` to a flat JSON filename. The default is `<name>.json`. Names create
|
||||
`narratio.extraction.<name>` source IDs. Each configured lane is required, and
|
||||
its completed JSON is promoted into the session's flat artifacts directory.
|
||||
See the [Notarius contract](integrations/notarius.md).
|
||||
|
||||
### Scriptorium Credentials
|
||||
|
||||
@@ -619,7 +575,7 @@ For each `pipeline.scriptorium.artifact_families.<name>`:
|
||||
| --- | --- | --- | --- |
|
||||
| `enabled`, `prompt_id`, `profile_id`, `timeout`, `render_debug`, `depends_on`, `inputs`, `vars` | ordinary artifact fields | No | copied to each generated artifact under the corresponding ordinary rules |
|
||||
| `for_each` | string | Yes | exactly `party.characters` |
|
||||
| `output_path_pattern` | string | Yes | safe path beneath `artifacts/` with exactly one `{character_id}` token and no other brace syntax |
|
||||
| `output_path_pattern` | string | Yes | flat filename directly beneath `artifacts/` with exactly one `{character_id}` token and no other brace syntax |
|
||||
| `member_vars` | map | No | maps an ordinary Scriptorium variable name to a supported canonical character selector |
|
||||
| `member_dependencies` | list | No | unique family keys; each generated member depends on the corresponding generated member of each listed family |
|
||||
| `publish` | map | No | typed family publish policy (`enabled`, `required`, `dest_pattern`) validated against effective `pipeline.publish` settings and expanded into concrete publish outputs when enabled |
|
||||
@@ -628,6 +584,11 @@ An enabled family publish declaration is validated against the effective
|
||||
`pipeline.publish` configuration, including its defaults; it does not require
|
||||
an explicit `publish.enabled` declaration in the same source file.
|
||||
|
||||
Explicit and generated analysis artifacts and session bounds must use flat
|
||||
filenames directly beneath `artifacts/`; combined transcripts use flat filenames
|
||||
directly beneath `transcripts/`. Remote publish destinations remain independent.
|
||||
Collisions among effective producers are rejected.
|
||||
|
||||
Generated keys are `<family>_<character_id>` and generated output paths must
|
||||
not collide with explicit artifacts or another generated artifact. Families
|
||||
expand even when disabled; normal analyze selection still omits disabled
|
||||
@@ -657,47 +618,45 @@ integration.
|
||||
|
||||
### Campaign
|
||||
|
||||
| Field | Type | Required | Notes |
|
||||
| --- | --- | --- | --- |
|
||||
| `campaign_id` | string | Yes | canonical opaque campaign identity |
|
||||
| `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.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` |
|
||||
The campaign is a shared [RPG campaign document](https://schemas.maximumdirect.net/rpg/campaign/v0.2.0/schema.json).
|
||||
Shared extensions are allowed; Narratio's `narratio` settings are strict.
|
||||
|
||||
| Field | Required | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `schema_version` | Yes | `maximumdirect.rpg.campaign.v1` |
|
||||
| `id` | Yes | campaign identity |
|
||||
| `name`, `description` | No | shared context |
|
||||
| `references.party` | Yes | shared roster path; `--party-file` can select another roster |
|
||||
| `setting`, `system` | No | selected installed catalog IDs |
|
||||
| `references.glossaries` | No | shared relationships, not an ordered Narratio composition list |
|
||||
| `narratio.inputs.speakers_file` | Yes | speaker mapping path |
|
||||
| `narratio.inputs.glossary_file` | No | shared campaign glossary path |
|
||||
| `narratio.inputs.glossary` | No | inline campaign collection |
|
||||
| `narratio.inputs.autocorrect` | No | replacement rules, default empty |
|
||||
| `narratio.session_template_file` | No | campaign template; otherwise installation or built-in template |
|
||||
|
||||
Resource paths resolve relative to their defining source. See the
|
||||
[three-file example](../examples/campaigns/lantern-coast/campaign.yml) and
|
||||
[party contract](integrations/party.md).
|
||||
|
||||
### 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.
|
||||
Install a reference catalog and import its root into the pipeline. Selected
|
||||
setting and system IDs resolve to source-relative shared glossary files; only
|
||||
selected files are read. Campaign file and inline contributions compose using
|
||||
ConfigKit identity and list controls. Session omissions inherit each selection
|
||||
independently; explicit null or empty optional selectors clear them. A supplied
|
||||
inline glossary or autocorrection list replaces the campaign contribution as a
|
||||
whole, and null clears it. Clearing inline vocabulary leaves a selected file
|
||||
unchanged; `autocorrect: []` disables inherited campaign rules.
|
||||
|
||||
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.
|
||||
Preparation writes shared envelopes for party, campaign, setting, spells, and
|
||||
combined collections, including empty collections. Audita receives the four
|
||||
individual envelopes and Notarius may bind the combined envelope to both glossary
|
||||
roles. Collection extensions such as `instruction` are data, not prompt guidance.
|
||||
[Shared glossary schema](https://schemas.maximumdirect.net/glossary/v0.2.0/schema.json)
|
||||
and [semantics](https://schemas.maximumdirect.net/glossary/v0.2.0/semantics.md)
|
||||
own the contract; see the [maintained examples](../examples/README.md).
|
||||
|
||||
### Session
|
||||
|
||||
@@ -709,12 +668,11 @@ inputs. Configuration inspection preserves authored selections and inline data.
|
||||
| `date` | string | No | metadata |
|
||||
| `title` | string | No | metadata |
|
||||
| `inputs.speakers_file` | string | No | overrides campaign stable input |
|
||||
| `inputs.autocorrect_file` | string | No | overrides campaign stable input |
|
||||
| `inputs.autocorrect` | list | No | replaces inherited rules; null or empty clears them |
|
||||
| `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 |
|
||||
| `inputs.audio_s3.prefix` | string | Conditional | S3 audio mode |
|
||||
@@ -737,6 +695,16 @@ select a backend on its own. Unknown backend names and an S3 block paired with
|
||||
`--previous-session-id`, however, the session file must contain the same value;
|
||||
an omitted or different value is rejected before the command performs work.
|
||||
|
||||
## Shared contract provenance
|
||||
|
||||
Narratio validates the shared glossary, RPG party, and RPG campaign `0.2.0`
|
||||
schemas and their dependency closure offline from schemas distribution
|
||||
`2026.11.1`, commit `f7e3cedeca11ed903311cdf29ca4d81fb1f216b7`.
|
||||
The supplied synthetic catalog data is based on commit
|
||||
`02dd53c6ea026347452d497350c40249c949f8ce`. Installed catalogs are selected
|
||||
independently. See [attribution](oss/attribution.md) and the
|
||||
[integration contracts](integrations/README.md) for tested consumers.
|
||||
|
||||
## Maintained Examples
|
||||
|
||||
See the [maintained examples index](../examples/README.md) for complete pipeline,
|
||||
|
||||
Reference in New Issue
Block a user