Files
weatherreporter/docs/operations.md

188 lines
5.6 KiB
Markdown
Raw Permalink Normal View History

2026-05-29 17:40:38 +00:00
# Weatherreporter Operations
This guide covers normal operation, generated artifacts, inspection, recovery,
and current operational caveats. For symptom-specific diagnosis, see
[Troubleshooting](troubleshooting.md).
2026-05-29 17:40:38 +00:00
## Normal Workflow
Implemented generation commands:
2026-05-29 17:40:38 +00:00
```text
weatherreporter generate daily --date 2026-05-29
2026-05-29 18:00:27 +00:00
weatherreporter generate tomorrow
2026-05-29 18:08:50 +00:00
weatherreporter generate three-day
2026-05-29 18:16:10 +00:00
weatherreporter generate weekend
2026-05-29 18:28:25 +00:00
weatherreporter generate storm --start 2026-05-29T18:00 --end 2026-05-30T06:00
```
Each command resolves a report period, fetches a Weather API bundle, builds a
briefing, builds a prompt input data package, runs `scriptorium render`, runs
`scriptorium run`, and writes managed artifacts under the configured workspace.
`--out PATH` writes an extra Markdown copy for the current generated report.
Implemented batch commands:
```text
2026-05-29 18:16:10 +00:00
weatherreporter run morning
2026-05-29 18:00:27 +00:00
weatherreporter run evening
2026-05-29 17:40:38 +00:00
```
`run morning` generates Daily Today and the 3-Day Outlook, plus Weekend Outlook
except on Sunday. `run evening` generates the Tomorrow Planning Brief. Batch
commands print a JSON summary to stdout, write compact per-report status lines
to stderr, continue independent reports after one report fails, and return
nonzero when any report failed. `--out-dir PATH` writes extra Markdown copies
using report default filenames such as `daily.md`, `three-day.md`,
`weekend.md`, and `tomorrow.md`.
2026-05-29 18:20:39 +00:00
2026-05-29 17:40:38 +00:00
## Filesystem Layout
The default workspace root is `workspace`.
```text
workspace/
snapshots/
daily/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
2026-05-29 18:08:50 +00:00
three-day/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
2026-05-29 18:16:10 +00:00
weekend/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
2026-05-29 18:28:25 +00:00
storm/
YYYY-MM-DD/
<run_id>.briefing.json
<run_id>.metadata.json
2026-05-29 17:40:38 +00:00
data-packages/
daily/
YYYY-MM-DD/
<run_id>.data_package.json
2026-05-29 18:08:50 +00:00
three-day/
YYYY-MM-DD/
<run_id>.data_package.json
2026-05-29 18:16:10 +00:00
weekend/
YYYY-MM-DD/
<run_id>.data_package.json
2026-05-29 18:28:25 +00:00
storm/
YYYY-MM-DD/
<run_id>.data_package.json
2026-05-29 17:40:38 +00:00
preflight/
daily/
YYYY-MM-DD/
<run_id>.render.json
2026-05-29 18:08:50 +00:00
three-day/
YYYY-MM-DD/
<run_id>.render.json
2026-05-29 18:16:10 +00:00
weekend/
YYYY-MM-DD/
<run_id>.render.json
2026-05-29 18:28:25 +00:00
storm/
YYYY-MM-DD/
<run_id>.render.json
2026-05-29 17:40:38 +00:00
reports/
daily/
<run_id>.md
2026-05-29 18:08:50 +00:00
three-day/
<run_id>.md
2026-05-29 18:16:10 +00:00
weekend/
<run_id>.md
2026-05-29 18:28:25 +00:00
storm/
<run_id>.md
2026-05-29 17:40:38 +00:00
```
Managed artifact filenames use the RunID, so repeated runs for the same valid
period do not overwrite each other.
2026-05-29 18:20:39 +00:00
## RunID And Metadata
2026-05-29 17:40:38 +00:00
RunIDs are based on generation time plus report ID:
2026-05-29 17:40:38 +00:00
```text
20260529T100000.123456789Z_daily_today
```
2026-05-29 18:08:50 +00:00
Each generated report writes metadata that links:
2026-05-29 17:40:38 +00:00
- RunID, report ID, variant, and prompt ID
- generation time, timezone, and valid period
2026-05-29 17:40:38 +00:00
- source location, source hashes, and source warnings
- briefing snapshot path
- prompt input data package path
- preflight output path
- managed Markdown report path
2026-05-29 17:40:38 +00:00
Batch summaries include report status, error text when applicable, valid
period, and known artifact paths for each attempted report.
2026-05-29 18:20:39 +00:00
## Inspection
Inspection commands read existing workspace artifacts and emit JSON to stdout.
They do not fetch weather data or run `scriptorium`.
```text
weatherreporter inspect reports --limit 10
weatherreporter inspect metadata RUN_ID
weatherreporter inspect briefing RUN_ID
weatherreporter inspect data-package RUN_ID
weatherreporter inspect prior RUN_ID
weatherreporter inspect sources RUN_ID
```
Use `inspect reports` to find recent RunIDs and artifact paths. Use
`inspect metadata` to see the artifact links recorded for a run. Use
`inspect briefing` and `inspect data-package` to review the exact structured
inputs used for rendering. Use `inspect prior` to see the prior comparable
snapshot selected for Recent Changes, or `null` when none exists. Use
`inspect sources` to review source provenance and warnings without dumping full
weather payloads.
2026-05-29 17:53:03 +00:00
## Recent Changes
Recent Changes are computed from structured briefing snapshots, not rendered
Markdown text.
2026-05-29 17:53:03 +00:00
Daily Today and Daily Tomorrow can compare with each other when they cover the
same valid local date. 3-Day Outlook compares with prior compatible 3-Day
snapshots for the same valid local date. Weekend Outlook compares with prior
compatible Weekend snapshots for the same weekend window. Storm Report currently
leaves Recent Changes empty.
2026-05-29 18:28:25 +00:00
2026-05-29 17:53:03 +00:00
When no prior comparable snapshot exists, or no configured threshold is crossed,
`recentChanges.items` is empty.
2026-05-29 17:53:03 +00:00
2026-05-29 17:40:38 +00:00
## Recovery
A failed generation run may still leave useful artifacts:
- If `scriptorium render` returns a result with a nonzero exit code, the
preflight JSON and metadata are written for inspection.
- If `scriptorium run` exits nonzero after writing a report, the managed report
and metadata remain available.
- For batch commands, inspect the stdout JSON summary first, then inspect the
artifact paths for each failed report.
2026-05-29 17:40:38 +00:00
For a bad report, start with:
```text
weatherreporter inspect metadata RUN_ID
weatherreporter inspect sources RUN_ID
weatherreporter inspect briefing RUN_ID
weatherreporter inspect data-package RUN_ID
weatherreporter inspect prior RUN_ID
```
## Operational Caveats
2026-05-29 18:20:39 +00:00
- The application uses one configured Weather API endpoint.
- The application writes local filesystem state only.
- The application does not implement resume, cleanup, archive, remote storage,
daemon operation, or automatic storm monitoring.
- Generated reports and Scriptorium stderr can contain sensitive operational
context. Store workspace artifacts with appropriate filesystem permissions.