# @example/webshop-training - Doramagic AI Context Pack

> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。

## 充分原则

- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。
- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 @example/webshop-training 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。

## Claim 消费规则

- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。
- **事实最低状态**：`supported`
- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。
- `weak`：只能作为低置信度线索，必须要求用户继续核实。
- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。
- `unverified`：不得作为事实使用，应明确说证据不足。
- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。

## 它最适合谁

- **AI 研究者或研究型 Agent 构建者**：README 明确围绕研究、实验或论文工作流展开。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0003` supported 0.86

## 它能做什么

- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0001` supported 0.86

## 怎么开始

- `pip install agentlightning` 证据：`README.md` Claim：`clm_0004` supported 0.86
- `pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre agentlightning` 证据：`README.md` Claim：`clm_0005` supported 0.86

## 继续前判断卡

- **当前建议**：先做角色匹配试用
- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。

### 30 秒判断

- **现在怎么做**：先做角色匹配试用
- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入
- **先别相信**：角色质量和任务匹配不能直接相信。
- **继续会触碰**：角色选择偏差、命令执行、宿主 AI 配置

### 现在可以相信

- **适合人群线索：AI 研究者或研究型 Agent 构建者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0003` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0004` supported 0.86

### 现在还不能相信

- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。
- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`AGENTS.md`
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`AGENTS.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。
- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

- 解释项目适合谁和能做什么
- 基于项目文档演示典型对话流程
- 帮助用户判断是否值得安装或继续研究

## 哪些必须安装后验证

- 真实安装 Skill、插件或 CLI
- 执行脚本、修改本地文件或访问外部服务
- 验证真实输出质量、性能和兼容性

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0006` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0007` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。
- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。
- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。
- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。
- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。

### 任务路由

- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86

### 上下文规模

- 文件总数：569
- 重要文件覆盖：40/569
- 证据索引条目：80
- 角色 / Skill 条目：54

### 证据不足时的处理

- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。
- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。
- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。
- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。

## Prompt Recipes

### 适配判断

- 目标：判断这个项目是否适合用户当前任务。
- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。

```text
请基于 @example/webshop-training 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。
```

### 安装前体验

- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。
- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。

```text
请把 @example/webshop-training 当作安装前体验资产，而不是已安装工具或真实运行环境。

请严格输出四段：
1. 先问我 3 个必要问题。
2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。
3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。
4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。

硬性边界：
- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。
- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。
- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。
- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。
- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。
- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。

