# pr-agent - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

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

## 怎么开始

- `pip install pr-agent` 证据：`README.md` Claim：`clm_0003` supported 0.86

## 继续前判断卡

- **当前建议**：需要管理员/安全审批
- **为什么**：继续前可能涉及密钥、账号、外部服务或敏感上下文，建议先经过管理员或安全审批。

### 30 秒判断

- **现在怎么做**：需要管理员/安全审批
- **最小安全下一步**：先跑 Prompt Preview；若涉及凭证或企业环境，先审批再试装
- **先别相信**：角色质量和任务匹配不能直接相信。
- **继续会触碰**：角色选择偏差、命令执行、宿主 AI 配置

### 现在可以相信

- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` 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`
- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`README.md`, `docs/docs/installation/github.md`, `docs/docs/tools/help_docs.md`, `docs/docs/usage-guide/automations_and_usage.md` 等
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

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

### 退出方式

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

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0004` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0005` 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

### 上下文规模

- 文件总数：226
- 重要文件覆盖：40/226
- 证据索引条目：73
- 角色 / Skill 条目：46

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

请严格输出四段：
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
请基于 pr-agent 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。
```


## 角色 / Skill 索引

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

- **Visit Our Docs Portal https://qodo-merge-docs.qodo.ai/**（project_doc）：Visit Our Docs Portal https://qodo-merge-docs.qodo.ai/ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/README.md`
- **Repository Guidelines**（project_doc）：- Do match the interpreter requirement declared in pyproject.toml Python ≥ 3.12 and install requirements.txt plus requirements-dev.txt before running tools. - Do run tests with PYTHONPATH=. set to keep imports functional for example PYTHONPATH=. ./.venv/bin/pytest tests/unittest/test fix json escape char.py -q . - Do adjust configuration through .pr agent.toml or files under pr agent/settings/ instead of hard-coding… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`
- **Big News for PR-Agent**（project_doc）：The Original Open-Source PR Reviewer 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Contributing to PR-Agent**（project_doc）：Thank you for your interest in contributing to the PR-Agent project! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Overview**（project_doc）：Supported Git Platforms: GitHub, GitLab, Bitbucket 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/compression_strategy.md`
- **Introduction**（project_doc）：Supported Git Platforms: GitHub, GitLab, Bitbucket 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/dynamic_context.md`
- **Fetching Ticket Context for PRs**（project_doc）：Supported Git Platforms: GitHub, GitLab, Bitbucket 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/fetching_ticket_context.md`
- **Core Abilities**（project_doc）：PR-Agent utilizes a variety of core abilities to provide a comprehensive and efficient code review experience. These abilities include: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/index.md`
- **Interactivity**（project_doc）：Supported Git Platforms: GitHub, GitLab 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/interactivity.md`
- **Local and global metadata injection with multi-stage analysis**（project_doc）：Local and global metadata injection with multi-stage analysis 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/metadata.md`
- **Introduction - Efficient Review with Hierarchical Presentation**（project_doc）：Supported Git Platforms: GitHub, GitLab, Bitbucket 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/core-abilities/self_reflection.md`
- **FAQ**（project_doc）：??? note "Q: Can PR-Agent serve as a substitute for a human reviewer?" Answer: 1 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/faq/index.md`
- **Overview**（project_doc）：PR-Agent https://github.com/the-pr-agent/pr-agent is an open-source, AI-powered code review agent and a community-maintained legacy project of Qodo. It is distinct from Qodo's primary AI code review offering, which provides a feature-rich, context-aware experience. Qodo now offers a free tier that integrates seamlessly with GitHub, GitLab, Bitbucket, and Azure DevOps for high-quality automated reviews. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/index.md`
- **Azure DevOps Pipeline**（project_doc）：You can use a pre-built Action Docker image to run PR-Agent as an Azure DevOps pipeline. Add the following file to your repository under azure-pipelines.yml : 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/azure.md`
- **Run as a Bitbucket Pipeline**（project_doc）：You can use the Bitbucket Pipeline system to run PR-Agent on every pull request open or update. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/bitbucket.md`
- **Run a Gitea webhook server**（project_doc）：1. In Gitea create a new user and give it "Reporter" role for the intended group or project. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/gitea.md`
- **Run as a GitHub Action**（project_doc）：In this page we will cover how to install and run PR-Agent as a GitHub Action or GitHub App, and how to configure it for your needs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/github.md`
- **Run as a GitLab Pipeline**（project_doc）：You can use a pre-built Action Docker image to run PR-Agent as a GitLab pipeline. This is a simple way to get started with PR-Agent without setting up your own server. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/gitlab.md`
- **Installation**（project_doc）：There are several ways to use PR-Agent: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/index.md`
- **Using Docker image**（project_doc）：To run PR-Agent locally, you first need to acquire two keys: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/locally.md`
- **PR-Agent Installation Guide**（project_doc）：PR-Agent can be deployed in various environments and platforms. Choose the installation method that best suits your needs: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/installation/pr_agent.md`
- **Self-hosted PR-Agent**（project_doc）：- If you self-host PR-Agent with your OpenAI or other LLM provider API key, it is between you and the provider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/overview/data_privacy.md`
- **Table of contents**（project_doc）：Overview index.md Data Privacy overview/data privacy.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/summary.md`
- **Overview**（project_doc）：The add docs tool scans the PR code changes and suggests documentation for any code components that are missing documentation, such as functions, classes, and methods. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/add_docs.md`
- **Overview**（project_doc）：The ask tool answers questions about the PR, based on the PR code changes. Make sure to be specific and clear in your questions. It can be invoked manually by commenting on any PR: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/ask.md`
- **Overview**（project_doc）：The describe tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/describe.md`
- **Overview**（project_doc）：The generate labels tool scans the PR code changes and generates custom labels for the PR based on the content and context of the changes. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/generate_labels.md`
- **Overview**（project_doc）：The help tool provides a list of all the available tools and their descriptions. For PR-Agent users, it also enables to trigger each tool by checking the relevant box. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/help.md`
- **Overview**（project_doc）：The help docs tool can answer a free-text question based on a git documentation folder. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/help_docs.md`
- **Overview**（project_doc）：The improve tool scans the PR code changes, and automatically generates meaningful suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened ../usage-guide/automations and usage.md github-app-automatic-tools-when-a-new-pr-is-opened , or it can be invoked manually by commenting on any PR: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/improve.md`
- **Tools**（project_doc）：Here is a list of PR-Agent tools, each with a dedicated page that explains how to use it: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/index.md`
- **Overview**（project_doc）：The review tool scans the PR code changes, and generates feedback about the PR, aiming to aid the reviewing process. The tool can be triggered automatically every time a new PR is opened ../usage-guide/automations and usage.md github-app-automatic-tools-when-a-new-pr-is-opened , or can be invoked manually by commenting on any PR: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/review.md`
- **Overview**（project_doc）：The similar issue tool retrieves the most similar issues to the current issue. It can be invoked manually by commenting on any PR: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/similar_issues.md`
- **Overview**（project_doc）：The update changelog tool automatically updates the CHANGELOG.md file with the PR changes. It can be invoked manually by commenting on any PR: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/tools/update_changelog.md`
- **Recommend Python Best Practices**（project_doc）：This document outlines a series of recommended best practices for Python development. These guidelines aim to improve code quality, maintainability, and readability. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md`
- **Show possible configurations**（project_doc）：The possible configurations of PR-Agent are stored in here https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/settings/configuration.toml {:target=" blank"}. In the tools ../tools/index.md page you can find explanations on how to use these configurations for each tool. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/additional_configurations.md`
- **Local repo CLI**（project_doc）：When running from your locally cloned PR-Agent repo CLI , your local configuration file will be used. Examples of invoking the different tools via the CLI: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/automations_and_usage.md`
- **Changing a model in PR-Agent**（project_doc）：See here https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/algo/ init .py for a list of supported models in PR-Agent. The default model of PR-Agent is GPT-5 from OpenAI. To use a different model than the default, you need to edit in the configuration file https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/settings/configuration.toml L7 the fields: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/changing_a_model.md`
- **Wiki configuration file**（project_doc）：The different tools and sub-tools used by PR-Agent are adjustable via a Git configuration file. There are three main ways to set persistent configurations: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/configuration_options.md`
- **Usage guide**（project_doc）：This section provides a detailed guide on how to use PR-Agent. It includes information on how to adjust PR-Agent configurations, define which tools will run automatically, and other advanced configurations. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/index.md`
- **Introduction**（project_doc）：After installation ../installation/index.md , there are three basic ways to invoke PR-Agent: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/introduction.md`
- **Mail Notifications**（project_doc）：Unfortunately, it is not possible in GitHub to disable mail notifications from a specific user. If you are subscribed to notifications for a repo with PR-Agent, we recommend turning off notifications for PR comments, to avoid lengthy emails: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/docs/usage-guide/mail_notifications.md`
- **2023-08-03**（project_doc）：- Optimized PR diff processing by introducing caching for diff files, reducing the number of API calls. - Refactored load large diff function to generate a patch only when necessary. - Fixed a bug in the GitLab provider where the new file was not retrieved correctly. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Contributor Code of Conduct**（project_doc）：As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CODE_OF_CONDUCT.md`
- **Version 0.11 - 2023-12-07**（project_doc）：- codiumai/pr-agent:0.11 - codiumai/pr-agent:0.11-github app - codiumai/pr-agent:0.11-bitbucket-app - codiumai/pr-agent:0.11-gitlab webhook - codiumai/pr-agent:0.11-github polling - codiumai/pr-agent:0.11-github action 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`RELEASE_NOTES.md`
- **Security Policy**（project_doc）：PR-Agent is an open-source tool to help efficiently review and handle pull requests. Qodo Merge is a paid version of PR-Agent, designed for companies and teams that require additional features and capabilities. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`

## 证据索引

- 共索引 73 条证据。

- **Visit Our Docs Portal https://qodo-merge-docs.qodo.ai/**（documentation）：Visit Our Docs Portal https://qodo-merge-docs.qodo.ai/ 证据：`docs/README.md`
- **Repository Guidelines**（documentation）：- Do match the interpreter requirement declared in pyproject.toml Python ≥ 3.12 and install requirements.txt plus requirements-dev.txt before running tools. - Do run tests with PYTHONPATH=. set to keep imports functional for example PYTHONPATH=. ./.venv/bin/pytest tests/unittest/test fix json escape char.py -q . - Do adjust configuration through .pr agent.toml or files under pr agent/settings/ instead of hard-coding values. - Don’t commit secrets or access tokens; rely on environment variables as shown in the health and e2e tests. - Don’t reformat or reorder files globally; match existing 120-character lines, import ordering, and docstring style. - Don’t delete or rename configuration, prom… 证据：`AGENTS.md`
- **Big News for PR-Agent**（documentation）：The Original Open-Source PR Reviewer 证据：`README.md`
- **Contributing to PR-Agent**（documentation）：Thank you for your interest in contributing to the PR-Agent project! 证据：`CONTRIBUTING.md`
- **License**（source_file）：GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 证据：`LICENSE`
- **Overview**（documentation）：Supported Git Platforms: GitHub, GitLab, Bitbucket 证据：`docs/docs/core-abilities/compression_strategy.md`
- **Introduction**（documentation）：Supported Git Platforms: GitHub, GitLab, Bitbucket 证据：`docs/docs/core-abilities/dynamic_context.md`
- **Fetching Ticket Context for PRs**（documentation）：Supported Git Platforms: GitHub, GitLab, Bitbucket 证据：`docs/docs/core-abilities/fetching_ticket_context.md`
- **Core Abilities**（documentation）：PR-Agent utilizes a variety of core abilities to provide a comprehensive and efficient code review experience. These abilities include: 证据：`docs/docs/core-abilities/index.md`
- **Interactivity**（documentation）：Supported Git Platforms: GitHub, GitLab 证据：`docs/docs/core-abilities/interactivity.md`
- **Local and global metadata injection with multi-stage analysis**（documentation）：Local and global metadata injection with multi-stage analysis 证据：`docs/docs/core-abilities/metadata.md`
- **Introduction - Efficient Review with Hierarchical Presentation**（documentation）：Supported Git Platforms: GitHub, GitLab, Bitbucket 证据：`docs/docs/core-abilities/self_reflection.md`
- **FAQ**（documentation）：??? note "Q: Can PR-Agent serve as a substitute for a human reviewer?" Answer: 1 证据：`docs/docs/faq/index.md`
- **Overview**（documentation）：PR-Agent https://github.com/the-pr-agent/pr-agent is an open-source, AI-powered code review agent and a community-maintained legacy project of Qodo. It is distinct from Qodo's primary AI code review offering, which provides a feature-rich, context-aware experience. Qodo now offers a free tier that integrates seamlessly with GitHub, GitLab, Bitbucket, and Azure DevOps for high-quality automated reviews. 证据：`docs/docs/index.md`
- **Azure DevOps Pipeline**（documentation）：You can use a pre-built Action Docker image to run PR-Agent as an Azure DevOps pipeline. Add the following file to your repository under azure-pipelines.yml : 证据：`docs/docs/installation/azure.md`
- **Run as a Bitbucket Pipeline**（documentation）：You can use the Bitbucket Pipeline system to run PR-Agent on every pull request open or update. 证据：`docs/docs/installation/bitbucket.md`
- **Run a Gitea webhook server**（documentation）：1. In Gitea create a new user and give it "Reporter" role for the intended group or project. 证据：`docs/docs/installation/gitea.md`
- **Run as a GitHub Action**（documentation）：In this page we will cover how to install and run PR-Agent as a GitHub Action or GitHub App, and how to configure it for your needs. 证据：`docs/docs/installation/github.md`
- **Run as a GitLab Pipeline**（documentation）：You can use a pre-built Action Docker image to run PR-Agent as a GitLab pipeline. This is a simple way to get started with PR-Agent without setting up your own server. 证据：`docs/docs/installation/gitlab.md`
- **Installation**（documentation）：There are several ways to use PR-Agent: 证据：`docs/docs/installation/index.md`
- **Using Docker image**（documentation）：To run PR-Agent locally, you first need to acquire two keys: 证据：`docs/docs/installation/locally.md`
- **PR-Agent Installation Guide**（documentation）：PR-Agent can be deployed in various environments and platforms. Choose the installation method that best suits your needs: 证据：`docs/docs/installation/pr_agent.md`
- **Self-hosted PR-Agent**（documentation）：- If you self-host PR-Agent with your OpenAI or other LLM provider API key, it is between you and the provider. 证据：`docs/docs/overview/data_privacy.md`
- **Table of contents**（documentation）：Overview index.md Data Privacy overview/data privacy.md 证据：`docs/docs/summary.md`
- **Overview**（documentation）：The add docs tool scans the PR code changes and suggests documentation for any code components that are missing documentation, such as functions, classes, and methods. 证据：`docs/docs/tools/add_docs.md`
- **Overview**（documentation）：The ask tool answers questions about the PR, based on the PR code changes. Make sure to be specific and clear in your questions. It can be invoked manually by commenting on any PR: 证据：`docs/docs/tools/ask.md`
- **Overview**（documentation）：The describe tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. 证据：`docs/docs/tools/describe.md`
- **Overview**（documentation）：The generate labels tool scans the PR code changes and generates custom labels for the PR based on the content and context of the changes. 证据：`docs/docs/tools/generate_labels.md`
- **Overview**（documentation）：The help tool provides a list of all the available tools and their descriptions. For PR-Agent users, it also enables to trigger each tool by checking the relevant box. 证据：`docs/docs/tools/help.md`
- **Overview**（documentation）：The help docs tool can answer a free-text question based on a git documentation folder. 证据：`docs/docs/tools/help_docs.md`
- **Overview**（documentation）：The improve tool scans the PR code changes, and automatically generates meaningful suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened ../usage-guide/automations and usage.md github-app-automatic-tools-when-a-new-pr-is-opened , or it can be invoked manually by commenting on any PR: 证据：`docs/docs/tools/improve.md`
- **Tools**（documentation）：Here is a list of PR-Agent tools, each with a dedicated page that explains how to use it: 证据：`docs/docs/tools/index.md`
- **Overview**（documentation）：The review tool scans the PR code changes, and generates feedback about the PR, aiming to aid the reviewing process. The tool can be triggered automatically every time a new PR is opened ../usage-guide/automations and usage.md github-app-automatic-tools-when-a-new-pr-is-opened , or can be invoked manually by commenting on any PR: 证据：`docs/docs/tools/review.md`
- **Overview**（documentation）：The similar issue tool retrieves the most similar issues to the current issue. It can be invoked manually by commenting on any PR: 证据：`docs/docs/tools/similar_issues.md`
- **Overview**（documentation）：The update changelog tool automatically updates the CHANGELOG.md file with the PR changes. It can be invoked manually by commenting on any PR: 证据：`docs/docs/tools/update_changelog.md`
- **Recommend Python Best Practices**（documentation）：This document outlines a series of recommended best practices for Python development. These guidelines aim to improve code quality, maintainability, and readability. 证据：`docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md`
- **Show possible configurations**（documentation）：The possible configurations of PR-Agent are stored in here https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/settings/configuration.toml {:target=" blank"}. In the tools ../tools/index.md page you can find explanations on how to use these configurations for each tool. 证据：`docs/docs/usage-guide/additional_configurations.md`
- **Local repo CLI**（documentation）：When running from your locally cloned PR-Agent repo CLI , your local configuration file will be used. Examples of invoking the different tools via the CLI: 证据：`docs/docs/usage-guide/automations_and_usage.md`
- **Changing a model in PR-Agent**（documentation）：See here https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/algo/ init .py for a list of supported models in PR-Agent. The default model of PR-Agent is GPT-5 from OpenAI. To use a different model than the default, you need to edit in the configuration file https://github.com/the-pr-agent/pr-agent/blob/main/pr agent/settings/configuration.toml L7 the fields: 证据：`docs/docs/usage-guide/changing_a_model.md`
- **Wiki configuration file**（documentation）：The different tools and sub-tools used by PR-Agent are adjustable via a Git configuration file. There are three main ways to set persistent configurations: 证据：`docs/docs/usage-guide/configuration_options.md`
- **Usage guide**（documentation）：This section provides a detailed guide on how to use PR-Agent. It includes information on how to adjust PR-Agent configurations, define which tools will run automatically, and other advanced configurations. 证据：`docs/docs/usage-guide/index.md`
- **Introduction**（documentation）：After installation ../installation/index.md , there are three basic ways to invoke PR-Agent: 证据：`docs/docs/usage-guide/introduction.md`
- **Mail Notifications**（documentation）：Unfortunately, it is not possible in GitHub to disable mail notifications from a specific user. If you are subscribed to notifications for a repo with PR-Agent, we recommend turning off notifications for PR comments, to avoid lengthy emails: 证据：`docs/docs/usage-guide/mail_notifications.md`
- **2023-08-03**（documentation）：- Optimized PR diff processing by introducing caching for diff files, reducing the number of API calls. - Refactored load large diff function to generate a patch only when necessary. - Fixed a bug in the GitLab provider where the new file was not retrieved correctly. 证据：`CHANGELOG.md`
- **Contributor Code of Conduct**（documentation）：As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 证据：`CODE_OF_CONDUCT.md`
- **Version 0.11 - 2023-12-07**（documentation）：- codiumai/pr-agent:0.11 - codiumai/pr-agent:0.11-github app - codiumai/pr-agent:0.11-bitbucket-app - codiumai/pr-agent:0.11-gitlab webhook - codiumai/pr-agent:0.11-github polling - codiumai/pr-agent:0.11-github action 证据：`RELEASE_NOTES.md`
- **Security Policy**（documentation）：PR-Agent is an open-source tool to help efficiently review and handle pull requests. Qodo Merge is a paid version of PR-Agent, designed for companies and teams that require additional features and capabilities. 证据：`SECURITY.md`
- **Atlassian Connect Qodo Merge**（structured_config）：{ "name": "Qodo Merge", "description": "Qodo Merge", "key": "app key", "vendor": { "name": "Qodo", "url": "https://qodo.ai" }, "authentication": { "type": "jwt" }, "baseUrl": "base url", "lifecycle": { "installed": "/installed", "uninstalled": "/uninstalled" }, "scopes": "account", "repository:write", "pullrequest:write", "wiki" , "contexts": "account" , "modules": { "webhooks": { "event": " ", "url": "/webhook" } }, "links": { "privacy": "https://qodo.ai/privacy-policy", "terms": "https://qodo.ai/terms" } } 证据：`pr_agent/servers/atlassian-connect-qodo-merge.json`
- **Atlassian Connect**（structured_config）：{ "name": "CodiumAI PR-Agent", "description": "CodiumAI PR-Agent", "key": "app key", "vendor": { "name": "CodiumAI", "url": "https://codium.ai" }, "authentication": { "type": "jwt" }, "baseUrl": "base url", "lifecycle": { "installed": "/installed", "uninstalled": "/uninstalled" }, "scopes": "account", "repository:write", "pullrequest:write", "wiki" , "contexts": "account" , "modules": { "webhooks": { "event": " ", "url": "/webhook" } }, "links": { "privacy": "https://qodo.ai/privacy-policy", "terms": "https://qodo.ai/terms" } } 证据：`pr_agent/servers/atlassian-connect.json`
- **.dockerignore**（source_file）：.venv/ venv/ pr agent/settings/.secrets.toml pics/ pr agent.egg-info/ build/ 证据：`.dockerignore`
- **What's Changed**（source_file）：name-template: 'v$RESOLVED VERSION' tag-template: 'v$RESOLVED VERSION' 证据：`.github/release-drafter.yml`
- **.gitignore**（source_file）：.idea/ .lsp/ .vscode/ .env .venv/ venv/ pr agent/settings/.secrets.toml pycache dist/ .egg-info/ build/ .DS Store docs/.cache/ .qodo poetry.lock 证据：`.gitignore`
- **.Pr Agent**（source_file）：pr reviewer enable review labels effort = true enable auto approval = true 证据：`.pr_agent.toml`
- **See https://pre-commit.com for more information**（source_file）：See https://pre-commit.com for more information See https://pre-commit.com/hooks.html for more hooks 证据：`.pre-commit-config.yaml`
- **Dockerfile**（source_file）：RUN apt-get update && apt-get install --no-install-recommends -y git curl && apt-get clean && rm -rf /var/lib/apt/lists/ 证据：`Dockerfile.github_action`
- **Dockerfile**（source_file）：FROM pragent/pr-agent:github action 证据：`Dockerfile.github_action_dockerhub`
- **Manifest**（source_file）：recursive-include pr agent .toml recursive-exclude pr agent .secrets.toml 证据：`MANIFEST.in`
- **Action**（source_file）：name: 'The PR Agent' description: 'Summarize, review and suggest improvements for pull requests' branding: icon: 'award' color: 'green' runs: using: 'docker' image: 'Dockerfile.github action dockerhub' 证据：`action.yaml`
- **Codecov**（source_file）：comment: false coverage: status: patch: false project: false 证据：`codecov.yml`
- **Dockerfile**（source_file）：RUN apt update && apt install --no-install-recommends -y git curl && apt-get clean && rm -rf /var/lib/apt/lists/ 证据：`docker/Dockerfile`
- 其余 13 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

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

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

## 验收标准

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

---

## Doramagic Context Augmentation

下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。

## Human Manual 骨架

使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。

宿主 AI 硬性规则：
- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。
- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。
- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。

- **PR-Agent 简介**：importance `high`
  - source_paths: README.md, pr_agent/agent/pr_agent.py, pr_agent/tools/pr_description.py, pr_agent/tools/pr_reviewer.py
- **系统架构**：importance `high`
  - source_paths: pr_agent/agent/pr_agent.py, pr_agent/config_loader.py, pr_agent/algo/types.py, pr_agent/git_providers/__init__.py, pr_agent/git_providers/git_provider.py
- **AI 模型集成**：importance `high`
  - source_paths: pr_agent/algo/ai_handlers/base_ai_handler.py, pr_agent/algo/ai_handlers/openai_ai_handler.py, pr_agent/algo/ai_handlers/litellm_ai_handler.py, pr_agent/algo/ai_handlers/litellm_helpers.py, pr_agent/algo/token_handler.py
- **工具概述**：importance `high`
  - source_paths: pr_agent/tools/pr_description.py, pr_agent/tools/pr_reviewer.py, pr_agent/tools/pr_code_suggestions.py, pr_agent/tools/pr_questions.py, pr_agent/tools/pr_add_docs.py
- **代码审查工具 (Review)**：importance `high`
  - source_paths: pr_agent/tools/pr_reviewer.py, pr_agent/settings/pr_reviewer_prompts.toml, pr_agent/settings/configuration.toml
- **代码改进工具 (Improve)**：importance `high`
  - source_paths: pr_agent/tools/pr_code_suggestions.py, pr_agent/settings/code_suggestions/pr_code_suggestions_prompts.toml, pr_agent/settings/code_suggestions/pr_code_suggestions_reflect_prompts.toml
- **Git 平台集成**：importance `high`
  - source_paths: pr_agent/git_providers/github_provider.py, pr_agent/git_providers/gitlab_provider.py, pr_agent/git_providers/bitbucket_provider.py, pr_agent/git_providers/azuredevops_provider.py, pr_agent/git_providers/gitea_provider.py
- **部署方式**：importance `high`
  - source_paths: action.yaml, Dockerfile.github_action, docker/Dockerfile, pr_agent/servers/github_app.py, pr_agent/servers/gitlab_webhook.py

## Repo Inspection Evidence / 源码检查证据

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `9ab2636f89952c69600dc2038d39f468de699fd0`
- inspected_files: `pyproject.toml`, `README.md`, `requirements.txt`, `docs/mkdocs.yml`, `docs/README.md`, `docs/docs/summary.md`, `docs/docs/index.md`, `docs/docs/.gitbook.yaml`, `docs/docs/installation/index.md`, `docs/docs/installation/pr_agent.md`, `docs/docs/installation/gitlab.md`, `docs/docs/installation/azure.md`, `docs/docs/installation/bitbucket.md`, `docs/docs/installation/github.md`, `docs/docs/installation/gitea.md`, `docs/docs/installation/locally.md`, `docs/docs/usage-guide/index.md`, `docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md`, `docs/docs/usage-guide/changing_a_model.md`, `docs/docs/usage-guide/introduction.md`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 来源证据：Publish linux/arm64 Docker image for github_app tag

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Publish linux/arm64 Docker image for github_app tag
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_8cb9e552d2e2452cbe958628f6e800b6 | https://github.com/The-PR-Agent/pr-agent/issues/2386 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：[Bug] UnicodeDecodeError in gitea_provider.py when parsing binary files before extension filtering

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] UnicodeDecodeError in gitea_provider.py when parsing binary files before extension filtering
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | cevd_52bd470b7b5e4be6858b290e41c93036 | https://github.com/The-PR-Agent/pr-agent/issues/2380 | 来源讨论提到 docker 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：v0.31

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v0.31
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_ef0e5f5f982146d8bd002453b969c07f | https://github.com/The-PR-Agent/pr-agent/releases/tag/v0.31 | 来源类型 github_release 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 来源证据：v0.34.2

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v0.34.2
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_4bc22335937e44c0b529ab84d1e69a60 | https://github.com/The-PR-Agent/pr-agent/releases/tag/v0.34.2 | 来源讨论提到 docker 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：AzureDevopsProvider.get_repo_settings drops chunks after the first, silently truncating .pr_agent.toml

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：AzureDevopsProvider.get_repo_settings drops chunks after the first, silently truncating .pr_agent.toml
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_4ee2a84ba307469b9b329a043a70a224 | https://github.com/The-PR-Agent/pr-agent/issues/2376 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 来源证据：Ticket context not scoped per PR in long-lived deployments — stale tickets leak between unrelated PRs

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Ticket context not scoped per PR in long-lived deployments — stale tickets leak between unrelated PRs
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_a9b90b0cfbbf4529b60d65f564f4592e | https://github.com/The-PR-Agent/pr-agent/issues/2383 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 来源证据：v0.34.1

- Trigger: GitHub 社区证据显示该项目存在一个能力理解相关的待验证问题：v0.34.1
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_eb46a134c8984cd8898e13f61602f165 | https://github.com/The-PR-Agent/pr-agent/releases/tag/v0.34.1 | 来源类型 github_release 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: 将假设转成下游验证清单。
- Why it matters: 假设不成立时，用户拿不到承诺的能力。
- Evidence: capability.assumptions | github_repo:662766482 | https://github.com/The-PR-Agent/pr-agent | README/documentation is current enough for a first validation pass.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: 未记录 last_activity_observed。
- Host AI rule: 补 GitHub 最近 commit、release、issue/PR 响应信号。
- Why it matters: 新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- Evidence: evidence.maintainer_signals | github_repo:662766482 | https://github.com/The-PR-Agent/pr-agent | last_activity_observed missing
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: no_demo
- Host AI rule: 进入安全/权限治理复核队列。
- Why it matters: 下游已经要求复核，不能在页面中弱化。
- Evidence: downstream_validation.risk_items | github_repo:662766482 | https://github.com/The-PR-Agent/pr-agent | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
