# Ted's Africa Brief
An AI-powered intelligence brief for five African launch markets — **Ethiopia,
Kenya, Nigeria, Ghana, South Africa** — that makes sense of global events and
explains what they mean for each country and the continent.
This repository is the **engineering foundation**, a **V0 analysis engine**, and
a **live ingestion pipeline**. It moved from a static design prototype to a real,
test-enforced trust pipeline, added deterministic country-specific causal
reasoning over the trusted inputs, and now runs real connectors end-to-end —
collect → validate/corroborate → analyse → publish gate — with hardcoded product
data removed from runtime, raw sourced inputs kept separate from methodology-gated
derived labels, and country profiles requiring source evidence. There is **no LLM yet** — V0 is fully
rules-based, and any future model must sit behind an adapter that only rephrases
already-grounded text (it may not create facts, figures, sources, events, or
citations).
---
## The product principle: the moat is the trust pipeline, not the UI
1. Numbers and news travel in **separate intake lanes**.
2. A number becomes a `VerifiedFigure` only after **source attribution,
timestamping, and range validation**.
3. News becomes an `Event` only after **deduplication and corroboration**
(≥ 2 independent sources, else it is explicitly marked single-source).
4. The (future) AI may reason only over verified figures, corroborated events,
and source-backed country profiles.
5. The AI must not invent facts, figures, sources, or spreads.
6. Anything unverified is **omitted or clearly labelled** — never faked.
7. A brief is publishable only after passing the **publish gate**.
These rules are enforced by tests (see Guardrails below), not just by intent.
---
## Running it
```bash
npm install # install dependencies (required first)
npm run dev # start the dev server
npm run build # type-check + production build
npm run test # run the test suite once
npm …