# agent-search-mcp - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## 怎么开始

- `npx -y agent-search-mcp` 证据：`README.md` Claim：`clm_0003` supported 0.86
- `npm install -g agent-search-mcp` 证据：`README.md` Claim：`clm_0004` supported 0.86
- `npm install -g mcp-slim-guard` 证据：`README.md` Claim：`clm_0005` supported 0.86
- `git clone https://github.com/lennney/agent-search-mcp.git` 证据：`README.md` Claim：`clm_0006` 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 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`AGENTS.md`, `CHANGELOG.md`, `README.md`, `README_zh.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_0007` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0008` 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

### 上下文规模

- 文件总数：185
- 重要文件覆盖：40/185
- 证据索引条目：77
- 角色 / Skill 条目：36

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **Agent Search MCP: Free Web Search for AI Agents**（project_doc）：Agent Search MCP: Free Web Search for AI Agents 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Benchmarks**（project_doc）：Agent Search MCP keeps three evidence tracks: historical live measurements, deterministic formatting regression, and a review-gated search-quality pipeline. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmarks/README.md`
- **MCP 2026-07-28 experimental entry**（project_doc）：This private package is the isolated Node.js 20+ compatibility track for Agent Search. It pins the split TypeScript SDK v2 packages to 2.0.0-beta.5 and explicitly serves MCP 2026-07-28 , with a 2025-11-25 legacy fallback. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`experiments/mcp-2026/README.md`
- **Agent Search MCP**（project_doc）：多引擎统一搜索 MCP Server，提供 stdio/HTTP MCP 接入和 fasm CLI。产品重点是 免费 + 省 Token + 中文原生 + 多源聚合 。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`
- **系统架构**（project_doc）：项目架构总览：分层、数据流、关键模式 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/architecture.md`
- **Conventions**（project_doc）：类别 规则 示例 ------ ------ ------ 文件/目录 kebab-case.ts free-search.ts , free-search-advanced.ts 函数 camelCase searchWithFallback , searchDuckDuckGo 类/类型/接口 PascalCase SearchResult , BraveProvider , ScoredResult 常量 UPPER SNAKE FREE ENGINES , ENGINE WEIGHTS 环境变量 UPPER SNAKE HTTP AUTH TOKEN , BRAVE API KEY 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/conventions.md`
- **HTTP Deployment Guide**（project_doc）：Agent Search MCP keeps stdio as the zero-configuration local default. HTTP mode is intended for controlled network deployment and requires authentication unless the operator explicitly opts out. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/http-deployment.md`
- **Documentation**（project_doc）：This directory contains current product documentation and reproducible evidence. Completed plans and superseded reviews are retained in Git history instead of the published documentation tree. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/index.md`
- **Agent Search 产品架构与代码实现调查**（project_doc）：1. 搜索请求由谁规划，何时并行、何时继续、何时停止； 2. 相关性、来源可靠性、多源印证是否混成一个分数； 3. 如何控制正文、摘要和工具定义的 Token； 4. 如何暴露引用、失败、限流和重试证据； 5. 哪些能力应该留在 MCP 检索核心，哪些应该属于上层 Search Agent。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/research/2026-07-26-agent-search-product-architecture.md`
- **Contributing to Agent Search MCP**（project_doc）：Thank you for your interest in contributing! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Agent Search MCP：给 AI Agent 的免费网页搜索**（project_doc）：Agent Search MCP：给 AI Agent 的免费网页搜索 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README_zh.md`
- **Claude Code Integration**（project_doc）：Add to your Claude Code MCP config: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/claude-code-setup.md`
- **Cursor Integration**（project_doc）：In Cursor's AI chat, it will automatically use the search tool when you ask it to search the web. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/cursor-setup.md`
- **Slim Guard evidence handoff v1**（project_doc）：Status: optional integration contract Producer: Agent Search MCP Consumer: Slim Guard or another policy/compression middleware 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/contracts/slim-guard-evidence-handoff-v1.md`
- **DDG HTML/Lite network observation**（project_doc）：Date: 2026-07-26 Asia/Shanghai Scope: one local runner and one network exit 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-ddg-html-lite-network-observation.md`
- **Query-aware evidence packet evidence**（project_doc）：Query-aware evidence packet evidence 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-evidence-packets.md`
- **P2 search-quality pilot evidence**（project_doc）：Status note: this document records the original human-gated pilot. The current default is the auditable AI path documented in 2026-07-26-search-pooling-contract.md ./2026-07-26-search-pooling-contract.md : two different model families judge blinded candidates and a third family resolves only disagreements. The pending-human fixtures remain as historical and compatibility artifacts. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-p2-quality-pilot.md`
- **Release candidate packed smoke — 0c89ec1**（project_doc）：Release candidate packed smoke — 0c89ec1 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-release-candidate-0c89ec1.md`
- **Release candidate packed smoke — a1de485**（project_doc）：Release candidate packed smoke — a1de485 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-release-candidate-a1de485.md`
- **Release candidate packed smoke — 2026-07-26**（project_doc）：Release candidate packed smoke — 2026-07-26 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-release-candidate-smoke.md`
- **Non-empty reviewer-pipeline pilot**（project_doc）：The search-quality pipeline now has a real non-empty qualification capture and two independent blinded reviewer packets: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-reviewer-pilot.md`
- **Multi-system search review pooling contract**（project_doc）：Multi-system search review pooling contract 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/2026-07-26-search-pooling-contract.md`
- **MCP 2026 P2 fallback evidence**（project_doc）：Verify that an SDK v2 beta.5 client configured with versionNegotiation.mode = "auto" can probe the production SDK v1 server and fall back to MCP 2025-11-25 without changing the stable tool contract. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/mcp-2026-p2-fallback.md`
- **MCP 2026 P2 HTTP behavior matrix**（project_doc）：This package verifies the remaining stateful and security-sensitive behavior around the isolated MCP 2026-07-28 entry. It does not promote that entry or replace the official conformance release gate. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/mcp-2026-p2-http-matrix.md`
- **MCP 2026 routing-header evidence**（project_doc）：This evidence closes the roadmap item for Mcp-Param- canonicalization and duplicate routing-header handling in the private Node.js 20+ experimental entry. It does not claim final MCP 2026-07-28 conformance. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/evidence/mcp-2026-routing-headers.md`
- **Outcome**（project_doc）：Build a local-first MCP ecosystem in which: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-07-25-mcp-ecosystem-and-2026-readiness.md`
- **Agent Search MCP v3.2.0**（project_doc）：Free search remains the complete default product. This release adds explicit, budgeted paid-provider escalation for users who bring their own API keys, without turning configured credentials into implicit spending authorization. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/releases/v3.2.0.md`
- **How established systems evaluate search quality**（project_doc）：How established systems evaluate search quality 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/research/2026-07-26-search-quality-evaluation.md`
- **agent-search-mcp 迭代路线图 — v3.1.x → 下一可发布版本**（project_doc）：agent-search-mcp 迭代路线图 — v3.1.x → 下一可发布版本 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/superpowers/plans/2026-07-22-iteration-roadmap.md`
- **Changelog**（project_doc）：版本变更记录 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Contributor Covenant Code of Conduct**（project_doc）：Contributor Covenant Code of Conduct 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CODE_OF_CONDUCT.md`
- **Agent Search MCP — Handover**（project_doc）：当前状态、稳定契约和下一步 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`HANDOVER.md`
- **Security Policy**（project_doc）：If you discover a security vulnerability, please report it privately by emailing lennney@users.noreply.github.com . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`
- **Benchmark data licenses**（project_doc）：Project source code remains under the repository's Apache-2.0 license. Retrieved third-party text inside benchmark fixtures is not automatically covered by that license. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmarks/DATA_LICENSES.md`
- **Benchmark Methodology**（project_doc）：The benchmark separates live retrieval from deterministic output measurement. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmarks/methodology.md`
- **Benchmark Report — 2026-07-24**（project_doc）：Metric Normal Compact Compact Aggressive -------- -------- --------- ------------------- Success rate 100.0% 100.0% 96.7% Avg engines/query 2.0 2.0 2.0 Waterfall phase 1 100% 100% 100% Avg tokens 1582 1128 1020 Avg latency 15153ms 16569ms 16249ms P50 latency 14801ms 16310ms 15948ms P95 latency 18351ms 19919ms 19326ms Avg confidence 0.64 0.64 0.63 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmarks/reports/2026-07-24.md`

