📄 为 AI 代理路由统一的本地环境恢复指引 - #1683
Open
cyfung1031 wants to merge 9 commits into
Open
Conversation
cyfung1031
marked this pull request as draft
August 21, 2026 21:19
# Conflicts: # AGENTS.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist / 检查清单
背景
AI 编码代理在执行开发或测试任务时,可能先遇到包管理器、Node 依赖或 Playwright Chromium 环境问题。为了让代理能够快速找到项目约定的恢复方式,本 PR 补充了对应的文档入口和环境恢复说明。
本次改动
AGENTS.md的任务路由表中新增两个轻量入口:docs/develop.md;docs/develop.md#environment-setup-and-recovery。docs/develop.md新增Environment Setup and Recovery章节,说明:pnpm不可用时,优先使用仓库声明的 package manager,并在 Corepack 可用时通过corepack enable和corepack install进行设置;pnpm install;pnpm-lock.yaml,停止并报告 mismatch,不把 lockfile 变更作为环境恢复提交;pnpm run test:e2e:install;Commands内容顺序不变:环境恢复章节位于格式化、提交钩子、issue-template 检查和开发服务器加载说明之后。docs/develop.md维护;AGENTS.md只保留路由,避免始终加载的代理内核重复规则。范围
本 PR 仅修改开发文档:
AGENTS.mddocs/develop.md不修改产品运行时代码、依赖声明、lockfile 或测试实现。
验证
git diff --check通过。pnpm exec prettier --check AGENTS.md docs/develop.md通过。AGENTS.md不包含具体恢复命令;docs/develop.md是恢复流程的唯一所有者。pnpm --version和pnpm exec playwright --version已验证可用;当前环境没有corepack,因此 Corepack 分支未执行真实 bootstrap。已知限制
本 PR 提供的是环境恢复指引,不保证相关安装命令在所有执行环境中都能成功。实际结果仍可能受到网络、权限、Corepack/tool availability 和本地缓存状态影响。确定性场景是源码代理验证,不代表真实模型行为或人工验收。