Skip to content

Latest commit

 

History

History
335 lines (307 loc) · 12.5 KB

File metadata and controls

335 lines (307 loc) · 12.5 KB
name News: Quarter Ahead
description Generates quarter-ahead strategic outlook articles and renders HTML in all 14 supported languages in a single agentic run via executive-brief cascade. Long-horizon-forecast workflow with 90-day window — covers next-quarter parliamentary calendar, committee schedules, government propositions tabling deadlines, Riksbank rate decisions, and SCB quarterly NA release. Tier-C aggregation × 1.7 depth multiplier. Runs 1st and 15th of each month.
strict false
imports
../prompts/00-base-contract.md
../prompts/01-bash-and-shell-safety.md
../prompts/02-mcp-access.md
../prompts/03-data-download.md
../prompts/04-analysis-pipeline.md
../prompts/05-analysis-gate.md
../prompts/06-article-generation.md
../prompts/07-commit-and-pr.md
../prompts/ext/tier-c-aggregation.md
../prompts/ext/long-horizon-forecasting.md
true
schedule workflow_dispatch
cron
0 9 1,15 * *
inputs
article_date force_generation analysis_depth
description required
Article date (YYYY-MM-DD) for manual backfills. Defaults to today when omitted or scheduled.
false
description type required default
Force generation even if recent articles exist
boolean
false
false
description required default
Analysis depth for AI iterations (standard=1-2 iterations, deep=2-3 iterations, comprehensive=3+ iterations). Controls SWOT complexity, stakeholder count, scenario tree depth, and dashboard charts.
false
deep
permissions
contents issues pull-requests actions discussions security-events
read
read
read
read
read
read
timeout-minutes 60
concurrency
group cancel-in-progress
gh-aw-news-quarter-ahead-${{ inputs.article_date || 'today' }}
false
features
mcp-gateway
true
runtimes
node
version
26
network
allowed
node
playwright
github
defaults
docker.io
registry-1.docker.io
auth.docker.io
production.cloudflare.docker.com
riksdag-regering-ai.onrender.com
data.riksdagen.se
riksdagen.se
regeringen.se
g0v.se
api.scb.se
scb-mcp.onrender.com
api.imf.org
data.imf.org
dataservices.imf.org
datamarketplace.imf.org
api.worldbank.org
data.worldbank.org
datahelpdesk.worldbank.org
governance.worldbank.org
europarl.europa.eu
ec.europa.eu
eur-lex.europa.eu
data.europa.eu
digital-strategy.ec.europa.eu
economy-finance.ec.europa.eu
statskontoret.se
lagradet.se
bra.se
hack23.com
hack23.github.io
riksdagsmonitor.com
riksdagsmonitor.hack23.com
riksdagsmonitor.pages.dev
euparliamentmonitor.com
ciacompliancemanager.com
blacktrigram.com
raw.githubusercontent.com
mcp-servers
riksdag-regering scb world-bank
container entrypoint entrypointArgs allowed
node:26-alpine
npx
-y
@jarib/pxweb-mcp@2.0.0
--url
*
container entrypoint entrypointArgs allowed
node:26-alpine
npx
-y
worldbank-mcp@1.0.1
*
tools
startup-timeout timeout github agentic-workflows bash edit web-fetch cache-memory
180
120
toolsets
all
true
true
key retention-days
news-${{ github.workflow }}-${{ inputs.article_date || 'today' }}
14
safe-outputs
threat-detection allowed-domains max-patch-size max-patch-files create-pull-request add-comment
continue-on-error
true
riksdag-regering-ai.onrender.com
data.riksdagen.se
riksdagen.se
regeringen.se
g0v.se
api.scb.se
scb-mcp.onrender.com
api.imf.org
data.imf.org
dataservices.imf.org
datamarketplace.imf.org
api.worldbank.org
data.worldbank.org
datahelpdesk.worldbank.org
governance.worldbank.org
europarl.europa.eu
ec.europa.eu
eur-lex.europa.eu
data.europa.eu
digital-strategy.ec.europa.eu
economy-finance.ec.europa.eu
statskontoret.se
lagradet.se
bra.se
hack23.com
hack23.github.io
riksdagsmonitor.com
riksdagsmonitor.hack23.com
riksdagsmonitor.pages.dev
euparliamentmonitor.com
ciacompliancemanager.com
blacktrigram.com
raw.githubusercontent.com
10240
100
labels draft expires max if-no-changes fallback-as-issue protected-files
agentic-news
analysis-data
long-horizon
forward-look
false
14d
1
warn
true
policy
allowed
steps
name uses with
News pre-warm & pre-flight (composite)
./.github/actions/news-prewarm
imf-sdmx-subscription-key
${{ secrets.IMF_SDMX_SUBSCRIPTION_KEY }}
engine
id model
copilot
claude-sonnet-4.6

