Published · 8 min read
How to create an llms.txt file for your docs
Learn how to create llms.txt for your documentation: what goes in it, how to write or generate one, and how to keep it accurate after each release.
Published · 11 min read
Choose a technical documentation format in six steps. Compare Markdown, AsciiDoc and DITA XML, then build a consistent, current document from a template.
Pick a technical documentation format by matching it to your team's skills, output needs and how often the product changes. Markdown suits docs-as-code teams, AsciiDoc adds richer structure, and DITA XML fits reuse across many outputs. Then use a consistent section layout and keep the docs current as code ships.
This guide is for the engineer or documentation owner who has to make that call for a real project. You will choose a format in six steps, then build a document from a template.
Technical documentation is any written material that explains how a product or system is built, installed, operated or extended. Common types include API references, architecture and design documents, user guides, setup and runbook pages, release notes and READMEs.
Format matters because it sets who can write the docs, how they get reviewed, and what outputs you can publish. A plain-text format reviewed in pull requests asks something different of your team than a topic-based XML system with its own editor.
A format is a container. It does not make the content good, and it does not keep the content true after the product changes.
Before you compare formats or tools, write down four things: who reads the docs, which outputs you must ship, how often the product changes, and who will author and review. Do this first, because each answer rules formats out.
Do not skip this step to get to the tool list. A study of 65 participants exploring software architecture documentation found no significant link between performance on understanding tasks and the documentation format used. Format alone does not decide whether readers understand your docs. The process around it does: who writes, who reviews, and how fast corrections ship.
Top documentation teams reportedly dedicate 10-20% of their total project time to documentation tasks, according to DocuWriter.ai, a vendor-reported figure. Use it as a prompt to budget time for authoring and upkeep now, not as a benchmark you must hit.
Markdown is the easiest to learn and the lightest to review. AsciiDoc adds richer structure for longer documents. DITA XML gives the strongest reuse across many outputs, at the cost of tooling and training. None of the three is best in every case.
| Format | Learning curve | Structure and reuse | Best fit |
|---|---|---|---|
| Markdown | Low. Most developers already know it. | Basic headings, lists, code blocks. Reuse usually needs extensions such as MDX or includes. | Docs-as-code teams, READMEs, API guides, fast-moving product docs |
| AsciiDoc | Moderate. More syntax to learn than Markdown. | Built-in support for includes, admonitions, tables and cross-references. | Longer manuals and books that stay in plain text under version control |
| DITA XML | High. Topic-based authoring and XML take training. | Topics are written once and assembled into many deliverables. | Large documentation sets that publish many outputs from shared content |
Three points that the table cannot show:
Pick the lightest format that covers your outputs from Step 1. Then move to Step 3 and decide the authoring model around it.
Choose docs-as-code if engineers write the docs and one web output is enough, and choose structured authoring if dedicated writers publish the same content to many outputs. Docs-as-code keeps documentation as plain text in Git, reviews changes in pull requests, and builds a static site from the result. Structured authoring writes small, typed topics once and assembles them into many deliverables. Your Step 1 answers decide which model fits.
Docs-as-code works when the people who change the product also write the docs. A code change and its doc edit travel in one PR, get one review, and merge together. The failure mode is quiet: nobody opens the docs repo when a PR touches behavior in a different repo, so pages drift. A green site build proves the Markdown parses. It does not prove the page is still true.
Structured authoring suits teams with dedicated writers and several outputs. A topic holds one task or concept, and a map assembles topics into a manual, a help center or a PDF. You change a shared step once and every deliverable updates. The cost is an editor, a publishing pipeline and training time.
Pick docs-as-code if one web output covers your audience and engineers contribute. Pick structured authoring if the same procedures appear in many products or deliverables. If you are unsure, start with docs-as-code. Moving plain text into topics later is easier than unwinding a heavy system.
Mobile-app documentation tends to differ from web software docs in plain ways. It leans on screenshots, short task flows and in-app help. It often tracks several OS versions and must match store release dates. Web product docs lean on reference material, code samples and version selectors.
Pick the tool your team can actually run, based on its skills and budget. Match the model to who will operate it. A tool your team cannot run is worse than a plainer one it can. The table sorts six tools by runtime, model and best fit.
| Tool | Runs | Format or model | Best fit |
|---|---|---|---|
| GitBook | Cloud | Visual editor with Git-like branching; Markdown sync with GitHub and GitLab | Mixed teams of engineers and non-engineers |
| MadCap Flare | Desktop app (Windows) | Topic-based authoring, single-sourced to HTML5, PDF and EPUB | Complex multi-channel enterprise publishing |
| Sphinx | Not specified | reStructuredText or Markdown to HTML and PDF | Python projects and API docs generated from code |
| Paligo | Cloud | Structured reuse and version branching | Large sets that need modular reuse |
| Mintlify | Cloud | Hosted sites with OpenAPI support; configured through docs.json | SaaS API docs |
| Docusaurus | Not specified | React-based static site generator; Markdown and MDX with versioning | Teams comfortable with a JavaScript build |
An open-source tool costs team time rather than license fees. Someone has to own the build, hosting, upgrades and theme fixes. Sphinx asks you to learn directives and indentation rules. Docusaurus requires a JavaScript build process.
Choose by skill first, budget second. Engineers who live in Git can run Sphinx or Docusaurus. A mixed team may prefer GitBook's visual editor. A writing team with heavy reuse needs fit Paligo or MadCap Flare, accepting the training cost. For a broader comparison of hosted options, read Technical Documentation Platforms: How to Choose.
A design document template needs five sections: overview, prerequisites, visual blueprints, operational steps and verification. A design document explains what you plan to build and why, so reviewers can challenge the approach before code exists. A software architecture document describes how a system is structured: its components, their connections and the data they hold. Both fit one template. Use this layout as a technical documentation format for a project, one section per heading.
A short design document needs only five parts: an overview, prerequisites, visual blueprints, operational steps and verification. Here is a software design document example you can copy:
## Overview
Retries failed outbound webhooks. Reads from the events queue, writes to the delivery log.
## Prerequisites
- Queue client library, delivery-log database access
## Visual blueprints
[Component diagram] [Delivery-log table schema]
## Operational steps
1. Pull a failed event from the queue.
2. Resend with exponential backoff.
3. Record the attempt in the delivery log.
## Verification
Force a failing endpoint and confirm three logged attempts.
A design document is not a README. A README tells a newcomer how to run the project. A design document records decisions and trade-offs.
Once the template exists, the hard part is keeping it true. If one fact lives in a design doc, a help article and a changelog, each copy goes stale on its own. Write once, speak every format describes the single-source approach to that problem. For the habits that stop pages drifting after merges, see how to keep docs in sync with code. We build Thally, which keeps published docs accurate after code merges. It is not a format or an authoring tool, so it sits alongside whichever format you pick.
Four style habits make any format easier to use: short sentences, one term per thing, one action per step, and task-based headings. Style habits carry across Markdown, AsciiDoc and DITA. Apply these to every page:
DocuWriter.ai reports that applying a simple style guide can increase the speed at which users locate information by 30%. That is a vendor-reported figure, so test it on your own readers. Style makes a page easier to read. It does not make it correct.
No single technical documentation format wins. Match the format to your audience, outputs, update cadence and team skills, then pick the lightest option that covers them. Whatever you choose, the study of 65 participants found format alone does not decide whether readers understand your docs. The template, the style habits and the review process do more of that work.
Next, write down your audience, outputs, release cadence and authors from Step 1 on one page. Then draft a single real document from the Step 5 template in the format you chose, and ask one reader to follow it. Their first stumble shows you what to fix.
Published under the Thally editorial policy. Technical conformance is defined in the agent-readiness methodology.
Create a managed site, or use the open-source engine to run Thally yourself.