Clarify definition inspection loading

This commit is contained in:
2026-10-04 14:25:38 +00:00
parent 1c8494ec20
commit cd0811a49e
3 changed files with 36 additions and 14 deletions

View File

@@ -207,9 +207,19 @@ scriptorium inspect prompt --prompt ID [--prompt-version VERSION]
`--prompt` is required. Inspection uses normal configuration discovery and the `--prompt` is required. Inspection uses normal configuration discovery and the
selected Promptkit sources, defaults to text regardless of selected Promptkit sources, defaults to text regardless of
`defaults.render_format`, and writes to stdout unless `--out` is supplied. It `defaults.render_format`, and writes to stdout unless `--out` is supplied.
loads and normalizes the selected definition but does not resolve a profile,
load a schema, render a template, reserve backend capacity, or call a model. Both definition-inspection commands first construct the same engine used for
execution from the complete selected source sequence. Construction resolves
and validates all effective definitions, including unused ones, and captures
referenced message-file contents and static template syntax. Invalid unused
definitions or unreadable message resources can therefore prevent inspection.
No prompt collection is mandatory, but selected prompts are not ignored.
Inspection does not prepare an execution request, load request-time schemas or
artifacts, resolve credential values, reserve backend capacity, or call a model.
Prompt inspection does not select an execution profile or render request-specific
templates.
## `scriptorium inspect profile` ## `scriptorium inspect profile`
@@ -218,9 +228,9 @@ scriptorium inspect profile --profile ID
[--config PATH] [--config-overlay NAME] [--promptkit-source PATH ...] [--schema-dir DIR] [--format text|json] [--out PATH] [--config PATH] [--config-overlay NAME] [--promptkit-source PATH ...] [--schema-dir DIR] [--format text|json] [--out PATH]
``` ```
`--profile` is required. Inspection resolves profile inheritance and backend `--profile` is required. After the [full-source engine construction described
defaults from the selected sources, but never reads a credential value, loads above](#scriptorium-inspect-prompt), inspection selects one effective profile
a prompt, reserves capacity, or calls a model. Unset provider controls are with resolved inheritance and backend defaults. Unset provider controls are
shown as zero values when Promptkit leaves them unspecified. shown as zero values when Promptkit leaves them unspecified.
## Application configuration inspection ## Application configuration inspection

View File

@@ -48,12 +48,15 @@ generation.
`inspect prompt` maps the selected ID and optional version to `inspect prompt` maps the selected ID and optional version to
`promptkit.Engine.InspectPrompt`, then formats Scriptorium-owned inspection `promptkit.Engine.InspectPrompt`, then formats Scriptorium-owned inspection
data. It constructs the same configuration-aware engine but does not perform data. `inspect profile` maps an explicit profile ID to `Engine.InspectProfile`
preparation or generation. and formats Scriptorium-owned effective profile data.
`inspect profile` maps an explicit profile ID to `Engine.InspectProfile` and Both paths construct the same full-source engine as execution before inspecting
formats a safe application-owned effective profile view. It intentionally does the chosen definition; selected prompts are not filtered out. They do not
not require prompt, schema, or artifact sources. perform request preparation or generation. The [CLI definition-inspection
contract](../cli.md#scriptorium-inspect-prompt) owns the loading and runtime
boundaries, including the distinction between an optional prompt collection
and validating any prompts that were selected.
`inspect configuration` builds the same engine from the selected native `inspect configuration` builds the same engine from the selected native
Promptkit source sequence, reads its captured configuration view, and delegates Promptkit source sequence, reads its captured configuration view, and delegates

View File

@@ -7,13 +7,14 @@ Reviewed on 2026-10-04 at
commits after `b1bb55a`. The runtime architecture matches the accepted commits after `b1bb55a`. The runtime architecture matches the accepted
[feature roadmap](promptkit.md) and [implementation plan](implementation.md). [feature roadmap](promptkit.md) and [implementation plan](implementation.md).
No runtime regression, missing framework capability, or newly imposed runtime No runtime regression, missing framework capability, or newly imposed runtime
restriction was identified. Three low-priority documentation/help gaps need restriction was identified. Three low-priority documentation/help gaps were
correction. The first retains a loading guarantee that is incompatible with identified; their status and resolutions are recorded below. The first retained
a loading guarantee that was incompatible with
the deliberately selected full-source engine construction. the deliberately selected full-source engine construction.
### R3: Correct The Definition-Inspection Loading Contract ### R3: Correct The Definition-Inspection Loading Contract
Priority: P3 (low). Status: Open. Priority: P3 (low). Status: Complete.
Locations: `docs/cli.md:208–224`; related orientation in Locations: `docs/cli.md:208–224`; related orientation in
`docs/internal/adapters.md:49–56`. The CLI wording was retained in `b913ef0` `docs/internal/adapters.md:49–56`. The CLI wording was retained in `b913ef0`
@@ -48,6 +49,14 @@ Acceptance: the owning contract and internal summary agree with the roadmap,
shared engine construction, and existing tests. Review the documentation diff shared engine construction, and existing tests. Review the documentation diff
and links; no production-code change or new runtime guarantee is needed. and links; no production-code change or new runtime guarantee is needed.
Resolution: the CLI contract now distinguishes full-source engine construction
from inspecting a selected definition, explains eager validation/content capture
and unused-definition failures, and retains the request-time exclusions. It
states that no prompt collection is mandatory but selected prompts are not
ignored. The internal summary links to that contract without promising a
separate no-prompt-loading path. Existing definition-inspection tests and
documentation link/diff checks passed; no production code changed.
### R4: Update The Composed-Example Description ### R4: Update The Composed-Example Description
Priority: P3 (low). Status: Open. Priority: P3 (low). Status: Open.