How to write and update pages in the public docs so they match the shipped product.
The public docs site renders the root docs/ folder. AI agents read the same pages through /llms.txt, /llms-full.txt, the per-page .md URLs and the docs MCP server, so every page has to be accurate on its own.
Agents tend to rewrite an old page or copy PRODUCT.md, and both drift from the product. Write each page from the source instead:
PRODUCT.md section for intent and vocabulary.apps/saas/features/<domain>/: the *-actions.ts and *-queries.ts files and the component names.apps/saas/app/[locale]/(app)/[orgSlug]/ (or admin/) for the real paths and tabs.packages/identity/src/rbac/features.ts. That registry is the source of truth, not permissions.ts.apps/api/app/api/v1/ and the MCP allowlist mcpToolDefinitions in packages/api-client/src/mcp.ts.agent-browser on https://app.localhost and the seeded logins, or read the English strings in apps/saas/translations/en.po.Describe only what ships. For a roadmap item, write one line that starts with "Not yet available" instead of prose about what the feature is intended to do.
Use these H2 sections in this order and leave out the ones that would be empty:
organization.* or system.* keys that gate the feature./openapi/... pages.The frontmatter description is one specific sentence. llms.txt is built from it, so it must say what the page covers.
Cards belongs only on index.mdx. Use Markdown tables for reference data./product/quotes. The docs app is mounted at the root, so never prefix /docs.meta.json. tests/integration/docs/docs-tree.test.ts fails on orphan pages, missing frontmatter and broken internal links.apps/docs/next.config.ts.Last updated on