# memex - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0004` supported 0.86
- **希望把专业流程带进宿主 AI 的用户**：仓库包含 Skill 文档。 证据：`internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md`, `internal/brain/community-report/SKILL.md`, `internal/brain/graph-rebuild/SKILL.md` 等 Claim：`clm_0005` supported 0.86

## 它能做什么

- **AI Skill / Agent 指令资产库**（可做安装前预览）：项目包含可被宿主 AI 读取的 Skill 或 Agent 指令文件，可用于把专业流程带入 Claude、Codex、Cursor 等宿主。 证据：`internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md`, `internal/brain/community-report/SKILL.md`, `internal/brain/graph-rebuild/SKILL.md` 等 Claim：`clm_0001` supported 0.86
- **多宿主安装与分发**（需要安装后验证）：项目包含插件或 marketplace 配置，说明它面向一个或多个 AI 宿主的安装和分发。 证据：`.claude-plugin/plugin.json` Claim：`clm_0002` supported 0.86
- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0003` supported 0.86

## 怎么开始

- `git clone https://github.com/nitekeeper/memex.git` 证据：`README.md` Claim：`clm_0006` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0004` supported 0.86
- **适合人群线索：希望把专业流程带进宿主 AI 的用户**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md`, `internal/brain/community-report/SKILL.md`, `internal/brain/graph-rebuild/SKILL.md` 等 Claim：`clm_0005` supported 0.86
- **能力存在：AI Skill / Agent 指令资产库**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md`, `internal/brain/community-report/SKILL.md`, `internal/brain/graph-rebuild/SKILL.md` 等 Claim：`clm_0001` supported 0.86
- **能力存在：多宿主安装与分发**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`.claude-plugin/plugin.json` Claim：`clm_0002` supported 0.86
- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0003` supported 0.86
- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0006` supported 0.86

### 现在还不能相信

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

### 继续会触碰什么

- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`.claude-plugin/plugin.json`, `CLAUDE.md`, `internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md` 等
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`.claude-plugin/plugin.json`, `README.md`
- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。

### 最小安全下一步

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

### 退出方式

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

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0007` inferred 0.45
- **宿主 AI 插件或 Skill 规则冲突**：新规则可能改变用户现有宿主 AI 的工作方式。 处理方式：安装前先检查插件 manifest 和 Skill 文件，必要时隔离测试。 证据：`.claude-plugin/plugin.json` Claim：`clm_0008` supported 0.86
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0009` 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。

### 任务路由

