{"slug": "which-doc-format-is-best-for-ai-specifications", "title": "Which Doc Format is Best for AI Specifications?", "summary": "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.", "body_md": "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.\n\n**TL;DR: Markdown for AI working documents, AsciiDoc for curated human-reviewed specs, HTML only as a publishing target.**\n\n## Objective Metrics\n\n- Corpus Tokens (Approx)\n-\nMarkdown: 594k, AsciiDoc: 598K, HTML: 661k\n\n- Worst Single-File Ratio\n-\nAsciiDoc: 1.023x, HTML: 1.26x (due to tables and code blocks)\n\n- Markup share of file content\n-\nMarkdown 0.9%, AsciiDoc 1.3%, HTML 9.9% - a 10x overhead for HTML\n\n## Read/write Assessment\n\nIn terms of readability, both Markdown and AsciiDoc are good. HTML has far more tags, which add noise. One of the most common tags is\n\n```\n<code>some code</code>\n```\n\nhowever in the other formats, this is just\n\n```\n`some code`\n```\n\nWhen you have an average of 16 per file, this adds a lot of noise.\n\n## Usability\n\nGitHub 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.\n\nIf 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.\n\n|\nNote\n|\nAs these were one-for-one conversions, I didn’t use features that only exist in AsciiDoc or HTML, such as. |\n\n## Markdown vs AsciiDoc\n\nWhile you might choose either format for your specs, I have been following this convention to keep the authoring consistent.\n\n- Markdown\n-\nused for AI-generated content, not human-written, often not even reviewed. These are working disposable documents for the AI.\n\n- AsciiDoc\n-\nused 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.\n\n- HTML and DOCX\n-\nused for publishing, not for authoring.\n\n## Conclusion\n\nThe 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.\n\nFor this project, Markdown for disposable AI working documents, AsciiDoc for curated human-reviewed specifications, HTML/DOCX for publishing.", "url": "https://wpnews.pro/news/which-doc-format-is-best-for-ai-specifications", "canonical_source": "https://blog.vanillajava.blog/2026/07/which-doc-format-is-best-for-ai.html", "published_at": "2026-07-14 14:00:28+00:00", "updated_at": "2026-07-14 14:25:41.657019+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Fable", "Pandoc", "GitHub", "IntelliJ"], "alternates": {"html": "https://wpnews.pro/news/which-doc-format-is-best-for-ai-specifications", "markdown": "https://wpnews.pro/news/which-doc-format-is-best-for-ai-specifications.md", "text": "https://wpnews.pro/news/which-doc-format-is-best-for-ai-specifications.txt", "jsonld": "https://wpnews.pro/news/which-doc-format-is-best-for-ai-specifications.jsonld"}}