Skip to content

chore(docs): commit next dev agent rules block to keep tree clean - #852

Closed
Zhangs-11 wants to merge 1 commit into
agegr:mainfrom
Zhangs-11:main
Closed

Zhangs-11 wants to merge 1 commit into
agegr:mainfrom
Zhangs-11:main

Conversation

@Zhangs-11

Copy link
Copy Markdown
Contributor

The AGENTS.md agent-rules block is auto-written and re-added by next dev (see node_modules/next/dist/server/lib/generate-agent-files.js). Committing it keeps the working tree clean instead of repeatedly showing an unstaged diff.

@agegr

agegr commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Thanks, but this goes against the convention documented in the same file: AGENTS.md asks that the BEGIN:nextjs-agent-rules block be treated as generated tooling output and kept out of commits. The block's wording and presence depend on the installed next version, so committing it just moves the churn into the history (it would show up as a diff again on the next Next upgrade, and for contributors running a different version). Leaving it untracked and ignoring it in git status is the intended workflow. Closing.

@agegr agegr closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants