【慢讯】Next.js 16.2新增 AGENTS.md:为 AI Agents提供匹配版本的本地文档

Next.js在3月18号发布了16.2的稳定版,新增了适配vibe coding的新功能:

使用create-next-app新建Next.js项目,会自动在根目录生成一个AGENTS.md文件:

<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
<!-- END:nextjs-agent-rules -->

还会生成一个CLAUDE.md文件,指向AGENTS.md文件:

@AGENTS.md

实测,Next.js在npm包里直接打包了391个md文档到node_modules/next/dist/docs/

node_modules比黑洞还重

效果如何:

Next.js官方做了benchmark测评


本文参考链接:

2 个赞