diff --git a/docs/internal/app-orchestration.md b/docs/internal/app-orchestration.md index e004fb8..174184f 100644 --- a/docs/internal/app-orchestration.md +++ b/docs/internal/app-orchestration.md @@ -4,9 +4,10 @@ This document describes the implemented workflow coordinator in `internal/app`. ## Purpose -`internal/app` coordinates top-level use cases: generating one report, running -morning or evening batches, building inspectable briefing artifacts, fetching -weather bundles, and reading existing artifacts for inspection. +`internal/app` coordinates top-level use cases: generating one report through +the shared report-generation path, running morning or evening batches, building +inspectable briefing artifacts, fetching weather bundles, and reading existing +artifacts for inspection. ## Inputs And Outputs @@ -21,8 +22,9 @@ Inputs: Outputs: -- report results with briefing, data package, preflight, report, metadata, - prior snapshot, Recent Changes, and Scriptorium results +- report results for generated report definitions with briefing, data package, + preflight, report, metadata, prior snapshot, Recent Changes, and Scriptorium + results - batch summaries with per-report status and artifact paths - inspection JSON values for reports, metadata, briefings, data packages, prior snapshots, and source provenance @@ -84,6 +86,8 @@ Inspect: ## Invariants - Report behavior is resolved through `internal/report`. +- Generated reports use the same app request and result types regardless of + report ID. - Render preflight precedes Scriptorium report generation. - Recent Changes are computed from structured briefing snapshots. - Metadata links artifacts produced for a run. diff --git a/docs/internal/state.md b/docs/internal/state.md index ae24104..b235543 100644 --- a/docs/internal/state.md +++ b/docs/internal/state.md @@ -61,13 +61,14 @@ artifact group. Metadata is stored beside briefing snapshots and links briefing, data package, preflight, and report paths. Report listing walks metadata files under the snapshots directory. -Prior snapshot lookup reads metadata and selects the latest earlier snapshot -whose report ID is compatible according to the current report definition. Daily -Today and Daily Tomorrow are compatible with each other for the same valid local -date. 3-Day Outlook compares with prior 3-Day snapshots for the same valid -local date. Weekend Outlook compares with prior Weekend snapshots for the same -weekend window. Storm Report currently has no prior lookup because its -comparison strategy is not searched by the filesystem store. +Prior snapshot lookup reads metadata through the shared lookup path and selects +the latest earlier snapshot whose report ID is compatible according to the +current report definition. Daily Today and Daily Tomorrow are compatible with +each other for the same valid local date. 3-Day Outlook compares with prior +3-Day snapshots for the same valid local date. Weekend Outlook compares with +prior Weekend snapshots for the same weekend window. Storm Report currently has +no prior lookup because its comparison strategy is not searched by the +filesystem store. ## Skip And Resume Behavior