# argus - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## 它能做什么

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

## 怎么开始

- `pip install argus-search && argus search -q "python web frameworks"` 证据：`README.md` Claim：`clm_0003` supported 0.86
- `pipx install argus-search[mcp]` 证据：`README.md` Claim：`clm_0004` supported 0.86
- `curl -X POST http://localhost:8000/api/search \` 证据：`README.md` Claim：`clm_0005` supported 0.86
- `curl -X POST http://localhost:8000/api/extract \` 证据：`README.md` Claim：`clm_0006` supported 0.86
- `curl -X POST http://localhost:8000/api/recover-url \` 证据：`README.md` Claim：`clm_0007` supported 0.86
- `curl http://localhost:8000/api/health` 证据：`README.md` Claim：`clm_0008` supported 0.86
- `curl -H "Authorization: Bearer $ARGUS_ADMIN_API_KEY" \` 证据：`README.md` Claim：`clm_0009` supported 0.86
- `curl -s https://raw.githubusercontent.com/Khamel83/argus/main/scripts/provision-mcp-client.sh | bash -s local              # this machine; uses local stdio if argus is installed` 证据：`README.md` Claim：`clm_0010` supported 0.86
- `curl -s https://raw.githubusercontent.com/Khamel83/argus/main/scripts/provision-mcp-client.sh | bash -s user@100.x.x.x    # remote machine` 证据：`README.md` Claim：`clm_0011` supported 0.86
- `pip install "argus-search[mcp]"         # install from PyPI (with MCP support)` 证据：`AGENTS.md` Claim：`clm_0012` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`AGENTS.md`, `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 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`AGENTS.md`, `README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`AGENTS.md`, `CLAUDE.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`AGENTS.md`, `README.md`
- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`AGENTS.md`, `CONTRIBUTING.md`, `LLM-OVERVIEW.md`, `README.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_0014` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`AGENTS.md`, `README.md` Claim：`clm_0015` 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。

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **Argus Documentation**（project_doc）：Top-level entry points live at the repo root: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/README.md`
- **AGENTS.md — Argus**（project_doc）：What this file is for: the canonical guide for AI coding agents working in this repository Claude Code, Codex, Cursor, Copilot, OpenCode, and friends . Human contributors should start with CONTRIBUTING.md CONTRIBUTING.md ; background on the project lives in CONTEXT.md CONTEXT.md and README.md README.md . CLAUDE.md CLAUDE.md is a short pointer back here with Claude-Code-specific notes. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`
- **Argus**（project_doc）：! Python 3.11+ https://img.shields.io/badge/Python-3.11+-blue https://www.python.org/downloads/ ! PyPI Version https://img.shields.io/pypi/v/argus-search https://pypi.org/project/argus-search/ ! PyPI Downloads https://img.shields.io/pepy/dt/argus-search https://pepy.tech/projects/argus-search ! License: MIT https://img.shields.io/badge/license-MIT-green LICENSE ! CI https://github.com/Khamel83/argus/actions/workflow… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Argus examples**（project_doc）：Minimal runnable examples. Every Python example here works with zero API keys — Argus falls back to DuckDuckGo when no other providers are configured. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/README.md`
- **Claude Code — Argus**（project_doc）：What this file is for: Claude Code's entry point into this repo. The canonical guide for any AI coding agent Claude Code, Codex, Cursor, Copilot, OpenCode lives in AGENTS.md AGENTS.md — Claude Code reads both, but the content lives there. Keep this file short. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`
- **MCP Client Setup**（project_doc）：Argus supports local stdio MCP and remote streamable HTTP MCP. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/mcp-clients.md`
- **Contributing to Argus**（project_doc）：Argus development is standardized on Python 3.12. The published package still supports Python 3.11+, but local repo work, CI parity, and release verification should use the commands below. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Argus Publicity — Step-by-Step Instructions**（project_doc）：Argus Publicity — Step-by-Step Instructions 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/PUBLICITY-CHECKLIST.md`
- **Dashboard Design System**（project_doc）：Argus uses a documented design system for its dashboard UI. The canonical source is .interface-design/system.md ../.interface-design/system.md at the repo root. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/dashboard-design.md`
- **Providers and Extractors**（project_doc）：This page is a fuller reference for the search providers and content extractors behind Argus. For the short version with budgets and signup links see the Providers section of ../README.md ../README.md . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/providers.md`
- **Releasing Argus**（project_doc）：The repository version and the published package version are separate until a release is published. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/releasing.md`
- **Troubleshooting**（project_doc）：If you can't find your issue here, run argus doctor and include its output when opening a bug report https://github.com/Khamel83/argus/issues/new?template=bug report.yml . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/troubleshooting.md`
- **Obscura: What to Take for Argus**（project_doc）：Source: https://github.com/h4ckf0r0day/obscura Date: 2026-04-24 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/research/obscura/research.md`
- **Argus Retrieval Platform Roadmap**（project_doc）：Summary - Reposition Argus as a retrieval platform for agents: search, recover, capture, summarize, and persist web knowledge. - Internalize the docs-cache pattern into Argus itself. Do not require a sibling repository. - Default runtime corpus output to a global user data root resolved via platformdirs , overrideable with ARGUS DATA ROOT . - Make runtime paths visible through CLI, HTTP, and MCP. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/roadmaps/argus-retrieval-platform.md`
- **Multi-Egress Worker Implementation Plan**（project_doc）：Multi-Egress Worker Implementation Plan 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/superpowers/plans/2026-05-22-multi-egress-worker.md`
- **Argus Simple Dashboard Design**（project_doc）：Date: 2026-05-05 Status: Approved Deciders: khamel83, Gemini CLI 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/superpowers/specs/2026-05-05-argus-dashboard-design.md`
- **Free Mode + Dashboard Call Count Fix**（project_doc）：Free Mode + Dashboard Call Count Fix 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/superpowers/specs/2026-05-22-free-mode-dashboard-fix-design.md`
- **Multi-Egress Worker Architecture**（project_doc）：Date: 2026-05-22 Status: Approved Motivation: Argus runs on homelab Spectrum residential, 23.241.236.110 . Yahoo Search blocks Spectrum IP ranges. oci-dev Oracle, 141.148.146.79 can reach Yahoo. Rather than hardcoding "Yahoo → oci-dev," the system should be state-driven: declare available machines, probe what each can reach, route providers through whichever egress works — and update automatically when reachability… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/superpowers/specs/2026-05-22-multi-egress-worker-design.md`
- **Design System — Argus Dashboard**（project_doc）：Personality: Precision & Density Foundation: cool gray-950 base — terminal dark, not blue-tinted Depth: borders-only 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.interface-design/system.md`
- **Changelog**（project_doc）：All notable changes to this project will be documented in this file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Contributor Covenant Code of Conduct**（project_doc）：Contributor Covenant Code of Conduct 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CODE_OF_CONDUCT.md`
- **Context**（project_doc）：What this file is for: background, glossary, and architectural decisions that don't belong in README.md README.md user-facing or AGENTS.md AGENTS.md AI-agent conventions . Add entries here when a term or design choice keeps coming up in reviews or issues. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTEXT.md`
- **LLM Overview — argus**（project_doc）：What this file is for: a machine-generated snapshot of repo state recent commits, env vars in use, top-level layout intended for LLM agents that want a quick situational summary without crawling the whole repo. It is regenerated by a daily cron — do not hand-edit this file , your changes will be overwritten. For the curated AI-agent guide see AGENTS.md AGENTS.md ; for user docs see README.md README.md ; for the stru… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`LLM-OVERVIEW.md`
- **Security Policy**（project_doc）：Only the latest release is actively maintained. Check PyPI https://pypi.org/project/argus-search/ for the current version. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`
- **MCP quickstart**（project_doc）：The fastest way to wire Argus into an MCP-aware client. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`examples/mcp_quickstart.md`
- **Handoff: Multi-Egress Worker Architecture**（project_doc）：Handoff: Multi-Egress Worker Architecture 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`thoughts/shared/handoffs/2026-05-22-multi-egress-worker-handoff.md`

