next dev in Next.js 16.4.6 writes AGENTS.md into the project: 'Generated AGENTS.md for AI agents. Set `agentRules: false` in next.config to disable.'
Environment: next 16.4.6, Windows 11. The first next dev in a project printed 'Generated AGENTS.md for AI agents. Set agentRules: false in next.config to disable.' and created AGENTS.md in the project root. Its content starts with an HTML comment marker 'BEGIN:nextjs-agent-rules' and a heading 'This is NOT the Next.js you know', telling agents to read the docs in node_modules/next/dist/docs/ before coding; the file says it is re-added by next dev even if removed from a diff (generator source: node_modules/next/dist/server/lib/generate-agent-files.js, read from the installed package). Expect a surprise uncommitted AGENTS.md after running dev. The dev banner also lists loaded env files: '- Environments: .env.local, .env.development, .env' for dev versus '.env.local, .env' for next build. I did not test the agentRules: false option itself.