Document shared glossaries and downstream preflight
This commit is contained in:
@@ -1,37 +1,33 @@
|
||||
# Internal: Prompt Requirements Preflight
|
||||
# Internal: Downstream Preflight
|
||||
|
||||
The application selects intended Scriptorium requests after acquiring final
|
||||
domain configuration. For execution, it projects the bounded plan against a
|
||||
clone of the locked manifest using the same stage decisions and analysis work
|
||||
planner as `session plan`. Enabled trim is inspected when projected to run;
|
||||
analysis targets come from the projected execution order, including scheduled
|
||||
disabled prerequisites and excluding reusable work. The projection is not an
|
||||
execution commitment: earlier outputs can change later decisions.
|
||||
The application performs downstream checks after selected preparation completes
|
||||
or is reused and before remaining selected processing. It projects remaining
|
||||
work against a clone of the locked manifest using the same stage decisions and
|
||||
analysis planner as `session plan`. Projected polish selects Audita; projected
|
||||
enabled trim and analysis select Scriptorium requirements. A projection is not
|
||||
an execution commitment. Empty target sets invoke no checker.
|
||||
|
||||
For `session validate`, the application selects enabled definitions and their
|
||||
configured prerequisite closure independently of output reuse. Both entry
|
||||
points construct effective contexts through stage-owned helpers and call
|
||||
`internal/preflight`. Input-map keys remain prompt binding names, distinct from
|
||||
Narratio source IDs. No artifact is materialized or fetched for this check.
|
||||
Audita receives the verified four prepared glossary files and the same
|
||||
processing selectors and destinations, with an embedded synthetic transcript.
|
||||
The adapter runs native preflight with provider smoke enabled, captures its
|
||||
transient diagnostics, and preserves exit classification. No preflight result
|
||||
is cached as a stage. A failure stops later processing without presenting it as
|
||||
complete.
|
||||
|
||||
The checker invokes the adapter sequentially and assesses native structured
|
||||
findings. Definite missing required bindings and unsupplied required variables
|
||||
are errors. An optional source for a required prompt input, conditional
|
||||
requirements, incomplete discovery, and discovery issues produce warnings.
|
||||
It retains earlier findings and underlying inspection errors, and stops on
|
||||
cancellation. The application formats findings for its invocation reporter or
|
||||
validation report; the checker does not mutate manifests or acquire config.
|
||||
For `session validate`, the application selects enabled downstream definitions
|
||||
independently of reuse and checks the existing prepared manifest. It does not
|
||||
resolve live files into candidate glossary projections or run prepare. The
|
||||
Audita probe under `runs/.validation` can create or probe directories and contact
|
||||
providers; it does not update the session manifest. Discovery and provider
|
||||
checks do not establish real-transcript feasibility or editorial quality.
|
||||
|
||||
The run hook executes before stage attempts or live pre-execution invalidation.
|
||||
It reuses an injected Scriptorium runner or creates the invocation-owned runner
|
||||
that generation later uses. Empty target sets invoke no inspector. Validation
|
||||
uses its own invocation-owned factory and creates no execution workspace,
|
||||
run directory, lock, report file, or manifest update. Discovery can read
|
||||
Scriptorium configuration and resources, but does not call a model or establish
|
||||
future input contents. Actual execution and input resolution remain authoritative.
|
||||
Scriptorium input-map keys remain binding names distinct from Narratio source
|
||||
IDs. Missing required bindings or variables and inspection failures are errors;
|
||||
optional sources for required inputs, conditional requirements, incomplete
|
||||
discovery, and discovery issues produce warnings. The checker preserves earlier
|
||||
findings and stops on cancellation. Actual input resolution remains authoritative.
|
||||
|
||||
See the [Scriptorium contract](../integrations/scriptorium.md),
|
||||
See [Audita](../integrations/audita.md), [Scriptorium](../integrations/scriptorium.md),
|
||||
[CLI](../cli.md#session-validate), and [operations](../operations.md#prompt-requirements-preflight).
|
||||
Implementation and focused tests are in `internal/preflight`,
|
||||
`internal/app/preflight_targets.go`, `internal/app/runner_preflight.go`,
|
||||
`internal/app/session_inspection_command.go`, and `internal/stage/scriptorium_vars.go`.
|
||||
Implementation and tests are in `internal/preflight`, `internal/app/runner_preflight.go`,
|
||||
`internal/app/session_inspection_command.go`, and `internal/adapters/audita/preflight.go`.
|
||||
|
||||
Reference in New Issue
Block a user