docs: strengthen Next.js parity verification in agent guidelines#604
Merged
southpolesteve merged 1 commit intomainfrom Mar 20, 2026
Merged
docs: strengthen Next.js parity verification in agent guidelines#604southpolesteve merged 1 commit intomainfrom
southpolesteve merged 1 commit intomainfrom
Conversation
Add mandatory Next.js behavior verification for all bug fixes and security work, not just feature development. We repeatedly shipped fixes that diverged from Next.js because this step was skipped (config header execution order, javascript: URI blocking, ISR cache key semantics). Changes: - Add local Next.js clone instructions (.nextjs-ref, gitignored) for fast ripgrep searches of source and test suite - Add 4-step verification checklist to Fixing Bugs section - Require documenting what Next.js does in PRs and issue closures - Update Looking at Next.js Source with clone instructions - Add .nextjs-ref/ to .gitignore
commit: |
|
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.
Summary
Strengthens the AGENTS.md guidelines to prevent shipping fixes that diverge from Next.js behavior.
Motivation
During recent security remediation work, we repeatedly shipped fixes that didn't match Next.js behavior:
In each case, the fix was written and PRed before discovering the divergence. The verification step happened too late.
Changes
.nextjs-ref/, gitignored): instructions for cloning and searching the Next.js repo locally with ripgrep, much faster and more reliable thangh search code