Ruff
An extremely fast Python linter and code formatter, written in Rust.
Mostly friendly. Welcome, with extra rules.
AI tools are welcome for writing code, but a human must understand and remain responsible for everything submitted and autonomous agents may not contribute. AI must not write comments, issues, pull request descriptions or answers to maintainers, though non-native speakers may use AI to translate or edit their own comments and AI context may be quoted if clearly marked and explained.
Policy by area
- Code contributionsPatches, pull requests and other changes written with AI tools.
- Friendly
- Contributor takes full responsibility
- No autonomous agents
- Issues & bug reportsBug reports, security reports and issues found or written with AI tools.
- Unfriendly
- Contributor takes full responsibility
- No autonomous agents
- Only minor help (autocomplete, grammar)
- AI-written textPull request descriptions, issue comments and summaries written by AI.
- Unfriendly
- AI use must be disclosed
- Contributor takes full responsibility
- No autonomous agents
- Only minor help (autocomplete, grammar)
What is allowed and what is not
Code contributions
Autocomplete · Allowed with conditions
AI may be used as a coding tool, including completion-style assistance, as long as a human understands and remains responsible for the result and no agent works autonomously.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Small fixes · Allowed with conditions
Small AI-assisted code changes are allowed, provided a human understands and stands behind the submitted code and no autonomous agent is involved.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Large or generated changes · Allowed with conditions
Substantial AI-assisted changes are not size-limited, but a human must understand and be able to defend the work, and autonomous agents are not allowed.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Mechanical changes · Allowed with conditions
Bulk or repetitive AI-assisted edits are allowed under the same rule: a human must understand and remain responsible for the resulting code.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Tests · Allowed with conditions
AI-written tests are permitted as coding help as long as a human understands and is accountable for what is submitted.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Build and CI · Allowed with conditions
AI-written build, CI or packaging code is allowed under the general coding-tool permission, with a responsible human in the loop.
- Take full responsibility: A human in the loop who understands the AI-produced work; you remain responsible for the code you publish
- A person must drive: No autonomous agents contributing to the project
4 quotes
We support using AI (i.e., LLMs) as tools for coding.
AI_POLICY.md However, you remain responsible for any code you publish and we are responsible for any code we merge and release.
AI_POLICY.md Due to the foundational nature of our projects, we require a human in the loop who understands the work produced by AI.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md Autonomous agents · Not allowed
Autonomous agents may not contribute to the projects; pull requests believed to have been created autonomously will be closed.
Quote
**We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md
Not covered by the policy (6)
Documentation, Translating the software, Images and media, Research and learning, Checking own work, AI as author.
Issues & bug reports
AI-written reports · Not allowed
Issues must describe the problem in the submitter's own words, so AI must not write the report text.
Quote
If you are opening an issue, we expect you to describe the problem in your own words.
AI_POLICY.md Bots filing issues · Not allowed
The ban on autonomous agents is worded for contributing to the projects generally, and autonomously created pull requests are explicitly closed.
Quote
**We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md
Not covered by the policy (2)
Finding bugs with AI, Security reports.
AI-written text
Pull request descriptions · Not allowed
Pull request descriptions must be in your own words; you must be able to explain the proposed changes yourself.
Quote
If you are opening a pull request, we expect you to be able to explain the proposed changes in your own words. This includes the pull request body and responses to questions.
AI_POLICY.md Comments · Not allowed
AI must not be used to generate comments when communicating with maintainers; comments are expected to be human-written and AI-generated ones may be hidden.
2 quotes
**AI should not be used to generate comments when communicating with maintainers**. We expect comments on our projects to be written by humans.
AI_POLICY.md We may hide any comments that we believe are AI generated.
AI_POLICY.md Answering reviewers · Not allowed
Replies to maintainers' questions must be your own words; copying AI responses is explicitly forbidden.
2 quotes
If you are opening a pull request, we expect you to be able to explain the proposed changes in your own words. This includes the pull request body and responses to questions.
AI_POLICY.md **Do not copy responses from the AI when replying to questions from maintainers.**
AI_POLICY.md Translating own text · Allowed with conditions
For non-native speakers, write in your native language and include the AI translation in a quote block beneath the original text.
- Include the original: Write in your native language and put the AI translation beneath it
- Mark AI text: The AI translation goes in a quote block
2 quotes
We understand that AI is useful when communicating as a non-native English speaker. If you are using AI to edit your comments for this purpose, you must:
AI_POLICY.md Write in your native language, and include the AI translation in a quote block beneath it.
AI_POLICY.md Proofreading · Allowed with conditions
Non-native English speakers may use AI to edit their comments, but the result must reflect their own voice and ideas.
- Take full responsibility: Ensure the edited comment reflects your own voice and ideas
2 quotes
We understand that AI is useful when communicating as a non-native English speaker. If you are using AI to edit your comments for this purpose, you must:
AI_POLICY.md Take the time to ensure it reflects your own voice and ideas.
AI_POLICY.md Quoting AI output · Allowed with conditions
Context from an AI interaction may appear in your own comments only as a disclosed quote block with your own commentary, and not as long snippets.
- Mark AI text: AI context must be placed in a quote block
- Disclose AI use: The quoted context must be disclosed as coming from an AI interaction
- Take full responsibility: Human commentary must explain the relevance and implications of the quoted context
- Keep it small: Do not share long snippets
2 quotes
If you wish to include context from an interaction with AI in your comments, it must be in a quote block (e.g., using `>`) and disclosed as such.
AI_POLICY.md It must be accompanied by human commentary explaining the relevance and implications of the context. Do not share long snippets.
AI_POLICY.md Bots posting · Not allowed
Comments on the projects are expected to be written by humans, and autonomous agents may not contribute, so bots must not post comments on someone's behalf.
2 quotes
**AI should not be used to generate comments when communicating with maintainers**. We expect comments on our projects to be written by humans.
AI_POLICY.md **We do not allow autonomous agents to be used for contributing to our projects**. We will close any pull requests that we believe were created autonomously.
AI_POLICY.md
Not covered by the policy (4)
Commit messages, Reviewing others' work, Forum and list posts, Summarizing discussions.
General
The policy binds external contributors only; members of the Astral team are exempt from it.
“This policy is for external contributors, not members of the Astral team.” (AI_POLICY.md)
Sources
- AI_POLICY.mdgithub.com/astral-sh/.github/blob/main/AI_POLICY.mdSnapshot 9 Nov 2026