# seekdb - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

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

## 它能做什么

- **Hybrid Vector + Full-text + Scalar Search**（可做安装前预览）：seekdb supports unified querying across vector embeddings, full-text text search, and traditional scalar data in a single SQL query, enabling hybrid search for AI workloads. 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Embedded Deployment Mode**（可做安装前预览）：seekdb can run embedded in-process without requiring a server, dramatically reducing deployment complexity and resource requirements for AI agents and local development. 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Python SDK (pyseekdb)**（可做安装前预览）：seekdb provides an official Python SDK called pyseekdb that enables database operations, SQL execution, and embedded/server mode switching from Python applications. 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Async Index Pipeline (Change Stream)**（可做安装前预览）：seekdb's Change Stream framework decouples DML writes from index construction, enabling high throughput streaming writes without blocking on index builds. 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Two-Level HNSW Index (Delta + Snapshot)**（可做安装前预览）：seekdb implements a two-level HNSW index architecture with incremental delta indexes for new vectors and snapshot indexes for bulk data, ensuring immediate searchability of newly written vectors. 证据：`README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **FORK/MERGE Sandboxes (Copy-on-Write)**（可做安装前预览）：seekdb supports table-level forking with copy-on-write semantics, enabling safe sandbox environments for AI agent exploration without affecting production data. 证据：`README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **MySQL Protocol Compatibility**（需要安装后验证）：seekdb is fully compatible with the MySQL protocol, allowing it to work with standard MySQL clients, ecosystem tools, and existing database applications. 证据：`README.md`, `package/wheel/README.md`, `docs/developer-guide/en/build-and-run.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **SQLite Compatibility Benchmark Suite**（可做安装前预览）：seekdb includes a benchmark suite demonstrating compatibility with SQLite operations and providing performance comparisons. 证据：`sqlite-benchmark/README.md`, `sqlite-benchmark/README.md`, `sqlite-benchmark/README.md` Claim：`clm_0008` supported 0.86
- **Multi-Platform Build Support**（可做安装前预览）：seekdb can be built and deployed across multiple platforms including various Linux distributions, macOS (Apple Silicon), and Android (via NDK cross-compilation). 证据：`docs/developer-guide/en/toolchain.md`, `docs/developer-guide/zh/toolchain.md`, `docs/developer-guide/en/android.md`, `package/wheel/README.md` Claim：`clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0007` supported 0.86, `clm_0009` supported 0.86 等
- **HTAP (Hybrid Transactional/Analytical Processing)**（可做安装前预览）：seekdb supports hybrid transactional and analytical processing workloads, combining OLTP and OLAP capabilities in a single database system. 证据：`package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0007` supported 0.86, `clm_0009` supported 0.86 等
- **C++ Plugin Architecture**（可做安装前预览）：seekdb implements an extensible plugin system with C/C++ interfaces for both internal and external plugins, including adapters and sample code. 证据：`src/plugin/README.md`, `src/plugin/README.md` Claim：`clm_0011` supported 0.86
- **Custom Memory Management (No STL)**（可做安装前预览）：seekdb prohibits STL and boost containers to support multi-tenant resource isolation, providing custom containers like ObSEArray for memory control. 证据：`docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md` Claim：`clm_0012` supported 0.86, `clm_0013` supported 0.86
- **Single-Entry Single-Exit Coding Pattern**（可做安装前预览）：seekdb enforces a strict single-entry single-exit pattern for all functions, using OB_SUCC/OB_FAIL macros for error handling flow control. 证据：`docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md` Claim：`clm_0012` supported 0.86, `clm_0013` supported 0.86
- **PALF Cluster Testing Framework**（可做安装前预览）：seekdb includes a performance evaluation framework (mittest/palf_cluster) for testing PALF consensus protocol in real cluster environments with metrics for throughput, latency, and IOPS. 证据：`mittest/palf_cluster/README.md`, `mittest/palf_cluster/README.md` Claim：`clm_0014` supported 0.86
- **Deployment via systemd (Linux)**（需要安装后验证）：seekdb supports installation and management via Linux package managers (yum/apt) with systemd service integration for automated startup and shutdown. 证据：`tools/systemd/README.md`, `tools/systemd/README.md`, `tools/systemd/README.md` Claim：`clm_0015` supported 0.86

## 怎么开始

- `pip install -U pyseekdb   # pyseekdb is the Python SDK for seekdb` 证据：`README.md` Claim：`clm_0017` supported 0.86
- `curl -X POST https://d0.seekdb.ai/api/v1/instances` 证据：`README.md` Claim：`clm_0018` supported 0.86
- `pip install -U pyseekdb` 证据：`README.md` Claim：`clm_0017` supported 0.86, `clm_0019` supported 0.86
- `curl -fsSL https://obportal.s3.ap-southeast-1.amazonaws.com/download-center/opensource/seekdb/seekdb_install.sh | bash` 证据：`README.md` Claim：`clm_0020` supported 0.86
- `git clone https://github.com/oceanbase/seekdb.git` 证据：`README.md` Claim：`clm_0021` supported 0.86

## 继续前判断卡

- **当前建议**：先做角色匹配试用
- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。

### 30 秒判断

- **现在怎么做**：先做角色匹配试用
- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入
- **先别相信**：角色质量和任务匹配不能直接相信。
- **继续会触碰**：角色选择偏差、命令执行、本地环境或项目文件

### 现在可以相信

- **适合人群线索：想在安装前理解开源项目价值和边界的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0016` supported 0.86
- **能力存在：Hybrid Vector + Full-text + Scalar Search**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86
- **能力存在：Embedded Deployment Mode**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86
- **能力存在：Python SDK (pyseekdb)**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86
- **能力存在：Async Index Pipeline (Change Stream)**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86
- **能力存在：Two-Level HNSW Index (Delta + Snapshot)**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86

### 现在还不能相信

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

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`, `docs/developer-guide/en/build-and-run.md`, `package/wheel/README.md`, `tools/systemd/README.md`
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

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

