# memvid - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **AI 研究者或研究型 Agent 构建者**：README 明确围绕研究、实验或论文工作流展开。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 它能做什么

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

## 怎么开始

- `git clone https://github.com/memvid/memvid.git` 证据：`README.md` Claim：`clm_0003` supported 0.86
- `curl -L 'https://huggingface.co/BAAI/bge-small-en-v1.5/resolve/main/onnx/model.onnx' \` 证据：`README.md` Claim：`clm_0004` supported 0.86
- `curl -L 'https://huggingface.co/BAAI/bge-small-en-v1.5/resolve/main/tokenizer.json' \` 证据：`README.md` Claim：`clm_0005` supported 0.86
- `curl -L 'https://huggingface.co/BAAI/bge-base-en-v1.5/resolve/main/onnx/model.onnx' \` 证据：`README.md` Claim：`clm_0006` supported 0.86
- `curl -L 'https://huggingface.co/BAAI/bge-base-en-v1.5/resolve/main/tokenizer.json' \` 证据：`README.md` Claim：`clm_0007` supported 0.86
- `curl -L 'https://huggingface.co/nomic-ai/nomic-embed-text-v1.5/resolve/main/onnx/model.onnx' \` 证据：`README.md` Claim：`clm_0008` supported 0.86
- `curl -L 'https://huggingface.co/nomic-ai/nomic-embed-text-v1.5/resolve/main/tokenizer.json' \` 证据：`README.md` Claim：`clm_0009` supported 0.86
- `curl -L 'https://huggingface.co/thenlper/gte-large/resolve/main/onnx/model.onnx' \` 证据：`README.md` Claim：`clm_0010` supported 0.86
- `curl -L 'https://huggingface.co/thenlper/gte-large/resolve/main/tokenizer.json' \` 证据：`README.md` Claim：`clm_0011` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

- **适合人群线索：AI 研究者或研究型 Agent 构建者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86

### 现在还不能相信

- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。
- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`CLAUDE.md`
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`CLAUDE.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`
- **环境变量 / API Key**：项目入口文档明确出现 API key、token、secret 或账号凭证配置。 原因：如果真实安装需要凭证，应先使用测试凭证并经过权限/合规判断。 证据：`README.md`, `docker/cli/README.md`, `docker/cli/TESTING.md`, `docs/i18n/README.es.md` 等
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）
- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）
- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）
- **不要使用真实生产凭证**：环境变量/API key 一旦进入宿主或工具链，可能产生账号和合规风险。（适用：出现 API、TOKEN、KEY、SECRET 等环境线索时。）
- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。
- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **准备撤销测试 API key 或 token**：测试凭证泄露或误用时，可以快速止损。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0012` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0013` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。
- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。
- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。
- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。
- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **Internationalization i18n - README Translations**（project_doc）：Internationalization i18n - README Translations 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.md`
- **Benchmark Highlights**（project_doc）：Memvid is a single-file memory layer for AI agents with instant retrieval and long-term memory. Persistent, versioned, and portable memory, without databases. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Docker Images for Memvid**（project_doc）：This directory contains Docker configurations for Memvid components. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/README.md`
- **Memvid Installer**（project_doc）：The installer automatically checks for and installs required dependencies, then installs Memvid globally: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`install/README.md`
- **Memvid CLI Docker Image**（project_doc）：AI memory CLI with crash-safe, single-file storage and semantic search. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/cli/README.md`
- **Docker Setup for Memvid Core**（project_doc）：This document describes how to use Docker with the Memvid Core Rust library. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/core/README.md`
- **CLAUDE.md**（project_doc）：This file provides guidance to Claude Code and other AI assistants working with this repository. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`
- **Contributing to Memvid**（project_doc）：Thank you for your interest in contributing to Memvid! We welcome contributions from everyone. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **MV2 File Format Specification**（project_doc）：MV2 is a single-file format for AI memory storage. Everything lives in one file: header, write-ahead log, data segments, search indices, and metadata. No sidecar files. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`MV2_SPEC.md`
- **Contributing Translations i18n**（project_doc）：Thank you for helping translate Memvid’s documentation and make the project accessible to a global audience. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/CONTRIBUTING_TRANSLATIONS.md`
- **المساهمة في Memvid الترجمة العربية**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.ar.md`
- **মেমভিড-এ অবদান বাংলা অনুবাদ**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.bn.md`
- **Co je Memvid?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.cs.md`
- **Lo más destacado de los benchmarks**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.es.md`
- **Qu'est-ce que Memvid ?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.fr.md`
- **What is Memvid?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.hi.md`
- **Memvidとは？**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.ja.md`
- **Memvid란?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.ko.md`
- **Wat is Memvid?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.nl.md`
- **Waa maxay Memvid?**（project_doc）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.so.md`
- **基准测试亮点**（project_doc）：Memvid 是专为 AI 智能体设计的单文件记忆层，具备即时检索和长期记忆能力。 持久化、版本化、可移植的记忆，无需数据库。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/i18n/README.zh-CN.md`
- **Testing Memvid CLI Docker Image**（project_doc）：bash Test help command docker run --rm memvid/cli:test --help 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/cli/TESTING.md`
- **Changelog**（project_doc）：All notable changes to Memvid will be documented in this file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Code of Conduct**（project_doc）：We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CODE_OF_CONDUCT.md`
- **Security Policy**（project_doc）：Version Supported ------- ------------------ 2.x :white check mark: < 2.0 :x: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`
- **Docker Setup for Memvid Core**（project_doc）：This document describes how to use Docker with the Memvid Core Rust library. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docker/core/DOCKER.md`

