Consolidate shared-input and workspace adoption roadmap

This commit is contained in:
2026-11-29 20:11:25 +00:00
parent 2043cdf25f
commit b472ccfbbe
12 changed files with 680 additions and 1220 deletions

View File

@@ -2,11 +2,11 @@
## Status
Proposed
Accepted
## Date
2026-10-01
2026-11-29
## Context
@@ -78,7 +78,7 @@ Each managed file family needs an identified role, owner, scope, and retention
rule. Subprocess bundles require classification before their contents are
placed in Narratio's output and diagnostic directories.
Physical roots, retention rules, the mechanism for presenting latest logs,
debug placement, and ambiguous checkpoint classifications remain open. The file
inventory and subsequent roadmap will resolve these choices and define the
migration. Current versus historical views are separate from content categories.
The [consolidated roadmap](../roadmap/pipeline.md) defines the selected physical
layout, latest-attempt views, retention boundaries, and new-session cutover.
Current versus historical views remain separate from content categories.
Acceptance of this policy does not establish implementation of that roadmap.

View File

@@ -2,11 +2,11 @@
## Status
Proposed
Accepted
## Date
2026-10-03
2026-11-29
## Context
@@ -15,9 +15,8 @@ operator-facing directory principles. Narratio also needs an ownership boundary
for the applications it invokes. That boundary determines who selects locations,
manages retained files, and controls cleanup.
The current subprocess workflows can execute with fresh working state. Notarius
can reuse persistent chunk-plan and checkpoint caches. Narratio maintains its own
session progress and recovery records.
Subprocesses have their own execution state and reusable caches. Narratio
maintains its own session progress and recovery records.
## Decision
@@ -71,6 +70,7 @@ Adapters need supported controls for Narratio-selected output, log, and debug
locations. Upstream changes may be needed where those destinations are coupled
to application working directories or to one another.
Workspace layout and file classification can proceed independently of subprocess
working-directory conventions. Exact debug placement, retained diagnostic views,
and migration steps remain for the workspace design and roadmap.
Workspace layout and file classification remain independent of subprocess
working-directory conventions. The [consolidated roadmap](../roadmap/pipeline.md)
defines debug placement, retained diagnostic views, and the new-session cutover.
Acceptance of this policy does not establish implementation of those changes.

View File

@@ -35,6 +35,9 @@ builds use the selected patch version and setup instructions in the
| [OSS](policy/oss.md) | Adding or updating dependencies or incorporated third-party material, or changing licensing or attribution. |
| [Release](policy/release.md) | Preparing or publishing a release, changing release procedures, or making versioning and compatibility decisions. |
The pending [pipeline roadmap](roadmap/pipeline.md) consolidates shared-input,
consumer, catalog, and workspace work; it describes future behavior.
- Read applicable policies before making decisions they govern; multiple policies
may apply.
- Select policies using the task triggers above. Follow cross-references to

View File

