# serena - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 serena 编译的 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

## 怎么开始

- `uv tool install -p 3.13 serena-agent` 证据：`README.md` Claim：`clm_0003` supported 0.86

## 继续前判断卡

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

### 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`, `CLAUDE.md`
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`AGENTS.md`, `CLAUDE.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_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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **Quick Demo**（project_doc）：Serena provides essential semantic code retrieval, editing, refactoring and debugging tools that are akin to an IDE's capabilities, operating at the symbol level and exploiting relational structure. It integrates with any client/LLM via the model context protocol MCP . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Readme**（project_doc）：Serena uses modified versions of other libraries/packages: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/README.md`
- **Elixir Language Server Integration**（project_doc）：This directory contains the integration for Elixir language support using Expert https://github.com/elixir-lang/expert , the official Elixir language server. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/solidlsp/language_servers/elixir_tools/README.md`
- **F Test Project**（project_doc）：This is a test F project for testing Serena's F language support. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`test/resources/repos/fsharp/test_repo/README.md`
- **Test Repository**（project_doc）：This is a test repository for markdown language server testing. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`test/resources/repos/markdown/test_repo/README.md`
- **Agents**（project_doc）：Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the read memory command. Otherwise you can just read them using normal file reading tools. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`
- **Claude**（project_doc）：Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the read memory command. Otherwise you can just read them using normal file reading tools. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`
- **Contributing to Serena**（project_doc）：Thank you for your interest in contributing to Serena! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Contributing Guidelines**（project_doc）：Thank you for considering contributing to this project! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`test/resources/repos/markdown/test_repo/CONTRIBUTING.md`
- **Unreleased main**（project_doc）：Status of the main branch. Changes prior to the next official version change will appear here. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Docker Setup for Serena Experimental**（project_doc）：Docker Setup for Serena Experimental 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`DOCKER.md`
- **Index**（project_doc）：If you are not redirected automatically, click here 01-about/000 intro.html . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/index.md`
- **Language Support**（project_doc）：Serena provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code across a wide range of programming languages. Equipped with these capabilities, Serena discovers and edits code just like a seasoned developer making use of an IDE's capabilities would. Serena can efficiently find the right context and do the right thing even in very large and complex projects! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/01-about/020_programming-languages.md`
- **Serena in Action**（project_doc）：Demonstration 1: Efficient Operation in Claude Code 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/01-about/030_serena-in-action.md`
- **Acknowledgements**（project_doc）：We are very grateful to our sponsors https://github.com/sponsors/oraios , who help us drive Serena's development. The core team the founders of Oraios AI https://oraios-ai.de/ put in a lot of work in order to turn Serena into a useful open source project. So far, there is no business model behind this project, and sponsors are our only source of income from it. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/01-about/050_acknowledgements.md`
- **Usage**（project_doc）：Serena can be used in various ways and supports coding workflows through a project-based approach. Its configuration is flexible and allows tailoring it to your specific needs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/000_intro.md`
- **Installation**（project_doc）：Serena is managed by uv . If you do not have it yet, install it following the instructions here https://docs.astral.sh/uv/getting-started/installation/ . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/010_installation.md`
- **Running Serena**（project_doc）：Serena is a command-line tool with a variety of sub-commands. This section describes how to run Serena in general how to run and configure the most important command, i.e. starting the MCP server other useful commands. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/020_running.md`
- **The Serena JetBrains Plugin**（project_doc）：The JetBrains Plugin https://plugins.jetbrains.com/plugin/28946-serena/ allows the Serena MCP server to leverage the powerful code analysis and editing capabilities of your JetBrains IDE. This page explains how to install the plugin and how to configure Serena appropriately. You will still need to set up the Serena MCP server itself, so make sure to follow the installation instructions 020 running.md and connect the… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/025_jetbrains_plugin.md`
- **Connecting Your MCP Client**（project_doc）：In the following, we provide general instructions on how to connect Serena to your MCP-enabled client, as well as specific instructions for popular clients. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/030_clients.md`
- **The Project Workflow**（project_doc）：Serena uses a project-based workflow. A project is simply a directory on your filesystem that contains code and other files that you want Serena to work with. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/040_workflow.md`
- **Memories & Onboarding**（project_doc）：Serena provides the functionality of a fully featured agent, and a useful aspect of this is Serena's memory system. Despite its simplicity, we received positive feedback from many users who tend to combine it with their agent's internal memory management e.g., AGENTS.md files . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/045_memories.md`
- **Configuration**（project_doc）：Serena is very flexible in terms of configuration. While for most users, the default configurations will work, you can fully adjust it to your needs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/050_configuration.md`
- **The Dashboard and GUI Tool**（project_doc）：Serena comes with built-in tools for monitoring and managing the current session: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/060_dashboard.md`
- **Logs**（project_doc）：It can be vital to understand what is happening in Serena, especially when something goes wrong. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/065_logs.md`
- **Security Considerations**（project_doc）：Security is important to us, and we take this topic seriously. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/070_security.md`
- **Additional Usage Pointers**（project_doc）：We found that it is often a good idea to spend some time conceptualizing and planning a task before actually implementing it, especially for non-trivial tasks. For very complex tasks, you can make a detailed plan in one session, where Serena may read a lot of your code to build up the context, and then continue with the implementation in another, having persisted the plan in a memory or dedicated file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/02-usage/999_additional-usage.md`
- **Special Guides**（project_doc）：This section contains special guides for certain topics that require more in-depth explanations. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/000_intro.md`
- **C/C++ Setup Guide**（project_doc）：This guide explains how to prepare a C/C++ project so that Serena can provide reliable code intelligence via clangd or ccls language servers. This is only necessary if you use the language server variant of Serena, for users of the Serena JetBrains plugin no setup is required and the limitations described below do not apply. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/cpp_setup.md`
- **Custom Agents with Serena**（project_doc）：As a reference implementation, we provide an integration with the Agno https://docs.agno.com/introduction/playground agent framework. Agno is a model-agnostic agent framework that allows you to turn Serena into an agent independent of the MCP technology with a large number of underlying LLMs. While Agno has recently added support for MCP servers out of the box, our Agno integration predates this and is a good illust… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/custom_agent.md`
- **GDScript Godot Engine Setup Guide for Serena**（project_doc）：GDScript Godot Engine Setup Guide for Serena 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/godot_gdscript_setup_guide_for_serena.md`
- **Groovy Setup Guide for Serena**（project_doc）：The Groovy support in Serena is incomplete and requires the user to provide a functioning, JVM-based Groovy language server as a jar. This intermediate state allows the contributors of Groovy support to use Serena internally and hopefully to accelerate their open-source release of a Groovy language server in the future. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/groovy_setup_guide_for_serena.md`
- **OCaml Setup Guide for Serena**（project_doc）：This guide explains how to set up an OCaml project so that Serena can provide code intelligence via ocaml-lsp-server ocamllsp . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/ocaml_setup_guide_for_serena.md`
- **Scala Setup Guide for Serena**（project_doc）：This guide explains how to prepare a Scala project so that Serena can provide reliable code intelligence via Metals Scala LSP and how to run Scala tests manually. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/scala_setup_guide_for_serena.md`
- **Connecting Serena MCP Server to ChatGPT via MCPO & Cloudflare Tunnel**（project_doc）：Connecting Serena MCP Server to ChatGPT via MCPO & Cloudflare Tunnel 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/03-special-guides/serena_on_chatgpt.md`
- **Evaluation**（project_doc）：Claude Code Opus 4.6, medium : "Serena's IDE-backed semantic tools are the single most impactful addition to my toolkit — cross-file renames, moves, and reference lookups that would cost me 8–12 careful, error-prone steps collapse into one atomic call, and I would absolutely ask any developer I work with to set them up." 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/000_evaluation-intro.md`
- **Methodology**（project_doc）：In this section we describe the methodology we applied in evaluating the performance of Serena's tools. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/010_methodology.md`
- **Prompts**（project_doc）：Our evaluation uses two prompts, which are passed to the LLM in order to generate the evaluation results: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/020_prompts/000_prompts.md`
- **Evaluation Prompt**（project_doc）：We use the prompt below to evaluate the added value of Serena's tools against the agent's built-in tools on a given project. The evaluations were created in one-shot sessions, only using this prompt and the follow-up prompt for summarization 020 summary-prompt 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/020_prompts/010_evaluation-prompt.md`
- **Summary Prompt**（project_doc）：We used the prompt below to summarize the evaluation of Serena. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/020_prompts/020_summary-prompt.md`
- **Results**（project_doc）：This section presents the results of the evaluation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/000_evaluation-results.md`
- **Claude Code Opus 4.6, medium**（project_doc）：:::{admonition} Evaluation Result :class: note Generated by : Claude Opus 4.6 coding AI agent in Claude Code CLI Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-13 ::: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/010_cc_on_tianshou.md`
- **Codex GPT-5.4, high**（project_doc）：:::{admonition} Evaluation Result :class: note Generated by: GPT-5.4 high in Codex Codebase: Serena JetBrains Plugin Java Date : 2026-04-13 ::: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/020_codex_on_jbplugin.md`
- **Copilot CLI GPT-5.4, medium**（project_doc）：:::{admonition} Evaluation Result :class: note Generated by: GPT-5.4 medium in Copilot Cli Codebase: ente https://github.com/ente-io/ente - a large monorepo in Dart, TypeScript, Go, Rust, and other languages. Date : 2026-04-14 ::: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/030_copilot_cli_on_ente.md`
- **Claude Code GLM 5.1**（project_doc）：:::{admonition} Evaluation Result :class: note Generated by : GLM 5.1 coding AI agent in Claude Code CLI Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-14 ::: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/040_glm_on_tianshou.md`
- **JetBrains Junie Plugin Opus 4.6**（project_doc）：:::{admonition} Evaluation Result :class: note Generated by : Claude Opus 4.6 coding AI agent in JetBrains Junie Plugin Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-17 ::: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/04-evaluation/030_results/050_junie_plugin_on_tianshou.md`