## 证据索引

- 共索引 77 条证据。

- **Argus Documentation**（documentation）：Top-level entry points live at the repo root: 证据：`docs/README.md`
- **AGENTS.md — Argus**（documentation）：What this file is for: the canonical guide for AI coding agents working in this repository Claude Code, Codex, Cursor, Copilot, OpenCode, and friends . Human contributors should start with CONTRIBUTING.md CONTRIBUTING.md ; background on the project lives in CONTEXT.md CONTEXT.md and README.md README.md . CLAUDE.md CLAUDE.md is a short pointer back here with Claude-Code-specific notes. 证据：`AGENTS.md`
- **Argus**（documentation）：! Python 3.11+ https://img.shields.io/badge/Python-3.11+-blue https://www.python.org/downloads/ ! PyPI Version https://img.shields.io/pypi/v/argus-search https://pypi.org/project/argus-search/ ! PyPI Downloads https://img.shields.io/pepy/dt/argus-search https://pepy.tech/projects/argus-search ! License: MIT https://img.shields.io/badge/license-MIT-green LICENSE ! CI https://github.com/Khamel83/argus/actions/workflows/ci.yml/badge.svg https://github.com/Khamel83/argus/actions/workflows/ci.yml ! MCP Registry https://img.shields.io/badge/MCP-Registry-blue https://registry.modelcontextprotocol.io/servers/io.github.Khamel83/argus ! Docker https://img.shields.io/badge/ghcr.io-khamel83%2Fargus-blu… 证据：`README.md`
- **Argus examples**（documentation）：Minimal runnable examples. Every Python example here works with zero API keys — Argus falls back to DuckDuckGo when no other providers are configured. 证据：`examples/README.md`
- **Claude Code — Argus**（documentation）：What this file is for: Claude Code's entry point into this repo. The canonical guide for any AI coding agent Claude Code, Codex, Cursor, Copilot, OpenCode lives in AGENTS.md AGENTS.md — Claude Code reads both, but the content lives there. Keep this file short. 证据：`CLAUDE.md`
- **MCP Client Setup**（documentation）：Argus supports local stdio MCP and remote streamable HTTP MCP. 证据：`docs/mcp-clients.md`
- **Contributing to Argus**（documentation）：Argus development is standardized on Python 3.12. The published package still supports Python 3.11+, but local repo work, CI parity, and release verification should use the commands below. 证据：`CONTRIBUTING.md`
- **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`
- **Argus Publicity — Step-by-Step Instructions**（documentation）：Argus Publicity — Step-by-Step Instructions 证据：`docs/PUBLICITY-CHECKLIST.md`
- **Dashboard Design System**（documentation）：Argus uses a documented design system for its dashboard UI. The canonical source is .interface-design/system.md ../.interface-design/system.md at the repo root. 证据：`docs/dashboard-design.md`
- **Providers and Extractors**（documentation）：This page is a fuller reference for the search providers and content extractors behind Argus. For the short version with budgets and signup links see the Providers section of ../README.md ../README.md . 证据：`docs/providers.md`
- **Releasing Argus**（documentation）：The repository version and the published package version are separate until a release is published. 证据：`docs/releasing.md`
- **Troubleshooting**（documentation）：If you can't find your issue here, run argus doctor and include its output when opening a bug report https://github.com/Khamel83/argus/issues/new?template=bug report.yml . 证据：`docs/troubleshooting.md`
- **Obscura: What to Take for Argus**（documentation）：Source: https://github.com/h4ckf0r0day/obscura Date: 2026-04-24 证据：`docs/research/obscura/research.md`
- **Argus Retrieval Platform Roadmap**（documentation）：Summary - Reposition Argus as a retrieval platform for agents: search, recover, capture, summarize, and persist web knowledge. - Internalize the docs-cache pattern into Argus itself. Do not require a sibling repository. - Default runtime corpus output to a global user data root resolved via platformdirs , overrideable with ARGUS DATA ROOT . - Make runtime paths visible through CLI, HTTP, and MCP. 证据：`docs/roadmaps/argus-retrieval-platform.md`
- **Multi-Egress Worker Implementation Plan**（documentation）：Multi-Egress Worker Implementation Plan 证据：`docs/superpowers/plans/2026-05-22-multi-egress-worker.md`
- **Argus Simple Dashboard Design**（documentation）：Date: 2026-05-05 Status: Approved Deciders: khamel83, Gemini CLI 证据：`docs/superpowers/specs/2026-05-05-argus-dashboard-design.md`
- **Free Mode + Dashboard Call Count Fix**（documentation）：Free Mode + Dashboard Call Count Fix 证据：`docs/superpowers/specs/2026-05-22-free-mode-dashboard-fix-design.md`
- **Multi-Egress Worker Architecture**（documentation）：Date: 2026-05-22 Status: Approved Motivation: Argus runs on homelab Spectrum residential, 23.241.236.110 . Yahoo Search blocks Spectrum IP ranges. oci-dev Oracle, 141.148.146.79 can reach Yahoo. Rather than hardcoding "Yahoo → oci-dev," the system should be state-driven: declare available machines, probe what each can reach, route providers through whichever egress works — and update automatically when reachability changes. 证据：`docs/superpowers/specs/2026-05-22-multi-egress-worker-design.md`
- **Init**（source_file）：version = "1.6.2" 证据：`argus/__init__.py`
- **Config**（source_file）：log = logging.getLogger "argus.config" ⋮---- def load dotenv file path: Path - None ⋮---- line = raw line.strip ⋮---- key = key.strip ⋮---- value = value.strip .strip "'" .strip '"' ⋮---- def autoload dotenv - None ⋮---- candidates: list Path = cwd = Path.cwd ⋮---- repo root = Path file .resolve .parents 1 ⋮---- seen: set Path = set ⋮---- resolved = candidate.resolve ⋮---- @dataclass frozen=True class SearXNGConfig ⋮---- enabled: bool = False base url: str = "http://127.0.0.1:8080" residential base url: str = "" timeout seconds: int = 12 ⋮---- @dataclass frozen=True class ProviderConfig ⋮---- api key: str = "" monthly budget usd: float = 0.0 timeout seconds: int = 15 ⋮---- @dataclass frozen… 证据：`argus/config.py`
- **Per-provider Shapley attribution for this result's RRF score.**（source_file）：class SearchMode str, Enum ⋮---- RECOVERY = "recovery" DISCOVERY = "discovery" GROUNDING = "grounding" RESEARCH = "research" ⋮---- class ProviderName str, Enum ⋮---- SEARXNG = "searxng" DUCKDUCKGO = "duckduckgo" YAHOO = "yahoo" BRAVE = "brave" SERPER = "serper" TAVILY = "tavily" EXA = "exa" SEARCHAPI = "searchapi" YOU = "you" PARALLEL = "parallel" LINKUP = "linkup" VALYU = "valyu" GITHUB = "github" WOLFRAM = "wolfram" CACHE = "cache" ⋮---- class ProviderStatus str, Enum ⋮---- ENABLED = "enabled" DISABLED BY CONFIG = "disabled by config" UNAVAILABLE MISSING KEY = "unavailable missing key" TEMPORARILY DISABLED = "temporarily disabled after failures" BUDGET EXHAUSTED = "budget exhausted" DEGRA… 证据：`argus/models.py`
- **Research Pack**（source_file）：async def main - None ⋮---- broker = create broker service = WorkflowService broker ⋮---- result = await service.build research pack 证据：`examples/research_pack.py`
- **1. Configuration files Claude Code, Cursor, Claude Desktop**（source_file）：set -euo pipefail TARGET="${1:-}" ARGUS REMOTE URL="${ARGUS REMOTE URL:-http://localhost:8271}" ARGUS API KEY="${ARGUS API KEY:-}" ARGUS LOCAL COMMAND="${ARGUS LOCAL COMMAND:-$HOME/github/argus/.venv/bin/argus}" MCP URL="${ARGUS REMOTE URL%/}/mcp" if -z "$TARGET" ; then echo "Usage: $0 " &2 exit 1 fi MODE="remote" if "$TARGET" == "local" && -x "$ARGUS LOCAL COMMAND" ; then MODE="local" elif -z "$ARGUS API KEY" ; then echo "Error: ARGUS API KEY is not set and local Argus was not found at $ARGUS LOCAL COMMAND." &2 echo "Set ARGUS LOCAL COMMAND for local stdio, or load ARGUS API KEY for remote HTTP." &2 exit 1 fi SCRIPT=$ cat dict: try: return json.loads path.read text if path.exists and path.… 证据：`scripts/provision-mcp-client.sh`
- **Main**（source_file）：logger = get logger "api" ⋮---- def build rate limiter - RateLimiter ⋮---- auth = AuthConfig.from env ⋮---- current = broker factory = broker factory or create broker ⋮---- def get broker - SearchBroker ⋮---- current = factory ⋮---- current: WorkflowService None = None ⋮---- def get workflows - WorkflowService ⋮---- current = WorkflowService broker provider ⋮---- auth config = AuthConfig.from env ⋮---- @asynccontextmanager async def lifespan with probes app: FastAPI ⋮---- b = app.state.get broker ⋮---- probe task: asyncio.Task None = None ⋮---- async def run probes background - None ⋮---- cfg = get config ⋮---- probe task = asyncio.create task run probes background ⋮---- app = FastAPI ⋮----… 证据：`argus/api/main.py`
- **Routes Admin**（source_file）：router = APIRouter prefix="/admin" ⋮---- def get broker request: Request - SearchBroker ⋮---- def get workflows request: Request - WorkflowService ⋮---- @router.post "/test-provider" async def test provider req: ProviderTestRequest, broker: SearchBroker = Depends get broker ⋮---- pname = ProviderName req.provider ⋮---- provider = broker. providers.get pname ⋮---- query = SearchQuery query=req.query, mode=SearchMode.DISCOVERY, max results=3 ⋮---- @router.get "/paths", response model=PathsResponse async def corpus paths workflows: WorkflowService = Depends get workflows 证据：`argus/api/routes_admin.py`
- **Init**（source_file）：all = "rrf attribution", "shapley sample" 证据：`argus/attribution/__init__.py`
- **Shapley**（source_file）：RRF K = 60 ⋮---- player list = list players n = len player list ⋮---- rng = random.Random seed totals: dict str, float = {p: 0.0 for p in player list} ⋮---- perm = player list : ⋮---- coalition: frozenset str = frozenset v before = characteristic fn coalition ⋮---- coalition = coalition {player} v after = characteristic fn coalition ⋮---- v before = v after 证据：`argus/attribution/shapley.py`
- **Init**（source_file）：all = "SearchBroker", "create broker" 证据：`argus/broker/__init__.py`
- **Balance Check**（source_file）：logger = get logger "broker.balance check" ⋮---- @dataclass class ProviderBalance ⋮---- provider: ProviderName remaining: Optional float = None limit: Optional float = None used: Optional float = None unit: str = "queries" source: str = "" e.g. "api", "headers" raw: Optional dict = None error: Optional str = None ⋮---- async def check tavily api key: str - ProviderBalance ⋮---- resp = await client.get ⋮---- data = resp.json ⋮---- key info = data.get "key", {} usage = key info.get "usage", 0 limit = key info.get "limit", 0 remaining = max 0, limit - usage ⋮---- async def check serper api key: str - ProviderBalance ⋮---- resp = await client.post ⋮---- credits = data.get "credits", None ⋮----… 证据：`argus/broker/balance_check.py`
- **Budget Persistence**（source_file）：logger = get logger "broker.budget persistence" ⋮---- DEFAULT DB PATH = "argus budgets.db" ⋮---- SCHEMA = """ ⋮---- class BudgetStore ⋮---- def init self, db path: Optional str = None ⋮---- def get conn self - sqlite3.Connection ⋮---- def record usage self, provider: str, cost usd: float = 0.0 - None ⋮---- conn = self. get conn ⋮---- def get monthly usage self, provider: str - float ⋮---- cutoff = time.time - 30 24 3600 ⋮---- row = conn.execute ⋮---- def get usage count self, provider: str - int ⋮---- def get lifetime usage self, provider: str - float ⋮---- def get lifetime usage count self, provider: str - int ⋮---- def delete provider usage self, provider: str - int ⋮---- cursor = conn.ex… 证据：`argus/broker/budget_persistence.py`
- **Budgets**（source_file）：logger = get logger "broker.budgets" ⋮---- PROVIDER TIERS: dict ProviderName, int = { ⋮---- TIER 3 PROVIDERS = {p for p, t in PROVIDER TIERS.items if t == 3} ⋮---- class BudgetTracker ⋮---- def init self, persist path: Optional str = None ⋮---- def load from store self - None ⋮---- cutoff = time.time - 30 24 3600 ⋮---- conn = self. store. get conn rows = conn.execute ⋮---- placeholders = ",".join "?" for in TIER 3 PROVIDERS tier3 names = p.value for p in TIER 3 PROVIDERS tier3 rows = conn.execute ⋮---- tier3 rows = ⋮---- seen: set tuple str, float, float = set ⋮---- key = provider str, ts, cost ⋮---- pname = PN provider str ⋮---- def set budget self, provider: ProviderName, budget: float -… 证据：`argus/broker/budgets.py`
- **Pipeline**（source_file）：logger = get logger "broker.pipeline" ⋮---- class SearchResultPipeline ⋮---- cached = self. cache.get ⋮---- def build response self, query: SearchQuery, provider results: dict, traces: list, budget warnings: list None = None, compute attribution: bool = False - SearchResponse ⋮---- merged = reciprocal rank fusion provider results, compute attribution=compute attribution final results = dedupe results merged : query.max results response = SearchResponse 证据：`argus/broker/pipeline.py`
- **Router**（source_file）：logger = get logger "broker.router" ⋮---- class SearchBroker ⋮---- budget map = { ⋮---- @property def cache self - SearchCache ⋮---- @property def health tracker self - HealthTracker ⋮---- @property def budget tracker self - BudgetTracker ⋮---- async def search self, query: SearchQuery, compute attribution: bool = False - SearchResponse ⋮---- cache run id = os.urandom 8 .hex cached = self. pipeline.get cached ⋮---- res policy = self. config.residential.policy ⋮---- provider order = resolve routing query.mode, query.providers outcome = await self. executor.execute query, provider order response = self. pipeline.build response ⋮---- def get provider status self, provider: ProviderName - dict… 证据：`argus/broker/router.py`
- **Valyu uses USD units**（source_file）：logger = get logger "cli" ⋮---- STATUS DISPLAY = { ⋮---- def run coro ⋮---- loop = asyncio.get running loop ⋮---- loop = None ⋮---- def emit json payload ⋮---- def workflow to dict result ⋮---- def print workflow result result, as json: bool ⋮---- @click.group @click.version option version= version , prog name="argus" def cli ⋮---- @cli.command @click.option "--json", "as json", is flag=True, help="Output as JSON" def paths as json ⋮---- payload = describe corpus paths ⋮---- @click.option "--max-results", "-n", default=10, help="Max results" @click.option "--providers", "-p", multiple=False, help="Override providers comma-separated " @click.option "--session", "-s", default=None, help="Sess… 证据：`argus/cli/main.py`
- **Init**（source_file）：all = 证据：`argus/corpus/__init__.py`
- **Init**（source_file）：all = 证据：`argus/extraction/__init__.py`
- **archive.ph redirects to the archive page if one exists**（source_file）：logger = get logger "extraction.archive is" ⋮---- ARCHIVE DOMAINS = "archive.ph", "archive.is", "archive.today" ARCHIVE SUBMIT URL = "https://archive.ph/submit" ARCHIVE NEWEST URL = "https://archive.ph/newest/" ⋮---- min interval = 5.0 last request time = 0.0 lock = None ⋮---- def get lock ⋮---- lock = asyncio.Lock ⋮---- async def rate limit ⋮---- now = time.monotonic wait = min interval - now - last request time ⋮---- last request time = time.monotonic ⋮---- async def search existing url: str - Optional str ⋮---- resp = await client.get f"{ARCHIVE NEWEST URL}{url}" archive.ph redirects to the archive page if one exists If the URL is the same as what we requested, no archive exists ⋮---- fi… 证据：`argus/extraction/archive_extractor.py`
- **Also grab the title from the page**（source_file）：logger = get logger "extraction.auth" ⋮---- AUTH TIMEOUT MS = 15 000 ⋮---- browser = None contexts: dict str, object = {} ⋮---- OBScura CDP URL = os.getenv "ARGUS OBSCURA CDP URL", "" ⋮---- async def get browser ⋮---- """Get or create a shared Playwright browser instance. Tries Obscura CDP first if ARGUS OBSCURA CDP URL is set , then falls back to launching headless Chrome. """ ⋮---- pw = await async playwright .start ⋮---- browser = await pw.chromium.connect over cdp OBScura CDP URL ⋮---- browser = await pw.chromium.launch headless=True ⋮---- async def get context domain: str ⋮---- browser = await get browser ⋮---- cookie path = get cookie path domain ⋮---- cookies = load editthiscookie js… 证据：`argus/extraction/auth_extractor.py`
- **Crawl4Ai Extractor**（source_file）：logger = get logger "extraction.crawl4ai" ⋮---- async def extract crawl4ai url: str - ExtractedContent ⋮---- result = await crawler.arun url ⋮---- final url = getattr result, "url", None or getattr result, "redirected url", None or url ⋮---- text = result.markdown.strip 证据：`argus/extraction/crawl4ai_extractor.py`
- **Threshold for treating truncated-but-quality-passed content as "keep trying".**（source_file）：logger = get logger "extraction" ⋮---- JINA READER URL = "https://r.jina.ai/" ⋮---- cache = ExtractionCache ⋮---- domain limiter = DomainRateLimiter ⋮---- quality gate = QualityGate ⋮---- jina call count = 0 jina accumulated tokens = 0 JINA SYNC INTERVAL = 10 TOKENS PER WORD = 1.3 ⋮---- def run quality gate content: str, url: str, extractor name: str - tuple bool, str ⋮---- evaluation = quality gate.evaluate content, url, extractor=extractor name ⋮---- Threshold for treating truncated-but-quality-passed content as "keep trying". ⋮---- COMPLETENESS RETRY CONFIDENCE = 0.85 COMPLETENESS RETRY MAX STEPS = 11 ⋮---- def should continue for completeness result: ExtractedContent, step: int - bool ⋮… 证据：`argus/extraction/extractor.py`
- **Firecrawl Extractor**（source_file）：logger = get logger "extraction.firecrawl" ⋮---- FIRECRAWL API URL = "https://api.firecrawl.dev/v1/scrape" ⋮---- async def extract firecrawl url: str - ExtractedContent ⋮---- config = get config api key = config.firecrawl.api key ⋮---- headers = { body = {"url": url} ⋮---- resp = await client.post FIRECRAWL API URL, json=body, headers=headers ⋮---- data = resp.json ⋮---- result = data.get "data", {} markdown = result.get "markdown", "" ⋮---- metadata = result.get "metadata", {} title = metadata.get "title", "" or result.get "title", "" 证据：`argus/extraction/firecrawl_extractor.py`
- **Models**（source_file）：class ExtractorName str, Enum ⋮---- RESIDENTIAL = "residential" TRAFILATURA = "trafilatura" JINA = "jina" OBSCURA = "obscura" PLAYWRIGHT = "playwright" WAYBACK = "wayback" ARCHIVE IS = "archive is" AUTH = "auth" CRAWL4AI = "crawl4ai" YOU CONTENTS = "you contents" VALYU CONTENTS = "valyu contents" FIRECRAWL = "firecrawl" ⋮---- @dataclass class ExtractedContent ⋮---- url: str title: str = "" text: str = "" author: str = "" date: Optional str = None word count: int = 0 extracted at: datetime = field default factory=lambda: datetime.now tz=None extractor: Optional ExtractorName = None error: Optional str = None quality passed: bool = True quality reason: Optional str = None extractors tried: li… 证据：`argus/extraction/models.py`
- **Obscura Extractor**（source_file）：logger = get logger "extraction.obscura" ⋮---- OBSCURA TIMEOUT = int os.getenv "ARGUS OBSCURA TIMEOUT SECONDS", "20" ⋮---- obscura available: Optional bool = None ⋮---- def is available - bool ⋮---- obscura available = shutil.which "obscura" is not None ⋮---- async def extract obscura url: str - ExtractedContent ⋮---- proc = await asyncio.create subprocess exec ⋮---- err = stderr.decode "utf-8", errors="replace" .strip ⋮---- text = stdout.decode "utf-8", errors="replace" .strip 证据：`argus/extraction/obscura_extractor.py`
- **Obscura CDP: use LP.getMarkdown for cleaner DOM-to-Markdown conversion**（source_file）：logger = get logger "extraction.playwright" ⋮---- OBSCURA CDP URL = os.getenv "ARGUS OBSCURA CDP URL", "" ⋮---- browser = None playwright instance = None using obscura cdp = False PLAYWRIGHT AVAILABLE = None ⋮---- def check playwright ⋮---- PLAYWRIGHT AVAILABLE = importlib.util.find spec "playwright.async api" is not None ⋮---- async def get browser ⋮---- playwright instance = await async playwright .start ⋮---- browser = await playwright instance.chromium.connect over cdp OBSCURA CDP URL using obscura cdp = True ⋮---- browser = await playwright instance.chromium.launch ⋮---- async def extract playwright url: str, timeout ms: int = 15000 - ExtractedContent ⋮---- browser = await get browser… 证据：`argus/extraction/playwright_extractor.py`
- **Residential Extractor**（source_file）：logger = get logger "extraction.residential" ⋮---- CIRCUIT BREAKER COOLDOWN = 60.0 ⋮---- class EndpointHealth ⋮---- def init self ⋮---- def is healthy self, url: str - bool ⋮---- until = self. unhealthy until.get url ⋮---- def mark unhealthy self, url: str, cooldown: float = CIRCUIT BREAKER COOLDOWN ⋮---- def mark healthy self, url: str ⋮---- endpoint health = EndpointHealth ⋮---- def is configured - bool ⋮---- config = get config ⋮---- def load cookies for domain domain: str - Optional list dict ⋮---- cookie path = get cookie path domain ⋮---- cookies = load editthiscookie json cookie path ⋮---- async def try endpoint url: str, endpoint: str, cookies: Optional list dict , domain: Optional… 证据：`argus/extraction/residential_extractor.py`
- **Valyu Extractor**（source_file）：logger = get logger "extraction.valyu" ⋮---- VALYU CONTENTS URL = "https://api.valyu.ai/v1/contents" TIMEOUT = int os.getenv "ARGUS EXTRACTION TIMEOUT SECONDS", "15" ⋮---- async def extract valyu contents url: str - ExtractedContent ⋮---- config = get config ⋮---- headers = { body = { ⋮---- resp = await client.post VALYU CONTENTS URL, json=body, headers=headers ⋮---- data = resp.json ⋮---- results = data.get "results", ⋮---- page = results 0 ⋮---- text = page.get "content", "" ⋮---- tracker = BudgetTracker persist path=os.environ.get "ARGUS BUDGET DB PATH" 证据：`argus/extraction/valyu_extractor.py`
- **Wayback Extractor**（source_file）：logger = get logger "extraction.wayback" ⋮---- AVAILABILITY URL = "https://archive.org/wayback/available" WAYBACK CONTENT PREFIX = "https://web.archive.org/web" ⋮---- min interval = 10.0 last request time = 0.0 lock = None ⋮---- def get lock ⋮---- lock = asyncio.Lock ⋮---- async def rate limit ⋮---- now = time.monotonic wait = min interval - now - last request time ⋮---- last request time = time.monotonic ⋮---- async def check availability url: str - Optional str ⋮---- resp = await client.get AVAILABILITY URL, params={"url": url} ⋮---- data = resp.json ⋮---- snapshot = data "archived snapshots" .get "closest" ⋮---- async def fetch archived wayback url: str - str ⋮---- resp = await client.ge… 证据：`argus/extraction/wayback_extractor.py`
- **You Extractor**（source_file）：logger = get logger "extraction.you" ⋮---- YOU CONTENTS URL = "https://ydc-index.io/v1/contents" TIMEOUT = int os.getenv "ARGUS EXTRACTION TIMEOUT SECONDS", "15" ⋮---- async def extract you contents url: str - ExtractedContent ⋮---- config = get config ⋮---- headers = { body = { ⋮---- resp = await client.post YOU CONTENTS URL, json=body, headers=headers ⋮---- data = resp.json ⋮---- page = data 0 markdown = page.get "markdown", "" ⋮---- title = page.get "title", "" text = markdown.strip 证据：`argus/extraction/you_extractor.py`
- **Init**（source_file）：all = "serve mcp" 证据：`argus/mcp/__init__.py`
- **Resources**（source_file）：def provider status resource broker: SearchBroker - str ⋮---- providers = {} ⋮---- def provider budgets resource broker: SearchBroker - str ⋮---- budgets = {} ⋮---- def routing policies resource broker: SearchBroker - str ⋮---- policies = {} ⋮---- def corpus paths resource - str 证据：`argus/mcp/resources.py`
- **Server**（source_file）：logger = get logger "mcp.server" ⋮---- class StaticTokenVerifier ⋮---- def init self, api key: str ⋮---- async def verify token self, token: str - AccessToken None ⋮---- def serve mcp transport: str = "stdio", host: str = "127.0.0.1", port: int = 8001 ⋮---- broker = create broker auth config = AuthConfig.from env use remote auth = remote mcp requires auth transport, host ⋮---- mcp kwargs: dict str, Any = {"host": host, "port": port} ⋮---- resource server url = f"http://{host}:{port}/mcp" ⋮---- mcp = FastMCP "argus", mcp kwargs ⋮---- expose admin tools = transport == "stdio" or use remote auth ⋮---- @mcp.tool async def recover url url: str, title: str = None, domain: str = None - str ⋮---- @… 证据：`argus/mcp/server.py`
- **Check if archive.ph actually has this page**（source_file）：STATUS DISPLAY = { ⋮---- def serialize response resp - str ⋮---- providers used = t.provider.value for t in resp.traces if t.results count and t.results count 0 provider str = ", ".join providers used if providers used else "none" cached str = " cached " if resp.cached else "" ⋮---- lines = ⋮---- title = r.title or " no title " snippet = r.snippet or "" egress = r.metadata.get "egress", "unknown" ⋮---- attribution = ", ".join ⋮---- search mode = SearchMode mode q = SearchQuery query=query, mode=search mode, max results=max results, free only=free only, caller=caller ⋮---- md = serialize response resp ⋮---- resp = await broker.search q, compute attribution=include attribution ⋮---- query par… 证据：`argus/mcp/tools.py`
- **Init**（source_file）：all = "get session", "get session factory", "init db", "persist search" 证据：`argus/persistence/__init__.py`
- **Models**（source_file）：class Base DeclarativeBase ⋮---- class SearchQueryRow Base ⋮---- tablename = "search queries" ⋮---- id: Mapped int = mapped column Integer, primary key=True, autoincrement=True query text: Mapped str = mapped column Text, nullable=False mode: Mapped str = mapped column String 50 , nullable=False max results: Mapped int = mapped column Integer, default=10 created at: Mapped datetime = mapped column DateTime, server default=func.now ⋮---- runs: Mapped list "SearchRunRow" = relationship back populates="query" ⋮---- class SearchRunRow Base ⋮---- tablename = "search runs" ⋮---- query id: Mapped int = mapped column ForeignKey "search queries.id" , nullable=False search run id: Mapped str = mapped… 证据：`argus/persistence/models.py`
- **Init**（source_file）：all = "BaseProvider" 证据：`argus/providers/__init__.py`
- **Init**（source_file）：all = "SessionStore", "Session", "QueryRecord" 证据：`argus/sessions/__init__.py`
- **Models**（source_file）：@dataclass class QueryRecord ⋮---- query: str mode: str = "discovery" timestamp: datetime = field default factory=lambda: datetime.now tz=None results count: int = 0 extracted urls: List str = field default factory=list ⋮---- @dataclass class Session ⋮---- id: str created at: datetime = field default factory=lambda: datetime.now tz=None queries: List QueryRecord = field default factory=list ⋮---- @property def extracted urls self - List str ⋮---- urls = 证据：`argus/sessions/models.py`
- **Server**（source_file）：class ExecRequest BaseModel ⋮---- provider: str query: str max results: int = 10 mode: str = "discovery" caller: str = "" ⋮---- def get provider provider name: str - BaseProvider ⋮---- """Instantiate the requested provider. Raises KeyError if unknown.""" ⋮---- cfg = get config name = ProviderName provider name raises ValueError if unknown ⋮---- def check auth request: Request - None ⋮---- secret = os.environ.get "ARGUS EGRESS SHARED SECRET", "" ⋮---- return no secret configured — open dev mode auth = request.headers.get "Authorization", "" ⋮---- def create worker app - FastAPI ⋮---- app = FastAPI title="Argus Worker", docs url=None, redoc url=None ⋮---- @app.get "/health" async def health ⋮… 证据：`argus/worker/server.py`
- **Init**（source_file）：all = 证据：`argus/workflows/__init__.py`
- 其余 17 条证据见 `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。

