Remove obsolete briefing snapshot artifacts

This commit is contained in:
2026-06-09 21:33:34 +00:00
parent 816cfb24aa
commit 468197f7e0
26 changed files with 154 additions and 1981 deletions

View File

@@ -4,9 +4,9 @@ This document describes the implemented briefing package boundary.
## Purpose
`internal/briefing` builds structured report-specific briefing packages from
resolved report metadata, collected weather data, and derived forecast facts.
Briefings are curated inputs for prompt data packages, not rendered report prose.
`internal/briefing` builds prompt-facing module values from resolved report
metadata, collected weather data, and derived forecast facts. These values are
curated prompt inputs, not rendered report prose or durable report snapshots.
## Inputs And Outputs
@@ -19,23 +19,19 @@ Inputs:
Outputs:
- `briefing.Package` with common metadata and one report-specific content
object for Daily, 3-Day, Weekend, or Storm Report
- module registry definitions for known module IDs, stanza names, option
shapes, fact requirements, report compatibility, and missing-data behavior
- source-oriented module outputs for `metadata`, `current_conditions`,
`alert_digest`, `area_forecast_discussion`, and `weather_story`
- optional `currentConditions` prompt context from normalized
`/conditions/current` data when available
- optional structured `weatherStory` context on report-specific briefing
objects when `/weatherstories/latest` is available
- optional JSON file written by `briefing.Save`
- derived module outputs such as daily summaries, daypart summaries,
precipitation timing, outdoor windows, and tomorrow planning
- optional current conditions and weather story module outputs when those
Weather API sources are available
## Boundaries
- This package selects and shapes weather facts for prompts.
- It owns module registry validation, but app orchestration does not execute
modules yet.
- It owns module registry validation and module builder behavior.
- It does not fetch weather data, compare prior snapshots, build
`data_package` files, invoke Scriptorium, or write workflow metadata.
@@ -54,23 +50,18 @@ None directly.
## State Or Manifest Behavior
`briefing.Save` writes briefing JSON atomically. Managed workspace placement is
owned by `internal/state`.
None. Module snapshots and prompt input data packages are persisted by
`internal/state` and composed by `internal/app`.
## Skip And Resume Behavior
None. Builders either return a complete briefing package or an error.
None. Builders either return a module output, omit optional unavailable data,
or return an error for invalid required inputs.
## Failure Behavior
- Daily briefing construction requires a Daily report definition and derived
daily summary.
- 3-Day briefing construction requires a 3-Day report definition and at least
one derived summary.
- Weekend briefing construction requires a Weekend report definition and at
least one derived summary.
- Storm briefing construction requires a Storm Report definition and forecast
bundle.
- Required derived modules return errors when their dependent facts are not
available.
- Module registry construction rejects duplicate module IDs and duplicate
stanza names.
- Module composition validation rejects unknown modules, duplicate modules,
@@ -79,23 +70,19 @@ None. Builders either return a complete briefing package or an error.
forecast discussion, and weather story stanzas.
- Alert digest output distinguishes checked empty alert data from missing alert
source data.
- Save failures include path and operation context.
## Tests
Inspect:
- `internal/briefing/daily_test.go`
- `internal/briefing/three_day_test.go`
- `internal/briefing/weekend_test.go`
- `internal/briefing/storm_test.go`
- `internal/briefing/base_modules_test.go`
- `internal/briefing/derived_modules_test.go`
- `internal/briefing/modules_test.go`
- `internal/app/app_test.go`
## Invariants
- Briefings contain structured weather facts and source context.
- Module outputs contain structured weather facts and source context.
- Common metadata includes RunID, report ID, prompt ID, valid period, source
provenance, source hashes, source warnings, and configured prompt location.
- LLM prompt input packaging and Scriptorium execution remain outside this