# seamless - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

你正在读取 Doramagic 为 seamless 编译的 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_0003` supported 0.86
- **希望把专业流程带进宿主 AI 的用户**：仓库包含 Skill 文档。 证据：`internal/skills/assets/seam-onboard/SKILL.md`, `internal/skills/assets/seam-research/SKILL.md` Claim：`clm_0004` supported 0.86

## 它能做什么

- **AI Skill / Agent 指令资产库**（可做安装前预览）：项目包含可被宿主 AI 读取的 Skill 或 Agent 指令文件，可用于把专业流程带入 Claude、Codex、Cursor 等宿主。 证据：`internal/skills/assets/seam-onboard/SKILL.md`, `internal/skills/assets/seam-research/SKILL.md` Claim：`clm_0001` supported 0.86
- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0002` supported 0.86

## 怎么开始

- `curl -fsSL https://thereisnospoon.org/install | sh` 证据：`README.md` Claim：`clm_0005` supported 0.86

## 继续前判断卡

- **当前建议**：先做研究框架试用
- **为什么**：这个项目面向研究工作流，核心风险是资料可信度和输出质量；先用 Prompt Preview 验证研究框架，再在隔离环境试装。

### 30 秒判断

- **现在怎么做**：先做研究框架试用
- **最小安全下一步**：先用 Prompt Preview 验证研究框架；满意后再隔离试装
- **先别相信**：研究结论、引用和实验结果不能在安装前相信。
- **继续会触碰**：研究判断、命令执行、宿主 AI 配置

### 现在可以相信

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

### 现在还不能相信

- **研究结论、引用和实验结果不能在安装前相信。**（unverified）：研究 Skill 可以组织问题和路径，但不能替代真实资料检索、论文核验和实验复现。
- **是否适合你的具体研究领域不能直接相信。**（unverified）：Skill 覆盖很多研究主题，不代表对你的领域、资料要求和可信度标准足够。
- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。
- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。
- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`AGENTS.md`, `CLAUDE.md`, `internal/skills/assets/seam-onboard/SKILL.md`, `internal/skills/assets/seam-research/SKILL.md`
- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。
- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。
- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。

### 继续会触碰什么

- **研究判断**：问题拆解、资料路径、实验路径、结论结构和可信度判断。 原因：研究型 Skill 可能让输出看起来更专业，但不能替代真实证据核验。
- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`AGENTS.md`, `CLAUDE.md`, `internal/skills/assets/seam-onboard/SKILL.md`, `internal/skills/assets/seam-research/SKILL.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_0006` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0007` supported 0.86
- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。
- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。
- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。

## 开工前工作上下文

### 加载顺序

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

### 任务路由

- **AI Skill / Agent 指令资产库**：先基于 role_skill_index / evidence_index 帮用户挑选可用角色、Skill 或工作流。 边界：可做安装前 Prompt 体验。 证据：`internal/skills/assets/seam-onboard/SKILL.md`, `internal/skills/assets/seam-research/SKILL.md` Claim：`clm_0001` supported 0.86
- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0002` supported 0.86

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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

## 角色 / Skill 索引

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

- **seam-onboard**（skill）：Install Seamless awareness for the current agent client. Use only when the user explicitly asks to onboard Seamless or invokes this skill. Configure the client's hooks and MCP server if needed, ask whether guidance belongs globally or in this project, append a marker-wrapped block to AGENTS.md for Codex or CLAUDE.md for Claude Code, then self-remove. 激活提示：当用户任务与“seam-onboard”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/skills/assets/seam-onboard/SKILL.md`
- **seam-research**（skill）：Run a systematic engineering investigation as a shared Seamless research lab. Use for repeated experiments whose expected and actual results must be compared or outlive the session, including flaky races, firmware bring-up, configuration sweeps, and performance tuning. Do not use for ordinary debugging where one fix ends the investigation. 激活提示：当用户任务与“seam-research”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`internal/skills/assets/seam-research/SKILL.md`

## 证据索引

- 共索引 78 条证据。

