GitBills

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

gitbills-agents-policy/1: the 8 directives
DirectiveValuesDefaultWhat it does
agentswelcome | allowed_with_preflight | vouch_required | maintainers_onlyallowed_with_preflightWho 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_author1..20 or nullnullThe 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_lines10..10000 or nullnullThe most changed lines (added and removed) a pull request may have before it waits for a maintainer vouch. null: no limit.
require_linked_issuetrue | false (or yes | no)falseEvery 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_disclosuretrue | false (or yes | no)falseA 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_codetrue | false (or yes | no)falseA pull request that changes code changes tests too, or waits for a maintainer vouch.
commercial_vendor_prsallow | require_vouch | require_bondrequire_vouchPull 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_vouchesallow | disabledallowWhether a scout vouch counts where agents is vouch_required. allow: it does. disabled: only a maintainer vouch does.

How GitBills reads the file

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Maintainers pass. Owners, members and collaborators pass every rule, unless the account is a bot.
  6. 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.