Afterword: What You Built, and Where Next

Keywords

Quarto, reproducible publishing, coding agents, Markdown, Python, EPUB, data analysis, k-means clustering

Near the end of the water analysis, one setting changed in one script, and the officials’ report, the council’s slides, the blog post and the dashboard all changed with it, without a number retyped. That moment is what the book’s projects were for. The London guide, the Acme evaluation and the water analysis each started from plain text and data, became a shelf of documents for different readers, and rebuild with one command. The projects will date. The method will not, and it fits on a card.

TipPrompt, Check, Publish

Prompt. Write the rules down before the first request: a short AGENTS.md keeps an agent to the project’s scope, data rules and commands across sessions. Then ask for one task at a time, naming the file, the column and the output, and ending with a check.

Check. Compute every number, so that it updates and can be traced to its data. Before a rebuild, predict what should change; afterwards, check that it did. Say what a result does not show.

Publish. Compute once, publish many: one script writes the results, and every output reads them. Guard the sentences whose words depend on the data, and keep a known-good state, a checkpoint or a commit, so that being stuck is a short detour.

The water analysis added four habits that travel to any analysis. Follow one case, your own Tunja, through every step, because aggregates hide what a single place shows. Label each variable for what it measures, as “utility-supplied” did for the IRCA. Never define groups by the outcome you will compare them on. And open every reference an agent gives you before you cite it.

The formats were never the goal. Work with data, software and AI applications pays off when its audience engages with it and acts on it: a manager decides, a council funds a water supply, a reader tries the method. Quarto, git and a hosting service make that work reproducible, so others can trust it, act on it and build on it; an agent makes it fast; checking keeps it right. What stays with you is the judgement no tool makes: who the work is for, and what would make them read it.

What you can now do

If you worked through Parts II and V, the London guide and the water analysis, you can:

  • explain how Quarto turns one plain-text source into many formats, and why a computed number cannot drift from its data;
  • direct a coding agent safely, with written rules, one task per prompt and a check after each;
  • build and publish a site from data for several readers, as you did for London and for the water analysis;
  • read an agent’s change with git diff before you keep it, and undo one with git restore;
  • predict which outputs a changed input or setting updates, rebuild, and explain the result;
  • say which edition of this book shows each interactive figure, and why.

If you also worked through Parts III and IV, the Acme evaluation, you can:

  • compute results once and have every document read them, with tests, guards and the render each catching what the others miss;
  • ask for slides, a branded site and a white paper by name, and check each against what makes it work;
  • make one document for many values, and render and check every one with a script;
  • have every pull request rebuilt by CI, so that a guard the results no longer support turns it red.

If one of these is shaky, go back to that part’s exercises, starting from a known-good state in Appendix E — Checkpoints at a Glance, and Answers.

Projects of your own

The London guide, the Acme evaluation and the water analysis were practice. The five projects here are the kind of document you already make, or will soon be asked for, built the book’s way. Each ends with the same proof, a rebuild from a fresh copy, so you know that someone else could make it too.

Inside each project the order is the one the book followed. Start with one output for one reader; make it compute, so that no number is typed; then add formats. The second format is where the approach starts to repay the setup; the first change to the data is where it pays for itself.

TipWhich project first?

Choose the one with a real reader and a date: a brief your manager reads on the first Monday, a supplement due with a resubmission, a report due in three weeks, an update investors expect on the 5th, a design review next week. Then check that you are allowed to use its data with an agent (below). If two qualify, start with the smaller. Finish one project, fresh clone included, before you start another; the second goes faster.

Start every project the same way

The design document is the exception: it lives in a repository you already have, so skip this setup and start on a branch there, as in 3  The Fast Path. For the others, make the project folder and go into it (Get the files): for the brief, mkdir ~/metrics-brief then cd ~/metrics-brief. Make a data/ folder inside it (mkdir data) and copy your files in, unchanged; Finder or File Explorer will do. Start the history with git init -b main and commit the data, git add data then git commit -m "Data, as exported" (Start a history). Then hand the agent the setup, with rules written before the first request (Rules that persist: AGENTS.md). This prompt and the ones below are examples: change the file and column names to yours.

Ask your coding agent
Set up this folder for a Quarto report with `uv`: run `uv init --bare`, then `uv add ipykernel nbclient nbformat pyyaml pandas matplotlib`. Write AGENTS.md: files in data/ are inputs, never edit them; every number comes from data/ through code; run quarto through `uv run`. Write a .gitignore for .venv/, .quarto/ and the rendered outputs. Show me `git status`.