### 退出方式

- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。
- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。
- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。
- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

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

### 任务路由

- **Hybrid Vector + Full-text + Scalar Search**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Embedded Deployment Mode**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Python SDK (pyseekdb)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md`, `package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Async Index Pipeline (Change Stream)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **Two-Level HNSW Index (Delta + Snapshot)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **FORK/MERGE Sandboxes (Copy-on-Write)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`README.md`, `README.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **MySQL Protocol Compatibility**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md`, `package/wheel/README.md`, `docs/developer-guide/en/build-and-run.md` Claim：`clm_0001` supported 0.86, `clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0004` supported 0.86 等
- **SQLite Compatibility Benchmark Suite**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`sqlite-benchmark/README.md`, `sqlite-benchmark/README.md`, `sqlite-benchmark/README.md` Claim：`clm_0008` supported 0.86
- **Multi-Platform Build Support**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`docs/developer-guide/en/toolchain.md`, `docs/developer-guide/zh/toolchain.md`, `docs/developer-guide/en/android.md`, `package/wheel/README.md` Claim：`clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0007` supported 0.86, `clm_0009` supported 0.86 等
- **HTAP (Hybrid Transactional/Analytical Processing)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`package/wheel/README.md`, `package/wheel/README.md` Claim：`clm_0002` supported 0.86, `clm_0003` supported 0.86, `clm_0007` supported 0.86, `clm_0009` supported 0.86 等
- **C++ Plugin Architecture**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`src/plugin/README.md`, `src/plugin/README.md` Claim：`clm_0011` supported 0.86
- **Custom Memory Management (No STL)**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md` Claim：`clm_0012` supported 0.86, `clm_0013` supported 0.86
- **Single-Entry Single-Exit Coding Pattern**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`docs/developer-guide/en/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md`, `docs/developer-guide/zh/coding-convention.md` Claim：`clm_0012` supported 0.86, `clm_0013` supported 0.86
- **PALF Cluster Testing Framework**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`mittest/palf_cluster/README.md`, `mittest/palf_cluster/README.md` Claim：`clm_0014` supported 0.86
- **Deployment via systemd (Linux)**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`tools/systemd/README.md`, `tools/systemd/README.md`, `tools/systemd/README.md` Claim：`clm_0015` supported 0.86

### 上下文规模

- 文件总数：13508
- 重要文件覆盖：40/13508
- 证据索引条目：79
- 角色 / Skill 条目：49

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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


## 角色 / Skill 索引

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

- **seekdb Documentation**（project_doc）：Visit the seekdb-doc https://github.com/oceanbase/seekdb-doc repository to view the official documents for seekdb, the AI-native search database that unifies relational, vector, text, JSON and GIS in a single engine to enable hybrid search and in-database AI workflows. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/README.md`
- **OceanBase seekdb Development Guide**（project_doc）：The target audience of this guide is OceanBase seekdb contributors, both new and experienced. The objective of this guide is to help contributors become an expert of OceanBase seekdb, who is familiar with its design and implementation and thus is able to use it fluently in the real world as well as develop OceanBase seekdb itself deeply. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/README.md`
- **OceanBase seekdb 开发者手册**（project_doc）：面向人群 手册的目标受众是OceanBase seekdb的贡献者，无论是新人还是老手。 目标 手册的目标是帮助贡献者成为OceanBase seekdb的专家，熟悉其设计和实现，从而能够在现实世界中流畅地使用它以及深入开发OceanBase seekdb本身。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/README.md`
- **OceanBase Contributing Guidelines**（project_doc）：Thank you for considering contributing to OceanBase. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/contributing.md`
- **贡献指南**（project_doc）：OceanBase seekdb 社区热情欢迎每一位对数据库技术热爱的开发者，期待携手开启思维碰撞之旅。无论是文档格式调整或文字修正、问题修复还是增加新功能，都是对 OceanBase seekdb 社区参与和贡献方式之一，立刻开启您的 First Contribution 吧！ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/contributing.md`
- **Write. Search. Fork. The State Store for AI Agents.**（project_doc）：Write. Search. Fork. The State Store for AI Agents. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **SQLite Benchmark**（project_doc）：对比 SQLite 与 SeekDB 的性能基准测试。每个测试同时编译两个后端： sqlite 和 seekdb 。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`sqlite-benchmark/README.md`
- **Readme**（project_doc）：This is a common library for OceanBase project. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`deps/oblib/README.md`
- **obtc**（project_doc）：obtc traffic control for OB. man tc if you do not know traffic control. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`deps/oblib/src/lib/tc/README.md`
- **A Test Framework for PALF Cluster**（project_doc）：A Test Framework for PALF Cluster The framework is designed and implentmented for evaluating PALF performance in a real cluster. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`mittest/palf_cluster/README.md`
- **What is OceanBase SeekDB?**（project_doc）：What is OceanBase SeekDB? OceanBase SeekDB is a brand-new AI Native database product developed by the OceanBase team. Built upon the core engine of the OceanBase database, it further meets the demands of AI application scenarios, supporting essential AI features such as comprehensive vector indexing, full-text indexing, hybrid search, and AI Functions. To continuously enhance the developer experience, SeekDB has und… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`package/wheel/README.md`
- **Description**（project_doc）：The latest dooba stable version is 1.0 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`script/dooba/README.md`
- **Readme**（project_doc）：Contains LLVM-based Code Generator logic 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/objit/README.md`
- **plugin 代码结构说明**（project_doc）：plugin 目录下放插件相关的管理代码、对内各插件的接口代码、对外插件接口和API代码、适配器代码和样例代码。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/plugin/README.md`
- **Readme**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/sql/resolver/xa/README.md`
- **Readme**（project_doc）：1. 基本的使用命令行为 ./ob admin -h127.0.0.1 -p28204 -sintl -ssm -mbkmi -mlocal your command 其中 -s 指的就是ssl模式 ，-sintl指的是采用的是国际加密协议，-ssm指的是采用的国密加密协议 暂不支持 , -m指的是加密证书，私钥等的获取方式 , -mbkmi指的是通过bkmi获取CA证书，证书和私钥，-mlocal指的是本地文件模式 2.使用方式 根据OB集群的加密方式来使用， 1 当采用本地文件模式时，将observer工作目录的 wallet/ 文件夹拷贝至ob admin的同级目录下，执行 ./ob admin -h127.0.0.1 -p28204 -sintl -ssm -mlocal your command 即可 2 当采用bkmi模式时，新建一个名为obadmin ssl bkmi.cfg 的文件放在ob admin同级目录下… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tools/ob_admin/README.md`
- **What is ob error**（project_doc）：ob error is an error tool for OceanBase Database. ob error returns information, cause, and possible solutions for the error code you enter. With the help of ob error, it is not necessary to look up the documents for basic error information. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tools/ob_error/README.md`
- **Installing seekdb via yum/apt**（project_doc）：Installing seekdb via yum/apt If you want to deploy seekdb on a Linux RPM platform, you can use yum/apt for single-node installation and simple management with systemd. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`tools/systemd/README.md`
- **Contributing to OceanBase seekdb**（project_doc）：First off, thank you for considering contributing to OceanBase seekdb! We value your time and effort. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Building and Running seekdb on Android**（project_doc）：Building and Running seekdb on Android 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/android.md`
- **Get the code, build and run**（project_doc）：Check the Install toolchain toolchain.md guide for supported OS, GLIBC version requirement, and how to install the C++ toolchain. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/build-and-run.md`
- **Naming Convention**（project_doc）：OceanBase seekdb is a giant project that has been developed for more than ten years and contains millions of lines of C++ code. It already has many unique programming habits. Here are some OceanBase seekdb programming habits to help people who come into contact with the OceanBase seekdb source code for the first time have an easier time accepting and understanding. For more detailed information, please refer to "Oce… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/coding-convention.md`
- **Install toolchain**（project_doc）：To build OceanBase seekdb from source code, you need to install the C++ toolchain in your development environment first. If the C++ toolchain is not installed yet, you can follow the instructions in this document for installation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/toolchain.md`
- **在 Android 上构建和运行 seekdb**（project_doc）：在 macOS 上使用 NDK 工具链将 seekdb 交叉编译为 Android arm64-v8a 架构，然后在模拟器或真机上部署运行。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/android.md`
- **编译与运行**（project_doc）：本文档介绍如何获取 OceanBase seekdb 源代码、编译项目以及运行 seekdb 实例。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/build-and-run.md`
- **命名习惯**（project_doc）：OceanBase seekdb 是一个基于发展了十几年的、包含几百万行C++代码的巨型工程 OceanBase 演化而来，它已经有了很多自己特有的编程习惯，这里介绍一些首次接触seekdb源码同学一些需要注意的事项，也可以让大家更方便的阅读seekdb源码。更详细的内容可以参考 OceanBase seekdb C++编程规范 coding-standard.md 。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/coding-convention.md`
- **安装工具链**（project_doc）：在编译 OceanBase seekdb 源码之前，需要先在开发环境中安装 C++ 工具链。本文档介绍如何在不同操作系统上安装所需的工具链。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/toolchain.md`
- **You're Using the Wrong Benchmark to Choose a Vector Database for Your Agent**（project_doc）：You're Using the Wrong Benchmark to Choose a Vector Database for Your Agent 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/blog/launch_blog_en.md`
- **その Benchmark で Agent のベクトルデータベースを選ぶのは間違いだ**（project_doc）：その Benchmark で Agent のベクトルデータベースを選ぶのは間違いだ 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/blog/launch_blog_jp.md`
- **你在用错误的 Benchmark 选 Agent 的向量数据库**（project_doc）：Agent 的真实负载是 streaming workload——大多数向量数据库不是为它设计的。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/blog/launch_blog_zh.md`
- **1 Introduction**（project_doc）：Number Document Version Revised Chapter Reason for Revision Revision Date ------- ---------------- --------------- ------------------- ------------- 1 1.0 New Nov 7th, 2025 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/coding-standard.md`
- **Introduction**（project_doc）：C++ STL provides many convenient containers, such as vector, map, unordered map, etc. Due to seekdb programming style and memory control, the use of STL containers is prohibited in seekdb. seekdb provides some container implementations, including arrays, linked lists, HashMap, etc. This document will introduce some of these containers. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/container.md`
- **Abstract**（project_doc）：This document describes some methods to debug OceanBase seekdb. We have many ways to debug seekdb, such as gdb, logging, etc. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/debug.md`
- **Homebrew Optimization**（project_doc）：This guide helps you optimize Homebrew for faster downloads, especially useful for users in China. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/homebrew.md`
- **Abstract**（project_doc）：In order to easily read the code of seekdb, we suggest using an IDE that can easily index the symbols of OceanBase seekdb. On Windows, we recommend Source Insight ; on Mac or Linux, we recommend VSCode + ccls to read the OceanBase code. Since Source Insight is very easy to use, this document skips the introduction on how to use it. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/ide-settings.md`
- **OceanBase seekdb System Log Introduction**（project_doc）：OceanBase seekdb System Log Introduction 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/logging.md`
- **Introduction**（project_doc）：Introduction Memory management is one of the most important modules in any large C++ project. Since OceanBase seekdb also needs to deal with the issue of multi-tenant memory resource isolation, seekdb's memory management is more complicated than ordinary C++ projects. Generally, a good memory management module needs to consider the following issues: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/memory.md`
- **Running mysqltest by obd.sh**（project_doc）：When using obd.sh to run the mysqltest test, you need to use the OceanBase seekdb database deployed through obd.sh. This article uses examples to introduce how to use obd.sh to deploy the seekdb database and run the mysqltest test starting from compiling the source code. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/mysqltest.md`
- **Write and Run Unit Tests**（project_doc）：How to Build and Run All Unit Tests 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/en/unittest.md`
- **1 引言**（project_doc）：编号 文档版本 修订章节 修订原因 修订日期 --- ------ -------- ------ ------- 1 0.1 全文 初版 2025/11/7 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/coding-standard.md`
- **介绍**（project_doc）：C++ STL提供了很多很方便的容器，比如vector、map、unordered map等，由于OceanBase seekdb 编程风格与内存控制等原因，在seekdb中禁止使用STL的容器。seekdb 提供了一些容器实现，包括数组、链表、HashMap等，本篇文档会对这些容器做一些介绍。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/container.md`
- **调试方法**（project_doc）：本文档介绍调试 OceanBase seekdb 的常用方法，包括 GDB 调试、日志调试、SQL 调试等。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/debug.md`
- **Homebrew 优化配置**（project_doc）：如果你在使用 Homebrew 时遇到下载速度慢的问题，可以通过配置国内镜像来加速。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/homebrew.md`
- **IDE 配置**（project_doc）：本文档介绍如何配置开发环境以便更好地阅读 OceanBase seekdb 的代码。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/ide-settings.md`
- **OceanBase seekdb 系统日志介绍**（project_doc）：本篇文档主要介绍 OceanBase seekdb 的系统日志，包括日志的分类、级别，如何在程序中输出日志，以及一些日志的实现细节。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/logging.md`
- **简介**（project_doc）：简介 内存管理是所有大型C++工程中最重要的模块之一。由于OceanBase seekdb还需要处理多租户内存资源隔离问题，因此seekdb相较于普通的C++工程，内存管理更加复杂。通常，一个良好的内存管理模块需要考虑以下几个问题： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/memory.md`
- **使用 obd.sh 运行 mysqltest**（project_doc）：要使用 obd.sh 运行 mysqltest 测试，需要通过 obd.sh 部署 OceanBase seekdb 数据库。本文从编译源代码开始，使用示例介绍如何使用 obd.sh 部署 seekdb 数据库并运行 mysqltest 测试。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/mysqltest.md`
- **编写与运行单元测试**（project_doc）：本文档介绍如何在 OceanBase seekdb 项目中编写和运行单元测试。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/developer-guide/zh/unittest.md`
- **嵌入式Python介绍**（project_doc）：简介 我们需要构建出Python的Wheel包，并上传到pypi，用户才可以使用pip install使用。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`package/wheel/how_to_build.md`

## 证据索引

- 共索引 79 条证据。

- **seekdb Documentation**（documentation）：Visit the seekdb-doc https://github.com/oceanbase/seekdb-doc repository to view the official documents for seekdb, the AI-native search database that unifies relational, vector, text, JSON and GIS in a single engine to enable hybrid search and in-database AI workflows. 证据：`docs/README.md`
- **OceanBase seekdb Development Guide**（documentation）：The target audience of this guide is OceanBase seekdb contributors, both new and experienced. The objective of this guide is to help contributors become an expert of OceanBase seekdb, who is familiar with its design and implementation and thus is able to use it fluently in the real world as well as develop OceanBase seekdb itself deeply. 证据：`docs/developer-guide/en/README.md`
- **OceanBase seekdb 开发者手册**（documentation）：面向人群 手册的目标受众是OceanBase seekdb的贡献者，无论是新人还是老手。 目标 手册的目标是帮助贡献者成为OceanBase seekdb的专家，熟悉其设计和实现，从而能够在现实世界中流畅地使用它以及深入开发OceanBase seekdb本身。 证据：`docs/developer-guide/zh/README.md`
- **OceanBase Contributing Guidelines**（documentation）：Thank you for considering contributing to OceanBase. 证据：`docs/developer-guide/en/contributing.md`
- **贡献指南**（documentation）：OceanBase seekdb 社区热情欢迎每一位对数据库技术热爱的开发者，期待携手开启思维碰撞之旅。无论是文档格式调整或文字修正、问题修复还是增加新功能，都是对 OceanBase seekdb 社区参与和贡献方式之一，立刻开启您的 First Contribution 吧！ 证据：`docs/developer-guide/zh/contributing.md`
- **Write. Search. Fork. The State Store for AI Agents.**（documentation）：Write. Search. Fork. The State Store for AI Agents. 证据：`README.md`
- **SQLite Benchmark**（documentation）：对比 SQLite 与 SeekDB 的性能基准测试。每个测试同时编译两个后端： sqlite 和 seekdb 。 证据：`sqlite-benchmark/README.md`
- **Readme**（documentation）：This is a common library for OceanBase project. 证据：`deps/oblib/README.md`
- **obtc**（documentation）：obtc traffic control for OB. man tc if you do not know traffic control. 证据：`deps/oblib/src/lib/tc/README.md`
- **A Test Framework for PALF Cluster**（documentation）：A Test Framework for PALF Cluster The framework is designed and implentmented for evaluating PALF performance in a real cluster. 证据：`mittest/palf_cluster/README.md`
- **What is OceanBase SeekDB?**（documentation）：What is OceanBase SeekDB? OceanBase SeekDB is a brand-new AI Native database product developed by the OceanBase team. Built upon the core engine of the OceanBase database, it further meets the demands of AI application scenarios, supporting essential AI features such as comprehensive vector indexing, full-text indexing, hybrid search, and AI Functions. To continuously enhance the developer experience, SeekDB has undergone extensive resource and performance optimization, allowing it to run in environments with as little as 1 core CPU and 1GB of memory. It features minimal deployment and starts up in seconds, supporting both client/server and embedded deployment modes to significantly lower t… 证据：`package/wheel/README.md`
- **Description**（documentation）：The latest dooba stable version is 1.0 证据：`script/dooba/README.md`
- **Readme**（documentation）：Contains LLVM-based Code Generator logic 证据：`src/objit/README.md`
- **plugin 代码结构说明**（documentation）：plugin 目录下放插件相关的管理代码、对内各插件的接口代码、对外插件接口和API代码、适配器代码和样例代码。 证据：`src/plugin/README.md`
- **Readme**（documentation）：实现xa的resolver，参考文档 证据：`src/sql/resolver/xa/README.md`
- **Readme**（documentation）：1. 基本的使用命令行为 ./ob admin -h127.0.0.1 -p28204 -sintl -ssm -mbkmi -mlocal your command 其中 -s 指的就是ssl模式 ，-sintl指的是采用的是国际加密协议，-ssm指的是采用的国密加密协议 暂不支持 , -m指的是加密证书，私钥等的获取方式 , -mbkmi指的是通过bkmi获取CA证书，证书和私钥，-mlocal指的是本地文件模式 2.使用方式 根据OB集群的加密方式来使用， 1 当采用本地文件模式时，将observer工作目录的 wallet/ 文件夹拷贝至ob admin的同级目录下，执行 ./ob admin -h127.0.0.1 -p28204 -sintl -ssm -mlocal your command 即可 2 当采用bkmi模式时，新建一个名为obadmin ssl bkmi.cfg 的文件放在ob admin同级目录下，将bkmi模式的相关配置内容粘贴到 文件中，取两个花括号间内容, 见本目录下的 obadmin ssl bkmi.cfg 文件，然后执行 ./ob admin -h127.0.0.1 -p28204 -sintl -ssm -mbkmi your command 即可,拷贝到obadmin ssl bkmi.cfg文件内的内容如下，需要包括两个花括号： { "ssl mode":"bkmi", "kms host":"", "root cert":"", "private key":"", "PRIVATE KEY PHRASE":"123456",… 证据：`tools/ob_admin/README.md`
- **What is ob error**（documentation）：ob error is an error tool for OceanBase Database. ob error returns information, cause, and possible solutions for the error code you enter. With the help of ob error, it is not necessary to look up the documents for basic error information. 证据：`tools/ob_error/README.md`
- **Installing seekdb via yum/apt**（documentation）：Installing seekdb via yum/apt If you want to deploy seekdb on a Linux RPM platform, you can use yum/apt for single-node installation and simple management with systemd. 证据：`tools/systemd/README.md`
- **Contributing to OceanBase seekdb**（documentation）：First off, thank you for considering contributing to OceanBase seekdb! We value your time and effort. 证据：`CONTRIBUTING.md`
- **Building and Running seekdb on Android**（documentation）：Building and Running seekdb on Android 证据：`docs/developer-guide/en/android.md`
- **Get the code, build and run**（documentation）：Check the Install toolchain toolchain.md guide for supported OS, GLIBC version requirement, and how to install the C++ toolchain. 证据：`docs/developer-guide/en/build-and-run.md`
- **Naming Convention**（documentation）：OceanBase seekdb is a giant project that has been developed for more than ten years and contains millions of lines of C++ code. It already has many unique programming habits. Here are some OceanBase seekdb programming habits to help people who come into contact with the OceanBase seekdb source code for the first time have an easier time accepting and understanding. For more detailed information, please refer to "OceanBase seekdb C++ Coding Standard" ./coding-standard.md . 证据：`docs/developer-guide/en/coding-convention.md`
- **Install toolchain**（documentation）：To build OceanBase seekdb from source code, you need to install the C++ toolchain in your development environment first. If the C++ toolchain is not installed yet, you can follow the instructions in this document for installation. 证据：`docs/developer-guide/en/toolchain.md`
- **在 Android 上构建和运行 seekdb**（documentation）：在 macOS 上使用 NDK 工具链将 seekdb 交叉编译为 Android arm64-v8a 架构，然后在模拟器或真机上部署运行。 证据：`docs/developer-guide/zh/android.md`
- **编译与运行**（documentation）：本文档介绍如何获取 OceanBase seekdb 源代码、编译项目以及运行 seekdb 实例。 证据：`docs/developer-guide/zh/build-and-run.md`
- **命名习惯**（documentation）：OceanBase seekdb 是一个基于发展了十几年的、包含几百万行C++代码的巨型工程 OceanBase 演化而来，它已经有了很多自己特有的编程习惯，这里介绍一些首次接触seekdb源码同学一些需要注意的事项，也可以让大家更方便的阅读seekdb源码。更详细的内容可以参考 OceanBase seekdb C++编程规范 coding-standard.md 。 证据：`docs/developer-guide/zh/coding-convention.md`
- **安装工具链**（documentation）：在编译 OceanBase seekdb 源码之前，需要先在开发环境中安装 C++ 工具链。本文档介绍如何在不同操作系统上安装所需的工具链。 证据：`docs/developer-guide/zh/toolchain.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **License**（source_file）：Copyright c 2016-present, Facebook, Inc. All rights reserved. 证据：`deps/oblib/src/lib/compress/zstd_1_3_8/zstd_src/LICENSE`
- **You're Using the Wrong Benchmark to Choose a Vector Database for Your Agent**（documentation）：You're Using the Wrong Benchmark to Choose a Vector Database for Your Agent 证据：`docs/blog/launch_blog_en.md`
- **その Benchmark で Agent のベクトルデータベースを選ぶのは間違いだ**（documentation）：その Benchmark で Agent のベクトルデータベースを選ぶのは間違いだ 证据：`docs/blog/launch_blog_jp.md`
- **你在用错误的 Benchmark 选 Agent 的向量数据库**（documentation）：Agent 的真实负载是 streaming workload——大多数向量数据库不是为它设计的。 证据：`docs/blog/launch_blog_zh.md`
- **1 Introduction**（documentation）：Number Document Version Revised Chapter Reason for Revision Revision Date ------- ---------------- --------------- ------------------- ------------- 1 1.0 New Nov 7th, 2025 证据：`docs/developer-guide/en/coding-standard.md`
- **Introduction**（documentation）：C++ STL provides many convenient containers, such as vector, map, unordered map, etc. Due to seekdb programming style and memory control, the use of STL containers is prohibited in seekdb. seekdb provides some container implementations, including arrays, linked lists, HashMap, etc. This document will introduce some of these containers. 证据：`docs/developer-guide/en/container.md`
- **Abstract**（documentation）：This document describes some methods to debug OceanBase seekdb. We have many ways to debug seekdb, such as gdb, logging, etc. 证据：`docs/developer-guide/en/debug.md`
- **Homebrew Optimization**（documentation）：This guide helps you optimize Homebrew for faster downloads, especially useful for users in China. 证据：`docs/developer-guide/en/homebrew.md`
- **Abstract**（documentation）：In order to easily read the code of seekdb, we suggest using an IDE that can easily index the symbols of OceanBase seekdb. On Windows, we recommend Source Insight ; on Mac or Linux, we recommend VSCode + ccls to read the OceanBase code. Since Source Insight is very easy to use, this document skips the introduction on how to use it. 证据：`docs/developer-guide/en/ide-settings.md`
- **OceanBase seekdb System Log Introduction**（documentation）：OceanBase seekdb System Log Introduction 证据：`docs/developer-guide/en/logging.md`
- **Introduction**（documentation）：Introduction Memory management is one of the most important modules in any large C++ project. Since OceanBase seekdb also needs to deal with the issue of multi-tenant memory resource isolation, seekdb's memory management is more complicated than ordinary C++ projects. Generally, a good memory management module needs to consider the following issues: 证据：`docs/developer-guide/en/memory.md`
- **Running mysqltest by obd.sh**（documentation）：When using obd.sh to run the mysqltest test, you need to use the OceanBase seekdb database deployed through obd.sh. This article uses examples to introduce how to use obd.sh to deploy the seekdb database and run the mysqltest test starting from compiling the source code. 证据：`docs/developer-guide/en/mysqltest.md`
- **Write and Run Unit Tests**（documentation）：How to Build and Run All Unit Tests 证据：`docs/developer-guide/en/unittest.md`
- **1 引言**（documentation）：编号 文档版本 修订章节 修订原因 修订日期 --- ------ -------- ------ ------- 1 0.1 全文 初版 2025/11/7 证据：`docs/developer-guide/zh/coding-standard.md`
- **介绍**（documentation）：C++ STL提供了很多很方便的容器，比如vector、map、unordered map等，由于OceanBase seekdb 编程风格与内存控制等原因，在seekdb中禁止使用STL的容器。seekdb 提供了一些容器实现，包括数组、链表、HashMap等，本篇文档会对这些容器做一些介绍。 证据：`docs/developer-guide/zh/container.md`
- **调试方法**（documentation）：本文档介绍调试 OceanBase seekdb 的常用方法，包括 GDB 调试、日志调试、SQL 调试等。 证据：`docs/developer-guide/zh/debug.md`
- **Homebrew 优化配置**（documentation）：如果你在使用 Homebrew 时遇到下载速度慢的问题，可以通过配置国内镜像来加速。 证据：`docs/developer-guide/zh/homebrew.md`
- **IDE 配置**（documentation）：本文档介绍如何配置开发环境以便更好地阅读 OceanBase seekdb 的代码。 证据：`docs/developer-guide/zh/ide-settings.md`
- **OceanBase seekdb 系统日志介绍**（documentation）：本篇文档主要介绍 OceanBase seekdb 的系统日志，包括日志的分类、级别，如何在程序中输出日志，以及一些日志的实现细节。 证据：`docs/developer-guide/zh/logging.md`
- **简介**（documentation）：简介 内存管理是所有大型C++工程中最重要的模块之一。由于OceanBase seekdb还需要处理多租户内存资源隔离问题，因此seekdb相较于普通的C++工程，内存管理更加复杂。通常，一个良好的内存管理模块需要考虑以下几个问题： 证据：`docs/developer-guide/zh/memory.md`
- **使用 obd.sh 运行 mysqltest**（documentation）：要使用 obd.sh 运行 mysqltest 测试，需要通过 obd.sh 部署 OceanBase seekdb 数据库。本文从编译源代码开始，使用示例介绍如何使用 obd.sh 部署 seekdb 数据库并运行 mysqltest 测试。 证据：`docs/developer-guide/zh/mysqltest.md`
- **编写与运行单元测试**（documentation）：本文档介绍如何在 OceanBase seekdb 项目中编写和运行单元测试。 证据：`docs/developer-guide/zh/unittest.md`
- **嵌入式Python介绍**（documentation）：简介 我们需要构建出Python的Wheel包，并上传到pypi，用户才可以使用pip install使用。 证据：`package/wheel/how_to_build.md`
- **Boost headers use std::unary function removed in C++17; NDK libc++ supports this compat macro**（source_file）：cmake minimum required VERSION 3.20 证据：`CMakeLists.txt`
- **Build**（source_file）：< .SYNOPSIS OceanBase Lite Windows build script - mirrors build.sh on Linux/macOS. 证据：`build.ps1`
- **Get CPU cores and CMAKE command, compatible with macOS and Linux**（source_file）：TOPDIR=$ cd "$ dirname "$0" " && pwd BUILD SH=$TOPDIR/build.sh DEP DIR=${TOPDIR}/deps/3rd/usr/local/oceanbase/deps/devel TOOLS DIR=${TOPDIR}/deps/3rd/usr/local/oceanbase/devtools Get CPU cores and CMAKE command, compatible with macOS and Linux if "$ uname -s " == "Darwin" ; then CMAKE COMMAND="cmake -DCMAKE EXPORT COMPILE COMMANDS=1" CPU CORES=$ sysctl -n hw.ncpu KERNEL RELEASE="" else CMAKE COMMAND="${TOOLS DIR}/bin/cmake -DCMAKE EXPORT COMPILE COMMANDS=1" CPU CORES=$ grep -c ^processor /proc/cpuinfo KERNEL RELEASE=$ grep -Po 'release 0-9 {1}' /etc/issue 2 /dev/null fi ALL ARGS= "$@" BUILD ARGS= MAKE ARGS= -j $CPU CORES NEED MAKE=false NEED INIT=false ANDROID BUILD=false LLD OPTION=ON ASAN… 证据：`build.sh`
- **Round 2: write new observation, queryable immediately**（source_file）：client = pyseekdb.Client path="./agent state.db" memory = client.get or create collection name="episodic" ⋮---- results = memory.query query texts="ui preferences?", n results=2 ⋮---- Round 2: write new observation, queryable immediately ⋮---- results = memory.query query texts="purchase intent signals", n results=1 证据：`images/demo.py`
- **add subdirectory palf cluster**（source_file）：set MIT SRCS env/ob simple server helper.cpp 证据：`mittest/CMakeLists.txt`
- **Oceanbase Ce Build**（source_file）：PROJECT DIR=$1 PROJECT NAME=$2 VERSION=$3 RELEASE=$4 CURDIR=$PWD TOP DIR= pwd /../ OB DISABLE LSE OPTION="" $OB DISABLE LSE == "1" && OB DISABLE LSE OPTION="-DOB DISABLE LSE=ON" OB BUILD DESKTOP OPTION="" $OB BUILD DESKTOP == "1" && OB BUILD DESKTOP OPTION="-DOB BUILD DESKTOP=ON" echo " BUILD args: TOP DIR=${TOP DIR} PROJECT NAME=${PROJECT NAME} VERSION=${VERSION} RELEASE=${RELEASE} ${OB DISABLE LSE OPTION}" cd ${TOP DIR} ./build.sh clean ./build.sh \ rpm \ -DOB RELEASEID=$RELEASE \ -DBUILD NUMBER=$RELEASE \ -DUSE LTO CACHE=ON \ ${OB DISABLE LSE OPTION} \ ${OB BUILD DESKTOP OPTION}\ --init \ --make rpm exit 1 cd ${TOP DIR}/build rpm mv .rpm $CURDIR exit 2 证据：`rpm/oceanbase-ce-build.sh`
- **Oceanbase Ce Cdc Build**（source_file）：PROJECT DIR=$1 PROJECT NAME=$2 VERSION=$3 RELEASE=$4 CURDIR=$PWD TOP DIR= pwd /../ OB DISABLE LSE OPTION="" $OB DISABLE LSE == "1" && OB DISABLE LSE OPTION="-DOB DISABLE LSE=ON" echo " BUILD args: TOP DIR=${TOP DIR} PROJECT NAME=${PROJECT NAME} VERSION=${VERSION} RELEASE=${RELEASE} ${OB DISABLE LSE OPTION}" cd ${TOP DIR} ./tools/upgrade/gen obcdc compatiable info.py ./build.sh clean ./build.sh \ rpm \ -DBUILD CDC ONLY=ON \ -DOB RELEASEID=$RELEASE \ -DBUILD NUMBER=$RELEASE \ ${OB DISABLE LSE OPTION}\ --init \ --make rpm exit 1 cd ${TOP DIR}/build rpm mv cdc .rpm $CURDIR exit 2 证据：`rpm/oceanbase-ce-cdc-build.sh`
- **Oceanbase Lite Build**（source_file）：PROJECT DIR=$1 PROJECT NAME=$2 VERSION=$3 RELEASE=$4 CURDIR=$PWD TOP DIR= pwd /../ OB DISABLE LSE OPTION="" $OB DISABLE LSE == "1" && OB DISABLE LSE OPTION="-DOB DISABLE LSE=ON" echo " BUILD args: TOP DIR=${TOP DIR} PROJECT NAME=${PROJECT NAME} VERSION=${VERSION} RELEASE=${RELEASE} ${OB DISABLE LSE OPTION}" cd ${TOP DIR} ./build.sh clean ./build.sh \ rpm \ -DOB RELEASEID=$RELEASE \ -DBUILD NUMBER=$RELEASE \ -DUSE LTO CACHE=ON \ ${OB DISABLE LSE OPTION} \ --init \ --make rpm exit 1 cd ${TOP DIR}/build rpm mv .rpm $CURDIR exit 2 证据：`rpm/oceanbase-lite-build.sh`
- **Oceanbase Standalone Build**（source_file）：if $ then exit 1 else CURDIR=$PWD TOP DIR= pwd /../ REDHAT=$ grep -Po ' ?<=release \d' /etc/redhat-release ID=$ grep -Po ' ?<=^ID= . ' /etc/os-release tr -d '"' if "${ID}"x == "alinux"x ; then RELEASE="$4.al8" else RELEASE="$4.el${REDHAT}" fi export BUILD NUMBER=${4} fi OB DISABLE LSE OPTION="" $OB DISABLE LSE == "1" && OB DISABLE LSE OPTION="-DOB DISABLE LSE=ON" OB BUILD STANDALONE OPTION="" $OB BUILD STANDALONE == "1" && OB BUILD STANDALONE OPTION="-DOB BUILD STANDALONE=ON" OB BUILD TEST PUBKEY OPTION="" $OB USE TEST PUBKEY == "1" && OB BUILD TEST PUBKEY OPTION="-DOB USE TEST PUBKEY=ON" echo " BUILD args: TOP DIR=${TOP DIR} RELEASE=${RELEASE} BUILD NUMBER=${BUILD NUMBER} ${OB DISABLE LSE… 证据：`rpm/oceanbase-standalone-build.sh`
- 其余 19 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **seekdb 简介**：importance `high`
  - source_paths: README.md, README_CN.md, docs/blog/launch_blog_en.md
