Repo Checklist: Accepting AI-Assisted Contributions

What every repo needs to handle AI contributions responsibly.


The Checklist

1. AGENTS.md in repo root

This file is read by AI coding agents (Copilot, Claude Code, Cursor, etc.) when they work on your codebase. It tells the AI what your standards are, what's off-limits, and how to behave. Think of it as onboarding instructions - but for machines.

What to include:

Keep it under 200 lines. AI context windows are finite - concise beats comprehensive.

2. AI section in CONTRIBUTING.md

A short, human-readable section that sets expectations for contributors. Link to the full org-wide policy if one exists, but keep the essentials in-repo so contributors don't have to chase links.

Minimum content:

## AI Tool Usage

You may use AI tools to assist your contributions. You are fully responsible
for everything you submit.

- **Understand it**: You must be able to explain every line of your code.
- **Test it**: AI-generated code must pass all tests and security checks.
- **Disclose it**: Pick an AI assistance level (0-5) in the PR template.
- **Own it**: You are the author. If a reviewer asks "why?", you answer - not the AI.

AI tools must not be used to fix issues labelled `good first issue`.
These exist for human learning.

For full policy details, see: [AI-assisted coding guide](/ai-assisted-coding-guide/)

3. PR template with AI disclosure

Update .github/PULL_REQUEST_TEMPLATE.md to include an AI section. It should be lightweight - one checkbox and a few optional fields. Don't make it burdensome or people will skip it.

Ensure contributors are not penalized for using AI tools: honesty should be encouraged else disclosure will stop.

Recommended template:

## What type of PR is this? (check all applicable)

- [ ] Feature
- [ ] Bug Fix
- [ ] Documentation
- [ ] Refactor
- [ ] Test
- [ ] Build or CI
- [ ] Other (please specify)

## Related Issue

Fixes #

## Describe this PR

A brief description of what this changes and why - in your own words.

## AI Tool Usage

How much of this PR was AI-assisted? (check one)

- [ ] **0** - No AI at any point
- [ ] **1** - AI helped me think, but I wrote all the code myself
- [ ] **2** - I planned the change and decided the approach; AI helped write the code
- [ ] **3** - AI planned and wrote it; I checked and approved each step as it went
- [ ] **4** - I set the AI going and left it to it; I reviewed the finished result
- [ ] **5** - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

If an AI agent is filling this in: declare the level honestly, and open as a draft if it is 5. Do not lower the declared level to get the PR reviewed.

**If level 1 or above:**

- Tool(s) used:
- What was generated:
- What you reviewed and changed:

## Screenshots

If applicable.

## Alternative Approaches Considered

Did you consider other approaches? Why this one?

## Review Guide

How should a reviewer test this? Anything to watch for?

## Checklist

- [ ] I have read the Contributing Guide
- [ ] PR is focused and small
- [ ] Tests are included or updated
- [ ] I understand all code in this PR and can answer questions about it
- [ ] No secrets, credentials, or sensitive data are included
- [ ] Commit messages are descriptive
- [ ] Related docs and screenshots are updated

## [optional] What gif best describes this PR or how it makes you feel?

4. Commit message convention

Include a trailer for AI-assisted commits:

feat: add password strength indicator to registration

Assisted-by: Claude

Several projects use this convention (LLVM, Fedora, QGIS), though it is not a standard: Kubernetes prohibits AI trailers and requires disclosure in the PR description instead. The main goal is to help maintainers decide on how to best review the code, without being punitive.

5. Maintain a solid CI pipeline

AI-generated code can appear correct while introducing subtle security issues, hallucinated dependencies, or untested paths.

CI pipeline tools can catch what human review misses:

6. Classify the Level of AI Assistance

The idea of grading assistance comes from the VisiData project: credit to them for the original scale. Theirs has 11 levels (0-10), which is a lot for a set of checkboxes, so the version below is adapted down to six (0-5). Use their original if you want finer granularity.

Level What happened How to review it
0 No AI at any point. As normal.
1 AI helped me think - ideas, options, explaining things. I wrote all the code myself. As normal.
2 I decided the approach and planned the change. AI helped write the code. As normal, plus check the AI-written parts - especially tests.
3 AI planned the approach and wrote the code. I checked and approved each step as it went. Question the approach, not just the diff.
4 I set the AI going and left it to it. I reviewed the finished result, not the steps. Treat as untrusted third-party code. Full security review.
5 I set the AI going and left it to it. Nobody has read the result - no review, or AI review only. Not ready for review yet. Send it back for the author to read first.

Three dividing lines to keep in mind: at 2 the human chose the approach, at 3 the AI did; at 3 someone watched each step, at 4 only the end result was checked; at 4 a human read the result, at 5 nobody has.

Levels are not a quality score - a tested level 4 beats a sloppy level 0. They just tell a reviewer where to look. Penalising honest answers stops honest answers.

On level 5: it is listed so people can be honest, not because it is acceptable. These PRs should be treated as a draft until reviewed by a human, with no obligation from the maintainer to do so.

Optionally, add ai-level-0 to ai-level-5 labels to quickly surface this information to reviewers.

7. Thoroughly Document Architectural Decisions

8. Identifying AI-assisted Code

9. Handling AI-assisted PRs (Maintainers)

Key points for reviewers:

Response template for non-compliant PRs:

Thanks for this contribution. It doesn't currently meet our standards for AI-assisted work - please review our Contributing Guide and ensure you can explain the design decisions in this PR. Happy to help once you've had a chance to review the code more thoroughly.


Quick Reference: What Goes Where

File Purpose Audience
AGENTS.md Machine-readable project standards AI tools
CONTRIBUTING.md (AI section) Human-readable contribution rules Contributors
.github/PULL_REQUEST_TEMPLATE.md PR disclosure and checklist Contributors
docs/decisions Markdown Architectural Decision Records Contributors
Commit trailer (Assisted-by:) Attribution in git history Maintainers
Docs site policy page Full ethical framework and rules Everyone