@@ -1,67 +0,0 @@
# Adopt Audita v4.3 shared glossary inputs
## Baseline and target
Reviewed release: `v4.3.0`, source commit
`6f97f31ccb1436c9b1e144182f6ad0b1fd9524be`, on 2026-11-29.
Narratio currently invokes Audita v4.2 and supplies wrapperless prepared glossary
files. Audita v4.3.0 requires the shared envelope; installing it alone is not a
compatible upgrade for the current Narratio workflow.
Canonical references:
[release](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/releases/v4.3.0.md),
[runtime input](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/integrations/transcript-glossary-files.md),
[migration](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/migrations/v4.3.md).
Adopt `glossary@0.2.0` from schemas distribution `2026.11.1`, with marker
`maximumdirect.glossary.v1`. Shared acquisition/preparation belongs to the
[coordinating roadmap](schemas.md). This adoption is a clean cutover, not a
second adapter or wrapperless-input fallback.
The [coordinating roadmap's operator contract](schemas.md#agreed-operator-contract)
defines `party.yml`, `campaign.yml`, and `speakers.yml` as the standard
campaign-owned bundle, with setting and spell vocabulary selected from a shared
catalog. Optional campaign vocabulary and autocorrection rules live in the
campaign's Narratio extension. Narratio retains its application-wide roster
requirements and generates a combined glossary for Notarius; Audita continues
receiving the four individual prepared sources. Its adapter needs no knowledge
of the operator's authoring splits.
## Required changes
- Prepare shared envelopes and keep the existing repeated `--glossary-file`
interface. Audita accepts multiple files or multi-collection files; no new
Narratio configuration generator or CLI collection-selection layer is needed.
- Consume the prepared sources derived from the agreed campaign contract;
standalone campaign glossary and autocorrection authoring are not prerequisites.
Explicit autocorrection rules remain part of Narratio's preparation/Seriatim
boundary, separate from Audita glossary context.
- Continue forwarding the four intended entry lists, including empty lists,
through manifest-verified prepared sources. Explicit files replace supplied
same-named entry lists at CLI priority; unrelated application collections and
native disjoint overrides remain downstream concerns.
- Keep acquisition separate from Audita's selection of correction/protection
collections. Empty shared collections are valid, but a configured glossary
correction must select at least one entry. Native readiness reports that task
failure; Narratio should not invent a universal nonempty-glossary requirement.
- Obtain instructions through Audita configuration. A shared `instruction`
extension is ordinary data. Operators relying on auto-discovered glossary
companions must pass them explicitly downstream; Narratio already supplies
explicit prepared paths. Automatic prompt companions remain upstream behavior.
- Apply the same saved envelopes in processing and preflight. Retain existing
config/overlay/profile forwarding, native provider checks, stream supervision,
credential forwarding, and diagnostic handling. Transcript/report contracts,
application configuration version 3, and ordinary reporting remain unchanged.
- Update result-affecting evidence and examples for the new prepared bytes;
preserve ordinary reuse/invalidation and manifest-backed restore/publication.
## Verification and delivery
Refresh controlled real-Audita compatibility tests for v4.3.0. Verify repeated
shared files, envelope rejection, empty collections, extension/instruction
handling, and processing/preflight parity without paid provider requirements.
Keep the upstream schema and semantic documents canonical; local documentation
owns Narratio's integration and migration only.
Implement alongside shared preparation and the coordinated consumer cutover.
This roadmap authorizes neither code changes nor release publication by itself.

View File

@@ -0,0 +1,18 @@
# Proposed Narratio interface: see ../../pipeline.md, OD-1.
schema_version: maximumdirect.rpg.campaign.v1
id: lantern-coast
name: Lantern Coast expedition
setting: lantern_coast_sample
system: sample_magic
references:
party: ./party.yml
narratio:
inputs:
speakers_file: ./speakers.yml
glossary:
entries:
- id: glass-harbor
name: Glass Harbor
category: place
aliases: [The Harbor]
autocorrect: []

View File

@@ -0,0 +1,11 @@
schema_version: maximumdirect.rpg.party.v1
characters:
mira:
player:
name: Rowan
character:
name: Mira
aliases: [Mira of Glass Harbor]
classes:
- name: Wizard
level: 3

View File

@@ -0,0 +1,7 @@
match:
- speaker: Rowan
match:
- Rowan_recording
- speaker: GM
match:
- GM_recording

View File

@@ -1,316 +0,0 @@
# Adopt Notarius v0.10.0
## Purpose
Adopt Notarius's native execution, output, and cache contracts while removing
Narratio machinery for retired upstream interfaces. Preserve Narratio's ownership
of prepared inputs, extraction requirements, durable artifacts, and stage reuse.
This is a proposed Narratio cutover. Upstream schema and readiness gaps are
resolved; agreed operator, glossary, and roster decisions are recorded in the
[coordinating schema roadmap](schemas.md). Implementation is one end-to-end
cutover, without compatibility aliases, legacy conversion, or a second adapter.
## Upstream Baseline
The latest upstream release verified on 2026-11-29 is **v0.10.0**, at commit
`752c9b44d2c0bb3bfb1e02a5d4379f7cc5b6261e`. Notarius remains a separately installed
executable; adopting it does not require importing its Go packages into Narratio.
Canonical references:
- [Release notes](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/releases/v0.10.0.md)
- [Migration guide](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/native-migration.md)
- [Subprocess guide](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/subprocess.md)
- [CLI reference](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/cli.md)
- [Configuration](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/config.md)
- [Published domain files](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/integrations/json-output.md)
- [Complete D&D workflow](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/dnd-pipeline.md)
The [current integration](../integrations/notarius.md) targets the v0.8.1
receipt/index contract. v0.10.0 removes that protocol and changes invocation,
configuration, caching, and validation controls. Its domain artifact schemas and
lane filename mapping remain unchanged.
## Ownership And Scope
Follow [ADR 0003](../adr/0003-assign-configuration-ownership.md): ConfigKit owns
configuration resolution, CommandKit owns native CLI behavior, and Narratio
consumes resolved values to orchestrate the pipeline. Notarius owns its pipeline,
prompts, profiles, validation, fallback construction, and accepted-result cache.
Do not duplicate downstream configuration resolution, infer provider settings,
implement semantic validation already owned by Notarius, or inspect private
cache/debug formats. Preserve shared subprocess supervision, credential supply,
redaction, cancellation, and native error handling.
The [workspace roadmap](workspace.md) owns broader filesystem reorganization.
This adoption must remove index-dependent assumptions wherever they occur, but
does not require that reorganization. Use the workspace paths in effect when
implemented, through the existing path owner. Reconcile overlapping extraction
and debug work rather than implementing two competing layouts.
## Native Invocation
Keep the native `notarius run <pipeline_id>` route. Update the adapter's argument
vector to use these interfaces:
| Concern | Target behavior |
| --- | --- |
| Transcript | `--input-file <absolute final trimmed transcript path>` replaces `--input`. |
| Configuration | Preserve the selected `--config` path; forward `config_overlay` through `--overlay`. |
| Machine report | Request `--format json` instead of `--json`, independently of Narratio's own output format. |
| References | Retain repeated `--reference <selector>=<verified snapshot path>`. |
| Output | Supply a Narratio staging root through `--output-dir`. |
| Cache | Use native `--cache auto\|bypass\|refresh`; remove `--resume` and `--chunk_cache`. |
Preserve omitted versus explicitly supplied overlay values and let Notarius
interpret them. Keep flags after the complete command path. Run the selected
pipeline normally: Narratio's required-output map does not implicitly become a
`--lane` filter that changes execution or generated dependencies.
Keep the existing minimal child environment and exact-name credential forwarding.
Use Notarius's native input-based LLM session selection unless a separate product
requirement calls for an override. Do not add generic execution overrides or
version negotiation merely to perform the cutover.
## Completion And Required Artifacts
Wait for successful process completion before parsing stdout. The native report
provides `pipeline`, `artifact_count`, and an absolute `output_directory`, with
optional `debug_directory` and positive `fallback_count`. It is not a versioned
receipt, validation ledger, or artifact inventory.
Use the reported directory as the exact run root beneath the supplied staging
root. Read required lane files at the documented `lanes/<mapped-lane-id>.json`
paths. Apply the upstream filename mapping for custom lane IDs; do not silently
restrict operators to the simple IDs used by the maintained D&D example.
Every configured extraction output remains required. Check the expected pipeline,
safe file placement, regular-file status, bounded JSON readability, and checksums
using existing production machinery. Keep each output's `lane_id`; remove
`media_type`, `schema_id`, `schema_version`, and `module_key` descriptor
constraints. Notarius no longer emits descriptors to compare with them. Trust
its native publication contract for domain validation; Narratio does not add
independent payload-schema or semantic validation. Preserve
`narratio.extraction.<output_key>` identities and manifest-backed resolution for
analysis and publication.
`artifact_count` includes all published deliverables, including available enabled
auxiliaries and reused results. It must not be compared with the number of
Narratio's required outputs as an acceptance test. The maintained complete D&D
pipeline still supplies ten lanes; `chunk-map.json` and `evidence-context.json`
are optional domain auxiliaries, not reporting sidecars. Retain them with the
bundle when produced; adding selectable Narratio sources for them is not required
for this adoption.
Remove receipt/index/sidecar parsing, descriptor matching, rejection and warning
count reconciliation, and the non-selectable `notarius_index` manifest output.
Remove dependencies on those records from stage execution, evidence inspection,
catalog hydration, reuse, publication, and restore. Do not replace them with a
Narratio-created imitation index or require optional debug capture for acceptance.
Record Narratio's own input/output evidence and the native completion information
needed for provenance. The completion report has no upstream run-ID field;
do not invent one or derive identity by parsing directory names. Keep configured
expectations distinct from facts actually attested by the producer.
Preserve staged validation and atomic promotion before recording stage success.
Nonzero exit, malformed successful stdout, or missing required files remain
failures. A native capture/report failure can occur after files are published;
retain useful diagnostics under the existing failure lifecycle, but do not
automatically recover success from those files or partial stdout. Preserve native
errors through the shared subprocess path rather than adding an error taxonomy.
Honor native successful completion when the operator has selected permissive
behavior, subject to Narratio's required-file checks. Record positive
`fallback_count` and expose the qualification in ordinary extraction results,
including later reuse. The count identifies fallback-emitting operations, not
affected lanes or files; do not infer per-lane quality from it. Notarius owns
strict/permissive selection and its default strict mode.
## Native Cache And Narratio Reuse
Replace `pipeline.notarius.resume` and `pipeline.notarius.chunk_cache` with an
optional `pipeline.notarius.cache` using the native modes. Omission adds no flag
and preserves downstream configuration. Forced extraction passes `--cache refresh`.
Keep the two reuse decisions separate:
- Narratio reuses a completed extraction from its manifest and semantic evidence.
- An executed Notarius invocation applies its own accepted-result cache policy.
Cache and debug controls alone must not invalidate Narratio's completed stage.
Continue fingerprinting result-affecting Narratio inputs, reference content,
output selection, pipeline identity, and explicit overlay selection. Do not hash
or interpret private downstream configuration to construct another cache key.
Notarius cache hits reuse accepted results without fresh semantic assessment.
Model, settings, or validation-policy changes can still hit. Document forced
extraction as the way to request fresh work after such downstream edits; native
refresh then prevents cache reuse during that execution. Notarius owns cache
placement and cleanup. Old Notarius caches remain ignored and untouched.
Replace index-based extraction evidence with the existing Narratio-owned output
records, checksums, and provenance adapted to the new contract. Old extraction
evidence becomes obsolete when evaluated through normal stage reuse rules. Do
not introduce a legacy reader, delete historical bundles, or rerun unrelated
completed stages solely because the adapter changed. Preserve ordinary dependent
invalidation when extraction must be rerun.
## Prepared References And Glossaries
Reuse the prepared-input and verified-reference paths introduced by the Audita
work. The four glossary collections remain shared domain inputs. Consumers may
use a subset or a saved domain projection; do not force every subprocess to
accept all four collections.
Notarius v0.10.0 accepts shared RPG party `0.2.0` in `party` and
accepted `roster` slots, and shared glossary `0.2.0` in `glossary` and
`spell_catalog`, all from schemas distribution `2026.11.1`. The
[shared input contract](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/integrations/shared-domain-inputs.md)
owns native loading, defaults, task projections, and migration.
Replace the private spell-overlay acquisition and `narratio.input.spell_catalog`
binding with shared vocabulary. Retire the separate authored overlay setting
rather than aliasing it to a new source. One shared file can serve both native
glossary slots. General context defaults to available campaign/setting collections;
a bound spell slot defaults to spells, which must exist. Explicit configured
collection names must exist; omission/null uses defaults and [] selects none.
CLI path overrides retain each effective configured selection. Narratio does not
need a new flag or a duplicate selection policy to forward those paths.
Supply a shared roster through the existing party identity and preserve
character/player/class values and extensions. Narratio applies the
[agreed Narratio-wide roster requirements](schemas.md#agreed-roster-validation)
before forwarding it. Notarius now derives player relationships from it. The
players slot remains optional supplemental text; Narratio's existing players
projection can remain for other consumers without requiring a duplicate default
Notarius binding.
Use the agreed derived `narratio.input.glossary.combined` source for both glossary
roles, preserving the four individual logical sources. The
[coordinating roadmap](schemas.md#agreed-combined-glossary) owns its preparation,
evidence, and ordinary whole-file invalidation. Operators supply the
[three-file campaign bundle](schemas.md#agreed-operator-contract) and select shared
setting/spell vocabulary through the campaign document; they author no combined
file or private spell overlay. Notarius owns each role's collection selection.
Spell recognition still starts with Notarius's embedded D&D 5e 2014 SRD
vocabulary. Selected shared names/aliases augment it; canonical display names and
collision checks stay upstream. Ruleset provenance is not required, and Narratio
does not infer a recognition ruleset from a catalog selector. References are
context, not transcript evidence. Generated same-run handoffs remain configured
inside Notarius.
## Preflight
Use the existing preflight service and lazy wiring. Automatic checks follow
selected preparation and precede processing when extraction needs execution;
explicit session validation uses prepared inputs and planning remains
subprocess-free.
Notarius v0.10.0 supplies the pipeline-aware readiness command:
```text
notarius preflight <pipeline_id> --input-file <transcript> --config <config_path> [--overlay <selector>] --reference <selector>=<verified_path>... --output-dir <probe_destination> --format json
```
Use the execution selections, credential environment, and verified reference
paths. Native preflight chooses the applicable provider targets itself and checks
modules, supplied transcript/references, destinations, and applicable cache access.
It performs native reachability, authentication, and structured-generation probes
without running extraction or publishing domain artifacts. It can incur inference
charges, create probe directories/temporary files, and retain selected debug
capture. Cache access warnings do not by themselves make readiness false.
Require successful process status and a complete assessment for the expected
pipeline with `ready: true`. Preserve native failed/warning facts and optional
debug location. Nonzero exit fails even if a delivered report says ready; early
errors can have no report and failed delivery can leave partial bytes. Do not
reconstruct an independent provider/profile planner or turn cache warnings into
stronger readiness failures.
The assessment applies only to the supplied input. Use a real available
execution transcript where appropriate; early preflight can use the shared
synthetic fixture as Audita does, with that limitation explicit. A synthetic
success is not validation of the future final trimmed transcript. Run still
validates its actual inputs. Do not introduce two mandatory paid probe passes.
Keep Narratio's required-output lane checks against native pipeline inspection
and prepared-reference integrity checks. Preflight does not know Narratio's own
required-output map. Offline `pipeline validate` remains an operator diagnostic;
it is not a substitute for runtime-reference/provider readiness and need not be
an additional mandatory subprocess before native preflight.
The former OD-3 reference-binding/provider-discovery gap is resolved upstream.
Separate `promptkit test all` calls and hand-maintained profile lists are no longer
needed for the proposed readiness path. The
[upstream preflight contract](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/cli.md#preflight)
owns assessment fields and check semantics.
## Diagnostics
Capture the native completion report, invocation record, and stderr as Logs.
Reuse current stream limits and credential redaction. Keep structured stdout
separate from diagnostic streams; Narratio's display flags must not suppress the
machine report it needs to consume.
Support an enable-only `pipeline.notarius.debug` selector, coordinated with the
[workspace roadmap](workspace.md). True adds `--debug`; omission or false leaves
downstream capture policy unchanged. Supply an actual run-local `--debug-dir`
destination even when capture can be enabled through downstream configuration.
A destination alone does not enable native capture.
Debug remains optional, local, and private to Notarius. Do not depend on its file
names, parse its contents as a public API, or use its `latest` link to locate
outputs. Capture does not imply that arbitrary filesystem content is sanitized.
## Delivery And Validation
Update adapter contracts and tests together with extraction, configuration,
artifact evidence, preflight wiring, and manifest/publication consumers. Remove
obsolete receipt fixtures and assertions instead of preserving them alongside
the new protocol. Keep changes behind existing application and adapter boundaries.
Use focused tests at the production boundaries to establish:
- Native arguments, exact overlay forwarding, configured references, native
cache selection, forced refresh, and enable-only debug behavior.
- Successful report parsing and required domain-file resolution, including a
custom mapped lane ID, optional auxiliaries, missing/unsafe files, nonzero exit,
malformed stdout, and acceptance and visible reporting of qualified fallback,
including subsequent reuse.
- Durable promotion, subsequent artifact resolution/publication/restore, ordinary
reuse, changed-reference invalidation, and obsolete extraction evidence.
- Shared automatic and explicit preflight selection, preparation ordering,
missing required lane definitions, subprocess failures, and accurate reporting
of native readiness coverage and input-specific limitations.
Refresh the opt-in real Notarius boundary test for v0.10.0 using a controlled local
provider fixture. Exercise the maintained complete pipeline and native reuse
without making paid provider access a routine test prerequisite. Run focused
tests during development and the repository checks in [Development](../development.md)
before completing implementation.
Update the canonical integration, configuration, operations, internal, and
troubleshooting documents when behavior lands, together with maintained examples.
Release guidance must cover removed Narratio fields/output constraints, native
cache behavior, changed extraction evidence, and downstream Notarius configuration
version 6. Link to upstream migration guidance for resource composition,
producer modes, semantic correction turns, and concurrency. Narratio must not
translate those downstream settings or own their defaults.
Use v0.10.0 as the tested native integration baseline. Unsupported old interfaces
fail normally; no runtime version gate or compatibility fallback is required.
## Remaining Coordination
OD-3 is resolved by pipeline-aware preflight and OD-5 by the published shared
reference contracts. No further upstream feature request is needed for those
capabilities. The [coordinating roadmap](schemas.md) records the settled
three-file campaign contract, combined glossary, and Narratio-wide roster
requirements. Prepare one implementation plan covering those changes, shared
preparation, and both consumer upgrades. Do not implement the old private
overlay as an intermediate destination or claim tested Narratio compatibility
before that cutover.

627
docs/roadmap/pipeline.md Normal file
View File

@@ -0,0 +1,627 @@
# Shared inputs, native consumers, and session workspace
## Status and scope
This is the consolidated feature roadmap for one end-to-end Narratio cutover.
It includes shared domain inputs, the campaign operator contract, reference
catalog adoption, Audita v4.3.0, Notarius v0.10.0, and workspace reorganization.
It defines the final behavior; a subsequent implementation plan will assign
code changes and verification to stages. The proposed field layout is identified
under [Open decisions](#open-decisions).
Implement the final state in one sprint. Intermediate commits need not compile
or support mixed old/new formats. Do not introduce compatibility aliases,
legacy readers, automatic conversions, version-negotiated adapters, or duplicate
operator-authored vocabulary. Publication remains a separately authorized action.
This document supersedes Narratio's separate schema, Audita, Notarius, and
workspace roadmaps, the completed schema-repository implementation plan, and
the reference catalog's shared-glossary roadmap. Their historical versions remain
in Git. The schemas and upstream applications have already shipped; their
implementation work is not part of this sprint.
## Released baselines and ownership
Reviewed on 2026-11-29:
| Component | Adopted release | Source commit |
| --- | --- | --- |
| Shared schemas | `2026.11.1`; glossary, RPG party, RPG campaign `0.2.0` | `f7e3cedeca11ed903311cdf29ca4d81fb1f216b7` |
| Audita | `v4.3.0` | `6f97f31ccb1436c9b1e144182f6ad0b1fd9524be` |
| Notarius | `v0.10.0` | `752c9b44d2c0bb3bfb1e02a5d4379f7cc5b6261e` |
| ConfigKit | `v1.4.0` | `4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3` |
Canonical contracts:
- Schemas: [release](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/releases/2026.11.1.md),
[validation](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/validation.md),
and [compatibility](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/compatibility.md).
- Audita: [runtime inputs](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/integrations/transcript-glossary-files.md)
and [migration](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/migrations/v4.3.md).
- Notarius: [subprocess contract](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/subprocess.md),
[shared inputs](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/integrations/shared-domain-inputs.md),
[CLI](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/cli.md),
[domain outputs](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/integrations/json-output.md),
and [migration](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/consumers/native-migration.md).
- ConfigKit: [configuration contract](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/config.md)
and [consumer guide](https://forge.maximumdirect.net/base-layer/configkit/src/tag/v1.4.0/docs/consumers/README.md).
Narratio currently supplies private roster and wrapperless glossary formats,
targets Audita v4.2 and Notarius's v0.8.1 receipt/index protocol, and uses the
workspace described in [Operations](../operations.md#local-state-layout).
Installing the new executables alone is not a compatible upgrade.
Follow [ADR 0003](../adr/0003-assign-configuration-ownership.md): ConfigKit owns
configuration acquisition and resolution through the final handoff; CommandKit
owns CLI mechanics and native inspection; Narratio interprets resolved values
and prepares separate domain objects without constructing another effective
configuration. Shared contracts must fit ConfigKit's supported values. Do not
add a parser, scalar repair, arbitrary-precision bridge, private input inspection,
or custom merge policy. Downstream applications own prompts, profiles, provider
selection, task validation, and their execution caches.
[ADR 0001](../adr/0001-classify-session-content.md) and
[ADR 0002](../adr/0002-assign-subprocess-content-ownership.md) define the selected
content and ownership model. Acceptance of those decisions does not establish
that this workspace has been implemented.
## Campaign operator contract
### Author once
Installation setup supplies the pipeline, services, credentials, and an explicitly
installed reference catalog. An operator onboards a campaign with three primary
documents, then supplies session identity, audio, and session-specific metadata:
| Document | Responsibility |
| --- | --- |
| `party.yml` | Shared RPG party roster, with Narratio's additional roster requirements. |
| `campaign.yml` | Shared RPG campaign identity/context, roster reference, catalog selectors, and a `narratio` operational extension. |
| `speakers.yml` | Existing speaker-mapping format connecting recording names/identifiers to transcript speaker labels. |
Recording identity is separate from character identity; speaker mappings can
include players, a GM, and other participants. No extra authored player list,
combined glossary, private spell overlay, campaign-context file, autocorrection
file, or per-campaign template is required. Native imports and optional authoring
splits remain available; the three-file bundle is the standard onboarding path,
not a limit on the number of files.
### Concrete field layout for review
The following layout is the proposal in OD-1. It keeps shared fields at the root
and groups Narratio-only settings under `narratio`. Names below are future fields,
not claims about the current CLI or configuration.
| Campaign field | Meaning and omission behavior |
| --- | --- |
| `schema_version` | Required `maximumdirect.rpg.campaign.v1`. |
| `id` | Required campaign identity; replaces `campaign_id`, retaining Narratio's identity checks. |
| `name`, `description` | Shared optional display/context fields. |
| `references.party` | Required by Narratio; standard bundle explicitly uses `./party.yml`. `--party-file` remains an invocation-specific selection. |
| `setting`, `system` | Optional catalog keys; the standard workflow supplies both. Omission means no selected vocabulary for that role. Shared optional-field null rules still apply. |
| `references.glossaries` | Optional shared relationships, not an implicitly ordered Narratio composition list. Operational vocabulary selection uses the fields below. |
| `narratio.inputs.speakers_file` | Required by Narratio; standard bundle explicitly uses `./speakers.yml`. |
| `narratio.inputs.glossary_file` | Optional path to a shared glossary supplying `campaign`. No path means no file contribution. |
| `narratio.inputs.glossary` | Optional inline campaign collection, using shared entry/provenance shapes; omission or null means no inline contribution. |
| `narratio.inputs.autocorrect` | Optional list using the existing Seriatim replacement-rule shape; omission, null, or `[]` supplies no campaign replacements. |
| `narratio.session_template_file` | Optional campaign template; omission uses the installation template, or Narratio's built-in default. |
Use optional `pipeline.campaigns.session_template_file` for the installation
template in this proposal. Do not require installation of a separate template
to make ordinary `session init` usable. Keep its existing explicit session/audio
selection and narrow templating behavior.
Session identity, audio, title, date, and previous-session behavior remain in
the session document. Retain session `inputs.speakers_file`, `inputs.setting`,
`inputs.system`, `inputs.glossary_file`, and `inputs.glossary` selectors. Add
`inputs.autocorrect` for session rules. Omission inherits the corresponding
campaign value independently. Null/empty optional selectors clear a selection;
supplied inline glossary or autocorrection data replaces the corresponding
campaign contribution as a whole, with null clearing it. Explicit empty/null
required paths fail validation rather than silently selecting defaults.
Retire campaign/session `autocorrect_file` authoring in favor of inline rules
or native imported mapping contributions; preparation still supplies Seriatim
a file. Retire `spell_catalog_file` entirely. Do not introduce session
`party_file` or `players_file`. Campaign/session identities must agree, using
the new campaign `id` as the authoritative campaign identity.
Resolve authored resource paths from the effective value's defining source,
including imports and inherited values; preserve existing source-context and
invocation-directory fallback rules. CLI-relative paths use the invocation
directory. Register resolution/default rules through native ConfigKit extension
points. Configuration inspection exposes that native result, not prepared
snapshots or a hand-built inspection view.
### Worked campaign bundle
The proposed complete files are under
[examples/campaign/](examples/campaign/campaign.yml):
[campaign.yml](examples/campaign/campaign.yml),
[party.yml](examples/campaign/party.yml), and
[speakers.yml](examples/campaign/speakers.yml). They are planning fixtures, not
inputs supported by the current Narratio release. The campaign and party
documents conform to the released shared schemas; OD-1 concerns Narratio's
extension and session interface.
With the synthetic catalog installed, the example selects
`lantern_coast_sample` and `sample_magic`, references its adjacent roster and
speakers, and provides one inline campaign term. Its empty autocorrection list
requires no extra file. Removing both optional inline sections still permits
onboarding. Session initialization uses the installation/built-in template;
the operator then selects session audio through the ordinary workflow.
Preparation derives party vocabulary, resolves the two catalog sources, writes
the campaign collection and combined glossary, and passes verified prepared
paths to both consumers. No fictional setting is presented as a complete
Forgotten Realms or D&D reference library.
### Narratio-wide roster requirements
After shared RPG party validation, consistently require a nonempty roster,
stable IDs satisfying Narratio's artifact-key rules, player and character names,
and a nonempty class list per character. Preserve existing trimmed/nonempty
display-name checks, character-name/alias ambiguity checks, and duplicate-class
checks; player names may repeat. Class names are required and supplied levels
remain positive within the shared contract's range.
Use `aliases` and the shared marker. Preserve supported extensions and optional
shared values without normalizing the forwarded document. These are Narratio's
consumer requirements, not changes to the shared schema, and do not depend on
which artifacts happen to be selected. Derive separate artifact-family and
prompt views; retain a complete shared roster for forwarding.
## Shared acquisition and prepared inputs
Pin all three `0.2.0` schemas, adjacent semantics, exact dependency closure, and
source distribution `2026.11.1` for offline validation. Keep canonical IDs under
`https://schemas.maximumdirect.net/<name>/v0.2.0/schema.json`; retain `.v1`
markers. Markers are not exact-version selectors. Do not import the schemas
repository's internal harness as an SDK or fetch schemas at runtime.
Validate completed mappings after ConfigKit composition, then apply domain
semantic rules such as exact per-collection glossary ID uniqueness and Narratio's
roster profile. Preserve supported resolved values, extensions, and
omission/null/empty distinctions. Numeric binding and source limits remain
upstream; schema-resource JSON retains exact numeric constraints. Ordinary
shared extensions are allowed even where Narratio's typed operational settings
reject unknown fields. An `instruction` extension is data, never prompt guidance.
Refactor campaign acquisition, identity selection, inspection, resource
resolution, campaign-to-session defaults, and initialization together. Prepared
campaign/session/party documents are effective standalone snapshots; source
configuration remains authoritative. Update autocorrection preparation and its
evidence without turning glossary context into deterministic replacement rules.
### Glossary composition and bindings
Keep the four logical prepared sources and add one generated projection:
| Logical source | Contents and consumers |
| --- | --- |
| `narratio.input.glossary.party` | Roster-derived party collection; supplied individually to Audita. |
| `narratio.input.glossary.campaign` | Campaign file/inline contribution; supplied individually to Audita. |
| `narratio.input.glossary.setting` | Selected setting vocabulary; supplied individually to Audita. |
| `narratio.input.glossary.spells` | Selected system vocabulary; supplied individually to Audita. |
| `narratio.input.glossary.combined` | One saved shared envelope containing all four collections; bound to both Notarius glossary roles. |
All prepared glossary files use the shared envelope. Save each collection even
when its entries are empty. Keep collection metadata/extensions where they are
part of the source, and preserve source documents where task projections omit
data. The combined file is a domain projection with explicit dependencies on
the four inputs, not a second authored source or configuration merge engine.
Resolve the selected campaign file beneath the effective inline contribution
through existing native ConfigKit identity/list controls. Inline and imported
authoring remain supported. Catalog IDs select paths from
`pipeline.reference_catalog.settings` and `.systems`; only selected documents
are acquired, and unknown selected IDs fail. These are Narratio's interpretations
of the shared campaign labels, not schema-defined lookup semantics. Do not infer
composition precedence from `references.glossaries` ordering.
Retain `narratio.input.party` for the complete shared roster and
`narratio.input.players` for consumers still needing its derived view. Do not
require a default Notarius players binding: Notarius derives relationships from
the shared roster. Remove private spell-overlay acquisition and
`narratio.input.spell_catalog`; do not restore the retired
`narratio.input.glossary` alias.
Keep manifest-verified prepared sources, reference snapshots, and whole-file
content evidence. A change in any combined collection may invalidate extraction
even if a role does not select it. Collection-aware fingerprinting is outside
this feature. Stable logical IDs remain stable where their meaning is retained;
new projections have explicit identities and invalidation dependencies.
## Reference catalog adoption
Update `narratio-reference-catalog` in the same coordinated scope. Its existing
synthetic bundle still owns a wrapperless schema and targets Audita v4.2. Adopt
the pinned shared glossary `0.2.0` instead. This work covers the synthetic
Lantern Coast/Sample Magic bundle, not new real-world vocabulary or source
licensing research.
Distribute authored entry points with their local native-import fragments;
Narratio prepares standalone downstream files. Do not add a generated export
product or maintain parallel resolved copies. Keep existing selectors, paths,
IDs, names, descriptions, aliases, and categories unless correcting a specific
defect. Source entry points resolve to complete envelopes; fragments may remain
partial. Keep `setting` and `spells` as the sample collection roles.
`catalog.yml` remains a Narratio configuration index, distinct from a glossary
and from the schemas repository's `catalog.json`. Native configuration permits
operator catalog extensions. Retire the catalog-owned glossary schema; vendor
the unmodified shared schema, semantics, dependency closure, and applicable
license/attribution with exact provenance. Do not rewrite `$id` or maintain
local schema amendments. Rewrite `FORMAT.md` as the catalog authoring/selection
guide and link upstream for shared field definitions.
Remove consumer instructions from maintained vocabulary and partial examples.
Preserve supported extensions and meaningful provenance; use synthetic source
IDs/titles and the known license without invented upstream versions, URLs, or
ruleset semantics. Preserve CC0 and record terms for incorporated material.
Add a small catalog-local development/CI check using native ConfigKit composition,
maintained JSON Schema validation, and the necessary ID-uniqueness check. Check
every indexed source, source-relative imports, expected collection roles, complete
and partial examples, and focused negative fixtures. Do not duplicate parser
or merge machinery or copy the schemas harness. Ordinary validation is offline
after dependency preparation and needs no sibling application or LLM service.
Retain the compatibility script as an opt-in integration check with the new
Narratio and Audita releases; retire its old compatibility claims when migration
lands. Catalog validity does not establish consumer readiness. Record the actual
tested revisions before claiming interoperability.
Pin an explicit catalog commit for this sprint. Named releases are not a
prerequisite; an eventual independent catalog release convention remains separate
future work. Do not couple vocabulary versions to schema versions, fetch updates
during execution, mutate published revisions, or require hosting/ReleaseKit work.
## Consumer execution
### Audita v4.3.0
Keep the repeated `--glossary-file` interface, now supplying the four prepared
shared envelopes. Audita can also accept multi-collection files, but no new
Narratio configuration generator or collection-selection flags are needed.
Supplied entry lists replace same-named configured lists at CLI priority,
including empty lists; unrelated collections and disjoint native overrides stay
upstream concerns. Audita selects correction/protection collections separately.
Empty data is schema-valid, while configured glossary correction requires at
least one selected entry; native readiness reports that failure.
Instructions stay in Audita configuration. Automatic glossary companions have
been removed upstream; operators must pass desired files explicitly. Narratio
already supplies explicit paths. Automatic prompt companions, application
configuration version 3, transcript/report contracts, config/overlay/profile
forwarding, and ordinary reporting remain unchanged.
Use the same saved envelopes for processing and preflight. Update semantic
evidence for the new bytes. Direct the transcript to staged product storage,
ordinary and failure reports to the actual polish log directory, and retained
debug work to the actual polish debug directory through supported controls.
### Notarius v0.10.0 invocation and references
Notarius remains an installed executable, not a Go package dependency. Use
`notarius run <pipeline_id>` with flags after the complete command path:
| Concern | Target |
| --- | --- |
| Transcript | `--input-file` with the absolute final trimmed transcript; remove `--input`. |
| Configuration | Preserve `--config`; forward `config_overlay` as `--overlay`, distinguishing omission from an explicit value. |
| Machine report | `--format json`, independent of Narratio display flags; remove `--json`. |
| References | Repeated `--reference <selector>=<verified snapshot path>`. |
| Output | `--output-dir` with Narratio's run-local staging destination. |
| Cache | Native `--cache auto\|bypass\|refresh`; remove `--resume` and `--chunk_cache`. |
| Debug | True `pipeline.notarius.debug` adds `--debug`; always supply the actual run-local `--debug-dir` for configured capture. |
Keep minimal child environments, exact-name credential forwarding, stream
supervision, cancellation, limits, redaction, and native errors. Preserve native
input-based LLM session selection; add no generic execution overrides or runtime
version negotiation. Required outputs do not become an implicit `--lane` filter.
Supply the shared roster to `party` (or native accepted `roster` bindings) and
the combined glossary to `glossary` and `spell_catalog`. Each role keeps its native
collection selection: general context defaults to available campaign/setting;
a bound spell role defaults to `spells`, which must exist. Explicit selected
names must exist; omitted/null selections use defaults and `[]` selects none.
CLI path overrides retain effective configured selections. Narratio does not
implement another selection policy.
Notarius owns embedded D&D 5e 2014 SRD recognition, canonical display names,
alias augmentation and collision checks. No private overlay or ruleset
provenance is required. A catalog system selector does not choose an inferred
recognition ruleset. References are context, not transcript evidence; generated
same-run handoffs remain configured within Notarius.
### Notarius completion, products, and cache
Wait for successful process completion before interpreting stdout as a successful
report. The native report contains `pipeline`, `artifact_count`, absolute
`output_directory`, and optional `debug_directory` and positive `fallback_count`.
It is not a receipt, inventory, or validation ledger. Use that exact directory
under the supplied staging root; never scan for the newest bundle or infer a run
ID from a name. No upstream run-ID field exists.
Every configured extraction output remains required. Read documented
`lanes/<mapped-lane-id>.json` files, applying the upstream mapping for custom
lane IDs. Check expected pipeline, safe placement, regular files, bounded JSON
readability, and checksums with existing machinery. Keep `lane_id`; remove
`media_type`, `schema_id`, `schema_version`, and `module_key` descriptor constraints.
Trust Notarius's native domain validation rather than adding payload schemas or
semantic assessment. Preserve `narratio.extraction.<output_key>` source identities.
Promote configured products to the flat artifact destinations only after bundle
acceptance, preserving existing staged-validation/atomic-promotion guarantees
before recording success. `artifact_count` includes reused results and enabled
auxiliaries, so it is not a required-output-count check. Retain optional
`chunk-map.json` and `evidence-context.json` with the original bundle when emitted;
they are domain auxiliaries, not report sidecars. New selectable sources for them
are not required. The maintained complete D&D pipeline still has ten lanes.
Remove receipt/index/sidecar parsing, descriptor comparisons, rejection/warning
count reconciliation, and `notarius_index` from execution, hydration, evidence,
reuse, publication, and restore. Do not create a substitute index. Record
Narratio-owned input/output evidence and factual native completion information,
distinguishing configured expectations from producer attestations.
Nonzero exit, malformed successful stdout, or missing required files fail. Report
or capture failure can follow artifact publication: preserve diagnostics and
available files, but do not recover success automatically from partial stdout
or incidental files. Honor native successful permissive completion subject to
required-file checks. Record and display positive `fallback_count` in ordinary
extraction results and later reuse; it counts emitting operations, not affected
lanes. Notarius owns strict/permissive settings and its strict default.
Replace Narratio's `pipeline.notarius.resume` and `.chunk_cache` with optional
`.cache`. Omission passes no flag; forced extraction uses `--cache refresh`.
Narratio's stage reuse and Notarius's accepted-result cache are separate.
Cache/debug selection alone does not stale completed Narratio products. Fingerprint
result-affecting Narratio inputs, references, output selection, pipeline identity,
and explicit overlay selection, not private downstream config or cache formats.
Downstream model/settings/validation changes may still hit native cache; document
forced extraction as the explicit way to request fresh work. Notarius owns cache
placement and cleanup; old native caches stay ignored and untouched.
## Readiness and invocation lifecycle
Reuse `internal/preflight`, lazy adapter composition, and production acquisition
paths. Automatic readiness follows selected preparation and precedes processing
for stages needing execution. Explicit `session validate` uses prepared inputs;
planning remains subprocess-free. Keep prepared-reference integrity checks and
Narratio's required-lane checks through native pipeline inspection. A failed or
incomplete required inspection is not evidence of readiness.
Run full Audita preflight and native
`notarius preflight <pipeline_id> --input-file <transcript> ... --format json`
with the execution config/overlay, references, credentials, cache selection, and
appropriate probe output/debug destinations. Notarius chooses applicable provider
targets and checks modules, transcript/references, destination/cache access,
reachability, authentication, and structured generation. It does not extract or
publish domain artifacts. No separate `promptkit test all`, maintained profile
list, or mandatory additional `pipeline validate` subprocess is needed.
Require successful status and a complete assessment for the expected Notarius
pipeline with `ready: true`. Preserve warnings and debug locations; cache-access
warnings alone do not fail readiness. Nonzero exit fails even with `ready: true`;
early failure can omit the report and failed delivery can leave partial bytes.
Keep native error semantics rather than inventing an error taxonomy.
Provider probes can be billable and may create probe directories, temporary files,
and selected debug capture. Use an appropriate real execution transcript when
available; otherwise use the existing known-good synthetic transcript for early
readiness as with Audita. Report which input was checked. Synthetic success does
not validate the future final trimmed transcript, which run validates normally.
Do not add two mandatory paid probe passes.
Readiness is an invocation check, not another resumable pipeline stage. Keep its
diagnostics distinct from actual extraction/polish attempts so a probe does not
misrepresent which stage last executed. Use existing validation/reporting paths
for explicit and automatic checks, with additional explanatory output where useful.
## Session workspace and diagnostics
### Final layout and ownership
Keep the configurable workspace root and default `/var/lib/narratio`; sessions
remain under `work/<campaign>/<session>`. Centralize all changed paths in the
existing path owner.
| Session-relative path | Role |
| --- | --- |
| `manifest.json` | Narratio progress, supported-state identity, evidence, and output references. |
| `artifacts/<filename>` | Flat completed configured artifacts, including intermediate session bounds. |
| `transcripts/<filename>` | Combined and rendered transcripts. |
| `transcripts/raw/<speaker>.json` | Initial per-speaker transcripts. |
| `audio/` | The single retained Narratio-managed prepared audio copy. |
| `inputs/` | Prepared configuration and other external inputs. |
| `inputs/previous/` | Prepared previous-session material. |
| `inputs/references/` | Content-identified reference snapshots supplied to subprocesses. |
| `logs/<stage>` | Relative symlink to the latest actual attempt's run-local logs. |
| `debug/<stage>` | Relative symlink to that attempt's debug directory, possibly empty. |
| `runs/<run_id>/<stage>/logs/` | Actual process streams, invocation records, and execution reports. |
| `runs/<run_id>/<stage>/debug/` | Actual optional captures and retained diagnostic state snapshots. |
| `runs/<run_id>/` | Narratio staging, original tool bundles, and retained execution evidence. |
Outputs consumed by later stages retain their output paths. Narratio's lock,
manifest, restore marker, and staging are its State; no extra root-level State
directory is needed. Input configuration follows its input/staging role;
invocation descriptions are Logs. Subprocesses own their working State and Cache
through their supported configuration, outside Narratio cleanup responsibility.
Dedicated cache roots such as `/var/cache/notarius` are deployment recommendations,
not Narratio-imposed internal layouts.
### Output placement and collision checks
Apply flat artifact placement to explicit analysis outputs, expanded character
families, extraction products, and session bounds. Preserve configured analysis
filenames within that constraint. Derive extraction names from configured output
keys plus `.json`, with an optional explicit filename override. Keep
`session_bounds.json` as the default bounds name. Validate collisions across the
effective pipeline, expanded families, and built-in destinations before execution;
report conflicting producers and destinations, without silently renaming files.
Combined transcripts stay directly beneath `transcripts/`. Remove unused
`transcripts/trimmed/` scaffolding and reconcile configurable destinations with
their categories. Local flattening does not flatten explicit remote publish
destinations. Seriatim execution reports move from artifacts to run-local Logs.
Promoted extraction products resolve independently of their original bundle.
Retained bundle evidence remains under runs with an explicit retention role;
relocation must not silently shorten its existing lifetime.
### Audio acquisition
Remove Narratio's persistent S3 audio cache and retained spool duplicates,
obsolete configuration, manifest bookkeeping, and cleanup controls. Temporary
download files may be used to install validated session audio. Preserve reuse
of valid prepared audio and restore into the same `audio/` layout. Recreating
a session after its prepared audio is removed fetches the source again. This
change does not delete original recordings or newly authorize prepared-audio
deletion; downstream caches remain separately managed.
### Latest attempts, debug, and retention
At each actual stage attempt, create its run-local log and debug directories
and advance both relative links, including when the attempt fails. For example,
`logs/polish` points to `../runs/<run_id>/polish/logs/`. An attempt without capture
exposes an empty debug directory; a skipped stage leaves both prior views intact.
Fully reused invocations must not create empty run directories merely for views.
Distinguish multiple applications/artifact invocations by their diagnostic names.
Restore has its own run-local diagnostic group and `logs/restore` latest view.
Producers write to actual run paths; links are operator navigation, not a duplicate
store. Publication and manifest diagnostics reference actual paths. Support these
managed links without permitting arbitrary symlink traversal. Rotation does not
move historical files. Run cleanup preserves current latest-view targets and
retained evidence according to role; add no automatic history age/count limit.
Explicit whole-session removal removes its views with it.
Retain Audita's debug selector and add Notarius's enable-only selector. True
requests capture; omission/false passes no enablement override and preserves
downstream settings. Supply actual destinations even when upstream configuration
enables capture. Notarius's destination alone does not enable capture. Audita's
debug work-directory control is diagnostic placement, not ownership of generic
working State.
Route Scriptorium's existing per-artifact render-debug products to run-local
`analyze`/`trim` debug directories. Preserve per-artifact selection. Seriatim
needs no invented debug mode; ordinary reports are Logs. Subprocess-defined
nested capture directories are allowed. Notarius capture stays private: do not
parse it as an API or use its `latest` link to find outputs. Capture does not
imply sanitization of arbitrary file contents; retain existing stream redaction
boundaries, write-failure semantics, and useful evidence on error.
Full Audita/Notarius debug bundles remain local. Preserve publication of currently
declared diagnostics, including existing render-debug products; enabling capture
does not add remote archives implicitly. Debug controls act when a stage executes,
not as product invalidators. Operators force execution to obtain fresh diagnostics
when products would otherwise be reused.
## One cutover and durable-state boundary
This combined feature supports newly prepared sessions in the new format.
Introduce an explicit supported-state identity/version using Narratio's existing
manifest/state mechanism. Old local sessions and old remote snapshots must not
be silently resumed, converted, rewritten, or restored into the new layout.
Detect unsupported state before mutation and provide regeneration/manual
configuration guidance. Historical files and bundles remain untouched; no
compatibility path or automatic deletion is introduced.
This boundary supersedes the separate adapter roadmap's proposal to upgrade
old extraction evidence in place. Within supported new-format sessions, preserve
ordinary per-speaker/per-artifact reuse, forced execution, obsolete-evidence
staling, and transitive invalidation. Do not rerun unrelated stages solely because
an executable version changes. Keep the existing treatment of old completed
products after invalidation or failed replacement, including manifest-backed
availability; relocation does not introduce rollback, fallback, or stale-file
deletion semantics.
Update prepared records, reference snapshots, semantic evidence, artifact
resolution, publication, restore, and cleanup together. Publish declared products
and diagnostics; restore new-format inputs/products into canonical new paths.
Preserve session locking, incomplete-restore recovery, the existing remote commit
protocol, and successful-publication prerequisites for automatic cleanup. Respect
separate subprocess Cache/State and latest-attempt retention when computing
cleanup targets.
## Delivery, documentation, and verification
The implementation plan should sequence these outcomes within the single sprint:
1. Settle OD-1, define the supported-state boundary, and establish canonical
shared acquisition and workspace paths.
2. Migrate the catalog and maintained campaign examples; prepare the roster,
autocorrection input, four glossaries, combined projection, and references.
3. Cut both subprocess adapters and shared readiness over to their released
interfaces; remove private spell/receipt/index machinery.
4. Complete flat promotion, latest diagnostics, audio simplification, and all
evidence/reuse/publication/restore/cleanup consumers of the new paths.
5. Verify the complete operator workflow, document migration, and finish the
supported final state. No intermediate release or compatibility layer is needed.
Keep existing application/adapter boundaries and reuse production checking paths.
Replace obsolete tests and fixtures rather than preserving retired protocols.
Verification must cover the following observable outcomes:
| Area | Required evidence |
| --- | --- |
| Campaign workflow | A complete synthetic three-file bundle selects catalog data and initializes sessions without extra vocabulary, autocorrection, or template files; omitted/supplied sections and explicit overrides behave as documented. |
| Shared acquisition | Native source-relative imports and resolution, schema/semantic failures, Narratio roster requirements, shared extensions, and omitted/null/empty distinctions are exercised without a second parser. |
| Preparation | Four individual envelopes and the combined file have verified manifest-backed identities/dependencies; changed combined content invalidates downstream extraction as specified. |
| Catalog | Every indexed source resolves to the intended shared collection; independent checks cover partial inputs, null aliases, extensions, wrong markers/known fields, and duplicate final IDs. |
| Audita | Repeated shared files, empty collection/task readiness, extension/instruction handling, native flags, and processing/preflight parity work with v4.3.0. |
| Notarius | Native args, overlay/reference forwarding, custom lane filename mapping, optional auxiliaries, safe required-file checks, malformed/nonzero completion, and visible fallback qualifications including reuse are covered. |
| Readiness | Shared automatic/explicit paths, preparation ordering, required-lane checks, provider/reference failures, cache warnings, and synthetic-input limitations are covered without duplicate probe passes. |
| Paths and diagnostics | Flat products, effective collision detection, success/failure latest views, empty debug views, skipped stages, lazy run creation, and debug routing preserve their selected semantics. |
| Reuse and cache | Forced refresh, completed-work reuse, changed-input invalidation, unchanged cache/debug-only selection, and failed replacements retain the intended boundaries. |
| Durable lifecycle | New-format publication/restore and cleanup preserve products, latest targets, retained evidence, and separate caches; unsupported old state is rejected without mutation. |
| Audio | Acquisition, reuse, and restore use one retained prepared copy without persistent spool/cache duplicates. |
Use temporary filesystems and controlled subprocess/provider boundaries. Default
tests remain offline, deterministic, independent of sibling checkouts, credentials,
and paid services. Refresh opt-in real Audita/Notarius compatibility checks with
controlled local providers, including the complete Notarius D&D pipeline and
native reuse, before claiming tested interoperability. Do not equate valid schemas
or green unit tests with that evidence. Run the appropriate repository checks
from [Development](../development.md) for the completed implementation.
When behavior lands, update canonical configuration/CLI/integration references,
Operations, internal preparation/workspace/artifact/manifest/adapter documentation,
troubleshooting, architecture policy, and maintained examples. Distinguish typed
operational settings from extensible shared documents. Remove obsolete audio
cache/spool and extraction-bundle/index assumptions. Document managed navigation
links and independently configured application caches.
Release guidance must describe the new campaign/session fields, shared input
formats, removed private sources and descriptors, native cache/debug behavior,
state cutover and regeneration, and changed local layout. Audita remains config
version 3; Notarius uses version 6. Link upstream for resource composition,
producer modes, semantic correction turns, concurrency, and other downstream
migration details rather than translating them in Narratio. Record tested
dependency/catalog revisions and preserve schema attribution. No runtime old-version
gate or fallback adapter is needed; unsupported executable interfaces fail normally.
## Open decisions
### OD-1: Confirm the concrete campaign and session extension interface
The three-document workflow, optional campaign vocabulary/autocorrection,
Narratio-wide roster policy, combined glossary, and workspace cutover are settled.
The exact field names and clearing behavior in
[Concrete field layout for review](#concrete-field-layout-for-review) are proposed
here to make implementation planning concrete.
**Recommendation:** use that layout: shared identity/selectors/references at the
root, `narratio.inputs` for operational campaign inputs, matching session `inputs`
overrides, and explicit inline autocorrection lists with native imports for splits.
Use campaign, installation, then built-in template selection. It preserves
existing input vocabulary where useful without preserving the old campaign shape.
**Alternative:** flatten the campaign extension (`narratio.speakers_file`,
`narratio.glossary`, etc.) and choose corresponding session spellings. This changes
the public interface but not the established workflow. Settle the spelling and
presence rules together before writing field-level implementation tasks.
No upstream capability request or catalog release machinery blocks this scope.
Package placement, the exact state-version value, and implementation task ordering
belong in the implementation plan, not additional product decisions.

View File

@@ -1,271 +0,0 @@
# Shared schemas repository alignment: implementation plan
## Scope and execution
Implement step 1 of the [shared-schema adoption roadmap](schemas.md) in
`../schemas`. This plan is proposed work, not evidence of implementation. The
baseline is schemas commit `9f7744b`, which includes the reviewed decoder fixes.
The initial repository has no published contracts assumed by this plan; recheck
publication state before changing candidate identities.
Run this as one end-to-end sprint. Stages express dependency order and reviewable
outcomes, not mandatory intermediate releases or approval gates. Intermediate
commits need not compile; the completed sprint must satisfy all acceptance checks.
Do not implement application adoption, change domain field meanings, add legacy
readers, adopt ReleaseKit, provision hosting, push, tag, or publish as part of the
sprint. Publication requires a later explicit request.
Planning baseline: start each of the three schemas at `0.1.0`, retaining the
agreed `.v1` document contract generations. This is the recommended initial
version choice for review before implementation, not a claim that it was already
selected in the roadmap. Version `1.0.0` becomes appropriate for each schema when
consumer adoption establishes its stable contract. The directory names in the
roadmap are illustrative, not instructions to declare stability now.
## Execution status
- Stage 1 complete: schemas commit `d4488ab` moves the contracts, semantics,
and examples to independent `v0.1.0` roots and adopts the RPG identifiers.
Decoder-profile and numeric-precision regressions pass.
- Stage 2 complete: schemas commit `2bf4e82` introduces the catalog and offline
version-aware loader. Focused catalog tests pass, including two definitions
sharing one document marker, inventory failures, and absent offline references.
- Stage 3 complete: schemas commit `f168d01` requires exact `name@version`
CLI selection and reports that selection on success.
- Stage 4 complete: schemas commit `053219b` separates CalVer distributions,
independent schema SemVer, document generations, and canonical IDs. Release
history checks preserve published records and directory contents, with
disposable local Git fixtures covering changes, removals, and additions.
- Stage 5 complete: schemas commit `e2e86a0` aligns all examples and tests,
verifies actual CLI selection between two temporary definitions sharing a generation,
checks canonical paths with a local static server, and retains the reviewed
decoder regressions. CI already invokes the unchanged common check script.
- Stage 6 complete: the locally validated candidate is schemas commit
`e2e86a0`, with distribution candidate `2026.11.0` and all three independent
schema versions at `0.1.0`. Full tests, vet, repeated race/shuffle tests, exact
CLI example invocations, and `GOTOOLCHAIN=go1.27.4 sh scripts/check.sh` passed.
Its test pass from the unpacked committed archive also succeeded. A local preview
archive is available at `../schemas/dist/schemas-2026.11.0.tar.gz`.
The final scope review found no domain-field changes beyond the requested
unpublished marker/identity transition. The internal module, dependencies, and
reviewed decoder implementation remain unchanged. Exact source metadata and
historical origin snapshots remain preserved. Narratio application code and
the pending consumer/workspace roadmaps are unchanged.
Production URL delivery and CI execution were not performed; local static
serving and the documented CI command passed. A later explicit release task
must select the actual publication month/counter, record its publication date,
and publish. Hosting and consumer adoption remain outside this sprint.
No upstream tags existed when execution began. No tag or push has been made.
## Stage 1 — Move contracts and establish their identities
Move the current `schemas/*.schema.json`, `docs/{party,campaign,glossary}.md`,
and corresponding examples into these contract roots:
| Schema name | Initial directory | Document contract |
| --- | --- | --- |
| `glossary` | `glossary/v0.1.0/` | `maximumdirect.glossary.v1` |
| `rpg/party` | `rpg/party/v0.1.0/` | `maximumdirect.rpg.party.v1` |
| `rpg/campaign` | `rpg/campaign/v0.1.0/` | `maximumdirect.rpg.campaign.v1` |
Each directory contains `schema.json`, `semantics.md`, and `examples/`. Keep the
weather and sports examples with glossary to demonstrate domain independence.
Keep validation fixtures, tools, and repository-wide guidance outside published
contract directories. Preserve attribution and historical source snapshots under
`docs/origins/`; they are evidence of origins, not active competing contracts.
Set each `$id` to `https://schemas.maximumdirect.net/` plus its repository-relative
schema path. Rename active party/campaign markers in schemas, examples, fixtures,
and documentation. Update relative documentation links and any references affected
by the moves. Remove the obsolete active flat layout; add no redirects or aliases
for unpublished candidate formats. Preserve the CC0 dedication and incorporated
material's attribution.
Acceptance: the three roots contain complete contracts; canonical IDs match file
paths; YAML/JSON examples retain their data except for the intended identifiers.
No domain restrictions or glossary instruction semantics have been introduced.
## Stage 2 — Introduce the version inventory and offline loading
Add root `catalog.json`, with a documented format in `docs/catalog.md`. Use one
record per schema version. A small proposed shape is:
```json
{
"format_version": 1,
"schemas": [
{
"name": "rpg/party",
"version": "0.1.0",
"contract": "maximumdirect.rpg.party.v1",
"id": "https://schemas.maximumdirect.net/rpg/party/v0.1.0/schema.json",
"path": "rpg/party/v0.1.0/schema.json"
}
]
}
```
The real inventory includes all three schemas and, later, retained published
versions. Semantics and examples are adjacent by convention; avoid duplicating
their paths or inferring release status from an entry on `main`. The CalVer tag
identifies the distribution; the inventory need not repeat its version.
Adapt `internal/validation/validate.go` to load the inventory rather than the
fixed `contractNames`, flat paths, and forge URL derived from `VERSION`. Index
compiled schemas by exact identity, allowing multiple versions of one contract.
Register all bundled resources before compiling, retaining Draft 2020-12
meta-validation and the offline loader. Do not fetch schema resources over HTTP.
Check duplicate name/version pairs, duplicate IDs or paths, missing files,
version-directory agreement, and ID/path/contract agreement. Check that active
versioned schema roots are represented in the inventory. Do not treat historical
origin snapshots or negative test fixtures as published schemas. Keep selection
and semantic checks internal; no generic plugin mechanism or consumer SDK.
Acceptance: a fixture inventory containing two versions with the same document
marker loads both without overwriting either. Missing referenced schemas fail
locally. Exact schema IDs remain unchanged when only the distribution version
changes. Inventory errors identify the affected record or file.
## Stage 3 — Make validator version selection explicit
Extend `cmd/validate/main.go` using its existing flag handling and shared validator.
The proposed command is:
```text
go run ./cmd/validate -root . -schema rpg/party@0.1.0 DOCUMENT...
```
Require an exact `name@version` selection for a validation invocation. All supplied
documents are checked against it; use separate invocations for different schemas.
This avoids choosing a moving latest version or guessing from a major marker.
Keep `-root` for an unpacked distribution. Report the selected schema version on
success and preserve checking of later files after a document failure.
Preserve exit distinctions: usage, selection, or unusable distribution errors
return 2; document read/decode/structure/semantic failures return 1; success returns
0. A document marker that disagrees with the selected schema is a structural
failure. Retain glossary ID uniqueness after structure validation, extension
preservation, and the existing JSON/YAML profile. Neither structural nor semantic
validation may normalize, populate defaults, or mutate input data.
Acceptance: focused CLI checks cover exact selection, unknown or missing
selection, marker mismatch, mixed valid/invalid files, and success from an unpacked
root. With two compatible versions sharing a marker, a controlled fixture proves
that selection actually chooses the requested definition. Retain the surrogate
pair, duplicate-key, numeric precision, and malformed tagged-float regressions.
## Stage 4 — Align versioning, release documentation, and immutability
Revise `README.md`, `docs/compatibility.md`, `docs/release.md`, `docs/development.md`,
`docs/validation.md`, and affected inventory/example links. Keep current behavior
accurate as the implementation lands. Explain these independent identities:
CalVer distribution, full per-schema SemVer, document contract generation, and
canonical `$id`. Do not derive the `.v1` marker mechanically from a pre-stable
`0.1.0` version or couple schema versions to Go module major versions.
Use repository tags and `VERSION` in `YYYY.MM.MICRO` format, without a `v` prefix.
Use the UTC publication month and a counter starting at zero; schema directories
retain their `v` prefix. During implementation, record an unpublished candidate
for the current UTC month, and replace the old unpublished `v1.0.0` release note
with the matching CalVer candidate note. Re-evaluate month and counter when an
actual release is requested; an unfinished sprint must not reserve a date.
Record the exact publication date in the release note when preparing the actual
release. Each repository release note identifies changed schema versions and
relevant compatibility/migration information. Preserve already-published version
directories byte-for-byte, including semantics and examples; changes require new
schema versions. Independent stable schemas follow SemVer. Pre-stable breaking
changes still require a new document contract generation under the roadmap's
explicit policy. Document how operators and consumers migrate rather than
introducing conversions.
Keep the source-only release procedure small. Adapt its existing fresh-tag,
clean-candidate, authoritative-remote, fast-forward, validation, and atomic
branch/tag publication checks to CalVer. Before later publication, compare retained
published directories against the inventories in earlier authoritative release
tags; additions are allowed, changes or removals are not. The initial release has
no published baseline. Use focused Git/file checks rather than a new release
framework. Exercise any new check logic with disposable local fixtures, without
publishing this repository.
Explain that hosting directly from `main` is supported: candidate files may be
visible, but only published tags and their inventories establish released
versions. No backend release selector, live website test, or consumer adoption is
a source-publication gate. Source release completes on successful publication;
optional subsequent URL inspection is delivery verification. ReleaseKit remains
deferred. Keep the current internal Go module identity and pinned libraries unless
an actual implementation need justifies a change.
Acceptance: no active instruction assumes a repository SemVer release, rewrites
all schema IDs on every release, or requires release-selected hosting. Consumers
can follow a documented example to pin one schema version from a CalVer archive,
bundle its dependency closure and semantics, and ignore unrelated updates.
## Stage 5 — Align verification, CI, and source distribution
Update `internal/validation/validation_test.go`,
`internal/validation/documentation_test.go`, CLI tests, `scripts/check.sh`, and
`.woodpecker.yml` where their assumptions changed. Retain established parser and
domain tests; replace only obsolete paths, markers, and selection assumptions.
Use synthetic temporary versions for multi-version tests rather than adding fake
released versions to the real catalog.
Verification must cover:
- Every inventoried schema compiles offline and its examples validate under its
exact version; semantic duplicate IDs still fail after structural success.
- Known-field constraints, extensions, omission/null distinctions, YAML/JSON
equivalence, and the two reviewed decoding fixes remain protected.
- Inventory collisions, missing references, path/ID mismatch, and explicit
multi-version selection fail or succeed as specified in stages 2 and 3.
- Published-directory checks detect modifications/removals while permitting a new
version and an otherwise unchanged schema in a later CalVer snapshot.
- Documentation links, semantic documents, examples, license/attribution, catalog,
and candidate release note are present in the unpacked committed archive.
- A local static-file server exposes each schema at the path represented by its
`$id`, returning the same JSON bytes. This needs no production host or external
network access.
Retain the unpacked-archive test: it must work without the original checkout or
Git metadata inside the extracted tree. Keep Git history-based immutability checks
separate from offline distribution checks. Prepare dependencies before validation;
normal checks require no providers, credentials, consumer installs, or live URLs.
Do not build a generic schema compatibility prover or repeat upstream library
suites. Repository CI continues to run the same documented checks.
Acceptance: focused tests pass, then `GOTOOLCHAIN=go1.27.4 go test ./...` and
`GOTOOLCHAIN=go1.27.4 go vet ./...` pass. After committing the intended candidate,
`GOTOOLCHAIN=go1.27.4 sh scripts/check.sh` passes for that exact revision.
## Stage 6 — Audit and hand off the unpublished candidate
Review the final diff against every requirement in roadmap step 1. Check for
stale active forge IDs, old markers, flat-layout commands, SemVer repository
assumptions, and ReleaseKit/hosting release gates. Historical origin records may
retain historical identifiers. Confirm that no compatibility shim, SDK, runtime
network resolution, application migration, tag, or push was introduced.
Record the completed stages, candidate commit, actual initial schema versions,
validation results, and any unresolved limitations. Keep both the schema checkout
and planning changes committed and clean. Stop at a locally validated, unpublished
candidate. A later explicit release task selects the actual CalVer version and
performs publication; it is outside this sprint.
## Completion evidence
| Roadmap requirement | Evidence at sprint completion |
| --- | --- |
| Independent identities and RPG namespace | Version directories, catalog, matching IDs/markers, schema tests |
| URL-aligned hosting from `main` | Direct repository paths and local static-serving check |
| Immutable versions and CalVer snapshots | Compatibility policy, release procedure, focused history-check fixtures |
| Selective offline consumer adoption | Exact validator selection, reference-resolution checks, consumer instructions |
| Complete distribution | Archive checks, versioned semantics/examples, license and attribution |
| No premature publication or consumer work | Reviewed scope diff, unchanged remote publication state, clean local candidate |
No upstream application decisions block this repository alignment. Execution
selected the plan's initial `0.1.0` versions and exact CLI/catalog conventions.
Release publication and application adoption remain separately authorized work.

View File

@@ -1,273 +0,0 @@
# Adopt shared domain schemas across the pipeline
## Purpose and current status
Operators maintain one set of domain inputs, primarily in YAML. Narratio prepares
durable snapshots and necessary projections; consumers own task-specific
interpretation. Adopt the shared contracts as complete cutovers without legacy
readers, duplicate authored vocabulary, or a schema SDK dependency.
Reviewed on 2026-11-29 against released tags and their source documents:
| Component | Released baseline | Source commit | Status relative to Narratio |
| --- | --- | --- | --- |
| Shared schemas | `2026.11.1`; glossary, RPG party, RPG campaign `0.2.0` | `f7e3cedeca11ed903311cdf29ca4d81fb1f216b7` | Published; Narratio still uses its own roster and wrapperless glossary formats. |
| Audita | `v4.3.0` | `6f97f31ccb1436c9b1e144182f6ad0b1fd9524be` | Shared runtime glossaries implemented upstream; Narratio currently targets v4.2. |
| Notarius | `v0.10.0` | `752c9b44d2c0bb3bfb1e02a5d4379f7cc5b6261e` | Shared references and pipeline-aware preflight implemented upstream; Narratio still targets v0.8.1. |
Canonical release records:
[schemas](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/releases/2026.11.1.md),
[Audita](https://forge.maximumdirect.net/eric/audita/src/tag/v4.3.0/docs/releases/v4.3.0.md),
[Notarius](https://forge.maximumdirect.net/eric/notarius/src/tag/v0.10.0/docs/releases/v0.10.0.md).
The schema repository foundation and both applications' upstream adoption are
complete. The former [schema-repository implementation plan](schemas-implementation.md)
records historical work, not the next sprint. This roadmap now owns Narratio's
remaining coordinated cutover, together with the focused [Audita](audita.md) and
[Notarius](notarius.md) roadmaps. No application changes are implemented here.
## Shared contracts and ownership
Pin exact `0.2.0` schema files, their semantics, and source distribution
`2026.11.1` for offline use. Markers remain `maximumdirect.glossary.v1`,
`maximumdirect.rpg.party.v1`, and `maximumdirect.rpg.campaign.v1`.
The marker alone does not identify the exact schema version. Canonical IDs use
`https://schemas.maximumdirect.net/<name>/v0.2.0/schema.json`.
The [upstream compatibility policy](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.1/docs/compatibility.md)
owns CalVer, independent schema SemVer, and marker policy. Pre-1.0 changes may
retain `.v1`; schema major 2 introduces `.v2`.
ConfigKit v1.4.0 owns native acquisition/resolution through the handoff. Validate
completed domain mappings after composition. Preserve supported resolved values,
extensions, and omission/null distinctions; numeric binding and source limits
follow upstream. Schema-resource JSON retains exact numeric constraints.
Narratio applies its additional roster requirements after shared validation.
No private input inspection, scalar repair, second parser, runtime schema
downloads, or extra global extension restrictions are needed.
The glossary envelope has `schema_version` and `collections`. Task instructions
belong to consumer configuration. An `instruction` extension remains data.
The shared party contract allows optional players/classes and uses `aliases`.
Narratio retains its documented additional roster requirements across the
application, including required player/class information. These are Narratio's
consumer requirements; they do not change the upstream shared contract.
## Agreed operator contract
### Three campaign-owned documents
Given a configured Narratio installation and an installed shared reference
catalog, an operator onboards a campaign with three primary authored documents:
| Document | Responsibility |
| --- | --- |
| `party.yml` | Canonical character roster: stable IDs, characters, players, classes, and optional aliases, using shared RPG party `0.2.0` plus Narratio's roster requirements. |
| `campaign.yml` | Shared RPG campaign `0.2.0` identity and context, including campaign name and setting/system selections, the party reference, and a `narratio` extension for operational settings, optional campaign glossary, and optional autocorrection rules. |
| `speakers.yml` | Explicit mappings from recording filenames or speaker identifiers to transcript speaker labels, retaining the supported speaker-mapping format. |
The campaign identifies its roster and speaker mappings; the standard bundle
uses the adjacent `party.yml` and `speakers.yml`. Speaker labels can represent
players, a GM, or other recorded participants. Recording identity has a separate
role from fictional character identity.
Adapt the existing authored `campaign.yml` to the shared envelope, with
Narratio-owned operational fields grouped under `narratio`. The shared `id`
becomes the campaign identity used by Narratio. Party relationships use
`references.party`. Replace the old operational document shape through the
coordinated cutover; no additional authored campaign-context file is required.
The shared schema owns its fields; Narratio defines its extension and consumer
requirements.
Operators can include campaign-specific vocabulary and autocorrection rules in
the campaign document. Omitted autocorrection rules mean no campaign-specific
replacements. Preparation materializes the downstream autocorrection input from
the completed configuration. A standalone authored `autocorrect.yml` or campaign
glossary file is not required for the standard bundle. Explicit replacement
rules remain distinct from glossary entries.
Keep ordinary session initialization usable with installation-level/default
templating. Per-campaign template customization remains an option. Native
ConfigKit imports and optional authoring splits remain available; three primary
documents define the onboarding path, not a prohibition on additional files.
### Two selected shared vocabulary documents
The campaign selects a setting glossary and a system spell catalog from an
installed shared repository. For example, a Forgotten Realms setting selection
and a D&D 5e 2014 SRD system selection identify the corresponding shared
documents. The spell catalog uses the shared glossary envelope and `spells`
collection rather than Notarius's retired private overlay.
Use stable setting/system keys in the campaign document to select entries in
the installation's reference catalog. Its mapping owns source paths. Document
Narratio's interpretation of those keys: the generic shared campaign schema
does not itself prescribe a catalog lookup. Operators select shared vocabulary
rather than authoring campaign-local copies. Optional campaign vocabulary adds
local terms through the established composition behavior. General shared
glossary references express relationships; their ordering does not implicitly
replace Narratio's documented composition precedence.
### Responsibility and documentation boundaries
- Installation setup supplies pipeline configuration, services, credentials,
and the selected shared reference catalog.
- Campaign setup supplies the three documents and selects the two shared
vocabulary sources.
- Session execution supplies session identification, audio, and applicable
session-specific metadata or overrides.
Publish one operator-facing contract with each field's required/optional status,
omission/default behavior, selection rules, and reference-path resolution when
implementation lands. Keep the onboarding checklist and worked workflow in the
operator guide, field definitions in the configuration reference, and reusable
domain formats in their integration contracts. Link upstream for shared schema
and ConfigKit semantics. A complete maintained example must demonstrate the
standard three-file campaign bundle without additional campaign-owned files.
## Agreed roster validation
Retain Narratio-wide domain requirements during the shared-format cutover:
- A nonempty roster with stable IDs satisfying Narratio's artifact-key rules.
- Required player and character names, and a nonempty class list for every
character; class names are required and supplied levels remain positive.
- Existing trimmed/nonempty display-name checks, character-name/alias ambiguity
checks, and duplicate-class checks. Player names may repeat.
Apply these requirements consistently when Narratio resolves the roster, rather
than conditioning them on selected artifacts. Adopt the shared marker and
`aliases` spelling and preserve supported shared extensions. Document the
Narratio-specific profile separately from upstream conformance. Update the
architecture/configuration documentation to distinguish Narratio-owned typed
configuration from shared domain documents and their supported extensions.
## Agreed combined glossary
Retain the four logical prepared sources: party, campaign, setting, and spells.
Save one additional derived shared envelope containing all four collections,
including empty collections, with the explicit source identity
`narratio.input.glossary.combined`. Bind that verified prepared file to both
Notarius's `glossary` and `spell_catalog` roles. Each role retains native
collection selection. Audita and other consumers can continue using the
individual sources where appropriate.
The combined file is generated by Narratio and requires no additional operator
authoring. Record its dependencies on the four sources and use the existing
whole-file content evidence for reference snapshots and reuse. Changing a
collection can invalidate extraction even when a Notarius role does not select
it; collection-aware cache evidence is not required for this feature. The new
identity does not restore the retired `narratio.input.glossary` alias. The
separate private spell-overlay source is retired as part of the same cutover.
## Upstream capabilities now available
Audita accepts repeatable explicit `--glossary-file` inputs in the shared format.
It composes and validates the completed envelope before applying entry lists.
Supplied entry lists override same-named configured lists; unrelated collections
remain. Loading and collection selection are separate. Automatic glossary
companions were removed; inline application instructions remain supported.
See the [focused adoption roadmap](audita.md).
Notarius accepts shared party documents in `party`/accepted `roster` slots and
shared glossaries in `glossary` and `spell_catalog`. One shared file may serve
both glossary roles. General context defaults to available campaign/setting;
spells default to a required `spells` collection when the slot is bound.
Explicit collection selection and CLI path overrides follow native semantics.
A private spell overlay and ruleset provenance are no longer required.
Notarius also provides native pipeline-aware preflight with run selectors,
transcript, and runtime reference bindings. The former required-reference gap
and need for hand-maintained PromptKit profile lists are resolved upstream.
Preflight remains online, potentially billable, input-specific, and separate
from offline validation and ordinary execution. Details belong in the
[Notarius roadmap](notarius.md).
## Required Narratio changes
### Shared acquisition and preparation
Adopt the pinned party, glossary, and campaign contracts together with the
agreed Narratio roster profile and three-file operator contract. Refactor the
existing campaign acquisition into one shared-conforming authored document with
its explicit Narratio extension. Update identity selection, configuration
inspection, resource resolution, campaign-to-session defaults, and session
initialization for that shape through the native ConfigKit lifecycle.
Replace mandatory standalone autocorrection authoring with the optional campaign
section and its prepared downstream projection. Retain the dedicated speaker
mapping document and existing Seriatim behavior. Update prepared campaign and
autocorrection records, their semantic evidence, and session override handling
together. Define field paths and omission/override behavior in the subsequent
implementation plan and operator contract without adding new prerequisites.
Derive party vocabulary from the canonical roster and prepare the four logical
glossary sources and the combined envelope described above. Preserve optional
imported or inline campaign vocabulary through ConfigKit composition. Update
the catalog's maintained vocabulary and synthetic local examples to shared
envelopes rather than keeping a second format owner. Catalog adoption remains
outstanding.
Retain whole shared documents for forwarding and derive separate task views for
artifact families and prompts. Update `alias` to `aliases`, shared markers, and
current field assumptions deliberately. Keep stable manifest-backed logical
sources and dependency evidence where their meaning is retained; new projections
need explicit identities and invalidation relationships.
### Consumer bindings and readiness
Coordinate [Audita adoption](audita.md) with shared preparation so the new
executable never receives old wrapperless files. Its current repeated file
interface can remain; the payload changes.
Coordinate the [Notarius native cutover](notarius.md) with shared references:
remove receipt/index assumptions, old invocation/cache flags, and private spell
overlay acquisition. Bind the shared roster and glossary data explicitly.
Keep native collection selection and embedded spell recognition policy in
Notarius rather than reconstructing them in Narratio.
Use the existing preflight service and lazy adapter composition. Automatic
readiness still follows selected preparation and precedes processing; explicit
session validation uses prepared inputs; planning remains subprocess-free.
A synthetic transcript can support early provider/reference readiness, as with
Audita, but cannot establish readiness of a future real transcript. Use an actual
available execution transcript where appropriate and label the supplied input
accurately. Do not add duplicate paid probes at another boundary without a
demonstrated need.
### Durable reuse and documentation
Update prepared records, reference snapshots, semantic evidence, artifact
resolution, publish/restore, prompt inputs, and affected examples together.
Obsolete evidence should follow normal staling/recomputation and transitive
invalidation; do not fabricate old-format adapters or force unrelated stages
to rerun merely because a library or executable version changed.
The [workspace roadmap](workspace.md) remains separately pending. Reuse canonical
path owners and current layout unless that work is explicitly combined later.
Do not make a workspace migration or downstream output-location change a new
prerequisite for shared-schema adoption.
## Proposed next scope and verification
Prepare one Narratio implementation plan covering the three-file campaign
contract, Narratio-wide roster validation, shared acquisition/preparation, the
combined glossary, catalog/example migration, Audita v4.3.0, and Notarius
v0.10.0. Consumers and shared preparation must reach a coherent final state in
one sprint; intermediate commits need not provide mixed-version compatibility.
Reuse existing adapter, preparation, resume, and controlled subprocess tests.
Verify a synthetic three-file campaign bundle with selected shared setting and
spell documents reaches both applications without duplicate vocabulary authoring
or a separate autocorrection/template file. Cover omitted and supplied campaign
glossary/autocorrection sections, speaker mapping, catalog selection, campaign
identity, shared-format roster rejection under Narratio's additional requirements,
and combined-file bindings and content invalidation. Verify extensions survive
forwarding, native task failures occur at the correct boundary, and forced/reused
extraction and analysis continue to work. Exercise readiness with controlled
local providers rather than requiring paid services. Verify the real upstream
executables in opt-in boundary tests before claiming tested interoperability.
The operator-contract, combined-glossary, and roster-policy choices are settled.
The next implementation plan defines concrete extension fields and migration
steps within those decisions. No further upstream feature request is currently
required for the reviewed party/glossary and readiness capabilities.

View File

@@ -1,279 +0,0 @@
# Session workspace organization
## Purpose
Give operators predictable locations for session inputs, completed outputs,
logs, and debug evidence. Apply the taxonomy in
[ADR 0001](../adr/0001-classify-session-content.md) and the ownership boundary in
[ADR 0002](../adr/0002-assign-subprocess-content-ownership.md).
This roadmap defines the target behavior and required changes. Implementation
sequencing belongs in a subsequent implementation plan. The ADRs remain
Proposed pending their acceptance.
## Confirmed Requirements
- Completed artifacts occupy a flat `artifacts/` directory. Intermediate
products such as `session_bounds.json` belong here.
- Combined transcripts occupy `transcripts/` directly. Initial per-speaker
transcripts occupy a subdirectory beneath it.
- Prepared external audio occupies `audio/`; other prepared external inputs
occupy `inputs/`. Outputs consumed by later stages retain their output paths.
- Logs and Debug use matching latest-attempt views: `logs/<stage>` and
`debug/<stage>` are symlinks to the producing run's directories. Both views
advance when a stage starts an actual attempt, including attempts that fail.
A skipped stage leaves its previous views intact.
- Execution reports and invocation records are Logs. Historical Logs and Debug
remain under their producing runs, subject to cleanup.
- Narratio can selectively request supported subprocess debug capture through
configuration. Omission preserves application configuration and defaults;
Narratio needs no explicit downstream debug-disable override.
- Prepared session audio is the single retained Narratio-managed audio copy.
Remove Narratio's separate persistent audio cache and spool duplicates.
- Configurations that produce colliding artifact names or destinations fail
validation before execution. Validation covers the effective pipeline,
including expanded character families and built-in artifact destinations.
- Narratio selects input, output, log, and debug paths. Subprocess applications
own their working State and Cache through their supported configuration.
- A dedicated cache root such as `/var/cache/notarius` is a deployment
recommendation. The application owns its cache defaults, internal layout,
identity, and reuse semantics. Narratio session cleanup respects that boundary.
- Narratio retains its own manifest, recovery records, and managed staging State.
- This is a clean cutover for newly prepared sessions. Existing-session migration
and backward compatibility shims are outside the feature.
- Treatment of older completed files after invalidation or failed replacement
remains unchanged, including their availability through manifest-backed
resolution. Directory reorganization does not authorize new stale-file
deletion, automatic fallback, or rollback behavior.
## Current Baseline
The [operator guide](../operations.md#local-state-layout) owns the current
physical layout. Relevant differences from the target are:
- Extraction moves the complete Notarius bundle to
`artifacts/notarius/<run_id>/`. Resume evidence and artifact resolution depend
on that bundle and its index.
- Merge and normalize promote Seriatim execution reports into `artifacts/`.
- Analysis output paths and character-family patterns can introduce nested
artifact directories. Output-path configuration also permits locations that
need reconciliation with the selected directory categories.
- Standard combined transcript paths already match the target. Layout creation
also creates an unused `transcripts/trimmed/` directory.
- Most subprocess diagnostics live under individual run directories. Root-level
log paths lack a consistent latest-attempt view. Audita reports use the
run-local polish log directory, and restore writes a separate top-level report.
- Prepared previous-session inputs occupy `previous/`. Narratio-owned reference
snapshots supplied to Notarius occupy session `cache/notarius/references/`.
These snapshots are distinct from Notarius's own execution caches.
- Audita's work destination is run-local, and Narratio can request its debug
capture. Narratio does not expose Notarius debug capture, and Scriptorium
render-debug placement varies.
- Narratio maintains separate S3 audio cache and spool paths in addition to the
prepared session audio copy.
## Target Layout And Ownership
Retain the configurable workspace root and its current system-wide default,
`/var/lib/narratio`. Sessions remain under
`/var/lib/narratio/work/<campaign>/<session>` by default. The following paths
express the selected categories:
| Path | Contents and role |
| --- | --- |
| `manifest.json` | Narratio's durable progress and output references. |
| `artifacts/<filename>` | Completed artifact payloads, including session bounds. |
| `transcripts/<filename>` | Completed combined transcripts and rendered transcripts. |
| `transcripts/raw/<speaker>.json` | Completed initial per-speaker transcripts. |
| `audio/` | Prepared external audio. |
| `inputs/` | Prepared configuration, references, and previous-session inputs. |
| `logs/<stage>` | Symlink to the latest attempt's run-local logs and execution reports. |
| `debug/<stage>` | Symlink to the latest attempt's run-local debug directory, empty when no capture is produced. |
| `runs/<run_id>/<stage>/logs/` | Actual logs and execution reports for that attempt. |
| `runs/<run_id>/<stage>/debug/` | Actual debug captures for that attempt, including retained state snapshots. |
| `runs/<run_id>/` | Narratio staging, original tool bundles, and retained execution evidence. |
For example, the latest views use relative links within the session:
```text
logs/polish -> ../runs/<run_id>/polish/logs/
debug/polish -> ../runs/<run_id>/polish/debug/
```
Each stage's latest attempt can belong to a different run. Producers write to
the actual run paths; the symlinks provide operator navigation without duplicate
diagnostic storage.
Narratio's lock and restore marker remain its own State. Their current placement
can remain; introducing another root-level State directory is unnecessary for
this feature. Generated records that describe an invocation belong with Logs;
configuration actually supplied as an input follows its input or staging role.
Subprocesses may create internal working directories wherever their configuration
directs. Narratio-selected staging destinations for result bundles remain valid
under ADR 0002. Cache locations are documented as operator recommendations using
each application's existing configuration surface.
## Required Changes
### Output paths and configuration
Centralize the revised paths in the existing path owner. Apply the flat artifact
rule to explicit artifacts, expanded families, extraction outputs, and session
bounds. Preserve logical source identities used by dependencies and publication.
Keep explicit analysis filenames and require flat destinations. Derive extraction
filenames from configured extraction keys with a `.json` extension, with an
explicit extraction filename override for naming preferences or collisions.
Retain `session_bounds.json` as the default bounds filename. Do not silently
rename conflicting files. Report conflicting producers and the shared destination
in configuration errors. Validate the effective configuration after composition
and family expansion.
Keep combined transcript destinations directly beneath `transcripts/`. Remove
obsolete directory scaffolding and reconcile configurable output paths with
their category. Local path changes do not require flattening explicitly
configured remote publish destinations.
### Notarius result handling and reuse
Receive and validate the complete Notarius bundle in Narratio staging. Promote
selected accepted payloads to their flat artifact destinations. Classify the
receipt, warnings, rejection summaries, and diagnostics as Logs. Keep bundle
indexes and other management metadata with the bundle or Narratio State according
to their use.
Revise extraction evidence, catalog hydration, and resume checks to resolve
promoted products independently of the old `artifacts/notarius/` layout. Retain
the identity, provenance, contract, and checksum evidence needed for current
reuse behavior. Historical bundles may remain available for inspection under
their existing retention semantics; relocating them beneath `runs/` must not
silently shorten their lifetime through run cleanup.
Preserve ordinary resume and forced-extraction behavior. Subprocess caches remain
under Notarius's control.
### Inputs
Place prepared previous-session material beneath `inputs/previous/`. Place the
stable reference snapshots Narratio supplies to Notarius beneath
`inputs/references/`, retaining their content identities where needed for reuse.
Update preparation, input resolution, manifest references, and restore mappings.
Keep source configuration ownership and prepared-file validation unchanged.
### Audio acquisition
Simplify acquisition to one prepared session copy under `audio/`. Remove the
separate Narratio S3 audio cache and routine retained spool copies, together with
their obsolete configuration, manifest bookkeeping, and cleanup controls.
Preparation may use temporary download files before installing validated audio.
Preserve reuse of valid prepared audio and update restore to use the same layout.
Recreating a session after its prepared audio is removed requires fetching the
source again. Original recordings remain outside this cleanup change. Removing
spool/cache handling does not authorize new deletion of prepared session audio.
Subprocess caches remain independently configured and managed.
### Logs and execution reports
Provide one consistent latest-attempt view per stage. Include failed attempts;
a skipped stage leaves its previous view intact. Distinguish multiple applications
or artifact invocations within a stage through their filenames. Route Seriatim
reports, Audita reports, Notarius diagnostic records, and Narratio invocation
records through this model. Treat restore execution as its own diagnostic group
under `logs/restore/`, using run-local evidence and a latest-attempt view.
Prevent a new attempt from presenting old diagnostic files as newly generated
ones. At the start of each actual stage attempt, create its run-local log and
debug directories and refresh both latest symlinks. An attempt without debug
output exposes an empty debug directory rather than an older capture. Preserve
subprocess errors and available evidence on failure. Retain existing
captured-stream redaction and limits.
Keep historical files at their run paths; rotating the links does not move files.
Run cleanup must preserve directories targeted by current latest links. Do not
introduce an automatic history age or count limit. Publication and manifest
diagnostic references use actual run paths. Adjust path handling for these
Narratio-managed navigation links without relying on arbitrary symlink traversal.
### Debug controls and placement
Retain Narratio's Audita debug selector and add Notarius debug capture using
their supported enabling CLI flags. An enabled Narratio selector requests
capture; an omitted or false selector passes no debug override and preserves the
application's configured/default behavior. Do not add a downstream disable flag.
Supply the actual run-local debug directories, exposed through `debug/polish`
and `debug/extract`. Control destinations when a downstream tool can enable
capture through its own configuration, using supported destination controls
without changing capture enablement. Audita's debug
work-directory option selects diagnostic storage and belongs to this placement
responsibility.
Route Scriptorium's existing analysis and bounds render-debug products to the
run-local directories exposed through `debug/analyze` and `debug/trim`. Preserve
its existing per-artifact selection capability. Seriatim requires no invented
debug mode; its ordinary reports are
Logs. Subprocess-defined bundle contents and nested run directories are allowed
beneath the selected run-local debug root. Logs and Debug share the same
latest-attempt semantics and cleanup protection.
Keep new full Audita and Notarius debug bundles local in this feature. Preserve
publication of currently declared diagnostics, including existing render-debug
products. Enabling capture does not implicitly add full debug bundles to remote
archives.
Debug controls govern capture when a stage executes. They do not independently
require regeneration of valid substantive outputs. Document the existing force
workflow for obtaining fresh diagnostic evidence when a stage would be reused.
Preserve downstream failure semantics for diagnostic writes and the existing
boundary of Narratio's captured-stream redaction.
### Audita destination support
Audita v4.2 supports independent transcript, report, and work destinations, and
Narratio already selects run-local paths. Narratio captures subprocess stdout
and stderr itself. This roadmap still owns latest-attempt views and retention.
Direct ordinary reports, including failure reports, to the actual polish log
directory, the transcript to its staged product destination, and retained debug
material to the actual polish debug directory. This feature uses the supported
upstream controls in a clean cutover without version-based compatibility branches.
### Manifest, publication, restore, and cleanup
Update all consumers of changed paths and file categories together. Preserve
per-speaker and per-artifact completed-work reuse. Keep publication driven by
declared products and diagnostics, with new full debug bundles remaining local.
Restore new-format products and inputs to their new locations.
Define an explicit way to identify supported session state for the clean
cutover. Document regeneration with the new version and manual configuration
updates. Avoid accepting old state through path fallbacks or silently rewriting
old local sessions or remote snapshots.
Preserve existing invalidation and failed-replacement behavior. Review retention
by content role before changing cleanup targets, especially when durable products
or historical bundles move. Run cleanup preserves the current log and debug
link targets; explicit removal of an entire session removes its local views
with it. Subprocess working State and Cache remain outside Narratio's cleanup
responsibility.
### Documentation and verification
Update configuration examples, the operator guide, adapter contracts, workspace
internals, and the architecture policy when implementation lands. Replace the
current architectural assumption that extraction requires a complete immutable
bundle beneath `artifacts/` with the selected product-promotion model. Retire
policy and documentation for Narratio's removed audio cache/spool lifecycle and
document the managed latest-attempt symlinks. Keep per-application cache locations
as deployment recommendations owned by each application's configuration.
Use focused behavioral coverage for flat output placement, collision rejection,
latest-attempt diagnostics on success and failure, debug selection and routing,
unchanged completed-work reuse, failed replacement, and new-format publish/restore.
Cover empty debug views after attempts without capture, preserved views for
skipped stages, cleanup protection of latest targets, and audio acquisition,
reuse, and restore without persistent spool/cache duplicates. Exercise cleanup
against products and separately owned caches. Use temporary filesystems and
subprocess doubles; default tests remain offline and independent
of sibling checkouts or paid providers.