India Trade — Sector & Policy Recommendations · Operating Blueprint

The quarterly refresh, as an architecture: TOGAF layers × the modern data stack

Upgrades the quarterly workflow from a checklist to an operating blueprint. The skeleton is TOGAF (business → data → application → technology → operations); the mechanics come from the modern-data-architecture playbook — an ingestion layer, an immutable batch store, change-data-capture deltas instead of full re-scans, a Lambda speed layer for mid-quarter events, serving-layer regeneration, and backpressure rules. Every mapped concept points at a real file, source, or command in this repo.

SOURCES: maintainer-supplied TOGAF architecture blueprint (layering, backlog, success metrics) + Modern Data Architecture visual playbook (storage/processing/CDC/Lambda/backpressure). Mapped 2026-07-19 against .github/workflows/quarterly-dashboard-refresh.yml, QUARTERLY_CHECKLIST.md, and the seven-gate workflow schema.
Layer 1 · Business architecture
What a quarter must re-answer

The mission is unchanged — measure whether import substitution is working, gate by gate — but verdicts decay: both FY25 greens reversed within one year. The quarterly cadence exists to re-measure six KPIs before anyone cites a stale one:

Quarterly KPIBaseline (2026-07)Gate
Trade deficit, level + growth−$333.2bn, widened 17.5%/yrG7
PLI disbursal % of outlay₹28,748cr ≈ 15%; ACC still 0G5
IEM implementation ratio82% (2024) → 109.9% (2025)G4
EC grant flow + EC-IEM correlation198 → 734 → 1,102/yr; r = 0.96G3
Sector verdict distribution1 green / 6 amber / 3 red (FY26)G7
FDI equity inflow$58.85bn (+18%)G6
Editorial invariants carry across refreshes: the three-numbers rule (inflow ≠ committed ≠ disbursed), visible revisions (A− → B, never silent), published negative results, and a PRID on every PIB figure.
Layer 2 · Data architecture
Ingestion → immutable store → processing → serving
Ingestion · 14 sources
  • PIB (browser-UA curl, PRID-cited)
  • PARIVESH open JSON API (one call, ~114k rows)
  • DPIIT newsletter/factsheet (JS SPA → browser)
  • sansad.in answers (r.jina.ai proxy)
  • TRADESTAT · Exim trackers · ministry dashboards
