How this was built

The problem

Gold commentary is either trying to sell you something or assumes you already speak the language. I wanted a third thing: an instrument that shows you the forces acting on the price, explains each one in plain English, and is honest about how badly it predicts anything.

The data

Eight forces, all from published sources. Real yields, inflation expectations and the dollar come from the St. Louis Fed's FRED API. Geopolitical risk is the Caldara–Iacoviello index, built by counting newspaper coverage of crisis back to 1900. Central bank demand, physical demand, ETF flows and mine supply come from the World Gold Council. Speculative positioning comes from the CFTC.

A GitHub Action runs every morning at 08:00 UTC. It fetches each source, computes what changed since yesterday, commits to the repository only when something actually moved, and publishes six JSON files to Cloudflare KV. The site reads from the edge, so the page loads fast and the origin does almost nothing.

The sources move at different speeds — FRED daily, the risk index weekly, the World Gold Council quarterly. The pipeline runs daily regardless; the site says which number is how old rather than implying they are all current.

The model

Each force is scored against thresholds derived from its own historical distribution, not from theory. That produces a direction and a strength. Those are weighted into a single 0–100 composite.

There are three weightings, not one, because there are three defensible theories about what drives gold and picking one silently would be dishonest. Switching between them changes the reading by roughly twelve points on the same data — which is itself the most useful number on the page, because it tells you how much the answer depends on which story you believe.

The uncomfortable part

The composite's forward information coefficient is negative at every horizon tested. It describes conditions well and forecasts badly.

That result is published, explained, and given its own section rather than being quietly dropped. It also turns out to be the most interesting finding on the site: averaging eight motives is the wrong operation when only one or two are ever driving the price. The failure is informative, so it stays.

The AI layer

Visitors can ask questions. One model call returns both the answer and a structured verdict on whether the question is safe and on-topic. Clean questions publish to the page immediately; flagged ones are answered for the asker but held, and email a signed single-use link for review.

The screening deliberately does not judge whether a question is smart or serious. That is a taste judgement, it would be wrong in both directions, and it is the part a human should keep.

The narration

Every section can be read aloud. The audio is generated once, cached, and keyed by a hash of the script — so if the words change, the recording regenerates automatically instead of quietly drifting out of sync with the page.

The stack

TanStack Start on Cloudflare Workers. Supabase for the database. Cloudflare KV for edge-cached data. Resend for email. ElevenLabs for narration. The front end is a single JSX file of about fifteen thousand lines, deliberately not split, because one file that is easy to search beat a module tree that would have been easy to admire.

Built with an agent

Nearly all of this was written by Claude, working from conversation. I decided what it should say and argued about the copy; the agent did the building, the data plumbing, and most of the debugging.

The parts that needed a person were the judgements: what to leave out, when a number was too confident, when an explanation was technically right and practically useless. On at least one occasion the agent published a figure sourced from a press release that disagreed with the underlying dataset, and it took a human asking "where did that come from" to catch it.

Built by Technology On Call

More about why this exists