It writes AGENTS.md, pyproject.toml, uv.lock and .gitignore; the layouts below show the rest. New files appear in git status as untracked, not in git diff, so open and read them, then commit them yourself. From then on, read each change with git diff (Hand the fix to the agent) and commit after every prompt whose result you checked, so that a bad turn is one git restore away.

TipKeep private data private

What an agent reads is sent to the model on its vendor’s servers (Model plus harness). Before a confidential file meets an agent, read your organisation’s AI and data policy; if the agent is not approved for the data, build the project on a made-up file with the same columns, labelled as such, and render the real one yourself. Confidential data has the habits in full, and what each vendor’s plan does with what it is sent.

An internal metrics brief

Who it is for. Anyone who sends the same figures every month: an analyst, an operations lead, a manager. Each month you export a CSV from your own tool (a CRM, a ticketing system, a finance package) and turn it into a one-page brief, as a web page and a Word file. Start with:

metrics-brief/
├── AGENTS.md
├── data/
│   ├── 2026-09.csv   each month's export, saved unchanged
│   └── 2026-10.csv
├── brief.qmd         the agent writes it
├── pyproject.toml
└── uv.lock

You build brief.html and brief.docx. The first prompt makes one output that computes:

Ask your coding agent
Write brief.qmd with formats html and docx. Read the newest file in data/ (files are named YYYY-MM.csv) and state its month, its number of rows and the total of `amount`, each as inline code. Render, and tell me which file it read.

Then the comparison a reader acts on:

Ask your coding agent
In brief.qmd, add a table of total `amount` by `region` for the newest month and the one before, with the change, and a bar chart of the change with a caption and alt text. Render both formats; check that the table's total equals the sentence's.

An export can change shape when someone renames a column, so make the brief say so instead of printing nonsense, and let code choose the words of the one sentence that depends on the data:

Ask your coding agent
Make brief.qmd stop with an error naming the column if the newest export lacks `date`, `region` or `amount`. Test it on a renamed copy in a temporary folder, then delete the copy and render again.
Ask your coding agent
Add a sentence saying whether the total rose or fell since the month before, its wording chosen by code from the two totals. Render, and show me the sentence.

Checks only you can do. Open the export in its own tool and compare one region’s total with the brief’s. Open the Word file: does it fit one page? Show it to one reader and ask what they would do differently after reading it; if the answer is “nothing”, the brief needs a different question, not more charts.

The rebuild test is next month’s file. When it arrives, save it in data/, predict which numbers will change, render, and compare (Predict, change, rebuild). To rehearse now, remove the newest export (rm data/2026-10.csv), predict, render, then bring it back with git restore data/2026-10.csv.

You’re done when next month’s export rebuilds both formats with no other edit, one region’s total matches the tool’s, and the fresh-clone test gives the same brief.

A reproducible research supplement

Who it is for. Researchers with a paper in progress. The supplement holds the paper’s figures and tables, each computed from the data, with captions, alt text and citations, as a web page and a PDF that reviewers can open and you can rebuild after every revision. Start with:

paper-supplement/
├── AGENTS.md
├── data/
│   ├── README.md        each file's source, licence and date
│   └── measurements.csv your data, unchanged
├── references.bib     the agent writes it
├── supplement.qmd     the agent writes it
├── pyproject.toml
└── uv.lock

You build supplement.html and supplement.pdf, the PDF made with Typst as in One source, three formats.

Ask your coding agent
Write supplement.qmd with formats html and typst. Add Table S1 from data/measurements.csv: n, mean and standard deviation of `value` by `group`, with a caption. Render both; check that the n values add up to the file's rows.
Ask your coding agent
Add Figure S1, `value` by `group` as a box plot, with a caption and alt text that says what the figure shows, not only what it is (`fig-cap`, `fig-alt`). Render both formats; check that the figure and caption appear in the PDF.
Ask your coding agent
Add a Data section citing each source in data/README.md, from a new references.bib set as the `bibliography`. List every DOI and URL you used so that I can open each one; cite nothing you could not find.
Ask your coding agent
Add an "AI use" section naming the agent and its version and the tasks it did here, with a TODO where I will list the checks I made. Render, and show me the section.

The last prompt follows Using AI in research: say it, own it: the tool is never an author, you are responsible for what it produced, and you say how you used it. The checks are yours to write, because only you made them.

