gitbills-agents-policy/1 · robots.txt for pull requests
Make AGENTS.md executable
19 of the 22 busy open-source queues GitBills profiled already commit an AGENTS.md, and a bot that opens slop never reads the prose. Add one short section and GitBills reads it as policy for pull requests from agents: who may send them, how many at once, how large, and what each one must carry. Like robots.txt, the file states the rules; GitBills reads them and shows how a pull request measures up.
Read a repository's policy
A plain form: this page runs no script. GitBills reads AGENTS.md, or .github/AGENTS.md when there is none, from the default branch through raw.githubusercontent.com: at most 256 KiB, nothing written, the answer kept 5 minutes.
The section to paste
GitBills' suggested starting point, six lines for the end of your AGENTS.md. Change any value; every directive and its range is below.
## Pull requests from agents
- agents: allowed_with_preflight
- max_open_prs_per_author: 2
- require_linked_issue: true
- require_disclosure: true
- commercial_vendor_prs: require_vouch
Any level-2 or level-3 heading named Pull requests from agents, Agent pull requests, GitBills or GitBills policy works. Each line is optional: a directive left out keeps its default, and a line GitBills cannot read is ignored and listed, never guessed.
The 8 directives
| Directive | Values | Default | What it does |
|---|---|---|---|
agents | welcome | allowed_with_preflight | vouch_required | maintainers_only | allowed_with_preflight | Who may open pull requests from agents. welcome and allowed_with_preflight: anyone (the second asks for a preflight first). vouch_required: each waits for a maintainer vouch, or a scout vouch where scout_vouches allows. maintainers_only: only with a maintainer vouch. |
max_open_prs_per_author | 1..20 or null | null | The most open pull requests one author may have here at once, the one checked included. More are blocked unless a maintainer vouches. null: no limit. |
max_diff_lines | 10..10000 or null | null | The most changed lines (added and removed) a pull request may have before it waits for a maintainer vouch. null: no limit. |
require_linked_issue | true | false (or yes | no) | false | Every pull request names an issue in its title or body: #123, owner/repo#123, GH-123 or an issue URL. Without one it is blocked unless a maintainer vouches. |
require_disclosure | true | false (or yes | no) | false | A pull request from a bot account says it is agent work: AI-assisted, agent-authored, a Co-authored-by trailer, a GitBills PR receipt link or a preflight. Without that it waits for a vouch. |
require_tests_for_code | true | false (or yes | no) | false | A pull request that changes code changes tests too, or waits for a maintainer vouch. |
commercial_vendor_prs | allow | require_vouch | require_bond | require_vouch | Pull requests that promote a commercial product or service. allow: taken like any other. require_vouch: held for a maintainer vouch or a review bond. require_bond: held for a review bond or a maintainer vouch. |
scout_vouches | allow | disabled | allow | Whether a scout vouch counts where agents is vouch_required. allow: it does. disabled: only a maintainer vouch does. |
How GitBills reads the file
- Only the section counts. Directives are read under a level-2 or level-3 heading named Pull requests from agents, Agent pull requests, GitBills or GitBills policy, in any case, up to the next heading of the same or a higher level.
- Examples stay examples. Fenced code blocks (
```or~~~) and HTML comments are skipped, so a sample section inside a code block, or a line commented out, never applies. - Strict values. A value a directive does not take is ignored and listed as a warning, and the directive keeps its default. When a directive is given twice, its first valid value applies.
- Prose is advice. Without a section, GitBills notes the rules the file states in prose (one PR at a time, an issue first, disclosing AI help, running the tests, no AI-generated pull requests) and suggests lines for them. It never enforces prose.
- Maintainers pass. Owners, members and collaborators pass every rule, unless the account is a bot.
- Read-only. The file comes from the default branch, never from a pull request, so a pull request cannot loosen the rules it is checked against. Nothing is written anywhere.
What a check answers
pass- It meets every rule, or comes from a maintainer (an owner, member or collaborator that is not a bot account).
needs_vouch- It goes ahead once a maintainer vouches for it.
needs_bond- It goes ahead with a review bond, or a maintainer vouch.
blocked_policy- It breaks a rule the repository states: fix the pull request, or a maintainer vouches for it anyway.