/ › expansion › 02-data-spine

Stream 02 — Data Spine

The substrate every public Futuros surface reads from. Phase 2 takes ingestion from ~12 RSS feeds to 80–120 typed, provenance-stamped sources, normalizes them into a regional knowledge graph, and extends truth-infrastructure discipline to every scraped fact.

Why this is load-bearing

Decisions taken

#DecisionRationale (short)
D1Storage = DuckDB + retain SQLiteColumnar OLAP, file-only, WASM-portable; vector store stays for unstructured text
D2Single IngestAdapter protocoldiscover → fetch → normalize → cite. RSS, SDMX, X, scrape — same shape
D3Truth-gate per factEvery Fact row has citation_id NOT NULL; orphans go to fact_quarantine
D4Disabled-by-defaultDaemon never silently hits a new API; explicit human enable
D5Paid sources gated by Phase 0 budgetX API + SemiAnalysis recommended (~USD 8.4K/yr); Bloomberg / Pitchbook explicitly out
D6Bilingual native at fact layerlang column on every fact; translation at query time, never at storage
D7License + ToS check is hard gateNo source enters inventory without classification

Source inventory — 102 sources, 12 categories

ClassCountExamples
Macro / dev indicators14World Bank, IMF SDMX, OECD SDMX, ECLAC CEPALSTAT, IDB Numbers, OWID, FAO, ILO
Energy / climate / minerals19IEA, IRENA, USGS MCS, Cochilco, MINEM-PE, Coordinador CL, ANDE-PY, Itaipú
Compute / AI / cable18Epoch AI, Metaculus, Manifold, Stanford AI Index, OECD.AI, Telegeography, arXiv cs.AI/cs.CL
Government press / gazettes19Brasil Planalto, México DOF (SIDOF), Chile gob.cl, Colombia MinTIC, Paraguay Presidencia, Argentina Boletín Oficial
Multilateral / regional10IDB News, CAF, ECLAC, MERCOSUR, CELAC, World Bank LAC, IMF LAC
Op-ed / editorial nodes11Folha, El País América, La Nación, Reforma, Mercopress, Infobae, Brecha, la diaria
Social (X / Bluesky)7Tier 1/2 named-individual lists + topic streams (Itaipú, frontier-labs, cobre/litio)
Forecast aggregators6Metaculus, Manifold, Kalshi, Polymarket, AI Impacts
Hyperscaler filings6SEC EDGAR 10-Q + 13F (incl. Situational Awareness LP), B3, hyperscaler PR feeds
Central banks10BCB, Banxico, BCRA, BCCh, BanRep CO, BCRP, BCP-PY, BCU, BIS
Legislative trackers8Senado/Câmara BR, CDM-MX, Congreso CL/CO/PY, IDEA elections
Geographic primitives7GeoBoundaries, Natural Earth, IBGE, INEGI, DANE-CO, INE-CL, DGEEC-PY

Broken feeds — diagnosis & fix plan

FeedSymptomRoot causeFix
IDB Publications RSS403 ForbiddenEdge bot blockReplace with IDB News RSS + add HTML scrape for publications
CEPAL noticias404 Not FoundRSS path retiredReplace with /es/comunicados/feed + sitemap fallback
CAF noticiasSSL cert verifyPython on macOS truststorePin certifi, use certifi.where() as cafile
DOF MéxicoSSL cert verify + no RSSSame SSL + home page onlycertifi fix + new dof-mx adapter against SIDOF JSON API
MinTIC Colombia200 OK, empty bodyJS-rendered homeReplace with Drupal RSS endpoint at /portal/inicio/Sala-de-prensa/Noticias/RSS/
gob.pe / pcmIntermittent timeoutSlow upstreamBump per-feed timeout to 45s + 1 retry

Knowledge graph — entity model

Stored in data/graph/knowledge.duckdb alongside the existing SQLite vector store. Both file-based, both rebuildable independently.

Citations registry — extension

The existing research/sources/_citations.yml (human-curated) gains a sibling _citations_scraped.yml (auto-extended by adapters). Same schema; new optional fields:

New CLI: python -m tools.citations verify-scraped --due-only refetches scraped citations on cadence and supersedes drifted entries (never deletes; opens citation-drift issues for human review).

Reference adapters shipped

AdapterPathTierFeature flag
World Bank Indicators v2 tools/ingestion/wb.py free FUTUROS_ADAPTER_WB=1
X / Twitter API v2 tools/ingestion/x_twitter.py paid (Phase-0 gated) FUTUROS_ADAPTER_X=1 + X_BEARER_TOKEN

Both implement the IngestAdapter protocol and ship with --dry-run. The X adapter's dry-run exercises rate-limit budget math without consuming tokens.

Implementation plan — 6 weeks

  1. Week 1: cross-cutting fixes (certifi, per-feed timeout, YAML config), broken-feed URL replacements, DuckDB graph init, citations split.
  2. Week 2: World Bank reference adapter, X / Twitter reference adapter (dry-run), adapter protocol formalization, feed-health resilience.
  3. Week 3 (MVP cutoff): enable 30 RSS feeds, run WB across LATAM × top-30, draft Stream-3 handoff.
  4. Week 4: IMF SDMX, OECD SDMX, ECLAC CEPALSTAT, generic SDMX shell.
  5. Week 5: IRENA, IEA, USGS minerals, Coordinador CL + ANDE PY, forecast aggregators.
  6. Week 6: verify-scraped daily cron, coherence + red-team, Stream-3/4/5 sign-off.

What downstream streams get

StreamReads fromAvailable after
Stream 3 — Atlasfacts_v1 (economic, energy, minerals, compute), rel_resource_flow, geographic primitivesWeek 3 partial → Week 6 full
Stream 4 — Pulseevents_v1, indicator topic tags, diff over superseded_by chainWeek 4
Stream 5 — Simulatorfacts_v1 historical series, hyperscaler capex, forecast priorsWeek 3+

Documents