```

### 角色 / Skill 选择

- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。
- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。

```text
请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。
```

### 风险预检

- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。
- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。

```text
请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。
```

### 宿主 AI 开工指令

- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。
- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。

```text
请基于 @example/webshop-training 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```


## 角色 / Skill 索引

- 共索引 54 个角色 / Skill / 项目文档条目。

- **Contributing Guide**（project_doc）：Agent Lightning gets better every time someone files a clear bug, polishes docs, improves tests, or lands a new feature. This guide collects the expectations, checklists, and tips that help you go from “I have an idea” to “my pull request just merged.” 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/contributing.md`
- **Repository Guidelines**（project_doc）：Architecture Overview Agent Lightning runs through a continuous loop: runners and tracers emit spans, LightningStore agentlightning/store/ keeps them synchronized, and algorithms in agentlightning/algorithm/ consume those traces to improve behavior. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`
- **Agent Lightning⚡**（project_doc）：! Unit Tests https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml ! Documentation https://img.shields.io/badge/GitHub%20Pages-Documentation-blue https://microsoft.github.io/agent-lightning/ ! PyPI version https://badge.fury.io/py/agentlightning.svg https://badge.fury.io/py/agentlightning ! License https:/… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Contrib Area**（project_doc）：This tree hosts experimental integrations, third-party recipes, and curated recipes that are not ready for the main agentlightning/ , examples/ , or docs/ trees. Treat it as an incubator: keep contributions self-contained, clearly owned, and reproducible so downstream users can vendor them without guesswork. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`contrib/README.md`
- **Agent-lightning Dashboard**（project_doc）：This is the dashboard for Agent-lightning. It is a web application that allows you to inspect your Agent-lightning store and debug running experiments. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`dashboard/README.md`
- **⚡ Examples Catalog**（project_doc）：This catalog highlights the examples shipped with Agent-lightning. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/README.md`
- **Agent-OS Integration for Agent-Lightning**（project_doc）：Agent-OS Integration for Agent-Lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`contrib/recipes/agentos/README.md`
- **Example of AGL Environments**（project_doc）：This example implements agents across various environments within Agent Lightning. The example is designed to run on a single node with 8 GPUs, each having at least 40 GB of memory. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`contrib/recipes/envs/README.md`
- **Search-R1 Example**（project_doc）：This example implements Search R1 within Agent Lightning. It also serves as a demonstration of a framework-free agent training pipeline , showing how to run end-to-end RL training without relying on specialized frameworks. It's tested and compatible with Agent-lightning v0.2.x . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`contrib/recipes/search_r1/README.md`
- **WebShop Example**（project_doc）：This example demonstrates how to train a Vercel AI SDK agent on the WebShop benchmark using Agent Lightning with reinforcement learning VERL/GRPO . The training pipeline uses a headless TypeScript runner that executes agent rollouts and reports traces to the Agent Lightning coordinator. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`contrib/recipes/webshop/README.md`
- **APO Example**（project_doc）：! apo CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-apo.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-apo.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/apo/README.md`
- **Supervised Fine-tuning with Azure OpenAI**（project_doc）：Supervised Fine-tuning with Azure OpenAI 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/azure/README.md`
- **Calc-X Example**（project_doc）：! calc x CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-calc-x.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-calc-x.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/calc_x/README.md`
- **ChartQA Example**（project_doc）：! chartqa workflow status https://github.com/microsoft/agent-lightning/actions/workflows/badge-chartqa.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-chartqa.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/chartqa/README.md`
- **Training Claude Code with Agent-lightning**（project_doc）：Training Claude Code with Agent-lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/claude_code/README.md`
- **Minimal Component Showcase**（project_doc）：! minimal CI status https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/minimal/README.md`
- **RAG Agent Example**（project_doc）：! rag workflow status https://github.com/microsoft/agent-lightning/actions/workflows/examples-rag.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-rag.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/rag/README.md`
- **Spider Example**（project_doc）：! spider CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-spider.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-spider.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/spider/README.md`
- **Tinker + Agent-lightning Integration**（project_doc）：Tinker + Agent-lightning Integration 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/tinker/README.md`
- **Unsloth SFT Example**（project_doc）：! unsloth CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-unsloth.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-unsloth.yml 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/unsloth/README.md`
- **Changelog**（project_doc）：Agent-lightning v0.3.0 is a major release that introduces several new features and bug fixes. The release is a collaborative effort between Agent-lightning core teams and the community. Thanks to all the contributors who made this release possible. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/changelog.md`
- **Agent Lightning**（project_doc）：Agent Lightning is the absolute trainer to light up AI agents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/index.md`
- **APO**（project_doc）：You can use the shortcut agl.APO ... to create an APO instance. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/algorithm-zoo/apo.md`
- **Algorithm Zoo**（project_doc）：AgentLightning includes several popular and frequently requested algorithms in its built-in library, allowing agent developers to use them directly. These algorithms are designed to be compatible with most agent scenarios. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/algorithm-zoo/index.md`
- **VERL**（project_doc）：You can use the shortcut agl.VERL ... to create a VERL instance. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/algorithm-zoo/verl.md`
- **Maintainer Guide**（project_doc）：This guide describes the day-to-day responsibilities for Agent Lightning maintainers—how to bump versions, run release ceremonies, interact with CI, and backport fixes safely. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/community/maintainers.md`
- **The Bird's Eye View of Agent-lightning**（project_doc）：The Bird's Eye View of Agent-lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/deep-dive/birds-eye-view.md`
- **Serving LLMs under Agent-lightning**（project_doc）：Agent-lightning focuses on data, learning signals, and control flow — not on running model inference. This deep dive explains how to serve a model alongside Agent-lightning so runners can call it reliably, how the LLM Proxy fits into the loop, and why token IDs matter if you care about correctness in training and evaluation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/deep-dive/serving-llm.md`
- **Understanding Store**（project_doc）：The LightningStore agentlightning.LightningStore is the central coordination point for Agent-lightning. It holds the task queue, rollouts, attempts, spans, and versioned resources, and exposes a small API both Runners and Algorithms use to communicate. This document explains what's in the store, how statuses transition, how spans are recorded, and the concurrency model threads & processes . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/deep-dive/store.md`
- **Examples Catalog**（project_doc）：We welcome contributions to the examples catalog! Please refer to the Contributing ../community/contributing.md guide for more details. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/how-to/examples-catalog.md`
- **Train the First Agent with Agent-lightning**（project_doc）：Train the First Agent with Agent-lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/how-to/train-first-agent.md`
- **Train SQL Agent with Agent-lightning and VERL**（project_doc）：Train SQL Agent with Agent-lightning and VERL 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/how-to/train-sql-agent.md`
- **Fine-tune with Unsloth SFT**（project_doc）：Please make sure you have read Write the First Algorithm ./write-first-algorithm.md . Although that recipe is based on a simple prompt tuning algorithm, it introduces the core concepts of Agent-lightning and you should be familiar with them before proceeding. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/how-to/unsloth-sft.md`
- **Write the First Algorithm with Agent-lightning**（project_doc）：Write the First Algorithm with Agent-lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/how-to/write-first-algorithm.md`
- **Agent Developer APIs**（project_doc）：These are convenient helpers for creating agents from functions. First-time users are recommended to use these decorators to create agents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/agent.md`
- **Algorithm-side References**（project_doc）：This reference covers APIs that are designed to be used at "Algorithm Side". For built-in algorithms, see Algorithm Zoo ../algorithm-zoo/index.md . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/algorithm.md`
- **Command Line Interface**（project_doc）：This document is a work in progress and might not be updated with the latest changes. Try to use agl -h to get the latest help message. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/cli.md`
- **Instrumentation API**（project_doc）：::: agentlightning.instrumentation.instrument all 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/instrumentation.md`
- **Internal API References**（project_doc）：The following APIs should be used with extra caution because they are very likely to change in the future. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/internal.md`
- **RESTful API References**（project_doc）：Shown in the following is the RESTful API for Lightning Store. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/restful.md`
- **Runner-side References**（project_doc）：This reference covers APIs that are designed to be used at "Runner Side". 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/runner.md`
- **Semantic Conventions**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/semconv.md`
- **Store References**（project_doc）：::: agentlightning.LightningStoreCapabilities 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/store.md`
- **Agent-lightning Trainer**（project_doc）：::: agentlightning.ExecutionStrategy 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/trainer.md`
- **Type References**（project_doc）：::: agentlightning.RolloutRawResult 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/types.md`
- **Utility References**（project_doc）：::: agentlightning.utils.id.generate id 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/reference/utilities.md`
- **Debugging and Troubleshooting**（project_doc）：When you train your own agent with Agent-lightning, most failures surface because the agent logic is brittle or simply incorrect. Debugging becomes easier when you peel back the stack: start by driving the rollout logic on its own, dry-run the trainer loop, and only then bring the full algorithm and runner topology online. The examples/apo/apo debug.py {{ src "examples/apo/apo debug.py" }} script demonstrates these… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/debug.md`
- **Using Emitters**（project_doc）：While returning a single float for the final reward is sufficient for many algorithm-agent combinations, some advanced scenarios require richer feedback. For instance, an algorithm might learn more effectively if it receives intermediate rewards throughout a multi-step task, or if the agent needs to emit additional spans for debugging or analysis. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/emitter.md`
- **Installation Guide**（project_doc）：This guide explains how to install Agent-Lightning . You can install it from PyPI the Python Package Index for general use or directly from the source code if you plan to contribute or need fine-grained control over dependencies. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/installation.md`
- **Scaling out Agent-lightning**（project_doc）：Agent-lightning splits training into an algorithm bundle and a runner bundle that exchange work through the LightningStore agentlightning.LightningStore . This tutorial shows how to increase rollout throughput, place bundles across processes or machines, and keep the algorithm side scalable with external frameworks. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/parallelize.md`
- **Working with Traces**（project_doc）：Tracing is the secret capability that lets Agent-lightning train almost any agent without rewriting its core logic. The idea was born in observability tooling inside LLMOps workflows and, in Agent-lightning, evolved into a first-class primitive inside the learning loop. Beyond helping you understand what happened inside a rollout, traces provide reward spans and other learning signals that power reinforcement learni… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/traces.md`
- **Writing Agents**（project_doc）：This tutorial will focus on the heart of the system: the agent itself, guiding you through the different ways to define an agent's logic in Agent-lightning. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/tutorials/write-agents.md`
- **Responsible AI Transparency Documentation - Agent Lightning**（project_doc）：Responsible AI Transparency Documentation - Agent Lightning 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`RAI_README.md`
- **Security**（project_doc）：Microsoft takes the security of our software products and services seriously, which includes all source code repositories in our GitHub organizations. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`

## 证据索引

- 共索引 80 条证据。

- **Contributing Guide**（documentation）：Agent Lightning gets better every time someone files a clear bug, polishes docs, improves tests, or lands a new feature. This guide collects the expectations, checklists, and tips that help you go from “I have an idea” to “my pull request just merged.” 证据：`docs/community/contributing.md`
- **Repository Guidelines**（documentation）：Architecture Overview Agent Lightning runs through a continuous loop: runners and tracers emit spans, LightningStore agentlightning/store/ keeps them synchronized, and algorithms in agentlightning/algorithm/ consume those traces to improve behavior. 证据：`AGENTS.md`
- **Agent Lightning⚡**（documentation）：! Unit Tests https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml ! Documentation https://img.shields.io/badge/GitHub%20Pages-Documentation-blue https://microsoft.github.io/agent-lightning/ ! PyPI version https://badge.fury.io/py/agentlightning.svg https://badge.fury.io/py/agentlightning ! License https://img.shields.io/badge/license-MIT-blue.svg LICENSE ! Ask DeepWiki https://deepwiki.com/badge.svg https://deepwiki.com/microsoft/agent-lightning ! Discord https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white https://discord.gg/RYk7CdvDR7 证据：`README.md`
- **Contrib Area**（documentation）：This tree hosts experimental integrations, third-party recipes, and curated recipes that are not ready for the main agentlightning/ , examples/ , or docs/ trees. Treat it as an incubator: keep contributions self-contained, clearly owned, and reproducible so downstream users can vendor them without guesswork. 证据：`contrib/README.md`
- **Agent-lightning Dashboard**（documentation）：This is the dashboard for Agent-lightning. It is a web application that allows you to inspect your Agent-lightning store and debug running experiments. 证据：`dashboard/README.md`
- **⚡ Examples Catalog**（documentation）：This catalog highlights the examples shipped with Agent-lightning. 证据：`examples/README.md`
- **Agent-OS Integration for Agent-Lightning**（documentation）：Agent-OS Integration for Agent-Lightning 证据：`contrib/recipes/agentos/README.md`
- **Example of AGL Environments**（documentation）：This example implements agents across various environments within Agent Lightning. The example is designed to run on a single node with 8 GPUs, each having at least 40 GB of memory. 证据：`contrib/recipes/envs/README.md`
- **Search-R1 Example**（documentation）：This example implements Search R1 within Agent Lightning. It also serves as a demonstration of a framework-free agent training pipeline , showing how to run end-to-end RL training without relying on specialized frameworks. It's tested and compatible with Agent-lightning v0.2.x . 证据：`contrib/recipes/search_r1/README.md`
- **WebShop Example**（documentation）：This example demonstrates how to train a Vercel AI SDK agent on the WebShop benchmark using Agent Lightning with reinforcement learning VERL/GRPO . The training pipeline uses a headless TypeScript runner that executes agent rollouts and reports traces to the Agent Lightning coordinator. 证据：`contrib/recipes/webshop/README.md`
- **APO Example**（documentation）：! apo CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-apo.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-apo.yml 证据：`examples/apo/README.md`
- **Supervised Fine-tuning with Azure OpenAI**（documentation）：Supervised Fine-tuning with Azure OpenAI 证据：`examples/azure/README.md`
- **Calc-X Example**（documentation）：! calc x CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-calc-x.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-calc-x.yml 证据：`examples/calc_x/README.md`
- **ChartQA Example**（documentation）：! chartqa workflow status https://github.com/microsoft/agent-lightning/actions/workflows/badge-chartqa.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-chartqa.yml 证据：`examples/chartqa/README.md`
- **Training Claude Code with Agent-lightning**（documentation）：Training Claude Code with Agent-lightning 证据：`examples/claude_code/README.md`
- **Minimal Component Showcase**（documentation）：! minimal CI status https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/badge-unit.yml 证据：`examples/minimal/README.md`
- **RAG Agent Example**（documentation）：! rag workflow status https://github.com/microsoft/agent-lightning/actions/workflows/examples-rag.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-rag.yml 证据：`examples/rag/README.md`
- **Spider Example**（documentation）：! spider CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-spider.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-spider.yml 证据：`examples/spider/README.md`
- **Tinker + Agent-lightning Integration**（documentation）：Tinker + Agent-lightning Integration 证据：`examples/tinker/README.md`
- **Unsloth SFT Example**（documentation）：! unsloth CI status https://github.com/microsoft/agent-lightning/actions/workflows/examples-unsloth.yml/badge.svg https://github.com/microsoft/agent-lightning/actions/workflows/examples-unsloth.yml 证据：`examples/unsloth/README.md`
- **Package**（package_manifest）：{ "name": "agent-lightning-dashboard", "type": "module", "version": "0.3.1", "scripts": { "dev": "vite", "build": "tsc && vite build", "preview": "vite preview", "typecheck": "tsc --noEmit", "eslint": "eslint .", "stylelint": "stylelint ' / .css'", "prettier": "prettier --check \" / .{ts,tsx,mjs,cjs}\"", "vitest": "vitest run --project unit", "vitest-storybook": "vitest run --project storybook", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "chromatic": "chromatic" }, "dependencies": { "@mantine/core": "8.3.5", "@mantine/hooks": "8.3.5", "@monaco-editor/react": "^4.7.0", "@reduxjs/toolkit": "^2.9.2", "@tabler/icons-react": "^3.35.0", "clsx": "^2.1.1", "dayjs":… 证据：`dashboard/package.json`
- **Package**（package_manifest）：{ "name": "@example/webshop-training", "version": "0.0.0", "private": true, "scripts": { "build:headless": "tsup scripts/headless-runner.ts --format cjs --out-dir dist --clean", "headless": "node dist/headless-runner.js" }, "dependencies": { "@ai-sdk/openai": "3.0.0-beta.89", "@opentelemetry/api": "^1.9.0", "@opentelemetry/context-async-hooks": "^1.30.0", "@opentelemetry/exporter-trace-otlp-proto": "^0.57.0", "@opentelemetry/resources": "^1.30.0", "@opentelemetry/sdk-trace-base": "^1.30.0", "@opentelemetry/semantic-conventions": "^1.30.0", "ai": "6.0.0-beta.139", "zod": "3.25.76" }, "devDependencies": { "@types/node": "20.17.24", "tsup": "^8.0.0", "tsx": "^4.19.0", "typescript": "5.8.3" } } 证据：`contrib/recipes/webshop/package.json`
- **License**（source_file）：Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 证据：`LICENSE`
- **Changelog**（documentation）：Agent-lightning v0.3.0 is a major release that introduces several new features and bug fixes. The release is a collaborative effort between Agent-lightning core teams and the community. Thanks to all the contributors who made this release possible. 证据：`docs/changelog.md`
- **Agent Lightning**（documentation）：Agent Lightning is the absolute trainer to light up AI agents. 证据：`docs/index.md`
- **APO**（documentation）：You can use the shortcut agl.APO ... to create an APO instance. 证据：`docs/algorithm-zoo/apo.md`
- **Algorithm Zoo**（documentation）：AgentLightning includes several popular and frequently requested algorithms in its built-in library, allowing agent developers to use them directly. These algorithms are designed to be compatible with most agent scenarios. 证据：`docs/algorithm-zoo/index.md`
- **VERL**（documentation）：You can use the shortcut agl.VERL ... to create a VERL instance. 证据：`docs/algorithm-zoo/verl.md`
- **Maintainer Guide**（documentation）：This guide describes the day-to-day responsibilities for Agent Lightning maintainers—how to bump versions, run release ceremonies, interact with CI, and backport fixes safely. 证据：`docs/community/maintainers.md`
- **The Bird's Eye View of Agent-lightning**（documentation）：The Bird's Eye View of Agent-lightning 证据：`docs/deep-dive/birds-eye-view.md`
- **Serving LLMs under Agent-lightning**（documentation）：Agent-lightning focuses on data, learning signals, and control flow — not on running model inference. This deep dive explains how to serve a model alongside Agent-lightning so runners can call it reliably, how the LLM Proxy fits into the loop, and why token IDs matter if you care about correctness in training and evaluation. 证据：`docs/deep-dive/serving-llm.md`
- **Understanding Store**（documentation）：The LightningStore agentlightning.LightningStore is the central coordination point for Agent-lightning. It holds the task queue, rollouts, attempts, spans, and versioned resources, and exposes a small API both Runners and Algorithms use to communicate. This document explains what's in the store, how statuses transition, how spans are recorded, and the concurrency model threads & processes . 证据：`docs/deep-dive/store.md`
- **Examples Catalog**（documentation）：We welcome contributions to the examples catalog! Please refer to the Contributing ../community/contributing.md guide for more details. 证据：`docs/how-to/examples-catalog.md`
- **Train the First Agent with Agent-lightning**（documentation）：Train the First Agent with Agent-lightning 证据：`docs/how-to/train-first-agent.md`
- **Train SQL Agent with Agent-lightning and VERL**（documentation）：Train SQL Agent with Agent-lightning and VERL 证据：`docs/how-to/train-sql-agent.md`
- **Fine-tune with Unsloth SFT**（documentation）：Please make sure you have read Write the First Algorithm ./write-first-algorithm.md . Although that recipe is based on a simple prompt tuning algorithm, it introduces the core concepts of Agent-lightning and you should be familiar with them before proceeding. 证据：`docs/how-to/unsloth-sft.md`
- **Write the First Algorithm with Agent-lightning**（documentation）：Write the First Algorithm with Agent-lightning 证据：`docs/how-to/write-first-algorithm.md`
- **Agent Developer APIs**（documentation）：These are convenient helpers for creating agents from functions. First-time users are recommended to use these decorators to create agents. 证据：`docs/reference/agent.md`
- **Algorithm-side References**（documentation）：This reference covers APIs that are designed to be used at "Algorithm Side". For built-in algorithms, see Algorithm Zoo ../algorithm-zoo/index.md . 证据：`docs/reference/algorithm.md`
- **Command Line Interface**（documentation）：This document is a work in progress and might not be updated with the latest changes. Try to use agl -h to get the latest help message. 证据：`docs/reference/cli.md`
- **Instrumentation API**（documentation）：::: agentlightning.instrumentation.instrument all 证据：`docs/reference/instrumentation.md`
- **Internal API References**（documentation）：The following APIs should be used with extra caution because they are very likely to change in the future. 证据：`docs/reference/internal.md`
- **RESTful API References**（documentation）：Shown in the following is the RESTful API for Lightning Store. 证据：`docs/reference/restful.md`
- **Runner-side References**（documentation）：This reference covers APIs that are designed to be used at "Runner Side". 证据：`docs/reference/runner.md`
- **Semantic Conventions**（documentation）：Semantic Conventions ::: agentlightning.semconv 证据：`docs/reference/semconv.md`
- **Store References**（documentation）：::: agentlightning.LightningStoreCapabilities 证据：`docs/reference/store.md`
- **Agent-lightning Trainer**（documentation）：::: agentlightning.ExecutionStrategy 证据：`docs/reference/trainer.md`
- **Type References**（documentation）：::: agentlightning.RolloutRawResult 证据：`docs/reference/types.md`
- **Utility References**（documentation）：::: agentlightning.utils.id.generate id 证据：`docs/reference/utilities.md`
- **Debugging and Troubleshooting**（documentation）：When you train your own agent with Agent-lightning, most failures surface because the agent logic is brittle or simply incorrect. Debugging becomes easier when you peel back the stack: start by driving the rollout logic on its own, dry-run the trainer loop, and only then bring the full algorithm and runner topology online. The examples/apo/apo debug.py {{ src "examples/apo/apo debug.py" }} script demonstrates these techniques; this guide expands on each approach and helps you decide when to reach for them. 证据：`docs/tutorials/debug.md`
- **Using Emitters**（documentation）：While returning a single float for the final reward is sufficient for many algorithm-agent combinations, some advanced scenarios require richer feedback. For instance, an algorithm might learn more effectively if it receives intermediate rewards throughout a multi-step task, or if the agent needs to emit additional spans for debugging or analysis. 证据：`docs/tutorials/emitter.md`
- **Installation Guide**（documentation）：This guide explains how to install Agent-Lightning . You can install it from PyPI the Python Package Index for general use or directly from the source code if you plan to contribute or need fine-grained control over dependencies. 证据：`docs/tutorials/installation.md`
- **Scaling out Agent-lightning**（documentation）：Agent-lightning splits training into an algorithm bundle and a runner bundle that exchange work through the LightningStore agentlightning.LightningStore . This tutorial shows how to increase rollout throughput, place bundles across processes or machines, and keep the algorithm side scalable with external frameworks. 证据：`docs/tutorials/parallelize.md`
- **Working with Traces**（documentation）：Tracing is the secret capability that lets Agent-lightning train almost any agent without rewriting its core logic. The idea was born in observability tooling inside LLMOps workflows and, in Agent-lightning, evolved into a first-class primitive inside the learning loop. Beyond helping you understand what happened inside a rollout, traces provide reward spans and other learning signals that power reinforcement learning and fine-tuning algorithms. 证据：`docs/tutorials/traces.md`
- **Writing Agents**（documentation）：This tutorial will focus on the heart of the system: the agent itself, guiding you through the different ways to define an agent's logic in Agent-lightning. 证据：`docs/tutorials/write-agents.md`
- **Responsible AI Transparency Documentation - Agent Lightning**（documentation）：Responsible AI Transparency Documentation - Agent Lightning 证据：`RAI_README.md`
- **Security**（documentation）：Microsoft takes the security of our software products and services seriously, which includes all source code repositories in our GitHub organizations. 证据：`SECURITY.md`
- **.Stylelintrc**（structured_config）：{ "extends": "stylelint-config-standard-scss" , "rules": { "custom-property-pattern": null, "selector-class-pattern": null, "scss/no-duplicate-mixins": null, "declaration-empty-line-before": null, "declaration-block-no-redundant-longhand-properties": null, "alpha-value-notation": null, "custom-property-empty-line-before": null, "property-no-vendor-prefix": null, "color-function-notation": null, "length-zero-no-unit": null, "selector-not-notation": null, "no-descending-specificity": null, "comment-empty-line-before": null, "scss/at-mixin-pattern": null, "scss/at-rule-no-unknown": null, "value-keyword-case": null, "media-feature-range-notation": null, "selector-pseudo-class-no-unknown": true,… 证据：`dashboard/.stylelintrc.json`
- **Tsconfig**（structured_config）：{ "compilerOptions": { "types": "node", "@testing-library/jest-dom", "vitest/globals" , "target": "ESNext", "useDefineForClassFields": true, "lib": "DOM", "DOM.Iterable", "ESNext" , "allowJs": false, "skipLibCheck": true, "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "paths": { "@/ ": "./src/ " , "@test-utils": "./test-utils" } }, "include": "src", "public", "test-utils", ".storybook/main.ts", ".storybook/preview.tsx", ".storybook/modes.ts", ".storybook/constants.ts", ".storybook/vi… 证据：`dashboard/tsconfig.json`
- **Pyrightconfig.Fast**（structured_config）：{ "include": "agentlightning" , "exclude": " /data", " /assets", "agentlightning/verl", "agentlightning/instrumentation", "agentlightning/algorithm/apo", "agentlightning/algorithm/verl", "agentlightning/cli/vllm.py", "agentlightning/store/collection/mongo.py", "agentlightning/store/mongo.py", "agentlightning/tracer/weave.py", "contrib/ " , 证据：`pyrightconfig.fast.json`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

## 宿主 AI 必须遵守的规则

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`docs/community/contributing.md`, `AGENTS.md`, `README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`docs/community/contributing.md`, `AGENTS.md`, `README.md`

