Use stdout redirection for main generation output
This commit is contained in:
@@ -128,16 +128,16 @@ format to compensate for the absence of a native result.
|
||||
|
||||
### Output destinations and verbosity
|
||||
|
||||
Decision recorded 2026-11-19: use `--output PATH` for the main result's file
|
||||
destination. Without it, the main result goes to stdout. With it, the selected
|
||||
representation goes to the file without duplicate stdout output. Use the
|
||||
spelling `--output`, with no legacy `--out` compatibility alias.
|
||||
Decision revised 2026-11-19: remove the previously selected `--output` flag.
|
||||
The main result uses the native invocation reporter and stdout. Callers save it
|
||||
through shell redirection or a subprocess stdout destination; diagnostics remain
|
||||
on stderr. Do not retain the old `--out` flag.
|
||||
|
||||
`--format` selects the representation independently of the destination:
|
||||
`--format` selects the stdout representation independently of redirection:
|
||||
default/text emits the raw artifact, while JSON/YAML emits the native result
|
||||
with metadata. The filename does not select the format. `--report PATH` remains
|
||||
an additional native JSON report, so callers can save the raw artifact and its
|
||||
report to separate files.
|
||||
report to separate files by redirecting stdout and supplying `--report`.
|
||||
|
||||
Adopt CommandKit's upstream verbosity and `--quiet` semantics fully, including
|
||||
mode selection, message visibility, rendering, and presentation failures. Do
|
||||
@@ -145,13 +145,12 @@ not add Scriptorium-specific exceptions to normal command-output suppression.
|
||||
Quiet mode does not cancel generation, and failure explanations remain visible
|
||||
through the native diagnostic channel.
|
||||
|
||||
Explicitly requested `--output` and `--report` writes are application-owned file
|
||||
operations and still occur in quiet mode. Render those files through CommandKit's
|
||||
writer API; the invocation reporter governs console output. This follows the
|
||||
upstream distinction between reporting visibility and application effects.
|
||||
With quiet mode and no requested files, generation still runs while ordinary
|
||||
result output is suppressed. The [upstream reporting contract][upstream-cli]
|
||||
owns the shared verbosity rules.
|
||||
An explicit `--report` write remains an application-owned effect in quiet mode,
|
||||
using the existing writer API with fixed JSON. Quiet suppresses the main result
|
||||
even when stdout is redirected; callers wanting that result omit quiet. No
|
||||
selected-format accessor is needed, so the upstream proposal is no longer a
|
||||
migration prerequisite. The [upstream reporting contract][upstream-cli] owns the
|
||||
shared verbosity rules.
|
||||
|
||||
### Prepared-request preview
|
||||
|
||||
@@ -170,8 +169,7 @@ request construction with generation so previews describe the corresponding
|
||||
execution request. PromptKit continues to own preparation semantics.
|
||||
|
||||
Use the native result stream for preview output; consumers can capture or
|
||||
redirect stdout to save it. The generation command's `--output` decision does
|
||||
not itself extend the native inspection commands. File-output convenience does
|
||||
redirect stdout to save it, as with generation. File-output convenience does
|
||||
not justify retaining a separate preview command. Update maintained examples
|
||||
and release migration guidance to use `promptkit show prepared`.
|
||||
|
||||
@@ -245,7 +243,7 @@ families. The CLI migration does not redesign the HTTP API.
|
||||
Reuse ckprompt's applicable resource, input, and execution flag bindings.
|
||||
Preserve native parsing, explicit-value presence, repeated mapping semantics,
|
||||
and PromptKit's interpretation of request values. Keep application-specific
|
||||
configuration/source selection, `--output`, `--report`, server options, and the
|
||||
configuration/source selection, `--report`, server options, and the
|
||||
whole-operation deadline separate from framework request controls.
|
||||
|
||||
Enable upstream convenience aliases consistently on applicable commands,
|
||||
@@ -308,10 +306,11 @@ units, separately from the standard per-attempt timeout flag.
|
||||
|
||||
### File delivery
|
||||
|
||||
Specify ordinary path handling, overwriting, parent-directory behavior,
|
||||
destination collisions, and delivery ordering for `--output` and `--report`.
|
||||
Describe partial delivery consistently with native outcome reporting and the
|
||||
agreed upstream result-availability boundary.
|
||||
The roadmap and implementation plan specify ordinary report-file handling and
|
||||
delivery ordering relative to stdout. The caller owns redirected destinations;
|
||||
Scriptorium does not infer them or check for collisions with the report path.
|
||||
Partial delivery follows native outcomes and the agreed result-availability
|
||||
boundary.
|
||||
|
||||
### Adoption and verification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user