- **安装部署**：importance `high`
  - source_paths: package/wheel/README.md, docs/developer-guide/en/build-and-run.md, docs/developer-guide/zh/build-and-run.md
- **系统架构**：importance `high`
  - source_paths: src/share/change_stream, src/share/vector_index, src/logservice, src/observer, images/architecture.svg
- **Change Stream 异步索引**：importance `high`
  - source_paths: src/share/change_stream, src/share/vector_index, src/logservice/logfetcher
- **向量搜索与混合检索**：importance `high`
  - source_paths: src/share/vector_index, src/observer/table, tools/deploy/mysql_test/test_suite
- **FORK/MERGE 沙箱机制**：importance `high`
  - source_paths: tools/deploy/mysql_test/test_suite/fork_table, src/observer/table, src/storage
- **嵌入式模式**：importance `high`
  - source_paths: src/observer/embed, src/observer/embed/c/seekdb.h, src/observer/embed/python/ob_embed_impl.cpp, src/observer/embed/android/seekdb_jni.cpp, package/wheel
- **SDK 使用指南**：importance `high`
  - source_paths: package/wheel/pyseekdb, package/wheel/seekdb_test.py, images/demo.py

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

- repo_clone_verified: false
- repo_inspection_verified: false
- repo_commit: `unknown`