## 证据索引

- 共索引 80 条证据。

- **Internationalization i18n - README Translations**（documentation）：Internationalization i18n - README Translations 证据：`docs/i18n/README.md`
- **Benchmark Highlights**（documentation）：Memvid is a single-file memory layer for AI agents with instant retrieval and long-term memory. Persistent, versioned, and portable memory, without databases. 证据：`README.md`
- **Docker Images for Memvid**（documentation）：This directory contains Docker configurations for Memvid components. 证据：`docker/README.md`
- **Memvid Installer**（documentation）：The installer automatically checks for and installs required dependencies, then installs Memvid globally: 证据：`install/README.md`
- **Memvid CLI Docker Image**（documentation）：AI memory CLI with crash-safe, single-file storage and semantic search. 证据：`docker/cli/README.md`
- **Docker Setup for Memvid Core**（documentation）：This document describes how to use Docker with the Memvid Core Rust library. 证据：`docker/core/README.md`
- **CLAUDE.md**（documentation）：This file provides guidance to Claude Code and other AI assistants working with this repository. 证据：`CLAUDE.md`
- **Contributing to Memvid**（documentation）：Thank you for your interest in contributing to Memvid! We welcome contributions from everyone. 证据：`CONTRIBUTING.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **MV2 File Format Specification**（documentation）：MV2 is a single-file format for AI memory storage. Everything lives in one file: header, write-ahead log, data segments, search indices, and metadata. No sidecar files. 证据：`MV2_SPEC.md`
- **Contributing Translations i18n**（documentation）：Thank you for helping translate Memvid’s documentation and make the project accessible to a global audience. 证据：`docs/i18n/CONTRIBUTING_TRANSLATIONS.md`
- **المساهمة في Memvid الترجمة العربية**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.ar.md`
- **মেমভিড-এ অবদান বাংলা অনুবাদ**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.bn.md`
- **Co je Memvid?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.cs.md`
- **Lo más destacado de los benchmarks**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.es.md`
- **Qu'est-ce que Memvid ?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.fr.md`
- **What is Memvid?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.hi.md`
- **Memvidとは？**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.ja.md`
- **Memvid란?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.ko.md`
- **Wat is Memvid?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.nl.md`
- **Waa maxay Memvid?**（documentation）：🇺🇸 English 🇪🇸 Español 🇫🇷 Français 🇸🇴 Soomaali 🇸🇦 العربية 🇧🇪/🇳🇱 Nederlands 🇮🇳 हिन्दी 🇧🇩 বাংলা 🇨🇿 Čeština 🇰🇷 한국어 🇯🇵 日本語 证据：`docs/i18n/README.so.md`
- **基准测试亮点**（documentation）：Memvid 是专为 AI 智能体设计的单文件记忆层，具备即时检索和长期记忆能力。 持久化、版本化、可移植的记忆，无需数据库。 证据：`docs/i18n/README.zh-CN.md`
- **Testing Memvid CLI Docker Image**（documentation）：bash Test help command docker run --rm memvid/cli:test --help 证据：`docker/cli/TESTING.md`
- **Memvid CLI Docker Image**（source_file）：Memvid CLI Docker Image FROM ubuntu:24.04 证据：`docker/cli/Dockerfile`
- **Multi-stage Dockerfile for Memvid Core Rust Library**（source_file）：Multi-stage Dockerfile for Memvid Core Rust Library Build stage FROM rust:1.92-slim-trixie AS builder 证据：`docker/core/Dockerfile`
- **Development Dockerfile for Memvid Core**（source_file）：Development Dockerfile for Memvid Core FROM rust:1.92-slim-trixie AS builder 证据：`docker/core/Dockerfile.dev`
- **Test Dockerfile for Memvid Core**（source_file）：Test Dockerfile for Memvid Core FROM rust:1.92-slim-trixie AS builder 证据：`docker/core/Dockerfile.test`
- **Auto Tag**（source_file）：use regex::Regex; ⋮---- pub struct AutoTagResult { ⋮---- pub struct AutoTagger; impl AutoTagger { ⋮---- pub fn analyse &self, text: &str, include dates: bool - AutoTagResult { if text.trim .is empty { ⋮---- let tags = extract keywords text, Self::MAX TAGS ; let labels = derive labels text, Self::MAX LABELS ; ⋮---- extract dates text ⋮---- fn extract keywords text: &str, limit: usize - Vec { ⋮---- std::sync::LazyLock::new Regex::new r" ?i a-z0-9 a-z0-9'- +" .unwrap ; ⋮---- .into iter .collect ⋮---- for token in TOKEN RE.find iter text { let candidate = token.as str .to lowercase ; if candidate.len = counts.into iter .collect ; scored.sort by a, b b.1.cmp &a.1 .then with a.0.cmp &b.0 ; ⋮----… 证据：`src/analysis/auto_tag.rs`
- **Mod**（source_file）：pub mod auto tag; pub mod ner; ⋮---- pub mod temporal; ⋮---- pub mod temporal enrich; 证据：`src/analysis/mod.rs`
- **must use**（source_file）：pub struct NerModelInfo { ⋮---- /// URL for ONNX model pub model url: &'static str, ⋮---- /// Model size in MB pub size mb: f32, /// Maximum sequence length pub max seq len: usize, /// Whether this is the default model pub is default: bool, ⋮---- /// Available NER models registry pub static NER MODELS: & NerModelInfo = & NerModelInfo { ⋮---- /// Get NER model info by name must use pub fn get ner model info name: &str - Option { NER MODELS.iter .find m m.name == name ⋮---- pub fn default ner model info - &'static NerModelInfo { ⋮---- .iter .find m m.is default .expect "default NER model must exist" ⋮---- // ============================================================================ // Entit… 证据：`src/analysis/ner.rs`
- **Mod**（source_file）：mod capsule; mod capsule stream; mod constants; mod crypto; mod error; mod types; ⋮---- pub use error::EncryptionError; 证据：`src/encryption/mod.rs`
- **Engine**（source_file）：use crate::error::Result; ⋮---- pub struct EnrichmentContext { ⋮---- impl EnrichmentContext { ⋮---- pub fn new ⋮---- pub struct EnrichmentResult { ⋮---- impl EnrichmentResult { ⋮---- pub fn success cards: Vec - Self { ⋮---- pub fn empty - Self { ⋮---- pub fn failed error: impl Into - Self { ⋮---- error: Some error.into , ⋮---- pub trait EnrichmentEngine: Send + Sync { ⋮---- fn init &mut self - Result { Ok ⋮---- fn is ready &self - bool { ⋮---- mod tests { ⋮---- struct TestEngine; impl EnrichmentEngine for TestEngine { fn kind &self - &'static str { ⋮---- fn version &self - &'static str { ⋮---- fn enrich &self, ctx: &EnrichmentContext - EnrichmentResult { ⋮---- fn test enrichment context { ⋮… 证据：`src/enrich/engine.rs`
- **Mod**（source_file）：pub mod engine; pub mod rules; ⋮---- pub use rules::RulesEngine; 证据：`src/enrich/mod.rs`
- **Mod**（source_file）：pub mod header; ⋮---- pub mod manifest wal; ⋮---- pub mod temporal index; pub mod time index; pub mod wal; 证据：`src/io/mod.rs`
- **Helpers**（source_file）：use std::collections::HashMap; use crate::memvid::lifecycle::Memvid; use crate::memvid::mutation::augment search text; use crate::types::Frame; ⋮---- impl Memvid { ⋮---- pub fn vec index dimension &self - Option { ⋮---- .as ref .map manifest manifest.dimension .filter dim dim 0 ⋮---- pub fn effective vec index dimension &self - Result { ⋮---- .filter dim dim 0 ; ⋮---- None = segment dim = Some descriptor.dimension , ⋮---- return Err MemvidError::InvalidToc { reason: format! ⋮---- .into , ⋮---- Err MemvidError::InvalidToc { ⋮---- Some manifest , = Ok Some manifest , None, Some segment = Ok Some segment , None, None = Ok None , ⋮---- pub fn embedding identity summary &self, max frames: usize… 证据：`src/memvid/helpers.rs`
- **Mod**（source_file）：mod acl; pub mod ask; pub mod audit; ⋮---- pub mod builder; pub mod chunks; pub mod doctor; pub mod enrichment; pub mod frame; mod helpers; pub mod lifecycle; pub mod maintenance; pub mod memory; pub mod mesh; pub mod mutation; ⋮---- pub mod planner; ⋮---- pub mod replay ops; pub mod search; mod segments; pub mod sketch; pub mod ticket; pub mod timeline; ⋮---- pub mod workers; ⋮---- pub use frame::BlobReader; 证据：`src/memvid/mod.rs`
- **Planner**（source_file）：use super::builder::BuildOpts; use crate::types::FrameId; pub struct SegmentPlanner { ⋮---- impl SegmentPlanner { pub fn new opts: BuildOpts - Self { ⋮---- pub fn plan from chunks &self, mut chunks: Vec - Vec { ⋮---- if chunks.is empty { ⋮---- chunks.sort by key chunk chunk.frame id, chunk.chunk index ; ⋮---- for mut chunk in chunks.into iter { let chunk tokens = chunk.token estimate.max 1 ; let chunk pages = chunk.page span .max 1 ; ⋮---- if !current chunks.is empty ⋮---- .last .map c: &SegmentChunkPlan c.token end .unwrap or 0 ; plans.push SegmentPlan::new ⋮---- current chunks.push chunk ; ⋮---- if !current chunks.is empty { ⋮---- .unwrap or running tokens ; ⋮---- pub struct SegmentPlan {… 证据：`src/memvid/planner.rs`
- **Api**（source_file）：use tempfile::TempDir; use crate::memvid::lifecycle::Memvid; ⋮---- impl Memvid { pub fn enable lex &mut self - Result { self.ensure writable ?; ⋮---- if self.lex index.is none && crate::memvid::lifecycle::has lex index &self.toc { self.load lex index from manifest ?; ⋮---- if self.tantivy.is none { self.init tantivy ?; ⋮---- return Ok ; ⋮---- if self.toc.indexes.lex.is none { ⋮---- self.toc.indexes.lex = Some crate::types::LexIndexManifest { ⋮---- self.commit ⋮---- pub fn search lex &mut self, query: &str, limit: usize - Result { ⋮---- return Err MemvidError::LexNotEnabled ; ⋮---- self.ensure lex index ?; let index = self.lex index.as ref .ok or MemvidError::LexNotEnabled ?; Ok index.search… 证据：`src/memvid/search/api.rs`
- **Builders**（source_file）：use std::collections::HashMap; ⋮---- use crate::memvid::lifecycle::Memvid; ⋮---- impl Memvid { ⋮---- pub crate fn build lex artifact &mut self - Result { ⋮---- return Ok None ; ⋮---- .iter .filter frame frame.status == FrameStatus::Active .cloned .collect ; ⋮---- let content = self.frame content &frame ?; ⋮---- .clone .unwrap or else crate::default uri frame.id ; builder.add document ⋮---- frame.title.as deref , ⋮---- let artifact = builder.finish ?; ⋮---- Ok Some artifact, index ⋮---- pub crate fn build vec artifact ⋮---- if let Some index = self.vec index.as ref { for frame id, embedding in index.entries { if self.frame is active frame id { builder.add document frame id, embedding.to vec… 证据：`src/memvid/search/builders.rs`
- **Fallback**（source_file）：use super::helpers::attach temporal metadata; ⋮---- use crate::memvid::lifecycle::Memvid; ⋮---- use std::collections::HashSet; use std::time::Instant; pub super fn search with lex fallback ⋮---- .as ref .ok or MemvidError::LexNotEnabled ?; let uri filter = request.uri.as deref ; let scope filter = if uri filter.is some { ⋮---- request.scope.as deref ⋮---- let matches: Vec = index.compute matches query tokens, uri filter, scope filter ; let snippet window = request.snippet chars.max 80 ; let max snippets per doc = request.top k.max 1 ; ⋮---- if !filter.contains &matched.frame id { ⋮---- .ok .and then idx memvid.toc.frames.get idx ⋮---- stale skips = stale skips.saturating add 1 ; ⋮---- let c… 证据：`src/memvid/search/fallback.rs`
- **Helpers**（source_file）：use crate::MemvidError; use crate::Result; use crate::memvid::lifecycle::Memvid; ⋮---- use crate::types::FrameId; ⋮---- use std::collections::HashMap; ⋮---- use std::collections::HashSet; ⋮---- pub super fn empty search response ⋮---- pub super fn timestamp to rfc3339 timestamp: i64 - Option { ⋮---- .ok .map dt { dt.format &Rfc3339 .unwrap or else timestamp.to string ⋮---- pub super fn parse cursor cursor: Option , total hits: usize - Result { ⋮---- return Ok 0 ; ⋮---- let trimmed = token.trim ; if trimmed.is empty { ⋮---- .map err MemvidError::InvalidCursor { ⋮---- return Err MemvidError::InvalidCursor { ⋮---- Ok value ⋮---- pub crate fn build context hits: & SearchHit - String { if hits.i… 证据：`src/memvid/search/helpers.rs`
- **Mod**（source_file）：use std::time::Instant; use crate::memvid::lifecycle::Memvid; ⋮---- mod api; mod builders; ⋮---- mod fallback; pub crate mod helpers; ⋮---- mod tantivy; ⋮---- mod time filter; ⋮---- pub use tantivy::parse content date to timestamp; ⋮---- use tantivy::try tantivy search; ⋮---- pub use time filter::frame ids for temporal filter; ⋮---- use time filter::frame ids in date range; ⋮---- impl Memvid { pub fn search &mut self, request: SearchRequest - Result { ⋮---- return Err MemvidError::LexNotEnabled ; ⋮---- if self.tantivy.is none { self.init tantivy ?; ⋮---- let mut query tokens = parsed.text tokens ; query tokens.retain token !token.trim .is empty ; ⋮---- .into iter .map s s.as str .to ascii l… 证据：`src/memvid/search/mod.rs`
- **Tantivy**（source_file）：use super::helpers::attach temporal metadata; ⋮---- use crate::Result; use crate::lex::compute snippet slices; use crate::memvid::frame::ChunkInfo; use crate::memvid::lifecycle::Memvid; ⋮---- use log::warn; use std::collections::HashSet; use std::time::Instant; pub super fn try tantivy search ⋮---- let engine = match memvid.tantivy.as ref { ⋮---- return Ok None ; ⋮---- let analyzed = engine.analyse text token ; stemmed tokens.extend analyzed ; ⋮---- .as deref .and then cursor cursor.parse:: .ok .unwrap or 0 ; let base docs = request.top k.max 1 + offset hint; let mut doc limit = base docs.saturating mul 4 .max 20 ; ⋮---- doc limit = doc limit.min filter.len .max 1 ; ⋮---- let uri filter = r… 证据：`src/memvid/search/tantivy.rs`
- **derive Debug, Clone**（source_file）：mod docx; mod passthrough; mod pdf; mod pptx; mod xls; mod xlsx; pub mod xlsx chunker; pub mod xlsx ooxml; pub mod xlsx table detect; use serde json::Value; pub use docx::DocxReader; pub use passthrough::PassthroughReader; pub use pdf::PdfReader; pub use pptx::PptxReader; pub use xls::XlsReader; ⋮---- pub use xlsx chunker::XlsxChunkingOptions; pub use xlsx table detect::DetectedTable; ⋮---- pub enum DocumentFormat { ⋮---- impl DocumentFormat { ⋮---- pub fn label self - &'static str { ⋮---- /// Hint provided to readers before probing/extraction. derive Debug, Clone pub struct ReaderHint { ⋮---- pub fn new mime: Option , format: Option - Self { ⋮---- pub fn with uri mut self, uri: Option - Se… 证据：`src/reader/mod.rs`
- **Engine**（source_file）：use crate::MemvidError; use crate::error::Result; use crate::memvid::lifecycle::Memvid; ⋮---- use std::time::Instant; use uuid::Uuid; ⋮---- pub struct ActionReplayResult { ⋮---- pub struct ReplayResult { ⋮---- impl ReplayResult { ⋮---- pub fn is success &self - bool { ⋮---- pub fn match rate &self - f64 { ⋮---- pub struct ReplayExecutionConfig { ⋮---- impl Default for ReplayExecutionConfig { fn default - Self { ⋮---- pub struct ReplayEngine { /// The memory file to replay against mem: &'a mut Memvid, ⋮---- pub fn new mem: &'a mut Memvid, config: ReplayExecutionConfig - Self { ⋮---- /// Replay a full session from the beginning. pub fn replay session &mut self, session: &ReplaySession - Resul… 证据：`src/replay/engine.rs`
- **Mod**（source_file）：mod engine; mod types; ⋮---- use crate::MemvidError; use crate::error::Result; use uuid::Uuid; ⋮---- pub struct ReplayConfig { ⋮---- pub struct ActiveSession { ⋮---- impl ActiveSession { ⋮---- pub fn new name: Option , config: ReplayConfig - Self { ⋮---- pub fn record action &mut self, action: ReplayAction { self.session.add action action ; ⋮---- pub fn should checkpoint &self - bool { ⋮---- pub fn create checkpoint &mut self, snapshot: StateSnapshot - Checkpoint { ⋮---- self.session.next sequence .saturating sub 1 , ⋮---- self.session.add checkpoint checkpoint.clone ; ⋮---- pub fn end mut self - ReplaySession { self.session.end ; ⋮---- pub fn session id &self - Uuid { ⋮---- pub mod storage… 证据：`src/replay/mod.rs`
- **Mod**（source_file）：mod parser; ⋮---- mod tantivy; use crate::types::Frame; ⋮---- pub crate use parser::parse query; ⋮---- pub struct EvaluationContext { ⋮---- impl ParsedQuery { pub fn evaluate &self, ctx: &EvaluationContext - bool { self.expr.evaluate ctx ⋮---- pub fn text tokens &self - Vec { self.expr.collect tokens ⋮---- pub fn required date range &self - Option { self.expr.required date range ⋮---- pub fn contains field terms &self - bool { self.expr.contains field terms ⋮---- impl TextTerm { pub crate fn matches &self, haystack: &str - bool { ⋮---- let needle = word.to ascii lowercase ; haystack.contains &needle ⋮---- let needle = phrase.to ascii lowercase ; ⋮---- TextTerm::Wildcard pattern = pattern.re… 证据：`src/search/mod.rs`
- **Engine**（source_file）：use super::query; ⋮---- use super::util::to search value; use crate::search::parser::ParsedQuery; ⋮---- use tantivy::collector::TopDocs; use tantivy::indexer::IndexWriter; ⋮---- use tempfile::TempDir; pub struct TantivyEngine { ⋮---- impl Drop for TantivyEngine { fn drop &mut self { if let Some writer = self.index writer.take { drop writer ; ⋮---- pub struct TantivyDocHit { ⋮---- pub struct TantivySnapshot { ⋮---- pub struct TantivySegmentBlob { ⋮---- impl TantivyEngine { pub fn create - Result { let dir = TempDir::new .map err err MemvidError::Tantivy { reason: format! "failed to allocate Tantivy work directory: {err}" , ⋮---- let schema = build schema ; let index = Index::create in dir di… 证据：`src/search/tantivy/engine.rs`
- **Mod**（source_file）：mod engine; mod query; mod schema; mod storage; mod util; mod wal; ⋮---- pub crate use wal::LexWalBatch; 证据：`src/search/tantivy/mod.rs`
- **Schema**（source_file）：use tantivy::Index; ⋮---- pub super fn initialise tokenizer index: &Index { ⋮---- .filter LowerCaser .filter Stemmer::new Language::English .build ; index.tokenizers .register "memvid default", analyzer ; index.tokenizers .register "raw", RawTokenizer::default ; ⋮---- pub super fn build schema - Schema { ⋮---- .set tokenizer "memvid default" .set index option IndexRecordOption::WithFreqsAndPositions ; let content field = TEXT.set stored .set indexing options content options ; schema builder.add text field "content", content field ; ⋮---- .set index option IndexRecordOption::Basic ; ⋮---- .set stored .set indexing options keyword indexing.clone ; schema builder.add text field "tags", keyword… 证据：`src/search/tantivy/schema.rs`
- **Storage**（source_file）：use std::collections::BTreeMap; ⋮---- pub struct EmbeddedLexSegment { ⋮---- impl EmbeddedLexSegment { pub fn from manifest manifest: &LexSegmentManifest - Self { ⋮---- path: manifest.path.clone , ⋮---- pub fn to manifest &self - LexSegmentManifest { ⋮---- path: self.path.clone , ⋮---- pub struct EmbeddedLexStorage { ⋮---- impl EmbeddedLexStorage { pub fn new - Self { ⋮---- pub fn from manifest ⋮---- storage.segments.insert segment.path.clone , ⋮---- pub fn generation &self - u64 { ⋮---- pub fn doc count &self - u64 { ⋮---- pub fn checksum &self - u8; 32 { ⋮---- pub fn segments &self - impl Iterator { self.segments.values ⋮---- pub fn is empty &self - bool { self.segments.is empty ⋮---- pub… 证据：`src/search/tantivy/storage.rs`
- **Mod**（source_file）：mod chunker; mod detector; 证据：`src/structure/mod.rs`
- **Mod**（source_file）：mod layout; mod multi page; mod pdf extractor; mod storage; mod types; ⋮---- pub use pdf extractor::extract tables from pdf; ⋮---- use crate::error::Result; pub fn extract tables ⋮---- let lower = filename.to lowercase ; if lower.ends with ".pdf" is pdf magic bytes { extract tables from pdf bytes, filename, options } else if lower.ends with ".xlsx" lower.ends with ".xls" { Ok TableExtractionResult::empty } else if lower.ends with ".docx" lower.ends with ".doc" { ⋮---- } else if lower.ends with ".html" lower.ends with ".htm" { ⋮---- fn is pdf magic bytes: & u8 - bool { ⋮---- .iter .skip while &&b b == 0xEF b == 0xBB b == 0xBF b.is ascii whitespace .take 4 .copied ⋮---- trimmed.starts with b"… 证据：`src/table/mod.rs`
- **must use**（source_file）：use std::collections::BTreeMap; use serde json::json; ⋮---- use crate::VecEmbedder; ⋮---- use crate::memvid::Memvid; ⋮---- pub fn store table ⋮---- store table impl mem, table, embed rows, None, None ⋮---- pub fn store table with embedder ⋮---- store table impl mem, table, embed rows, embedder, embedding identity ⋮---- fn store table impl ⋮---- let meta payload = serde json::to vec &json! { ⋮---- .map err e MemvidError::TableExtraction { reason: format! "failed to serialize table metadata: {e}" , ⋮---- meta extra.insert "table id".to string , table id.clone ; meta extra.insert "n rows".to string , table.n rows.to string ; meta extra.insert "n cols".to string , table.n cols.to string ; meta… 证据：`src/table/storage.rs`
- **Mod**（source_file）：mod extractor; mod types; pub use extractor::TripletExtractor; 证据：`src/triplet/mod.rs`
- **Mod**（source_file）：pub mod acl; pub mod adaptive; pub mod ask; pub mod audit; pub mod binding; pub mod common; pub mod embedding; pub mod embedding identity; pub mod frame; pub mod graph query; pub mod logic mesh; pub mod manifest; pub mod memories track; pub mod memory card; pub mod metadata; pub mod options; pub mod reranker; pub mod schema; pub mod search; pub mod sketch track; pub mod structure; ⋮---- pub mod temporal; pub mod ticket; pub mod verification; ⋮---- pub use frame::AnchorSource; ⋮---- pub use manifest::TemporalSegmentDescriptor; pub use manifest::TemporalTrackManifest; 证据：`src/types/mod.rs`
- **derive Debug, Clone, Default, Serialize, Deserialize**（source_file）：use std::collections::HashMap; use super::logic mesh::EntityKind; pub type PredicateId = String; ⋮---- pub enum ValueType { ⋮---- impl Default for ValueType { fn default - Self { ⋮---- impl ValueType { ⋮---- pub fn matches &self, value: &str - bool { ⋮---- Self::Number = value.parse:: .is ok , ⋮---- value.parse:: .is ok value.contains 'T' value.contains '-' ⋮---- Self::Boolean = matches! ⋮---- Self::EntityRef { .. } = !value.is empty , Self::Enum { values } = values.iter .any v v.eq ignore ascii case value , ⋮---- pub fn description &self - String { ⋮---- Self::String = "string".to string , Self::Number = "number".to string , Self::DateTime = "datetime".to string , Self::Boolean = "boolean"… 证据：`src/types/schema.rs`
- **Changelog**（documentation）：All notable changes to Memvid will be documented in this file. 证据：`CHANGELOG.md`
- **Code of Conduct**（documentation）：We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. 证据：`CODE_OF_CONDUCT.md`
- **Security Policy**（documentation）：Version Supported ------- ------------------ 2.x :white check mark: < 2.0 :x: 证据：`SECURITY.md`
- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **Memvid 概述与 Smart Frames 架构**：importance `high`
  - source_paths: README.md, MV2_SPEC.md, src/lib.rs, src/memvid/mod.rs, src/memvid/lifecycle.rs
- **数据摄入、生命周期与多模态支持**：importance `high`
  - source_paths: src/reader/mod.rs, src/reader/pdf.rs, src/reader/docx.rs, src/reader/pptx.rs, src/reader/xlsx.rs
- **搜索、检索与嵌入模型**：importance `high`
  - source_paths: src/memvid/search/mod.rs, src/memvid/search/tantivy.rs, src/search/tantivy/engine.rs, src/search/tantivy/query.rs, src/search/tantivy/schema.rs
- **SDK、Docker、加密胶囊与运维**：importance `high`
  - source_paths: docker/README.md, docker/cli/README.md, docker/cli/Dockerfile, docker/cli/TESTING.md, docker/core/README.md

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `fa9efe5127fd807b8a9c14200e8fa59ae2170fd5`
- inspected_files: `README.md`, `docs/i18n/CONTRIBUTING_TRANSLATIONS.md`, `docs/i18n/README.ar.md`, `docs/i18n/README.bn.md`, `docs/i18n/README.cs.md`, `docs/i18n/README.es.md`, `docs/i18n/README.fr.md`, `docs/i18n/README.hi.md`, `docs/i18n/README.ja.md`, `docs/i18n/README.ko.md`, `docs/i18n/README.md`, `docs/i18n/README.nl.md`, `docs/i18n/README.so.md`, `docs/i18n/README.zh-CN.md`, `docs/i18n/scripts/auto-add-flags.js`, `docs/i18n/scripts/update-localized-readmes.js`

宿主 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: 来源证据：Feature Request: Concurrent Writers Support for Multi-Agent Scenarios

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Feature Request: Concurrent Writers Support for Multi-Agent Scenarios
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/218 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：EmbeddedWal checksum mismatch on 16th put of varied text

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：EmbeddedWal checksum mismatch on 16th put of varied text
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/230 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：Python async SDK + MCP server + invalidation roadmap?

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

### Constraint 4: 来源证据：[BUG] Opening .mv2 file created with 2.0.152 in 2.0.159 hangs indefinitely on low-memory systems

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[BUG] Opening .mv2 file created with 2.0.152 in 2.0.159 hangs indefinitely on low-memory systems
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/225 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：[BUG] Tantivy working directories leaked to %TEMP% on every `put()` call, never cleaned up

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[BUG] Tantivy working directories leaked to %TEMP% on every `put()` call, never cleaned up
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/215 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 来源证据：[BUG]

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

### Constraint 7: 来源证据：README Translations (i18n) – Tracking Issue

- Trigger: GitHub 社区证据显示该项目存在一个能力理解相关的待验证问题：README Translations (i18n) – Tracking Issue
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/100 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 来源证据：README translation: Romanian (ro)

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

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

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

### Constraint 10: 来源证据：TypeError: 'dict' object cannot be converted to 'PyString' when calling mem.put()

- Trigger: GitHub 社区证据显示该项目存在一个运行相关的待验证问题：TypeError: 'dict' object cannot be converted to 'PyString' when calling mem.put()
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/memvid/memvid/issues/222 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
