Repository navigation
chore(next): add agent rules generated by next dev - #96
Merged
Merged
Conversation
next dev writes this managed block to apps/web/AGENTS.md through its agentRules option, which is on by default, and writes it back if the file is deleted. Left untracked, it kept showing up as an untracked change. Committing it keeps the tree clean. Next.js only rewrites the content between the nextjs-agent-rules markers; anything added outside them is preserved.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
next devwrites a managed block toapps/web/AGENTS.mdthrough itsagentRulesoption, which is on by default, and writes it back if the file is deleted (syncAgentRulesForDevinnext/dist/server/lib/app-info-log.js). Left untracked, it keeps showing up as an untracked change. Committing it keeps the tree clean.Changes
apps/web/AGENTS.mdexactly asnext devgenerated it. Next.js only rewrites the content between thenextjs-agent-rulesmarkers: edits inside them are reverted on the nextnext dev, while anything added outside them is preserved.Verification
hasCurrentAgentRulesfrom the installed Next.js returnstruefor this file, sonext devleaves it as is.prettier --check .passes with the file in place.Notes
next devrewrites it and the change needs a follow-up commit.agentRules: falseinnext.config.ts; the nextnext devrun then deletes the file.