Dev environment tips
- Prefer the project package manager (pnpm/uv/poetry) and keep commands reproducible.
- Run the smallest test suite first, then full CI before merging.
Testing instructions
- Find the CI plan under
.github/workflows/. - Run unit tests locally before pushing.
PR instructions
- Keep PRs small and link to the issue/task.
- Never merge red CI.
MD
- 启动 / 冒烟测试:
sed -n '1,200p' AGENTS.md - 验证:
- Ask your coding agent to follow only the instructions in
AGENTS.mdfor one small change (run tests + lint + PR notes).
- Ask your coding agent to follow only the instructions in
简介
AGENTS.md 是面向 coding agent 的统一说明文件:放在仓库根目录,集中写清开发环境、测试命令、PR 规则与 repo 结构。把“项目怎么做事”写一次,后续任务复用,显著减少重复解释与幻觉。
- 适合谁: 希望用一份稳定文档告诉任何 coding agent:怎么装依赖、跑测试、修 lint、提 PR 的项目
- 可搭配: 只要你的 coding agent 能读取仓库根目录指令文件(AGENTS.md)即可
- 准备时间: 10 分钟
实战建议
- 配置约 10 分钟(先写最小版 AGENTS.md,再逐步补全)
- 一个文件统一约定:减少每次任务重复问“怎么跑测试/怎么提 PR”
- GitHub stars + forks(已核验):见「来源与感谢」
核心是可预测性。coding agent 想稳定,就必须知道你仓库的真实构建/测试步骤,以及你期望的 PR 规范。把这些写一次、跟代码一起版本化,并要求代理严格遵守。
FAQ
AGENTS.md 是强制要求吗? A: 不是。它是开放约定:当你希望“任何 agent 都能按同一套规则做事”时很有用。
第一版应该先写什么? A: 先写安装依赖、跑测试、跑 lint 的命令,以及仓库特有的坑(monorepo 过滤、环境变量)。
它会取代 README 吗? A: 不会。更像面向 agent 的“行动版 README”:更短、更具体、更偏开发流程。