cd /news/developer-tools/which-doc-format-is-best-for-ai-spec… · home topics developer-tools article
[ARTICLE · art-58978] src=blog.vanillajava.blog ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Which Doc Format is Best for AI Specifications?

A developer compared Markdown, AsciiDoc, and HTML for AI specifications using a corpus of 674 documents, finding Markdown best for AI working documents due to low markup overhead (0.9%) and easy rendering on GitHub, while AsciiDoc is preferred for human-reviewed specs and HTML only for publishing.

read2 min views1 publishedJul 14, 2026

I have a Spec Driven Project with 674 documents incl 181 specs, 429 tasks, and 40 project docs. About 1/3 of these are an acceptance sub-project to show the root project meets fit-for-purpose requirements. I used Fable to convert these to and from AsciiDoc, Markdown, and HTML. From this, I tried to draw some conclusions about which format is better than the others for AI specifications.

TL;DR: Markdown for AI working documents, AsciiDoc for curated human-reviewed specs, HTML only as a publishing target.

Objective Metrics #

  • Corpus Tokens (Approx)

Markdown: 594k, AsciiDoc: 598K, HTML: 661k

  • Worst Single-File Ratio

AsciiDoc: 1.023x, HTML: 1.26x (due to tables and code blocks)

  • Markup share of file content

Markdown 0.9%, AsciiDoc 1.3%, HTML 9.9% - a 10x overhead for HTML

Read/write Assessment #

In terms of readability, both Markdown and AsciiDoc are good. HTML has far more tags, which add noise. One of the most common tags is

<code>some code</code>

however in the other formats, this is just

`some code`

When you have an average of 16 per file, this adds a lot of noise.

Usability #

GitHub renders both Markdown and AsciiDoc with working links and checkboxes; HTML is shown as raw source, so the review loop dies there. The first two are also easier to view while you’re editing in IntelliJ. HTML is more difficult to read and edit, and it is not as easy to view the rendered output.

If you occasionally need HTML, you don’t need HTML files: embed an island with ```{=html} in Markdown (Pandoc raw-attribute syntax) or in AsciiDoc. It renders where HTML is supported and drops out cleanly elsewhere. If you really need to use HTML, you can include a link to a file in that format.

| Note | As these were one-for-one conversions, I didn’t use features that only exist in AsciiDoc or HTML, such as. |

Markdown vs AsciiDoc #

While you might choose either format for your specs, I have been following this convention to keep the authoring consistent.

  • Markdown

used for AI-generated content, not human-written, often not even reviewed. These are working disposable documents for the AI.

  • AsciiDoc

used for human-written content, reviewed and approved. These are curated specifications important enough to be preserved and maintained. They are the source of truth for the project.

  • HTML and DOCX

used for publishing, not for authoring.

Conclusion #

The format that works best is not just the one with the fewest tokens. It is the one that humans can review, tools can diff, and AI can consume without wasting context on markup noise.

For this project, Markdown for disposable AI working documents, AsciiDoc for curated human-reviewed specifications, HTML/DOCX for publishing.

── more in #developer-tools 4 stories · sorted by recency
── more on @fable 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/which-doc-format-is-…] indexed:0 read:2min 2026-07-14 ·