π Evening Analysis
July 23, 2026 Β· View on GitHub
Generates deep political intelligence analysis and renders the HTML article in all 14 supported languages for evening political intelligence aggregation (Tier-C aggregation β reads sibling analyses across the reporting window and applies period multipliers from ext/tier-c-aggregation.md) in one single agentic run. The dedicated news-translate workflow runs on a separate track and translates executive-brief.md markdown into 13 language siblings (executive-brief_<lang>.md)
What this workflow does
- Article type:
evening-analysis - Analysis subfolder:
analysis/daily/$ARTICLE_DATE/evening-analysis/ - Aggregated markdown:
analysis/daily/$ARTICLE_DATE/evening-analysis/article.md(produced byscripts/aggregate-analysis.ts) - Rendered HTML:
news/$ARTICLE_DATE-evening-analysis-{en,sv,da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.htmlβ always all 14 languages (produced byscripts/render-articles.ts) - Single-run model: one run does download β analysis Pass 1 + 2 β gate β aggregate β render (14 languages) β ONE PR. There is no separate "article run" and no inter-workflow dispatch. The
news-translateworkflow runs on a separate track and handles only executive-brief markdown translations (executive-brief_<lang>.md); it does not back-fillarticle.<lang>.md.
Time budget
π‘ Plan to call
safeoutputs___create_pull_requestby agent minute 42 (hard deadline 45) to reserve job-level headroom for setup variance and the safe-outputs runner. See00-base-contract.md Β§Session timingand07-commit-and-pr.md Β§Deadline enforcement.AI-FIRST within the 60-minute budget: Pass 2 is still mandatory. Scheduled runs should honor the configured
analysis_depth=deepdefault instead of pre-emptively downgrading scope. Prefer scope compression over iteration skipping only if runtime risk emerges β reduce the download/manifest scope if needed, but maintain 1:1 per-document coverage and always perform a full read-back-and-improve Pass 2 on whatever artifacts exist. Reservecomprehensivefor manualworkflow_dispatchbackfills.
Single run (produces all 23 analysis artifacts + aggregated article.md + 14 HTML files, target ~42 agent minutes in a 60-min job):
| Minutes | Phase | Module |
|---|---|---|
| 0β3 | MCP pre-warm + pre-flight check | 02 / 03 |
| 3β6 | Download data + catalogue | 03 |
| 6β18 | Analysis Pass 1 (methodology read + per-doc analyses + all 23 artifacts: Family A 9 + B 2 + C 5 + D 7) | 04 |
| 18β36 | Analysis Pass 2 (read-back + improvements on all 22 text files; extended slot reclaims the 8 min freed by removing per-language Markdown translation β see TRANSLATION_GUIDE.md Β§News articles are translated out-of-band) | 04 |
| 36β38 | Analysis Gate (checks 1β11 + post-aggregate Check 12 below) | 05 |
| 38β40 | scripts/aggregate-analysis.ts β article.md, then scripts/validate-article.ts (post-aggregate Check 12: banned phrases, citation density, economicProvenance β€ 6 mo) | 06 |
| 40β42 | scripts/render-articles.ts --lang all β all 14 HTML files | 06 |
| 42β43 | Stage analysis + article.md + news/*.html, commit, ONE safeoutputs___create_pull_request β HARD DEADLINE agent minute 45 | 07 |
Use the full budget for AI-FIRST iteration (see .github/copilot-instructions.md Β§AI FIRST Quality Principle). One PR per run. If agent minute 42 arrives without staging, stop remaining work, run the aggregator + renderer on whatever artifacts exist, commit, and call safeoutputs___create_pull_request β a partial PR beats losing the run to Timer A. Translation under-coverage is acceptable: the renderer composes English article.md body with the localized executive-brief overlay.
Inputs
article_dateβ override date (defaults to today)force_generationβ regenerate even if today's content exists; also forces analysis re-runanalysis_depthβstandard|deep(default) |comprehensive
Note: there is no
languagesinput. Every run produces all 14 language HTML files. Translation depth-of-quality scales with the time budget (see the table above).
Run-mode selection
At the start of every run, the pre-flight check in 03-data-download.md detects whether analysis/daily/$ARTICLE_DATE/evening-analysis/ already contains all 23 required artifacts:
- No analysis found β run the full pipeline (download β Pass 1 β Pass 2 β gate β aggregate β render β PR).
- Analysis found β enter improvement-mode (see
04-analysis-pipeline.md Β§Improvement-mode path); extend existing artifacts, run Pass 2 + gate, then aggregate + render + PR.
Repeated runs for the same $ARTICLE_DATE always use the same analysis folder when force_generation=false.
File-write contract
π Write every analysis artifact (
analysis/daily/$DATE/$SUB/*.md,documents/*.md, JSON sidecars,methodology-reflection.mdre-run deltas) with theedittool.cat <<'QUOTED_EOF' > fileis a Tier-2 fallback only β ASCII-only, no code fences / Mermaid /$/ backticks /EOFmarkers, < 200 lines, and only afteredithas failed for a non-content reason. Banned foranalysis/daily/**writes:python3,node -e,sed -i,echo β¦ > file,tee file, unquoted heredocs (<<EOF) β sole exception: the pre-flight scaffold in03-data-download.md(env-var refs and short literals only, no agent-generated content). The aggregator (scripts/aggregate-analysis.ts) and renderer (scripts/render-articles.ts) are the only writers forarticle.mdandnews/*.html. See01-bash-and-shell-safety.mdΒ§File creation & overwrite strategy.
All other rules (bash format, AWF shell safety, MCP access, download pipeline, analysis methodology & gate, aggregate + render, commit & PR policy) live in the imported modules.