2026-05-29 16:58:18 +00:00
# Weatherreporter Configuration
2026-07-31 00:57:46 +00:00
Weatherreporter reads YAML configuration. The default path is:
2026-05-29 16:58:18 +00:00
2026-05-29 19:47:01 +00:00
```text
/usr/local/etc/weatherreporter/config.yml
```
2026-07-31 00:57:46 +00:00
If the default file is absent, Weatherreporter uses built-in defaults. An
explicit `--config PATH` must exist. Values are applied in this order:
2026-05-29 19:47:01 +00:00
2026-07-31 00:57:46 +00:00
1. built-in defaults;
2. the configuration file, when present; and
3. the `--units` and `--tz` command-line overrides.
2026-05-29 19:47:01 +00:00
2026-08-01 20:11:57 +00:00
Environment variables do not override configuration fields. Output flags select
operator-owned destinations for one command and do not change configuration.
2026-05-29 19:47:01 +00:00
2026-07-31 00:57:46 +00:00
## Maintained Examples
- [minimal-config.yml ](../examples/minimal-config.yml ) is the smallest useful
collection and generation configuration.
- [config.yml ](../examples/config.yml ) is a representative production-oriented
configuration using synthetic endpoints and no credentials.
2026-08-01 14:25:09 +00:00
- [weather-light-local-profile.yml ](../examples/weather-light-local-profile.yml )
is a complete endpoint-only override for the embedded `weather-light`
profile.
2026-05-29 16:58:18 +00:00
2026-08-01 14:25:09 +00:00
The configuration examples are loaded by the configuration test suite. The
profile example is inspected through the Promptkit adapter test suite.
2026-05-29 16:58:18 +00:00
2026-07-31 00:57:46 +00:00
## Minimal Configuration
2026-05-29 20:02:56 +00:00
2026-05-29 16:58:18 +00:00
```yaml
weather_api:
base_url: https://weather.api.example.com/
```
2026-07-31 00:57:46 +00:00
`weather_api.base_url` is required for workflows that collect weather data.
All omitted fields use their built-in defaults.
2026-05-29 19:47:01 +00:00
## Field Reference
### `weather_api`
2026-07-31 00:57:46 +00:00
| Field | Default | Rules |
| --- | --- | --- |
2026-08-13 00:32:22 +00:00
| `base_url` | empty | Absolute HTTP(S) Weather API URL. Required for collection and generation. |
2026-07-31 00:57:46 +00:00
| `timeout` | `10s` | Must be greater than zero. |
| `precision` | `0` | Must be zero or greater. Sent as the Weather API precision query value. |
| `units` | `us` | Required Weather API units query value; `--units` overrides it for one command. |
| `timezone` | `America/Chicago` | Required report and Weather API timezone; `--tz` overrides it for one command. |
| `format` | `json` | Required and must be `json` . |
2026-05-29 19:47:01 +00:00
Timezone values may be IANA names, configured aliases such as `Chicago` and
2026-08-13 00:15:26 +00:00
`Stl` , US timezone abbreviations, or signed UTC offsets such as `-5` , `+0930` ,
and `+09:30` . Numeric offsets require a sign, one or two hour digits, and an
optional two-digit minute component with or without a colon. Hours must be
from `00` through `23` , minutes from `00` through `59` , so the largest accepted
offset magnitude is `23:59` .
2026-05-29 19:47:01 +00:00
2026-05-29 19:57:08 -05:00
### `location`
2026-07-31 00:57:46 +00:00
`location` supplies descriptive prompt context; it does not choose a Weather
API endpoint or configure multiple forecast locations.
2026-05-29 19:57:08 -05:00
2026-07-31 00:57:46 +00:00
| Field | Default |
| --- | --- |
| `id` | `home` |
| `name` | `Brentwood` |
| `region` | `St. Louis Metro` |
2026-05-29 19:57:08 -05:00
2026-07-31 00:57:46 +00:00
The prompt-facing location timezone is derived from the effective
`weather_api.timezone` after command-line overrides.
2026-05-29 19:57:08 -05:00
2026-06-07 23:13:54 +00:00
### `secrets`
2026-07-31 00:57:46 +00:00
`secrets.directory` defaults to empty, which disables secret loading. When it
2026-08-13 00:18:20 +00:00
is set, every regular file directly in that directory is staged after the file
and command-line overrides, then applied only after the complete configuration
has validated successfully. A rejected load leaves the existing environment
unchanged. A file basename must match
2026-07-31 00:57:46 +00:00
`[A-Za-z_][A-Za-z0-9_]*` ; it becomes an environment variable name, and the
file contents replace any existing value. One trailing LF or CRLF is removed.
Missing directories, unreadable files, subdirectories, symlinks, non-regular
files, and invalid names fail configuration loading. Put only secret values in
this directory, never in the YAML file.
2026-08-02 01:41:03 +00:00
### `output`
`output.directory` selects the ordinary operator-owned publication directory
2026-08-02 06:10:15 +00:00
for individual reports, batches, and the default parent of comparison bundles.
2026-08-02 01:41:03 +00:00
| Field | Default | Rules |
| --- | --- | --- |
| `directory` | empty | An omitted or empty value uses the invocation working directory. A nonempty value must contain at least one non-whitespace character. |
The configured value is preserved while configuration loads: it is not cleaned,
made absolute, inspected, created, or expanded through environment variables or
a home-directory shortcut. At execution, an absolute directory is used as
given; a relative directory resolves from the invocation working directory, not
from the configuration file's location. A missing directory is created when a
report is successfully published. An existing non-directory or an uninspectable
path fails output preflight before prompt inspection, weather collection, or
publication.
For one `generate` command, `--out` is a complete file destination and takes
precedence over `output.directory` . For `run` , `--out-dir` takes precedence.
2026-08-02 06:10:15 +00:00
For `compare` , `--out-dir` selects its exact bundle directory; without it, the
comparison's report-derived directory is placed beneath `output.directory` .
2026-08-02 01:41:03 +00:00
Those explicit flags do not inspect or rebase beneath the configured directory.
See the [CLI reference ](cli.md ) for command selection and the [operations
guide](operations.md) for publication and failure handling.
2026-07-31 00:57:46 +00:00
### `notify.distributor`
Distributor notification is disabled by default. Its fields are:
| Field | Default | Rules when notification is enabled |
| --- | --- | --- |
| `enabled` | `false` | Activates Distributor notification validation. |
2026-08-13 02:44:21 +00:00
| `endpoint` | `https://distributor.example.com` | Must be an absolute HTTP(S) base URL with a host and no userinfo, query, or fragment. A path prefix is allowed. |
2026-07-31 00:57:46 +00:00
| `token_env` | `DISTRIBUTOR_UPLOAD_TOKEN` | Must name a valid environment variable. |
| `timeout` | `30s` | Must be greater than zero. |
| `failure_policy` | `error` | Must be `error` . |
| `pipeline_id_template` | empty | Required single-report pipeline ID template. |
| `bundle_id_template` | `weatherreporter.{location_id}.{report_id}` | Required single-report bundle ID template. |
| `idempotency_key_template` | `{bundle_id}.{run_id}` | Required single-report idempotency-key template. |
| `batch.enabled` | `true` | Activates batch notification validation when Distributor notification is enabled. |
| `batch.pipeline_id_template` | `weatherreporter` | Required when batch notification is enabled. |
| `batch.bundle_id_template` | `weatherreporter.{location_id}.{batch}` | Required when batch notification is enabled. |
| `batch.idempotency_key_template` | `{bundle_id}.{batch_run_id}` | Required when batch notification is enabled. |
The upload token is read from the environment variable named by `token_env` .
Use `secrets.directory` when a file-backed secret is appropriate.
2026-08-13 02:44:21 +00:00
When notification is enabled, Weatherreporter validates the Distributor endpoint
before prompt inspection, weather collection, or output publication. Use an
HTTP(S) base URL such as `https://distributor.example.com/archive` ; do not put
credentials, a query string, or a fragment in the endpoint.
2026-08-13 00:21:20 +00:00
When notification is enabled, each rendered single-report pipeline ID, bundle
ID, and idempotency key must contain at least one non-whitespace character.
2026-07-31 00:57:46 +00:00
Single-report bundle templates accept `location_id` , `report_id` , `run_id` ,
2026-06-08 10:29:42 -05:00
`artifact_group` , `batch_output_name` , `valid_start_date` , `valid_end_date` ,
2026-06-20 03:00:29 +00:00
`valid_start_time` , `valid_end_time` , `valid_start_stamp` , `valid_end_stamp` ,
2026-07-31 03:53:47 +00:00
Pipeline and idempotency-key templates may also use `bundle_id` . Dates use
`YYYY-MM-DD` ; times use `HHMM` ; and stamps use `YYYY-MM-DDTHHMM` in the
effective report timezone.
2026-07-31 00:57:46 +00:00
Batch bundle and pipeline templates accept `location_id` , `batch` ,
`batch_run_id` , and `batch_started_date` ; batch idempotency-key templates may
also use `bundle_id` . `batch_started_date` is the batch start date in the
effective report timezone.
`reports.<report>.distributor.path_templates` overrides the default ordered
Distributor paths for that report. Each rendered path must be a unique relative
path with `/` separators. Backslashes, empty segments, `.` and `..` segments,
`manifest.json` , and the reserved Distributor sidecar basename are rejected.
The default paths are:
| Report | Paths |
| --- | --- |
| `hourly` | `hourly/index.md` |
| `daily` | `daily/{valid_start_date}/{run_id}.md` , `daily/{valid_start_date}/index.md` |
| `today` | `daily/{valid_start_date}/{run_id}.md` , `daily/{valid_start_date}/index.md` , `today/index.md` |
| `tomorrow` | `daily/{valid_start_date}/{run_id}.md` , `daily/{valid_start_date}/index.md` , `tomorrow/index.md` |
See the [operations guide ](operations.md ) for notification timing, uploaded
2026-08-01 20:11:57 +00:00
output selection, and failure handling.
2026-06-07 23:46:39 +00:00
2026-05-29 19:47:01 +00:00
### `missing_source`
2026-07-31 00:57:46 +00:00
`missing_source.default` defaults to `warn` and accepts `error` , `warn` , or
`none` . `missing_source.sources` optionally overrides that policy by source.
2026-08-13 00:15:26 +00:00
Hourly forecast data is required for generated reports and cannot have a
source-specific policy. Supported optional source keys are `observations` ,
`current` , `narrative` , `alerts` , `discussion` , `weather_story` , and
`spc_convective_outlooks` ; any other key is rejected.
2026-05-29 19:47:01 +00:00
2026-07-31 04:27:36 +00:00
### `promptkit`
2026-07-31 04:41:02 +00:00
Promptkit configuration selects the executor and prompt/profile checks for
2026-08-02 06:10:15 +00:00
every `generate` , `run` , and `compare` command. A top-level `scriptorium:` configuration
2026-07-31 05:03:02 +00:00
key is rejected with a migration error; it is not translated or ignored.
2026-07-31 04:27:36 +00:00
2026-07-31 04:48:16 +00:00
Prompt debug capture has no YAML setting. Use `--llm-debug-dir PATH` on an
2026-08-02 06:10:15 +00:00
individual `generate` , `run` , or `compare` command when explicitly needed.
2026-08-13 13:52:16 +00:00
See [optional prompt debug capture ](operations.md#optional-prompt-debug-capture )
for platform availability, security, and retention requirements.
2026-07-31 04:48:16 +00:00
2026-07-31 04:27:36 +00:00
| Field | Default | Rules |
| --- | --- | --- |
2026-08-01 14:25:09 +00:00
| `profile` | empty | Optional global profile selection for every report in one command. When empty, each exact prompt version selects its declared default. |
| `profile_file` | empty | Optional external Promptkit profile file. It cannot be combined with `profile_dir` . A same-ID profile completely replaces Weatherreporter's embedded definition. |
| `profile_dir` | empty | Optional external Promptkit profile directory. It cannot be combined with `profile_file` . A same-ID profile completely replaces Weatherreporter's embedded definition. |
2026-07-31 04:27:36 +00:00
| `timeout` | `2m` | Must be greater than zero. |
| `local.endpoint` | empty | Optional absolute URL for the conventional local backend. A blank endpoint leaves it unregistered. |
| `local.concurrency_limit` | `1` | Maximum local backend concurrency. `0` is unlimited; negative values are invalid. |
2026-08-01 14:25:09 +00:00
`profile` selects an ID; `profile_file` and `profile_dir` supply definitions.
They are separate decisions. An explicit `profile` applies to every selected
report. Otherwise Hourly selects `weather-light` , while Daily, Today, and
2026-08-25 19:56:23 +00:00
Tomorrow select `weather-balanced` through their exact `2.1.0` prompt
2026-08-01 14:25:09 +00:00
definitions.
Promptkit resolves a selected profile definition from a test or embedding
consumer's explicit in-memory profile, then the configured `profile_file` or
`profile_dir` , then Weatherreporter's embedded catalog, and finally Promptkit's
2026-08-29 15:56:05 +00:00
maintained catalog. Weatherreporter's embedded `weather-*` definitions are small
2026-08-25 19:38:16 +00:00
aliases of Promptkit's maintained base profiles, so Promptkit also resolves
their inherited target and settings. A configured definition with the same ID
as either a selected profile or an inherited base takes precedence. A matching
malformed external profile fails rather than using the embedded definition. The
[Promptkit integration guide ](integrations/promptkit.md ) owns the catalog and
precedence details.
An endpoint-only profile may intentionally have no backend identity. Profiles
that require a direct API key are rejected before collection, while Promptkit
resolves optional environment credential sources during execution.
2026-08-01 14:25:09 +00:00
To replace the default Hourly definition with a local OpenAI-compatible
endpoint, set `profile_file` to a copy of
[weather-light-local-profile.yml ](../examples/weather-light-local-profile.yml ).
The example has no credential and should be edited for the local endpoint and
model before use. An alternative profile may use `backend: local` ; in that
case `promptkit.local.endpoint` supplies the conventional local backend
endpoint.
2026-05-29 19:47:01 +00:00
### `dayparts`
2026-07-31 00:57:46 +00:00
`dayparts` is a non-empty list of named local-time windows used in forecast
derivation. Every item needs `name` , `start` , and `end` ; start and end use
`HH:MM` . Defaults are `overnight` (`00:00` – `06:00` ), `morning`
(`06:00` – `10:00` ), `midday` (`10:00` – `15:00` ), `afternoon`
(`15:00` – `17:00` ), and `evening` (`17:00` – `24:00` ).
2026-05-29 19:47:01 +00:00
2026-08-13 01:08:20 +00:00
Names remain display text, but each name must have a distinct canonical
identity. Canonicalization trims whitespace, lowercases letters, and collapses
punctuation and whitespace to underscores; for example, `Morning` ,
`morning!` , and `morning` conflict. Planning recognizes the canonical
identities `morning` , `afternoon` , `evening` , and `overnight` regardless of
their display capitalization or punctuation.
2026-06-09 20:51:22 +00:00
### `reports`
2026-07-31 00:57:46 +00:00
`reports` optionally overrides a report's ordered deterministic modules and
Distributor path templates. Omit a report entry to retain its defaults.
2026-06-09 20:51:22 +00:00
2026-08-13 00:15:26 +00:00
Supported report keys are `daily` , `today` , `tomorrow` , and `hourly` . Keys are
trimmed, case-folded to lowercase, and normalize hyphens to underscores before
lookup.
2026-06-09 20:51:22 +00:00
2026-07-31 00:57:46 +00:00
Each report entry can contain:
2026-05-29 20:02:56 +00:00
2026-07-31 00:57:46 +00:00
- `deterministic_modules` : an ordered list of module IDs, or objects with `id`
and optional `options` .
- `distributor.path_templates` : an optional, non-empty ordered list of
Distributor paths for that report.
2026-05-29 20:02:56 +00:00
2026-07-31 00:57:46 +00:00
Unknown reports and modules, duplicate modules, incompatible report-module
combinations, duplicate stanza names, invalid path templates, and invalid
module options fail configuration loading. The accepted module IDs and module
option contracts are documented in the [module contract internals ](internal/module.md ).