## 证据索引

- 共索引 79 条证据。

- **Quick Demo**（documentation）：Serena provides essential semantic code retrieval, editing, refactoring and debugging tools that are akin to an IDE's capabilities, operating at the symbol level and exploiting relational structure. It integrates with any client/LLM via the model context protocol MCP . 证据：`README.md`
- **Readme**（documentation）：Serena uses modified versions of other libraries/packages: 证据：`src/README.md`
- **Elixir Language Server Integration**（documentation）：This directory contains the integration for Elixir language support using Expert https://github.com/elixir-lang/expert , the official Elixir language server. 证据：`src/solidlsp/language_servers/elixir_tools/README.md`
- **F Test Project**（documentation）：This is a test F project for testing Serena's F language support. 证据：`test/resources/repos/fsharp/test_repo/README.md`
- **Test Repository**（documentation）：This is a test repository for markdown language server testing. 证据：`test/resources/repos/markdown/test_repo/README.md`
- **Agents**（documentation）：Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the read memory command. Otherwise you can just read them using normal file reading tools. 证据：`AGENTS.md`
- **Claude**（documentation）：Relevant information about the project is in .serena/memories. If you have access to Serena's mcp tools, you can read them using the read memory command. Otherwise you can just read them using normal file reading tools. 证据：`CLAUDE.md`
- **Contributing to Serena**（documentation）：Thank you for your interest in contributing to Serena! 证据：`CONTRIBUTING.md`
- **Package**（package_manifest）：{ "name": "serena-angular-test-repo", "version": "0.0.0", "private": true, "description": "Minimal Angular workspace fixture used by Serena language-server tests.", "dependencies": { "@angular/common": "^21.0.0", "@angular/compiler": "^21.0.0", "@angular/core": "^21.0.0", "@angular/platform-browser": "^21.0.0", "rxjs": "~7.8.0", "tslib": "^2.6.0", "zone.js": "~0.15.0" }, "devDependencies": { "typescript": "~5.9.0" } } 证据：`test/resources/repos/angular/test_repo/package.json`
- **Package**（package_manifest）：{ "name": "test-repo", "private": true, "version": "0.0.1", "type": "module", "scripts": { "dev": "vite dev", "build": "vite build", "preview": "vite preview", "prepare": "svelte-kit sync echo ''", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" }, "devDependencies": { "@fontsource/fira-mono": "^5.2.7", "@neoconfetti/svelte": "^2.2.2", "@sveltejs/adapter-auto": "^7.0.1", "@sveltejs/kit": "^2.57.0", "@sveltejs/vite-plugin-svelte": "^7.0.0", "@tailwindcss/vite": "^4.2.2", "@types/node": "^25.6.1", "svelte": "^5.55.2", "svelte-check": "^4.4.6", "tailwindcss": "^4.2.2", "typescript": "^6.0… 证据：`test/resources/repos/svelte/test_repo/package.json`
- **Package**（package_manifest）：{ "name": "vue-calculator-test-fixture", "version": "1.0.0", "type": "module", "description": "Vue 3 + Pinia + TypeScript test fixtures for Serena LSP testing", "dependencies": { "vue": "^3.4.0", "pinia": "^2.1.0" }, "devDependencies": { "@vue/language-server": "^2.0.0", "typescript": "~5.5.4" } } 证据：`test/resources/repos/vue/test_repo/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`
- **Contributing Guidelines**（documentation）：Thank you for considering contributing to this project! 证据：`test/resources/repos/markdown/test_repo/CONTRIBUTING.md`
- **Unreleased main**（documentation）：Status of the main branch. Changes prior to the next official version change will appear here. 证据：`CHANGELOG.md`
- **Docker Setup for Serena Experimental**（documentation）：Docker Setup for Serena Experimental 证据：`DOCKER.md`
- **Index**（documentation）：If you are not redirected automatically, click here 01-about/000 intro.html . 证据：`docs/index.md`
- **Language Support**（documentation）：Serena provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code across a wide range of programming languages. Equipped with these capabilities, Serena discovers and edits code just like a seasoned developer making use of an IDE's capabilities would. Serena can efficiently find the right context and do the right thing even in very large and complex projects! 证据：`docs/01-about/020_programming-languages.md`
- **Serena in Action**（documentation）：Demonstration 1: Efficient Operation in Claude Code 证据：`docs/01-about/030_serena-in-action.md`
- **Acknowledgements**（documentation）：We are very grateful to our sponsors https://github.com/sponsors/oraios , who help us drive Serena's development. The core team the founders of Oraios AI https://oraios-ai.de/ put in a lot of work in order to turn Serena into a useful open source project. So far, there is no business model behind this project, and sponsors are our only source of income from it. 证据：`docs/01-about/050_acknowledgements.md`
- **Usage**（documentation）：Serena can be used in various ways and supports coding workflows through a project-based approach. Its configuration is flexible and allows tailoring it to your specific needs. 证据：`docs/02-usage/000_intro.md`
- **Installation**（documentation）：Serena is managed by uv . If you do not have it yet, install it following the instructions here https://docs.astral.sh/uv/getting-started/installation/ . 证据：`docs/02-usage/010_installation.md`
- **Running Serena**（documentation）：Serena is a command-line tool with a variety of sub-commands. This section describes how to run Serena in general how to run and configure the most important command, i.e. starting the MCP server other useful commands. 证据：`docs/02-usage/020_running.md`
- **The Serena JetBrains Plugin**（documentation）：The JetBrains Plugin https://plugins.jetbrains.com/plugin/28946-serena/ allows the Serena MCP server to leverage the powerful code analysis and editing capabilities of your JetBrains IDE. This page explains how to install the plugin and how to configure Serena appropriately. You will still need to set up the Serena MCP server itself, so make sure to follow the installation instructions 020 running.md and connect the MCP server to your LLM-based client as described in client setup 030 clients.md in addition to following the instructions below. 证据：`docs/02-usage/025_jetbrains_plugin.md`
- **Connecting Your MCP Client**（documentation）：In the following, we provide general instructions on how to connect Serena to your MCP-enabled client, as well as specific instructions for popular clients. 证据：`docs/02-usage/030_clients.md`
- **The Project Workflow**（documentation）：Serena uses a project-based workflow. A project is simply a directory on your filesystem that contains code and other files that you want Serena to work with. 证据：`docs/02-usage/040_workflow.md`
- **Memories & Onboarding**（documentation）：Serena provides the functionality of a fully featured agent, and a useful aspect of this is Serena's memory system. Despite its simplicity, we received positive feedback from many users who tend to combine it with their agent's internal memory management e.g., AGENTS.md files . 证据：`docs/02-usage/045_memories.md`
- **Configuration**（documentation）：Serena is very flexible in terms of configuration. While for most users, the default configurations will work, you can fully adjust it to your needs. 证据：`docs/02-usage/050_configuration.md`
- **The Dashboard and GUI Tool**（documentation）：Serena comes with built-in tools for monitoring and managing the current session: 证据：`docs/02-usage/060_dashboard.md`
- **Logs**（documentation）：It can be vital to understand what is happening in Serena, especially when something goes wrong. 证据：`docs/02-usage/065_logs.md`
- **Security Considerations**（documentation）：Security is important to us, and we take this topic seriously. 证据：`docs/02-usage/070_security.md`
- **Additional Usage Pointers**（documentation）：We found that it is often a good idea to spend some time conceptualizing and planning a task before actually implementing it, especially for non-trivial tasks. For very complex tasks, you can make a detailed plan in one session, where Serena may read a lot of your code to build up the context, and then continue with the implementation in another, having persisted the plan in a memory or dedicated file. 证据：`docs/02-usage/999_additional-usage.md`
- **Special Guides**（documentation）：This section contains special guides for certain topics that require more in-depth explanations. 证据：`docs/03-special-guides/000_intro.md`
- **C/C++ Setup Guide**（documentation）：This guide explains how to prepare a C/C++ project so that Serena can provide reliable code intelligence via clangd or ccls language servers. This is only necessary if you use the language server variant of Serena, for users of the Serena JetBrains plugin no setup is required and the limitations described below do not apply. 证据：`docs/03-special-guides/cpp_setup.md`
- **Custom Agents with Serena**（documentation）：As a reference implementation, we provide an integration with the Agno https://docs.agno.com/introduction/playground agent framework. Agno is a model-agnostic agent framework that allows you to turn Serena into an agent independent of the MCP technology with a large number of underlying LLMs. While Agno has recently added support for MCP servers out of the box, our Agno integration predates this and is a good illustration of how easy it is to integrate Serena into an arbitrary agent framework. 证据：`docs/03-special-guides/custom_agent.md`
- **GDScript Godot Engine Setup Guide for Serena**（documentation）：GDScript Godot Engine Setup Guide for Serena 证据：`docs/03-special-guides/godot_gdscript_setup_guide_for_serena.md`
- **Groovy Setup Guide for Serena**（documentation）：The Groovy support in Serena is incomplete and requires the user to provide a functioning, JVM-based Groovy language server as a jar. This intermediate state allows the contributors of Groovy support to use Serena internally and hopefully to accelerate their open-source release of a Groovy language server in the future. 证据：`docs/03-special-guides/groovy_setup_guide_for_serena.md`
- **OCaml Setup Guide for Serena**（documentation）：This guide explains how to set up an OCaml project so that Serena can provide code intelligence via ocaml-lsp-server ocamllsp . 证据：`docs/03-special-guides/ocaml_setup_guide_for_serena.md`
- **Scala Setup Guide for Serena**（documentation）：This guide explains how to prepare a Scala project so that Serena can provide reliable code intelligence via Metals Scala LSP and how to run Scala tests manually. 证据：`docs/03-special-guides/scala_setup_guide_for_serena.md`
- **Connecting Serena MCP Server to ChatGPT via MCPO & Cloudflare Tunnel**（documentation）：Connecting Serena MCP Server to ChatGPT via MCPO & Cloudflare Tunnel 证据：`docs/03-special-guides/serena_on_chatgpt.md`
- **Evaluation**（documentation）：Claude Code Opus 4.6, medium : "Serena's IDE-backed semantic tools are the single most impactful addition to my toolkit — cross-file renames, moves, and reference lookups that would cost me 8–12 careful, error-prone steps collapse into one atomic call, and I would absolutely ask any developer I work with to set them up." 证据：`docs/04-evaluation/000_evaluation-intro.md`
- **Methodology**（documentation）：In this section we describe the methodology we applied in evaluating the performance of Serena's tools. 证据：`docs/04-evaluation/010_methodology.md`
- **Prompts**（documentation）：Our evaluation uses two prompts, which are passed to the LLM in order to generate the evaluation results: 证据：`docs/04-evaluation/020_prompts/000_prompts.md`
- **Evaluation Prompt**（documentation）：We use the prompt below to evaluate the added value of Serena's tools against the agent's built-in tools on a given project. The evaluations were created in one-shot sessions, only using this prompt and the follow-up prompt for summarization 020 summary-prompt 证据：`docs/04-evaluation/020_prompts/010_evaluation-prompt.md`
- **Summary Prompt**（documentation）：We used the prompt below to summarize the evaluation of Serena. 证据：`docs/04-evaluation/020_prompts/020_summary-prompt.md`
- **Results**（documentation）：This section presents the results of the evaluation. 证据：`docs/04-evaluation/030_results/000_evaluation-results.md`
- **Claude Code Opus 4.6, medium**（documentation）：:::{admonition} Evaluation Result :class: note Generated by : Claude Opus 4.6 coding AI agent in Claude Code CLI Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-13 ::: 证据：`docs/04-evaluation/030_results/010_cc_on_tianshou.md`
- **Codex GPT-5.4, high**（documentation）：:::{admonition} Evaluation Result :class: note Generated by: GPT-5.4 high in Codex Codebase: Serena JetBrains Plugin Java Date : 2026-04-13 ::: 证据：`docs/04-evaluation/030_results/020_codex_on_jbplugin.md`
- **Copilot CLI GPT-5.4, medium**（documentation）：:::{admonition} Evaluation Result :class: note Generated by: GPT-5.4 medium in Copilot Cli Codebase: ente https://github.com/ente-io/ente - a large monorepo in Dart, TypeScript, Go, Rust, and other languages. Date : 2026-04-14 ::: 证据：`docs/04-evaluation/030_results/030_copilot_cli_on_ente.md`
- **Claude Code GLM 5.1**（documentation）：:::{admonition} Evaluation Result :class: note Generated by : GLM 5.1 coding AI agent in Claude Code CLI Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-14 ::: 证据：`docs/04-evaluation/030_results/040_glm_on_tianshou.md`
- **JetBrains Junie Plugin Opus 4.6**（documentation）：:::{admonition} Evaluation Result :class: note Generated by : Claude Opus 4.6 coding AI agent in JetBrains Junie Plugin Codebase: Tianshou https://github.com/thu-ml/tianshou — a Python reinforcement learning library ~26K lines, 43 source files Date : 2026-04-17 ::: 证据：`docs/04-evaluation/030_results/050_junie_plugin_on_tianshou.md`
- **Base stage with common dependencies**（source_file）：Base stage with common dependencies FROM python:3.11-slim AS base SHELL "/bin/bash", "-c" 证据：`Dockerfile.maximal`
- **Compose**（source_file）：services: serena: image: serena:latest build: context: ./ dockerfile: Dockerfile target: production ports: - "${SERENA PORT:-9121}:9121" - "${SERENA DASHBOARD PORT:-24282}:24282" environment: - SERENA DOCKER=1 command: - "uv run --directory . serena-mcp-server --transport sse --port 9121 --host 0.0.0.0" 证据：`compose.yaml`
- **Docker Build And Run**（source_file）：docker build -t serena . docker run -it --rm -v "$ pwd ":/workspace serena 证据：`docker_build_and_run.sh`
- **Transitive deps pinned for security dependabot alerts .**（source_file）：build-system build-backend = "hatchling.build" requires = "hatchling" 证据：`pyproject.toml`
- **Agno Agent**（source_file）：model = Gemini id="gemini-2.5-pro" serena agent = SerenaAgnoAgentProvider.get agent model agent os = AgentOS app = agent os.get app 证据：`scripts/agno_agent.py`
- **check for mode compatibility**（source_file）：log = logging.getLogger name TTool = TypeVar "TTool", bound="Tool" T = TypeVar "T" SUCCESS RESULT = "OK" class ProjectNotFoundError Exception class AvailableTools ⋮---- def init self, tools: list Tool def len self - int def contains tool name self, tool name: str - bool def contains tool class self, tool class: type Tool - bool class ToolSet ⋮---- LEGACY TOOL NAME MAPPING = {"replace regex": ReplaceContentTool.get name from cls } def init self, tool names: set str - None ⋮---- @classmethod def default cls - "ToolSet" def apply self, tool inclusion definitions: "ToolInclusionDefinition" - "ToolSet" ⋮---- def get updated tool name tool name: str - str ⋮---- new tool name = self.LEGACY TOOL NA… 证据：`src/serena/agent.py`
- **check for auto-configurable clients**（source_file）：log = logging.getLogger name MAX CONTENT WIDTH = 200 MODES EXPLANATION = """\b\nBuilt-in mode names or paths to custom mode YAMLs with which to ADD MODES EXPLANATION = """\b\nMode names or paths to custom mode YAMLs which shall def find project root root: str Path None = None - str None ⋮---- current = Path.cwd .resolve boundary = Path root .resolve if root is not None else None def ancestors - Iterator Path ⋮---- def open in editor path: str - None ⋮---- editor = os.environ.get "EDITOR" run kwargs = subprocess kwargs ⋮---- class ProjectType click.ParamType ⋮---- """ParamType allowing either a project name or a path to a project directory.""" name = " PROJECT NAME PROJECT PATH " def convert… 证据：`src/serena/cli.py`
- **Client Setup**（source_file）：class ClientSetupHandler ABC ⋮---- def init self, name: str - None ⋮---- @abstractmethod def is applicable self - bool ⋮---- @abstractmethod def get mcp server options self - list str def get mcp server command self - str def run shell command self, cmd: str - bool ⋮---- """ Runs the given shell command. If the command fails i.e., with non-zero exit code , prints the stdout and stderr of the command for debugging. :param cmd: the shell command to execute :return: whether the command executed successfully i.e., with exit code 0 """ ⋮---- result = execute shell command cmd is success = result.return code == 0 ⋮---- @abstractmethod def apply self - bool ⋮---- """ Applies the client setup """ c… 证据：`src/serena/config/client_setup.py`
- **load from name**（source_file）：log = logging.getLogger name def looks like yaml path s: str - bool ⋮---- @dataclass kw only=True class SerenaAgentMode ToolInclusionDefinition, ToStringMixin ⋮---- name: str prompt: str description: str = "" yaml path: Path None = field default=None, repr=False, compare=False """ Internal field storing the path to the YAML file this mode was loaded from. Used to support loading modes from arbitrary file paths. """ def tostring includes self - list str def print overview self - None ⋮---- @classmethod def from yaml cls, yaml path: str Path - Self ⋮---- yaml as path = Path yaml path .resolve ⋮---- data = yaml.safe load f name = data.pop "name", yaml as path.stem ⋮---- @classmethod def get pa… 证据：`src/serena/config/context_mode.py`
- **internal fields which are not mapped to/from the configuration file must start with " "**（source_file）：log = logging.getLogger name T = TypeVar "T" DEFAULT TOOL TIMEOUT: float = 240 DictType = dict CommentedMap TDict = TypeVar "TDict", bound=DictType ⋮---- @singleton class SerenaPaths ⋮---- def init self - None ⋮---- home dir = os.getenv "SERENA HOME" ⋮---- home dir = str Path.home / SERENA MANAGED DIR NAME ⋮---- home dir = home dir.strip ⋮---- """ the resources directory within the serena package """ ⋮---- """ the path to the Serena home directory, where the user's configuration/data is stored. This is ~/.serena by default, but it can be overridden via the SERENA HOME environment variable. """ ⋮---- global memories path = Path os.path.join self.serena user home dir, "memories", "global" ⋮--… 证据：`src/serena/config/serena_config.py`
- 其余 19 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **Overview and System Architecture**：importance `high`
  - source_paths: README.md, src/serena/agent.py, src/serena/mcp.py, src/serena/cli.py, src/serena/project.py
- **Language Server Integration and Tool Capabilities**：importance `high`
  - source_paths: src/solidlsp/ls.py, src/solidlsp/ls_config.py, src/solidlsp/ls_process.py, src/solidlsp/ls_request.py, src/solidlsp/language_servers/typescript_language_server.py
- **Configuration, Clients, and Memory System**：importance `high`
  - source_paths: src/serena/config/serena_config.py, src/serena/config/context_mode.py, src/serena/config/client_setup.py, src/serena/resources/serena_config.template.yml, src/serena/resources/project.template.yml
- **Deployment, Security, and Operational Concerns**：importance `medium`
  - source_paths: Dockerfile, Dockerfile.maximal, compose.yaml, docker_build_and_run.sh, DOCKER.md

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `dd7eb6d72ae179aa940e50cd6276ec5646f306f8`
- inspected_files: `Dockerfile`, `README.md`, `pyproject.toml`, `uv.lock`, `docs/01-about/020_programming-languages.md`, `docs/01-about/030_serena-in-action.md`, `docs/01-about/050_acknowledgements.md`, `docs/02-usage/000_intro.md`, `docs/02-usage/010_installation.md`, `docs/02-usage/020_running.md`, `docs/02-usage/025_jetbrains_plugin.md`, `docs/02-usage/030_clients.md`, `docs/02-usage/040_workflow.md`, `docs/02-usage/045_memories.md`, `docs/02-usage/050_configuration.md`, `docs/02-usage/060_dashboard.md`, `docs/02-usage/065_logs.md`, `docs/02-usage/070_security.md`, `docs/02-usage/999_additional-usage.md`, `docs/03-special-guides/000_intro.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: 来源证据：Serena cli commands may start IDE

- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：Serena cli commands may start IDE
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/oraios/serena/issues/1578 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：Enabling the `julia` language server kills the STDIO MCP server right after `initialize` ("tools fetch failed")

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Enabling the `julia` language server kills the STDIO MCP server right after `initialize` ("tools fetch failed")
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/oraios/serena/issues/1577 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：find_referencing_symbols returns 0 for TypeScript while find_symbol/definition work — tsserver loads files as inferred…

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：find_referencing_symbols returns 0 for TypeScript while find_symbol/definition work — tsserver loads files as inferred projects, not the real tsconfig project
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/oraios/serena/issues/1586 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 可能修改宿主 AI 配置

- Trigger: 项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。
- Host AI rule: 列出会写入的配置文件、目录和卸载/回滚步骤。
- Why it matters: 安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。
- Evidence: capability.host_targets | https://github.com/oraios/serena | host_targets=mcp_host, claude_code, claude, codex
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：serena-hooks remind crashes on Copilot CLI PreToolUse events for freeform tools like apply_patch.

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：serena-hooks remind crashes on Copilot CLI PreToolUse events for freeform tools like apply_patch.
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | https://github.com/oraios/serena/issues/1583 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

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

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

- Trigger: no_demo
- Evidence: downstream_validation.risk_items | https://github.com/oraios/serena | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: no_demo
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | https://github.com/oraios/serena | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: 来源证据：Security: COMMAND_INJECTION in agent.py:1222 (subprocess shell=True)

- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Security: COMMAND_INJECTION in agent.py:1222 (subprocess shell=True)
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/oraios/serena/issues/1585 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
