# cjs-basic-fixture - Doramagic AI Context Pack

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

## 充分原则

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

## 给宿主 AI 的使用方式

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

## Claim 消费规则

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

## 它最适合谁

- **希望把专业流程带进宿主 AI 的用户**：仓库包含 Skill 文档。 证据：`.claude/skills/bump-version/SKILL.md`, `.claude/skills/publish-pypi/SKILL.md` Claim：`clm_0003` supported 0.86

## 它能做什么

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

## 怎么开始

- `pip install weave` 证据：`README.md` Claim：`clm_0004` supported 0.86

## 继续前判断卡

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

### 30 秒判断

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

### 现在可以相信

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

### 现在还不能相信

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

### 继续会触碰什么

- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`
- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`.claude/skills/bump-version/SKILL.md`, `.claude/skills/publish-pypi/SKILL.md`, `AGENTS.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_0005` inferred 0.45
- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.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。

### 任务路由

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

### 上下文规模

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

### 证据不足时的处理

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

## Prompt Recipes

### 适配判断

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

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

### 安装前体验

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

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

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


## 角色 / Skill 索引

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

- **bump-version**（skill）：Bump the Weave Python SDK version for release. Use when preparing a new release. 激活提示：当用户任务与“bump-version”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`.claude/skills/bump-version/SKILL.md`
- **publish-pypi**（skill）：Build and publish the Weave Python SDK to PyPI. Use when releasing a new version. 激活提示：当用户任务与“publish-pypi”描述的流程高度相关时，先用它做安装前体验，再决定是否安装。 证据：`.claude/skills/publish-pypi/SKILL.md`

## 证据索引

- 共索引 79 条证据。

- **Agent instructions for weave repository**（documentation）：Agent instructions for weave repository 证据：`AGENTS.md`
- **Weave by Weights & Biases**（documentation）：! Open in Colab https://colab.research.google.com/assets/colab-badge.svg http://wandb.me/weave colab ! Stable Version https://img.shields.io/pypi/v/weave?color=green https://pypi.org/project/weave ! Download Stats https://img.shields.io/pypi/dm/weave https://pypistats.org/packages/weave ! Github Checks https://img.shields.io/github/check-runs/wandb/weave/master https://github.com/wandb/weave ! codecov https://codecov.io/gh/wandb/weave/graph/badge.svg?token=YOUR TOKEN https://codecov.io/gh/wandb/weave 证据：`README.md`
- **Rules**（documentation）：This directory contains rules for the Fixit linter. 证据：`rules/README.md`
- **Scripts**（documentation）：This directory contains scripts for the weave repo, including: 证据：`scripts/README.md`
- **trace server mock**（documentation）：Lightweight in-memory mock of the Weave trace server. Standalone Python project, sibling of the weave package — deliberately not part of the shipped SDK distribution . The published weave wheel does not include this code; consumers who don't need the mock don't pay for its dependencies. 证据：`trace_server_mock/README.md`
- **Weave benchmarks**（documentation）：This directory has self-contained benchmarks for testing Weave performance/overhead. 证据：`scripts/benchmarks/README.md`
- **Weave**（documentation）：Weave is a library for tracing and monitoring AI applications. 证据：`sdks/node/README.md`
- **Host-app integration tests pnpm run test:hostApps**（documentation）：Host-app integration tests pnpm run test:hostApps 证据：`sdks/node/src/__tests__/hostApps/README.md`
- **Claude**（documentation）： 证据：`tests/integrations/claude_agent_sdk/cassettes/CLAUDE.md`
- **Trace Server Tests**（documentation）：This test directory is intended to contain tests that are isolated from the Weave client itself. They directly test the trace server implementation without going through the client layer. 证据：`tests/trace_server/README.md`
- **Integrations**（documentation）：This directory contains various integrations for Weave. Weave provides automatic implicit patching for all supported integrations using an import hook mechanism, making integration seamless and effortless. There are 2 styles of libraries we are interested in patching: model vendors and orchestration frameworks. 证据：`weave/integrations/README.md`
- **Display Module**（documentation）：The display module provides a unified interface for console output with a pluggable viewer system. This allows users to configure their preferred display method rich, print, etc. without changing their code. 证据：`weave/trace/display/README.md`
- **Serialization Patterns Audit in Weave for Weave devs**（documentation）：Serialization Patterns Audit in Weave for Weave devs 证据：`weave/trace/serialization/README.md`
- **Trace Server**（documentation）：Example data flow for starting a call 证据：`weave/trace_server/README.md`
- **Contributing to weave**（documentation）：- Contributing to weave contributing-to-weave - Issues issues - PRs prs - Conventional Commits conventional-commits - Types types - Setting up your environment setting-up-your-environment - Working with the weave package working-with-the-weave-package - Linting linting - Building the weave package building-the-weave-package - Testing testing - Deprecating features deprecating-features 证据：`CONTRIBUTING.md`
- **Package**（package_manifest）：{ "name": "weave", "version": "0.14.0", "description": "AI development toolkit", "types": "dist/index.d.ts", "main": "dist/index.js", "type": "commonjs", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" }, "./instrument": { "types": "./dist/esm/instrument.d.mts", "import": "./dist/esm/instrument.mjs" } }, "scripts": { "build": "node scripts/build.mjs", "prepare": "npm run build", "test": "jest --silent", "test:coverage": "jest --coverage", "test:watch": "jest --watch", "test:legacy": "jest --selectProjects legacy", "test:modern": "jest --selectProjects modern", "test:hostApps": "jest --selectProjects hostApps --runInBand", "format"… 证据：`sdks/node/package.json`
- **Package**（package_manifest）：{ "name": "cjs-basic-fixture", "version": "0.0.0", "private": true, "type": "commonjs", "scripts": { "start": "node main.cjs" }, "description": "CJS smoke host app for the hostApps integration tests. The 'weave' tarball is installed at test time via npm install --no-save ." } 证据：`sdks/node/src/__tests__/hostApps/fixtures/cjs-basic/package.json`
- **Package**（package_manifest）：{ "name": "esm-basic-fixture", "version": "0.0.0", "private": true, "type": "module", "scripts": { "start": "node --import=weave/instrument main.mjs" }, "description": "ESM smoke host app for the hostApps integration tests. The 'weave' tarball is installed at test time via npm install --no-save ." } 证据：`sdks/node/src/__tests__/hostApps/fixtures/esm-basic/package.json`
- **Bump Python SDK Version**（skill_instruction）：This replicates the GitHub Actions bump-python-sdk-version workflow. 证据：`.claude/skills/bump-version/SKILL.md`
- **Publish to PyPI**（skill_instruction）：This replicates the GitHub Actions publish-pypi-release workflow. 证据：`.claude/skills/publish-pypi/SKILL.md`
- **License**（source_file）：Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 证据：`LICENSE`
- **Description**（documentation）：What does the PR do? Include a concise description of the PR contents. 证据：`.github/pull_request_template.md`
- **Weave Documentation**（documentation）：For docs, please see the public docs page https://docs.wandb.ai/weave . 证据：`DOCS.md`
- **Security Policy**（documentation）：Please report all vulnerabilities to security@wandb.com. 证据：`SECURITY.md`
- **BuiltinObjectClasses**（documentation）：Refresher on Objects and object storage 证据：`dev_docs/BuiltinObjectClasses.md`
- **Weave Reference Format Specification**（documentation）：Weave Reference Format Specification 证据：`dev_docs/REF_SPEC.md`
- **Weave Release Process**（documentation）：This document outlines how to publish a new Weave release to our public PyPI package https://pypi.org/project/weave/ . 证据：`dev_docs/RELEASE.md`
- **Contribution License Agreement**（documentation）：This Contribution License Agreement "Agreement" is agreed to by the party signing below "You" , and conveys certain license rights to Weights and Biases, Inc. "W&B" , for Your contributions to W&B open source projects. This Agreement is effective as of the latest signature date below "Effective Date" . 证据：`dev_docs/cla.md`
- **Working notes**（documentation）：pnpm install pnpm link --global pnpm link --global weave 证据：`sdks/node/README-DEV.md`
- **Tsconfig.Examples**（structured_config）：{ "extends": "../tsconfig.json", "exclude": , "compilerOptions": { "rootDir": ".", "outDir": "../dist/examples", "paths": { "weave": "../dist/src" } }, "references": { "path": "../src/tsconfig.src.json" } } 证据：`sdks/node/examples/tsconfig.examples.json`
- **Tsconfig**（structured_config）：{ "extends": "../tsconfig.json", "compilerOptions": { "experimentalDecorators": true, "rootDir": "../../../src", "outDir": "../../../dist/ tests /legacy", "tsBuildInfoFile": "../../../dist/ tests /legacy/.tsbuildinfo" }, "include": "../../../src/ / ", "../../../types/ / " } 证据：`sdks/node/src/__tests__/legacy/tsconfig.json`
- **Tsconfig**（structured_config）：{ "extends": "../tsconfig.json", "compilerOptions": { "target": "es2022", "experimentalDecorators": false, "rootDir": "../../../src", "outDir": "../../../dist/ tests /modern", "tsBuildInfoFile": "../../../dist/ tests /modern/.tsbuildinfo" }, "include": "../../../src/ / ", "../../../types/ / " } 证据：`sdks/node/src/__tests__/modern/tsconfig.json`
- **Tsconfig**（structured_config）：{ "compilerOptions": { "target": "es2018", "module": "commonjs", "moduleResolution": "node", "strict": true, "esModuleInterop": true, "types": "jest", "node" , "composite": true, "declaration": true, "sourceMap": true, "baseUrl": ".", "rootDir": "../", "paths": { "weave": "../index.ts" , "weave/ ": "../ " } }, "include": "../ / ", "../../types/ / " } 证据：`sdks/node/src/__tests__/tsconfig.json`
- **Tsconfig.Src**（structured_config）：{ "extends": "../tsconfig.json", "exclude": , "compilerOptions": { "rootDir": ".", "outDir": "../dist/src" } } 证据：`sdks/node/src/tsconfig.src.json`
- **Tsconfig.Cjs**（structured_config）：// CJS-target tsconfig used by scripts/build.mjs . Extends the project root // tsconfig and pins module: commonjs here so the format is self-evident // without having to chase the extends chain. Also excludes the ESM-only // src/esm/ files which use import.meta.url , a syntax error under // module: commonjs . { "extends": "./tsconfig.json", "compilerOptions": { "module": "commonjs" }, "exclude": "examples", "dist", "node modules", "src/integrations/checkOpenai.ts", "src/ tests / / ", "src/esm/ " } 证据：`sdks/node/tsconfig.cjs.json`
- **Tsconfig.Esm**（structured_config）：// ESM-target tsconfig used by scripts/build.mjs . Extends the project root // tsconfig and pins module: esnext here so the format is self-evident // without having to chase the extends chain. Also excludes the CJS-only // file: src/utils/commonJSLoader.ts exists to patch the require // chain for CJS hosts and has no role under ESM where the loader hook in // src/esm/instrument.mts plays the equivalent role . { "extends": "./tsconfig.json", "compilerOptions": { "module": "esnext" }, "exclude": "examples", "dist", "node modules", "src/integrations/checkOpenai.ts", "src/ tests / / ", "src/utils/commonJSLoader.ts" } 证据：`sdks/node/tsconfig.esm.json`
- **Tsconfig**（structured_config）：{ "compilerOptions": { "composite": true, // ES2022 matches our minimum supported runtime Node 18+ . "target": "es2022", "moduleResolution": "node", "sourceMap": true, "strict": true, "esModuleInterop": true, "outDir": "dist", "paths": { "weave": "./src/index.ts" }, "declaration": true, "declarationMap": true, "rootDir": "src", "tsBuildInfoFile": "dist/.tsbuildinfo", "allowJs": true, "resolveJsonModule": true }, "include": "src/ / ", "types/ / " , "exclude": "examples", "dist", "node modules", "src/integrations/checkOpenai.ts", "src/ tests / / " } 证据：`sdks/node/tsconfig.json`
- **Weave.Openapi**（structured_config）：{ "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "servers": {"url": "https://api.wandb.ai"} , "paths": { "/health": { "get": { "tags": "Service" , "summary": "Read Root", "operationId": "read root health get", "responses": { "200": { "description": "Successful Response", "content": {"application/json": {"schema": {}}} } } } }, "/server info": { "get": { "tags": "Service" , "summary": "Server Info", "operationId": "server info server info get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {"$ref": " /components/schemas/ServerInfoRes"} } } } } } }, "/call/start": { "post": { "tags": "Calls" , "summary": "Call… 证据：`sdks/node/weave.openapi.json`
- **Error Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-err999" }, { "type": "assistant", "message": { "content": { "type": "text", "text": "Something went wrong while processing." } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 800, "duration api ms": 600, "is error": true, "num turns": 1, "session id": "s-err999", "total cost usd": 0.001, "usage": { "input tokens": 20, "output tokens": 10 }, "result": "Error: something went wrong" } 证据：`tests/integrations/claude_agent_sdk/cassettes/error_response.json`
- **Multi Tool Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-multi789" }, { "type": "assistant", "message": { "content": { "type": "tool use", "id": "toolu 01READ", "name": "Read", "input": { "path": "/tmp/a.py" } }, { "type": "tool use", "id": "toolu 02BASH", "name": "Bash", "input": { "command": "pwd" } } , "model": "claude-sonnet-4-6" } }, { "type": "user", "message": { "content": { "type": "tool result", "tool use id": "toolu 01READ", "content": "print 'hello' " }, { "type": "tool result", "tool use id": "toolu 02BASH", "content": "/tmp" } } }, { "type": "assistant", "message": { "content": { "type": "text", "text": "Done checking both files." } , "model": "claude-sonnet-4-6" } }, { "type":… 证据：`tests/integrations/claude_agent_sdk/cassettes/multi_tool_response.json`
- **Multi Turn Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-mt001" }, { "type": "assistant", "message": { "content": { "type": "text", "text": "Hello! How can I help you?" } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 600, "duration api ms": 400, "is error": false, "num turns": 1, "session id": "s-mt001", "total cost usd": 0.002, "usage": { "input tokens": 15, "output tokens": 8 }, "result": "Hello! How can I help you?" }, { "type": "assistant", "message": { "content": { "type": "text", "text": "The capital of France is Paris." } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 700, "duration api ms": 500… 证据：`tests/integrations/claude_agent_sdk/cassettes/multi_turn_response.json`
- **Simple Text Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-abc123" }, { "type": "assistant", "message": { "content": { "type": "text", "text": "The answer is 4." } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 1200, "duration api ms": 900, "is error": false, "num turns": 1, "session id": "s-abc123", "total cost usd": 0.003, "usage": { "input tokens": 25, "output tokens": 10 }, "result": "The answer is 4." } 证据：`tests/integrations/claude_agent_sdk/cassettes/simple_text_response.json`
- **Thinking Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-think789" }, { "type": "assistant", "message": { "content": { "type": "thinking", "thinking": "Let me think about this carefully...", "signature": "sig abc123" } , "model": "claude-sonnet-4-6" } }, { "type": "assistant", "message": { "content": { "type": "text", "text": "After careful consideration, the answer is 42." } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 2000, "duration api ms": 1500, "is error": false, "num turns": 1, "session id": "s-think789", "total cost usd": 0.005, "usage": { "input tokens": 50, "output tokens": 30 }, "result": "After careful consideration, the answer is 42… 证据：`tests/integrations/claude_agent_sdk/cassettes/thinking_response.json`
- **Tool Use Response**（structured_config）：{ "type": "system", "subtype": "init", "session id": "s-def456" }, { "type": "assistant", "message": { "content": { "type": "text", "text": "Let me check the files in the directory." }, { "type": "tool use", "id": "toolu 01ABC", "name": "Bash", "input": { "command": "ls -la" } } , "model": "claude-sonnet-4-6" } }, { "type": "user", "message": { "content": { "type": "tool result", "tool use id": "toolu 01ABC", "content": "file1.py\nfile2.py\nREADME.md" } } }, { "type": "assistant", "message": { "content": { "type": "text", "text": "I found 3 files: file1.py, file2.py, and README.md." } , "model": "claude-sonnet-4-6" } }, { "type": "result", "subtype": "result", "duration ms": 3500, "duration… 证据：`tests/integrations/claude_agent_sdk/cassettes/tool_use_response.json`
- **Default Vector Store**（structured_config）：{"embedding dict": {"6b4e050b-66f5-4c9d-a9b2-8880d39be567": 0.002446331549435854, -0.013814171776175499, -0.007511758245527744, -0.026190951466560364, 0.003040638053789735, 0.024186894297599792, -0.028042975813150406, -0.011139792390167713, -0.024698274210095406, -0.02609420381486416, 0.020994223654270172, 0.03051695041358471, -0.0012827691389247775, -0.007477205246686935, 0.0030630973633378744, 0.021685278043150902, 0.023468198254704475, 0.011616619303822517, -0.0003077350265812129, -0.017428385093808174, -0.016198309138417244, -0.015479612164199352, 0.011264181695878506, 0.0008569071069359779, -0.0006832797662355006, -0.0035589286126196384, 0.02344055473804474, -0.03590717166662216, -0.00… 证据：`tests/integrations/llamaindex/vector_index/default__vector_store.json`
- **Docstore**（structured_config）：{"docstore/data": {"6b4e050b-66f5-4c9d-a9b2-8880d39be567": {" data ": {"id ": "6b4e050b-66f5-4c9d-a9b2-8880d39be567", "embedding": null, "metadata": {"file path": "/Users/ayushthakur/integrations/weave-dev/weave/tests/integrations/llamaindex/test data/paul graham essay.txt", "file name": "paul graham essay.txt", "file type": "text/plain", "file size": 75042, "creation date": "2024-11-22", "last modified date": "2024-10-03"}, "excluded embed metadata keys": "file name", "file type", "file size", "creation date", "last modified date", "last accessed date" , "excluded llm metadata keys": "file name", "file type", "file size", "creation date", "last modified date", "last accessed date" , "relat… 证据：`tests/integrations/llamaindex/vector_index/docstore.json`
- **Graph Store**（structured_config）：{"graph dict": {}} 证据：`tests/integrations/llamaindex/vector_index/graph_store.json`
- **Image Vector Store**（structured_config）：{"embedding dict": {}, "text id to ref doc id": {}, "metadata dict": {}} 证据：`tests/integrations/llamaindex/vector_index/image__vector_store.json`
- **Index Store**（structured_config）：{"index store/data": {"e081edba-af4c-440a-953f-dfe781117555": {" type ": "vector store", " data ": "{\"index id\": \"e081edba-af4c-440a-953f-dfe781117555\", \"summary\": null, \"nodes dict\": {\"6b4e050b-66f5-4c9d-a9b2-8880d39be567\": \"6b4e050b-66f5-4c9d-a9b2-8880d39be567\", \"58299c1a-c1a7-49ce-96d0-a099d21fd16f\": \"58299c1a-c1a7-49ce-96d0-a099d21fd16f\", \"37651ba3-3b7b-4d71-b191-7ea8fd334652\": \"37651ba3-3b7b-4d71-b191-7ea8fd334652\", \"f0b59cc1-02c7-4730-8151-c7c9aebe657a\": \"f0b59cc1-02c7-4730-8151-c7c9aebe657a\", \"34e2d45b-4548-4cb6-a000-4985bde28d22\": \"34e2d45b-4548-4cb6-a000-4985bde28d22\", \"8a921837-97a3-44af-adb2-7afc14a48707\": \"8a921837-97a3-44af-adb2-7afc14a48707\", \"… 证据：`tests/integrations/llamaindex/vector_index/index_store.json`
- **Cost Checkpoint**（structured_config）：{ "gpt-4": { "provider": "openai", "input": 3e-05, "output": 6e-05, "created at": "2024-10-08 08:45:39" } , "gpt-4o": { "provider": "openai", "input": 5e-06, "output": 1.5e-05, "created at": "2024-10-08 08:45:39" }, { "provider": "openai", "input": 2.5e-06, "output": 1e-05, "created at": "2024-12-18 09:00:21" }, { "provider": "openai", "input": 2.5e-06, "output": 1e-05, "cache read input": 1.25e-06, "cache creation input": 0.0, "created at": "2026-04-01 13:02:37" } , "gpt-4o-mini": { "provider": "openai", "input": 1.5e-07, "output": 6e-07, "created at": "2024-10-08 08:45:39" }, { "provider": "openai", "input": 1.5e-07, "output": 6e-07, "cache read input": 7.5e-08, "cache creation input": 0.… 证据：`weave/trace_server/costs/cost_checkpoint.json`
- **Generated Base Object Class Schemas**（structured_config）：{ "$defs": { "ActionSpec": { "properties": { "name": { "anyOf": { "type": "string" }, { "type": "null" } , "default": null, "title": "Name" }, "description": { "anyOf": { "type": "string" }, { "type": "null" } , "default": null, "title": "Description" }, "config": { "discriminator": { "mapping": { "contains words": " /$defs/ContainsWordsActionConfig", "llm judge": " /$defs/LlmJudgeActionConfig" }, "propertyName": "action type" }, "oneOf": { "$ref": " /$defs/LlmJudgeActionConfig" }, { "$ref": " /$defs/ContainsWordsActionConfig" } , "title": "Config" } }, "required": "config" , "title": "ActionSpec", "type": "object" }, "AnnotationSpec": { "properties": { "name": { "anyOf": { "type": "string"… 证据：`weave/trace_server/interface/builtin_object_classes/generated/generated_base_object_class_schemas.json`
- **Generated Builtin Object Class Schemas**（structured_config）：{ "$defs": { "ActionSpec": { "properties": { "name": { "anyOf": { "type": "string" }, { "type": "null" } , "default": null, "title": "Name" }, "description": { "anyOf": { "type": "string" }, { "type": "null" } , "default": null, "title": "Description" }, "config": { "discriminator": { "mapping": { "contains words": " /$defs/ContainsWordsActionConfig", "llm judge": " /$defs/LlmJudgeActionConfig" }, "propertyName": "action type" }, "oneOf": { "$ref": " /$defs/LlmJudgeActionConfig" }, { "$ref": " /$defs/ContainsWordsActionConfig" } , "title": "Config" } }, "required": "config" , "title": "ActionSpec", "type": "object" }, "AlertSpec": { "properties": { "name": { "anyOf": { "type": "string" }, {… 证据：`weave/trace_server/interface/builtin_object_classes/generated/generated_builtin_object_class_schemas.json`
- **Model Providers**（structured_config）：{ "openai/gpt-oss-120b": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "openai/gpt-oss-20b": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "google/gemma-4-31B-it": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "ibm-granite/granite-4.1-8b": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "MiniMaxAI/MiniMax-M2.5": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "zai-org/GLM-5.1": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "zai-org/GLM-5-FP8": { "litellm provider": "coreweave", "api key name": "WANDB API KEY" }, "zai-org/GLM-4.5": { "litellm provider":… 证据：`weave/trace_server/model_providers/model_providers.json`
- **.gitattributes**（source_file）：.png binary .jpg binary .gif binary 证据：`.gitattributes`
- **Codeowners**（source_file）：@wandb/weave-team /docs/ @wandb/docs-team @wandb/weave-team /weave/trace server/migrations @tssweeney @gtarpenning 证据：`.github/CODEOWNERS`
- **Monitor Python dependencies in pyproject.toml**（source_file）：version: 2 updates: Monitor Python dependencies in pyproject.toml - package-ecosystem: "uv" directory: "/" target-branch: "master" schedule: interval: "weekly" day: "monday" time: "09:00" timezone: "America/New York" Group minor and patch updates together to reduce PR noise Groups match the optional dependencies structure in pyproject.toml groups: Core dependencies core: patterns: - "pydantic " - "wandb " - "packaging " - "tenacity " - "emoji " - "uuid-utils " - "numpy " - "rich " - "click " - "gql " - "jsonschema " - "diskcache-weave " - "nest-asyncio " - "weave server sdk " 证据：`.github/dependabot.yml`
- **.gitignore**（source_file）：.DS Store .python-version .ipynb checkpoints dist/ /wandb/ pycache .idea .egg-info/ build/ gha-creds- .json .vscode .mypy cache .hypothesis .env .ruff cache .pytest cache .coverage .nox .venv .claude/worktrees .weave client dropped items log.jsonl .log /file::memory:?cache=shared tests/weave models/ .cursor/rules/personal.mdc pyrightconfig.json .coverage/ coverage.xml htmlcov/ 证据：`.gitignore`
- **.graphqlrc**（source_file）：schema: "./wb schema.gql" 证据：`.graphqlrc`
- **Priority 0: Type checkers slowest — start immediately, run in parallel**（source_file）：repos: Priority 0: Type checkers slowest — start immediately, run in parallel - repo: local hooks: - id: ty name: ty type checker entry: uv run ty check language: python always run: true pass filenames: false priority: 0 - repo: https://github.com/RobertCraigie/pyright-python rev: v1.1.387 hooks: - id: pyright additional dependencies: ". tests " exclude: ".github/scripts/validate docs coverage.py" always run: true pass filenames: false priority: 0 - repo: https://github.com/pre-commit/mirrors-mypy rev: "v1.19.1" hooks: - id: mypy additional dependencies: types-pkg-resources==0.1.3, types-all, wandb =0.15.5, wandb<0.19.0 Note: You have to update pyproject.toml tool.mypy too! args: "--config-… 证据：`.pre-commit-config.yaml`
- **Makefile**（source_file）：prerelease-dry-run: uv run ./scripts/prerelease dry run.py 证据：`Makefile`
- 其余 19 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。

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

- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`AGENTS.md`, `README.md`, `rules/README.md`
- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`AGENTS.md`, `README.md`, `rules/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, weave/__init__.py
- **安装与快速开始**：importance `high`
  - source_paths: pyproject.toml, weave/trace/weave_init.py
