Files
audita/docs/internal/output-schemas.md

47 lines
1.0 KiB
Markdown

# Audita Output Schemas
## Scope
This document describes the implemented transcript output schema registry.
## Registry Ownership
Output schema registry is owned by `internal/core/outputschema`.
Supported schema keys:
- `bare-segments`
- `audita-v1`
## Schemas
`bare-segments`:
- top-level JSON array of transcript segments.
`audita-v1`:
- top-level JSON object with:
- `schema: "audita-v1"`
- `version: "v1"`
- `segments: [...]`
Segment fields include `id`, `speaker`, `start`, `end`, `text`, and optional `categories`.
## Validation and Resolution
Config validation and runtime resolution both reject unsupported schema keys.
Unknown schema keys fail with `unsupported output schema` before output emission.
## Output Emission
The selected schema is used by `audita process` when writing:
- output file (`--output`) or
- stdout (when no `--output`).
Report metadata records selected `output_schema`.
## Key Tests
- `internal/core/outputschema/registry_test.go`
- `internal/core/config/config_test.go`
- `internal/cli/run_test.go`