Content as data: a thought experiment
We keep running into the same problem with program and service content for the Government of Canada: a rule or an amount changes in a program, and five teams scramble to update five different things. A web page, a PDF, a call centre script, an internal tool, a chatbot, etc. So I spent a few evenings building a proof of concept to see what it would look like if the rules only lived in one place.
The experiment uses 3 Government of Canada programs: the Canada Child Benefit, Employment Insurance, and Old Age Security. Each one is encoded as a single JSON file containing every threshold, rate, reduction bracket, and examples, in both English and French. Then I built a few things using the same “single source of truth”.
Take a look: GC rules API experiment

Several tools, one source
The idea was to see if I could use a “rules as code” approach to important program information to populate different tools. Here’s what I got.
- An interactive estimator where you plug in your situation and get a calculated amount:
- Static Canada.ca web content, generated from the JSON file
- A local chatbot reading Markdown files generated from the JSON file, reducing hallucinations
- A JSON editor where a policy analyst could update parameters — income thresholds, benefit rates, age cutoffs — without ever opening a JSON file
- An API explorer, simulating how anyone could call the program information through an API.
Under all of it, the same JSON files.
We could further: secure applications, call center scripts, training material. All of it could in theory be derived from a single source of truth.
Much more to explore
I want to be clear: this is a thought experiment, nowhere near production-ready. The real programs are way more complex than what these JSON files cover. Discretion, edge cases, appeals, exceptions for specific provinces — encoding all of that is a governance and policy challenge as much as a technical one. I haven’t solved any of those problems with this experiment.
What I have done is made the idea tangible enough to start playing around with it.
Can we imagine a world where accurate government content on programs and services is offered to anyone and any tool, thrugh an API?
The repo is public on GitHub. Poke around, break things. Let me know what you find.
Built with the help of Claude (Anthropic) for the coding and iteration. Inspired by OpenFisca, New Zealand’s Better Rules, and conversations with colleagues working on digital service delivery in the GC.