Add SPC Outlook summaries to the alert digest template
This commit is contained in:
@@ -96,8 +96,10 @@ subset of discussion fields. Hourly Report defaults this module to
|
||||
report-period outlooks. It emits `checked: true` for a successfully fetched
|
||||
empty run, reports `outlook_count`, and includes prompt-facing outlook fields
|
||||
such as risk label, `period_begins`, `period_ends`, image URL, and whether the
|
||||
outlook contains the configured location. It does not emit GeoJSON geometry,
|
||||
source URL, expiration time, or severity rank.
|
||||
outlook contains the configured location. It also emits a curated `risk_digest`
|
||||
for categorical outlooks that overlap the report period, contain the location,
|
||||
and meet the configured-in-code minimum severity for report rendering. It does
|
||||
not emit GeoJSON geometry, source URL, expiration time, or severity rank.
|
||||
|
||||
Prompt-facing module intervals use friendly local `period_begins` and
|
||||
`period_ends` labels. Canonical report metadata, source provenance,
|
||||
|
||||
@@ -225,12 +225,19 @@ validation.
|
||||
- `location_name`
|
||||
- `outlook_count`
|
||||
- `outlooks`
|
||||
- `risk_digest`
|
||||
|
||||
Each outlook entry may include `day`, `outlook_type`, `label`, `label_text`,
|
||||
`period_begins`, `period_ends`, `issued_at`, `contains_location`, and
|
||||
`image_url`. It omits GeoJSON geometry, source URL, expiration time, and
|
||||
severity rank.
|
||||
|
||||
The optional `risk_digest` list is a curated report-rendering subset of
|
||||
categorical outlooks that overlap the report period, contain the configured
|
||||
location, and meet the minimum severity threshold. Entries include `label_text`,
|
||||
`risk_label`, `period_begins`, and `period_ends`; they do not expose severity
|
||||
rank.
|
||||
|
||||
`spc_convective_discussion` emits a narrative stanza only when a retained
|
||||
report-period categorical outlook has severity rank `3` or higher and matching
|
||||
discussion text is available. Its output includes `included_because` and
|
||||
|
||||
@@ -79,7 +79,9 @@ Daily and Tomorrow call the shared `daypart_forecast` partial. Today calls
|
||||
Today, Tomorrow, and Hourly call the shared `alert_digest` and
|
||||
`precipitation_timing` partials. Partial files are parsed with each top-level
|
||||
template at render time and receive the same typed render context as the
|
||||
caller.
|
||||
caller. The `alert_digest` partial renders the combined Alerts and Risk
|
||||
Products section from relevant NWS alerts and curated SPC outlook digest
|
||||
records.
|
||||
|
||||
## Schema Contract
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ are:
|
||||
|
||||
Shared named partials live under `internal/reporttemplate/templates/partials/`:
|
||||
|
||||
- `alert_digest.md.tmpl`, used by Daily, Today, Tomorrow, and Hourly
|
||||
- `alert_digest.md.tmpl`, used by Daily, Today, Tomorrow, and Hourly for the
|
||||
combined Alerts and Risk Products section
|
||||
- `daypart_forecast.md.tmpl`, used by Daily and Tomorrow
|
||||
- `today_daypart_forecast.md.tmpl`, used by Today
|
||||
- `precipitation_timing.md.tmpl`, used by Daily, Today, Tomorrow, and Hourly
|
||||
@@ -369,6 +370,11 @@ YAML.
|
||||
| `.Modules.SPCConvectiveOutlooks.Outlooks[].PeriodBegins` | string | Friendly outlook period start. |
|
||||
| `.Modules.SPCConvectiveOutlooks.Outlooks[].PeriodEnds` | string | Friendly outlook period end. |
|
||||
| `.Modules.SPCConvectiveOutlooks.Outlooks[].ImageURL` | string | Source image URL. |
|
||||
| `.Modules.SPCConvectiveOutlooks.RiskDigest` | []briefing.SPCConvectiveOutlookDigest | Curated categorical outlooks for the shared Alerts and Risk Products section. |
|
||||
| `.Modules.SPCConvectiveOutlooks.RiskDigest[].LabelText` | string | Human-readable outlook label. |
|
||||
| `.Modules.SPCConvectiveOutlooks.RiskDigest[].RiskLabel` | string | Sentence-style risk label for report rendering. |
|
||||
| `.Modules.SPCConvectiveOutlooks.RiskDigest[].PeriodBegins` | string | Friendly outlook period start. |
|
||||
| `.Modules.SPCConvectiveOutlooks.RiskDigest[].PeriodEnds` | string | Friendly outlook period end. |
|
||||
| `.Modules.SPCConvectiveDiscussion.IncludedBecause` | string | Criterion used to include discussions. |
|
||||
| `.Modules.SPCConvectiveDiscussion.Discussions` | []briefing.SPCConvectiveDiscussionRecord | Retained discussion records. |
|
||||
| `.Modules.SPCConvectiveDiscussion.Discussions[].Headline` | string | Discussion headline. |
|
||||
|
||||
Reference in New Issue
Block a user