Introduction
AI’s ability to perform complex, nitty-gritty tasks has tremendous upsides, but it is easy to mistake “I don’t have to do it” for “automated”. A workflow that includes repeated use of AI for identical tasking may feel like a win in that it is liberating you (or someone) from drudgery, but it is actually just transferring the risk of inconsistent execution to an agent that won’t ever get a sternly worded message from a product manager. You’re not only paying for it in risk, you’re paying for it in money and attention. Inference isn’t free and neither is the time you spend reviewing the results each go-round. If you have a process that is essentially mechanical and requires perfect reproducibility, the answer isn’t having the AI do it, it’s having the AI help you automate it.
An Example From This Very Site
All of the content here is human-authored in Markdown files and converted to HTML for publication. The md source files do double duty by serving as crawler-friendly alt content. During the initial construction the conversion was accomplished by asking Claude to do the honors. This was never intended to be the long-term answer, but every process has to start somewhere. Once the designing was done, however, the very next order of business was making md → HTML cheap and reliable.
This site (bennherrera.dev) is served by a Cloudflare Worker project backed by a GitHub repo. The worker actually serves content for an additional professional info site (bennherrera.me). The content for both sites has similar, but not identical needs.
I had a session with the AI and explored some options. I landed on using pandoc† and HTML templates for the .dev articles with a custom Lua filter to handle forward and return links for symbolic footnotes. For the .me landing page another HTML template/filter combo took care of the text with foldouts for the example stories. The .me/cv/ resume HTML just needed another template.
The article list in the .dev landing page is handled by a simple Python script that inserts the article entries between a pair of begin/end comments in the HTML file. It pulls the article metadata from the YAML frontmatter of the Markdown sources. Since it was pulling all that info, it was trivial to add generation of the RSS feed XML.
A Makefile keeps everything up to date. As a safety measure, the default make target creates the new HTML files in a generated/ subdirectory. This allows for easy A/B comparison of old vs new content to ensure nothing went haywire. So my workflow is editing the markdown sources or creating a new article directory and index.md under .dev/writing/ (like I did for this one right here), and then running a make command to generate the corresponding HTML, update the table of contents, and refresh the RSS feed.
For the changeover from the old “process” I had Claude Code do the scut work of extracting templates from the existing HTML files, writing the Lua filters, Python script, and Makefile. The use of the generated/ subdirectory allowed for careful comparisons against the latest good versions to ensure the automation was working as intended. Once everything checked out the original HTML files were overwritten with generated content. This became the primary source of published HTML going forward.
The upshot of all that is that I had arrived at a point where AI was needed to perform a regular task that neither it nor I was best suited for, so I used it to work us both out of that job.
Summary
There’s not a lot of complexity to the lesson here. AI, for all its power and indefatiguability, shares two weaknesses with humans for tasks requiring perfect reproducibility: inconsistency and expense. If you know you need an endless supply of identical sammiches, asking the genie to make you a sammich over and over is not a solution. It’s an invitation to receive a $25 peanut butter and mustard on scone. Asking it to help you make a vending machine — that’s the right answer.
Footnotes
† ↩︎ Two options were considered: pandoc and something custom in Go or Python. Pandoc was the only serious contender. Its developers already solved every big problem and provided the Lua escape hatch for custom requirements.