📋 Issue Type
Feature / Methodology Hardening
🎯 Objective
Add a pre-flight IMF connectivity check + pre-warm step to all news/analysis workflows so missing IMF context is detected before Pass 1 starts (fail-fast or annotate), rather than discovered mid-run.
📊 Current State (evidence from 2026-04-26 reflections)
Aggregated across 6 of 10 methodology-reflection.md files for 2026-04-26:
monthly-review/methodology-reflection.md §"IMF Data Unavailability (Non-Fatal)": "The IMF CLI (tsx scripts/imf-fetch.ts) returned a connection error during this workflow run. As a result, no IMF economic context (WEO, FM, IFS dataflows) was injected into any artifact."
committeeReports/methodology-reflection.md Improvement 3: "IMF WEO Apr-2026 data was referenced conceptually … but not actually retrieved via scripts/imf-fetch.ts. Economic claims … are inference-based rather than IMF-grounded."
propositions/methodology-reflection.md Improvement 1: "Pre-fetch IMF SDMX data for fiscal-relevant propositions … tsx scripts/imf-fetch.ts weo --country SWE --indicator GGXWDG_NGDP --years 5."
week-ahead/methodology-reflection.md Improvement 3, month-ahead/methodology-reflection.md Improvement 1, interpellations/methodology-reflection.md Limitation 3 — same gap.
Mitigation today is reactive (Riksbank minutes as C4 substitute).
🚀 Desired State
- New script
scripts/check-imf-connectivity.ts performs:
imf-fetch.ts weo --country SWE --indicator NGDP_RPCH --years 1
- Validates HTTP 200 + JSON parses +
economicProvenance.vintage ≤ 6 months.
- All 11 agentic workflows in
.github/workflows/news-*.md invoke the check in their pre-warm step.
- On failure: workflow continues but writes
data/imf-unavailable.flag + auto-injects a standard ⚠️ IMF context unavailable block into executive-brief.md, comparative-international.md, synthesis-summary.md.
- On stale vintage (>6 mo): annotate every
economicProvenance block per ECONOMIC_DATA_CONTRACT.md v2.1.
📊 CIA Data Integration Context
Not directly CIA-product driven — this is upstream economic-data canon enforcement per .github/aw/ECONOMIC_DATA_CONTRACT.md v2.1 and analysis/imf/agentic-integration.md.
🔧 Implementation Approach
- Create
scripts/check-imf-connectivity.ts (3 dataflows: WEO, FM, IFS).
- Add
imf-precheck: step (60-sec timeout) to each news-*.md workflow before analysis-gate.
- Add Vitest test in
tests/imf-context.test.ts asserting precheck runs and emits imf-context.json or imf-unavailable.flag.
- Document in
analysis/imf/agentic-integration.md §"Pre-warm gate".
🤖 Recommended Agent
data-pipeline-specialist — owns scripts/imf-fetch.ts, imf-client.ts, imf-codes.ts, vintage cache per AGENTS.md cross-agent IMF rule.
✅ Acceptance Criteria
📚 References
- Methodology evidence:
analysis/daily/2026-04-26/{monthly-review,committeeReports,propositions,week-ahead,month-ahead,interpellations}/methodology-reflection.md
- Contract:
.github/aw/ECONOMIC_DATA_CONTRACT.md v2.1
- Hub:
analysis/imf/README.md, analysis/imf/agentic-integration.md
- ISMS: Secure_Development_Policy.md, Change_Management.md
📋 Issue Type
Feature / Methodology Hardening
🎯 Objective
Add a pre-flight IMF connectivity check + pre-warm step to all news/analysis workflows so missing IMF context is detected before Pass 1 starts (fail-fast or annotate), rather than discovered mid-run.
📊 Current State (evidence from 2026-04-26 reflections)
Aggregated across 6 of 10 methodology-reflection.md files for 2026-04-26:
monthly-review/methodology-reflection.md§"IMF Data Unavailability (Non-Fatal)": "The IMF CLI (tsx scripts/imf-fetch.ts) returned a connection error during this workflow run. As a result, no IMF economic context (WEO, FM, IFS dataflows) was injected into any artifact."committeeReports/methodology-reflection.mdImprovement 3: "IMF WEO Apr-2026 data was referenced conceptually … but not actually retrieved viascripts/imf-fetch.ts. Economic claims … are inference-based rather than IMF-grounded."propositions/methodology-reflection.mdImprovement 1: "Pre-fetch IMF SDMX data for fiscal-relevant propositions …tsx scripts/imf-fetch.ts weo --country SWE --indicator GGXWDG_NGDP --years 5."week-ahead/methodology-reflection.mdImprovement 3,month-ahead/methodology-reflection.mdImprovement 1,interpellations/methodology-reflection.mdLimitation 3 — same gap.Mitigation today is reactive (Riksbank minutes as C4 substitute).
🚀 Desired State
scripts/check-imf-connectivity.tsperforms:imf-fetch.ts weo --country SWE --indicator NGDP_RPCH --years 1economicProvenance.vintage≤ 6 months..github/workflows/news-*.mdinvoke the check in their pre-warm step.data/imf-unavailable.flag+ auto-injects a standard⚠️ IMF context unavailableblock intoexecutive-brief.md,comparative-international.md,synthesis-summary.md.economicProvenanceblock perECONOMIC_DATA_CONTRACT.mdv2.1.📊 CIA Data Integration Context
Not directly CIA-product driven — this is upstream economic-data canon enforcement per
.github/aw/ECONOMIC_DATA_CONTRACT.mdv2.1 andanalysis/imf/agentic-integration.md.🔧 Implementation Approach
scripts/check-imf-connectivity.ts(3 dataflows: WEO, FM, IFS).imf-precheck:step (60-sec timeout) to eachnews-*.mdworkflow before analysis-gate.tests/imf-context.test.tsasserting precheck runs and emitsimf-context.jsonorimf-unavailable.flag.analysis/imf/agentic-integration.md§"Pre-warm gate".🤖 Recommended Agent
data-pipeline-specialist— ownsscripts/imf-fetch.ts,imf-client.ts,imf-codes.ts, vintage cache per AGENTS.md cross-agent IMF rule.✅ Acceptance Criteria
scripts/check-imf-connectivity.tsexists and exits 0/1 + emits structured JSONnews-*.mdworkflows invoke the pre-checkdata/imf-unavailable.flagand auto-injects warning blocktests/imf-precedence-contract.test.tsanalysis/imf/agentic-integration.md📚 References
analysis/daily/2026-04-26/{monthly-review,committeeReports,propositions,week-ahead,month-ahead,interpellations}/methodology-reflection.md.github/aw/ECONOMIC_DATA_CONTRACT.mdv2.1analysis/imf/README.md,analysis/imf/agentic-integration.md