Files
narratio/docs/internal/stage-trim.md

29 lines
863 B
Markdown
Raw Permalink Normal View History

2026-05-18 22:03:59 -05:00
# Stage: trim
## Purpose
Produce a final-trimmed transcript; optionally generate bounds-driven trim.
2026-05-18 22:03:59 -05:00
## Inputs
- `transcripts/final.json`
2026-05-18 22:03:59 -05:00
## Outputs
- `transcripts/final.trimmed.json` (or configured trim output path)
2026-05-18 22:03:59 -05:00
- when trim enabled: `artifacts/session_bounds.json`
## 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.