- **AGENTS.md**（documentation）：Coding conventions for AI agents working in the Seamless repository. For the project overview, structure, and commands, see CLAUDE.md . 证据：`AGENTS.md`
- **CLAUDE.md**（documentation）：Quick-reference for AI assistants working in the Seamless repository. For coding conventions see AGENTS.md . 证据：`CLAUDE.md`
- **Seamless**（documentation）：Local-first memory and coordination substrate for AI coding agents. 证据：`README.md`
- **One instance per machine**（documentation）：The Quickstart /quickstart/ gets Seamless running in one command. This page is what that command did, and what to do when you want to steer it yourself. 证据：`docs-src/install.md`
- **The targets**（documentation）：The conventions live in AGENTS.md at the repo root, and that file is the source of truth. This page is the orientation: what to run, what the gate checks, and the handful of rules that are worth knowing before you write a line. 证据：`docs-src/internals/contributing.md`
- **Onboard Seamless**（skill_instruction）：Install concise Seamless awareness for the agent client running this skill. Do not edit an instruction file until the user chooses the target and sees what will be added. 证据：`internal/skills/assets/seam-onboard/SKILL.md`
- **Run a Seamless research lab**（skill_instruction）：Use Seamless's lab open , trial record , and trial query MCP tools to keep an immutable, structured lab notebook shared with every agent investigating the same problem. 证据：`internal/skills/assets/seam-research/SKILL.md`
- **Codex CLI contract fixtures**（documentation）：These fixtures pin the external Codex contracts used by Seamless's hook adapter, installer, doctor, and MCP registration logic. Each capture is versioned; never replace an older directory when Codex changes. 证据：`internal/hooks/testdata/codex/README.md`
- **Codex CLI 0.144.5 hook-contract fixtures**（documentation）：Codex CLI 0.144.5 hook-contract fixtures 证据：`internal/hooks/testdata/codex/v0.144.5/README.md`
- **License**（source_file）：Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 证据：`LICENSE`
- **Security**（documentation）：This document is the output of a full-codebase security audit of Seamless. It records the threat model, what the security architecture already does well, the findings that remain, and a checklist a team can act on. Line references are to the tree as audited; they drift as code moves, so treat them as starting points. 证据：`docs/SECURITY.md`
- **thereisnospoon.org -- landing page + docs site**（documentation）：thereisnospoon.org -- landing page + docs site 证据：`SITE.md`
- **No hooks means no ambient layer**（documentation）：The Claude desktop app hosts two different Seamless surfaces, and they are wired differently: 证据：`docs-src/claude-app.md`
- **Install the hooks and register MCP**（documentation）：Claude Code is the client Seamless is built around. Wiring it up is two independent halves - the MCP endpoint what an agent can call and the hooks what happens without an agent calling anything - and you want both. One command installs both. 证据：`docs-src/claude-code.md`
- **Install the hooks and register MCP**（documentation）：The Codex desktop app, CLI, and IDE extension share the same local configuration layers and MCP setup for a given Codex host. Seamless therefore treats them as one client profile named codex , not as three protocols. Wiring that host is the same two independent halves as Claude Code /claude-code/ - the MCP endpoint what an agent can call and the hooks what happens without an agent calling anything - and one command installs both when the Codex management CLI is available. 证据：`docs-src/codex-cli.md`
- **What it gives a fleet**（documentation）：Seamless gives the coding agents you run a shared, persistent brain : memory that survives the end of a conversation, tasks they can hand off to each other, and plans they can execute together. It stores all of it as markdown files in a directory you own, indexes it in one SQLite database, and serves it to agents over MCP from a single Go binary on your machine. 证据：`docs-src/index.md`
- **Install**（documentation）：This is the one happy path: install, start a session, and watch it open with a briefing. It is one command and a check - everything between them is automatic. Every fork in the road is a link, not a branch in these steps. 证据：`docs-src/quickstart.md`
- **Propose-only is the whole contract**（documentation）：Any store that agents write to accumulates cruft: two memories saying the same thing in different words, a runbook for a system that no longer exists, a plan abandoned three weeks ago with its steps still open. 证据：`docs-src/concepts/gardener.md`
- **One daemon, three surfaces**（documentation）：Seamless is one Go binary holding one SQLite database and one directory of markdown files, bound to loopback on your machine. Everything below follows from that. 证据：`docs-src/concepts/how-it-works.md`
- **Index**（documentation）：Seamless is built around a small number of load-bearing ideas, and everything else follows from them. Knowledge lives in markdown files that are the source of truth, with SQLite as a rebuildable index over them. Memory has a lifecycle: a memory is never silently rewritten - it is superseded, with provenance pointing back at what it replaced. And agents do not ask for context; context arrives ambiently, injected at session start and on matching prompts, before the agent has done anything at all. 证据：`docs-src/concepts/index.md`
- **The description is the product**（documentation）：A memory is a markdown file with frontmatter. That is not an implementation detail - it is the design. You can read it, grep it, edit it, and put it in git, and no part of the system needs your permission to be inspected. 证据：`docs-src/concepts/memory.md`
- **The precedence chain**（documentation）：A project is the scope everything else inherits. Get scope right and agents never think about it again; get it wrong and knowledge lands where nobody will find it. 证据：`docs-src/concepts/projects.md`
- **How it works**（documentation）：recall is the only search tool. There is no separate keyword search, no separate semantic search, no "advanced" variant. One entry point, because a surface with three search tools is a surface where agents pick the wrong one. 证据：`docs-src/concepts/recall.md`
- **Ambient vs. explicit sessions**（documentation）：A session is one agent's stretch of work. A briefing is what that agent gets handed at the start of it, before it has called a single tool. 证据：`docs-src/concepts/sessions.md`
- **The ready queue**（documentation）：Tasks are how agents hand work to each other. Plans are how a design survives the agent that wrote it. 证据：`docs-src/concepts/tasks-and-plans.md`
- **Fan-out over the ready queue**（documentation）：One agent with memory is a better agent. Several agents with shared memory and no coordination is a worse outcome than one - they duplicate work, contradict each other's writes, and discover the same dead end in parallel. 证据：`docs-src/guides/coordinate-agents.md`
- **What is precious, and what is not**（documentation）：Because durable knowledge is markdown files, backup and restore are boring - and that is the feature. This page is mostly about knowing which half of ~/.seamless is precious and which half regenerates. 证据：`docs-src/guides/data.md`
- **Index**（documentation）：Where the concepts /concepts/ pages explain how Seamless thinks, these pages are organized around jobs: each one starts from something you are trying to do and walks the shortest honest path through it, including the failure modes. 证据：`docs-src/guides/index.md`
- **The loop**（documentation）：Claude Code /claude-code/ and Codex /codex-cli/ get Seamless mostly for free: hooks /reference/hooks/ open a session, inject a briefing, and harvest findings without the agent deciding to. Any other client has no hooks. It has to run the loop itself. 证据：`docs-src/guides/integrate-your-agent.md`
- **Which hook captures what**（documentation）：Claude Code's plan mode produces exactly the artifact that usually evaporates: a considered design, written down, immediately before the work starts and gone immediately after it. Seamless captures it without you doing anything. 证据：`docs-src/guides/plan-mode.md`
- **The loop**（documentation）：Some problems are not solved by thinking harder; they are solved by trying twelve things and keeping track. Firmware that boots sometimes. A race that reproduces one time in thirty. A config that works on one machine. 证据：`docs-src/guides/research-trials.md`
- **Start here, always**（documentation）：Seamless has one property that makes troubleshooting unlike most software: hooks fail open . A stopped daemon, a wrong key, a seam binary that moved - none of these produce an error you or your agent will see. The handler returns 200 with empty context, seam hook reports to stderr and exits 0, and work proceeds as if Seamless were not installed. 证据：`docs-src/guides/troubleshooting.md`
- **The description is the retrieval surface**（documentation）：A memory that is never retrieved is worse than one that was never written: it cost budget, it cost a write, and it is now something the gardener has to reason about. Getting recalled is not luck. It is almost entirely a property of the description . 证据：`docs-src/guides/write-good-memories.md`
- **The layering**（documentation）：Seamless is one Go binary seamlessd plus a CLI seam . Inside it, the code is arranged so that the direction of every dependency is obvious from the package name. This page is the map: the layers, who owns what, and how a write and a read actually travel through them. 证据：`docs-src/internals/architecture.md`
- **Index**（documentation）：These pages are for people changing Seamless rather than running it. They document the things a contributor cannot recover from the code alone: why the packages layer the way they do, what the build gate is actually defending, and the invariants that look like implementation details until a refactor quietly breaks one. 证据：`docs-src/internals/index.md`
- **Supersession**（documentation）：These are the rules that reasonable code violates. Every one of them has a sensible-looking alternative that compiles, passes review, and is wrong; each is enforced somewhere specific, and the pointer here is where to look, not a substitute for reading it. 证据：`docs-src/internals/invariants.md`
- **Code surface embedded Claude Code sessions**（documentation）：This matrix records what Seamless has observed in the Claude desktop app, and what remains unverified. It is an evidence ledger, not a support claim: a row says "this was seen working on this build, on this platform, on this date", and its absence says exactly that. The app has two distinct surfaces - embedded code sessions /claude-code/ the-claude-apps-code-surface real Claude Code sharing ~/.claude and the chat surface /claude-app/ a hookless MCP client wired through claude desktop config.json - and evidence for one is never evidence for the other. 证据：`docs-src/reference/claude-app-compatibility.md`
- **Flags and positionals**（documentation）：seam is the headless CLI. It does no work itself: it loads the same configuration the daemon does, then talks to a running seamlessd - over MCP at /api/mcp for most commands, and over the console's JSON endpoints for the owner-only actions that do not exist as MCP tools force-releasing a task lock, approving a plan . Both paths authenticate with the static bearer key from Configuration /reference/configuration/ , so if the key is wrong or the daemon is down, every subcommand below fails at the connection. 证据：`docs-src/reference/cli-seam.md`
- **seamlessd serve { seamlessd serve}**（documentation）：seamlessd is both the server and the operator CLI. serve runs the daemon; every other subcommand is a one-shot that opens the same config and database directly, without going through a running server. That means most of them work whether or not the daemon is up - and that map-repo and family write state the running daemon reads. 证据：`docs-src/reference/cli-seamlessd.md`
- **Maintained matrix**（documentation）：This matrix records what Seamless has observed , what is pinned only by a released schema or source, and what remains unverified. It is an evidence ledger, not a claim that an older Codex release is a supported minimum. The current fixture version is the one named by currentCodexFixtureVersion in internal/hooks/adapter.go . 证据：`docs-src/reference/codex-compatibility.md`
- **Where the config comes from**（documentation）：Seamless reads a single YAML file. Every key also has a SEAMLESS environment override. 证据：`docs-src/reference/configuration.md`
- **What the console can change**（documentation）：The console is the owner's window onto a system whose actual clients are agents. It is html/template plus vanilla JS plus SSE, served by internal/console from the same binary as everything else - no node, no npm, no React, no build step. It is not how Seamless is driven; it is how you watch it. 证据：`docs-src/reference/console.md`
- **A–Z**（documentation）：Terms are listed alphabetically. The ones worth reading even if you think you know them are the four disambiguation entries at the end: each is a pair people routinely use interchangeably, and each pair means genuinely different things. 证据：`docs-src/reference/glossary.md`
- **Claude Code: six hooks**（documentation）：Seamless installs hooks for two clients. They are what makes sessions ambient: an agent gets a briefing, its prompts get matched against stored memories, and its findings get harvested - without the agent calling a single MCP tool. The profile depends on the client: Claude Code gets six hooks including plan-mode capture ; Codex codex-local-host-five-hooks gets five. seamlessd install-hooks --client selects the profile; run interactively with no --client it prompts for the client s , and a non-interactive run without the flag resolves detect : the clients present on this machine the claude / codex CLI or a ~/.claude / $CODEX HOME directory . When neither is found, an interactive run warns an… 证据：`docs-src/reference/hooks.md`
- **Index**（documentation）：This section is the contract: the complete enumeration of every surface Seamless exposes, with the parts that are generated straight from the code so they cannot drift from it. The MCP tool reference is rendered from the same catalog the server registers, and the configuration reference from the same defaults the daemon loads - adding a tool or a key makes stale docs a build error, not a doc bug. 证据：`docs-src/reference/index.md`
- **Client transports and key handling**（documentation）：Seamless serves its tool surface over streamable HTTP MCP at /api/mcp , guarded by a single static bearer key. 证据：`docs-src/reference/mcp/index.md`
- **The research lab**（documentation）：A lab is a shared workspace for a systematic investigation: a hypothesis, a series of trials, and what each one actually did. lab open binds a lab to the connection, so trial record inherits it the way memory inherits a session's project. trial query reads the trials back. 证据：`docs-src/reference/mcp/lab-gardener-usage.md`
- **A note is not a memory**（documentation）：This is the most common confusion in the whole system, so it is worth being blunt about it. 证据：`docs-src/reference/mcp/notes-projects-capture.md`
- **The shape of a session**（documentation）：These eight tools are the agent loop. In a repo mapped to a project, most of them need no project argument at all: session start binds the connection, and everything after it inherits that scope. 证据：`docs-src/reference/mcp/sessions-memory-recall.md`
- **How claiming works**（documentation）：Tasks are how agents hand work to each other. A task is ready when it has no unfinished blocker; tasks ready returns exactly those, so an agent asking "what can I do now?" never has to reason about the dependency graph itself. 证据：`docs-src/reference/mcp/tasks.md`
- **The tree**（documentation）：Seamless splits its state in two. Markdown files under the data directory are the source of truth for durable knowledge. SQLite is the record for high-churn state and a rebuildable index of the files. 证据：`docs-src/reference/storage.md`
- **Sigstore Trusted Root**（structured_config）：{ "mediaType": "application/vnd.dev.sigstore.trustedroot+json;version=0.1", "tlogs": { "baseUrl": "https://rekor.sigstore.dev", "hashAlgorithm": "SHA2 256", "publicKey": { "rawBytes": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2G2Y+2tabdTV5BcGiBIx0a9fAFwrkBbmLSGtks4L3qX6yYY0zufBnhC8Ur/iy55GhWP/9A/bY2LhC30M9+RYtw==", "keyDetails": "PKIX ECDSA P256 SHA 256", "validFor": { "start": "2021-01-12T11:53:27Z" } }, "logId": { "keyId": "wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0=" } }, { "baseUrl": "https://log2025-1.rekor.sigstore.dev", "hashAlgorithm": "SHA2 256", "publicKey": { "rawBytes": "MCowBQYDK2VwAyEAt8rlp1knGwjfbcXAYPYAkn0XiLz1x8O4t0YkEhie244=", "keyDetails": "PKIX ED25519", "validFor": { "start… 证据：`cmd/seamlessd/sigstore_trusted_root.json`
- **Search Index**（structured_config）：{"title":"What is Seamless?","section":"Getting started","url":"","headings": "What it gives a fleet","Design principles","Where to go next" ,"text":"Seamless gives the coding agents you run a shared, persistent brain: memory that survives the end of a conversation, tasks they can hand off to each other, and plans they can execute together. It stores all of it as markdown files in a directory you own, indexes it in one SQLite database, and serves it to agents over MCP from a single Go binary on your machine. Its clients are agents. You are the observer and editor - there is a console, but nothing in Seamless requires you to be in the loop for agents to use it. What it gives a fleet Memory w… 证据：`docs/docs/static/search-index.json`
- **Generated by cmd/docsgen make docs . Collapse it in PR diffs and keep it out**（source_file）：Generated by cmd/docsgen make docs . Collapse it in PR diffs and keep it out of language stats -- docs-src/ is the source, this tree is build output. docs/docs/ linguist-generated=true 证据：`.gitattributes`
- **!/bin/sh**（source_file）：!/bin/sh Pre-commit gate: make check-fast -- the fast half of make check . test-race is deliberately excluded: it is ~37s against ~3s for this subset, which is too much to charge every commit. CI runs the full make check on every push and pull request, and that remains the authority. SCOPE CAVEAT: git runs hooks against the WORKING TREE, not the index. Under partial staging this reports on the tree you are sitting in, not the commit you are making -- it can pass on a broken commit, or fail on a clean one because of a change you did not stage. That makes it a lint gate, not a correctness gate. The usual fix stash the unstaged half, check, restore is not safe here: other agents have this repo… 证据：`.githooks/pre-commit`
- **Binaries**（source_file）：Binaries /bin/ /dist/ Sigstore bundles for the installer scripts: written by the release workflow before goreleaser runs. Untracked, they would leave the tree dirty and goreleaser refuses to release from a dirty tree. /sigs/ /seamlessd /seam /docsgen .exe .dll .so .dylib 证据：`.gitignore`
- **.Golangci**（source_file）：run: timeout: 5m tests: true linters: enable: - forbidigo - rowserrcheck - sqlclosecheck - errorlint linters-settings: errcheck: check-blank: true exclude-functions: - database/sql.Tx .Rollback - bytes.Buffer .WriteTo - net/http.ResponseWriter .Write - github.com/yuin/goldmark/util.BufWriter .WriteString forbidigo: forbid: - p: ^ulid\.MustNew$ msg: "use ulid.New + error handling; ulid.MustNew panics on entropy failure AGENTS.md Common pitfalls ." - p: ^time\.Sleep$ msg: "no time.Sleep for synchronization; use channels/sync.WaitGroup/t.Eventually AGENTS.md Testing ." analyze-types: true errorlint: errorf: true errorf-multi: true asserts: true comparison: true issues: exclude-use-default: tru… 证据：`.golangci.yml`
- **.Goreleaser**（source_file）：version: 2 project name: seamless builds: - id: seamlessd main: ./cmd/seamlessd binary: seamlessd env: - CGO ENABLED=0 goos: darwin, linux, windows goarch: amd64, arm64 flags: -trimpath ldflags: - -s -w - -X main.version={{ .Version }} - -X main.commit={{ .ShortCommit }} - -X main.buildDate={{ .Date }} mod timestamp: "{{ .CommitTimestamp }}" - id: seam main: ./cmd/seam binary: seam env: - CGO ENABLED=0 goos: darwin, linux, windows goarch: amd64, arm64 flags: -trimpath ldflags: -s -w mod timestamp: "{{ .CommitTimestamp }}" archives: - formats: tar.gz format overrides: - goos: windows formats: zip name template: "{{ .ProjectName }} {{ .Version }} {{ .Os }} {{ .Arch }}" files: - LICENSE - READ… 证据：`.goreleaser.yaml`
- **Seamless Makefile. Go 1.25+, no CGO.**（source_file）：Seamless Makefile. Go 1.25+, no CGO. BINARY := seamlessd CLI := seam BIN DIR := bin PKG := ./... GO ?= go 证据：`Makefile`
- **Nav**（source_file）：sections: - title: Getting started slug: "" description: Install Seamless, wire it to Claude Code or Codex, and watch the first briefing land. pages: - index.md - quickstart.md - install.md - claude-code.md - claude-app.md - codex-cli.md - title: Concepts slug: concepts description: How the pieces fit - memory with a lifecycle, ambient sessions, recall, tasks, scope, and the gardener. pages: - index.md - how-it-works.md - memory.md - sessions.md - recall.md - tasks-and-plans.md - projects.md - gardener.md - title: Guides slug: guides description: Task-shaped walkthroughs - wiring up an agent, writing memories worth recalling, running a fleet, and fixing what broke. pages: - index.md - integ… 证据：`docs-src/nav.yaml`
- 其余 18 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`AGENTS.md`, `CLAUDE.md`, `README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`AGENTS.md`, `CLAUDE.md`, `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, Makefile, go.mod, cmd/seamlessd/main.go, cmd/seam/main.go
- **记忆、笔记、检索与归属**：importance `high`
  - source_paths: internal/files/files.go, internal/files/manager.go, internal/files/frontmatter.go, internal/store/memories.go, internal/store/notes.go
- **任务协调、计划、试验与 Gardener 策展**：importance `high`
  - source_paths: internal/store/tasks.go, internal/store/tasks_claim.go, internal/store/tasks_deps.go, internal/store/tasks_plans.go, internal/store/trials.go
- **Console、MCP、Hooks 与跨平台部署运维**：importance `high`
  - source_paths: internal/console/console.go, internal/console/sse.go, internal/console/memories.go, internal/console/notes.go, internal/console/tasks.go

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `d8d3ce9b5f80107796c6abd9cb4106cf880027dd`
- inspected_files: `README.md`, `docs/SECURITY.md`, `docs/docs/static/docs.js`, `docs/docs/static/search-index.json`, `docs/static/scenes-player.js`, `docs/static/scenes.js`, `docs/static/site.js`

宿主 AI 硬性规则：
- 没有 repo_clone_verified=true 时，不得声称已经读过源码。
- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。
- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。

## Doramagic Pitfall Constraints / 踩坑约束

这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。

### Constraint 1: 能力证据存在缺口

- Trigger: Sandbox install result is missing.
- Host AI rule: 优先补证或在页面明确标记为未验证。
- Why it matters: 缺口未补前，Doramagic 不能把该能力当作可靠推荐卖点。
- Evidence: evidence.evidence_gaps | https://github.com/0spoon/seamless | Sandbox install result is missing.
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 可能需要本地编译工具链

- Trigger: 安装入口或说明出现本地编译相关关键词：make run
- Host AI rule: 沙箱验证不同系统的安装失败模式。
- Why it matters: Windows/macOS 用户可能卡在编译依赖上。
- Evidence: identity.distribution | https://github.com/0spoon/seamless | make run
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 失败模式：installation: v0.3.1

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

### Constraint 4: 失败模式：installation: v0.3.2

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

### Constraint 5: 失败模式：installation: v0.3.3

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

### Constraint 6: 失败模式：installation: v0.3.4

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

### Constraint 7: 失败模式：installation: v0.3.5

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

### Constraint 8: 失败模式：installation: v0.3.7

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

### Constraint 9: 失败模式：installation: v0.3.8

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

### Constraint 10: 失败模式：installation: v0.3.9

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