🧭 Quarter Ahead

Generates deep political intelligence analysis and renders the HTML article in all 14 supported languages for forward-looking quarterly political intelligence (Tier-C aggregation × 1.7 depth multiplier — see ext/tier-c-aggregation.md and ext/long-horizon-forecasting.md) in one single agentic run. The 90-day window covers the next-quarter parliamentary calendar (committee schedules, chamber votes, government propositions tabling deadlines, Lagrådet referrals, Riksbank rate decisions, SCB quarterly NA release).

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: quarter-ahead (registry id; see analysis/article-types.json)
  • Analysis subfolder: analysis/daily/$ARTICLE_DATE/quarter-ahead/
  • Aggregated markdown: analysis/daily/$ARTICLE_DATE/quarter-ahead/article.md
  • Rendered HTML: news/$ARTICLE_DATE-quarter-ahead-{en,sv,da,no,fi,de,fr,es,nl,ar,he,ja,ko,zh}.htmlalways all 14 languages
  • Horizon: 90 days; lookback 90 days (sibling per-type folders + most-recent week-ahead + month-ahead).
  • Single-run model: download → analysis Pass 1 + 2 → gate → aggregate → render (14 languages) → ONE PR.

Long-horizon mandate (from ext/long-horizon-forecasting.md)

  • Scenario count: ≥ 4 distinct scenarios in scenario-analysis.md, probabilities sum to 100 %.
  • Counterfactuals: ≥ 2 explicit counterfactual paragraphs in devils-advocate.md.
  • Cross-horizon citations: cite the most recent week-ahead AND month-ahead analyses in cross-reference-map.md. Missing citations fail the gate.
  • IMF policy: pinned WEO + FM vintage at run start; emit economic-data.json v2.0 with quarterly trajectory series for SWE + Nordic peers (DNK, NOR, FIN).
  • Forward indicators: ≥ 12 dated indicators across the bands week / month / quarter / year / election.
  • Word floor: ≥ 2 000 words (versus 1 500 for week-ahead / month-ahead).

Time budget

🟡 Plan to call safeoutputs___create_pull_request by agent minute 42 (hard deadline 45) to reserve job-level headroom for setup variance and the safe-outputs runner. See 00-base-contract.md §Session timing and 07-commit-and-pr.md §Deadline enforcement.

Minutes Phase Module
0–3 MCP pre-warm + pre-flight 02 / 03
3–7 Download data + catalogue + IMF pinned vintage 03
7–25 Analysis Pass 1 (all 23 artifacts at 1.7× depth, scenario tree depth 4, ≥ 12 forward indicators) 04 + ext/long-horizon-forecasting
25–36 Analysis Pass 2 (read-back + improvements; ≥ 2 counterfactuals; extended slot reclaims the time freed by removing per-language Markdown translation — see TRANSLATION_GUIDE.md §News articles are translated out-of-band) 04
36–37 Analysis Gate (checks 1–11 + Tier-C additive + long-horizon checks) 05
37–39 Aggregate (article.md) + post-aggregate validate-article.ts (Check 12) 06
39–42 Render (scripts/render-articles.ts --lang all → all 14 HTML) 06
42–43 Stage + commit + ONE safeoutputs___create_pull_requestHARD DEADLINE agent minute 45 07

Use the setup-aware agent budget for AI-FIRST iteration; trim scope before quality and open the PR by agent minute 42 (hard 45). Never open a second PR within a run.

Inputs

  • article_date — override date (defaults to today)
  • force_generation — regenerate even if today's content exists
  • analysis_depthstandard | deep (default) | comprehensive

Note: there is no languages input. 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/quarter-ahead/ already contains all 23 required artifacts:

  • No analysis found → run the full pipeline.
  • Analysis found → enter improvement-mode (see 04-analysis-pipeline.md §Improvement-mode path); add fresh evidence on top of the snapshotted baseline.

All other rules live in the imported modules.