2026-05-18 22:03:59 -05:00
|
|
|
# Stage: trim
|
|
|
|
|
|
|
|
|
|
## Purpose
|
2026-05-23 12:57:59 +00:00
|
|
|
Produce a final-trimmed transcript; optionally generate bounds-driven trim.
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Inputs
|
2026-05-22 19:05:23 -05:00
|
|
|
- `transcripts/final.json`
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Outputs
|
2026-05-22 19:05:23 -05:00
|
|
|
- `transcripts/final.trimmed.json` (or configured trim output path)
|
2026-05-18 22:03:59 -05:00
|
|
|
- when trim enabled: `artifacts/session_bounds.json`
|
|
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Key Behavior
|
|
|
|
|
When `trim.enabled=false`:
|
|
|
|
|
- copies normalized transcript to trimmed output.
|
|
|
|
|
|
|
|
|
|
When `trim.enabled=true`:
|
|
|
|
|
- runs Scriptorium bounds artifact generation;
|
|
|
|
|
- optionally runs render-debug output generation;
|
|
|
|
|
- validates bounds payload against transcript;
|
|
|
|
|
- derives keep selector;
|
|
|
|
|
- either copies unchanged transcript or runs Seriatim trim;
|
|
|
|
|
- validates trimmed transcript and materializes bounds output.
|
|
|
|
|
|
|
|
|
|
## Invariants
|
|
|
|
|
- normalized transcript is required input.
|
|
|
|
|
- bounds output exists only in enabled trim path.
|
|
|
|
|
- render-debug output is diagnostic and not a declared stage output.
|