- **系统总览与分层架构**：importance `high`
  - source_paths: README.md, argus/broker/router.py, argus/broker/pipeline.py, argus/config.py, argus/models.py
- **MCP 协议与代理使用契约**：importance `high`
  - source_paths: argus/mcp/server.py, argus/mcp/tools.py, argus/mcp/resources.py, AGENTS.md, docs/mcp-clients.md
- **12 步内容提取与检索工作流**：importance `high`
  - source_paths: argus/extraction/extractor.py, argus/extraction/auth_extractor.py, argus/extraction/residential_extractor.py, argus/extraction/playwright_extractor.py, argus/extraction/obscura_extractor.py
- **多出口 Worker、预算与部署运维**：importance `high`
  - source_paths: argus/worker/server.py, argus/broker/budgets.py, argus/broker/budget_persistence.py, argus/broker/balance_check.py, argus/attribution/shapley.py

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `f704e1c779069a36c1ac9408511bdbf41df16d58`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `pyproject.toml`, `uv.lock`, `docs/PUBLICITY-CHECKLIST.md`, `docs/README.md`, `docs/dashboard-design.md`, `docs/mcp-clients.md`, `docs/providers.md`, `docs/releasing.md`, `docs/research/obscura/research.md`, `docs/roadmaps/argus-retrieval-platform.md`, `docs/superpowers/plans/2026-05-22-multi-egress-worker.md`, `docs/superpowers/specs/2026-05-05-argus-dashboard-design.md`, `docs/superpowers/specs/2026-05-22-free-mode-dashboard-fix-design.md`, `docs/superpowers/specs/2026-05-22-multi-egress-worker-design.md`, `docs/troubleshooting.md`, `examples/README.md`, `examples/basic_search.py`