宿主 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 seekdb container fails to start

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Docker seekdb container fails to start
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_4efd5fa8734843b1a38c24dd0bf33ce1 | https://github.com/oceanbase/seekdb/issues/736 | 来源讨论提到 docker 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：Error executing `CALL dbms_index_manager.refresh` after upgrade to version 1.3.0

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Error executing `CALL dbms_index_manager.refresh` after upgrade to version 1.3.0
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_87d2b7281ded463c97a2b6b8f75838df | https://github.com/oceanbase/seekdb/issues/744 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：Release compilation fails on GitHub master branch due to missing devdeps-gtest-1.8.0 package

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Release compilation fails on GitHub master branch due to missing devdeps-gtest-1.8.0 package
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_0952aa164d554b6eb30a33957902e7f2 | https://github.com/oceanbase/seekdb/issues/609 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 来源证据：Replace source code dependency for compression libraries with header/static library dependency

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Replace source code dependency for compression libraries with header/static library dependency
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_dd8878c1767f48019a7a6de8ee316b6e | https://github.com/oceanbase/seekdb/issues/431 | 来源讨论提到 node 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：Standby fails to switch to primary with error -4109 (can not change_access_mode) during DDL stress test

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Standby fails to switch to primary with error -4109 (can not change_access_mode) during DDL stress test
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_dd2b26a572f543dca7126dbc35c1f32c | https://github.com/oceanbase/seekdb/issues/272 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 来源证据：Fix incorrect results for composite (vector, json->'$.page') NOT IN queries in mysqltest

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Fix incorrect results for composite (vector, json->'$.page') NOT IN queries in mysqltest
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_6ea131c334584a719bcceceb0beddbfb | https://github.com/oceanbase/seekdb/issues/518 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 来源证据：Fix observer crash when dbms_stats.gather_table_stats references non-existent column in method_opt

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Fix observer crash when dbms_stats.gather_table_stats references non-existent column in method_opt
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | cevd_b64c8c43b45e4398adf06f1827e5cdd7 | https://github.com/oceanbase/seekdb/issues/460 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 8: 来源证据：Standby reports 'single replay task cost too much time' (errcode=-4389) after switchover

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Standby reports 'single replay task cost too much time' (errcode=-4389) after switchover
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_19eb5d217a314053acda472366849c4b | https://github.com/oceanbase/seekdb/issues/274 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 9: 来源证据：[Bug]: Spatial Reference System has no WGS 84（SRID=4326）support

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug]: Spatial Reference System has no WGS 84（SRID=4326）support
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_f018b0c63bea4d74b5000c63626fb31a | https://github.com/oceanbase/seekdb/issues/742 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: 来源证据：mysqltest on Windows fails with error 1210 when renaming table column in mysql_column_priv_sqlqa.mysql_column_priv

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：mysqltest on Windows fails with error 1210 when renaming table column in mysql_column_priv_sqlqa.mysql_column_priv
- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_e93f346926154d7d8f0163da3e15da88 | https://github.com/oceanbase/seekdb/issues/470 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
