# local-memory-mcp - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 local-memory-mcp 编译的 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_0002` supported 0.86

## 它能做什么

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

## 怎么开始

- `npm install -g @vheins/local-memory-mcp` 证据：`README.md` Claim：`clm_0003` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

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

### 现在还不能相信

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

### 继续会触碰什么

- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`GEMINI.md`
- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`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_0004` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0005` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

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

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **@vheins/local-memory-mcp**（project_doc）：! npm version https://img.shields.io/npm/v/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! npm downloads https://img.shields.io/npm/dm/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! npm total downloads https://img.shields.io/npm/dt/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! License: MIT https://img… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **Application Documentation**（project_doc）：This directory contains the complete documentation for the local-memory-mcp application — an MCP Model Context Protocol server with persistent memory, task orchestration, knowledge graph, and codebase intelligence. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/README.md`
- **API Documentation Catalog**（project_doc）：Index of all API specification documents across the application modules. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/api/README.md`
- **API Module: Codebase Index**（project_doc）：- Design — API Contracts ../../../design/codebase-index/api-contracts.md - Design — Domain Model ../../../design/codebase-index/domain.md - Design — Database Schema ../../../design/codebase-index/schema.md - Testing Module ../../testing/codebase-index/README.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/api/codebase-index/README.md`
- **Module Catalog**（project_doc）：Index of all application modules with links to their documentation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/modules/README.md`
- **Module: Codebase Index**（project_doc）：Purpose : Parse, index, and query source code structure using tree-sitter AST parsing, enabling agents to understand codebases without reading every file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/modules/codebase-index/README.md`
- **Testing Documentation Catalog**（project_doc）：Index of all testing documents across application modules. Tests follow the project's 4-layer concern model: Database → Service → State → Integration . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/testing/README.md`
- **Testing Module: Codebase Index**（project_doc）：- Design — API Contracts ../../../design/codebase-index/api-contracts.md - Design — Domain Model ../../../design/codebase-index/domain.md - API Module ../api/codebase-index/README.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/application/testing/codebase-index/README.md`
- **Git Repository Rules**（project_doc）：- MANDATORY: Every commit message MUST include the Title and Summary of the task being worked on derived from the active MCP task . - This ensures full traceability between code changes and the project task system. - Propose a draft commit message that is clear, concise, and focused on "why" rather than just "what", followed by the task metadata. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`GEMINI.md`
- **Contributing Guidelines**（project_doc）：Thank you for your interest in contributing to the MCP Local Memory Service! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Changelog**（project_doc）：All notable changes to this project will be documented in this file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`
- **Architecture Overview**（project_doc）：This document specifies the technical architecture and component interactions of the MCP Local Memory system. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/design/architecture/architecture.md`
- **Codebase Index — Architecture Design**（project_doc）：Codebase Index — Architecture Design 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/design/codebase-index/architecture.md`
- **Architecture Decision Record ADR-001**（project_doc）：Architecture Decision Record ADR-001 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/design/decisions/adr-001-use-sqlite.md`
- **ADR-002: Codebase Index Architecture**（project_doc）：ADR-002: Codebase Index Architecture 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`.agents/documents/design/decisions/adr-002-codebase-index.md`
- **Codebase Index API Reference**（project_doc）：Architecture decision context: See ADR-002: Codebase Index Architecture ../../.agents/documents/design/decisions/adr-002-codebase-index.md for design rationale, including the choice of web-tree-sitter WASM bindings, SQLite storage strategy, incremental indexing with SHA-256 checksums, and single-pass parsing for Phase 1.0. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/api/codebase-index.md`
- **Auto-Start Dashboard in IDE**（project_doc）：Guide for configuring your favorite IDE to automatically run the Memory Dashboard every time a project is opened. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/auto-start-dashboard.md`
- **Integration with Claude Code**（project_doc）：Complete guide for connecting MCP Local Memory Service to Claude Code https://code.claude.com — Anthropic's CLI AI agent. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/claude-code-integration.md`
- **Integration with Codex OpenAI**（project_doc）：Complete guide for connecting MCP Local Memory Service to Codex https://developers.openai.com/codex — OpenAI's AI coding agent. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/codex-integration.md`
- **Web Dashboard: Global Command Center + Repo Workspace**（project_doc）：Web Dashboard: Global Command Center + Repo Workspace 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/dashboard-guide.md`
- **Core Features & V2 Enhancements**（project_doc）：This project is more than just text storage; it is a "brain" system for AI agents designed for long-term stability and project consistency. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/features.md`
- **Getting Started & Setup**（project_doc）：This guide provides instructions for bringing the MCP Local Memory Service to life from two critical perspectives. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/getting-started.md`
- **Hybrid Search: How the System "Thinks"**（project_doc）：Hybrid Search: How the System "Thinks" 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/hybrid-search.md`
- **Integration with Kiro**（project_doc）：Complete guide for connecting MCP Local Memory Service to Kiro https://kiro.dev — AI-powered IDE. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/kiro-integration.md`
- **MCP Protocol Reference v2025-11-25**（project_doc）：This document details the technical interface exposed by the local-memory-mcp server for AI Agents, fully compliant with the Model Context Protocol MCP Specification v2025-11-25 https://modelcontextprotocol.io/specification/2025-11-25/server . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/mcp-concepts.md`
- **Tool Reference & Usage Guide**（project_doc）：A practical guide to the tools this MCP server exposes to AI agents. Each tool is grouped by domain with usage patterns and examples. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/tools-reference.md`
- **Troubleshooting Guide**（project_doc）：Common issues when installing or running the MCP Local Memory Service. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/en/troubleshooting.md`
- **Codebase Index**（project_doc）：The Codebase Index feature allows AI agents to search for functions, classes, interfaces, types, enums, and other structural entities within project source code. Instead of reading files sequentially to understand a codebase, agents can query a pre-built index that provides structured symbol information on demand. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/features/codebase-index.md`
- **Auto-Start Dashboard di IDE**（project_doc）：Panduan mengkonfigurasi IDE favorit kamu untuk menjalankan Memory Dashboard secara otomatis setiap kali project dibuka. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/auto-start-dashboard.md`
- **Integrasi dengan Claude Code**（project_doc）：Panduan lengkap menghubungkan MCP Local Memory Service ke Claude Code https://code.claude.com — CLI AI agent dari Anthropic. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/claude-code-integration.md`
- **Integrasi dengan Codex OpenAI**（project_doc）：Panduan lengkap menghubungkan MCP Local Memory Service ke Codex https://developers.openai.com/codex — AI coding agent dari OpenAI. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/codex-integration.md`
- **Dasbor Web: Pusat Komando Global + Ruang Kerja Repo**（project_doc）：Dasbor Web: Pusat Komando Global + Ruang Kerja Repo 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/dashboard-guide.md`
- **Fitur Inti & Peningkatan V2**（project_doc）：Proyek ini lebih dari sekadar penyimpanan teks; ini adalah sistem "otak" untuk agen AI yang dirancang untuk stabilitas jangka panjang dan konsistensi proyek. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/features.md`
- **Memulai & Pengaturan**（project_doc）：Panduan ini memberikan petunjuk untuk menghidupkan MCP Local Memory Service dari dua sudut pandang penting. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/getting-started.md`
- **Pencarian Hibrida: Bagaimana Sistem "Berpikir"**（project_doc）：Pencarian Hibrida: Bagaimana Sistem "Berpikir" 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/hybrid-search.md`
- **Integrasi dengan Kiro**（project_doc）：Panduan lengkap menghubungkan MCP Local Memory Service ke Kiro https://kiro.dev — AI-powered IDE. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/kiro-integration.md`
- **Referensi Protokol MCP v2025-11-25**（project_doc）：Dokumen ini merinci antarmuka teknis yang diekspos oleh server local-memory-mcp untuk Agen AI, sepenuhnya sesuai dengan Model Context Protocol MCP Specification v2025-11-25 https://modelcontextprotocol.io/specification/2025-11-25/server . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/mcp-concepts.md`
- **Referensi Alat & Panduan Penggunaan**（project_doc）：Referensi Alat & Panduan Penggunaan 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/tools-reference.md`
- **Panduan Pemecahan Masalah**（project_doc）：Masalah umum saat menginstal atau menjalankan MCP Local Memory Service. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/id/troubleshooting.md`
- **Codebase Index — Operations Guide**（project_doc）：Architecture decision context: See ADR-002: Codebase Index Architecture ../../.agents/documents/design/decisions/adr-002-codebase-index.md for design rationale. Feature overview: Codebase Index Feature Guide ../features/codebase-index.md API Reference: Codebase Index API ../api/codebase-index.md 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/operations/codebase-index.md`

## 证据索引

- 共索引 71 条证据。

- **@vheins/local-memory-mcp**（documentation）：! npm version https://img.shields.io/npm/v/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! npm downloads https://img.shields.io/npm/dm/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! npm total downloads https://img.shields.io/npm/dt/@vheins/local-memory-mcp.svg https://www.npmjs.com/package/@vheins/local-memory-mcp ! License: MIT https://img.shields.io/badge/License-MIT-yellow.svg https://opensource.org/licenses/MIT 证据：`README.md`
- **Application Documentation**（documentation）：This directory contains the complete documentation for the local-memory-mcp application — an MCP Model Context Protocol server with persistent memory, task orchestration, knowledge graph, and codebase intelligence. 证据：`.agents/documents/application/README.md`
- **API Documentation Catalog**（documentation）：Index of all API specification documents across the application modules. 证据：`.agents/documents/application/api/README.md`
- **API Module: Codebase Index**（documentation）：- Design — API Contracts ../../../design/codebase-index/api-contracts.md - Design — Domain Model ../../../design/codebase-index/domain.md - Design — Database Schema ../../../design/codebase-index/schema.md - Testing Module ../../testing/codebase-index/README.md 证据：`.agents/documents/application/api/codebase-index/README.md`
- **Module Catalog**（documentation）：Index of all application modules with links to their documentation. 证据：`.agents/documents/application/modules/README.md`
- **Module: Codebase Index**（documentation）：Purpose : Parse, index, and query source code structure using tree-sitter AST parsing, enabling agents to understand codebases without reading every file. 证据：`.agents/documents/application/modules/codebase-index/README.md`
- **Package**（package_manifest）：{ "name": "@vheins/local-memory-mcp", "version": "0.23.0", "description": "MCP Local Memory Service for coding copilot agents", "mcpName": "io.github.vheins/local-memory-mcp", "type": "module", "main": "dist/server.js", "bin": { "local-memory-mcp": "bin/mcp-memory-server.js", "mcp-memory-server": "bin/mcp-memory-server.js", "mcp-memory-dashboard": "bin/mcp-memory-dashboard.js" }, "files": "dist", "bin", "storage/.gitkeep", "dist/prompts/definitions", "dist/prompts/server" , "repository": { "type": "git", "url": "git+https://github.com/vheins/local-memory-mcp.git" }, "bugs": { "url": "https://github.com/vheins/local-memory-mcp/issues" }, "homepage": "https://github.com/vheins/local-memory-mc… 证据：`package.json`
- **Package**（package_manifest）：{ "dependencies": { "marked": "^18.0.2", "svelte": "^5.56.8" } } 证据：`src/dashboard/ui/package.json`
- **Testing Documentation Catalog**（documentation）：Index of all testing documents across application modules. Tests follow the project's 4-layer concern model: Database → Service → State → Integration . 证据：`.agents/documents/application/testing/README.md`
- **Testing Module: Codebase Index**（documentation）：- Design — API Contracts ../../../design/codebase-index/api-contracts.md - Design — Domain Model ../../../design/codebase-index/domain.md - API Module ../api/codebase-index/README.md 证据：`.agents/documents/application/testing/codebase-index/README.md`
- **Git Repository Rules**（documentation）：- MANDATORY: Every commit message MUST include the Title and Summary of the task being worked on derived from the active MCP task . - This ensures full traceability between code changes and the project task system. - Propose a draft commit message that is clear, concise, and focused on "why" rather than just "what", followed by the task metadata. 证据：`GEMINI.md`
- **Contributing Guidelines**（documentation）：Thank you for your interest in contributing to the MCP Local Memory Service! 证据：`CONTRIBUTING.md`
- **Changelog**（documentation）：All notable changes to this project will be documented in this file. 证据：`CHANGELOG.md`
- **Architecture Overview**（documentation）：This document specifies the technical architecture and component interactions of the MCP Local Memory system. 证据：`.agents/documents/design/architecture/architecture.md`
- **Codebase Index — Architecture Design**（documentation）：Codebase Index — Architecture Design 证据：`.agents/documents/design/codebase-index/architecture.md`
- **Architecture Decision Record ADR-001**（documentation）：Architecture Decision Record ADR-001 证据：`.agents/documents/design/decisions/adr-001-use-sqlite.md`
- **ADR-002: Codebase Index Architecture**（documentation）：ADR-002: Codebase Index Architecture 证据：`.agents/documents/design/decisions/adr-002-codebase-index.md`
- **Codebase Index API Reference**（documentation）：Architecture decision context: See ADR-002: Codebase Index Architecture ../../.agents/documents/design/decisions/adr-002-codebase-index.md for design rationale, including the choice of web-tree-sitter WASM bindings, SQLite storage strategy, incremental indexing with SHA-256 checksums, and single-pass parsing for Phase 1.0. 证据：`docs/api/codebase-index.md`
- **Auto-Start Dashboard in IDE**（documentation）：Guide for configuring your favorite IDE to automatically run the Memory Dashboard every time a project is opened. 证据：`docs/en/auto-start-dashboard.md`
- **Integration with Claude Code**（documentation）：Complete guide for connecting MCP Local Memory Service to Claude Code https://code.claude.com — Anthropic's CLI AI agent. 证据：`docs/en/claude-code-integration.md`
- **Integration with Codex OpenAI**（documentation）：Complete guide for connecting MCP Local Memory Service to Codex https://developers.openai.com/codex — OpenAI's AI coding agent. 证据：`docs/en/codex-integration.md`
- **Web Dashboard: Global Command Center + Repo Workspace**（documentation）：Web Dashboard: Global Command Center + Repo Workspace 证据：`docs/en/dashboard-guide.md`
- **Core Features & V2 Enhancements**（documentation）：This project is more than just text storage; it is a "brain" system for AI agents designed for long-term stability and project consistency. 证据：`docs/en/features.md`
- **Getting Started & Setup**（documentation）：This guide provides instructions for bringing the MCP Local Memory Service to life from two critical perspectives. 证据：`docs/en/getting-started.md`
- **Hybrid Search: How the System "Thinks"**（documentation）：Hybrid Search: How the System "Thinks" 证据：`docs/en/hybrid-search.md`
- **Integration with Kiro**（documentation）：Complete guide for connecting MCP Local Memory Service to Kiro https://kiro.dev — AI-powered IDE. 证据：`docs/en/kiro-integration.md`
- **MCP Protocol Reference v2025-11-25**（documentation）：This document details the technical interface exposed by the local-memory-mcp server for AI Agents, fully compliant with the Model Context Protocol MCP Specification v2025-11-25 https://modelcontextprotocol.io/specification/2025-11-25/server . 证据：`docs/en/mcp-concepts.md`
- **Tool Reference & Usage Guide**（documentation）：A practical guide to the tools this MCP server exposes to AI agents. Each tool is grouped by domain with usage patterns and examples. 证据：`docs/en/tools-reference.md`
- **Troubleshooting Guide**（documentation）：Common issues when installing or running the MCP Local Memory Service. 证据：`docs/en/troubleshooting.md`
- **Codebase Index**（documentation）：The Codebase Index feature allows AI agents to search for functions, classes, interfaces, types, enums, and other structural entities within project source code. Instead of reading files sequentially to understand a codebase, agents can query a pre-built index that provides structured symbol information on demand. 证据：`docs/features/codebase-index.md`
- **Auto-Start Dashboard di IDE**（documentation）：Panduan mengkonfigurasi IDE favorit kamu untuk menjalankan Memory Dashboard secara otomatis setiap kali project dibuka. 证据：`docs/id/auto-start-dashboard.md`
- **Integrasi dengan Claude Code**（documentation）：Panduan lengkap menghubungkan MCP Local Memory Service ke Claude Code https://code.claude.com — CLI AI agent dari Anthropic. 证据：`docs/id/claude-code-integration.md`
- **Integrasi dengan Codex OpenAI**（documentation）：Panduan lengkap menghubungkan MCP Local Memory Service ke Codex https://developers.openai.com/codex — AI coding agent dari OpenAI. 证据：`docs/id/codex-integration.md`
- **Dasbor Web: Pusat Komando Global + Ruang Kerja Repo**（documentation）：Dasbor Web: Pusat Komando Global + Ruang Kerja Repo 证据：`docs/id/dashboard-guide.md`
- **Fitur Inti & Peningkatan V2**（documentation）：Proyek ini lebih dari sekadar penyimpanan teks; ini adalah sistem "otak" untuk agen AI yang dirancang untuk stabilitas jangka panjang dan konsistensi proyek. 证据：`docs/id/features.md`
- **Memulai & Pengaturan**（documentation）：Panduan ini memberikan petunjuk untuk menghidupkan MCP Local Memory Service dari dua sudut pandang penting. 证据：`docs/id/getting-started.md`
- **Pencarian Hibrida: Bagaimana Sistem "Berpikir"**（documentation）：Pencarian Hibrida: Bagaimana Sistem "Berpikir" 证据：`docs/id/hybrid-search.md`
- **Integrasi dengan Kiro**（documentation）：Panduan lengkap menghubungkan MCP Local Memory Service ke Kiro https://kiro.dev — AI-powered IDE. 证据：`docs/id/kiro-integration.md`
- **Referensi Protokol MCP v2025-11-25**（documentation）：Dokumen ini merinci antarmuka teknis yang diekspos oleh server local-memory-mcp untuk Agen AI, sepenuhnya sesuai dengan Model Context Protocol MCP Specification v2025-11-25 https://modelcontextprotocol.io/specification/2025-11-25/server . 证据：`docs/id/mcp-concepts.md`
- **Referensi Alat & Panduan Penggunaan**（documentation）：Referensi Alat & Panduan Penggunaan 证据：`docs/id/tools-reference.md`
- **Panduan Pemecahan Masalah**（documentation）：Masalah umum saat menginstal atau menjalankan MCP Local Memory Service. 证据：`docs/id/troubleshooting.md`
- **Codebase Index — Operations Guide**（documentation）：Architecture decision context: See ADR-002: Codebase Index Architecture ../../.agents/documents/design/decisions/adr-002-codebase-index.md for design rationale. Feature overview: Codebase Index Feature Guide ../features/codebase-index.md API Reference: Codebase Index API ../api/codebase-index.md 证据：`docs/operations/codebase-index.md`
- **Systemcontroller**（source_file）：import express from "express"; import fs from "fs"; import path from "path"; import { fileURLToPath } from "url"; import { db, mcpClient, startTime } from "../lib/context"; import { jsonApiRes, jsonApiError, getAttributes } from "../lib/jsonApi"; import { condenseRecentActions } from "../lib/helpers"; import { parseRepoInput } from "../../mcp/utils/normalize"; import { TOOL DEFINITIONS } from "../../mcp/tools/tool-definitions"; import { listResources } from "../../mcp/resources/index"; import { PROMPTS } from "../../mcp/prompts/registry"; import type { RecentAction } from "../ui/src/lib/interfaces/common"; import { handleHandoffList, handleHandoffCreate, handleHandoffUpdate, handleTaskClaim… 证据：`src/dashboard/controllers/SystemController.ts`
- **Index**（source_file）：import { Router } from "express"; import systemRoutes from "./system.routes"; import memoryRoutes from "./memory.routes"; import taskRoutes from "./task.routes"; import standardRoutes from "./standard.routes"; import coordinationRoutes from "./coordination.routes"; import kgRoutes from "./kg.routes"; import codebaseRoutes from "./codebase.routes"; import unifiedGraphRoutes from "./unified-graph.routes"; 证据：`src/dashboard/routes/index.ts`
- **Usedetailstandard**（source_file）：import { get } from "svelte/store"; import { api } from "../api"; import { copyToClipboard } from "../utils"; import { confirmDelete, alertError } from "../confirm"; import type { CodingStandard } from "../stores"; import type { DetailState, DetailUpdate } from "./useDetailTypes"; import { INITIAL STANDARD FORM as INIT STD } from "./useDetailTypes"; ⋮---- function splitList value: string ⋮---- function parseMetadata value: string : Record null ⋮---- function stringifyMetadata value: Record ⋮---- export function createDetailStandard subscribe: run: s: DetailState = void = = void, update: DetailUpdate ⋮---- function setStandard standard: CodingStandard null ⋮---- function startStandardEdit ⋮-… 证据：`src/dashboard/ui/src/lib/composables/useDetailStandard.ts`
- **Usememory**（source_file）：import { writable, get } from "svelte/store"; import { api } from "../api"; import { currentRepo } from "../stores"; import { confirmDelete } from "../confirm"; import type { Memory } from "../stores"; ⋮---- export interface MemoryForm { title: string; type: string; content: string; importance: number; tags: string; agent: string; model: string; } ⋮---- export interface UseMemoryProps { onSaved: mem: Memory = void; onDeleted: id: string = void; onClose: = void; } ⋮---- export function createMemoryHandler props: UseMemoryProps ⋮---- function reset memory: Memory null ⋮---- function parseTags raw: string : string ⋮---- async function save ⋮---- async function deleteMemory 证据：`src/dashboard/ui/src/lib/composables/useMemory.ts`
- **Memory**（source_file）：export interface Memory { id: string; title: string; content: string; type: string; importance: number; scope: { repo: string }; tags?: string ; created at: string; updated at: string; ttl days?: number; hit count?: number; last accessed at?: string; is global?: boolean; status?: string; metadata?: Record ; agent?: string; model?: string; } 证据：`src/dashboard/ui/src/lib/interfaces/memory.ts`
- **Task**（source_file）：export interface TaskCoordination { active claim count: number; active claim agent: string null; active claim role: string null; active claim claimed at: string null; pending handoff count: number; pending handoff id: string null; pending handoff summary: string null; pending handoff to agent: string null; pending handoff created at: string null; } ⋮---- export interface Task { id: string; repo: string; task code: string; phase: string; title: string; description: string null; status: string; priority: number; agent?: string; role?: string; created at: string; updated at: string; finished at?: string null; in progress at?: string null; est tokens?: number; tags?: string ; metadata?: Record… 证据：`src/dashboard/ui/src/lib/interfaces/task.ts`
- **Generic Visitor**（source_file）：import type { Tree } from "web-tree-sitter"; import type { LanguageVisitor, ParsedSymbol } from "./language-visitor.js"; import { SymbolKind } from "./language-visitor.js"; ⋮---- export class GenericTextVisitor implements LanguageVisitor ⋮---- extractSymbols tree: Tree null, sourceCode: string : ParsedSymbol ⋮---- // ── Collect doc comments: /// or //! style ──────────── ⋮---- // ── Collect block comment opening ───────────────────── ⋮---- // Strip comment delimiters from content lines ⋮---- // ── Skip empty lines preserve comment paragraph breaks ── ⋮---- // ── Try to match declaration patterns ──────────────── ⋮---- // Not a declaration line — reset pending comments ⋮---- private matchDec… 证据：`src/mcp/codebase-index/parser/generic-visitor.ts`
- **Markdown Visitor**（source_file）：import type { Tree } from "web-tree-sitter"; import type { LanguageVisitor, ParsedSymbol } from "./language-visitor.js"; import { SymbolKind } from "./language-visitor.js"; ⋮---- export class MarkdownVisitor implements LanguageVisitor ⋮---- extractSymbols tree: Tree null, sourceCode: string : ParsedSymbol ⋮---- // Fenced code blocks: or ~~~lang ... ~~~ 证据：`src/mcp/codebase-index/parser/markdown-visitor.ts`
- **Parser Pool**（source_file）：import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; import { performance } from "node:perf hooks"; import { Parser, Language } from "web-tree-sitter"; import type { ParseResult, ParserPool, LanguageVisitor } from "./language-visitor.js"; import { TypeScriptVisitor } from "./typescript-visitor.js"; import { GoVisitor } from "./visitors/go-visitor.js"; import { PythonVisitor } from "./visitors/python-visitor.js"; import { PhpVisitor } from "./visitors/php-visitor.js"; import { DartVisitor } from "./visitors/dart-visitor.js"; import { RustVisitor } from "./visitors/rust-visitor.js"; import { JavaVisitor } from "./visitors/java-visitor.js"; import {… 证据：`src/mcp/codebase-index/parser/parser-pool.ts`
- **Typescript Visitor**（source_file）：import type { Node as TSNode, Tree as TSTree } from "web-tree-sitter"; import type { LanguageVisitor, ParsedSymbol } from "./language-visitor.js"; import { SymbolKind } from "./language-visitor.js"; ⋮---- function scanExports root: TSNode : ⋮---- function walk node: TSNode : void ⋮---- function getNameFromDeclaration node: TSNode : string null ⋮---- function getDeclaredNames node: TSNode : string ⋮---- function extractDocComment node: TSNode : string null ⋮---- function cleanDocComment raw: string : string ⋮---- function buildSignature node: TSNode : string ⋮---- export class TypeScriptVisitor implements LanguageVisitor ⋮---- extractSymbols tree: TSTree, sourceCode: string : ParsedSymbol ⋮-… 证据：`src/mcp/codebase-index/parser/typescript-visitor.ts`
- **File Discovery**（source_file）：import fs from "node:fs"; import path from "node:path"; import { performance } from "node:perf hooks"; import fg from "fast-glob"; import ignoreLib from "ignore"; import { logger } from "../../utils/logger.js"; import type { DiscoveredFile, DiscoverFilesResult, DiscoveryError, FileDiscoveryOptions } from "../types/index.js"; ⋮---- function detectLanguage filePath: string : string null ⋮---- function findGitignoreFiles root: string : string ⋮---- function transformGitignorePatterns content: string, scopePrefix: string : string ⋮---- if pattern === "" continue; // bare "!" — skip ⋮---- // git determines anchoring by presence of a non-trailing / // or a leading / which we strip before scoping… 证据：`src/mcp/codebase-index/services/file-discovery.ts`
- **Index**（source_file）：export interface DiscoveredFile { path: string; absolutePath: string; language: string; sizeBytes: number; } ⋮---- export interface FileDiscoveryOptions { projectPath: string; includeGlobs?: string ; excludeGlobs?: string ; respectGitignore?: boolean; maxFiles?: number; } ⋮---- export interface DiscoverFilesResult { files: DiscoveredFile ; totalFiles: number; supportedFiles: number; skippedFiles: number; skippedByExtension: number; skippedByGitignore: number; durationMs: number; errors: DiscoveryError ; } ⋮---- export interface DiscoveryError { path: string; error: string; } 证据：`src/mcp/codebase-index/types/index.ts`
- **Memory**（source_file）：import { BaseEntity } from "../storage/base"; import { MemoryEntry, MemoryRow, MemoryType } from "../types/index"; import { CountResult, TypeCountResult } from "../types/common"; ⋮---- export class MemoryEntity extends BaseEntity ⋮---- insert entry: MemoryEntry : void ⋮---- private mergeStructuredData metadata: Record , structuredData?: Record : Record ⋮---- update id: string, updates: Partial : void ⋮---- delete id: string : void ⋮---- getById id: string : MemoryEntry null ⋮---- getByCode code: string, owner?: string, repo?: string : MemoryEntry null ⋮---- getByIdWithStats id: string : MemoryEntry & ⋮---- getByIds ids: string , options: ⋮---- getStats owner?: string, repo?: string : ⋮----… 证据：`src/mcp/entities/memory.ts`
- **Standard**（source_file）：import { BaseEntity } from "../storage/base"; import { CodingStandardEntry, CodingStandardRow } from "../types/memory"; import { sanitizeFtsTerm } from "../utils/fts"; ⋮---- export class StandardEntity extends BaseEntity ⋮---- insert entry: CodingStandardEntry : void ⋮---- bulkInsertStandards entries: CodingStandardEntry : number ⋮---- getById id: string : CodingStandardEntry null ⋮---- getByCode code: string, owner?: string, repo?: string : CodingStandardEntry null ⋮---- search options: { query?: string; context?: string; version?: string; language?: string; stack?: string; tag?: string; owner?: string; repo?: string; is global?: boolean; limit?: number; offset?: number; } : CodingStandard… 证据：`src/mcp/entities/standard.ts`
- **Task**（source_file）：import { BaseEntity } from "../storage/base"; import { Task, TaskChild, TaskComment } from "../types"; ⋮---- function isSqliteError err: unknown : err is ⋮---- export class TaskEntity extends BaseEntity ⋮---- private coordinationSelect alias = "t" ⋮---- insertTask task: Task : void ⋮---- private handleDuplicateTaskCode err: unknown, taskCode: string, repo: string : void ⋮---- updateTask id: string, updates: Partial & ⋮---- deleteTask id: string : void ⋮---- getTaskById id: string : Task null ⋮---- getTasksByIds ids: string : Task ⋮---- getTaskByCode owner: string, repo: string, taskCode: string : Task null ⋮---- getTasksByRepo owner: string, repo: string, status?: string, limit?: number, of… 证据：`src/mcp/entities/task.ts`
- **Sdk Index**（source_file）：import { McpServer } from "@modelcontextprotocol/server"; import { SQLiteStore } from "../storage/sqlite"; import { VectorStore } from "../types"; import { SessionContext, inferRepoFromSession, inferOwnerFromSession } from "../session"; import { listPromptFiles, loadPromptFromMarkdown } from "./loader"; import type { LoadedPrompt } from "../interfaces/index"; import { logger } from "../utils/logger"; ⋮---- export function registerAllPrompts server: McpServer, store: SQLiteStore, vectors: VectorStore, session: SessionContext : void 证据：`src/mcp/prompts/sdk-index.ts`
- **Index**（source_file）：import { SQLiteStore } from "../storage/sqlite"; import { SessionContext } from "../session"; import { logger } from "../utils/logger"; import { rankCompletionValues } from "../utils/completion"; import { decodeCursor, encodeCursor } from "../utils/pagination"; import { parseRepoInput } from "../utils/normalize"; import type { MemoryEntry, Task, MemoryType } from "../types/index"; ⋮---- export function listResources session?: SessionContext, params?: ⋮---- export function listResourceTemplates params?: ⋮---- export function completeResourceArgument resourceUri: string, argumentName: string, argumentValue: string, contextArguments: Record , dataSources: { repos: string ; tags: string ; } ⋮--… 证据：`src/mcp/resources/index.ts`
- **Sdk Index**（source_file）：import { McpServer, ResourceTemplate } from "@modelcontextprotocol/server"; import { SQLiteStore } from "../storage/sqlite"; import { VectorStore } from "../types"; import { SessionContext } from "../session"; import { rankCompletionValues } from "../utils/completion"; import { parseRepoInput } from "../utils/normalize"; import type { Task, MemoryType } from "../types/index"; ⋮---- export function registerAllResources server: McpServer, store: SQLiteStore, vectors: VectorStore, session: SessionContext : void ⋮---- function getRepos : string ⋮---- function getTags : string ⋮---- function deriveLastModified values: Array : string ⋮---- function reposLazy : = string ⋮---- function tagsLazy : =… 证据：`src/mcp/resources/sdk-index.ts`
- 其余 11 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

- **项目概述与整体架构**：importance `high`
  - source_paths: README.md, package.json, CHANGELOG.md, .agents/documents/design/architecture/architecture.md, .agents/documents/design/decisions/adr-001-use-sqlite.md
- **MCP 服务器、记忆工具与知识图谱**：importance `high`
  - source_paths: src/mcp/router.ts, src/mcp/tools/index.ts, src/mcp/tools/definitions/memory.ts, src/mcp/tools/definitions/task.ts, src/mcp/tools/definitions/standard.ts
- **代码库索引系统与树解析检索**：importance `high`
  - source_paths: src/mcp/codebase-index/parser/parser-pool.ts, src/mcp/codebase-index/parser/index.ts, src/mcp/codebase-index/parser/typescript-visitor.ts, src/mcp/codebase-index/parser/markdown-visitor.ts, src/mcp/codebase-index/parser/generic-visitor.ts
- **Svelte 仪表板、SQLite 存储与性能优化**：importance `high`
  - source_paths: src/mcp/storage/base.ts, src/mcp/storage/sqlite.ts, src/mcp/storage/migrations.ts, src/mcp/storage/vectors.ts, src/mcp/storage/vectors.stub.ts

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `93995053c6851c0185d6e20cdeed390af92659c5`
- inspected_files: `README.md`, `package.json`, `docs/api/codebase-index.md`, `docs/en/auto-start-dashboard.md`, `docs/en/claude-code-integration.md`, `docs/en/codex-integration.md`, `docs/en/dashboard-guide.md`, `docs/en/features.md`, `docs/en/getting-started.md`, `docs/en/hybrid-search.md`, `docs/en/kiro-integration.md`, `docs/en/mcp-concepts.md`, `docs/en/tools-reference.md`, `docs/en/troubleshooting.md`, `docs/features/codebase-index.md`, `docs/id/auto-start-dashboard.md`, `docs/id/claude-code-integration.md`, `docs/id/codex-integration.md`, `docs/id/dashboard-guide.md`, `docs/id/features.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: feat: full-local natural language codebase search (codebase_search tool)

