Request pipeline-aware preflight for Narratio
This commit is contained in:
121
docs/roadmap/narratio-feature-request.md
Normal file
121
docs/roadmap/narratio-feature-request.md
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
# Feature request: pipeline-aware preflight for Narratio
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Provide `notarius preflight` to check whether a selected invocation is ready to
|
||||||
|
begin, as far as can reasonably be determined without executing extraction.
|
||||||
|
This document requests external API and behavior only.
|
||||||
|
|
||||||
|
Narratio orchestrates pipelines that can take hours. It needs to catch invalid
|
||||||
|
configuration, unavailable inputs, and provider-access failures before beginning
|
||||||
|
expensive processing. Notarius should own readiness for its configured pipeline,
|
||||||
|
including which provider targets need checking.
|
||||||
|
|
||||||
|
The existing `pipeline validate` and `promptkit test all` commands are useful
|
||||||
|
building blocks from a caller's perspective. Together they offer a reasonable
|
||||||
|
limited check, but require the caller to select smoke-test profiles and interpret
|
||||||
|
their observations. Pipeline validation also cannot receive the execution's CLI
|
||||||
|
reference bindings. See the current [CLI contract](../cli.md) and
|
||||||
|
[subprocess guide](../consumers/subprocess.md).
|
||||||
|
|
||||||
|
## Requested command
|
||||||
|
|
||||||
|
```text
|
||||||
|
notarius preflight PIPELINE_ID --input-file PATH [the same flags as run]
|
||||||
|
```
|
||||||
|
|
||||||
|
A caller should be able to replace `run` with `preflight` in an invocation without
|
||||||
|
translating its arguments. Accept the same configuration selection and overrides,
|
||||||
|
input file, lane selection, reference bindings and unbindings, LLM selections and
|
||||||
|
execution overrides, output/cache/debug controls, and native reporting options.
|
||||||
|
Retain the same defaults, precedence, path interpretation, and distinction between
|
||||||
|
omitted and explicitly supplied values.
|
||||||
|
|
||||||
|
For example, this proposed invocation checks a transcript and the actual external
|
||||||
|
references that will be supplied to extraction:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
notarius preflight dnd-session \
|
||||||
|
--config /data/notarius.yml \
|
||||||
|
--input-file /data/transcript.json \
|
||||||
|
--reference party=/data/party.yml \
|
||||||
|
--reference glossary=/data/campaign-glossary.yml \
|
||||||
|
--output-dir /data/extraction \
|
||||||
|
--format json
|
||||||
|
```
|
||||||
|
|
||||||
|
Preflight-specific effects of accepted execution flags must be documented. For
|
||||||
|
example, `--cache refresh` must not cause preflight to execute extraction or
|
||||||
|
replace accepted extraction results.
|
||||||
|
|
||||||
|
## Readiness checks
|
||||||
|
|
||||||
|
The command should:
|
||||||
|
|
||||||
|
- Validate the selected configuration, pipeline, modules, prompts, and known
|
||||||
|
dependencies for the intended execution, including the selected lanes.
|
||||||
|
- Apply the supplied reference selectors with execution semantics, including
|
||||||
|
binding precedence and explicit unbinding. Read and validate required external
|
||||||
|
references and the supplied transcript against their input contracts.
|
||||||
|
- Check generated dependencies that can be established before execution without
|
||||||
|
requiring same-run intermediate artifacts to exist already.
|
||||||
|
- Determine and check the relevant provider targets for the selected work,
|
||||||
|
including applicable extraction, normalization, correction, and validator
|
||||||
|
targets. Account for configured selections and invocation overrides without
|
||||||
|
requiring callers to supply a duplicate list of profiles to test.
|
||||||
|
- Check provider reachability, authentication, and required inference capabilities
|
||||||
|
through appropriate native diagnostics, including structured output where
|
||||||
|
needed. Notarius owns which observations establish readiness for its pipeline.
|
||||||
|
- Check the selected destinations as far as practical before execution, exposing
|
||||||
|
configuration or access problems that would prevent the intended work.
|
||||||
|
|
||||||
|
Preserve the distinction between an actual failure, an unsupported diagnostic,
|
||||||
|
known inapplicability, and an unknown observation. An unsupported optional
|
||||||
|
authentication probe need not prevent readiness when other applicable checks
|
||||||
|
establish the access required for execution. Disclose targets or requirements
|
||||||
|
whose readiness cannot be established before extraction; do not silently report
|
||||||
|
them as checked.
|
||||||
|
|
||||||
|
## Outcomes and reports
|
||||||
|
|
||||||
|
Return a domain readiness outcome using native CommandKit reporting and outcome
|
||||||
|
semantics. A failed required check, or inability to complete a required readiness
|
||||||
|
check, must produce an unsuccessful outcome with an actionable explanation.
|
||||||
|
Success means the required readiness checks passed, with any warnings and coverage
|
||||||
|
limits disclosed. It does not merely mean diagnostic commands completed.
|
||||||
|
|
||||||
|
Support native text, YAML, and JSON presentation. Provide a documented
|
||||||
|
machine-readable report identifying the selected pipeline, overall readiness,
|
||||||
|
checks performed, failures, warnings, and incomplete coverage. Findings should
|
||||||
|
identify the relevant input, binding, or provider target when applicable. Callers
|
||||||
|
should not need to parse diagnostic prose or apply their own provider-specific
|
||||||
|
rules to obtain the readiness decision.
|
||||||
|
|
||||||
|
Preserve native configuration errors, cancellation, reporting failures, and
|
||||||
|
credential-handling conventions. A canceled or otherwise incomplete required
|
||||||
|
check must not be presented as successful readiness.
|
||||||
|
|
||||||
|
## Effects and limits
|
||||||
|
|
||||||
|
Preflight may read inputs, probe or create required directories, contact
|
||||||
|
providers, incur smoke-test inference costs, and write requested diagnostics.
|
||||||
|
Document those effects. It must not publish extraction artifacts or populate,
|
||||||
|
refresh, or invalidate accepted extraction results. Existing cached acceptance
|
||||||
|
must not substitute for current provider-readiness checks.
|
||||||
|
|
||||||
|
Readiness does not guarantee later model responses, semantic acceptance, continued
|
||||||
|
provider availability, or feasibility of every data-dependent operation. Report
|
||||||
|
these limits without requiring a full extraction as proof of readiness.
|
||||||
|
|
||||||
|
## Narratio usage
|
||||||
|
|
||||||
|
Narratio will supply its real prepared reference files and the same configuration,
|
||||||
|
credentials, selections, and destinations intended for execution. Its early
|
||||||
|
preflight occurs before the final trimmed transcript exists, so it will supply
|
||||||
|
a known-good synthetic transcript through the ordinary `--input-file` interface.
|
||||||
|
No Narratio-specific fixture mode is requested.
|
||||||
|
|
||||||
|
This checks the supplied fixture, configuration, references, and provider access;
|
||||||
|
it does not establish compatibility of a future transcript. Execution must still
|
||||||
|
validate its real inputs. Requiring the same input interface for preflight and
|
||||||
|
run allows other callers to check their actual transcript when already available.
|
||||||
Reference in New Issue
Block a user