AI readiness for your documentation
Make your documentation discoverable and usable by AI coding assistants (Claude Code, Cursor, GitHub Copilot) by adding two files to your repository.
llms.txt — page index for AI agents
Create an llms.txt file at the root of your documentation repository. This file lists all your pages with one-line descriptions so AI agents can discover and navigate your docs without crawling every page.
Format
# {Product name}
> {One to two sentence description of the product and its documentation.}
Documentation access: {public|private}
## Pages
- [Overview](README.md): Introduction to {product}, key capabilities, and getting started.
- [Get started](get-started.md): Prerequisites and step-by-step setup guide.
- [{Page title}]({filename}.md): {One-line description of what this page covers.}Tips
- List every page that appears in your
_sidebar.md. - Each entry should have a meaningful description — not just the page title repeated.
- Keep the file updated when you add or remove pages.
- The portal generates a site-level
llms.txtthat indexes all published docs. Your doc-levelllms.txtprovides the per-page detail.
AGENTS.md — instructions for AI coding assistants
Create an AGENTS.md file at the root of your documentation repository. This file tells AI coding assistants the conventions and structure of your docs so they can contribute correctly.
Format
# Agent instructions
{One to two sentences describing what this documentation covers and who it is for.}
## Documentation structure
| Path | Content type | Description |
|---|---|---|
| `README.md` | Landing page | {Brief description} |
| `get-started.md` | Get started tutorial | {Brief description} |
| `guides/{topic}.md` | How-to guide | {Brief description} |
## Conventions
- All document links resolve from the doc root, not the current file.
- `../` is not supported in document or sidebar links.
- Images resolve from the current page's directory.
- Use British English throughout.
- One content type per page.
- Sentence case for all headings.Tips
- Tailor the conventions section to your product’s specific requirements.
- Include any product-specific terminology or naming conventions.
Recommended: install the Doc Portal skill
For the best AI-assisted publishing experience, install the Doc Portal skill via Agent Prime Directives (APD). This gives Claude Code built-in knowledge of the portal’s link resolution, Docsify configuration, and validation rules.
Prerequisites: GovTech CLI (gt) and Claude Code, and Node.js (LTS).
gt apd install gdp-doc-portalWith the skill installed, Claude Code can validate links, fix broken references, configure publishing settings, and run the link-checking CLI — all following the portal’s platform rules. See AI-assisted publishing in Get started for details.
Platform rules for AI agents
AI coding assistants working with your docs need to understand the portal’s non-standard link resolution. See the platform rules and allowed file types references in this guide for the complete rule set.