chore: commit the AGENTS.md that next dev generates - #44
Conversation
`next dev` writes this file from node_modules/next/dist/server/lib/generate-agent-files.js on every start, including the dev server Playwright boots for the e2e suite. Untracked, it shows up as a stray `??` in every worktree and gets silently swept into unrelated PRs by `git add -A` — which is exactly what happened on #41. Committed verbatim so Next's regeneration is a no-op: it rewrites only the content between the BEGIN/END markers, and prettier --check already agrees with the formatting, so there is no reformat-then-regenerate churn. Tracking it rather than ignoring it also keeps the guidance itself under review: the block tells agents that this Next version has breaking changes and to read node_modules/next/dist/docs/ before writing code. If a future Next bump changes that text, the diff will show up in review instead of silently altering what every agent working in this repo is told.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Comment |
next devwritesAGENTS.mdfromnode_modules/next/dist/server/lib/generate-agent-files.json every start — including the dev server Playwright boots fornpm run test:e2e. Because it isn't tracked, it shows up as a stray??in every worktree and gets silently swept into unrelated PRs bygit add -A.That is not hypothetical: it happened on #41, alongside Next's rewrite of
tsconfig.json, and cost a CI cycle on aFormat checkfailure in files that PR never touched.Why commit rather than gitignore
BEGIN:nextjs-agent-rules/END:nextjs-agent-rulesmarkers, and it emits the same bytes each time, so a regenerated file is diff-clean. (Prettier is not a factor either way here —.prettierignorealready excludes*.md, so this file is never format-checked. An earlier version of this description claimed prettier agreed with the formatting; it simply never looks at it.)node_modules/next/dist/docs/before writing code. If a future Next bump changes that text, the diff surfaces in review instead of silently altering what every agent working in this repo is told. Gitignoring it would hide those changes.Committed verbatim — no edits to Next's text.
The other half
next devalso rewritestsconfig.jsonon start. That is handled separately in #45 (a.prettierignoreentry), kept apart from this one so each judgment call can be accepted or rejected on its own.🤖 Generated with Claude Code