Day to day dogfooding your design

Forget getting agents to report in Markdown: HTML is much more effective. Couple that with your real component library and you'll find gaps and bugs before anyone else does.

  • 6 min read
  • Day 4 of 24

I used to ask agents for Markdown. Plans, reports, summaries: all Markdown, because that's what they produce by default. Then I kept seeing people online recommend asking for HTML instead, so I gave it a go. The HTML version is so much easier to parse at a glance and allows me to take in the information much more efficiently.

The bit I added was using my own components to build it. Rather than telling an agent my brand colours and fonts, I make it render those reports with the real design system, so any gap in the library shows up every day instead of staying hidden. This has been a game changer for me, as I keep finding issues and coming up with ideas that I'd have missed before.

A user experience with no users

Components, components, everywhere, but which are slop or slick?

This started on Surrounded by Stories, an idea I'm working on. I already had a big style guide for it, with a large set of components in a React design system and all the colours and text styles defined. What I didn't have was pages, because I was still building the infrastructure and work processes behind it.

Meanwhile my agents were making what I call PM reports: taking every ticket in the backlog, the state of the application and notes from earlier sessions, and putting it all in one easy-to-see place. Many people want to keep using kanban boards, and I tried this first too, but having an agent compile an easy to digest report has worked better for me. I realised these could be styled too, and rather than just telling my agents what my brand colours and fonts were, I should be using the actual components from the library.

By using my real components I would be doing real QA on my design system with real life consequences to my own workflow. If a component had issues, I would be motivated to fix them immediately.

One static file you can double-click

A report that needs a dev server running is a report you stop opening.

My first attempt went through the codebase, picked out the components I used most and built the report from them. The problem was that it needed a local server running to link to the generated component and CSS files. So I adapted it to take a compiled, minified build of the component library and inline it into the HTML file's <head>. Performance and tidy markup don't matter here: everything goes into one static HTML file, so you can just double-click it, view it in a browser, and it all works fine.

The files are big, but the token cost isn't too bad, because the build side happens outside the model's context window. The agent writes the content, not the components. That's the general lesson: when an agent does the same task more than once, automate the deterministic parts with a script and only use inference for the open-ended, creative parts.

The same rule on this site#

When I rebuilt this site on Astro (covered in Day 1), I carried the same rule across. It now lives in a dogfood-page skill that any report can use, from my PM reports to plans and reviews. It's written for this repo, with its own paths, commands and tickets, so treat it as a reference to adapt to your own components rather than a skill you can install as it is.

The agent writes a JSON file made only of the site's own blocks, validated by the same Zod schema (a TypeScript schema validator) as every public page. Then scripts/pm/desk.mjs runs the real astro build and folds the compiled CSS, fonts and local images into one self-contained HTML file:

scripts/pm/desk.mjs
javascript
// 1. The real build, with the desk route switched on.
const build = spawnSync(
  process.execPath,
  [join(REPO, 'node_modules', 'astro', 'bin', 'astro.mjs'), 'build', '--outDir', outDir],
  { cwd: REPO, env: { ...process.env, PM_DESK: deskFile }, stdio: ['ignore', 'ignore', 'inherit'] },
);

// ...

// 2. Stylesheets: inline each, with url(/...) assets embedded.
html = html.replace(/<link\b[^>]*rel="stylesheet"[^>]*>/g, (tag) => {
  const href = tag.match(/href="([^"]+)"/)?.[1];
  if (!href?.startsWith('/')) return tag;
  const css = readFileSync(join(outDir, href), 'utf8').replace(/url\((['"]?)(\/[^'")]+)\1\)/g, (m, q, p) => {
    const uri = dataUri(p);
    return uri ? `url("${uri}")` : m;
  });
  return `<style>${css}</style>`;
});

Never paper over a missing block

Hand-written CSS hides the gap in your design system; real components force you to fix it.

On the first PM report for this site, an agent copied the colour tokens into hand-written CSS instead of using the real blocks. It looked close enough to pass a glance, which is the worst outcome: a lookalike drifts the moment a token changes, and it hides every component your library is missing. The rule since then is strict: zero CSS, zero HTML and zero inline styles in the report.

Once I stopped letting agents work around missing pieces, the reports started doing real design-system testing. Across the projects I use this on, it quickly flagged text that wasn't legible, spacing problems, components that didn't quite work, and pieces I hadn't built yet: expander sections, table styles and diagrams with Mermaid (a text-to-diagram library) all came out of reports that needed them.

By the time I came to build the main site, the component library had already been through real use. It's a much richer component library, and better tested, for it.

Show, don't tell

Don't take my word for it: have a look with your own eyes.

To show the difference, I took a PM report an agent wrote for me, stripped out anything private, and had it rendered four ways: the raw Markdown an agent gives you by default, that Markdown in a GitHub-style preview, a standalone HTML page with no design system behind it, and the single file desk.mjs builds from this site's own blocks. The picture shows the same item in each, opened at the same place. The button under it opens all four real files, so you can scroll, expand and explore for yourself.

The plain HTML version is one an agent wrote from the same content with no design system to follow, so it uses the generic look you usually get from modern LLMs which may change from model to model. Whether my actual design system looks nicer is subjective, but the important point is that I am user testing my design system every time I read an AI generated report.

The same plan item in four quarters. Top left, raw Markdown in a monospace font with hash marks and asterisks. Top right, a GitHub-style preview where the numbered steps restart at 1 after each code block. Bottom left, a generic HTML page with a purple numbered disc, coloured pills and dark code boxes. Bottom right, this site's own blocks: a centred phase heading, an open disclosure with badges on the title line, a recommendation callout and numbered steps.
Raw Markdown, a Markdown preview, plain HTML and the dogfooded page: the same item each time.
Open in a new tab

Oh no! The generic page looked better

Everything is an opportunity to improve, even writing this article. If the generic one looks better my design system has a gap.

When I put the first dogfooded version next to the generic one, I spotted that a few things rendered better in the generic version. Its badges sat on the same line as the title, so the list scanned like a table, and its headings and expanders shared one left edge, where mine started on two.

Those weren't problems with one page; they were gaps in the components, so that's where the fixes went. I proposed the improvements to the model, it agreed, and we implemented them, so every page on the site got them. A second opinion from Google's Gemini added a wide setting for expanders and a spacing toggle. The agent then wrote what it learned into the dogfood-page skill, so the next report starts from the better version.

Is it worth setting up?

Only if you already have a front end to test.

If you aren't building a website or a front-end web application, this matters much less. Plain HTML reports from an agent are still easier to take in than Markdown, so that half is worth trying even without a design system behind it.

If you are making a website, making your agents dogfood your own components is a quiet way to keep the library honest without much extra effort. You're going to read the plans and status reports anyway; they might as well test your spacing, contrast and edge cases while they're at it.

Next time you ask an agent for a plan or status report, ask for a single HTML file built from your own components instead of Markdown. My skill and build script are references to adapt, not drop-in tools.

Read the dogfood-page skillRead desk.mjs on GitHub