Generate Daily reports through scriptorium
This commit is contained in:
@@ -5,7 +5,7 @@ This document describes the implemented `scriptorium` subprocess adapter.
|
||||
## Purpose
|
||||
|
||||
`internal/adapters/scriptorium` runs `scriptorium render` to preflight prompt
|
||||
wiring without LLM generation.
|
||||
wiring and `scriptorium run` to generate report artifacts.
|
||||
|
||||
## Inputs and Outputs
|
||||
|
||||
@@ -13,12 +13,13 @@ Input:
|
||||
|
||||
- prompt ID
|
||||
- prompt input data package path
|
||||
- report output path for `run`
|
||||
- configured binary, config path, profile, timeout, and extra arguments
|
||||
|
||||
Output:
|
||||
|
||||
- captured stdout
|
||||
- captured stderr
|
||||
- captured stdout, with truncation tracking
|
||||
- captured stderr, with truncation tracking
|
||||
- exit code
|
||||
- full argv used for inspection
|
||||
|
||||
@@ -37,15 +38,22 @@ The render invocation shape is:
|
||||
scriptorium render --prompt <prompt_id> --input data_package=<path> --format json
|
||||
```
|
||||
|
||||
The run invocation shape is:
|
||||
|
||||
```text
|
||||
scriptorium run --prompt <prompt_id> --input data_package=<path> --out <artifact_path>
|
||||
```
|
||||
|
||||
Configured `--config` and `--profile` values are added when present. Arguments
|
||||
are passed directly as argv, not through a shell. Stdout and stderr are captured
|
||||
separately. `SaveRenderResult` writes the captured result as JSON for inspection.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
Nonzero render exits return both the captured result and an error containing
|
||||
the exit code and stderr. Command execution respects context cancellation and
|
||||
the configured timeout.
|
||||
Nonzero render and run exits return both the captured result and an error
|
||||
containing the exit code and stderr. Run exit code `2` is treated as an error
|
||||
but may still produce a report artifact. Command execution respects context
|
||||
cancellation and the configured timeout.
|
||||
|
||||
## Tests
|
||||
|
||||
@@ -59,5 +67,5 @@ Inspect:
|
||||
|
||||
- `scriptorium` details stay inside the adapter package.
|
||||
- The input name for prompt packages is always `data_package`.
|
||||
- Render preflight is orchestration behavior; final report generation is not
|
||||
implemented in this adapter yet.
|
||||
- Render preflight remains orchestration behavior; this adapter only exposes the
|
||||
subprocess operations.
|
||||
|
||||
@@ -16,12 +16,14 @@ Inputs:
|
||||
- briefing package
|
||||
- prompt input data package
|
||||
- `scriptorium render` result
|
||||
- rendered report path preparation
|
||||
|
||||
Outputs:
|
||||
|
||||
- briefing snapshot JSON
|
||||
- prompt input data package JSON
|
||||
- render preflight JSON
|
||||
- Markdown report path
|
||||
- metadata JSON
|
||||
- prior Daily snapshot metadata when available
|
||||
|
||||
@@ -47,7 +49,8 @@ Workspace subdirectories must be relative paths that stay under
|
||||
Managed artifact names use RunID, which is generated from report generation time
|
||||
and report ID. Daily metadata is stored beside Daily briefing snapshots by valid
|
||||
local date. Prior Daily snapshot lookup reads metadata for the same valid local
|
||||
date and returns the latest earlier run.
|
||||
date and returns the latest earlier run. The store prepares the managed Markdown
|
||||
report path before `scriptorium run` writes it.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
|
||||
Reference in New Issue
Block a user