Commit 67b1e8a4 authored by Jude Gao's avatar Jude Gao

[agents-md] Update docs: next dev auto-generates agent files

parent c2933977
...@@ -59,13 +59,7 @@ npx create-next-app@canary --no-agents-md ...@@ -59,13 +59,7 @@ npx create-next-app@canary --no-agents-md
### Existing projects ### Existing projects
On Next.js `v16.2.0-canary.37` or later, run the codemod from your Next.js app directory (in a monorepo, the sub-package that declares `next`): On Next.js `v16.2.0-canary.37` or later, just run `next dev` from your Next.js app directory (in a monorepo, the sub-package that declares `next`). When an AI coding agent is detected in the environment and the managed block is missing, Next.js auto-generates `AGENTS.md` and `CLAUDE.md` at the project root. It upserts into an existing `AGENTS.md` or `CLAUDE.md`, or creates both if neither exists:
```bash
npx @next/codemod@canary upgrade agents-md
```
`codemod upgrade` also runs this scaffold as a post-upgrade step. The codemod upserts into an existing `AGENTS.md` or `CLAUDE.md`, or creates both if neither exists:
```md filename="AGENTS.md" ```md filename="AGENTS.md"
<!-- BEGIN:nextjs-agent-rules --> <!-- BEGIN:nextjs-agent-rules -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment