# @cubicecho/agent-docs > Generates and checks the agent docs a package ships: llms.txt from _agents/docs/ pages and each package export's doc comments, and the checks that keep README, AGENTS.md and the package contents to the standard. Agent-facing docs for @cubicecho/agent-docs: one task or concept per page, then what each package.json "exports" entry exports. Generated from _agents/docs/ and the doc comments in src/ by @cubicecho/agent-docs; edit those, not this file. Requires Node >=22. ## Docs - [Install and wire up](_agents/docs/01-install.md): Add `@cubicecho/agent-docs` as a dev dependency, then give the package three npm scripts: `llms` writes `llms.txt`, `prepack` runs it on every pack and publish so the file never goes stale, and `docs:check` checks the rest of the agent docs standard. - [What check enforces](_agents/docs/checks.md): `agent-docs check` holds a package to ten rules and prints one line per broken one, saying what to change. A private workspace root (`private: true` with `workspaces`) is held to the repo-level rules only: links, CLAUDE.md and `.agents/`. - [CI](_agents/docs/ci.md): Generate `llms.txt` at pack time instead of committing it, run `llms` and `check` wherever the repo already runs its checks, and check what `npm pack` would ship after the build. - [The agent-docs command](_agents/docs/cli.md): `agent-docs llms` writes or checks `llms.txt`, and `agent-docs check` checks the package against the agent docs standard. Each prints one line per problem and exits 1 when there is any; otherwise it exits 0. - [Common mistakes](_agents/docs/common-mistakes.md): The mistakes that make `llms` or `check` fail, or let a stale index through, each with its fix. - [_agents/llms.json](_agents/docs/config.md): `_agents/llms.json` is the optional overrides file both commands read; without it, every field takes its default. ## Exports: @cubicecho/agent-docs Generates and checks the agent docs a package ships. - `CheckResult` (type): What checkAgentDocs found. - `checkAgentDocs`: Checks a package against the agent documentation standard, changing nothing. - `CliOutput` (type): Where the CLI prints. - `ExitCode`: The process exit codes the CLI returns. - `runCli`: Runs one CLI command against a package. - `LlmsConfig` (type): `_agents/llms.json`, the overrides both commands share, with its defaults filled in. - `loadLlmsConfig`: Reads `_agents/llms.json`, or the defaults when it is absent. - `AgentDocsError`: The docs or the package can't be read or generated as they stand. - `LAYOUT_DEFAULTS`: The layout the agent docs standard and the cubicecho build use. - `LayoutSettings` (type): Where the docs and the source they index are found. - `LIMIT_DEFAULTS`: The limits the agent docs standard sets. - `LimitSettings` (type): The size limits both commands hold the docs to. - `firstSentence`: The first sentence of a paragraph. - `summarize`: The one-line summary a doc comment gives the index. - `ExportPlacement`: Where the export index went. - `GeneratedFile` (type): One file the plan writes. - `LlmsOptions` (type): What planLlms reads. - `LlmsPlan` (type): Everything one run of `llms` writes, before anything is written. - `planLlms`: Works out llms.txt, and the export pages when there are any, without writing anything. - `findStaleFiles`: Compares a plan with the files on disk, for CI. - `writeLlms`: Writes a plan's files and deletes the export pages it no longer generates.