- Trigger: Developers should check this installation risk before relying on the project: feat: full-local natural language codebase search (codebase_search tool)
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat: full-local natural language codebase search (codebase_search tool). Context: Observed when using python
- Why it matters: Developers may fail before the first successful local run: feat: full-local natural language codebase search (codebase_search tool)
- Evidence: failure_mode_cluster:github_issue | https://github.com/vheins/local-memory-mcp/issues/45 | feat: full-local natural language codebase search (codebase_search tool)
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 失败模式：installation: feat: tambahkan monorepo workspace seperti turbo repo

- Trigger: Developers should check this installation risk before relying on the project: feat: tambahkan monorepo workspace seperti turbo repo
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat: tambahkan monorepo workspace seperti turbo repo. Context: Observed when using node
- Why it matters: Developers may fail before the first successful local run: feat: tambahkan monorepo workspace seperti turbo repo
- Evidence: failure_mode_cluster:github_issue | https://github.com/vheins/local-memory-mcp/issues/42 | feat: tambahkan monorepo workspace seperti turbo repo
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 失败模式：installation: perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste

- Trigger: Developers should check this installation risk before relying on the project: perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste. Context: Observed when using python
- Why it matters: Developers may fail before the first successful local run: perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste
- Evidence: failure_mode_cluster:github_issue | https://github.com/vheins/local-memory-mcp/issues/50 | perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 来源证据：feat: full-local natural language codebase search (codebase_search tool)

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: full-local natural language codebase search (codebase_search tool)
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | https://github.com/vheins/local-memory-mcp/issues/45 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：fix: nested .gitignore not respected during file discovery

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：fix: nested .gitignore not respected during file discovery
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/vheins/local-memory-mcp/issues/57 | 来源类型 github_issue 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 来源证据：perf: synchronous lstatSync + low concurrency bottlenecks in indexing pipeline

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：perf: synchronous lstatSync + low concurrency bottlenecks in indexing pipeline
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | https://github.com/vheins/local-memory-mcp/issues/51 | 来源讨论提到 node 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 7: 来源证据：perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：perf: tree-sitter grammar WASMs eager-loaded at startup — 30MB+ waste
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | https://github.com/vheins/local-memory-mcp/issues/50 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

### Constraint 9: 失败模式：configuration: feat: unified neural network graph for memory, codebase, and task visualization

- Trigger: Developers should check this configuration risk before relying on the project: feat: unified neural network graph for memory, codebase, and task visualization
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat: unified neural network graph for memory, codebase, and task visualization. Context: Observed when using node
- Why it matters: Developers may misconfigure credentials, environment, or host setup: feat: unified neural network graph for memory, codebase, and task visualization
- Evidence: failure_mode_cluster:github_issue | https://github.com/vheins/local-memory-mcp/issues/58 | feat: unified neural network graph for memory, codebase, and task visualization
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 10: 失败模式：configuration: perf: missing composite indexes on (owner, repo) — full table scans on frequent queries

- Trigger: Developers should check this configuration risk before relying on the project: perf: missing composite indexes on (owner, repo) — full table scans on frequent queries
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: perf: missing composite indexes on (owner, repo) — full table scans on frequent queries. Context: Observed during version upgrade or migration.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: perf: missing composite indexes on (owner, repo) — full table scans on frequent queries
- Evidence: failure_mode_cluster:github_issue | https://github.com/vheins/local-memory-mcp/issues/49 | perf: missing composite indexes on (owner, repo) — full table scans on frequent queries
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
