# 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`
- **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`
- **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, 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`
- **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`
- **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, 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`
- **Openapi Collections.Ytt**（source_file）：paths: /collections: get: tags: - Collections summary: List collections description: Get list name of all existing collections operationId: get collections responses: /collections/{collection name}: get: tags: - Collections summary: Collection info description: Get detailed information about specified existing collection operationId: get collection parameters: - name: collection name in: path description: Name of the collection to retrieve required: true schema: type: string responses: put: tags: - Collections summary: Create collection description: Create new collection with given parameters operationId: create collection requestBody: description: Parameters of a new collection content: ap… 证据：`openapi/openapi-collections.ytt.yaml`
- **Openapi Main.Ytt**（source_file）：openapi: 3.0.1 security: - api-key: - bearerAuth: - {} info: title: Qdrant API description: API description for Qdrant vector search engine. This document describes CRUD and search operations on collections of points vectors with payload . Qdrant supports any combinations of should , min should , must and must not conditions, which makes it possible to use in applications when object could not be described solely by vector. It could be location features, availability flags, and other custom properties businesses should take into account. This examples cover the most basic use-cases - collection creation and basic vector search. First - let's create a collection with dot-production metric. E… 证据：`openapi/openapi-main.ytt.yaml`
- **Openapi Points.Ytt**（source_file）：paths: /collections/{collection name}/points/{id}: get: tags: - Points summary: Get point description: Retrieve full information of single point by id operationId: get point parameters: - name: collection name in: path description: Name of the collection to retrieve from required: true schema: type: string - name: id in: path description: Id of the point required: true schema: $ref: " /components/schemas/ExtendedPointId" - name: consistency in: query description: Define read consistency guarantees for the operation required: false schema: $ref: " /components/schemas/ReadConsistency" responses: /collections/{collection name}/points: post: tags: - Points summary: Get points description: Retri… 证据：`openapi/openapi-points.ytt.yaml`
- **Openapi.Lib**（source_file）：default: description: error content: application/json: schema: $ref: " /components/schemas/ErrorResponse" 4XX: description: error content: application/json: schema: $ref: " /components/schemas/ErrorResponse" "200": description: successful operation content: application/json: schema: type: object properties: usage: default: null anyOf: - $ref: ' /components/schemas/Usage' - nullable: true time: type: number format: float description: Time spent to process this request example: 0.002 status: type: string example: ok result: default: description: error content: application/json: schema: $ref: " /components/schemas/ErrorResponse" 4XX: description: error content: application/json: schema: $ref:… 证据：`openapi/openapi.lib.yml`
- **Build**（source_file）：use std::path::PathBuf; use std::process::Command; ⋮---- use common::defaults; use tonic build::Builder; ⋮---- fn main - std::io::Result { ⋮---- assert eq! ⋮---- let build out dir = PathBuf::from env::var "OUT DIR" .unwrap ; ⋮---- .configure validation .file descriptor set path build out dir.join "qdrant descriptor.bin" .out dir "src/grpc/" .compile ⋮---- append to file ⋮---- let git commit id = option env! "GIT COMMIT ID" .map String::from .or else { match Command::new "git" .args "rev-parse", "HEAD" .output { Ok output if output.status.success = { Some str::from utf8 &output.stdout .unwrap .trim .to string ⋮---- println! "cargo:warning=current git commit hash could not be determined" ; ⋮-… 证据：`lib/api/build.rs`
- **Inference**（source_file）：use tonic::Status; ⋮---- fn from document: rest::Document - Self { ⋮---- .map DocumentOptions::into options .map dict to proto .unwrap or default , ⋮---- type Error = Status; ⋮---- fn try from document: grpc::Document - Result { ⋮---- Ok Self { ⋮---- options: Some DocumentOptions::Common proto dict to json options ? , ⋮---- fn from image: rest::Image - Self { ⋮---- image: Some json to proto image , ⋮---- options: options.options.map dict to proto .unwrap or default , ⋮---- fn try from image: grpc::Image - Result { ⋮---- let image = image.ok or else Status::invalid argument "Empty image is not allowed" ?; ⋮---- image: proto to json image ?, ⋮---- options: Some proto dict to json options ? ,… 证据：`lib/api/src/conversions/inference.rs`
- **Mod**（source_file）：pub mod inference; pub mod json; pub mod vectors; 证据：`lib/api/src/conversions/mod.rs`
- **Conversions**（source_file）：use std::time::Instant; ⋮---- use ahash::AHashSet; ⋮---- use common::counter::hardware accumulator::HwMeasurementAcc; use common::counter::hardware data::HardwareData; use common::types::ScoreType; use itertools::Itertools; use ordered float::OrderedFloat; use segment::common::operation error::OperationError; ⋮---- use segment::data types::modifier::Modifier; ⋮---- use sparse::common::sparse vector::validate sparse vector impl; use tonic::Status; use uuid::Uuid; ⋮---- use super::stemming algorithm::StemmingParams; ⋮---- use crate::grpc::qdrant::condition::ConditionOneOf; use crate::grpc::qdrant::r match::MatchValue; use crate::grpc::qdrant::payload index params::IndexParams; use crate::grpc… 证据：`lib/api/src/grpc/conversions.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`
- **Conversions**（source_file）：use std::collections::HashMap; ⋮---- use uuid::Uuid; ⋮---- use crate::grpc; use crate::rest::NamedVectorStruct; use crate::rest::models::InferenceUsage; ⋮---- fn from value: InferenceUsage - Self { let mut grpc usage models = HashMap::with capacity value.models.len ; ⋮---- grpc usage models.insert ⋮---- fn from value: VectorInternal - Self { ⋮---- VectorOutput::MultiDense vector.into multi vectors ⋮---- fn from value: VectorStructInternal - Self { ⋮---- VectorStructOutput::MultiDense vector.into multi vectors ⋮---- .into iter .map k, v k, VectorOutput::from v .collect , ⋮---- fn from value: Vector - Self { ⋮---- unimplemented! "Inference is not implemented, please use vectors instead" ⋮----… 证据：`lib/api/src/rest/conversions.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`
- **Point Ops**（source_file）：use std::collections::HashMap; use std::sync::Arc; use std::time::Duration; ⋮---- use common::counter::hardware accumulator::HwMeasurementAcc; use common::types::DeferredBehavior; use futures::stream::FuturesUnordered; ⋮---- use itertools::Itertools; ⋮---- use shard::count::CountRequestInternal; use shard::retrieve::record internal::RecordInternal; use shard::scroll::ScrollRequestInternal; ⋮---- use super::Collection; use crate::operations::consistency params::ReadConsistency; use crate::operations::point ops::WriteOrdering; use crate::operations::shard selector internal::ShardSelectorInternal; ⋮---- use crate::shards::shard::ShardId; use crate::shards::shard trait::WaitUntil; ⋮---- impl Co… 证据：`lib/collection/src/collection/point_ops.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`
- **Memory Reporter**（source_file）：use crate::operations::types::CollectionResult; ⋮---- pub struct MemoryUsageReport { ⋮---- impl MemoryUsageReport { pub fn merge &mut self, other: &MemoryUsageReport { ⋮---- pub struct NamedVectorMemoryReport { ⋮---- pub struct NamedSparseVectorMemoryReport { ⋮---- pub struct NamedPayloadIndexMemoryReport { ⋮---- pub struct OtherMemoryReport { ⋮---- pub struct CollectionMemoryReport { ⋮---- impl CollectionMemoryReport { ⋮---- pub fn merge all reports: Vec - CollectionMemoryReport { ⋮---- result.total.merge &total ; ⋮---- if let Some existing = result.vectors.iter mut .find v v.name == name { existing.storage.merge storage ; existing.index.merge index ; ⋮---- Some a , Some b = a.merge b , No… 证据：`lib/collection/src/common/memory_reporter.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`
- **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`
- **Cluster Ops**（source_file）：use std::num::NonZeroU32; ⋮---- use common::validation::validate shard different peers; use schemars::JsonSchema; ⋮---- use uuid::Uuid; ⋮---- use crate::shards::replica set::replica set state::ReplicaState; ⋮---- use crate::shards::transfer::ShardTransferMethod; ⋮---- pub enum ClusterOperations { ⋮---- pub struct CreateShardingKeyOperation { ⋮---- pub struct DropShardingKeyOperation { ⋮---- pub struct RestartTransferOperation { ⋮---- pub struct CreateShardingKey { ⋮---- pub struct DropShardingKey { ⋮---- pub struct RestartTransfer { ⋮---- impl Validate for ClusterOperations { fn validate &self - Result { ⋮---- ClusterOperations::MoveShard op = op.validate , ClusterOperations::ReplicateShard… 证据：`lib/collection/src/operations/cluster_ops.rs`
- **Consistency Params**（source_file）：use std::borrow::Cow; ⋮---- use schemars::JsonSchema; ⋮---- pub enum ReadConsistency { ⋮---- impl Validate for ReadConsistency { fn validate &self - Result { ⋮---- errors.add "factor", { ⋮---- error.add param Cow::from "value" , factor ; error.add param Cow::from "min" , &1 ; ⋮---- Err errors ⋮---- ReadConsistency::Factor ReadConsistency::Type = Ok , ⋮---- impl Default for ReadConsistency { fn default - Self { ⋮---- impl ReadConsistency { pub fn try from optional ⋮---- consistency.map TryFrom::try from .transpose ⋮---- type Error = tonic::Status; ⋮---- fn try from consistency: Option - Result { ⋮---- Some consistency = consistency.try into , None = Ok Self::Factor 1 , ⋮---- fn try from cons… 证据：`lib/collection/src/operations/consistency_params.rs`
- **Conversions**（source_file）：use std::collections::BTreeMap; ⋮---- use std::time::Duration; ⋮---- use api::conversions::json::json path from proto; ⋮---- use api::grpc::qdrant::quantization config diff::Quantization; ⋮---- use api::rest::schema::ShardKeySelector; ⋮---- use itertools::Itertools; use segment::common::operation error::OperationError; use segment::data types::modifier::Modifier; ⋮---- use shard::retrieve::record internal::RecordInternal; use tonic::Status; ⋮---- use super::consistency params::ReadConsistency; ⋮---- use crate::lookup::WithLookup; use crate::lookup::types::WithLookupInterface; use crate::operations::ClockTag; ⋮---- use crate::operations::shard selector internal::ShardSelectorInternal; ⋮----… 证据：`lib/collection/src/operations/conversions.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`
- **Point Ops**（source_file）：use std::collections::HashMap; ⋮---- use ahash::AHashMap; use api::rest::ShardKeySelector; use itertools::izip; use schemars::JsonSchema; use segment::common::utils::transpose map into named vector; use segment::data types::named vectors::NamedVectors; use segment::data types::vectors::VectorInternal; use segment::types::Filter; ⋮---- use crate::hash ring::HashRingRouter; use crate::shards::shard::ShardId; ⋮---- pub enum PointsSelector { ⋮---- impl Validate for PointsSelector { fn validate &self - Result { ⋮---- PointsSelector::PointIdsSelector ids = ids.validate , PointsSelector::FilterSelector filter = filter.validate , ⋮---- pub struct FilterSelector { ⋮---- pub enum WriteOrdering { ⋮---… 证据：`lib/collection/src/operations/point_ops.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`
- **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`
- **Conversions**（source_file）：use api::conversions::json::payload to proto; use api::grpc::conversions::convert shard key from grpc opt; use api::grpc::qdrant::points selector::PointsSelectorOneOf; ⋮---- use segment::data types::vectors::VectorStructInternal; use segment::json path::JsonPath; ⋮---- use tonic::Status; ⋮---- use crate::operations::conversions::write ordering to proto; ⋮---- use crate::operations::types::CollectionResult; use crate::operations::vector ops::UpdateVectorsOp; ⋮---- use crate::shards::shard::ShardId; use crate::shards::shard trait::WaitUntil; ⋮---- pub crate fn wait override to proto wait: WaitUntil - Option { Some i32::from api::grpc::qdrant::WaitUntil::from wait ⋮---- pub fn internal sync po… 证据：`lib/collection/src/shards/conversions.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`
- **Snapshot Tests**（source_file）：use std::collections::HashSet; use std::sync::Arc; ⋮---- use common::save on disk::SaveOnDisk; use common::tar ext; use fs err::File; use segment::types::SnapshotFormat; ⋮---- use shard::payload index schema::PayloadIndexSchema; use shard::segment holder::SegmentHolder; use shard::segment holder::locked::LockedSegmentHolder; use tempfile::Builder; ⋮---- use crate::shards::local shard::snapshot::snapshot all segments; ⋮---- fn test snapshot all { let dir = Builder::new .prefix "segment dir" .tempdir .unwrap ; let segment1 = build segment 1 dir.path ; let segment2 = build segment 2 dir.path ; ⋮---- let sid1 = holder.add new segment1 ; let sid2 = holder.add new segment2 ; assert ne! sid1, sid2… 证据：`lib/collection/src/shards/local_shard/snapshot_tests.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 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`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **Introduction to Qdrant**：importance `high`
  - source_paths: README.md, lib/segment/src/lib.rs
- **System Architecture**：importance `high`
  - source_paths: src/actix/mod.rs, src/tonic/mod.rs, lib/collection/src/lib.rs, lib/storage/src/lib.rs
- **HNSW Index Implementation**：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/gpu/mod.rs, lib/segment/src/index/hnsw_index/search_context.rs
- **Vector Storage**：importance `high`
  - source_paths: lib/segment/src/vector_storage/mod.rs, lib/segment/src/vector_storage/dense/mod.rs, lib/segment/src/vector_storage/sparse/mod.rs, lib/segment/src/vector_storage/quantized/mod.rs, lib/segment/src/vector_storage/multi_dense/mod.rs
- **Quantization System**：importance `high`
  - source_paths: lib/quantization/src/lib.rs, lib/quantization/src/encoded_vectors.rs, lib/quantization/src/turboquant/mod.rs, lib/quantization/src/turboquant/quantization.rs, lib/quantization/src/encoded_vectors_pq.rs
- **Sharding and Replication**：importance `high`
  - source_paths: lib/collection/src/shards/mod.rs, lib/collection/src/shards/replica_set/mod.rs, lib/collection/src/shards/shard_holder/mod.rs, lib/collection/src/collection/resharding.rs, lib/collection/src/shards/transfer/mod.rs
- **Consensus and Cluster Coordination**：importance `medium`
  - source_paths: lib/storage/src/content_manager/consensus/mod.rs, lib/storage/src/content_manager/consensus/persistent.rs, lib/storage/src/content_manager/consensus/consensus_wal.rs, src/consensus.rs
- **REST and gRPC API**：importance `high`
  - source_paths: lib/api/src/rest/mod.rs, lib/api/src/grpc/mod.rs, src/actix/api/mod.rs, src/tonic/api/mod.rs, lib/api/src/rest/models.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: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
