# neurostack - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

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

## 它能做什么

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

## 怎么开始

- `npm install -g neurostack    # bootstraps CLI, Python, uv, deps` 证据：`CLAUDE.md` Claim：`clm_0003` supported 0.86
- `pip install neurostack[api]` 证据：`CLAUDE.md` Claim：`clm_0004` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

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

### 现在还不能相信

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

### 继续会触碰什么

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

### 最小安全下一步

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

### 退出方式

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

## 哪些只能预览

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

## 哪些必须安装后验证

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

## 边界与风险判断卡

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

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **🧠 neurostack - Build Your Personal Knowledge Vault**（project_doc）：🧠 neurostack - Build Your Personal Knowledge Vault 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`
- **NeuroStack**（project_doc）：Build, maintain, and search your knowledge vault with AI. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`npm/README.md`
- **NeuroStack - Claude Code Guide**（project_doc）：NeuroStack is a neuroscience-grounded knowledge management system. CLI + MCP server + OpenAI-compatible API. Everything runs locally against a Markdown vault indexed in SQLite + FTS5. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`
- **Vault — AI Agent Instructions**（project_doc）：This is your knowledge base. AI agents should consult it before relying on general knowledge for any system-specific topic. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/AGENTS.md`
- **Contributing to NeuroStack**（project_doc）：Thanks for your interest in contributing! 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`
- **Neuroscience Appendix**（project_doc）：NeuroStack's features are grounded in memory neuroscience. This appendix maps each feature to its scientific basis. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/neuroscience-appendix.md`
- **memory-management**（project_doc）：Create, update, merge, and manage persistent AI memories 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/neurostack/skills/memory-management.md`
- **vault-audit**（project_doc）：Audit vault health - stale notes, missing summaries, prediction errors 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/neurostack/skills/vault-audit.md`
- **vault-search**（project_doc）：Search the knowledge vault with the right retrieval strategy 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/neurostack/skills/vault-search.md`
- **NeuroStack Contributor License Agreement**（project_doc）：NeuroStack Contributor License Agreement 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLA.md`
- **Code of Conduct**（project_doc）：We pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CODE_OF_CONDUCT.md`
- **Data Processing Agreement**（project_doc）：Effective date: 25 March 2026 Last updated: 25 March 2026 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`DPA.md`
- **Privacy Policy**（project_doc）：Effective date: 25 March 2026 Last updated: 25 March 2026 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`PRIVACY.md`
- **Security Policy**（project_doc）：Version Supported --------- ----------- 0.1.x Yes 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`SECURITY.md`
- **session-lifecycle**（project_doc）：Manage NeuroStack memory sessions for grouping memories 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`src/neurostack/skills/session-lifecycle.md`
- **Archive**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/archive/index.md`
- **Calendar**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/calendar/index.md`
- **Projects**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/home/projects/index.md`
- **Resources**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/home/resources/index.md`
- **Inbox**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/inbox/index.md`
- **Literature**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/literature/index.md`
- **Meta**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/meta/index.md`
- **Bias and Fairness**（project_doc）：Bias in ML systems arises when model predictions systematically disadvantage specific groups. Fairness is not a single metric — it requires choosing which definition of fairness matches the deployment context. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/bias-and-fairness.md`
- **Data Versioning**（project_doc）：Data versioning tracks the exact state of datasets, features, and model artefacts used in each experiment, making results reproducible and regressions traceable. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/data-versioning.md`
- **Experiment Tracking Tools**（project_doc）：Experiment tracking systems log the inputs, parameters, metrics, and artefacts of every model training run, enabling comparison, reproducibility, and collaboration. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/experiment-tracking-tools.md`
- **Exploratory Data Analysis**（project_doc）：EDA is the disciplined process of understanding a dataset's structure, quality, and distributions before modelling. Skipping EDA is the single most common source of avoidable model failures. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/exploratory-data-analysis.md`
- **Feature Engineering Patterns**（project_doc）：Feature engineering is the process of transforming raw data into representations that improve model performance. The best features encode domain knowledge into a form the model can exploit. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/feature-engineering-patterns.md`
- **Research**（project_doc）：- exploratory-data-analysis — Structured EDA process for new datasets - feature-engineering-patterns — Reusable feature transformations by data type - model-evaluation-metrics — Choosing the right metric for the problem - data-versioning — Tracking datasets and artefacts across experiments - experiment-tracking-tools — Comparing MLflow, W&B, DVC, and alternatives - bias-and-fairness — Measuring and mitigating bias i… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/index.md`
- **Model Evaluation Metrics**（project_doc）：Choosing the right evaluation metric is a modelling decision, not a technical one. The metric encodes what you care about — optimising the wrong metric produces a model that succeeds on paper and fails in production. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/research/model-evaluation-metrics.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/templates/analysis-note.md`
- **{{dataset}}**（project_doc）：- Provider : {{source}} - Access : - License : 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/templates/dataset-note.md`
- **{{model}}**（project_doc）：Parameter Value ----------- ------- Algorithm Learning rate Epochs / Iterations Regularisation Framework 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/templates/model-card.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/data-scientist/templates/pipeline-note.md`
- **API Design Principles**（project_doc）：A well-designed API is easy to use correctly and hard to use incorrectly Bloch, 2006 . These principles apply to REST APIs, library interfaces, CLI tools, and internal module boundaries. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/api-design-principles.md`
- **Code Review Best Practices**（project_doc）：Code review is one of the most effective defect-prevention techniques available, catching 60-90% of defects when done well Fagan, 1976; McConnell, 2004 . Its value extends beyond bug-finding to knowledge sharing, mentorship, and codebase consistency. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/code-review-best-practices.md`
- **Research**（project_doc）：- twelve-factor-app — Methodology for building portable, resilient cloud-native services - technical-debt-management — Frameworks for identifying, quantifying, and paying down tech debt - code-review-best-practices — Evidence-based techniques for effective code review - testing-pyramid — Balancing test types for speed and confidence - api-design-principles — Designing APIs that are hard to misuse - refactoring-patte… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/index.md`
- **Refactoring Patterns**（project_doc）：Refactoring is the disciplined practice of restructuring existing code without changing its external behaviour Fowler, 1999 . The goal is to improve internal structure — readability, modularity, testability — while preserving correctness. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/refactoring-patterns.md`
- **Technical Debt Management**（project_doc）：Technical debt is the implied cost of future rework caused by choosing a quick solution now instead of a better approach that would take longer Cunningham, 1992 . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/technical-debt-management.md`
- **Twelve-Factor App**（project_doc）：The twelve-factor methodology Wiggins, 2012 codifies best practices for building software-as-a-service applications that are portable, scalable, and suitable for continuous deployment. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/research/twelve-factor-app.md`
- **{{title}}**（project_doc）：- Proposed - Accepted - Implemented - Superseded by 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/templates/architecture-decision.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/templates/code-review-note.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/templates/debugging-log.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/developer/templates/technical-spec.md`
- **Chaos Engineering**（project_doc）：Chaos engineering is the discipline of experimenting on a system to build confidence in its ability to withstand turbulent conditions in production. It is not random destruction — it is disciplined, hypothesis-driven failure injection. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/chaos-engineering.md`
- **GitOps Workflow**（project_doc）：GitOps is an operational framework where the entire system is described declaratively in git, and an automated agent ensures the live system matches the desired state in the repository. Git becomes the single source of truth for both application and infrastructure. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/gitops-workflow.md`
- **Incident Management Lifecycle**（project_doc）：Incident management is the structured process of detecting, responding to, and learning from service disruptions. The goal is to restore service quickly and prevent recurrence through systemic improvements, not blame. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/incident-management-lifecycle.md`
- **Research**（project_doc）：- sre-golden-signals — The four key metrics for monitoring any service - infrastructure-as-code-principles — Declarative, idempotent, version-controlled infrastructure - incident-management-lifecycle — From detection through blameless postmortem - gitops-workflow — Git as the single source of truth for deployments - observability-three-pillars — Logs, metrics, and traces as complementary signals - chaos-engineering… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/index.md`
- **Infrastructure as Code Principles**（project_doc）：Infrastructure as Code IaC is the practice of managing infrastructure through declarative definition files rather than manual processes, enabling version control, peer review, and reproducible environments. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/infrastructure-as-code-principles.md`
- **Observability: Three Pillars**（project_doc）：Observability is the ability to understand a system's internal state from its external outputs. The three pillars — metrics, logs, and traces — are complementary signals that together provide the data needed to debug any production issue. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/observability-three-pillars.md`
- **SRE Golden Signals**（project_doc）：The four golden signals from Google's SRE book are the minimum viable monitoring for any user-facing service. If you can only instrument four things, instrument these. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/research/sre-golden-signals.md`
- **{{title}}**（project_doc）：- Impact : - Likelihood of failure : - Blast radius : 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/templates/change-request.md`
- **{{title}}**（project_doc）：Time UTC Event ------------ ------- 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/templates/incident-report.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/templates/infrastructure-note.md`
- **{{title}}**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/devops/templates/runbook.md`
- **Citation Network Analysis**（project_doc）：Citation networks treat papers as nodes and citations as directed edges, revealing the intellectual structure of a field through computational analysis rather than manual reading. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`vault-template/professions/researcher/research/citation-network-analysis.md`

## 证据索引

- 共索引 79 条证据。

- **🧠 neurostack - Build Your Personal Knowledge Vault**（documentation）：🧠 neurostack - Build Your Personal Knowledge Vault 证据：`README.md`
- **NeuroStack**（documentation）：Build, maintain, and search your knowledge vault with AI. 证据：`npm/README.md`
- **Package**（package_manifest）：{ "name": "neurostack", "version": "0.10.1", "description": "Build, maintain, and search your knowledge vault with AI", "bin": { "neurostack": "bin/neurostack.js", "ns": "bin/neurostack.js" }, "scripts": { "postinstall": "node postinstall.js", "preuninstall": "node preuninstall.js" }, "keywords": "knowledge-management", "obsidian", "mcp", "ai", "rag", "sqlite", "fts5", "semantic-search", "knowledge-graph", "neuroscience", "cli" , "author": "Raphael Southall ", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/raphasouthall/neurostack.git" }, "mcpName": "io.github.raphasouthall/neurostack", "homepage": "https://neurostack.sh", "bugs": { "url": "https://github… 证据：`npm/package.json`
- **NeuroStack - Claude Code Guide**（documentation）：NeuroStack is a neuroscience-grounded knowledge management system. CLI + MCP server + OpenAI-compatible API. Everything runs locally against a Markdown vault indexed in SQLite + FTS5. 证据：`CLAUDE.md`
- **Vault — AI Agent Instructions**（documentation）：This is your knowledge base. AI agents should consult it before relying on general knowledge for any system-specific topic. 证据：`vault-template/AGENTS.md`
- **Contributing to NeuroStack**（documentation）：Thanks for your interest in contributing! 证据：`CONTRIBUTING.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`npm/LICENSE`
- **Neuroscience Appendix**（documentation）：NeuroStack's features are grounded in memory neuroscience. This appendix maps each feature to its scientific basis. 证据：`docs/neuroscience-appendix.md`
- **Memory Management**（documentation）：Merge duplicate memories Keeps the longer content, unions tags, picks the more specific entity type. 证据：`src/neurostack/skills/memory-management.md`
- **Vault Audit**（documentation）：Quick health check Shows note count, chunk count, memory count, embedding coverage. 证据：`src/neurostack/skills/vault-audit.md`
- **Vault Search Guide**（documentation）：NeuroStack has multiple retrieval tools. Pick the right one: 证据：`src/neurostack/skills/vault-search.md`
- **Init**（source_file）：version = "0.10.1" 证据：`src/neurostack/__init__.py`
- **Api**（source_file）：log = logging.getLogger "neurostack" MODELS = MODEL IDS = {m "id" for m in MODELS} class ChatMessage BaseModel ⋮---- role: str content: str class ChatCompletionRequest BaseModel ⋮---- model: str = "neurostack-ask" messages: list ChatMessage temperature: float = 0.3 max tokens: int None = None stream: bool = False top k: int = 8 workspace: str None = None class EmbeddingRequest BaseModel ⋮---- input: str list str model: str = "nomic-embed-text" encoding format: str = "float" def get api key - str def verify auth request: Request - None ⋮---- api key = get api key ⋮---- auth = request.headers.get "Authorization", "" ⋮---- token = auth len "Bearer " : ⋮---- def extract query messages: list Cha… 证据：`src/neurostack/api.py`
- **Build sources list**（source_file）：ASK PROMPT = """You are a knowledge assistant answering questions \ ⋮---- cfg = get config embed url = embed url or cfg.embed url llm url = llm url or cfg.llm url llm model = llm model or cfg.llm model results = hybrid search ⋮---- source blocks = seen notes = {} ⋮---- sources text = "\n\n---\n\n".join source blocks prompt = ASK PROMPT.format sources=sources text, question=question resp = httpx.post ⋮---- answer = resp.json "choices" 0 "message" "content" .strip answer = re.sub r"", "", answer, flags=re.DOTALL .strip Build sources list sources = 证据：`src/neurostack/ask.py`
- **Each note's community = the note index it's most attracted to**（source_file）：HAS NUMPY = True ⋮---- HAS NUMPY = False ⋮---- log = logging.getLogger "neurostack" ALPHA SEMANTIC = 0.6 BETA COOCCURRENCE = 0.25 GAMMA WIKILINKS = 0.15 BETA COARSE = 0.5 BETA FINE = 2.0 MAX ITERATIONS = 50 CONVERGENCE THRESHOLD = 1e-4 MIN SHARED = 2 ⋮---- n = len note paths path to idx = {p: i for i, p in enumerate note paths } norms = np.linalg.norm note embeddings, axis=1, keepdims=True + 1e-10 normalised = note embeddings / norms S semantic = normalised @ normalised.T ⋮---- S cooc = np.zeros n, n , dtype=np.float32 rows = conn.execute entity notes: dict str, set str = defaultdict set ⋮---- note weights: dict tuple int, int , int = defaultdict int ⋮---- note list = path to idx p for p in… 证据：`src/neurostack/attractor.py`
- **Split oversized chunks**（source_file）：@dataclass class Chunk ⋮---- heading path: str content: str position: int ⋮---- @dataclass class ParsedNote ⋮---- path: str title: str frontmatter: dict = field default factory=dict content hash: str = "" chunks: list Chunk = field default factory=list wiki links: list str = field default factory=list FRONTMATTER RE = re.compile r"^---\s \n . ? \n---\s \n", re.DOTALL ⋮---- Split oversized chunks 证据：`src/neurostack/chunker.py`
- **Config**（source_file）：@dataclass class CloudConfig ⋮---- cloud api url: str = "" cloud api key: str = "" def read toml - dict ⋮---- """Read existing config.toml or return empty dict.""" ⋮---- def write toml data: dict - None def save cloud config cloud api url: str, cloud api key: str - None ⋮---- data = read toml cloud = data.get "cloud", {} ⋮---- def clear cloud credentials - None def load cloud config - CloudConfig ⋮---- cfg = CloudConfig ⋮---- cloud data = data.get "cloud", {} ⋮---- env map = { ⋮---- val = os.environ.get env key 证据：`src/neurostack/cloud/config.py`
- **Manifest**（source_file）：@dataclass class SyncDiff ⋮---- added: list str = field default factory=list changed: list str = field default factory=list removed: list str = field default factory=list ⋮---- @property def has changes self - bool ⋮---- @property def upload files self - list str class Manifest ⋮---- def init self, entries: dict str, str None = None - None ⋮---- @staticmethod def scan vault vault root: Path - Manifest ⋮---- entries: dict str, str = {} root = str vault root ⋮---- full path = os.path.join dirpath, fname rel path = os.path.relpath full path, root .replace os.sep, "/" sha = hashlib.sha256 ⋮---- @staticmethod def load path: Path - Manifest ⋮---- data = json.load f ⋮---- def save self, path: Path… 证据：`src/neurostack/cloud/manifest.py`
- **1-3: Scan and diff**（source_file）：logger = logging.getLogger name class SyncError Exception class VaultSyncEngine ⋮---- def headers self - dict str, str ⋮---- """Upload changed vault files and wait for indexing. Steps: 1. Scan vault - new manifest 2. Load saved manifest - old manifest 3. Compute diff 4. If no changes, return early 5. Upload changed files via multipart POST 6. Poll status until complete or failed 7. Save new manifest on success 8. Return job result dict """ 1-3: Scan and diff new manifest = Manifest.scan vault self. vault root old manifest = Manifest.load self. manifest path diff = Manifest.diff old manifest, new manifest ⋮---- upload files = diff.upload files ⋮---- 5-7: Upload and poll ⋮---- Build multipart… 证据：`src/neurostack/cloud/sync.py`
- **Module-level singleton**（source_file）：CONFIG PATH = Path.home / ".config" / "neurostack" / "config.toml" ⋮---- @dataclass class Config ⋮---- vault root: Path = field default factory=lambda: Path.home / "brain" db dir: Path = field default factory=lambda: Path.home / ".local" / "share" / "neurostack" embed url: str = "http://localhost:11435" embed model: str = "nomic-embed-text" embed dim: int = 768 llm url: str = "http://localhost:11434" llm model: str = "phi3.5" llm api key: str = "" embed api key: str = "" session dir: Path = field default factory=lambda: Path.home / ".claude" / "projects" api host: str = "127.0.0.1" api port: int = 8000 api key: str = "" cooccurrence boost weight: float = 0.1 ⋮---- @property def db path self… 证据：`src/neurostack/config.py`
- **Cooccurrence**（source_file）：log = logging.getLogger "neurostack" MAX COOCCURRENCE WEIGHT = 100.0 ⋮---- canonical: set tuple str, str = set ⋮---- now = datetime.now timezone.utc .isoformat updates: list tuple str, str, float, str = ⋮---- row = conn.execute ⋮---- new weight = min row "weight" 1.1, MAX COOCCURRENCE WEIGHT ⋮---- new weight = 1.0 ⋮---- def persist cooccurrence conn: sqlite3.Connection - int ⋮---- rows = conn.execute ⋮---- note entities: dict str, set str = defaultdict set ⋮---- pair weights: dict tuple str, str , float = defaultdict float ⋮---- entity list = sorted entities ⋮---- def upsert cooccurrence for note conn: sqlite3.Connection, note path: str - int ⋮---- """Incrementally update co-occurrence for… 证据：`src/neurostack/cooccurrence.py`
- **Embedder**（source_file）：HAS NUMPY = True ⋮---- HAS NUMPY = False ⋮---- cfg = get config DEFAULT EMBED URL = cfg.embed url EMBED MODEL = cfg.embed model EMBED DIM = cfg.embed dim EMBED HEADERS = auth headers cfg.embed api key ⋮---- payload = {"model": model, "input": text} ⋮---- resp = httpx.post ⋮---- data = resp.json ⋮---- all embeddings = ⋮---- batch = texts i : i + batch size payload = {"model": model, "input": batch} ⋮---- def embedding to blob vec: "np.ndarray" - bytes def blob to embedding blob: bytes - "np.ndarray" ⋮---- header = f"Note: {title}" ⋮---- fm = json.loads frontmatter json if frontmatter json else {} ⋮---- tags = fm.get "tags" or fm.get "tag" ⋮---- parts = header ⋮---- def cosine similarity a: "… 证据：`src/neurostack/embedder.py`
- **Related**（source_file）：HAS NUMPY = True ⋮---- HAS NUMPY = False log = logging.getLogger "neurostack" ⋮---- conn = get db DB PATH workspace = normalize workspace workspace source rows = conn.execute ⋮---- source embeddings = blob to embedding r "embedding" for r in source rows source mean = np.mean np.stack source embeddings , axis=0 ⋮---- all rows = conn.execute ⋮---- note embeddings: dict str, list np.ndarray = {} ⋮---- np = r "note path" ⋮---- scored: list tuple str, float = ⋮---- note mean = np.mean np.stack embs , axis=0 sim = cosine similarity source mean, note mean ⋮---- top = scored :top k results = ⋮---- note row = conn.execute title = note row "title" if note row else np summary row = conn.execute summar… 证据：`src/neurostack/related.py`
- **Schema**（source_file）：log = logging.getLogger "neurostack" cfg = get config DB DIR = cfg.db dir DB PATH = cfg.db path SCHEMA VERSION = 12 SCHEMA SQL = """ MIGRATION V2 = """ MIGRATION V3 = """ MIGRATION V4 = """ MIGRATION V5 = """ MIGRATION V6 = """ MIGRATION V7 = """ MIGRATION V8 = """ MIGRATION V9 = """ MIGRATION V10 = """ MIGRATION V11 = """ MIGRATION V12 = """ def run migrations conn: sqlite3.Connection ⋮---- row = conn.execute "SELECT MAX version as v FROM schema version" .fetchone current = row "v" if row else 0 ⋮---- cols = { ⋮---- rows = conn.execute ⋮---- fm = json.loads r "frontmatter" ⋮---- fm = {} status = fm.get "status", "active" tags = json.dumps fm.get "tags", note type = fm.get "type", "permanen… 证据：`src/neurostack/schema.py`
- **Init**（source_file）：registered = False def ensure registered - ToolRegistry ⋮---- registered = True ⋮---- all = 证据：`src/neurostack/tools/__init__.py`
- **Insight Tools**（source_file）：def cfg ⋮---- cfg = get config ⋮---- @registry.tool tags= "context", "retrieval" def session brief workspace: str = None - dict ⋮---- raw = generate brief vault root=vault root, workspace=workspace ⋮---- conn = get db DB PATH 证据：`src/neurostack/tools/insight_tools.py`
- **Mcp Adapter**（source_file）：log = logging.getLogger "neurostack.tools.mcp adapter" def create mcp server name: str = "neurostack", fastmcp kwargs - FastMCP ⋮---- mcp = FastMCP name, fastmcp kwargs registry = ensure registered ⋮---- @functools.wraps tool def.fn def wrapper td=tool def, kwargs 证据：`src/neurostack/tools/mcp_adapter.py`
- **Memory Tools**（source_file）：def embed url ⋮---- conn = get db DB PATH memory = save memory result = { ⋮---- @registry.tool tags= "memory", "write" def vault forget memory id: int - dict ⋮---- deleted = forget memory conn, memory id ⋮---- memory = update memory ⋮---- changed = ⋮---- memory = merge memories ⋮---- memories = search memories output = ⋮---- entry = { ⋮---- vault root = get config .vault root 证据：`src/neurostack/tools/memory_tools.py`
- **Openai Adapter**（source_file）：log = logging.getLogger "neurostack.tools.openai adapter" TYPE MAP: dict type str, str = { def param to json schema param: ToolParam - dict str, Any ⋮---- ptype = param.type schema: dict str, Any = {} origin = getattr ptype, " origin ", None ⋮---- args = getattr ptype, " args ", ⋮---- item type = TYPE MAP.get args 0 , "string" ⋮---- def tool to openai function tool: ToolDef - dict str, Any ⋮---- properties: dict str, Any = {} required: list str = ⋮---- parameters: dict str, Any = { ⋮---- doc = inspect.getdoc tool.fn or tool.description ⋮---- doc = doc :1021 + "..." ⋮---- def get openai tools tag: str None = None - list dict str, Any ⋮---- registry = ensure registered ⋮---- arguments = json.… 证据：`src/neurostack/tools/openai_adapter.py`
- **First paragraph up to blank line**（source_file）：log = logging.getLogger "neurostack.tools" ⋮---- @dataclass frozen=True class ToolParam ⋮---- name: str type: type str default: Any = inspect.Parameter.empty description: str = "" ⋮---- @property def required self - bool ⋮---- @dataclass frozen=True class ToolDef ⋮---- """Complete definition of a registered tool.""" ⋮---- description: str fn: Callable ..., dict params: list ToolParam tags: tuple str, ... = def call self, kwargs: Any - dict ⋮---- """Invoke the tool function with the given kwargs.""" ⋮---- def extract params fn: Callable - list ToolParam ⋮---- """Extract parameter metadata from a function signature + type hints.""" sig = inspect.signature fn ⋮---- hints = get type hints fn ⋮-… 证据：`src/neurostack/tools/registry.py`
- **Rest Adapter**（source_file）：log = logging.getLogger "neurostack.tools.rest adapter" def create tools router prefix: str = "/v1/tools" - APIRouter ⋮---- router = APIRouter prefix=prefix, tags= "tools" registry = ensure registered ⋮---- @router.get "", summary="List all available tools" async def list tools - JSONResponse ⋮---- tools = ⋮---- properties: dict str, Any = {} required: list str = ⋮---- schema: dict str, Any = { ⋮---- async def invoke tool tool name: str, request: Request - JSONResponse ⋮---- tool = registry.get tool name ⋮---- body = await request.json ⋮---- body = {} ⋮---- result = tool.call body 证据：`src/neurostack/tools/rest_adapter.py`
- **Search Tools**（source_file）：log = logging.getLogger "neurostack.tools.search" def cfg ⋮---- cfg = get config ⋮---- def search memories for results query: str, workspace: str = None, limit: int = 3 - list dict ⋮---- conn = get db DB PATH memories = search memories ⋮---- result = tiered search ⋮---- memories = search memories for results query, workspace, limit=3 ⋮---- results = hybrid search output = ⋮---- entry = { ⋮---- result = {"results": output} ⋮---- @registry.tool tags= "search", "retrieval" def vault summary path or query: str - dict ⋮---- row = conn.execute ⋮---- results = hybrid search path or query, top k=1, embed url=embed url ⋮---- r = results 0 ⋮---- @registry.tool tags= "search", "graph" def vault graph… 证据：`src/neurostack/tools/search_tools.py`
- **NeuroStack Contributor License Agreement**（documentation）：NeuroStack Contributor License Agreement 证据：`CLA.md`
- **Code of Conduct**（documentation）：We pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 证据：`CODE_OF_CONDUCT.md`
- **Data Processing Agreement**（documentation）：Effective date: 25 March 2026 Last updated: 25 March 2026 证据：`DPA.md`
- **Privacy Policy**（documentation）：Effective date: 25 March 2026 Last updated: 25 March 2026 证据：`PRIVACY.md`
- **Security Policy**（documentation）：Version Supported --------- ----------- 0.1.x Yes 证据：`SECURITY.md`
- **Session Lifecycle**（documentation）：Sessions group memories created during a conversation for later review. 证据：`src/neurostack/skills/session-lifecycle.md`
- **Archive**（documentation）：Archive 证据：`vault-template/archive/index.md`
- **Calendar**（documentation）：Calendar 证据：`vault-template/calendar/index.md`
- **Projects**（documentation）：Projects 证据：`vault-template/home/projects/index.md`
- **Resources**（documentation）：Resources 证据：`vault-template/home/resources/index.md`
- **Inbox**（documentation）：Inbox 证据：`vault-template/inbox/index.md`
- **Literature**（documentation）：Literature 证据：`vault-template/literature/index.md`
- **Meta**（documentation）：Meta 证据：`vault-template/meta/index.md`
- **Bias and Fairness**（documentation）：Bias in ML systems arises when model predictions systematically disadvantage specific groups. Fairness is not a single metric — it requires choosing which definition of fairness matches the deployment context. 证据：`vault-template/professions/data-scientist/research/bias-and-fairness.md`
- **Data Versioning**（documentation）：Data versioning tracks the exact state of datasets, features, and model artefacts used in each experiment, making results reproducible and regressions traceable. 证据：`vault-template/professions/data-scientist/research/data-versioning.md`
- **Experiment Tracking Tools**（documentation）：Experiment tracking systems log the inputs, parameters, metrics, and artefacts of every model training run, enabling comparison, reproducibility, and collaboration. 证据：`vault-template/professions/data-scientist/research/experiment-tracking-tools.md`
- **Exploratory Data Analysis**（documentation）：EDA is the disciplined process of understanding a dataset's structure, quality, and distributions before modelling. Skipping EDA is the single most common source of avoidable model failures. 证据：`vault-template/professions/data-scientist/research/exploratory-data-analysis.md`
- **Feature Engineering Patterns**（documentation）：Feature engineering is the process of transforming raw data into representations that improve model performance. The best features encode domain knowledge into a form the model can exploit. 证据：`vault-template/professions/data-scientist/research/feature-engineering-patterns.md`
- **Research**（documentation）：- exploratory-data-analysis — Structured EDA process for new datasets - feature-engineering-patterns — Reusable feature transformations by data type - model-evaluation-metrics — Choosing the right metric for the problem - data-versioning — Tracking datasets and artefacts across experiments - experiment-tracking-tools — Comparing MLflow, W&B, DVC, and alternatives - bias-and-fairness — Measuring and mitigating bias in ML systems 证据：`vault-template/professions/data-scientist/research/index.md`
- **Model Evaluation Metrics**（documentation）：Choosing the right evaluation metric is a modelling decision, not a technical one. The metric encodes what you care about — optimising the wrong metric produces a model that succeeds on paper and fails in production. 证据：`vault-template/professions/data-scientist/research/model-evaluation-metrics.md`
- **{{title}}**（documentation）：--- date: {{date}} tags: analysis type: project status: active actionable: true compositional: true --- {{title}} Objective Data Source Methodology Key Findings 1. 2. 3. Visualisations Limitations Recommendations - Related Notes 证据：`vault-template/professions/data-scientist/templates/analysis-note.md`
- **{{dataset}}**（documentation）：- Provider : {{source}} - Access : - License : 证据：`vault-template/professions/data-scientist/templates/dataset-note.md`
- **{{model}}**（documentation）：Parameter Value ----------- ------- Algorithm Learning rate Epochs / Iterations Regularisation Framework 证据：`vault-template/professions/data-scientist/templates/model-card.md`
- **{{title}}**（documentation）：--- date: {{date}} tags: pipeline type: project status: active actionable: true compositional: false --- {{title}} Purpose Architecture transform - sink -- Inputs Transformations 1. 2. 3. Outputs Schedule & Triggers - Frequency : - Trigger : - SLA : Monitoring & Alerts Dependencies Related Notes 证据：`vault-template/professions/data-scientist/templates/pipeline-note.md`
- **API Design Principles**（documentation）：A well-designed API is easy to use correctly and hard to use incorrectly Bloch, 2006 . These principles apply to REST APIs, library interfaces, CLI tools, and internal module boundaries. 证据：`vault-template/professions/developer/research/api-design-principles.md`
- **Code Review Best Practices**（documentation）：Code review is one of the most effective defect-prevention techniques available, catching 60-90% of defects when done well Fagan, 1976; McConnell, 2004 . Its value extends beyond bug-finding to knowledge sharing, mentorship, and codebase consistency. 证据：`vault-template/professions/developer/research/code-review-best-practices.md`
- **Research**（documentation）：- twelve-factor-app — Methodology for building portable, resilient cloud-native services - technical-debt-management — Frameworks for identifying, quantifying, and paying down tech debt - code-review-best-practices — Evidence-based techniques for effective code review - testing-pyramid — Balancing test types for speed and confidence - api-design-principles — Designing APIs that are hard to misuse - refactoring-patterns — Safe, incremental strategies for improving existing code 证据：`vault-template/professions/developer/research/index.md`
- 其余 19 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

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

## 用户开工前应该回答的问题

- 你准备在哪个宿主 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。

- **Overview and System Architecture**：importance `high`
  - source_paths: README.md, src/neurostack/__init__.py, src/neurostack/__main__.py, src/neurostack/cli.py, src/neurostack/tools/__init__.py
- **Tool Registry and Retrieval Engine**：importance `high`
  - source_paths: src/neurostack/tools/registry.py, src/neurostack/tools/search_tools.py, src/neurostack/tools/memory_tools.py, src/neurostack/tools/session_tools.py, src/neurostack/tools/insight_tools.py
- **Data Layer, Schema and Knowledge Graph**：importance `high`
  - source_paths: src/neurostack/schema.py, src/neurostack/embedder.py, src/neurostack/chunker.py, src/neurostack/attractor.py, src/neurostack/cooccurrence.py
- **Deployment, Cloud Sync and Extensibility**：importance `medium`
  - source_paths: install.sh, pyproject.toml, npm/README.md, npm/package.json, npm/postinstall.js

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `bf2da77a165d5b0acc0a935a3953281085c26008`
- inspected_files: `README.md`, `pyproject.toml`, `docs/neuroscience-appendix.md`, `src/neurostack/__init__.py`, `src/neurostack/__main__.py`, `src/neurostack/api.py`, `src/neurostack/ask.py`, `src/neurostack/attractor.py`, `src/neurostack/brief.py`, `src/neurostack/bundle.py`, `src/neurostack/capture.py`, `src/neurostack/chunker.py`, `src/neurostack/cli.py`, `src/neurostack/cloud/__init__.py`, `src/neurostack/cloud/client.py`, `src/neurostack/cloud/config.py`, `src/neurostack/cloud/manifest.py`, `src/neurostack/cloud/sync.py`, `src/neurostack/community.py`, `src/neurostack/community_search.py`

宿主 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: 能力判断依赖假设

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

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

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

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

### Constraint 4: 存在评分风险

- Trigger: no_demo
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | https://github.com/Abhinav1234abhinav/neurostack | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: issue/PR 响应质量未知

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: 抽样最近 issue/PR，判断是否长期无人处理。
- Why it matters: 用户无法判断遇到问题后是否有人维护。
- Evidence: evidence.maintainer_signals | https://github.com/Abhinav1234abhinav/neurostack | issue_or_pr_quality=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 6: 发布节奏不明确

- Trigger: release_recency=unknown。
- Host AI rule: 确认最近 release/tag 和 README 安装命令是否一致。
- Why it matters: 安装命令和文档可能落后于代码，用户踩坑概率升高。
- Evidence: evidence.maintainer_signals | https://github.com/Abhinav1234abhinav/neurostack | release_recency=unknown
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