- **AI Skill / Agent 指令资产库**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`internal/brain/ask/SKILL.md`, `internal/brain/capture/SKILL.md`, `internal/brain/community-report/SKILL.md`, `internal/brain/graph-rebuild/SKILL.md` 等 Claim：`clm_0001` supported 0.86
- **多宿主安装与分发**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`.claude-plugin/plugin.json` Claim：`clm_0002` supported 0.86
- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0003` supported 0.86

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **memex:brain:ask**（skill）：Ask a natural-language question against the personal Brain. Routes through the Reference Librarian subagent which builds a query plan FTS5 + optional vector , Python executes against ~/.memex/index.db, fetches full rows from target stores, and returns ranked citation-ready hits. 激活提示：当用户任务与“memex:brain:ask”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/ask/SKILL.md`
- **memex:brain:capture**（skill）：Capture a free-form note or observation into the personal Brain ~/.memex/article.db.captures . Lighter than ingest — no source URL, no raw archive, but still routed through the Librarian subagent for classification and linking. 激活提示：当用户任务与“memex:brain:capture”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/capture/SKILL.md`
- **memex:brain:community-report**（skill）：Generate a bottom-up structured report title, summary, importance rating, findings for one detected community in the GraphRAG knowledge graph. Option-B Task-tool dispatch — the Community Reporter subagent summarizes member documents and rolled-up child-community reports under a character budget; Python persists the report + embedding to ~/.memex/index.db.community reports. One LLM call per community. 激活提示：当用户任务与“memex:brain:community-report”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/community-report/SKILL.md`
- **memex:brain:graph-rebuild**（skill）：Operator maintenance entry point for the GraphRAG knowledge layer — re build the lexical similarity graph over document text key-free, no embedding provider required , detect hierarchical communities, then generate the missing community reports. Run after a batch of ingests, or whenever the Index has drifted from the derived graph/community/report artifacts. 激活提示：当用户任务与“memex:brain:graph-rebuild”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/graph-rebuild/SKILL.md`
- **memex:brain:ingest**（skill）：Ingest an article or external source into the personal Brain ~/.memex/article.db . Routes through Archivist preserves raw , Librarian subagent classifies + assigns index id, relations , and Memex Core persists . Hash-based rerun safety — re-ingesting the same canonical content is a silent skip. 激活提示：当用户任务与“memex:brain:ingest”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/ingest/SKILL.md`
- **memex:brain:lint**（skill）：Run a Data Steward audit over your Brain. Detects orphans index entries without matching article/capture/synthesis rows , broken relations, and integrity drift. Read-only; reports findings; does not auto-fix. 激活提示：当用户任务与“memex:brain:lint”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/lint/SKILL.md`
- **memex:brain:synthesize**（skill）：Produce a cross-document synthesis on a topic. Two subagent dispatches — Synthesizer reads sources + topic and produces prose; Librarian classifies the resulting synthesis. Saved as a new synthesis document in ~/.memex/article.db.syntheses with synthesizes relations back to the source index ids. 激活提示：当用户任务与“memex:brain:synthesize”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/brain/synthesize/SKILL.md`
- **memex:codegraph:ingest**（skill）：Ingest a graphify code-navigation graph.json into the SEPARATE code graph.db store, keyed by repo identity owner/repo . Idempotent per-file fragment upsert that fixes graphify's non-idempotent edge merge. The extractor is external — run graphify update --no-cluster first; memex only stores + queries no tree-sitter/networkx imports, no LLM . 激活提示：当用户任务与“memex:codegraph:ingest”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/codegraph/ingest/SKILL.md`
- **memex:codegraph:query**（skill）：Query the code-navigation graph store code graph.db for kaizen/atelier recon — where is, callers, dependencies, neighbors, module map. Bounded returns locations + rows, NEVER file bodies; BFS capped by max nodes as a token-budget analog , deterministic ordering, scoped by repo identity. Pure deterministic SQL; no LLM. 激活提示：当用户任务与“memex:codegraph:query”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/codegraph/query/SKILL.md`
- **memex:core:create-store**（skill）：Create a new Memex-managed SQLite store from a directory of SQL migration files. Use when a consumer Atelier, Brain, custom needs a fresh project- or domain-scoped store. Memex creates the file with WAL pragmas, installs the universal migrations table, applies each .sql file in lexical order, and registers the store in the global registry. 激活提示：当用户任务与“memex:core:create-store”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/create-store/SKILL.md`
- **memex:core:delete**（skill）：Delete a row by integer id PK from a registered Memex store. Returns true if a row was deleted, false otherwise. Document deletes should also notify the Librarian deferred to Plan 2 . 激活提示：当用户任务与“memex:core:delete”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/delete/SKILL.md`
- **memex:core:get-agent**（skill）：Fetch an agent's full profile including markdown profile body by agent id. Used by the Librarian, Reference Librarian, and other Memex internal agents to read created by profiles for context-aware decision-making. 激活提示：当用户任务与“memex:core:get-agent”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/get-agent/SKILL.md`
- **memex:core:insert**（skill）：Insert a row into a table of a registered Memex store. Use for non-document tables lookup tables, configuration, agents, roles . For document rows that need to be indexed, use memex:index:write instead — that routes through the Librarian. 激活提示：当用户任务与“memex:core:insert”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/insert/SKILL.md`
- **memex:core:list-stores**（skill）：List every registered Memex store on this machine — name, absolute path, schema version, registration time. 激活提示：当用户任务与“memex:core:list-stores”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/list-stores/SKILL.md`
- **memex:core:migrate**（skill）：Apply additional SQL migration files to an existing Memex-managed store. Idempotent — already-applied migrations tracked in the store's migrations table are skipped. Use when a consumer's schema evolves and new .sql files need to be applied to an in-place store without recreating it. 激活提示：当用户任务与“memex:core:migrate”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/migrate/SKILL.md`
- **memex:core:query**（skill）：Run a SELECT query against any registered Memex store. Returns rows as a list of dicts. Use for read-only operations; for full-text or vector search, use memex:index:search instead. 激活提示：当用户任务与“memex:core:query”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/query/SKILL.md`
- **memex:core:register-agent**（skill）：Register a new agent in the global agents.db agents table. Every Memex write requires an agent id; this is how agents human or LLM, internal or consumer-provided come into existence. 激活提示：当用户任务与“memex:core:register-agent”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/register-agent/SKILL.md`
- **memex:core:register-role**（skill）：Register a new role in the global agents.db roles table. Roles are universal Memex-managed schema, multi-tenant rows . Consumers Atelier, future plugins call this on install to seed their own role taxonomies. 激活提示：当用户任务与“memex:core:register-role”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/register-role/SKILL.md`
- **memex:core:update**（skill）：Update a single row by integer id PK in a registered Memex store. Use for partial updates of non-document rows; document content updates should re-trigger indexing via memex:index:write. 激活提示：当用户任务与“memex:core:update”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/core/update/SKILL.md`
- **memex:dba:checkpoint**（skill）：Run a WAL checkpoint on a registered store. Mode defaults to PASSIVE. 激活提示：当用户任务与“memex:dba:checkpoint”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/dba/checkpoint/SKILL.md`
- **memex:dba:integrity-check**（skill）：Run PRAGMA integrity check on a registered store. Returns 'ok' if clean, otherwise a string describing issues. 激活提示：当用户任务与“memex:dba:integrity-check”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/dba/integrity-check/SKILL.md`
- **memex:dba:vacuum**（skill）：Run VACUUM on a registered store to reclaim space and defragment. Should be run during maintenance windows, not under live load. 激活提示：当用户任务与“memex:dba:vacuum”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/dba/vacuum/SKILL.md`
- **memex:embed:backfill**（skill）：Re-encode every documents row with embedding IS NULL using the currently-configured provider. Idempotent — non-NULL rows are untouched. Use after first configuring an embedding API key, or after ingesting documents while no provider was set. 激活提示：当用户任务与“memex:embed:backfill”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/embed/backfill/SKILL.md`
- **memex:embed:reembed**（skill）：Re-encode EVERY documents row NULL and non-NULL using the currently-configured provider. Use after a deliberate provider or model change — old embeddings are dimensionally or semantically incomparable with new ones. Destructive — overwrites existing embeddings. Has a confirmation gate. 激活提示：当用户任务与“memex:embed:reembed”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/embed/reembed/SKILL.md`
- **memex:index:archive**（skill）：Explicitly archive a raw payload to ~/.memex/raw/ via the Archivist. Normally invoked internally by memex:index:write — exposed for cases where archival is desired without indexing e.g., evidentiary capture of inputs that aren't documents . 激活提示：当用户任务与“memex:index:archive”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/index/archive/SKILL.md`
- **memex:index:search**（skill）：Federated search across every registered Memex store via the Reference Librarian. Lower-level primitive that memex:brain:ask builds on — use directly when a consumer Atelier, custom plugin needs raw query results without Brain-specific formatting. 激活提示：当用户任务与“memex:index:search”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/index/search/SKILL.md`
- **memex:index:write**（skill）：Direct write to the federated Index — the lower-level primitive that memex:brain:ingest and memex:brain:capture build on. Use when a consumer Atelier, custom plugin needs to add a document to its own store and have it indexed by the Librarian, without going through the Brain layer. Routes through Librarian subagent + Memex Core. 激活提示：当用户任务与“memex:index:write”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/index/write/SKILL.md`
- **memex:steward:audit-store**（skill）：Run an integrity audit scoped to a single registered store reverse orphans + schema drift . Lighter than full audit. 激活提示：当用户任务与“memex:steward:audit-store”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/steward/audit-store/SKILL.md`
- **memex:steward:audit**（skill）：Run a full integrity audit across the Memex Index and all registered stores. Detects orphans, broken relations, schema drift. Writes a structured audit report to ~/.memex/audits/. Read-only — never auto-fixes. 激活提示：当用户任务与“memex:steward:audit”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/steward/audit/SKILL.md`
- **memex:steward:dashboard**（skill）：Launch a local, read-only web dashboard summarizing everything stored in Memex — per-store row counts, the federated index documents by domain/store/author, relations, embedding coverage, ingestion timeline , knowledge communities, Brain captures, the code-navigation graph, and the agent registry — plus keyword document search, a click-to-read content overlay, and an interactive 3D knowledge-graph view Obsidian-styl… 激活提示：当用户任务与“memex:steward:dashboard”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/steward/dashboard/SKILL.md`
- **memex:steward:reconcile-orphan**（skill）：Authorized fix-up of a flagged orphan. Four actions — delete-index remove documents row , repair backfill row id when target exists , reindex re-run Librarian; deferred , note acknowledge . Raises OrphanNotFoundError when index id is unknown or, for repair, already linked. 激活提示：当用户任务与“memex:steward:reconcile-orphan”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/steward/reconcile-orphan/SKILL.md`
- **Step 0 — Preflight**（skill）：Use to invoke any Memex v2.0 operation. Routes user-facing intents ingest, ask, capture, lint, synthesize, dashboard and agent-facing CRUD primitives to the right internal procedure. The only Claude-Code-visible Memex skill — internal procedures 31 total are read on demand to stay under the 1% skill-description budget. 激活提示：当用户任务与“Step 0 — Preflight”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`skills/run/SKILL.md`

