2026-05-18 22:03:59 -05:00
|
|
|
# Stage: polish
|
|
|
|
|
|
|
|
|
|
## Purpose
|
2026-08-09 21:50:21 +00:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
Run Audita polishing on base transcript and produce polished transcript.
|
2026-05-18 22:03:59 -05:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Inputs
|
2026-08-09 21:50:21 +00:00
|
|
|
|
2026-05-22 19:05:23 -05:00
|
|
|
- `transcripts/base.json`
|
2026-05-18 22:03:59 -05:00
|
|
|
- `inputs/glossary.yml`
|
|
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
## Outputs
|
2026-08-09 21:50:21 +00:00
|
|
|
|
2026-05-22 19:05:23 -05:00
|
|
|
- `transcripts/polished.json`
|
2026-05-23 12:57:59 +00:00
|
|
|
- optional `artifacts/audita.report.json`
|
|
|
|
|
|
|
|
|
|
## Key Behavior
|
2026-08-09 21:50:21 +00:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
- resolves base transcript from merge outputs/canonical fallback.
|
|
|
|
|
- invokes Audita with configured model/module/runtime options.
|
|
|
|
|
- validates processed transcript structure (`segments` array required).
|
|
|
|
|
- validates optional report JSON.
|
|
|
|
|
- materializes canonical outputs; records logs/generated config and adapter metadata.
|
|
|
|
|
|
|
|
|
|
## Invariants
|
2026-08-09 21:50:21 +00:00
|
|
|
|
2026-05-23 12:57:59 +00:00
|
|
|
- polished transcript schema validation is mandatory.
|
|
|
|
|
- report output is config-gated.
|
2026-08-09 21:50:21 +00:00
|
|
|
|
|
|
|
|
## Related Contracts And Tests
|
|
|
|
|
|
|
|
|
|
- [Audita](../integrations/audita.md) owns subprocess, validation, and failure
|
|
|
|
|
semantics.
|
|
|
|
|
- [Configuration](../config.md#pipeline) owns operator-selected Audita values.
|
|
|
|
|
- Implementation and tests: `internal/stage/polish.go`,
|
|
|
|
|
`internal/stage/polish_test.go`
|