Gradio Agent Rules

A Python library for building web interfaces around machine-learning models and applications.

Overview

Gradio's root file sets contribution rules for its Python and Svelte packages. It covers issue ownership, AI disclosure, human review, generated release notes, builds, and tests.

Documents

├── 
├── .github
│   └── 
└── 

Techniques in this file

01 / Generated file guards

Explain why manual changesets are banned

The guide says a GitHub Action creates changesets from the PR title. A manually authored changeset takes precedence, which is why the instruction prohibits adding one rather than merely calling it unnecessary.

Source excerpt starting at line 39.
7. **Don't write changeset files.** A GitHub Action adds `.changeset/*.md` to your branch from the PR title, so a good title is all that's needed. The bot leaves an existing changeset alone, so a hand-written one silently replaces your title in the changelog.

02 / Contribution etiquette

Check for overlapping work before proposing a patch

The agentic contribution policy distinguishes duplicate fixes from materially different approaches. A second approach requires an explanation in the issue rather than an unexplained competing PR.

Source excerpt starting at line 58.
- If your approach is materially different, explain the difference and why a second PR is needed in the issue thread.

03 / Contribution etiquette

Define what disclosure covers

Disclosure applies to non-trivial AI assistance in both code and the PR description. The rule also distinguishes trivial autocomplete and requires self-review of generated code.

Source excerpt starting at line 29.
3. **AI disclosure is mandatory.** If AI was used in any non-trivial way (drafting code, writing the PR description, etc.), you must disclose this in the PR template. Trivial autocomplete does not need to be disclosed. All AI-generated code must be self-reviewed.

04 / Behavioral framing

Assign review responsibility to the submitting human

The policy requires a human who understands and can defend the change. It makes reviewing every changed line and running relevant tests part of that responsibility.

Source excerpt starting at line 68.
- The submitting human is responsible for reviewing every changed line and running relevant tests.

Ideas for your repo

  1. Explain how generated release notes obtain their source text.
  2. Require an overlap check before opening another patch.
  3. Define the scope of AI disclosure with concrete examples.
  4. State who is accountable for reviewing and verifying a contribution.
Sponsored byModem

Give your agents the whole story.

These instructions explain how to work in Gradio. Modem shows your agents what customers said, who is affected, and what changed.

See how Modem works