## 用户开工前应该回答的问题

- 你准备在哪个宿主 AI 或本地环境中使用它？
- 你只是想先体验工作流，还是准备真实安装？
- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？

## 验收标准

- 所有能力声明都能回指到 evidence_refs 中的文件路径。
- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。
- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。

---

## Doramagic Context Augmentation

The following material strengthens the Repomix/AI Context Pack body. Human Manual is only a reading skeleton; pitfall logs become hard operating constraints for the host AI.

## Human Manual Skeleton

Usage rule: this is only a reading path and salience signal, not factual authority. Concrete facts must still come from repo evidence / Claim Graph.

Hard rules for the host AI:
- Do not treat page titles, order, summaries, or importance as project facts.
- When explaining the Human Manual skeleton, state that it is only a reading path / salience signal.
- Capability, installation, compatibility, runtime status, and risk judgments must cite repo evidence, source paths, or Claim Graph.

- **Introduction to Agent Lightning**：importance `high`
  - source_paths: README.md, agentlightning/__init__.py
- **Installation Guide**：importance `high`
  - source_paths: docs/tutorials/installation.md, pyproject.toml
- **System Architecture**：importance `high`
  - source_paths: docs/deep-dive/birds-eye-view.md, agentlightning/trainer/trainer.py, agentlightning/store/base.py
