# AI / Agent 入口

## 读取顺序

1. 先读取 [`/llms.txt`](/llms.txt) 获取页面索引。
2. 根据任务读取单页 `.md`，例如 [`/docs/core/permissions.md`](/docs/core/permissions.md)。
3. 只有跨模块任务才读取 [`/llms-full.txt`](/llms-full.txt)。
4. 修改前读取 `deno.json(c)`、`deno.lock`、`package.json`、现有 imports、tasks 和 CI。
5. 修改后运行 `fmt --check`、`lint`、`check` 与相关测试，并报告实际命令。

## 任务路由

| 目标 | 首读 | 追加 |
| --- | --- | --- |
| 运行/调试 TypeScript | [运行时](/docs/core/runtime) | [权限](/docs/core/permissions) |
| 安装依赖 | [依赖](/docs/core/dependencies) | [CLI 与配置](/docs/reference/cli-and-config) |
| 修改 Monorepo | [Workspaces](/docs/core/workspaces) | [生产基线](/docs/deploy/production-baseline) |
| 新增测试 | [测试](/docs/core/testing) | [内置工具](/docs/core/tooling) |
| 迁移 Node 项目 | [从 Node.js 迁移](/docs/migration/from-node) | [常见错误](/docs/reference/errors) |
| 构建 AI 服务 | [AI 应用](/docs/ai/building-ai-apps) | [权限](/docs/core/permissions) |
| 调用 OpenAI | [Deno + OpenAI](/docs/ai/openai) | [AI 应用](/docs/ai/building-ai-apps) |
| 构建 MCP 工具 | [MCP Server](/docs/ai/mcp-server) | [Agent 架构](/docs/ai/agent-loop) |
| 设计 Agent 循环 | [Agent 架构](/docs/ai/agent-loop) | [Agent 规则](/docs/ai/agent-rules) |
| 运行不可信 Agent 代码 | [Deno Sandbox](/docs/ai/sandbox) | [权限](/docs/core/permissions) |
| 发布服务 | [部署决策](/docs/deploy) | 目标平台官方文档 |

## 不变量

```md
- Do not replace the repository's package or task conventions before reading them.
- Do not grant -A to silence a permission error; identify the exact resource.
- Running TypeScript does not replace `deno check` in CI.
- Keep deno.lock unless the user explicitly approves dependency resolution changes.
- Verify current Deno, framework, and platform behavior from primary sources.
- Never print environment values or pass untrusted text through a shell command.
```

官方也提供面向 Agent 的 [deno.com/agents.md](https://deno.com/agents.md) 与 [denoland/skills](https://github.com/denoland/skills)。本站的规则更偏向任务路由，不替代官方技能。