## 证据索引

- 共索引 77 条证据。

- **CLAUDE.md — entering Memex v2.0**（documentation）：You are operating inside the Memex product repo . Memex is Product 1 of Skill Atelier — a personal knowledge runtime and shared memory plane for the agent fleet. 证据：`CLAUDE.md`
- **Memex**（documentation）：A personal knowledge runtime and shared memory plane for the agent fleet. 证据：`README.md`
- **skills/**（documentation）：The skill files that make up the Memex product. Populated during the build phase. 证据：`skills/README.md`
- **memex:brain:ask**（skill_instruction）：The user wants to find or recall information across their Brain. Replaces v1's wiki/web/training waterfall — v2 trusts the federated Index first. 证据：`internal/brain/ask/SKILL.md`
- **memex:brain:capture**（skill_instruction）：The user wants to record a thought, observation, or short snippet that isn't sourced from elsewhere. No URL, no provenance — just a note that should be findable later. 证据：`internal/brain/capture/SKILL.md`
- **memex:brain:community-report**（skill_instruction）：After the graph has been built scripts.graph build.build graph and communities detected scripts.communities.detect communities , generate the per-community summaries that power global -mode ask. Reports are lazy / incremental: generate only the communities that have no report yet community reporter.stale community ids , bottom-up deepest level first so a parent community can roll up its children's summaries. 证据：`internal/brain/community-report/SKILL.md`
- **memex:brain:graph-rebuild**（skill_instruction）：The GraphRAG layer similarity graph - communities - community reports is a DERIVED set of index artifacts that summarize already-indexed documents. It is NOT kept live on every write that would put an LLM call on the write path . Instead it is rebuilt on demand by this maintenance entry point: 证据：`internal/brain/graph-rebuild/SKILL.md`
- **memex:brain:ingest**（skill_instruction）：The user has an article, blog post, paper, clipped page, or other external source they want preserved in their personal Brain. 证据：`internal/brain/ingest/SKILL.md`
- **memex:brain:lint**（skill_instruction）：Periodic maintenance. Recommended monthly or after bulk activity. 证据：`internal/brain/lint/SKILL.md`
- **memex:brain:synthesize**（skill_instruction）：The user has multiple sources on a topic typically the result of a prior memex:brain:ask and wants a unified, citing prose synthesis preserved as a document of its own. 证据：`internal/brain/synthesize/SKILL.md`
- **memex:codegraph:ingest**（skill_instruction）：A consumer kaizen pre-cycle recon, an atelier subagent has a code repo and wants a navigable graph of its symbols + relations stored in Memex for later bounded queries where is , callers , dependencies , neighbors , module map . 证据：`internal/codegraph/ingest/SKILL.md`
- **memex:codegraph:query**（skill_instruction）：A consumer kaizen pre-cycle recon, an atelier subagent wants to navigate an already-ingested code-navigation graph: find where a symbol is defined, who calls it, what it depends on, its local neighborhood, or a one-file map. See internal/codegraph/ingest/SKILL.md to populate the store first. 证据：`internal/codegraph/query/SKILL.md`
- **memex:core:create-store**（skill_instruction）：A consumer needs a new SQLite store provisioned. Typical callers: - A workspace agent setting up /.memex/store.db for project work. - An installer seeding a default store like ~/.memex/article.db . - A test fixture creating a disposable store. 证据：`internal/core/create-store/SKILL.md`
- **memex:core:delete**（skill_instruction）：Invocation scripts/stores.py:delete name, table, row id 证据：`internal/core/delete/SKILL.md`
- **memex:core:get-agent**（skill_instruction）：Invocation scripts/agents/ init .py:get agent db path, agent id 证据：`internal/core/get-agent/SKILL.md`
- **memex:core:insert**（skill_instruction）：Inputs - name , table , row dict of column → value 证据：`internal/core/insert/SKILL.md`
- **memex:core:list-stores**（skill_instruction）：Invocation scripts/registry.py:list stores 证据：`internal/core/list-stores/SKILL.md`
- **memex:core:migrate**（skill_instruction）：Inputs - name — registered store name - migrations dir — directory containing .sql files 证据：`internal/core/migrate/SKILL.md`
- **memex:core:query**（skill_instruction）：Inputs - name — registered store name - sql — SELECT statement - params — optional tuple of bind parameters 证据：`internal/core/query/SKILL.md`
- **memex:core:register-agent**（skill_instruction）：Inputs - agent id — TEXT PK e.g., librarian-1 , human-user - name — display name - role id — FK into roles.id - profile — markdown persona/system-prompt-fragment 证据：`internal/core/register-agent/SKILL.md`
- **memex:core:register-role**（skill_instruction）：Inputs - name — role name UNIQUE - description — short description 证据：`internal/core/register-role/SKILL.md`
- **memex:core:update**（skill_instruction）：Inputs - name , table , row id , updates dict 证据：`internal/core/update/SKILL.md`
- **memex:dba:checkpoint**（skill_instruction）：- store name — registered store - mode — PASSIVE FULL RESTART TRUNCATE default PASSIVE 证据：`internal/dba/checkpoint/SKILL.md`
- **memex:dba:integrity-check**（skill_instruction）：scripts/agents/dba.py:integrity check db path 证据：`internal/dba/integrity-check/SKILL.md`
- **memex:dba:vacuum**（skill_instruction）：scripts/agents/dba.py:vacuum db path 证据：`internal/dba/vacuum/SKILL.md`
- **memex:embed:backfill**（skill_instruction）：You ingested some documents before configuring an embedding provider so they have embedding=NULL in index.db.documents , then later set up OPENAI API KEY or switched to Voyage / local . This skill catches up — fills in the missing embeddings so vector retrieval works for those rows too. 证据：`internal/embed/backfill/SKILL.md`
- **memex:embed:reembed**（skill_instruction）：You changed MEMEX EMBEDDING PROVIDER e.g., switched from openai → voyage or the model env var e.g., MEMEX OPENAI MODEL from text-embedding-3-small → text-embedding-3-large . Existing embeddings from the old config are incompatible with the new one — different dimensions, different vector space, different cosine semantics. 证据：`internal/embed/reembed/SKILL.md`
- **memex:index:archive**（skill_instruction）：Rare. Most callers use memex:index:write instead, which archives + indexes in one call. Use this skill when you need to preserve a raw byte stream without producing an Index entry. 证据：`internal/index/archive/SKILL.md`
- **memex:index:search**（skill_instruction）：A consumer needs ranked, citation-ready hits from the federated Index without going through Brain. memex:brain:ask is a convenience wrapper around this skill that adds user-friendly reporting; use this skill when you want the raw ranked list. 证据：`internal/index/search/SKILL.md`
- **memex:index:write**（skill_instruction）：A consumer outside Brain needs to add a document to a store of its own e.g., Atelier adding a decision to its decisions table and wants the document indexed so that memex:index:search and memex:brain:ask can find it across stores. 证据：`internal/index/write/SKILL.md`
- **memex:steward:audit-store**（skill_instruction）：- store name — registered store to audit - table — table within the store to scan for reverse orphans 证据：`internal/steward/audit-store/SKILL.md`
- **memex:steward:audit**（skill_instruction）：- Scheduled maintenance weekly/monthly recommended . - After bulk operations large ingests, mass deletes . - Before a backup, to ensure clean snapshot. 证据：`internal/steward/audit/SKILL.md`
- **memex:steward:dashboard**（skill_instruction）：A read-only observability surface the Data Steward exposes: it opens every registered store plus the fixed-path code graph.db read-only , aggregates a cross-store summary, and serves a single self-contained HTML page over a loopback-only stdlib HTTP server. It writes to nothing, so it is not a Librarian write-path bypass spec §6 / M3 govern document writes ; this is pure read-side reporting . 证据：`internal/steward/dashboard/SKILL.md`
- **memex:steward:reconcile-orphan**（skill_instruction）：After reviewing an audit report and deciding how to resolve a specific finding, or after a consumer's bootstrap sweep detects orphan-class rows in its own store and needs to either delete the dangling Index row or backfill the link. 证据：`internal/steward/reconcile-orphan/SKILL.md`
- **Step 0 — Preflight**（skill_instruction）：Memex v2 is a personal knowledge runtime and shared memory plane for the agent fleet. This skill is the public entry point — it maps natural-language intent for users or agent-named operations for AI consumers to the right internal procedure under internal/ / /SKILL.md . 证据：`skills/run/SKILL.md`
- **Plugin**（structured_config）：{ "name": "memex", "version": "2.17.0", "description": "Memex v2.17.0 — personal knowledge runtime and shared memory plane for the agent fleet. The only Claude-Code-visible skill is memex:run, which routes natural-language intent to internal procedures. This keeps the plugin under Claude Code's 1% skill-description budget while exposing the full Memex surface to agents on demand.", "author": { "name": "nitekeeper" }, "homepage": "https://github.com/nitekeeper/memex", "repository": "https://github.com/nitekeeper/memex.git", "license": "MIT", "keywords": "claude-code", "memory", "knowledge-management", "second-brain", "agent-memory" } 证据：`.claude-plugin/plugin.json`
- **License**（source_file）：Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 证据：`LICENSE`
- **Memex Brain Plan 3**（documentation）：Brain is Memex's opinionated second-brain layer. It owns article.db and exposes five procedures for daily use. 证据：`docs/BRAIN.md`
- **Memex Core Plan 1**（documentation）：Memex Core is the CRUD substrate. It provisions and hosts SQLite stores defined by consumer-supplied SQL migration files. It owns the agents and roles tables shared across consumers and the store registry. 证据：`docs/CORE.md`
- **Memex Index + Internal Agents Plan 2**（documentation）：Memex Index + Internal Agents Plan 2 证据：`docs/INDEX.md`
- **Memex v2.0 Packaging**（documentation）：Plan 4 is the final wave of v2.0: packaging, install/upgrade, docs. This document describes how the v2.0.0 release artifact is built, what it contains, and how it is installed — framed by spec §8.0 the single-skill registration model . 证据：`docs/PACKAGING.md`
- **Changelog — Memex**（documentation）：All releases are logged here. Unreleased in-progress work is tracked in ROADMAP.md . 证据：`CHANGELOG.md`
- **TODO**（documentation）：Deferred work tracked here so it survives session boundaries. Cross out items as they land or get explicitly dropped. 证据：`TODO.md`
- **Memex — User Guide**（documentation）：A practical guide to using Memex day-to-day after it's installed. For install instructions and project background, see README.md README.md . 证据：`USER_GUIDE.md`
- **Community Reporter Prompt**（documentation）：You are tasked with writing a structured report that summarizes a community of related documents from a personal knowledge graph. 证据：`prompts/community_reporter.md`
- **Global Map Prompt GraphRAG global search — MAP step**（documentation）：Global Map Prompt GraphRAG global search — MAP step 证据：`prompts/global_map.md`
- **Global Reduce Prompt GraphRAG global search — REDUCE step**（documentation）：Global Reduce Prompt GraphRAG global search — REDUCE step 证据：`prompts/global_reduce.md`
- **Librarian Subagent Prompt**（documentation）：You are the Memex Librarian. Your profile is reproduced below — read it carefully; it is the authoritative description of your role and constraints. 证据：`prompts/librarian.md`
- **Reference Librarian Subagent Prompt**（documentation）：Reference Librarian Subagent Prompt 证据：`prompts/reference_librarian.md`
- **Synthesizer Prompt**（documentation）：You are tasked with producing a coherent synthesis across multiple documents on a given topic. 证据：`prompts/synthesizer.md`
- **.gitattributes**（source_file）：text=auto eol=lf .md text eol=lf .py text eol=lf .sql text eol=lf .json text eol=lf .toml text eol=lf .yml text eol=lf .yaml text eol=lf .sh text eol=lf .db binary .sqlite binary .png binary .ico binary .zip binary 证据：`.gitattributes`
- **Superpowers brainstorm visual-companion session artifacts local-only .**（source_file）：.ai/memex.db pycache / .pyc .pytest cache/ .worktrees/ .venv/ uv.lock 证据：`.gitignore`
- **Agents**（source_file）：CREATE TABLE IF NOT EXISTS roles id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT UNIQUE NOT NULL, description TEXT NOT NULL, created at TEXT NOT NULL DEFAULT datetime 'now' , updated at TEXT NOT NULL DEFAULT datetime 'now' ; CREATE TABLE IF NOT EXISTS agents id TEXT PRIMARY KEY, name TEXT NOT NULL, role id INTEGER NOT NULL REFERENCES roles id , profile TEXT NOT NULL, created at TEXT NOT NULL DEFAULT datetime 'now' , updated at TEXT NOT NULL DEFAULT datetime 'now' ; CREATE INDEX IF NOT EXISTS agents role idx ON agents role id ; 证据：`db/agents.sql`
- **Brain**（source_file）：CREATE TABLE IF NOT EXISTS articles id INTEGER PRIMARY KEY AUTOINCREMENT, index id TEXT NOT NULL UNIQUE, title TEXT NOT NULL, source url TEXT, source hash TEXT, body TEXT NOT NULL, raw path TEXT, created by TEXT NOT NULL, created at TEXT NOT NULL DEFAULT datetime 'now' , updated at TEXT NOT NULL DEFAULT datetime 'now' ; CREATE INDEX IF NOT EXISTS articles source hash idx ON articles source hash ; CREATE TABLE IF NOT EXISTS captures id INTEGER PRIMARY KEY AUTOINCREMENT, index id TEXT NOT NULL UNIQUE, title TEXT, body TEXT NOT NULL, created by TEXT NOT NULL, created at TEXT NOT NULL DEFAULT datetime 'now' ; CREATE TABLE IF NOT EXISTS syntheses id INTEGER PRIMARY KEY AUTOINCREMENT, index id TE… 证据：`db/brain.sql`
- **Code Graph**（source_file）：CREATE TABLE IF NOT EXISTS repos repo TEXT PRIMARY KEY, built at commit TEXT, needs update INTEGER NOT NULL DEFAULT 0, updated at TEXT NOT NULL, schema version INTEGER NOT NULL DEFAULT 1 ; CREATE TABLE IF NOT EXISTS nodes repo TEXT NOT NULL, id TEXT NOT NULL, label TEXT, file type TEXT, source file TEXT, source location TEXT, has docstring INTEGER, PRIMARY KEY repo, id , FOREIGN KEY repo REFERENCES repos repo ON DELETE CASCADE ; CREATE TABLE IF NOT EXISTS edges repo TEXT NOT NULL, source TEXT NOT NULL, target TEXT NOT NULL, relation TEXT NOT NULL, confidence TEXT, confidence score REAL, weight REAL, source file TEXT, source location TEXT, context TEXT, PRIMARY KEY repo, source, target, rela… 证据：`db/code_graph.sql`
- **Index**（source_file）：CREATE TABLE IF NOT EXISTS documents index id TEXT PRIMARY KEY, key TEXT, domain TEXT NOT NULL, store TEXT NOT NULL, table name TEXT NOT NULL, row id TEXT NOT NULL, searchable TEXT, metadata TEXT, embedding BLOB, created by TEXT NOT NULL, created at TEXT NOT NULL DEFAULT datetime 'now' ; CREATE INDEX IF NOT EXISTS documents domain idx ON documents domain ; CREATE INDEX IF NOT EXISTS documents store idx ON documents store ; CREATE UNIQUE INDEX IF NOT EXISTS documents key unique idx ON documents key ; CREATE TABLE IF NOT EXISTS relations from index id TEXT NOT NULL REFERENCES documents index id , to index id TEXT NOT NULL REFERENCES documents index id , rel type TEXT NOT NULL, confidence REAL… 证据：`db/index.sql`
- **Migrations Table**（source_file）：CREATE TABLE IF NOT EXISTS migrations id INTEGER PRIMARY KEY AUTOINCREMENT, filename TEXT NOT NULL UNIQUE, applied at TEXT NOT NULL DEFAULT datetime 'now' ; 证据：`db/migrations_table.sql`
- **----------------------------------------------------------------------------**（source_file）：project name = "memex" version = "2.17.0" description = "Memex Core: structured memory and shared knowledge runtime for AI agents." requires-python = " =3.10" 证据：`pyproject.toml`
- **Internal Agents Seed**（source_file）：LIBRARIAN PROFILE = """\ REFERENCE LIBRARIAN PROFILE = """\ ARCHIVIST PROFILE = """\ DBA PROFILE = """\ DATA STEWARD PROFILE = """\ INTERNAL AGENTS = ⋮---- SORTED = sorted INTERNAL AGENTS, key=lambda a: a "agent id" INTERNAL AGENTS HASH: str = hashlib.sha256 证据：`scripts/_internal_agents_seed.py`
- **── ingest ─────────────────────────────────────────────────────────────────**（source_file）：def canonical hash body: str - str ⋮---- text = body.replace "\r\n", "\n" .replace "\r", "\n" .strip ⋮---- def find existing by hash source hash: str - dict None ⋮---- rows = stores.query ⋮---- def slugify text: str - str ⋮---- text = text.lower .strip text = re.sub r" ^\w\s- ", "", text text = re.sub r" \s - +", "-", text ⋮---- def fetch source bodies index ids: list str - list dict ⋮---- sources = ⋮---- rows = stores.query "article", "SELECT FROM articles WHERE index id = ?", idx, ⋮---- ── ingest ───────────────────────────────────────────────────────────────── ⋮---- """Phase 1 of brain ingest: hash-check, archive, build Librarian prompt. Returns one of: {"status": "skipped", "reason": "s… 证据：`scripts/brain.py`
- 其余 17 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **Memex 概览与三层架构**：importance `high`
  - source_paths: README.md, USER_GUIDE.md, CLAUDE.md, docs/CORE.md, docs/INDEX.md
- **系统架构、数据库模式与数据流程**：importance `high`
  - source_paths: scripts/db.py, scripts/stores.py, scripts/registry.py, scripts/paths.py, db/agents.sql
- **五个内部代理与联邦索引**：importance `high`
  - source_paths: scripts/_internal_agents_seed.py, scripts/agents/librarian.py, scripts/agents/reference_librarian.py, scripts/agents/archivist.py, scripts/agents/dba.py
- **Memex Dashboard、3D 知识图谱与代码图**：importance `medium`
  - source_paths: scripts/dashboard.py, scripts/code_graph.py, scripts/graph_build.py, db/code_graph.sql, internal/steward/dashboard/SKILL.md

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `3dfba300f226d76d12ba79cf9819369acb06a23b`
- inspected_files: `README.md`, `pyproject.toml`, `docs/BRAIN.md`, `docs/CORE.md`, `docs/INDEX.md`, `docs/PACKAGING.md`

宿主 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: 失败模式：installation: v2.10.0

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

### Constraint 2: 失败模式：installation: v2.11.0

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

### Constraint 3: 失败模式：installation: v2.12.0

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

### Constraint 4: 失败模式：installation: v2.16.0

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

### Constraint 5: 可能修改宿主 AI 配置

- Trigger: 项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。
- Host AI rule: 列出会写入的配置文件、目录和卸载/回滚步骤。
- Why it matters: 安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。
- Evidence: capability.host_targets | https://github.com/nitekeeper/memex | host_targets=mcp_host, claude_code, claude
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 失败模式：configuration: v2.13.0

- Trigger: Developers should check this configuration risk before relying on the project: v2.13.0
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v2.13.0. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v2.13.0
- Evidence: failure_mode_cluster:github_release | https://github.com/nitekeeper/memex/releases/tag/v2.13.0 | v2.13.0
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

### Constraint 8: 失败模式：migration: v2.12.2

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

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

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

- Trigger: no_demo
- Evidence: downstream_validation.risk_items | https://github.com/nitekeeper/memex | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