- **Core Abstractions and Data Models**：importance `high`
  - source_paths: agentlightning/types/core.py, agentlightning/types/resources.py, agentlightning/types/tracer.py
- **Tutorial: Train Your First Agent**：importance `high`
  - source_paths: docs/how-to/train-first-agent.md, examples/apo/room_selector_apo.py, examples/apo/room_selector.py
- **Tutorial: Writing Agents**：importance `high`
  - source_paths: docs/tutorials/write-agents.md, agentlightning/litagent/litagent.py, agentlightning/litagent/decorator.py
- **Trainer Component**：importance `high`
  - source_paths: agentlightning/trainer/trainer.py, agentlightning/trainer/registry.py, agentlightning/trainer/init_utils.py
- **Runner Component**：importance `high`
  - source_paths: agentlightning/runner/base.py, agentlightning/runner/agent.py, agentlightning/runner/legacy.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `0b40cb724a0ad4f944810f8514884051777bb38b`
- inspected_files: `pyproject.toml`, `README.md`, `uv.lock`, `docs/index.md`, `docs/changelog.md`, `docs/how-to/examples-catalog.md`, `docs/how-to/train-first-agent.md`, `docs/how-to/write-first-algorithm.md`, `docs/how-to/unsloth-sft.md`, `docs/how-to/train-sql-agent.md`, `docs/reference/algorithm.md`, `docs/reference/cli.md`, `docs/reference/store.md`, `docs/reference/agent.md`, `docs/reference/utilities.md`, `docs/reference/restful.md`, `docs/reference/instrumentation.md`, `docs/reference/internal.md`, `docs/reference/runner.md`, `docs/reference/types.md`