宿主 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: 失败模式：security_permissions: Escalation: argus#12 deployment requires manual SSH access

- Trigger: Developers should check this security_permissions risk before relying on the project: Escalation: argus#12 deployment requires manual SSH access
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Escalation: argus#12 deployment requires manual SSH access. Context: Observed when using python, docker
- Why it matters: Developers may expose sensitive permissions or credentials: Escalation: argus#12 deployment requires manual SSH access
- Evidence: failure_mode_cluster:github_issue | https://github.com/Khamel83/argus/issues/13 | Escalation: argus#12 deployment requires manual SSH access
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 失败模式：security_permissions: Multi-egress worker: code complete, deployment pending

- Trigger: Developers should check this security_permissions risk before relying on the project: Multi-egress worker: code complete, deployment pending
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Multi-egress worker: code complete, deployment pending. Context: Observed when using node, python, docker, linux
- Why it matters: Developers may expose sensitive permissions or credentials: Multi-egress worker: code complete, deployment pending
- Evidence: failure_mode_cluster:github_issue | https://github.com/Khamel83/argus/issues/12 | Multi-egress worker: code complete, deployment pending
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 失败模式：installation: [Feature] - Tool Hive

- Trigger: Developers should check this installation risk before relying on the project: [Feature] - Tool Hive
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Feature] - Tool Hive. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may fail before the first successful local run: [Feature] - Tool Hive
- Evidence: failure_mode_cluster:github_issue | https://github.com/Khamel83/argus/issues/15 | [Feature] - Tool Hive
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 失败模式：installation: v1.3.0

