Markdown to HTML: 0 LLM Tokens for 4 Posts, 23 FAQs Extracted A developer built a deterministic Markdown-to-HTML converter that published four manuscripts (43,699 bytes) using zero LLM tokens, automatically extracting 23 FAQ questions while all four posts passed built-in self-checks. The converter exits with code 1 on spec violations and reports faq_count and html_len to catch formatting drift, stripping the H1 from the body and pulling FAQ entries only from the FAQ section to avoid structured-data mismatches. The developer argues scripts should handle fixed-format conversion where output must be byte-for-byte reproducible, reserving LLMs for work that requires judgment. We needed to publish four manuscripts 43,699 bytes in total that another project had handed over, and the obvious move was to ask an LLM to turn the markdown into HTML. We wrote a deterministic converter instead. It used zero LLM tokens, extracted 23 FAQ questions automatically, and all four posts passed its built-in checks. The reason is not cost. The manuscripts already contained values that had been cross-checked by hand, such as notice numbers and page numbers, so changing a single character during formatting would itself be a defect. This post covers the rule we use to decide between a script and an LLM, what the converter actually does, and the two publishing traps it closed without anyone having to remember them. Ask these about the step you are about to automate. A single "yes" means use a script. | Question | If yes | If no | |---|---|---| | Must the same input always give the same output? | Script | LLM is fine | | Must source values stay byte-for-byte unchanged? | Script | LLM is fine | | Can pass or fail be decided automatically from an exit code? | Script | LLM is fine | Our conversion answered yes to all three. The manuscripts already followed a fixed layout title, three-line summary, tables, a Q/A list , the rules for turning that layout into tags were unambiguous, and compliance could be checked with plain string searches. Work that needs judgment, such as summarizing, restructuring, or adjusting tone, belongs to the LLM. Moving a fixed format into fixed tags does not. The short version: if judgment is needed, use an LLM; if there is a rule, use a script. There is a cost argument too, but it is the weakest of the three. A few posts are cheap either way, yet an LLM step also gives you a different output on each run and a chance to quietly touch a number. Those two problems are what actually hurt. The script takes one markdown file and produces body HTML plus a metadata JSON. If it finds a spec violation it exits with code 1. python -X utf8 scripts/publish/md2bsp.py post.md out/body.html --meta out/meta.json Standard output is two lines. The first is the metadata, the second is the self-check result: {"title": "