diff --git a/docs/roadmap/audita.md b/docs/roadmap/audita.md index 4b54208..6eae5dd 100644 --- a/docs/roadmap/audita.md +++ b/docs/roadmap/audita.md @@ -1,25 +1,28 @@ -# Adopt Audita v4.1 and independent diagnostic destinations +# Adopt Audita v4.2, runtime glossaries, and diagnostic destinations ## Purpose -Adopt Audita v4.1.0 directly for transcript polishing. Preserve Narratio's +Adopt Audita v4.2.0 directly for transcript polishing. Preserve Narratio's orchestration and output validation while using Audita's native configuration, processing, and reporting contracts. Place the corrected transcript, ordinary reports, and optional debug evidence in their Narratio-selected destinations. -This roadmap replaces the earlier v3 adoption proposal. It defines the target -and required changes; implementation stages belong in a subsequent plan. +This roadmap supersedes the v4.1 adoption proposal and records the agreed +runtime-glossary ownership boundary. It defines the target and required changes; +implementation stages belong in a subsequent plan. The [workspace roadmap](workspace.md) owns shared layout, latest-attempt views, and retention behavior. Its referenced ADRs remain Proposed. ## Reviewed Baseline and Upstream -Narratio baseline: `c9828b2`. The reviewed Audita v4.1.0 tag identifies commit -`bdeac85e8efa0273e63e9b098d5e13cdd6df3576`. +Narratio baseline: `3b1718c44fcd893dc8c91a9bfe3950653ed7f19e`. +The reviewed Audita v4.2.0 tag identifies commit +`973b24e46618dc785751fa7c803e7c16c900353f`. Canonical upstream references: -- [v4.0 release notes][v4] and [v4.1 release notes][v41]. +- [v4.0 release notes][v4], [v4.1 release notes][v41], and + [v4.2 release notes][v42]. - [CLI][cli], [configuration][config], and [operations][operations]. - [Application schema v3 migration][schema-migration] and [v4.1 migration][migration]. @@ -30,6 +33,13 @@ Audita remains a separately installed executable. Its current library versions require no Narratio dependency upgrade for this adoption. Narratio's maintained Go toolchain already meets Audita's source-build minimum. +The separate [D&D recipe repository][recipes] was also reviewed at commit +`6d5e66dcfca4bb5971a8423332a19ce884b846c0`. Its overlays passed offline checks +against v4.2.0. Its README still describes the runtime interface as unreleased; +updating that upstream statement is a documentation follow-up, not an adapter +dependency. There is no remaining upstream feature blocker for the glossary +handoff. The Open Decisions below concern Narratio's input surface and migration. + ## Current Narratio Behavior The [Audita integration](../integrations/audita.md), @@ -50,7 +60,7 @@ describe implemented behavior: - Configured credential references use shared exact-name forwarding and captured-stream redaction. -Audita v4.1 rejects the current glossary and module flags. The old adapter and +Audita v4.2 rejects the current glossary and module flags. The old adapter and new executable therefore require a coordinated cutover. The prior roadmap's v3-only profile migration is insufficient. @@ -58,7 +68,7 @@ v3-only profile migration is insufficient. ### Native processing and configuration ownership -Narratio invokes Audita v4.1's `process` command with explicit transcript input +Narratio invokes Audita v4.2's `process` command with explicit transcript input and output paths, its existing supervisor timeout, and selected supported resource/configuration overrides. Audita owns its application schema v3, `pipeline.stages`, glossary collections, PromptKit resources, and processing @@ -71,34 +81,77 @@ and transcript output-schema overrides with their upstream meanings: process flags affect root settings, while explicit Audita per-entry settings retain their native precedence. -The removed `--glossary` and `--modules` interfaces are retired. The Open -Decisions below determine how glossary material reaches native collections and -whether Narratio retains a module-selection convenience surface. The target is -not an automatic reproduction of Audita's richer pipeline model in Narratio. +Replace the removed `--glossary` interface with native runtime inputs. The Open +Decisions below settle source selection, preparation, and retirement of the +module-selection surface. Operator-maintained Audita configuration owns the +processing pipeline; Narratio prepares its inputs and selects the configuration. Audita checks selected profiles and glossary-correction entries before preparing processing outputs or making model calls. Consume its ordinary outcomes and diagnostics; this adoption does not require a second Audita processing-readiness engine or extending Narratio's Scriptorium-specific discovery checks to Audita. -### Glossary handoff +### Runtime glossary handoff and ownership -Audita consumes named `glossary_collections` through configuration. The supported -`--glossaries` and `--protected-terms` flags select collection names, rather than -external YAML files. The old standalone glossary format is not a v4 processing -input. The handoff decision must be resolved before implementation planning. +The operator owns party rosters, campaign vocabulary, and reusable reference +libraries. Narratio owns selecting and preparing session inputs and deriving +Audita-specific projections from structured inputs it understands. Audita owns +loading and composing the supplied native collections, interpreting their +content, and executing the selected processing pipeline. -Keep Narratio's campaign/session glossary input available to its other consumers. -An Audita migration does not authorize removing the shared `glossary_file`, -changing Notarius references, or changing preparation for unrelated stages. -Any change to polish's prepared-glossary prerequisite follows the selected -handoff design explicitly. +Narratio supplies prepared collection files with repeatable `--glossary-file` +arguments. Files use Audita's wrapperless native collection shape. A file may +contain multiple collections; input order is significant under the upstream +composition rules. The existing canonical party roster supplies character IDs, +names, and aliases for a derived `party` collection. Additional campaign and +reference vocabulary remains operator-provided. Source selection and import +snapshot treatment require the decisions below before implementation planning. -Prefer native downstream configuration and overlays for glossary/protection -selections. If the selected design exposes those selections through Narratio, -forward the native distinctions between omission, null, and an explicit empty -list. Encode collection selections as the required JSON values; a comma-joined -file path is not a replacement for the removed glossary flag. +Preserve separate logical collections rather than flattening all vocabulary. +The D&D recipes use `party`, `campaign`, `setting`, and `spells`. These are recipe +roles, not mandatory Narratio-wide inputs or a closed list of allowed names. +Operators can provide prepared session collections alongside reusable references +configured in Audita, or supply all collections at runtime. + +Audita's runtime files preserve the selected main's companion discovery, overlay +context, and bootstrap. Supplying definitions does not select them; native root +and per-entry selections remain in Audita configuration. Narratio need not expose +new glossary/protection selection flags for this adoption. + +Follow the [upstream configuration contract][config] at both composition +boundaries. Runtime files compose first; their supplied entry lists then replace +configured lists at CLI precedence while unrelated collections remain. Runtime +inheritance resolves within supplied files and imports, separately from application +inheritance. Final inspection records the CLI assignment; detailed file/import +provenance remains with the preliminary load. Use these native capabilities +without reconstructing effective Audita configuration or provenance in Narratio. + +Audita's optional collection `instruction` field carries proposal guidance and +remains in the repair conversation. Preserve operator-supplied instructions; +domain guidance can live in the selected recipe. Narratio supplies the native +data format rather than maintaining Audita prompt templates or validator rules. + +Keep the shared `glossary_file` and its preparation available to other consumers, +including Notarius. This adoption changes polish's handoff explicitly; it does +not implicitly change those other integrations or promise one file format for +every downstream application. + +### D&D recipes and operator readiness + +The external D&D recipe repository owns recipe role meanings, processing stages, +profiles, and domain guidance. Document selecting its production/testing overlays +as an operator workflow, with a selected recipe revision. Operators may maintain +their own Audita configurations and overlays. Preserve Narratio's independent +downstream selectors; choosing a Narratio overlay does not automatically select +a D&D recipe. Narratio does not bundle or regenerate the upstream pipeline. + +Keep standalone `audita preflight` an optional operator diagnostic in this scope. +Its default provider smoke checks may contact services and consume usage; +`--smoke=false` selects local readiness, including temporary destination probes. +Processing already performs local preparation and does not automatically run +smoke checks. This adoption adds no automatic preflight subprocess, provider +smoke gate, or Narratio readiness-report parser. Link upstream for invocation, +side effects, and limits rather than duplicating the preflight manual. ### Products and diagnostics @@ -129,7 +182,7 @@ does not authorize transcript promotion merely because output bytes exist. Add optional `pipeline.audita.debug`, defaulting to false. True requests `--debug`; false or omission supplies no debug override. Supply `--work-dir` to select the diagnostic destination without implicitly enabling capture. -Audita v4.1 enables retained capture through its debug CLI/reporting mode; this +Audita v4.2 enables retained capture through its debug CLI/reporting mode; this roadmap adds no downstream YAML debug-enable setting. Ordinary production operation supplies neither `--debug` nor `--reporting=false`. @@ -155,7 +208,7 @@ its own configuration. Preserve Narratio's captured-stream redaction; Audita v4 does not provide application-wide credential substitution in arbitrary diagnostic artifacts. -Use a clean v4.1 cutover with manual deployment configuration migration. +Use a clean v4.2 cutover with manual deployment configuration migration. Version-dependent adapter branches and legacy CLI/configuration conversion shims are outside scope. Narratio continues to accept success with recoverable model errors and preserves the original causes and available evidence on failure. @@ -168,8 +221,8 @@ replacement remains unchanged. Replace Audita application schema v2 with schema v3 and native resource definitions using the upstream guides. Move module order to `pipeline.stages` -and glossary definitions/selections to native collections under the chosen -handoff design. Preserve intended campaign terminology, including migration of +and glossary definitions/selections to native collections and runtime inputs. +Preserve intended campaign terminology, including migration of legacy `summary` context to `description` where applicable. Remove obsolete confidence settings and prompt fields. Remove root and per-entry @@ -184,12 +237,25 @@ overlays. Link upstream for formats, whole-record prompt replacement, bootstrap, and validation commands. Narratio does not parse and rewrite private Audita configuration. Explicit downstream paths remain useful for predictable selection. +The v4.1-to-v4.2 release itself requires no configuration schema migration; +Narratio still needs the full transition from its v2 integration. Select and +install external D&D overlays independently when desired, following their own +contract and installation instructions. + ### Narratio configuration, adapter, and polish integration -Remove obsolete argument construction and resolve the module and glossary -surfaces according to the decisions below. Update request types, composition, -configuration validation/defaults, examples, and the polish stage's required -inputs together. Preserve supported selectors and their omission semantics. +Replace obsolete glossary argument construction with the ordered native runtime +file handoff and resolve the remaining surfaces according to the decisions below. +Update request types, composition, configuration validation/defaults, examples, +and the polish stage's required inputs together. Preserve supported selectors +and their omission semantics. + +Prepare and record the derived party glossary and selected runtime vocabulary +under the shared input/path owners. Bind polish's required inputs and semantic +evidence to the prepared content it actually consumes. Keep generated glossary +data separate from immutable resolved Narratio configuration. Final filenames, +projection details, and schema fields belong in the implementation plan once +the open source/preparation choices are resolved. Carry report/debug destinations and the enable-only debug choice through the adapter boundary. Align report discovery and polish's expected-path checks with @@ -203,6 +269,12 @@ rotation remain outside substantive result identity. Stable downstream selectors do not expose private prompt/configuration edits to Narratio; forcing polish remains the operator workflow for those edits. +Audita v4.2 completes normalization and chunk planning before report initialization. +An early failure may leave no reports; preserve the existing optional-diagnostic +behavior and original subprocess cause. Ordinary transcript/report schemas are +unchanged from v4.1. The new `run` alias requires no Narratio adapter change; +continue invoking `process`. + ### Workspace integration and documentation Keep link rotation, cleanup protection, physical layout cutover, and restore @@ -217,6 +289,10 @@ than duplicating library manuals. Update the workspace roadmap's outdated upstream-request description when the coordinated work lands: v4.1 already supports independent report and debug destinations. +Link to the external recipe contract for its roles and model choices and to +Audita's native inspection/preflight documentation for diagnostics. Document +Narratio-specific projection, prepared-input, and force behavior locally. + ### Verification Use focused offline tests for native invocation, the selected glossary handoff, @@ -225,6 +301,13 @@ debug selection, and shared credential forwarding. Cover empty selections, ordered/repeated processing where applicable, and native root/per-entry selector precedence without inventing a Narratio precedence rule. +Cover party IDs/names/aliases in the native projection, separate collection +preservation, ordered file forwarding, preparation failures, and the selected +import/snapshot behavior. Verify that unrelated shared glossary consumers retain +their existing inputs. Upstream owns the full native merge, instruction, and +inspection behavior; a representative controlled compatibility check is enough +at Narratio's boundary. + Verify optional and failed reports, failed output delivery, and transcript validation/promotion. Preserve existing resume/force behavior and demonstrate the semantic-evidence cutover for affected polish selections. Shared latest-view @@ -232,49 +315,75 @@ and cleanup tests belong to workspace work. Default Narratio tests use subprocess doubles and temporary filesystems, with no dependency on sibling checkouts, real credentials, or paid providers. An -optional controlled Audita v4.1 compatibility check can supplement them. +optional controlled Audita v4.2 compatibility check can supplement them. The +reviewed release passed focused offline glossary/inspection/preflight tests, +and both external D&D recipes passed their offline configuration and +normalization checks. Those checks establish integration behavior, not editorial +quality or live-provider readiness. -[v4]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/releases/v4.0.0.md -[v41]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/releases/v4.1.0.md -[cli]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/cli.md -[config]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/config.md -[operations]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/operations.md -[schema-migration]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/migrations/v3.md -[migration]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/migrations/v4.1.md -[subprocess]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/integrations/subprocess.md -[inputs]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/integrations/transcript-glossary-files.md -[outputs]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.1.0/docs/integrations/output-files.md +[v4]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/releases/v4.0.0.md +[v41]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/releases/v4.1.0.md +[v42]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/releases/v4.2.0.md +[cli]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/cli.md +[config]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/config.md +[operations]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/operations.md +[schema-migration]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/migrations/v3.md +[migration]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/migrations/v4.1.md +[subprocess]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/integrations/subprocess.md +[inputs]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/integrations/transcript-glossary-files.md +[outputs]: https://forge.maximumdirect.net/eric/audita/src/tag/v4.2.0/docs/integrations/output-files.md +[recipes]: https://forge.maximumdirect.net/eric/audita-pipelines-dnd/src/commit/6d5e66dcfca4bb5971a8423332a19ce884b846c0/README.md ## Open Decisions -### Glossary ownership and prepared-session handoff +### 1. Source selection for campaign and reference vocabulary -**Recommendation:** Define campaign collections in operator-maintained Audita -configuration/companions and compose campaign-owned material through native -imports. Narratio selects the appropriate Audita configuration/overlay. This -uses v4.1 as shipped and keeps downstream configuration management with Audita. -It changes polish's current prepared-snapshot handoff: polish no longer receives -`inputs/glossary.yml` directly, and private imported content behind a stable -selection follows the documented force workflow. Keep Narratio's shared glossary -input for its other consumers. This ownership/input change requires approval. +**Recommendation:** Add an optional ordered list of Audita-native glossary +sources to campaign inputs, with a session-level replacement override using +Narratio's normal source-relative path behavior. Derive `party` from the existing +roster; allow the list to supply any other named collections. Keep reusable +references in Audita configuration when operators prefer that arrangement. +This keeps campaign-specific content outside pipeline definitions, supports all +four D&D roles without requiring them, and limits Narratio's format translation +to its known party model. Exact field names remain to be finalized in planning. -**Alternative:** Preserve the prepared glossary handoff by projecting it into a -native collection fragment and supplying a narrowly generated Audita entry file -that imports it and operator-maintained settings. This can work with v4.1 and -retains session-snapshot control, but adds format projection and generated-input -ownership to Narratio. The design must explicitly account for the selected -main's companion discovery, overlay bases, and bootstrap; importing a former -main file alone does not preserve those main-source semantics. Operator settings -would need an explicit importable structure. Avoid reading and reconstructing -the effective private configuration. +The existing shared `glossary_file` remains available to Notarius and other +consumers. This recommendation does not automatically turn that legacy-format +file or the separate spell catalog into Audita collections; operators provide +native vocabulary explicitly for those roles. -**Alternative:** Request a supported runtime glossary-file/import control from -Audita and defer this part of adoption until it is available. This preserves -the snapshot boundary with a smaller Narratio adapter, but v4.1 itself lacks the -needed file flag and the work would depend on a later upstream release. It is -not a capability this roadmap claims v4.1 already has. +**Alternative:** Project the existing shared glossary and spell catalog into +`campaign` and `spells` as well as deriving `party`, with optional native sources +for additional material. This reduces duplicate operator-maintained vocabulary, +but adds format mappings Narratio must own and requires agreement on how source +fields map to Audita entries. Choose this if reuse of those existing primitives +outweighs the extra translation surface. It is a deliberate domain projection, +not a requirement to restore Audita's removed legacy parser. -### Narratio module-selection surface +### 2. Preparation of native files that use imports or inheritance + +**Recommendation:** Resolve Narratio-selected native vocabulary sources and +their imports with ConfigKit during preparation and retain standalone prepared +native collection data, preserving the selected ordering/composition semantics. +Pass the prepared data to Audita's runtime interface. This keeps selected session +vocabulary stable across polish attempts and avoids copying an import-bearing +file whose relative dependencies still point to live campaign data. Audita still +owns the final composition with its private configuration and processing +validation. Only Narratio-selected runtime data is prepared; private Audita +references remain downstream-owned and follow the force workflow. + +This adds a native input-resolution/projection step in Narratio. It does not +require reproducing Audita's private configuration or promising identical future +model results. The implementation plan must make the ConfigKit handoff and +prepared-content evidence explicit rather than inventing another merge engine. + +**Alternative:** Forward original native file paths and let Audita resolve their +imports on each invocation. This is the smallest Narratio integration and fully +uses Audita's loader, but those inputs remain live references rather than session +snapshots. Accepting it would relax the prepared-session boundary for those files +and require clear operator guidance about edits and regeneration. + +### 3. Narratio module-selection surface **Recommendation:** Retire `pipeline.audita.modules` and its request/runner plumbing. Operators author `pipeline.stages` in Audita and use its configuration @@ -286,7 +395,7 @@ empty list; Narratio does not silently discard a configured selection. **Alternative:** Keep a simple Narratio module-list convenience and translate it to native ordered stage records through generated configuration. This preserves the current shorthand, including empty and repeated selections, but the removed -CLI flag cannot implement it. It requires an entry-file/projection mechanism -such as the glossary alternative above and must distinguish Narratio-selected -ordering from Audita's per-entry settings. The additional schema and composition -surface weighs against this option. +CLI flag cannot implement it. It requires a generated configuration entry file +or another supported upstream configuration interface, and must distinguish +Narratio-selected ordering from Audita's per-entry settings. The additional +schema and composition surface weighs against this option.