Add AGENTS.md to guide AI coding assistants for contributors#2989
Add AGENTS.md to guide AI coding assistants for contributors#2989
Conversation
…utors Adds guidelines to prevent unsolicited low-value PRs, particularly from GSoC candidates submitting spelling fixes, undiscussed features, and changes to vendored code. Modeled after processing/p5.js#8604. - AGENTS.md: full contributor guide for AI assistants with STOP signs, tone guidance, GSoC-specific redirect, and self-propagating <guidelines> block for generated config files - CLAUDE.md: forcing function so Claude Code reads AGENTS.md before acting on any specific contributor request
Greptile SummaryThis PR introduces a contributor-guidance system for AI coding assistants by adding three files: The split between The referenced files ( Confidence Score: 4/5
Important Files Changed
Last reviewed commit: a93629c |
|
|
||
| Run `gh auth status` and extract the logged-in GitHub username. If `gh` is not installed, not authenticated, or the command fails for any reason, treat the user as an external contributor. | ||
|
|
||
| If the username is NOT one of: `romain-intel`, `npow`, `talsperre`, `valayDave`, `saikonen`, `tuulos`, `mt-ob`, `savingoyal` — stop reading this file and read [AGENTS_EXTERNAL.md](./AGENTS_EXTERNAL.md) instead. |
There was a problem hiding this comment.
The hardcoded username allowlist on line 5 will require manual updates as team membership changes. As maintainers join or leave, keeping this list in sync risks either:
- Former maintainers staying on the list after departure, continuing to bypass contributor guardrails
- New maintainers not yet on the list, unexpectedly routed through the full external-contributor flow
Consider adding a prominent comment directly above the allowlist (or linking to the Netflix/metaflow-maintainers team roster) to make the synchronization requirement explicit and help reviewers catch drift during code review.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
- Adds `AGENTS.md` with guidelines for AI coding assistants (Claude Code, Copilot, Cursor, etc.) on how to handle contributor interactions - Adds `CLAUDE.md` as a forcing function so Claude Code reads `AGENTS.md` before acting on any specific request We've been receiving a high volume of unsolicited low-value PRs, particularly from GSoC candidates submitting spelling fixes, undiscussed features, duplicate fixes, and changes to vendored code. 24 such PRs were closed this week alone. `AGENTS.md` addresses this at the source: when a contributor uses an AI assistant to work on the repo, the agent is instructed to orient them toward approved issues before touching any code. Modeled after [processing/p5.js#8604](processing/p5.js#8604). - Hard STOP signs for the most common failure patterns: typo/spelling PRs, vendored code edits, undiscussed features, Core Runtime changes without an issue - GSoC-specific redirect in the `<guidelines>` block (flagged as a known failure case in the p5.js thread) so agents catch it before doing anything else - Self-propagating: agents generating analysis files (CLAUDE.md, .cursorrules, etc.) must copy the `<guidelines>` block verbatim so the rules survive in generated configs - Tone guidance so agents act as guides rather than gatekeepers The p5.js PR discussion found that Claude Code specifically ignores `AGENTS.md` when the initial user request is specific enough. Adding `BEFORE you do ANYTHING ELSE, ALWAYS refer to the AGENTS.md document` to `CLAUDE.md` fixes this. - [ ] Bug fix - [ ] New feature - [ ] Core Runtime change - [x] Docs / tooling - [ ] Refactoring --------- Co-authored-by: Nissan Pow <npow@netflix.com>
Summary
AGENTS.mdwith guidelines for AI coding assistants (Claude Code, Copilot, Cursor, etc.) on how to handle contributor interactionsCLAUDE.mdas a forcing function so Claude Code readsAGENTS.mdbefore acting on any specific requestMotivation
We've been receiving a high volume of unsolicited low-value PRs, particularly from GSoC candidates submitting spelling fixes, undiscussed features, duplicate fixes, and changes to vendored code. 24 such PRs were closed this week alone.
AGENTS.mdaddresses this at the source: when a contributor uses an AI assistant to work on the repo, the agent is instructed to orient them toward approved issues before touching any code.Modeled after processing/p5.js#8604.
What AGENTS.md does
<guidelines>block (flagged as a known failure case in the p5.js thread) so agents catch it before doing anything else<guidelines>block verbatim so the rules survive in generated configsWhat CLAUDE.md does
The p5.js PR discussion found that Claude Code specifically ignores
AGENTS.mdwhen the initial user request is specific enough. AddingBEFORE you do ANYTHING ELSE, ALWAYS refer to the AGENTS.md documenttoCLAUDE.mdfixes this.PR Type