- **系统架构**：importance `high`
  - source_paths: weave/trace/weave_client.py, weave/trace_server/clickhouse_trace_server_batched.py, weave/trace_server_bindings
- **追踪数据流**：importance `high`
  - source_paths: weave/trace/call.py, weave/trace/log_call.py, weave/trace/op_accumulator.py, weave/trace/context
- **函数追踪机制**：importance `high`
  - source_paths: weave/trace/op.py, weave/trace/op_caller.py, weave/trace/op_protocol.py, weave/trace/autopatch.py
- **评估系统**：importance `high`
  - source_paths: weave/flow/scorer.py, weave/evaluation/eval.py, weave/evaluation/eval_imperative.py, weave/flow/leaderboard.py
- **评分器模块**：importance `medium`
  - source_paths: weave/scorers, weave/scorers/llm_as_a_judge_scorer.py, weave/scorers/classification_scorer.py, weave/scorers/scorer_types.py
- **模型供应商集成**：importance `high`
  - source_paths: weave/integrations/openai/openai_sdk.py, weave/integrations/anthropic/anthropic_sdk.py, weave/integrations/google_genai/google_genai_sdk.py, weave/integrations/mistral/mistral_sdk.py, weave/integrations/patch.py

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

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `dedbcd89f7ba4f4674125655e091d8dda08e1111`
- inspected_files: `pyproject.toml`, `README.md`, `uv.lock`

宿主 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: 来源证据：v0.52.31

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v0.52.31
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | cevd_5abf422dae9b416fa8f2c65c21c2a4cd | https://github.com/wandb/weave/releases/tag/v0.52.31 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 2: 来源证据：v0.52.40

- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v0.52.40
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_ac47498581a248b0b6be5e90b060b5ec | https://github.com/wandb/weave/releases/tag/v0.52.40 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 3: 来源证据：v0.52.30

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v0.52.30
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能增加新用户试用和生产接入成本。
- Evidence: community_evidence:github | cevd_8279f2b8caaa46f893597430a4238d93 | https://github.com/wandb/weave/releases/tag/v0.52.30 | 来源类型 github_release 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 4: 来源证据：v0.52.35

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v0.52.35
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能阻塞安装或首次运行。
- Evidence: community_evidence:github | cevd_82d6e8a0c7804ed9875e5d4df6cfbf3f | https://github.com/wandb/weave/releases/tag/v0.52.35 | 来源类型 github_release 暴露的待验证使用条件。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

### Constraint 5: 来源证据：v0.52.36

- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：v0.52.36
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | cevd_0347e61db43c4471a16dabca6f9d4b7f | https://github.com/wandb/weave/releases/tag/v0.52.36 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

### Constraint 7: 来源证据：v0.52.38

- Trigger: GitHub 社区证据显示该项目存在一个维护/版本相关的待验证问题：v0.52.38
- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- Why it matters: 可能影响升级、迁移或版本选择。
- Evidence: community_evidence:github | cevd_e6ca52f3493342d3b958dd3159f4f8fe | https://github.com/wandb/weave/releases/tag/v0.52.38 | 来源讨论提到 python 相关条件，需在安装/试用前复核。
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

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

### Constraint 9: 下游验证发现风险项

- Trigger: no_demo
- Host AI rule: 进入安全/权限治理复核队列。
- Why it matters: 下游已经要求复核，不能在页面中弱化。
- Evidence: downstream_validation.risk_items | github_repo:650377372 | https://github.com/wandb/weave | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。

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

- Trigger: no_demo
- Host AI rule: 把风险写入边界卡，并确认是否需要人工复核。
- Why it matters: 风险会影响是否适合普通用户安装。
- Evidence: risks.scoring_risks | github_repo:650377372 | https://github.com/wandb/weave | no_demo; severity=medium
- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。
