Your Contributors Are AI-First Now: Maintainer Gates for Agent-Written PRs
💡 Tool Tip:When designing maintainer gates, use Evergreen Tools' AI Code Reviewer to pre-screen agent PRs, JSON Formatter to validate skill configs, and Regex Builder to match commit trailers!
In August 2026, GitHub's blog interviewed Nicholas Tindle, founding AI engineer at AutoGPT: the repo with over 180,000 stars had around 150 open pull requests, and a big chunk were written by agents — Copilot, OpenClaw, and AutoGPT's own internal tooling among them. Most maintainers' first reaction is to close the door, but AutoGPT chose the opposite path: make agents work the way that works for you. The core lesson is one line: agents read what's in front of them, so put instructions where they look.
Agents read what's in front of them — put instructions where they look
1. Good Docs Aren't Enough — Placement Matters
AutoGPT tried the obvious things first: better contributor guidelines, better docs, a whole wiki dedicated to working with the repo. None of it moved the needle, because tools won't go read your docs unless they're told to. Agents read what's in front of them, at the level of the directory they're working in. So AutoGPT put instructions where agents look: first CLAUDE.md (Claude was generating PRs without enough repo context), then — after discovering Copilot and Codex ignore Claude files — a centralized AGENTS.md standard with CLAUDE.md pointing at it. Code sample 1 shows the structure.
# AGENTS.md — placed NEXT TO the code it governs.
# Agents read what's in front of them; put instructions where they look.
# Repo root: AGENTS.md (the single standard)
# Subdirectories can override with their own AGENTS.md
## Rules for this repository
1. Backend changes: 80% test coverage or the PR will not be opened.
2. Frontend components in /components must include a Storybook test.
3. Every PR must match the template below. Non-matching PRs are
closed automatically, with zero hesitation.
4. If you are an agent, announce yourself in the commit trailer:
"Co-authored-by: <tool> <[email protected]>"
# Point CLAUDE.md at this file instead of maintaining a second standard:
# include AGENTS.md2. Skills: Let Agents Discover Your Rules
AGENTS.md is scoped to a directory; a skill can be discovered outside that directory. Code sample 2 shows a skill file: the description tells the agent when to load it. AutoGPT's front-end engineer got tired of one class of broken PR, wrote a guide, and shipped it as a skill in the repo — the description contained trigger phrasing: write a Storybook test if your component lives in these folders. Now every harness that touches the repo discovers it automatically. The backend enforces its own version the same way: hit 80% coverage or don't open the PR.
# A skill = instruction file + description that tells the agent when to load it.
# AutoGPT ships frontend guidance as a skill with trigger phrasing:
# skills/frontend-guidelines/SKILL.md
---
name: frontend-guidelines
description: >
Write a Storybook test if your component lives in these folders:
/components, /layouts, /pages. Check accessibility rules first.
---
## Frontend rules
- Every component in /components needs a Storybook story.
- Use the project's design tokens, never hard-coded hex colors.
- Accessible: keyboard navigation + aria labels required.
# The agent scans descriptions up front and pulls in full instructions
# when the task matches — even outside the directory that owns AGENTS.md.3. PR Template as a Gate: The Test Plan Trick
Code sample 3 shows AutoGPT's cleverest move: the PR template requires a test plan, and its wording casually mentions testing the pull request — that phrase triggers a skill called test PR, which installs agent browser (with permission), spins up the app, and executes the change. The agent set out to fill in a checkbox and ended up running the code. That's the power of designing gates into the flow: not trust, structure.
# PR template as a gate: the test plan trick
# .github/PULL_REQUEST_TEMPLATE.md
## Summary
<!-- What does this PR do? -->
## Test Plan
<!-- Run the tests. Testing this pull request is required. -->
## Checklist
- [ ] Tests pass (backend coverage >= 80%)
- [ ] Storybook story added for new components
- [ ] Commit trailer announces agent authorship if applicable
# The phrase "testing this pull request" triggers a skill named
# "test PR" that installs agent browser, spins up the app,
# and actually executes the change. The agent filled in a checkbox
# and ended up running the code.4. Rule First, Tooling as Backstop
Code sample 4 is the enforcing script: PRs without a test plan get closed automatically with zero hesitation. But the funniest finding is that the rule changed agent behavior before the automation ever ran — agents followed the template. Human contributors sometimes need more room, which Nicholas treats as a feature: "If you don't follow the template, I know you're probably a person, and I'm going to be kinder." Commit trailers make agent PRs instantly identifiable: Co-authored-by announces the tool.
# Enforce gates with tooling, then measure whether it ever runs
# scripts/check-pr.sh — called from CI on pull_request
#!/usr/bin/env bash
set -euo pipefail
if ! grep -q "Test Plan" "$PR_BODY"; then
echo "PR missing test plan — closing automatically"
gh pr close "$PR_NUMBER" --comment "Please fill in the Test Plan section."
exit 1
fi
if ! grep -q "Co-authored-by:" "$PR_BODY"; then
echo "Human PR detected — maintainer will review manually (kinder path)"
fi
# AutoGPT found that once the rule existed, agents followed the template
# before the automation ever ran. The gate changed behavior by existing.5. An Action List for Maintainers
First, put AGENTS.md at the repo root and point CLAUDE.md at it. Second, ship high-frequency broken-PR fixes as skills with trigger descriptions. Third, require a test plan in the PR template and use phrasing like "testing this pull request" to trigger skills. Fourth, write enforcing scripts but don't expect them to run often — the rule changes behavior by existing. Fifth, have agents announce themselves in commit trailers so humans get the kinder path.
6. Summary
AI contributors are already in your queue. The question isn't whether to accept them — it's how to make the only way through the door the way that works for you. AGENTS.md placement, skill trigger descriptions, PR template wording, and coverage gates: these structural designs change agent behavior more than a hundred pages of contribution guides. As Nicholas puts it: if someone wants to spend their tokens improving your project, let them — just make the door open only the way you want.
Gates change behavior by existing
📌 Frequently Asked Questions
How did AutoGPT handle the flood of AI-generated PRs?
Instead of closing PRs, it put instructions where agents look: a root AGENTS.md, skills with trigger descriptions, a PR template requiring a test plan, and coverage gates — so agents work the maintainers' way.
Why don't contribution docs work on agents?
Agents read what's in front of them at the directory level they're working in; they won't go find your wiki or guidelines unless told to. Instructions belong in AGENTS.md, placed next to the code they govern.
What is a skill file?
A skill is an instruction file with a description that tells the agent when to load it. Agents scan descriptions up front and pull in full instructions when the task matches — even outside the directory owning AGENTS.md.
What is the PR template 'test plan trick'?
The template requires a test plan and casually mentions testing the pull request, which triggers a skill named test PR that installs agent browser, spins up the app, and executes the change — the agent runs the code while filling a checkbox.
How can maintainers identify agent-written PRs?
Require agents to announce themselves in commit trailers via Co-authored-by. Agent PRs become instantly recognizable, and human contributors get a more lenient, kinder review path.