Immutable batch store
  • Dated data/*_YYYY-MM-DD.json snapshots — append, never mutate
  • Corrections ledger = the audit log
  • Derived: state×sector×status CSV, master-report JSON, manifest
Processing
  • Verification cross-checks (grand totals; TRADESTAT-vs-Exim ≤0.3%)
  • Verdict re-run · EC-IEM correlation · implementation ratio
  • Grade revisions computed openly
Serving
  • GitHub Pages bulletins (interactive)
  • Synthesizer → master report .docx/.pdf
  • Deck .pptx/.pdf · WeasyPrint compendium
  • Regenerated, never hand-edited
Volume

114k EC proposals in one call; 2.1M trade rows in the companion warehouse; small enough for files, big enough to need aggregates.

Variety

JSON APIs, HTML releases, proxied PDFs, JS single-page apps, XLS/CSV — each source keeps its documented access method.

Velocity

Nightly (AHIDF) → monthly (Exim, trade) → quarterly (FDI newsletter) → session (Parliament) → annual (ministry reports). Refresh follows native cadence.

Veracity

Registered-office FDI, dead IEM series, anonymous beneficiaries, bot-blocked portals — defects are first-class data, restated wherever used.

Layer 2b · Change data capture
Each quarter pulls deltas, not full re-scans

The playbook's CDC principle, applied to documents: capture what changed since the last snapshot, and obey the dedup mandate — PIB re-announces the same cumulative figures across releases, so the latest cumulative supersedes, is never summed, and the trajectory is logged.

GateSourceQuarterly delta methodValidation gate
G1PolicyPIB ministry pagesNew PRIDs since last refresh; cumulative supersedesPRID on every figure
G2IEM ADPIIT PDFs / ParliamentNew filings PDF, else sansad answers (monthly series is dead)Grand-Total cross-check
G3Land+ECPARIVESH APIFull re-pull, diff proposal IDs: new grants, ToR→EC movesrow monotonicity + 5 flagship spot-checks
G4IEM BDPIIT / ParliamentNew year appended; ratio + correlation recomputedsame-year ratio basis
G5DisbursalPIB + Parliament answersPer-scheme totals; Parliament is the laggard-scheme channelthree-numbers rule
G6FDIDPIIT quarterly newsletterThe one natively quarterly source; sector+state tables re-extractedregistered-office defect stated
G7TradeTRADESTAT + EximNew monthly cumulative; provisional→final in Apr–Maycross-validation ≤ 0.3%
Lambda speed layer: mid-quarter events (Budget, Cabinet approvals, a new scheme) patch only the affected bulletin, dated — then the next quarterly batch re-verifies everything. Freshness between batches, accuracy at each batch.
Layers 3–4 · Application & technology
The seven-step pipeline and what runs it
#StepWhat happensTooling
1Delta ingestCDC table top-to-bottom; dated snapshots written; empty deltas logged as findingscurl · browser pane · PARIVESH API · agents
2VerifyCross-checks; schema sanity on new JSONs; failures block the quartersnippet checks
3RecomputeVerdicts, correlation, ratio, open grade revisionspython (in-bulletin methods)
4BulletinsData arrays + retrieved dates advanced; new findings sectionscharts/*.html (data-JSON-first)
5Master reportMaster JSON + corrections ledger + manifest → docx/pdf regeneratedreport_synthesizer.py --manifest
6Deck + compendiumSlides re-captured; compendium re-paginatedbuild_deck.sh · build_compendium.py (Homebrew python — SIP blocks system Python's pango)
7PublishCommit, push, tag the quarter; Pages serves automaticallygit · quarterly-dashboard-refresh.yml
Layer 5 · Operations
The refresh month, week by week

Refresh months July · October · January · April — trailing the DPIIT quarterly newsletter and Parliament sessions, with full-FY trade figures landing in the April cycle. The cycle maps onto SAFe for Government's cadence model: each refresh is a Program Increment (plan the deltas → execute → demo the regenerated compendium as the "working system"); the backlog below is the long-lived prioritized backlog replacing project-based thinking; quality/compliance run inside the flow as the verification gates, not end-stage inspection; and the corrections ledger plays the governance-for-accountability role stage-gate documents would.

Week 1
Delta ingest

Run the CDC table; write snapshots; a source with no delta is logged as a finding, not skipped.

Week 2
Verify + analyze

Cross-checks, KPI recomputation, draft revisions with old → new shown.

Week 3
Regenerate

Bulletins → master report → deck → compendium; visual pagination check.

Week 4
Publish + review

Push, tag, corrections ledger, next-quarter watch-list (beyond-E20 decision due 31.10.2026; flat-10% tariff expiry).

Known failure modes (all previously encountered) & the standing response
  • Source dies or migrates (precedent: monthly IEM series) — document the death in the bulletin, switch to the Parliament channel, keep the last-good snapshot.
  • Agent session limits mid-sweep — relaunch with the partial lesson folded into the brief; never restart blind.
  • PIB cumulative re-announcements — dedup mandate: supersede, never sum.
  • Bot-block hardens (precedent: NIRYAT TLS) — named fallback per source; describe-from-documentation only as a labeled last resort.
  • Backpressure rules: bounded agent fan-out; spaced PIB requests; blocked pushes handed to the maintainer, not retried.
Success metric, checked every refresh
All 7 gates re-measured with a dated snapshot each
Zero silent changes — every revision displayed old → new
TRADESTAT-vs-Exim within 0.3% before verdicts publish
Compendium + deck rebuilt; page/slide counts recorded
Every bulletin's retrieved date advanced to the quarter
Backlog
What would make the next refresh cheaper
HIGHparivesh_diff.pyScripted API re-pull + proposal-ID diff — turns the largest manual delta into one command
SHIPPEDpib_prid_sweepShipped 2026-07-19 as scripts/pib_index.py — day-wise SQLite index (data/pib_index.sqlite) of releases by ministry + factsheets + cited-PRID seeding; quarterly delta = --update --factsheets --seed-cited
MEDJSON schema check in CIRequired keys (purpose, retrieved, sources) validated at the ingestion boundary
MEDFDI newsletter fetcherThe one natively quarterly source shouldn't need a browser session
LOWFreshness dashboardPer-gate last-snapshot date + delta size, visible to readers