Add Tomorrow planning brief generation
This commit is contained in:
21
docs/cli.md
21
docs/cli.md
@@ -1,6 +1,7 @@
|
||||
# Weatherreporter CLI
|
||||
|
||||
`weatherreporter generate daily` currently writes a Daily Markdown report
|
||||
`weatherreporter generate daily`, `weatherreporter generate tomorrow`, and
|
||||
`weatherreporter run evening` currently write Daily-family Markdown reports
|
||||
through `scriptorium`, after writing managed preparation artifacts and running
|
||||
`scriptorium render` as a preflight check. Other report generation and scheduled
|
||||
runs still resolve configuration, report definitions, and valid periods, then
|
||||
@@ -19,6 +20,13 @@ invokes `scriptorium run --input data_package=<managed_path> --out <managed_repo
|
||||
When `--out` is supplied, it also writes a copy of the Markdown report to that
|
||||
path.
|
||||
|
||||
For tomorrow planning:
|
||||
|
||||
```sh
|
||||
weatherreporter generate tomorrow --out ./tomorrow.md
|
||||
weatherreporter run evening
|
||||
```
|
||||
|
||||
## Command Overview
|
||||
|
||||
```text
|
||||
@@ -31,10 +39,11 @@ weatherreporter run morning
|
||||
weatherreporter run evening
|
||||
```
|
||||
|
||||
`generate daily` writes a briefing snapshot, prompt input data package, render
|
||||
preflight output, Markdown report, and metadata file under the configured
|
||||
workspace. Other `generate` commands resolve one report request and stop before
|
||||
report generation. `run` commands resolve a scheduled batch request and stop
|
||||
`generate daily` and `generate tomorrow` 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.
|
||||
Other `generate` commands resolve one report request and stop before report
|
||||
generation. Other `run` commands resolve a scheduled batch request and stop
|
||||
before execution.
|
||||
|
||||
## Flags
|
||||
@@ -43,7 +52,7 @@ before execution.
|
||||
- `--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`; reserved for later generated report output on other `generate` commands.
|
||||
- `--out PATH`: optional Markdown report copy for `generate daily` and `generate tomorrow`; 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`.
|
||||
|
||||
@@ -5,8 +5,8 @@ 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.
|
||||
forecast summaries and report metadata. The package currently implements Daily
|
||||
Today and Daily Tomorrow briefing content.
|
||||
|
||||
## Inputs and Outputs
|
||||
|
||||
@@ -35,6 +35,8 @@ Output:
|
||||
- Daily content includes bottom-line inputs, daypart summaries, relevant alerts,
|
||||
outdoor window inputs, narrative periods, discussion context, and weather
|
||||
story context when available.
|
||||
- Daily Tomorrow also includes planning inputs for morning readiness,
|
||||
commute/school/workday concerns, and what may change overnight.
|
||||
- Briefing JSON is written atomically by `briefing.Save`.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
@@ -46,7 +46,8 @@ Daily comparison currently detects:
|
||||
- snow, ice, and thunder risk changes
|
||||
|
||||
When no prior comparable snapshot exists, the app sends an empty Recent Changes
|
||||
section in the data package.
|
||||
section in the data package. Daily Today and Daily Tomorrow are compatible for
|
||||
same-valid-date comparison through the report registry.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
|
||||
@@ -50,9 +50,10 @@ Workspace subdirectories must be relative paths that stay under
|
||||
Managed artifact names use RunID, which is generated from report generation time
|
||||
and report ID. Daily metadata is stored beside Daily briefing snapshots by valid
|
||||
local date. Prior Daily snapshot lookup reads metadata for the same valid local
|
||||
date and returns the latest earlier run. 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.
|
||||
date and returns the latest earlier compatible Daily Today or Daily Tomorrow
|
||||
run. 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
|
||||
|
||||
|
||||
@@ -2,15 +2,18 @@
|
||||
|
||||
## Normal Workflow
|
||||
|
||||
The implemented Daily generation workflow is:
|
||||
The implemented Daily-family generation workflows are:
|
||||
|
||||
```text
|
||||
weatherreporter generate daily --date 2026-05-29
|
||||
weatherreporter generate tomorrow
|
||||
weatherreporter run evening
|
||||
```
|
||||
|
||||
The command fetches weather data, builds the Daily briefing, builds the prompt
|
||||
input data package, runs `scriptorium render`, runs `scriptorium run`, and
|
||||
writes inspectable artifacts under the configured workspace.
|
||||
These commands fetch weather data, build a Daily briefing for the resolved
|
||||
valid date, 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.
|
||||
|
||||
## Filesystem Layout
|
||||
|
||||
@@ -36,8 +39,9 @@ workspace/
|
||||
<run_id>.md
|
||||
```
|
||||
|
||||
The Markdown report is written to the managed report path. When `--out` is
|
||||
provided, the managed report is also copied to that path.
|
||||
The Markdown report is written to a RunID-managed report path. When `--out` is
|
||||
provided to `generate daily` or `generate tomorrow`, the managed report is also
|
||||
copied to that path.
|
||||
|
||||
## Run Identifiers
|
||||
|
||||
@@ -67,7 +71,9 @@ Each Daily generation writes metadata that links:
|
||||
|
||||
When a prior comparable Daily briefing snapshot exists for the same valid local
|
||||
date, the app compares structured briefing data before writing the prompt input
|
||||
data package. Meaningful changes are included under `recentChanges.items`.
|
||||
data package. Daily Today and Daily Tomorrow can compare with each other when
|
||||
they cover the same valid local date. Meaningful changes are included under
|
||||
`recentChanges.items`.
|
||||
|
||||
When no prior comparable snapshot exists, or no configured threshold is crossed,
|
||||
the Recent Changes list is empty.
|
||||
|
||||
Reference in New Issue
Block a user