Hard rules for the host AI:
- Without repo_clone_verified=true, do not claim the source code has been read.
- Without repo_inspection_verified=true, do not turn README/docs/package observations into facts.
- Without quick_start_verified=true, do not claim the Quick Start has been successfully run.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation pitfalls. The host AI must treat them as operating constraints, not general background notes.

### Constraint 1: 能力判断依赖假设

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: 将假设转成下游验证清单。
- Why it matters: 假设不成立时，用户拿不到承诺的能力。
- Evidence: capability.assumptions | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | README/documentation is current enough for a first validation pass.
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 2: 维护活跃度未知

- Trigger: 未记录 last_activity_observed。
- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。
- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- Evidence: evidence.maintainer_signals | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | last_activity_observed missing
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 3: 下游验证发现风险项

- Trigger: no_demo
- Host AI rule: 进入安全/权限治理复核队列。
- Why it matters: 下游已经要求复核，不能在页面中弱化。
- Evidence: downstream_validation.risk_items | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | no_demo; severity=medium
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 4: 存在安全注意事项

- Trigger: No sandbox install has been executed yet; downstream must verify before user use.
- Host AI rule: 转成明确权限清单和安全审查提示。
- Why it matters: 用户安装前需要知道权限边界和敏感操作。
- Evidence: risks.safety_notes | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | No sandbox install has been executed yet; downstream must verify before user use.
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 5: 存在评分风险

- Trigger: no_demo
- Host AI rule: 把风险写入边界卡，并确认是否需要人工复核。
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | no_demo; severity=medium
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 6: issue/PR 响应质量未知

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | issue_or_pr_quality=unknown
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.

### Constraint 7: 发布节奏不明确

- Trigger: release_recency=unknown。
- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。
- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。
- Evidence: evidence.maintainer_signals | art_9b504779cfa046a894eeb7c9d3a298c6 | https://github.com/microsoft/agent-lightning#readme | release_recency=unknown
- Hard boundary: do not present this pitfall as solved, verified, or safe to ignore unless later validation evidence explicitly closes it.