- Trigger: Developers should check this installation risk before relying on the project: v1.3.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0. Context: Observed when using python
- Why it matters: Upgrade or migration may change expected behavior: v1.3.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Khamel83/argus/releases/tag/v1.3.0 | v1.3.0
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 失败模式：installation: v1.3.1

- Trigger: Developers should check this installation risk before relying on the project: v1.3.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.3.1. Context: Observed when using python, docker
- Why it matters: Upgrade or migration may change expected behavior: v1.3.1
- Evidence: failure_mode_cluster:github_release | https://github.com/Khamel83/argus/releases/tag/v1.3.1 | v1.3.1
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 失败模式：installation: v1.3.3

- Trigger: Developers should check this installation risk before relying on the project: v1.3.3
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: v1.3.3
- Evidence: failure_mode_cluster:github_release | https://github.com/Khamel83/argus/releases/tag/v1.3.3 | v1.3.3
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 失败模式：installation: v1.4.0

- Trigger: Developers should check this installation risk before relying on the project: v1.4.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.4.0. Context: Observed when using python
- Why it matters: Upgrade or migration may change expected behavior: v1.4.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Khamel83/argus/releases/tag/v1.4.0 | v1.4.0
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 失败模式：installation: v1.5.0

- Trigger: Developers should check this installation risk before relying on the project: v1.5.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.5.0. Context: Observed when using python, playwright
- Why it matters: Upgrade or migration may change expected behavior: v1.5.0
- Evidence: failure_mode_cluster:github_release | https://github.com/Khamel83/argus/releases/tag/v1.5.0 | v1.5.0
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 来源证据：Escalation: argus#12 deployment requires manual SSH access

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

### Constraint 10: 来源证据：Expose build-research-pack as MCP tool

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