How sumorikishi is built
The philosophy is build-time AI, runtime zero. Your browser never calls a language model; everything you see is static HTML generated once per day during a tournament.
1. Fetch
A Python pipeline calls sumo-api each evening during a basho, plus weekly between tournaments. Banzuke (rankings), match results, and per-rikishi metadata land in a SQLite database.
2. Transform
Results are categorised: the 82 official kimarite collapse into five attack types (push, force, throw, twist, trip); ranks resolve into divisions; debut paths classify into amateur / foreign / student routes where the data supports it.
3. Enrich
Claude reads the per-rikishi facts and writes a short narrative — once in Japanese, once in English. Both share the same input-facts hash, so they can't silently drift apart across regenerations.
4. Export
Static JSON is written into Astro content collections. The database doesn't ship with the build.
5. Build & deploy
Astro generates static HTML for every rikishi, basho, and heya page. Cloudflare Pages serves the result globally with no runtime API and no database in production.
The Japanese parent site exposes an interactive pipeline view at /banzuke-doko/flow/ showing inter-tournament transitions (promotions, demotions, retirements). An English version is available at /en/pipeline/flow/.