Add daily render context
This commit is contained in:
@@ -9,8 +9,8 @@ This document describes structured generated-text handling in
|
||||
generated-text-template reports and builds curated render contexts for
|
||||
templates. It also owns the generated-text catalog that connects report
|
||||
definitions to validators, render-context builders, schema assets, and template
|
||||
assets. The implemented contracts are Daily validation and asset lookup, Today
|
||||
Report, Tomorrow Report, and Hourly Report.
|
||||
assets. The implemented contracts are Daily render context, Today Report,
|
||||
Tomorrow Report, and Hourly Report.
|
||||
|
||||
## Inputs And Outputs
|
||||
|
||||
@@ -28,6 +28,7 @@ Outputs:
|
||||
- typed `Tomorrow` generated text
|
||||
- typed `Hourly` generated text
|
||||
- normalized stable JSON for validated generated text
|
||||
- typed `DailyRenderContext` values for `internal/reporttemplate`
|
||||
- typed `TodayRenderContext` values for `internal/reporttemplate`
|
||||
- typed `TomorrowRenderContext` values for `internal/reporttemplate`
|
||||
- typed `HourlyRenderContext` values for `internal/reporttemplate`
|
||||
@@ -36,8 +37,7 @@ Outputs:
|
||||
|
||||
The Daily generated text JSON accepts the same public fields and validation
|
||||
rules as Tomorrow. Its catalog entry is selected through schema ID `daily` and
|
||||
template ID `daily`; render-context construction is not implemented until the
|
||||
Daily report context exists.
|
||||
template ID `daily`.
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ render-context builder, and embedded assets.
|
||||
|
||||
## Template Contracts
|
||||
|
||||
Today, Tomorrow, and Hourly rendering use typed render contexts with:
|
||||
Daily, Today, Tomorrow, and Hourly rendering use typed render contexts with:
|
||||
|
||||
- report metadata labels such as title, location, valid period, and generation
|
||||
time
|
||||
@@ -62,14 +62,13 @@ Today, Tomorrow, and Hourly rendering use typed render contexts with:
|
||||
conditions, hourly forecast rows, precipitation timing, alerts, SPC outlooks,
|
||||
forecast discussion, SPC discussion, and weather story
|
||||
|
||||
Today and Tomorrow additionally expose forecast-date labels, ordered daypart
|
||||
forecast rows, daily/daypart summaries, planning facts, and a multi-paragraph
|
||||
forecast discussion generated-text slot. The ordered daypart slice is built in
|
||||
Go so templates do not range over maps.
|
||||
Daily, Today, and Tomorrow additionally expose forecast-date labels, ordered
|
||||
daypart forecast rows, daily/daypart summaries, planning facts, and a
|
||||
multi-paragraph forecast discussion generated-text slot. The ordered daypart
|
||||
slice is built in Go so templates do not range over maps.
|
||||
|
||||
The Daily template asset uses the same Markdown structure and field surface as
|
||||
Tomorrow's template. Its typed render context in `internal/generatedtext` is
|
||||
not implemented yet.
|
||||
The Daily template asset uses the same Markdown structure as Tomorrow's
|
||||
template and renders from `generatedtext.DailyRenderContext`.
|
||||
|
||||
Templates use `text/template` with `missingkey=error`, so missing context fields
|
||||
fail rendering instead of producing incomplete Markdown.
|
||||
|
||||
Reference in New Issue
Block a user