# tools - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **想在安装前理解开源项目价值和边界的用户**：当前证据主要来自项目文档。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

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

## 怎么开始

- `curl -LO https://github.com/protocolbuffers/protobuf/releases//download/v$PROTOC_VERSION/protoc-$PROTOC_VERSION-$PKG_NAME.zip` 证据：`docs/DEVELOPMENT.md` Claim：`clm_0003` supported 0.86
- `curl -X PATCH http://localhost:6333/debugger \` 证据：`docs/DEVELOPMENT.md` Claim：`clm_0004` supported 0.86
- `pip install --user maturin` 证据：`lib/edge/README.md` Claim：`clm_0005` supported 0.86
- `curl -sf -X DELETE "$QDRANT_URL/collections/$COLLECTION_NAME?wait=true" || true` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0006` unverified 0.25
- `curl -sf --retry 30 --retry-delay 1 --retry-all-errors "$QDRANT_URL" >/dev/null` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0007` unverified 0.25
- `curl -sf -X DELETE "$QDRANT_URL/collections/$COLLECTION_NAME?wait=true"` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0006` unverified 0.25, `clm_0008` unverified 0.25
- `curl -sf -X PUT "$QDRANT_URL/collections/$COLLECTION_NAME" \` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0009` unverified 0.25, `clm_0010` unverified 0.25, `clm_0011` unverified 0.25
- `curl -sf -X PUT "$QDRANT_URL/collections/$COLLECTION_NAME/points?wait=true" \` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0010` unverified 0.25
- `curl -sf -X PUT "$QDRANT_URL/collections/$COLLECTION_NAME/index" \` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0011` unverified 0.25
- `curl -sf -o "$SNAPSHOT_DIR/shard.snapshot" \` 证据：`lib/edge/tools/prepare_facet_snapshot.sh` Claim：`clm_0012` unverified 0.25

## 继续前判断卡

- **当前建议**：仅建议沙盒试装
- **为什么**：项目存在安装命令、宿主配置或本地写入线索，不建议直接进入主力环境，应先在隔离环境试装。

### 30 秒判断

- **现在怎么做**：仅建议沙盒试装
- **最小安全下一步**：先跑 Prompt Preview；若仍要安装，只在隔离环境试装
- **先别相信**：真实输出质量不能在安装前相信。
- **继续会触碰**：命令执行、本地环境或项目文件、宿主 AI 上下文

### 现在可以相信

- **适合人群线索：想在安装前理解开源项目价值和边界的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`docs/DEVELOPMENT.md`, `lib/edge/README.md`, `lib/edge/tools/prepare_facet_snapshot.sh`, `tools/sync-web-ui.sh` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`docs/DEVELOPMENT.md` Claim：`clm_0003` supported 0.86

### 现在还不能相信

- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。
- **安装命令是否需要网络、权限或全局写入？**（unverified）：这影响企业环境和个人环境的安装风险。 证据：`docs/DEVELOPMENT.md`

### 继续会触碰什么

- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`docs/DEVELOPMENT.md`, `lib/edge/README.md`, `lib/edge/tools/prepare_facet_snapshot.sh`, `tools/sync-web-ui.sh`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`docs/DEVELOPMENT.md`, `lib/edge/README.md`, `lib/edge/tools/prepare_facet_snapshot.sh`, `tools/sync-web-ui.sh`
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：用安装前交互式试用判断工作方式是否匹配，不需要授权或改环境。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

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

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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


## 角色 / Skill 索引

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

- **Qdrant 2025 Roadmap**（project_doc）：Hi! This document is our plan for Qdrant development in 2025. Previous year roadmap is available here: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/roadmap/README.md`
- **Getting Started**（project_doc）：Vector Search Engine for the next generation of AI applications 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Collection**（project_doc）：Crate, which implements all functions required for operations with a single collection of points. Points within a collection should share the same payload schema and have same vector size. So that search requests could be performed over all points of a single collection. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/collection/README.md`
- **Rust Qdrant Edge package**（project_doc）：! crates.io https://img.shields.io/crates/v/qdrant-edge.svg https://crates.io/crates/qdrant-edge ! PyPI https://img.shields.io/pypi/v/qdrant-edge-py.svg https://pypi.org/project/qdrant-edge-py/ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/edge/README.md`
- **Qdrant Edge**（project_doc）：Qdrant Edge is a lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents. It enables on-device retrieval with minimal memory footprint, no background services, and optional synchronization with Qdrant Cloud. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/edge/publish/README.md`
- **Qdrant Edge**（project_doc）：Qdrant Edge is a lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents. It enables on-device retrieval with minimal memory footprint, no background services, and optional synchronization with Qdrant Cloud. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/edge/python/README.md`
- **gridstore**（project_doc）：New storage for variable-sized values using mmap. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/gridstore/readme.md`
- **Stop Words**（project_doc）：This directory contains stopwords for various languages used in full-text search indexing. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`lib/segment/src/index/field_index/full_text_index/stop_words/README.md`
- **Contributing to Qdrant**（project_doc）：!IMPORTANT All pull requests must target the dev branch. The master branch is used for releases only. Fork the repo, create your branch from dev , and set dev as the base branch when opening your PR. PRs opened against master will not be merged and you will be asked to retarget them. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/CONTRIBUTING.md`
- **Contributing to Qdrant**（project_doc）：!IMPORTANT All pull requests must target the dev branch, not master . The master branch is used for releases only. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Contributor Covenant Code of Conduct**（project_doc）：Contributor Covenant Code of Conduct 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/CODE_OF_CONDUCT.md`
- **Developer's guide to Qdrant**（project_doc）：Or use latest pre-built image from DockerHub https://hub.docker.com/r/qdrant/qdrant 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/DEVELOPMENT.md`
- **Roadmap 2022**（project_doc）：This document describes what features and milestones were planned and achieved in 2022. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/roadmap/roadmap-2022.md`
- **Qdrant 2023 Roadmap**（project_doc）：Hi! This document is our plan for Qdrant development in 2023. Previous year roadmap is available here: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/roadmap/roadmap-2023.md`
- **Qdrant 2024 Roadmap**（project_doc）：Hi! This document is our plan for Qdrant development in 2024. Previous year roadmap is available here: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/roadmap/roadmap-2024.md`

## 证据索引

- 共索引 80 条证据。

- **Qdrant 2025 Roadmap**（documentation）：Hi! This document is our plan for Qdrant development in 2025. Previous year roadmap is available here: 证据：`docs/roadmap/README.md`
- **Getting Started**（documentation）：Vector Search Engine for the next generation of AI applications 证据：`README.md`
- **Collection**（documentation）：Crate, which implements all functions required for operations with a single collection of points. Points within a collection should share the same payload schema and have same vector size. So that search requests could be performed over all points of a single collection. 证据：`lib/collection/README.md`
- **Rust Qdrant Edge package**（documentation）：! crates.io https://img.shields.io/crates/v/qdrant-edge.svg https://crates.io/crates/qdrant-edge ! PyPI https://img.shields.io/pypi/v/qdrant-edge-py.svg https://pypi.org/project/qdrant-edge-py/ 证据：`lib/edge/README.md`
- **Qdrant Edge**（documentation）：Qdrant Edge is a lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents. It enables on-device retrieval with minimal memory footprint, no background services, and optional synchronization with Qdrant Cloud. 证据：`lib/edge/publish/README.md`
- **Qdrant Edge**（documentation）：Qdrant Edge is a lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents. It enables on-device retrieval with minimal memory footprint, no background services, and optional synchronization with Qdrant Cloud. 证据：`lib/edge/python/README.md`
- **gridstore**（documentation）：New storage for variable-sized values using mmap. 证据：`lib/gridstore/readme.md`
- **Stop Words**（documentation）：This directory contains stopwords for various languages used in full-text search indexing. 证据：`lib/segment/src/index/field_index/full_text_index/stop_words/README.md`
- **Contributing to Qdrant**（documentation）：!IMPORTANT All pull requests must target the dev branch. The master branch is used for releases only. Fork the repo, create your branch from dev , and set dev as the base branch when opening your PR. PRs opened against master will not be merged and you will be asked to retarget them. 证据：`docs/CONTRIBUTING.md`
- **Contributing to Qdrant**（documentation）：!IMPORTANT All pull requests must target the dev branch, not master . The master branch is used for releases only. 证据：`CONTRIBUTING.md`
- **Package**（package_manifest）：{ "name": "tools", "version": "1.0.0", "description": "", "main": "convert.js", "dependencies": { "@openapi-contrib/json-schema-to-openapi-schema": "^1.3.0" }, "devDependencies": {}, "scripts": { "convert": "node convert.js" }, "author": "", "license": "ISC" } 证据：`tools/schema2openapi/package.json`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **Contributor Covenant Code of Conduct**（documentation）：Contributor Covenant Code of Conduct 证据：`docs/CODE_OF_CONDUCT.md`
- **Developer's guide to Qdrant**（documentation）：Or use latest pre-built image from DockerHub https://hub.docker.com/r/qdrant/qdrant 证据：`docs/DEVELOPMENT.md`
- **Roadmap 2022**（documentation）：This document describes what features and milestones were planned and achieved in 2022. 证据：`docs/roadmap/roadmap-2022.md`
- **Qdrant 2023 Roadmap**（documentation）：Hi! This document is our plan for Qdrant development in 2023. Previous year roadmap is available here: 证据：`docs/roadmap/roadmap-2023.md`
- **Qdrant 2024 Roadmap**（documentation）：Hi! This document is our plan for Qdrant development in 2024. Previous year roadmap is available here: 证据：`docs/roadmap/roadmap-2024.md`
- **Config**（source_file）：log level: INFO storage: storage path: ./storage snapshots path: ./snapshots snapshots config: snapshots storage: local temp path: null on disk payload: true update concurrency: null wal: wal capacity mb: 32 wal segments ahead: 0 node type: "Normal" performance: max search threads: 0 optimizer cpu budget: 0 update rate limit: null optimizers: deleted threshold: 0.2 vacuum min vector number: 1000 default segment number: 0 max segment size kb: null indexing threshold kb: 10000 flush interval sec: 5 max optimization threads: null hnsw index: m: 16 ef construct: 100 full scan threshold kb: 10000 max indexing threads: 0 on disk: false payload m: null shard transfer method: null collection: repli… 证据：`config/config.yaml`
- **Mod**（source_file）：pub mod inference; pub mod json; pub mod vectors; 证据：`lib/api/src/conversions/mod.rs`
- **Mod**（source_file）：pub mod conversions; ⋮---- pub mod qdrant; pub mod dynamic channel pool; pub mod dynamic pool; ⋮---- pub mod grpc health v1; pub mod ops; pub mod transport channel pool; pub mod validate; ⋮---- pub const fn api crate version - &'static str { env! "CARGO PKG VERSION" 证据：`lib/api/src/grpc/mod.rs`
- **Lib**（source_file）：pub mod conversions; pub mod grpc; pub mod rest; 证据：`lib/api/src/lib.rs`
- **Mod**（source_file）：pub mod conversions; pub mod models; pub mod schema; pub mod validate; 证据：`lib/api/src/rest/mod.rs`
- **Schema**（source_file）：use std::borrow::Cow; use std::collections::HashMap; ⋮---- use common::types::ScoreType; use common::validation::validate multi vector; use ordered float::NotNan; use schemars::JsonSchema; use segment::common::utils::MaybeOneOrMany; ⋮---- use segment::data types::order by::OrderByInterface; ⋮---- use segment::json path::JsonPath; ⋮---- use sparse::common::sparse vector::SparseVector; ⋮---- use crate::rest::validate::validate relevance feedback input; ⋮---- pub crate fn validate non empty dense vector: & f32 - Result { if vector.is empty { ⋮---- err.message = Some Cow::Borrowed "dense vector must not be empty" ; ⋮---- errors.add "vector", err ; return Err errors ; ⋮---- Ok ⋮---- pub enum Vec… 证据：`lib/api/src/rest/schema.rs`
- **Mod**（source_file）：mod clean; mod collection ops; pub mod distance matrix; mod facet; pub mod mmr; pub mod payload index schema; mod point ops; pub mod query; mod resharding; mod search; mod shard transfer; mod sharding keys; mod snapshots; mod state management; mod telemetry; mod vector name schema; ⋮---- use std::collections::HashMap; use std::ops::Deref; ⋮---- use std::sync::Arc; ⋮---- use std::time::Duration; ⋮---- use clean::ShardCleanTasks; use common::budget::ResourceBudget; use common::save on disk::SaveOnDisk; use common::storage version::StorageVersion; ⋮---- use semver::Version; ⋮---- use tokio::runtime::Handle; ⋮---- use crate::collection::collection ops::ABORT TRANSFERS ON SHARD DROP FIX FROM VER… 证据：`lib/collection/src/collection/mod.rs`
- **Payload Index Schema**（source_file）：use common::counter::hardware accumulator::HwMeasurementAcc; use common::save on disk::SaveOnDisk; use segment::json path::JsonPath; ⋮---- use shard::files::PAYLOAD INDEX CONFIG FILE; pub use shard::payload index schema::PayloadIndexSchema; ⋮---- use crate::collection::Collection; ⋮---- use crate::operations::universal query::formula::ExpressionInternal; ⋮---- use crate::problems::unindexed field; use crate::shards::shard trait::WaitUntil; ⋮---- impl Collection { pub crate fn payload index file collection path: &Path - PathBuf { collection path.join PAYLOAD INDEX CONFIG FILE ⋮---- pub crate fn load payload index schema ⋮---- Ok schema ⋮---- pub async fn create payload index ⋮---- self.creat… 证据：`lib/collection/src/collection/payload_index_schema.rs`
- **Shard Transfer**（source_file）：use std::future::Future; use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; ⋮---- use common::defaults; ⋮---- use parking lot::Mutex; use semver::Version; use tokio util::task::AbortOnDropHandle; ⋮---- use super::Collection; use crate::operations::cluster ops::ReshardingDirection; ⋮---- use crate::shards::local shard::LocalShard; use crate::shards::replica set::replica set state::ReplicaState; ⋮---- use crate::shards::shard holder::ShardHolder; ⋮---- impl Collection { pub async fn get related transfers &self, current peer id: PeerId - Vec { self.shards holder.read .await.get transfers transfer { ⋮---- pub async fn check transfer exists &self, transfer key: &ShardTransferKe… 证据：`lib/collection/src/collection/shard_transfer.rs`
- **Vector Name Schema**（source_file）：use std::num::NonZeroU64; ⋮---- use common::counter::hardware accumulator::HwMeasurementAcc; ⋮---- use segment::types::VectorNameBuf; ⋮---- use crate::collection::Collection; ⋮---- use crate::shards::shard trait::WaitUntil; ⋮---- impl Collection { pub async fn create named vector ⋮---- self.update collection vector config params { add vector to config params, &vector name, &config ⋮---- self.update all local operation, WaitUntil::from false , hw acc, true ⋮---- self.recreate optimizers background ; ⋮---- Ok ⋮---- pub async fn delete named vector &self, vector name: VectorNameBuf - CollectionResult { ⋮---- remove vector from config params, &vector name ; ⋮---- self.update all local ⋮---- asy… 证据：`lib/collection/src/collection/vector_name_schema.rs`
- **Mod**（source_file）：pub mod collection updater; pub mod holders; pub mod optimizers; pub mod segments searcher; ⋮---- pub mod probabilistic search sampling; ⋮---- pub crate mod fixtures; ⋮---- mod tests; 证据：`lib/collection/src/collection_manager/mod.rs`
- **Mod**（source_file）：pub mod config mismatch optimizer; pub mod indexing optimizer; pub mod merge optimizer; pub mod segment optimizer; pub mod vacuum optimizer; 证据：`lib/collection/src/collection_manager/optimizers/mod.rs`
- **Mod**（source_file）：pub mod adaptive handle; pub mod batching; pub mod collection size stats; pub mod eta calculator; pub mod fetch vectors; pub mod file utils; pub mod is ready; pub mod memory reporter; pub mod retrieve request trait; pub mod sha 256; pub mod snapshot stream; pub mod snapshots manager; pub mod stoppable task; pub mod stoppable task async; pub mod transpose iterator; 证据：`lib/collection/src/common/mod.rs`
- **Config**（source_file）：use std::path::Path; ⋮---- use atomicwrites::AtomicFile; use atomicwrites::OverwriteBehavior::AllowOverwrite; use common::types::PointOffsetType; use fs err::File; use schemars::JsonSchema; use segment::common::anonymize::Anonymize; use segment::data types::vectors::DEFAULT VECTOR NAME; ⋮---- use uuid::Uuid; use validator::Validate; use wal::WalOptions; ⋮---- use crate::operations::validation; use crate::optimizers builder::OptimizersConfig; ⋮---- pub struct WalConfig { ⋮---- fn default wal retain closed - usize { ⋮---- fn from config: &WalConfig - Self { ⋮---- retain closed: NonZeroUsize::new wal retain closed .unwrap , ⋮---- impl Default for WalConfig { fn default - Self { ⋮---- wal retai… 证据：`lib/collection/src/config.rs`
- **Mod**（source_file）：mod aggregator; mod builder; pub mod group by; mod types; ⋮---- pub use builder::GroupBy; 证据：`lib/collection/src/grouping/mod.rs`
- **Types**（source_file）：use ahash::AHashMap; use segment::data types::groups::GroupId; use segment::json path::JsonPath; ⋮---- use crate::operations::types::PointGroup; use crate::operations::universal query::shard query::ShardQueryRequest; ⋮---- pub super enum AggregatorError { ⋮---- pub super struct Group { ⋮---- impl Group { pub super fn hydrate from &mut self, map: &AHashMap { self.hits.iter mut .for each hit { if let Some point = map.get &hit.id { hit.payload.clone from &point.payload ; hit.vector.clone from &point.vector ; ⋮---- fn from group: Group - Self { ⋮---- .into iter .map api::rest::ScoredPoint::from .collect , ⋮---- pub struct QueryGroupRequest { ⋮---- mod test { ⋮---- fn group key from values { use… 证据：`lib/collection/src/grouping/types.rs`
- **Lib**（source_file）：pub mod collection; pub mod collection manager; pub mod collection state; pub mod common; pub mod config; pub mod discovery; pub mod grouping; pub mod hash ring; pub mod lookup; pub mod operations; pub mod optimizers builder; pub mod problems; pub mod recommendations; pub mod shards; pub mod telemetry; mod update handler; pub mod wal delta; ⋮---- pub mod events; ⋮---- mod tests; ⋮---- pub mod profiling; pub mod update workers; 证据：`lib/collection/src/lib.rs`
- **Mod**（source_file）：pub mod types; ⋮---- use std::collections::HashMap; use std::sync::Arc; use std::time::Duration; ⋮---- use common::counter::hardware accumulator::HwMeasurementAcc; use futures::Future; use itertools::Itertools; ⋮---- use serde::Serialize; use shard::retrieve::record internal::RecordInternal; use types::PseudoId; ⋮---- use crate::collection::Collection; use crate::operations::consistency params::ReadConsistency; use crate::operations::shard selector internal::ShardSelectorInternal; ⋮---- pub struct WithLookup { ⋮---- pub async fn lookup ids ⋮---- let collection = collection by name request.collection name.clone ⋮---- .ok or else { CollectionError::not found format! "Collection {}", request.c… 证据：`lib/collection/src/lookup/mod.rs`
- **Types**（source_file）：use std::fmt::Display; ⋮---- use segment::data types::groups::GroupId; use segment::types::PointIdType; use uuid::Uuid; ⋮---- use super::WithLookup; ⋮---- pub enum WithLookupInterface { ⋮---- fn from with lookup: api::rest::WithLookupInterface - Self { ⋮---- with payload: Some true.into , with vectors: Some false.into , ⋮---- fn from with lookup: api::rest::WithLookup - Self { ⋮---- pub enum PseudoId { ⋮---- impl Display for PseudoId { fn fmt &self, f: &mut std::fmt::Formatter - std::fmt::Result { ⋮---- PseudoId::String s = write! f, "{s}" , PseudoId::NumberU64 n = write! f, "{n}" , PseudoId::NumberI64 n = write! f, "{n}" , ⋮---- fn from id: GroupId - Self { ⋮---- fn from id: PseudoId - Sel… 证据：`lib/collection/src/lookup/types.rs`
- **Mod**（source_file）：mod count; mod facet; mod matrix; mod points; mod query; mod update persisted; ⋮---- pub trait Generalizer { 证据：`lib/collection/src/operations/generalizer/mod.rs`
- **Mod**（source_file）：pub mod cluster ops; pub mod config diff; pub mod consistency params; pub mod conversions; pub mod generalizer; pub mod loggable; pub mod operation effect; pub mod payload ops; pub mod point ops; pub mod shard selector internal; pub mod shared storage config; pub mod snapshot ops; pub mod snapshot storage ops; ⋮---- pub mod staging; pub mod types; pub mod universal query; pub mod validation; pub mod vector ops; pub mod vector params builder; pub mod verification; ⋮---- pub mod query enum { pub use shard::query::query enum::QueryEnum; ⋮---- use ahash::AHashMap; use segment::types::ExtendedPointId; ⋮---- use crate::shards::shard::ShardId; ⋮---- pub trait SplitByShard { ⋮---- impl SplitByShard… 证据：`lib/collection/src/operations/mod.rs`
- **Shared Storage Config**（source_file）：use std::default; use std::num::NonZeroUsize; use std::path::PathBuf; use std::time::Duration; ⋮---- use common::load concurrency::LoadConcurrencyConfig; use segment::types::HnswGlobalConfig; ⋮---- use crate::common::snapshots manager::SnapshotsConfig; use crate::operations::types::NodeType; use crate::shards::transfer::ShardTransferMethod; ⋮---- pub const DEFAULT IO SHARD TRANSFER LIMIT: Option = Some 1 ; ⋮---- pub struct SharedStorageConfig { ⋮---- impl Default for SharedStorageConfig { fn default - Self { ⋮---- impl SharedStorageConfig { ⋮---- pub fn new ⋮---- let update queue size = update queue size.unwrap or match node type { ⋮---- search timeout: search timeout.unwrap or DEFAULT SEAR… 证据：`lib/collection/src/operations/shared_storage_config.rs`
- **Types**（source_file）：use std::backtrace::Backtrace; ⋮---- use std::iter; use std::num::NonZeroU64; ⋮---- use api::grpc::transport channel pool::RequestError; ⋮---- use common::ext::OptionExt; ⋮---- use common::types::ScoreType; use common::validation::validate range generic; ⋮---- use issues::IssueRecord; use schemars::JsonSchema; use segment::common::anonymize::Anonymize; ⋮---- use segment::data types::groups::GroupId; use segment::data types::modifier::Modifier; ⋮---- use semver::Version; ⋮---- pub use shard::count::CountRequestInternal; use shard::payload index schema::PayloadIndexSchema; ⋮---- pub use shard::scroll::ScrollRequestInternal; pub use shard::search::CoreSearchRequest; use shard::wal::WalError; u… 证据：`lib/collection/src/operations/types.rs`
- **Mod**（source_file）：pub mod collection query; pub mod shard query; ⋮---- pub mod planned query { ⋮---- pub mod formula { 证据：`lib/collection/src/operations/universal_query/mod.rs`
- **Mod**（source_file）：mod count; mod discover; mod facet; mod local shard; mod matrix; mod query; mod recommend; mod search; mod update; ⋮---- use std::fmt::Display; ⋮---- use itertools::Itertools; use segment::json path::JsonPath; ⋮---- pub use shard::operation rate cost; ⋮---- use crate::collection::Collection; ⋮---- pub const fn new unchecked verification pass - VerificationPass { ⋮---- pub struct VerificationPass { ⋮---- pub trait StrictModeVerification { ⋮---- fn consumes memory &self - bool { ⋮---- async fn check custom ⋮---- Ok ⋮---- fn check request exact &self, strict mode config: &StrictModeConfig - CollectionResult { check bool opt self.request exact , ⋮---- fn check request query limit ⋮---- check li… 证据：`lib/collection/src/operations/verification/mod.rs`
- **Mod**（source_file）：pub mod unindexed field; ⋮---- pub use unindexed field::UnindexedField; 证据：`lib/collection/src/problems/mod.rs`
- **Mod**（source_file）：pub mod interface; mod slow requests collector; pub mod slow requests log; 证据：`lib/collection/src/profiling/mod.rs`
- **Mod**（source_file）：pub mod clock map; pub mod disk usage watcher; pub super mod facet; pub super mod formula rescore; pub super mod query; pub super mod scroll; pub super mod search; pub super mod shard ops; ⋮---- mod snapshot; mod telemetry; pub super mod updaters; ⋮---- mod snapshot tests; ⋮---- mod drop; pub mod indexed only; ⋮---- pub mod testing; mod wal ops; ⋮---- use std::sync::Arc; ⋮---- use arc swap::ArcSwap; use common::budget::ResourceBudget; use common::counter::hardware accumulator::HwMeasurementAcc; use common::counter::hardware counter::HardwareCounterCell; use common::defaults::log load timing; use common::rate limiting::RateLimiter; use common::save on disk::SaveOnDisk; use common::types::Def… 证据：`lib/collection/src/shards/local_shard/mod.rs`
- **Mod**（source_file）：pub mod channel service; pub mod collection shard distribution; mod conversions; pub mod dummy shard; pub mod forward proxy shard; pub mod local shard; pub mod proxy shard; pub mod queue proxy shard; pub mod remote shard; pub mod replica set; pub mod resharding; pub mod resolve; pub mod shard; pub mod shard config; pub mod shard holder; pub mod shard trait; pub mod telemetry; pub mod transfer; pub mod update tracker; ⋮---- mod test; ⋮---- use channel service::ChannelService; use common::defaults; ⋮---- use shard::ShardId; ⋮---- use transfer::ShardTransferConsensus; ⋮---- use crate::shards::shard config::ShardConfig; ⋮---- pub type CollectionId = String; ⋮---- pub type ShardVersion = usize;… 证据：`lib/collection/src/shards/mod.rs`
- **Mod**（source_file）：pub mod clock set; mod execute read operation; mod locally disabled peers; mod partial snapshot meta; mod read ops; pub mod replica set state; mod shard transfer; pub mod snapshots; mod telemetry; mod update; ⋮---- use std::sync::Arc; use std::time::Duration; ⋮---- use common::budget::ResourceBudget; use common::counter::hardware accumulator::HwMeasurementAcc; use common::save on disk::SaveOnDisk; use common::types::DeferredBehavior; ⋮---- use tokio::runtime::Handle; ⋮---- use tokio::task::spawn blocking; use tokio util::task::AbortOnDropHandle; ⋮---- use self::partial snapshot meta::PartialSnapshotMeta; use super::CollectionId; use super::local shard::clock map::RecoveryPoint; ⋮---- use su… 证据：`lib/collection/src/shards/replica_set/mod.rs`
- **Shard Transfer**（source_file）：use std::sync::Arc; ⋮---- use parking lot::Mutex; ⋮---- use super::ShardReplicaSet; use crate::hash ring::HashRingRouter; ⋮---- use crate::shards::local shard::clock map::RecoveryPoint; use crate::shards::queue proxy shard::QueueProxyShard; use crate::shards::remote shard::RemoteShard; use crate::shards::shard::Shard; use crate::shards::transfer::transfer tasks pool::TransferTaskProgress; ⋮---- impl ShardReplicaSet { ⋮---- pub async fn proxify local ⋮---- let mut local = self.local.write .await; ⋮---- match local.deref { ⋮---- return Ok ; ⋮---- return Err CollectionError::service error format! ⋮---- let Some Shard::Local local shard = local.take else { unreachable! ⋮---- let = local.insert… 证据：`lib/collection/src/shards/replica_set/shard_transfer.rs`
- **Shard Config**（source_file）：use common::tar ext; ⋮---- use crate::operations::types::CollectionResult; use crate::shards::shard::PeerId; ⋮---- pub enum ShardType { ⋮---- pub struct ShardConfig { ⋮---- impl ShardConfig { pub fn get config path shard path: &Path - PathBuf { shard path.join SHARD CONFIG FILE ⋮---- pub fn new replica set - Self { ⋮---- pub fn load shard path: &Path - CollectionResult { ⋮---- if !config path.exists { ⋮---- return Ok None ; ⋮---- Ok Some read json &config path ? ⋮---- pub fn save &self, shard path: &Path - CollectionResult { ⋮---- Ok atomic save json &config path, self ? ⋮---- pub async fn save to tar &self, tar: &tar ext::BuilderExt - CollectionResult { ⋮---- tar.append data bytes, Path::n… 证据：`lib/collection/src/shards/shard_config.rs`
- **Mod**（source_file）：mod resharding; pub crate mod shard mapping; pub mod shared shard holder; ⋮---- use std::sync::Arc; ⋮---- use ahash::AHashMap; use api::rest::ShardKeyWithFallback; use common::budget::ResourceBudget; use common::fs::sync parent dir async; use common::save on disk::SaveOnDisk; use common::tar ext::BuilderExt; use common::tar unpack::tar unpack file; ⋮---- use itertools::Itertools; use parking lot::Mutex; use segment::json path::JsonPath; ⋮---- use segment::utils::fs::move all; use shard::snapshots::snapshot data::SnapshotData; ⋮---- use shard mapping::ShardKeyMapping; use tokio::runtime::Handle; ⋮---- use tokio util::io::SyncIoBridge; ⋮---- use super::transfer::RecoveryStage; ⋮---- use crate… 证据：`lib/collection/src/shards/shard_holder/mod.rs`
- **derive Debug, Clone, Copy, PartialEq, Eq**（source_file）：use std::fmt; use std::time::Duration; ⋮---- use async trait::async trait; ⋮---- use schemars::JsonSchema; use segment::types::Filter; ⋮---- use tokio::time::sleep; ⋮---- use super::CollectionId; use super::channel service::ChannelService; use super::remote shard::RemoteShard; use super::resharding::ReshardKey; ⋮---- use crate::operations::cluster ops::ReshardingDirection; ⋮---- use crate::shards::replica set::replica set state::ReplicaState; ⋮---- pub mod driver; pub mod helpers; pub mod resharding stream records; pub mod snapshot; pub mod stream records; pub mod transfer tasks pool; pub mod wal delta; ⋮---- pub enum TransferStage { ⋮---- impl TransferStage { ⋮---- pub fn as str &self - &'… 证据：`lib/collection/src/shards/transfer/mod.rs`
- **Update Handler**（source_file）：use std::path::PathBuf; use std::sync::Arc; ⋮---- use cancel::CancellationToken; use common::budget::ResourceBudget; use common::counter::hardware accumulator::HwMeasurementAcc; use common::save on disk::SaveOnDisk; use parking lot::Mutex; use segment::types::SeqNumberType; use shard::operations::CollectionUpdateOperations; use shard::segment holder::locked::LockedSegmentHolder; use tokio::runtime::Handle; ⋮---- use tokio::task::JoinHandle; ⋮---- use crate::collection::payload index schema::PayloadIndexSchema; use crate::collection manager::optimizers::TrackerLog; ⋮---- use crate::common::stoppable task::StoppableTaskHandle; use crate::operations::shared storage config::SharedStorageConfig;… 证据：`lib/collection/src/update_handler.rs`
- **Mod**（source_file）：pub mod applied seq; pub mod flush workers; pub mod internal update result; mod optimization worker; mod update worker; ⋮---- pub struct UpdateWorkers {} 证据：`lib/collection/src/update_workers/mod.rs`
- **Lib**（source_file）：pub mod blocking; pub mod future; ⋮---- pub enum Error { 证据：`lib/common/cancel/src/lib.rs`
- **Mod**（source_file）：pub mod conditioned counter; pub mod counter cell; pub mod hardware accumulator; pub mod hardware counter; pub mod hardware data; pub mod iterator hw measurement; pub mod referenced counter; 证据：`lib/common/common/src/counter/mod.rs`
- **Mod**（source_file）：mod check; mod fadvise; mod r move; mod ops; mod safe delete; mod sync; ⋮---- pub use sync::bulk sync dir; 证据：`lib/common/common/src/fs/mod.rs`
- **cfg any test, feature = "testing"**（source_file）：use std::fmt::Debug; use std::sync::atomic::AtomicBool; ⋮---- use check stopped::CheckStopped; use on final count::OnFinalCount; ⋮---- use crate::iterator ext::stoppable iter::StoppableIter; ⋮---- pub super mod on final count; ⋮---- mod check stopped; mod fallible; pub mod ordering iterator; pub mod stoppable iter; ⋮---- pub trait IteratorExt: Iterator { ⋮---- fn check stop every self, every: usize, f: F - CheckStopped ⋮---- fn stop if self, is stopped: &'a AtomicBool - StoppableIter ⋮---- /// Will execute the callback when the iterator is dropped. /// ⋮---- /// /// The callback receives the total number of times .next was called on the iterator, ⋮---- /// The callback receives the total nu… 证据：`lib/common/common/src/iterator_ext/mod.rs`
- **Lib**（source_file）：pub mod aligned buf; pub mod binary search; pub mod bitpacking; pub mod bitpacking links; pub mod bitpacking ordered; pub mod bitvec; pub mod budget; pub mod bytes; pub mod counter; pub mod cow; pub mod cpu; pub mod cpu utilization; pub mod defaults; pub mod delta pack; pub mod disk; pub mod either variant; pub mod ext; pub mod fixed length priority queue; pub mod flags; pub mod fs; pub mod generic consts; pub mod is alive lock; pub mod iterator ext; pub mod load concurrency; pub mod low memory; pub mod math; pub mod maybe uninit; pub mod memory usage; pub mod mmap; pub mod num traits; pub mod panic; pub mod persisted hashmap; pub mod process counter; pub mod process cpu usage; pub mod prog… 证据：`lib/common/common/src/lib.rs`
- **Advice**（source_file）：use std::hint::black box; use std::num::Wrapping; ⋮---- use serde::Deserialize; ⋮---- pub fn set global advice: Advice { ADVICE.write = advice; ⋮---- pub fn get global - Advice { ADVICE.read ⋮---- pub enum Advice { ⋮---- fn from advice: Advice - Self { ⋮---- pub enum AdviceSetting { ⋮---- impl AdviceSetting { ⋮---- pub fn resolve self - Advice { ⋮---- AdviceSetting::Global = get global , ⋮---- pub fn madvise madviseable: &impl Madviseable, advice: Advice - io::Result { madviseable.madvise advice ⋮---- pub trait Madviseable { ⋮---- fn madvise &self, advice: Advice - io::Result { ⋮---- self.advise impl advice.into ?; ⋮---- Ok ⋮---- fn populate &self { ⋮---- if crate::low memory::low memory mo… 证据：`lib/common/common/src/mmap/advice.rs`
- **Mod**（source_file）：pub mod advice; mod mmap readonly; mod mmap rw; mod ops; 证据：`lib/common/common/src/mmap/mod.rs`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **Qdrant 简介**：importance `high`
  - source_paths: README.md, Cargo.toml
- **核心概念**：importance `high`
  - source_paths: lib/collection/src/collection/mod.rs, lib/segment/src/segment/mod.rs, lib/segment/src/data_types/primitive.rs
- **系统架构**：importance `high`
  - source_paths: src/main.rs, lib/storage/src/lib.rs, lib/storage/src/content_manager/mod.rs
- **集合管理**：importance `high`
  - source_paths: lib/collection/src/collection/mod.rs, lib/collection/src/operations/config_diff.rs, lib/storage/src/content_manager/toc/create_collection.rs
- **HNSW 索引原理与实现**：importance `high`
  - source_paths: lib/segment/src/index/hnsw_index/hnsw.rs, lib/segment/src/index/hnsw_index/hnsw/vector_index_impl.rs, lib/segment/src/index/hnsw_index/graph_layers.rs, lib/segment/src/index/hnsw_index/graph_layers_builder.rs
- **向量存储系统**：importance `high`
  - source_paths: lib/segment/src/vector_storage/mod.rs, lib/segment/src/vector_storage/dense/dense_vector_storage.rs, lib/segment/src/vector_storage/sparse/mod.rs, lib/segment/src/vector_storage/quantized/quantized_storage.rs
- **量化技术（TurboQuant、Scalar、Binary、PQ）**：importance `high`
  - source_paths: lib/quantization/src/lib.rs, lib/quantization/src/turboquant/mod.rs, lib/quantization/src/encoded_vectors_pq.rs, lib/quantization/src/encoded_vectors_binary.rs, lib/quantization/src/turboquant/simd/mod.rs
- **分片与复制**：importance `high`
  - source_paths: lib/collection/src/shards/replica_set/mod.rs, lib/collection/src/shards/shard_transfer.rs, lib/storage/src/content_manager/consensus/persistent.rs

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `e01c207f40a2fe01ed23a191957a76e224fe5726`
- inspected_files: `Dockerfile`, `README.md`, `docs/CONTRIBUTING.md`, `docs/CODE_OF_CONDUCT.md`, `docs/DEVELOPMENT.md`, `docs/roadmap/roadmap-2024.md`, `docs/roadmap/roadmap-2022.md`, `docs/roadmap/README.md`, `docs/roadmap/roadmap-2023.md`, `docs/redoc/default_version.js`, `docs/redoc/v0.11.2/openapi.json`, `docs/redoc/v0.11.3/openapi.json`, `docs/redoc/v0.8.0/openapi.json`, `docs/redoc/v0.10.3/openapi.json`, `docs/redoc/v1.11.x/openapi.json`, `docs/redoc/v0.10.0/openapi.json`, `docs/redoc/v0.10.1/openapi.json`, `docs/redoc/v0.11.1/openapi.json`, `docs/redoc/v0.7.0/openapi.json`, `docs/redoc/v1.16.x/openapi.json`

宿主 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: 依赖 Docker 环境

- Trigger: 安装/运行入口包含 Docker 命令：docker run -p 6333:6333 qdrant/qdrant
- Host AI rule: 标注 Docker 前置条件，并提供非 Docker 路径或失败提示。
- Why it matters: 非工程用户可能没有 Docker，启动成本明显增加。
- Evidence: identity.distribution | github_repo:268163609 | https://github.com/qdrant/qdrant | docker run -p 6333:6333 qdrant/qdrant
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

### Constraint 3: 运行可能依赖外部服务

- Trigger: 项目说明出现 external service/cloud/webhook/database 等运行依赖关键词。
- Host AI rule: 确认是否有离线 demo、mock 数据或可替代服务。
- Why it matters: 本地安装成功不等于能力可用，外部服务不可用会阻断体验。
- Evidence: packet_text.keyword_scan | github_repo:268163609 | https://github.com/qdrant/qdrant | matched external service / cloud / webhook / database keyword
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

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

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

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

- Trigger: no_demo
- Host AI rule: 把风险写入边界卡，并确认是否需要人工复核。
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | github_repo:268163609 | https://github.com/qdrant/qdrant | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

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

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