Y2 Elite workspaces are rolling out for teams
Y2Y2Docs

LLM-friendly Documentation

Reference for Y2 documentation artifacts used by coding agents, retrieval systems, and MCP clients.

Y2 publishes build-generated text and MDX artifacts so an AI integration can discover, retrieve, and cite the same documentation shown in Fumadocs.

Choose the smallest useful artifact

Start with /llms.txt. Fetch one page when the task is narrow, use /llms-full.txt only when broad product context is necessary, and use /api/openapi.yaml for request and response schemas.

How the artifacts are produced

The Vite documentation plugin reads content/docs during a production build. It emits the index, full corpus, page-level MDX files, and the Fumadocs search index. During local development, the same plugin generates these responses on request. The OpenAPI reference is generated separately from public/api/openapi.yaml.

Artifact reference

ArtifactContentUse it for
/llms.txtPlain-text overview and grouped links to every documentation pageDiscovery and routing
/llms-full.txtConcatenated page titles, canonical paths, and source MDX bodiesBroad grounding or corpus ingestion
/docs.mdxSource MDX body for the documentation home pageTargeted retrieval
/docs/{slug}.mdxSource MDX body for one documentation pageTask-specific context
/api/openapi.yamlOpenAPI contract for public HTTP endpointsTypes, parameters, schemas, scopes, and responses

These are public documentation artifacts and do not require a Y2 API key.

Source MDX is not rendered prose

Page-level files and /llms-full.txt contain the MDX body without frontmatter. Fumadocs tags such as Callout, Cards, and APIPage can remain in the text. Generated endpoint pages may point to public/api/openapi.yaml instead of expanding every schema, so API clients must also read the published OpenAPI contract.

Retrieve documentation

curl -fsS https://y2.dev/llms.txt

Use the grouped links and descriptions to decide which page the task needs.

The deployed files use revalidation caching. Re-fetch them when starting a new integration task or after a Y2 release instead of treating a local copy as permanent.

Ingest the full corpus safely

Each page in /llms-full.txt begins with a generated header:

# Page Title (/docs/canonical-path)

[Source MDX body]

The plugin places --- between pages, but source pages can also contain their own horizontal rules. Do not split on every ---. Detect generated page headers that match a title followed by a /docs path, and retain that path as source metadata.

Fetch and validate the response

Require a successful HTTP response and a text content type before replacing an existing corpus.

Detect page boundaries

Start a new document at headers shaped like # Title (/docs/path). Keep the title and path separate from the MDX body.

Chunk within each page

Split long pages by their Markdown headings while preserving the canonical page path on every chunk. Keep code blocks intact.

Index the API contract separately

Parse /api/openapi.yaml by operation and schema. Do not infer endpoint shapes from examples or from an APIPage component tag in the MDX corpus.

Use MCP when the agent needs tools

The LLM artifacts provide documentation context only. Use the Y2 MCP integration when an agent also needs bounded report or News reads, OpenAPI operation lookup, or Agent Y2 access.

Separate distribution boundary

@y2-intel/mcp is a separate package whose implementation is not in this platform repository. After installation, use the MCP client's tools/list, resources/list, and prompts/list responses as the source of truth for that installed version.

The MCP guide covers client configuration, scoped credentials, capability inspection, and troubleshooting. Keep Y2_API_KEY in the MCP process environment, never in a prompt or tool argument.

Prepare a coding agent

Use the maintained integration prompt when an agent will write Y2 API code. It directs the agent to the documentation index, OpenAPI contract, current base URLs, authentication rules, and plan boundaries.

AI Quickstart

Copy the maintained Y2 integration prompt into your coding agent before it writes API code.