Checks only you can do. Compare every number in the paper’s text with the supplement’s. Open every reference, since an agent can produce a plausible one that does not exist (A dashboard and a white paper (optional)), and read the sentence that cites it. Confirm that you may share the data: consent, ethics approval and data agreements decide, not the agent. Read the journal’s rules on supplementary material and on AI use.

You’re done when every figure and table in both formats comes from a cell and has a caption and alt text, every citation opens to the work it names, the AI-use statement names the tool, the tasks and your checks, and the fresh-clone test gives the same supplement.

A coursework report

Who it is for. Students with an assignment that involves data. You build report.pdf and hand it in with the source, so that a marker can rebuild it and see that every number came from the data. Start with:

coursework/
├── AGENTS.md
├── data/survey.csv   the data the assignment gives you, unchanged
├── README.md         how to rebuild it (the agent writes it)
├── report.qmd        the agent writes it
├── pyproject.toml
└── uv.lock

Coursework has a rule the other projects lack: the work being marked must be yours. Start with the course’s AI policy, before any other prompt.

Ask your coding agent
Add to AGENTS.md the rules from my course's AI policy, pasted below, and that data/survey.csv must never be edited. Then list, one line each, what you may and may not do for me under them.
Ask your coding agent
Write report.qmd with format typst and the sections the assignment brief asks for (pasted below), and one inline-code sentence giving the number of responses in data/survey.csv. Render report.pdf; tell me how you checked the number.
Ask your coding agent
Write README.md: what the project is, and how to rebuild report.pdf from a fresh copy (install uv and Quarto, then `uv run quarto render report.qmd`). Then add an AI-use statement at the end of report.qmd in the form my course asks for. Render, and show me both.

If the policy forbids an agent for assessed work, build the project by hand, as in 5  A First Report, by Hand: everything here except the prompts still applies.

Checks only you can do. Read the policy yourself, and ask the course leader when it is unclear; the agent’s summary of it is not permission. Make sure you can explain every line of code and every sentence, since a marker may ask. Check the brief’s length and format rules against the PDF. Hand in the source the way the course asks; for a zip of exactly what you committed (no .venv/, no rendered files), run git archive -o coursework-source.zip HEAD.

You’re done when report.pdf answers the brief, the AI-use statement matches both what you did and what the policy allows, and the fresh-clone test, run by following your own README.md, gives the same PDF.

A monthly investor update

Who it is for. A founder or an early team who writes to investors every month, as Acme did in 14  Reports That Run Themselves, but from your own figures. Your figures, not a model’s: customers, revenue, burn and cash, kept in a spreadsheet you export as CSV, and a few lines in your own words on what happened and what you need. Start with:

investor-update/
├── AGENTS.md
├── data/metrics.csv   one row a month: month, customers, mrr, burn, cash
├── notes/
│   └── 2026-10.md     your highlights and asks, in your words, no numbers
├── update.qmd         the agent writes it
├── pyproject.toml
└── uv.lock

Investors’ figures are confidential: keep the repository private, and send the PDF, not a link to a page. You build update.pdf and update.docx for any month.

Ask your coding agent
Write update.qmd, a monthly investor update with formats typst and docx, parameterised by `month` (a cell tagged `parameters` whose default is "latest", meaning the last month in data/metrics.csv). Show that month's `customers`, `mrr` and `cash`, each as inline code, and runway in months as `cash` divided by `burn`, with a note saying how it is computed. Add papermill with `uv add papermill`, render it for the month before the latest with `-P`, and tell me which month it shows.
Ask your coding agent
Add each figure's change from the month before, its wording (up, down or unchanged) chosen by code from the figures as printed, and make the render stop with a message listing the valid months if `month` is not in the data. Test it with a month that is not there.
Ask your coding agent
Below the figures, include notes/<month>.md, my own words on highlights and asks, and stop with a clear message if that month's notes file is missing. Render the latest month in both formats, and show me the notes as they appear in the PDF.

In the test run, these prompts worked as written, on a made-up company. Three things they do not settle are yours. Runway here is cash divided by burn; if your investors expect net burn, burn less revenue, say so in the prompt and in the note. Every render overwrites the last: update.pdf is whichever month you rendered most recently, and a render that fails leaves the previous month’s files in place, so check the month printed in the PDF before you send it, or name each file by its month with -M output-file:update-2026-10, as Every value, checked does. And the first month in the data has no month before it; the test run’s agent wrote “no earlier month to compare with”, and yours should say something, not stop.

Checks only you can do. Compare cash with the bank statement and revenue with your billing tool, every month. Read the notes as an investor would: an ask without a number or a date is not an ask. Show the update to a co-founder before it goes out.

