Add Weekend Outlook generation

This commit is contained in:
2026-05-29 18:16:10 +00:00
parent 4c9d396f9b
commit 5d543b6b4d
21 changed files with 760 additions and 69 deletions

View File

@@ -1,12 +1,12 @@
# Weatherreporter CLI
`weatherreporter generate daily`, `weatherreporter generate tomorrow`,
`weatherreporter generate three-day`, `weatherreporter run evening`, and the
Sunday `weatherreporter run morning` path currently write Markdown reports
through `scriptorium`, after writing managed preparation artifacts and running
`scriptorium render` as a preflight check. Unsupported report generation and
scheduled runs still resolve configuration, report definitions, and valid
periods, then return a not-implemented error.
`weatherreporter generate three-day`, `weatherreporter generate weekend`,
`weatherreporter run morning`, and `weatherreporter run evening` currently
write Markdown reports through `scriptorium`, after writing managed preparation
artifacts and running `scriptorium render` as a preflight check. Unsupported
report generation still resolves configuration, report definitions, and valid
periods, then returns a not-implemented error.
## Shortest Useful Command
@@ -32,6 +32,7 @@ For the 3-Day Outlook:
```sh
weatherreporter generate three-day --out ./three-day.md
weatherreporter generate weekend --out ./weekend.md
```
## Command Overview
@@ -46,14 +47,13 @@ weatherreporter run morning
weatherreporter run evening
```
`generate daily`, `generate tomorrow`, and `generate three-day` write a briefing
snapshot, prompt input data package, render preflight output, Markdown report,
and metadata file under the configured workspace. `run evening` generates the
Tomorrow Planning Brief. `run morning` can generate Daily Today and the 3-Day
Outlook when the resolved batch contains only implemented report types; when
Weekend Outlook is part of the resolved batch, execution stops at the current
not-implemented boundary. Other `generate` commands resolve one report request
and stop before report generation.
`generate daily`, `generate tomorrow`, `generate three-day`, and
`generate weekend` write a briefing snapshot, prompt input data package, render
preflight output, Markdown report, and metadata file under the configured
workspace. `run evening` generates the Tomorrow Planning Brief. `run morning`
generates Daily Today and the 3-Day Outlook, plus Weekend Outlook except on
Sunday. Other `generate` commands resolve one report request and stop before
report generation.
## Flags
@@ -61,7 +61,7 @@ and stop before report generation.
- `--config PATH`: load configuration from `PATH` instead of `/usr/local/etc/weatherreporter/config.yml`.
- `--units VALUE`: override configured Weather API units.
- `--tz NAME`: override configured Weather API timezone.
- `--out PATH`: optional Markdown report copy for `generate daily`, `generate tomorrow`, and `generate three-day`; reserved for later generated report output on other `generate` commands.
- `--out PATH`: optional Markdown report copy for `generate daily`, `generate tomorrow`, `generate three-day`, and `generate weekend`; reserved for later generated report output on other `generate` commands.
- `--date YYYY-MM-DD`: optional date for `generate daily`; defaults to the current local date in the configured timezone.
- `--start TIME`: required start time for `generate storm`.
- `--end TIME`: required end time for `generate storm`.

View File

@@ -6,7 +6,7 @@ This document describes the implemented briefing package boundary.
`internal/briefing` builds structured report-specific briefing packages from
forecast summaries and report metadata. The package currently implements Daily
Today, Daily Tomorrow, and 3-Day Outlook briefing content.
Today, Daily Tomorrow, 3-Day Outlook, and Weekend Outlook briefing content.
## Inputs and Outputs
@@ -42,6 +42,9 @@ Output:
character, temperature range, precipitation, wind, risk, outdoor-window, and
alert inputs, plus broader discussion and weather-story context when
available.
- Weekend content uses the same daily outlook summaries and adds planning
inputs for best outdoor windows, worst weather windows, rain/storm timing,
comfort concerns, and confidence or uncertainty context.
- Briefing JSON is written atomically by `briefing.Save`.
## Failure Behavior
@@ -50,6 +53,8 @@ Output:
daily forecast summary.
- 3-Day briefing construction requires a 3-Day report definition and at least
one derived daily summary in the outlook period.
- Weekend briefing construction requires a Weekend report definition and at
least one derived daily summary in the weekend period.
- Save failures include path and operation context.
## Tests
@@ -58,6 +63,7 @@ Inspect:
- `internal/briefing/daily_test.go`
- `internal/briefing/three_day_test.go`
- `internal/briefing/weekend_test.go`
- `internal/app/app_test.go`
- `internal/cli/root_test.go`

View File

@@ -37,7 +37,7 @@ The app maps these config fields into comparison thresholds:
## Behavior
Daily and 3-Day comparison currently detect:
Daily, 3-Day, and Weekend comparison currently detect:
- temperature changes crossing configured thresholds
- precipitation probability and timing changes
@@ -48,12 +48,15 @@ Daily and 3-Day comparison currently detect:
When no prior comparable snapshot exists, the app sends an empty Recent Changes
section in the data package. Daily Today and Daily Tomorrow are compatible for
same-valid-date comparison through the report registry. 3-Day Outlook compares
with prior 3-Day Outlook snapshots for the same valid local date.
with prior 3-Day Outlook snapshots for the same valid local date. Weekend
Outlook compares with prior Weekend Outlook snapshots for the same weekend
window.
## Failure Behavior
Daily comparison requires both inputs to contain Daily briefing content. 3-Day
comparison requires both inputs to contain 3-Day briefing content.
comparison requires both inputs to contain 3-Day briefing content. Weekend
comparison requires both inputs to contain Weekend briefing content.
## Tests
@@ -61,6 +64,7 @@ Inspect:
- `internal/changes/daily_test.go`
- `internal/changes/three_day_test.go`
- `internal/changes/weekend_test.go`
- `internal/app/app_test.go`
## Invariants

View File

@@ -11,7 +11,8 @@ This document describes the implemented prompt input package boundary.
Input:
- `briefing.Package` containing Daily-family or 3-Day Outlook content
- `briefing.Package` containing Daily-family, 3-Day Outlook, or Weekend Outlook
content
Output:

View File

@@ -52,9 +52,10 @@ and report ID. Metadata is stored beside briefing snapshots by report group and
valid local date. Prior snapshot lookup reads metadata for the same valid local
date and returns the latest earlier compatible run. Daily Today and Daily
Tomorrow are compatible with each other; 3-Day Outlook is compatible with prior
3-Day Outlook snapshots. The store can load a briefing snapshot by path for
structured comparison. The store prepares the managed Markdown report path
before `scriptorium run` writes it.
3-Day Outlook snapshots; Weekend Outlook is compatible with prior Weekend
Outlook snapshots for the same weekend window. The store can load a briefing
snapshot by path for structured comparison. The store prepares the managed
Markdown report path before `scriptorium run` writes it.
## Failure Behavior

View File

@@ -8,6 +8,8 @@ The implemented generation workflows are:
weatherreporter generate daily --date 2026-05-29
weatherreporter generate tomorrow
weatherreporter generate three-day
weatherreporter generate weekend
weatherreporter run morning
weatherreporter run evening
```
@@ -15,8 +17,8 @@ These commands fetch weather data, build a briefing for the resolved valid
period, build the prompt input data package, run `scriptorium render`, run
`scriptorium run`, and write inspectable artifacts under the configured
workspace. The evening run resolves only the Tomorrow Planning Brief. The
morning run can generate Daily Today and the 3-Day Outlook when the resolved
batch does not include an unsupported report type.
morning run generates Daily Today and the 3-Day Outlook, plus Weekend Outlook
except on Sunday.
## Filesystem Layout
@@ -33,6 +35,10 @@ workspace/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
weekend/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
data-packages/
daily/
YYYY-MM-DD/
@@ -40,6 +46,9 @@ workspace/
three-day/
YYYY-MM-DD/
<run_id>.data_package.json
weekend/
YYYY-MM-DD/
<run_id>.data_package.json
preflight/
daily/
YYYY-MM-DD/
@@ -47,16 +56,21 @@ workspace/
three-day/
YYYY-MM-DD/
<run_id>.render.json
weekend/
YYYY-MM-DD/
<run_id>.render.json
reports/
daily/
<run_id>.md
three-day/
<run_id>.md
weekend/
<run_id>.md
```
The Markdown report is written to a RunID-managed report path. When `--out` is
provided to `generate daily`, `generate tomorrow`, or `generate three-day`, the
managed report is also copied to that path.
provided to `generate daily`, `generate tomorrow`, `generate three-day`, or
`generate weekend`, the managed report is also copied to that path.
## Run Identifiers
@@ -93,6 +107,10 @@ they cover the same valid local date. Meaningful changes are included under
3-Day Outlook generation compares against a prior compatible 3-Day briefing
snapshot for the same valid local date when one exists.
Weekend Outlook generation compares against a prior compatible Weekend briefing
snapshot for the same weekend window when one exists. Friday evening and
Saturday runs may narrow the valid start while keeping the same Monday endpoint.
When no prior comparable snapshot exists, or no configured threshold is crossed,
the Recent Changes list is empty.