18 KiB
Adopt Notarius v0.9.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 feature roadmap. Open decisions appear at the end; settle them before preparing the implementation plan. 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-27 is v0.9.0, at commit
f01df93d352811be9fb1c97cd2efc94449f184c9. Notarius remains a separately installed
executable; adopting it does not require importing its Go packages into Narratio.
Canonical references:
- Release notes
- Migration guide
- Subprocess guide
- CLI reference
- Configuration
- Published domain files
- Complete D&D workflow
The current integration targets the v0.8.1 receipt/index contract. v0.9.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: 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 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.9.0 retains text slots for party, players, and glossary, plus
the separate structured spell_catalog slot. It does not introduce four typed
glossary inputs. Preserve explicit selector-to-source mappings and verify source
content through the same paths used for execution.
Supply the prepared campaign glossary, narratio.input.glossary.campaign,
through Notarius's glossary slot using the existing explicit binding mechanism.
The canonical roster and players projection remain separate from the party
glossary. This adoption adds no combined glossary projection.
Keep narratio.input.spell_catalog as the optional
Notarius spell-catalog overlay.
That structured rules catalog has a different purpose and schema from the spells
glossary. Do not convert one into the other or infer a Notarius ruleset from a
Narratio reference-catalog system selector.
Generated same-run registry, scene, combat, and occurrence handoffs stay owned by the Notarius pipeline. Narratio supplies only its configured external inputs.
Preflight
Extend internal/preflight and the shared adapter wiring. Automatic checks run
after selected preparation and before processing when enabled extraction remains
to be executed. session validate checks enabled Notarius definitions against
existing prepared inputs independently of stage reuse. session plan remains
subprocess-free, and preflight does not create a successful stage record.
The native offline check is:
notarius pipeline validate <pipeline_id> --config <config_path> [--overlay <selector>] --format json
It validates configuration, modules, and known pipeline/resource dependencies.
It needs no transcript, reference bytes, credentials, provider calls, or state
directory. A separate config validate call would duplicate configuration
acquisition without establishing provider readiness.
Use native pipeline show with the same configuration selection to verify that
Narratio's required lane IDs exist before processing begins. This is a check of
Narratio's output requirements against the public pipeline description, not a
reimplementation of downstream scheduling or validation. Actual output checks
remain authoritative after execution.
Combining pipeline validate with native promptkit test all is a viable
preflight option for this adoption. Run the smoke tests with the same configuration
and overlay selection, explicitly selected profiles, and the execution credential
environment. all selects reachability, authentication, text inference, and
structured-output checks for a target; it does not enumerate pipeline profiles.
Retain required-lane inspection and shared prepared-reference integrity checks.
Smoke tests can contact providers and incur inference costs. Consume their native reports: successful command status alone does not establish positive observations. Keep failed, unsupported, inapplicable, and unknown findings distinct, and define which observations are required for readiness before implementation. A generic smoke case does not validate the application's prompts, transcript, or references.
Two coverage limits must remain explicit:
pipeline validatedoes not accept run-time--referencebindings. It cannot validate the exact invocation's selector bindings; a pipeline relying on CLI files to satisfy required external slots can fail offline validation before those bindings are supplied.- It does not verify credentials, completed provider targets, or model access.
Native
promptkit testcommands can probe explicitly selected profiles, but v0.9.0 has no pipeline-aware provider readiness command equivalent to Audita's full preflight. Pipeline inspection does not enumerate every completed target.
Use shared prepared-reference integrity checks where they apply. Do not supply dummy references, rewrite downstream configuration, or build another pipeline planner to disguise missing coverage. Do not treat an ordinary synthetic Notarius run as an upstream readiness command: it executes real pipeline work.
OD-3 determines the supported readiness coverage and treatment of the binding gap. Selected checks must preserve native failures; unsuccessful inspection must not become a successful readiness result. Reports must distinguish offline validation from live provider checks.
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. 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 the coverage selected in OD-3.
Refresh the opt-in real Notarius boundary test for v0.9.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 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.9.0 as the tested native integration baseline. Unsupported old interfaces fail normally; no runtime version gate or compatibility fallback is required.
Open Decisions
OD-3: Readiness coverage for this release
Native pipeline validate combined with explicitly selected
promptkit test all probes is an accepted viable option for a reasonable
preflight check. The selected profile list must cover the intended execution
and remain aligned with downstream configuration; Narratio must not reconstruct
Notarius's profile-selection logic to discover it. Required-lane inspection and
prepared-reference checks supplement this option.
Decide whether to adopt that combination now or request pipeline-aware upstream readiness before implementation. An upstream command could accept the execution selectors and reference bindings, select the relevant provider targets itself, and return a domain readiness outcome. Its contract remains to be discussed; this roadmap does not assume that such a command exists in v0.9.0.
If using the existing commands, settle profile selection and interpretation of negative or inconclusive smoke observations. Preserve upstream diagnostic facts and native command outcomes while applying Narratio's readiness requirements.
Also settle how to support pipelines whose required references are supplied only through run flags. The maintained complete D&D pipeline passes native offline validation, but that does not close the general binding gap. Do not silently require all operator pipelines to duplicate those bindings in downstream configuration or suppress failures that might represent real errors.