Added a location block to the data package

This commit is contained in:
2026-05-29 19:57:08 -05:00
parent 42defcf4b9
commit 8a762bf34f
16 changed files with 152 additions and 9 deletions

View File

@@ -51,6 +51,19 @@ config test suite.
Timezone values may be IANA names, configured aliases such as `Chicago` and
`Stl`, US timezone abbreviations, or UTC offsets such as `-5` and `+09:30`.
### `location`
`location` is descriptive prompt context included in briefing metadata and
Scriptorium data packages. It does not select a Weather API endpoint or enable
multiple configured forecast locations.
- `id`: short local identifier. Default: `home`.
- `name`: human-readable location name. Default: `Brentwood`.
- `region`: broader forecast area context. Default: `St. Louis Metro`.
The prompt-facing location object also includes `timezone`, derived from the
effective `weather_api.timezone` after CLI overrides such as `--tz`.
### `missing_source`
- `default`: missing-source behavior for optional sources. One of `error`, `warn`, or `none`. Default: `warn`.

View File

@@ -16,7 +16,7 @@ Inputs:
- resolved report definition, generation time, timezone, and valid period
- forecast bundle with source provenance and warnings
- derived daily or period summaries where required
- configured units and timezone
- configured units, timezone, and descriptive location context
Outputs:
@@ -34,6 +34,8 @@ Outputs:
The package receives configured units and timezone from the app layer. Daypart
configuration is consumed by `internal/forecast` before briefing builders run.
Configured `location` values are prompt context only; Weather API
`sourceLocationId` and `sourceLocation` remain source provenance.
## External Adapters Used
@@ -74,6 +76,6 @@ Inspect:
- Briefings contain structured weather facts and source context.
- Common metadata includes RunID, report ID, prompt ID, valid period, source
provenance, source hashes, and source warnings.
provenance, source hashes, source warnings, and configured prompt location.
- LLM prompt input packaging and Scriptorium execution remain outside this
boundary.

View File

@@ -18,8 +18,8 @@ Outputs:
- `promptinput.Package` containing schema version, RunID, report metadata,
briefing content, Recent Changes, and source warnings. Briefing content
includes discussion key messages and short/long-term AFD narratives when the
Weather API provides them.
includes configured location context, discussion key messages, and
short/long-term AFD narratives when the Weather API provides them.
- optional JSON file written by `promptinput.Save`
## Boundaries
@@ -30,8 +30,8 @@ Outputs:
## Config Fields Used
None directly. Config-derived values are already present in briefing metadata
before this package runs.
None directly. Config-derived values, including prompt location context, are
already present in briefing metadata before this package runs.
## External Adapters Used

View File

@@ -66,8 +66,8 @@ valid-period start date for JSON artifacts, and the RunID.
```
Metadata is stored beside briefing snapshots and links the briefing, data
package, preflight, and report paths. Report listing walks metadata files under
the snapshots directory.
package, preflight, report paths, and configured prompt location. Report
listing walks metadata files under the snapshots directory.
## Prior Lookup