[pull] canary from vercel:canary - #1405
Merged
Merged
Conversation
… context bloat in AGENTS.md (#98781) - The `pr-status` can be very slow if you have a lot of test failures on a PR. If the user asks a targeted question about PR review comments, just fetch that information, it's much faster. - Context bloat: Rely on the agent to pull in the `pr-status-triage` skill if they need it, don't bloat the AGENTS.md, except to mention the skill.
> [!TIP] > Recommended to review commit by commit. This PR adds `next upgrade --experimental-ai="security"` flag (alias `--ai`), which is targeted to help users leverage agents to upgrade their app to the safe major version when their app's Next.js version has any security advisories. Once the command is ran from the user, Next.js will detect the installed agent harness in user's device, currently limited to Codex and Claude, and will proceed with starting an agent session once approved. If it is called within an agent session, the work will continue off within that agent. `next upgrade --ai` simply does two things: - prepare the relevant context to temporary dir - print hand off prompt, guiding to read those context The context will guide the agent to run relevant codemods and migration checklist to proceed. This PR is a base core of the workflow, and will have wrappers of entry point around this. Also, will add "latest" and "future" as follow up, which will cover the app to be always latest, and adopt the future defaults like Cache Components. This PR also sets up the evals infra and adds evals.
Stacked on #98562. > [!TIP] > Recommended to review commit by commit. This PR adds `experimental.agenticAutoUpgrade = 'security'` config which enables nudging the agents to notify the user when the app's Next.js version has any security advisories. The nudge will include guiding to upgrade via `next upgrade --ai` (run "security" by detecting config). The method of nudging leverages the agents behavior where they tend to listen to messages from fatal errors that blocks the process compared to general error/warning logs. Whenever the agents run `next dev` or `next build`, Next.js will detect the condition and nudge the agent using this method. Afterwards it's up to the user whether to proceed the upgrade or not, it's 100% up to the user how to run it e.g. subagent, background agent, etc. and the process should not enforce any that affects user's workflow.
Stacked on #98637. This PR adds `next upgrade --ai="latest"` flag, which is targeted to help users leverage agents to upgrade their app to the latest major version when available. Just like security upgrade, it covers running codemods and a migration checklist for major-to-major upgrades to support breaking changes more reliably.
Stacked on #98633. This PR adds `experimental.agenticAutoUpgrade = 'latest'` config which enables nudging the agents to notify the user when there's new major/minor Next.js version available to upgrade. The nudge will include guiding to upgrade via `next upgrade --ai` (run "latest" by detecting config). The method of nudging leverages the agents behavior where they tend to listen to messages from fatal errors that blocks the process compared to general error/warning logs. Whenever the agents run `next dev` or `next build`, Next.js will detect the condition and nudge the agent using this method. Afterwards it's up to the user whether to proceed the upgrade or not, it's 100% up to the user how to run it e.g. subagent, background agent, etc. and the process should not enforce any that affects user's workflow. Enabling `experimental.agenticAutoUpgrade = 'latest'` also enables security check.
Stacked on #98640. This PR adds `next upgrade --ai="future"` flag, which is targeted to help users leverage agents to upgrade their app to adopt the future defaults when available. Just like latest version upgrade, it covers running codemods and a migration checklist for major-to-major upgrades to support breaking changes more reliably. This PR currently covers Cache Components only for the future default.
Stacked on #98643. This PR adds `experimental.agenticAutoUpgrade = 'future'` config which enables nudging the agents to notify the user when there's unadopted future default(s). The nudge will include guiding to upgrade via `next upgrade --ai` (run "future" by detecting config). The method of nudging leverages the agents behavior where they tend to listen to messages from fatal errors that blocks the process compared to general error/warning logs. Whenever the agents run `next dev` or `next build`, Next.js will detect the condition and nudge the agent using this method. Afterwards it's up to the user whether to proceed the upgrade or not, it's 100% up to the user how to run it e.g. subagent, background agent, etc. and the process should not enforce any that affects user's workflow. Enabling `experimental.agenticAutoUpgrade = 'future'` also enables security check and latest version check.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )