60 lines
1.7 KiB
Markdown
60 lines
1.7 KiB
Markdown
# Briefing Internals
|
|
|
|
This document describes the implemented briefing package boundary.
|
|
|
|
## Purpose
|
|
|
|
`internal/briefing` builds structured report-specific briefing packages from
|
|
forecast summaries and report metadata. The package currently implements the
|
|
Daily briefing only.
|
|
|
|
## Inputs and Outputs
|
|
|
|
Inputs:
|
|
|
|
- resolved report definition and valid period
|
|
- forecast bundle
|
|
- derived daily forecast summary
|
|
- configured units and timezone
|
|
|
|
Output:
|
|
|
|
- `briefing.Package` JSON containing common metadata and Daily briefing content
|
|
|
|
## Boundaries
|
|
|
|
- Briefings are structured weather facts and context for later prompt input.
|
|
- This package does not fetch weather data, compare prior snapshots, build
|
|
`scriptorium` data packages, or render final report prose.
|
|
|
|
## Behavior
|
|
|
|
- Common metadata includes schema version, RunID, report ID, variant, prompt ID,
|
|
generation time, units, timezone, valid period, source location, source
|
|
provenance, hashes, and source warnings.
|
|
- Daily content includes bottom-line inputs, daypart summaries, relevant alerts,
|
|
outdoor window inputs, narrative periods, discussion context, and weather
|
|
story context when available.
|
|
- Briefing JSON is written atomically by `briefing.Save`.
|
|
|
|
## Failure Behavior
|
|
|
|
- Daily briefing construction requires a Daily report definition and a derived
|
|
daily forecast summary.
|
|
- Save failures include path and operation context.
|
|
|
|
## Tests
|
|
|
|
Inspect:
|
|
|
|
- `internal/briefing/daily_test.go`
|
|
- `internal/app/app_test.go`
|
|
- `internal/cli/root_test.go`
|
|
|
|
## Invariants
|
|
|
|
- Weather facts come from normalized and derived source data.
|
|
- Briefing output remains JSON-inspectable.
|
|
- LLM prompt input packaging and `scriptorium` execution remain outside this
|
|
boundary.
|