The rebuild test is next month. Add the row and the notes file, render with no -P, and check that the default found the new month.

You’re done when the update for any month in the data renders in both formats with that month’s figures and notes, a month that is not in the data stops the render with the valid list, and the fresh-clone test gives the same PDF.

A design document with live numbers

Who it is for. An engineer proposing a change to a codebase: a design document, or RFC, whose case rests on measurements and on what the code allows. The data is not a dataset but the code itself: a benchmark you run, and settings read from the source, so the document cannot quote a timing nobody measured or list an option the code no longer has. The example below compares two ways of counting words in a small package, textstats; change the names to your repository’s. Start with your repository, on a branch, with Quarto’s packages added as in 3  The Fast Path:

your-repository/
├── src/textstats/
│   ├── core.py        the code the proposal changes
│   └── config.py      its settings
└── rfc/
    ├── bench.py       the agent writes it
    ├── results.json   bench.py writes it; commit it
    └── rfc.qmd        the agent writes it
Ask your coding agent
Write rfc/bench.py: time `count_words_loop` against `count_words_counter` from src/textstats/core.py on texts of three sizes, five repeats each, and write rfc/results.json with each one's median time and range, the Python version, the machine and the date it ran. Run it, and show me the medians.
Ask your coding agent
Write rfc/rfc.qmd, a design document in html and typst with sections Context, Proposal, Measurements, Alternatives and Decision. Measurements reads rfc/results.json for a table and a chart with alt text, says what machine and Python it was measured on, and chooses the word faster or slower by code, with a guard. Leave the other sections as a heading and one line saying what goes there. Render it, and show me the sentence with that word.
Ask your coding agent
Add a table of the settings in src/textstats/config.py, read from the code at render time (each name, default and description), so the document cannot list a setting the code no longer has. Render, and tell me how you read them.

You build rfc/rfc.html and rfc/rfc.pdf; the prose of Context, Proposal, Alternatives and Decision is yours. From the test run: Quarto runs the document’s code from its own folder, rfc/, so every path in it is relative to rfc/: the document reads results.json, not rfc/results.json, and reaches the code as ../src/textstats/config.py or, better, by importing the package, as the test run’s agent did. An agent that copies the prompt’s paths into the code gets “file not found”. The rendered files land in rfc/ too: add them to .gitignore. And alt text cannot be computed in a Python document’s cell options (!expr is for R’s knitr only); write alt text that describes the chart without its numbers, and let the table carry them.

Checks only you can do. Check the machine’s name in results.json: on a Mac, Python’s platform.processor() says only “arm”, and the test run’s agent had to ask the system for the chip’s name. Run the benchmark twice. In the test run, the faster function stayed faster, but medians moved by up to about six per cent between runs, more than five repeats’ range suggested: report the direction and the ratio, not the third decimal place, and say on what machine it ran. Commit results.json with the document, so a reviewer reads the numbers you measured; re-run it when the code changes. Then ask a reviewer whether the Alternatives section names the option they would have proposed.

The rebuild test is the code. Add a setting to config.py and render: the table shows it. Remove it again.

You’re done when the measurements and settings tables come from results.json and the code at render time, the word faster or slower is chosen by code and guarded, and the fresh-clone test gives the same document.

The fresh-clone test

The last check of every project is the one a colleague, a reviewer or a marker will make: rebuild it from what you committed, on a clean copy. Anything that lived only on your machine, a file never committed or a step done by hand, shows up here instead of in their inbox.

  1. In the project folder, run git status. If it lists anything, commit it (Start a history) until it says nothing to commit, working tree clean.

  2. Clone the project into a new folder and render it there. For the brief:

    git clone ~/metrics-brief ~/metrics-brief-check
    cd ~/metrics-brief-check
    uv run quarto render brief.qmd

    The clone has no .venv/ and no outputs, because .gitignore kept them out of the history, so the first render builds the environment again, as in Render it yourself. A local clone copies between folders on your own computer; nothing is uploaded. For the other projects, use their folder and file names.

  3. Open each output from both folders side by side and compare every number.

A failed render or a different number is a finding, not a failure: commit the missing file, or turn the manual step into code, and clone again. When the two agree, delete the check folder; it is only a copy.

Agents, models and Quarto’s options will keep changing, and some details in this book with them. The loop does not. Prompt for one thing. Check it against the data. Publish only what you checked, from one source, as often as the data change.

Where next