Add collected and derived fact contracts

This commit is contained in:
2026-06-09 20:23:53 +00:00
parent 454f47b2b5
commit e9508089ab
10 changed files with 519 additions and 65 deletions

View File

@@ -6,10 +6,10 @@ This document describes the implemented workflow coordinator in `internal/app`.
`internal/app` coordinates the top-level use cases after CLI parsing and config
loading are complete. It resolves report definitions, fetches weather data,
builds briefing and prompt-input artifacts, invokes Scriptorium through the
adapter boundary, optionally notifies distributor through an app-owned notifier
boundary, persists managed state, runs batches, and reads existing artifacts for
inspection.
builds collected and derived facts, builds briefing and prompt-input artifacts,
invokes Scriptorium through the adapter boundary, optionally notifies
distributor through an app-owned notifier boundary, persists managed state, runs
batches, and reads existing artifacts for inspection.
## Inputs And Outputs
@@ -21,7 +21,7 @@ Inputs:
- `BriefingRequest` and `ReportRequest` for package-level orchestration tests
and internal composition
- resolved report definitions from `internal/report`
- forecast bundles from `internal/adapters/weatherapi`
- weather data bundles from `internal/adapters/weatherapi`
- prior snapshots loaded from `internal/state`
- optional renderer, notifier, and state-store fakes for tests
@@ -39,11 +39,12 @@ Outputs:
## Boundaries
`internal/app` owns workflow order and request composition. It does not parse
CLI flags, load YAML files directly, implement HTTP transport, derive forecast
facts, define report periods, compare rendered Markdown, or construct
Scriptorium argv.
CLI flags, load YAML files directly, implement HTTP transport, own fact
derivation algorithms, define report periods, compare rendered Markdown, or
construct Scriptorium argv.
Report selection and report identity policy come from `internal/report`.
Collected and derived fact contracts come from `internal/facts`.
Weather API transport stays in `internal/adapters/weatherapi`. Scriptorium
subprocess behavior stays in `internal/adapters/scriptorium`. Distributor
upload behavior stays in `internal/adapters/distributor`. Filesystem layout and