## 证据索引

- 共索引 77 条证据。

- **Agent Search MCP: Free Web Search for AI Agents**（documentation）：Agent Search MCP: Free Web Search for AI Agents 证据：`README.md`
- **Benchmarks**（documentation）：Agent Search MCP keeps three evidence tracks: historical live measurements, deterministic formatting regression, and a review-gated search-quality pipeline. 证据：`benchmarks/README.md`
- **MCP 2026-07-28 experimental entry**（documentation）：This private package is the isolated Node.js 20+ compatibility track for Agent Search. It pins the split TypeScript SDK v2 packages to 2.0.0-beta.5 and explicitly serves MCP 2026-07-28 , with a 2025-11-25 legacy fallback. 证据：`experiments/mcp-2026/README.md`
- **Package**（package_manifest）：{ "name": "agent-search-mcp", "mcpName": "io.github.lennney/agent-search-mcp", "version": "3.2.0", "description": "Free, lightweight MCP search for AI agents — no API keys required, 8 zero-key engines, compact multi-source evidence.", "type": "module", "main": "./dist/index.js", "bin": { "agent-search-mcp": "dist/index.js", "fasm": "dist/cli.js" }, "files": "dist/ ", "README.md", "LICENSE", "CHANGELOG.md" , "engines": { "node": " =18.17" }, "repository": { "type": "git", "url": "git+https://github.com/lennney/agent-search-mcp.git" }, "homepage": "https://github.com/lennney/agent-search-mcp", "bugs": { "url": "https://github.com/lennney/agent-search-mcp/issues" }, "license": "Apache-2.0", "k… 证据：`package.json`
- **Package**（package_manifest）：{ "name": "@agent-search-mcp/experimental-2026", "version": "0.1.0", "private": true, "type": "module", "engines": { "node": " =20" }, "scripts": { "build": "tsc", "evidence:p2": "npm run build && node scripts/capture-p2-evidence.mjs", "test": "npm run build && vitest run", "start:http": "node dist/http.js", "start:stdio": "node dist/stdio.js" }, "dependencies": { "@modelcontextprotocol/node": "2.0.0-beta.5", "@modelcontextprotocol/server": "2.0.0-beta.5", "zod": "4.4.3" }, "devDependencies": { "@modelcontextprotocol/client": "2.0.0-beta.5", "@types/node": "26.1.1", "typescript": "6.0.3", "vitest": "3.2.6" } } 证据：`experiments/mcp-2026/package.json`
- **Agent Search MCP**（documentation）：多引擎统一搜索 MCP Server，提供 stdio/HTTP MCP 接入和 fasm CLI。产品重点是 免费 + 省 Token + 中文原生 + 多源聚合 。 证据：`AGENTS.md`
- **系统架构**（documentation）：三层架构：工具层（Agent 接口） → 聚合层（质量引擎） → 引擎层（搜索后端）。 所有路径都有降级：如果上层失败，下层保证不中断。 证据：`docs/architecture.md`
- **Conventions**（documentation）：类别 规则 示例 ------ ------ ------ 文件/目录 kebab-case.ts free-search.ts , free-search-advanced.ts 函数 camelCase searchWithFallback , searchDuckDuckGo 类/类型/接口 PascalCase SearchResult , BraveProvider , ScoredResult 常量 UPPER SNAKE FREE ENGINES , ENGINE WEIGHTS 环境变量 UPPER SNAKE HTTP AUTH TOKEN , BRAVE API KEY 证据：`docs/conventions.md`
- **HTTP Deployment Guide**（documentation）：Agent Search MCP keeps stdio as the zero-configuration local default. HTTP mode is intended for controlled network deployment and requires authentication unless the operator explicitly opts out. 证据：`docs/http-deployment.md`
- **Documentation**（documentation）：This directory contains current product documentation and reproducible evidence. Completed plans and superseded reviews are retained in Git history instead of the published documentation tree. 证据：`docs/index.md`
- **Agent Search 产品架构与代码实现调查**（documentation）：1. 搜索请求由谁规划，何时并行、何时继续、何时停止； 2. 相关性、来源可靠性、多源印证是否混成一个分数； 3. 如何控制正文、摘要和工具定义的 Token； 4. 如何暴露引用、失败、限流和重试证据； 5. 哪些能力应该留在 MCP 检索核心，哪些应该属于上层 Search Agent。 证据：`docs/research/2026-07-26-agent-search-product-architecture.md`
- **Contributing to Agent Search MCP**（documentation）：Thank you for your interest in contributing! 证据：`CONTRIBUTING.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **Agent Search MCP：给 AI Agent 的免费网页搜索**（documentation）：Agent Search MCP：给 AI Agent 的免费网页搜索 证据：`README_zh.md`
- **Claude Code Integration**（documentation）：Add to your Claude Code MCP config: 证据：`examples/claude-code-setup.md`
- **Cursor Integration**（documentation）：In Cursor's AI chat, it will automatically use the search tool when you ask it to search the web. 证据：`examples/cursor-setup.md`
- **Slim Guard evidence handoff v1**（documentation）：Status: optional integration contract Producer: Agent Search MCP Consumer: Slim Guard or another policy/compression middleware 证据：`docs/contracts/slim-guard-evidence-handoff-v1.md`
- **DDG HTML/Lite network observation**（documentation）：Date: 2026-07-26 Asia/Shanghai Scope: one local runner and one network exit 证据：`docs/evidence/2026-07-26-ddg-html-lite-network-observation.md`
- **Query-aware evidence packet evidence**（documentation）：Query-aware evidence packet evidence 证据：`docs/evidence/2026-07-26-evidence-packets.md`
- **P2 search-quality pilot evidence**（documentation）：Status note: this document records the original human-gated pilot. The current default is the auditable AI path documented in 2026-07-26-search-pooling-contract.md ./2026-07-26-search-pooling-contract.md : two different model families judge blinded candidates and a third family resolves only disagreements. The pending-human fixtures remain as historical and compatibility artifacts. 证据：`docs/evidence/2026-07-26-p2-quality-pilot.md`
- **Release candidate packed smoke — 0c89ec1**（documentation）：Release candidate packed smoke — 0c89ec1 证据：`docs/evidence/2026-07-26-release-candidate-0c89ec1.md`
- **Release candidate packed smoke — a1de485**（documentation）：Release candidate packed smoke — a1de485 证据：`docs/evidence/2026-07-26-release-candidate-a1de485.md`
- **Release candidate packed smoke — 2026-07-26**（documentation）：Release candidate packed smoke — 2026-07-26 证据：`docs/evidence/2026-07-26-release-candidate-smoke.md`
- **Non-empty reviewer-pipeline pilot**（documentation）：The search-quality pipeline now has a real non-empty qualification capture and two independent blinded reviewer packets: 证据：`docs/evidence/2026-07-26-reviewer-pilot.md`
- **Multi-system search review pooling contract**（documentation）：Multi-system search review pooling contract 证据：`docs/evidence/2026-07-26-search-pooling-contract.md`
- **MCP 2026 P2 fallback evidence**（documentation）：Verify that an SDK v2 beta.5 client configured with versionNegotiation.mode = "auto" can probe the production SDK v1 server and fall back to MCP 2025-11-25 without changing the stable tool contract. 证据：`docs/evidence/mcp-2026-p2-fallback.md`
- **MCP 2026 P2 HTTP behavior matrix**（documentation）：This package verifies the remaining stateful and security-sensitive behavior around the isolated MCP 2026-07-28 entry. It does not promote that entry or replace the official conformance release gate. 证据：`docs/evidence/mcp-2026-p2-http-matrix.md`
- **MCP 2026 routing-header evidence**（documentation）：This evidence closes the roadmap item for Mcp-Param- canonicalization and duplicate routing-header handling in the private Node.js 20+ experimental entry. It does not claim final MCP 2026-07-28 conformance. 证据：`docs/evidence/mcp-2026-routing-headers.md`
- **Outcome**（documentation）：Build a local-first MCP ecosystem in which: 证据：`docs/plans/2026-07-25-mcp-ecosystem-and-2026-readiness.md`
- **Agent Search MCP v3.2.0**（documentation）：Free search remains the complete default product. This release adds explicit, budgeted paid-provider escalation for users who bring their own API keys, without turning configured credentials into implicit spending authorization. 证据：`docs/releases/v3.2.0.md`
- **How established systems evaluate search quality**（documentation）：How established systems evaluate search quality 证据：`docs/research/2026-07-26-search-quality-evaluation.md`
- **agent-search-mcp 迭代路线图 — v3.1.x → 下一可发布版本**（documentation）：agent-search-mcp 迭代路线图 — v3.1.x → 下一可发布版本 证据：`docs/superpowers/plans/2026-07-22-iteration-roadmap.md`
- **Glama**（structured_config）：{ "$schema": "https://glama.ai/mcp/schemas/server.json", "maintainers": "lennney" , "relatedServers": "punkpeye/free-kagi-search", "secretive/duckduckgo-mcp-server", "tavily-ai/tavily-mcp", "exa-labs/exa-mcp-server", "modelcontextprotocol/server-brave-search", "nicholasgriffintn/mcp-server-search" } 证据：`glama.json`
- **Docker Compose**（source_file）：version: '3.8' services: agent-search-mcp: build: . container name: agent-search-mcp ports: - "3000:3000" environment: - MODE=http - PORT=3000 - ENABLE CORS=true - CORS ORIGIN= - DEFAULT ENGINE=duckduckgo restart: unless-stopped healthcheck: test: "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health" interval: 30s timeout: 10s retries: 3 start period: 10s 证据：`docker-compose.yml`
- **Docker Compose**（source_file）：version: "3.8" services: agent-search: image: node:20-slim working dir: /app command: npx agent-search-mcp volumes: - .:/app ports: - "3000:3000" environment: - BRAVE API KEY=${BRAVE API KEY:-} - TAVILY API KEY=${TAVILY API KEY:-} - EXA API KEY=${EXA API KEY:-} stdin open: true tty: true 证据：`examples/docker-compose.yml`
- **Cli**（source_file）：import { readFileSync, realpathSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join, resolve } from 'path'; import { SEARCH PROVIDERS, type SearchProvider, } from './types.js'; import { searchWithFallback } from './tools/free-search.js'; import { createHttpServer } from './infrastructure/http.js'; import { loadConfig } from './infrastructure/config.js'; import { createDoctorReport, formatDoctorReport, } from './infrastructure/doctor.js'; import { checkForUpdates } from './infrastructure/version-check.js'; ⋮---- export interface CliArgs { command: 'search' 'extract' 'serve' 'doctor' 'help'; query?: string; url?: string; count?: number; engines?: SearchProvider ; port… 证据：`src/cli.ts`
- **Index**（source_file）：import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; ⋮---- import { loadConfig } from './infrastructure/config.js'; import { createHttpServer } from './infrastructure/http.js'; import { logger } from './infrastructure/logger.js'; import { createAgentSearchServer } from './server.js'; ⋮---- async function main : Promise 证据：`src/index.ts`
- **Server**（source_file）：import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; ⋮---- import type { Config } from './infrastructure/config.js'; import { ToolPolicy } from './infrastructure/tool-policy.js'; import { readCurrentVersion } from './infrastructure/version-check.js'; import { registerCapabilities } from './tools/capabilities.js'; import { healthTracker, serverMetrics, } from './tools/free-search.js'; import { registerHealth, registerHealthMetrics } from './tools/health.js'; import { registerConfiguredTools } from './tools/registry.js'; ⋮---- export function createAgentSearchServer config: Config : McpServer 证据：`src/server.ts`
- **Vitest.Config**（source_file）：import { defineConfig } from 'vitest/config'; 证据：`vitest.config.ts`
- **Server**（source_file）：import { McpServer, createMcpHandler, type McpHttpHandler, type McpRequestContext, } from '@modelcontextprotocol/server'; ⋮---- export interface SearchOptions { query: string; count?: number; engines?: Array ; language?: string; waterfall?: boolean; enrich?: boolean; } ⋮---- export interface SearchResponse { query: string; engines: string ; results: Array ; meta: { total: number; high confidence: number; engines: string ; evidence budget?: { unit: 'characters'; limit: number; used: number; truncated results: number; }; }; security note: string; } ⋮---- export interface SearchExecutionContext { signal?: AbortSignal; traceContext?: W3CTraceContext; } ⋮---- export interface W3CTraceContext { t… 证据：`experiments/mcp-2026/src/server.ts`
- **Duckduckgo Html**（source_file）：import { SearchResult, type EngineSearchOptions } from '../types.js'; import { logger } from '../infrastructure/logger.js'; import { withTimeout } from '../infrastructure/abort.js'; import { fetchForEngine } from '../infrastructure/engine-http.js'; import { EngineAdapterError } from './engine-error.js'; ⋮---- export class DuckDuckGoFallbackError extends EngineAdapterError ⋮---- constructor message: string, cause?: unknown ⋮---- function extractRealUrl href: string : string null ⋮---- export async function searchDuckDuckGoHtml query: string, limit: number = 10, options?: EngineSearchOptions : Promise ⋮---- b: '', // first-page marker ddgs pattern ⋮---- export async function searchDuckDuckGoL… 证据：`src/engines/duckduckgo-html.ts`
- **Duckduckgo Web**（source_file）：import { withTimeout } from '../infrastructure/abort.js'; import { fetchForEngine } from '../infrastructure/engine-http.js'; import { logger } from '../infrastructure/logger.js'; import type { EngineSearchOptions, SearchResult } from '../types.js'; import { EngineAdapterError } from './engine-error.js'; ⋮---- type DdgApiResult = { t?: unknown; u?: unknown; a?: unknown; n?: unknown; }; ⋮---- export async function searchDuckDuckGoWeb query: string, limit: number = 10, options?: EngineSearchOptions, : Promise ⋮---- function navigationHeaders : Record ⋮---- function scriptHeaders : Record ⋮---- async function readBoundedText response: Response : Promise ⋮---- function ensureUsableResponse stage… 证据：`src/engines/duckduckgo-web.ts`
- **Duckduckgo**（source_file）：import { SearchResult, type EngineSearchOptions } from '../types.js'; import { logger } from '../infrastructure/logger.js'; import { searchDuckDuckGoHtml } from './duckduckgo-html.js'; import { searchDuckDuckGoWeb } from './duckduckgo-web.js'; import { isEngineAdapterError } from './engine-error.js'; ⋮---- export async function searchDuckDuckGo query: string, limit: number = 10, options?: EngineSearchOptions : Promise 证据：`src/engines/duckduckgo.ts`
- **Index**（source_file）：import { SearchProvider, SearchProviderInfo } from '../types.js'; ⋮---- interface LocalizedText { en: string; zh: string; } ⋮---- export interface EngineCapability extends SearchProviderInfo { credentialEnvironment?: string; strengths: LocalizedText; } ⋮---- export function hasEngineCredential engine: SearchProvider, environment: Readonly = process.env, : boolean 证据：`src/engines/index.ts`
- **Config**（source_file）：import type { SearchProviderMode } from './search-provider-policy.js'; ⋮---- export interface Config { mode: 'stdio' 'http' 'both'; port: number; enableCors: boolean; corsOrigin: string; allowedOrigins: string ; httpAuthToken: string; httpAllowUnauthenticated: boolean; useProxy: boolean; proxyUrl: string; defaultEngine: string; allowedEngines: string ; ALLOWED ENGINES: string; DENIED ENGINES: string; enabledTools: string ; disabledTools: string ; outputStyle: 'normal' 'compact'; snippetLength: number; maxFullResults: number; evidenceBudgetChars: number; searchBudgetMaxCalls: number; searchBudgetMaxElapsedMs: number; searchBudgetMaxResults: number; providerCooldownStorePath: string; searchCa… 证据：`src/infrastructure/config.ts`
- **Fetch Tools**（source_file）：import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; import { logger } from '../infrastructure/index.js'; ⋮---- function parseCsdnArticleUrl url: string : URL ⋮---- export async function fetchGithubReadme url: string : Promise ⋮---- // Try common README filenames ⋮---- export async function fetchCsdnArticle url: string : Promise ⋮---- export async function fetchJuejinArticle url: string : Promise ⋮---- / Register the GitHub README fetch tool. / export function setupFetchGithubReadme server: McpServer : void ⋮---- / Register the CSDN article fetch tool. / export function setupFetchCsdnArticle server: McpServer : void ⋮---- / Register the Juejin articl… 证据：`src/tools/fetch-tools.ts`
- **Free Extract**（source_file）：import { z } from 'zod'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { validateUrl } from '../infrastructure/url-validator.js'; ⋮---- export function registerFreeExtract server: McpServer 证据：`src/tools/free-extract.ts`
- **Free Search Advanced**（source_file）：import { z } from 'zod'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { searchWithFallback } from './free-search.js'; import { createSearchToolResult, searchOutputSchema, } from './search-output.js'; ⋮---- export function registerFreeSearchAdvanced server: McpServer 证据：`src/tools/free-search-advanced.ts`
- **Free Search**（source_file）：import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; import { searchDuckDuckGo } from '../engines/duckduckgo.js'; import { searchSogou } from '../engines/sogou.js'; import { searchBing } from '../engines/bing.js'; import { searchBaidu } from '../engines/baidu.js'; import { BraveProvider } from '../engines/brave.js'; import { TavilyProvider } from '../engines/tavily.js'; import { searchExa } from '../engines/exa.js'; import { searchYouCom } from '../engines/youcom.js'; import { searchTencentWsa } from '../engines/tencent-wsa.js'; import { searchBocha } from '../engines/bocha.js'; import { searchSerper } from '../engines/serper.js'; import { classifyEn… 证据：`src/tools/free-search.ts`
- **Registry**（source_file）：import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; ⋮---- import type { ToolPolicy } from '../infrastructure/tool-policy.js'; import { setupFetchCsdnArticle, setupFetchGithubReadme, setupFetchJuejinArticle, } from './fetch-tools.js'; import { registerFreeExtract } from './free-extract.js'; import { registerFreeSearchAdvanced } from './free-search-advanced.js'; import { setupFreeSearchTool } from './free-search.js'; import { registerSearchWithSynthesis } from './search-with-synthesis.js'; ⋮---- interface LocalizedText { en: string; zh: string; } ⋮---- export interface ToolCapability { id: string; summary: LocalizedText; bestFor: LocalizedText; register: server: McpServe… 证据：`src/tools/registry.ts`
- **Search With Synthesis**（source_file）：import { z } from 'zod'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { searchWithFallback } from './free-search.js'; import type { SearchWithFallbackOptions } from './free-search.js'; import { buildPromptHint } from '../synthesis/prompt-builder.js'; import type { SynthesisResult } from '../synthesis/prompt-builder.js'; import { logger } from '../infrastructure/logger.js'; ⋮---- export function registerSearchWithSynthesis server: McpServer 证据：`src/tools/search-with-synthesis.ts`
- **Changelog**（documentation）：Headline: Free by default, paid quality escalation when explicitly enabled, with auditable evidence, budgets, and safer cross-platform operation. ℹ️ Pre-release : v3.2.0-beta.0 was published on npm tag: beta on 2026-07-27 for server validation before this stable release. The beta is identical to this stable candidate in features. 证据：`CHANGELOG.md`
- **Contributor Covenant Code of Conduct**（documentation）：Contributor Covenant Code of Conduct 证据：`CODE_OF_CONDUCT.md`
- **Agent Search MCP — Handover**（documentation）：- package.json 当前版本为 3.2.0 ；精确变更历史以 Git 和 CHANGELOG.md 为准。 - 稳定产品面是 Node.js =18.17、TypeScript ESM、MCP stdio/HTTP 和 fasm CLI。 - 16 个适配器均进入统一路由：9 个零密钥，7 个可选 API。Wiby 是零密钥 小型网页补充源；Tencent WSA、Bocha、Serper 需要用户自带凭证。 - free search news 与 Bing News RSS 路径已在发布前移除；当前没有独立新闻工具， 也不宣称通用搜索支持可强制执行的时间范围。 - Slim Guard 是独立产品；本仓库只维护可选证据交接合同。 - 2026-07-28 能力仅在 experiments/mcp-2026/ 验证，不宣称生产兼容。 - 本轮授权仅覆盖提交并推送 PR 分支、观察 CI；不发布 npm/GitHub Release， 不创建 tag，不更新 MCP Registry。 例外 ： v3.2.0-beta.0 已独立发布到 npm（tag beta ），供服务器先行验证。 本 PR 合并后将发布 v3.2.0 stable 覆盖 beta。 证据：`HANDOVER.md`
- **Security Policy**（documentation）：If you discover a security vulnerability, please report it privately by emailing lennney@users.noreply.github.com . 证据：`SECURITY.md`
- **Benchmark data licenses**（documentation）：Project source code remains under the repository's Apache-2.0 license. Retrieved third-party text inside benchmark fixtures is not automatically covered by that license. 证据：`benchmarks/DATA_LICENSES.md`
- **Benchmark Methodology**（documentation）：The benchmark separates live retrieval from deterministic output measurement. 证据：`benchmarks/methodology.md`
- **Benchmark Report — 2026-07-24**（documentation）：Metric Normal Compact Compact Aggressive -------- -------- --------- ------------------- Success rate 100.0% 100.0% 96.7% Avg engines/query 2.0 2.0 2.0 Waterfall phase 1 100% 100% 100% Avg tokens 1582 1128 1020 Avg latency 15153ms 16569ms 16249ms P50 latency 14801ms 16310ms 15948ms P95 latency 18351ms 19919ms 19326ms Avg confidence 0.64 0.64 0.63 证据：`benchmarks/reports/2026-07-24.md`
- **Queries**（structured_config）：{"q": "latest AI news 2026", "type": "news", "lang": "en"}, {"q": "TypeScript vs Rust performance comparison", "type": "tech", "lang": "en"}, {"q": "MCP server best practices", "type": "tech", "lang": "en"}, {"q": "Python async await tutorial", "type": "tech", "lang": "en"}, {"q": "Next.js 15 server components", "type": "tech", "lang": "en"}, {"q": "Docker compose vs kubernetes", "type": "tech", "lang": "en"}, {"q": "React 19 new features", "type": "tech", "lang": "en"}, {"q": "open source LLM benchmarks 2026", "type": "tech", "lang": "en"}, {"q": "how to build a RAG system", "type": "tech", "lang": "en"}, {"q": "Claude Code MCP setup guide", "type": "tech", "lang": "en"}, {"q": "Node.js 23… 证据：`benchmarks/queries.json`
- **Server**（structured_config）：{ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.lennney/agent-search-mcp", "description": "Free, lightweight MCP search for AI agents — no API keys required, 8 zero-key engines, compact multi-source evidence.", "repository": { "url": "https://github.com/lennney/agent-search-mcp", "source": "github" }, "version": "3.2.0", "packages": { "registryType": "npm", "identifier": "agent-search-mcp", "version": "3.2.0", "transport": { "type": "stdio" }, "environmentVariables": { "description": "Brave Search API key optional, enables Brave engine ", "isRequired": false, "format": "string", "isSecret": true, "name": "BRAVE API KEY" }, { "d… 证据：`server.json`
- 其余 17 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **项目概览与设计理念**：importance `high`
  - source_paths: README.md, README_zh.md, docs/index.md, docs/research/2026-07-26-agent-search-product-architecture.md
- **系统架构与搜索引擎路由**：importance `high`
  - source_paths: docs/architecture.md, src/server.ts, src/engines/index.ts, src/engines/duckduckgo.ts, src/engines/duckduckgo-html.ts
- **工具、聚合与综合引擎**：importance `high`
  - source_paths: src/tools/registry.ts, src/tools/free-search.ts, src/tools/free-search-advanced.ts, src/tools/free-extract.ts, src/tools/fetch-tools.ts
- **部署、配置与运维**：importance `high`
  - source_paths: docs/http-deployment.md, docs/conventions.md, examples/docker-compose.yml, examples/claude-code-setup.md, examples/cursor-setup.md

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `0221691c157cfe2d42a4cbc70e50d1259f953ec5`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `package.json`, `pyproject.toml`, `docs/architecture.md`, `docs/contracts/provider-families-v1.json`, `docs/contracts/slim-guard-evidence-handoff-v1.md`, `docs/contracts/slim-guard-evidence-handoff-v1.schema.json`, `docs/conventions.md`, `docs/evidence/2026-07-26-ddg-html-lite-network-observation.md`, `docs/evidence/2026-07-26-evidence-packets.md`, `docs/evidence/2026-07-26-p2-quality-pilot.md`, `docs/evidence/2026-07-26-release-candidate-0c89ec1.md`, `docs/evidence/2026-07-26-release-candidate-a1de485.md`, `docs/evidence/2026-07-26-release-candidate-smoke.md`, `docs/evidence/2026-07-26-reviewer-pilot.md`, `docs/evidence/2026-07-26-search-pooling-contract.md`, `docs/evidence/mcp-2026-p2-fallback.md`, `docs/evidence/mcp-2026-p2-http-matrix.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: 可能修改宿主 AI 配置

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

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

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

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

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

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

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

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

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

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | https://github.com/lennney/agent-search-mcp | issue_or_pr_quality=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: release_recency=unknown。
- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。
- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。
- Evidence: evidence.maintainer_signals | https://github.com/lennney/agent-search-mcp | release_recency=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
