# AGENTS.md — Mindlogic Docs

> Orientation for automated agents and LLM tooling reading https://docs.mindlogic.ai.
> For the curated index of what is documented here, read [/llms.txt](https://docs.mindlogic.ai/llms.txt) first.

## Entry points

- [/llms.txt](https://docs.mindlogic.ai/llms.txt) — curated, LLM-facing index of the documentation (llmstxt.org format)
- [/sitemap.xml](https://docs.mindlogic.ai/sitemap.xml) — every public page
- [/openapi.json](https://docs.mindlogic.ai/openapi.json) — OpenAPI specification for the FactChat API Gateway
- [/robots.txt](https://docs.mindlogic.ai/robots.txt) — crawl policy (everything is allowed)
- [/docs/general](https://docs.mindlogic.ai/docs/general) — documentation root for the public fallback tenant

## URL shape

Documentation pages live at:

```
https://docs.mindlogic.ai/docs/{tenant}/{product}/{pageGroup}/{pagePath}
```

Use `general` as the tenant unless you know a customer's own slug.
Customer tenants expose the same paths under their own slug and may hide pages
for features they have not enabled, so `general` is the widest view.
Each tenant also has its own index at `/docs/{tenant}/llms.txt`.

## Getting Markdown instead of HTML

Every documentation page is retrievable as Markdown, two equivalent ways:

```
GET https://docs.mindlogic.ai/docs/general/factchat/product/chat.md
GET https://docs.mindlogic.ai/docs/general/factchat/product/chat
    Accept: text/markdown
```

Both answer `text/markdown; charset=utf-8` and carry `Vary: Accept`.
Add `?lang=ko|en|ja` to pick a language; the default is `ko`, and a page with
no translation yet falls back to the Korean source.

## Errors

Every machine-readable endpoint (`/api/*`, `/openapi.json`) answers non-2xx
with a single envelope:

```json
{
  "error": {
    "code": "page_not_found",
    "message": "No documentation page at factchat/product/nope.",
    "status": 404,
    "documentation_url": "/llms.txt"
  }
}
```

Requesting a path that does not exist with an explicit non-HTML `Accept`
header returns a small Markdown or JSON 404 rather than the HTML error page.

## Structured data

Pages carry server-rendered JSON-LD: `Organization` and `WebSite` (with a
`SearchAction` pointing at `/api/search?q=`) site-wide, plus `TechArticle`
and `BreadcrumbList` on each documentation page. It is present without
executing JavaScript.
