Start
Your first data page in ten minutes
From an empty repository to a documented dataset with the check running in CI. Step one wants Claude Code; everything after it needs Python 3.11 and nothing else, and works by hand if you would rather.
Start with a dataset you already know something about. The point of the first page is not to be complete — it is to get the one issue that has already cost you a day out of your head and into a file.
-
Install the plugin
The skill is the part your agent uses. It teaches it to look for what is already known about a dataset before touching it, to write down what it learns, and to offer the public-safe part back. Everything below can be done by hand, but this is what makes it happen without being asked.
/plugin marketplace add lyra-forge/marketplace/plugin install ergo@lyra-forgeStart a new session afterwards. Not using Claude Code? Copy skills/ergo/ into whatever your agent reads.
-
Vendor the tool
One file, no install, no dependencies. Commit it: the version it was vendored at is recorded in its header, and a repository that carries its own validator can still be checked in five years.
mkdir -p tools docs/datacurl -sSLo tools/ergo.py https://raw.githubusercontent.com/lavallee/ergo/main/tools/ergo.py -
Scaffold a page
One page per dataset, named after its slug. The template is a to-do list: it does not validate until you have filled in who publishes the data, where it comes from, and what the pitfall is.
python3 tools/ergo.py new my-dataset --dir docs/data -
Fill the manifest, and write the pitfall first
Publisher,
source_urls,status— andpitfall: one sentence naming the single thing most likely to trip up somebody who touches this data cold. It is required because it is the line that travels furthest, into the index and into an agent's context, often without the rest of the page.Add
subjecttoo, if the dataset has a landing page. It is the identity claim — what dataset this is, as opposed to where you fetch it — and it is how anyone else's page about the same data can be found alongside yours.python3 tools/ergo.py check docs/data -
Register the issue you already know about
Title it by the symptom, not the diagnosis: "rate cells are strings", not "inconsistent typing" — that is how the next person searches. Then the four required judgments: what happens if you ignore it (
effect), what kind of problem it is (type), whether it is still true (status), and where it applies ([issue.scope]).If it is a
misleadsor acontextissue, write themisuse: the wrong conclusion a careless-but-reasonable reader would publish. That sentence is usually the most valuable line on the page.python3 tools/ergo.py check docs/data -
Link the issue to the code that handles it
If you have already worked around it, set
status = "mitigated"and list the code inhandled_by. Then put the anchor comment beside the workaround. Add a few words about why the code looks odd if it helps; anything longer belongs on the page, not in the comment.# ergo: my-dataset/my-issue-id — non-numeric rates parse to NULLpython3 tools/ergo.py check docs/data --repo .Now
grep -rn "ergo: my-dataset"finds every workaround in the repository, and deleting either half fails the check instead of quietly changing a number. -
Record how you checked it
A
[validation]block: the date, the method, and the result with numbers in it. Write "7 of 7 spot figures match within rounding" rather than "we checked" — a later reader can re-run the first one and see whether it still holds. -
Generate the index
One row per dataset — status, issue counts by effect, core flagged, and the pitfall. Regenerate it on commit; never hand-edit it.
python3 tools/ergo.py digest docs/data --write docs/data/INDEX.md -
Point your agents at it
Agents do not discover documentation at well-known paths; they go where they are pointed. Two or three lines in
CLAUDE.mdorAGENTS.mdis what makes the rest of this work — the digest and the pages carry the weight.CLAUDE.md## Data documentation Every dataset we ingest has an ergo data page in `docs/data/`, indexed by `docs/data/INDEX.md`. Read the page before writing code against a dataset: issues carry stable ids, the ids are anchored in the code that works around them, and `python3 tools/ergo.py check docs/data --repo .` validates that contract.For agents that maintain the pages as well as read them, copy the skill into your skills directory. It covers both roles: consulting the registry before writing code, and registering an issue at the moment of discovery.
-
Put the check in CI
--require-manifestcloses the directory, so a prose file that quietly stops being a data page is an error rather than a page that silently disappears from the check. Add--strictonce you have cleaned the warnings, and warnings fail too.python3 tools/ergo.py check docs/data --repo . --require-manifest
When you're ready for more
Practices. When you catch yourself explaining why a number
is computed one way and not another, that is a [practice] rather than an
issue — see the format map. It should name the plausible
wrong move it replaces; if nothing is being ruled out, you are writing documentation.
Publish the bundle. If the data is public, the documentation
probably should be too. publish writes a served directory: an
index.json plus each page's public projection, with your rebuild
runbooks and repo paths stripped out.
python3 tools/ergo.py publish docs/data --dir site/ergo --base-url https://example.org/ergo/Join a directory. If your repository is public and takes pull
requests, directory --entries-only emits your entries — subject, bundle
URL, recognition signatures — to open against someone else's directory file, and your
page stays yours.
If your repository is private, a bundle served out of it is readable by anyone and
fixable by nobody. Contribute the page itself instead; the directory becomes its home,
and diverge keeps your working copy and the public one in step.