-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add AI policy #11257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
VeckoTheGecko
wants to merge
5
commits into
pydata:main
Choose a base branch
from
VeckoTheGecko:ai
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+98
−0
Open
Add AI policy #11257
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e8838d4
Add AI policy
VeckoTheGecko 64db606
Update Icechunk -> Xarray
VeckoTheGecko 100ea9c
Add clause on skill formation
VeckoTheGecko d2fdaff
Note about deleting comments
VeckoTheGecko dae2f62
Rename AI-POLICY.md -> AI_POLICY.md
VeckoTheGecko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| doc/contribute/ai-policy.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| <!-- markdownlint-disable MD013 --> | ||
|
|
||
| # AI Usage Policy | ||
|
|
||
| **Note:** Some Xarray developers use AI tools as part of our development workflow. | ||
| We assume this is now common. Tools, patterns, and norms are evolving fast — this | ||
| policy aims to avoid restricting contributors' choice of tooling while ensuring that: | ||
|
|
||
| - Reviewers are not overburdened | ||
| - Contributions can be maintained | ||
| - The submitter can vouch for and explain all changes | ||
| - Developers can acquire new skills[^1] | ||
|
|
||
| To that end this policy applies regardless of whether the code was written by hand, with | ||
| AI assistance, or generated entirely by an AI tool. | ||
|
|
||
| [^1]: | ||
| Over-reliance on AI tools has been shown to | ||
| [hinder skill formation amongst software developers](https://arxiv.org/abs/2601.20245). | ||
|
|
||
| ## Core Principle: Changes | ||
|
|
||
| If you submit a pull request, you are responsible for understanding and having fully reviewed | ||
| the changes. You must be able to explain why each change is correct[^2] and how it fits into | ||
| the project. Strive to minimize changes to ease the burden on reviewers — avoid | ||
| including unnecessary or loosely related changes. | ||
|
|
||
| [^2]: | ||
| You may also open a draft PR with changes in order to discuss and receive feedback on the | ||
| best approach if you are not sure what the best way forward is. | ||
|
|
||
| ## Core Principle: Communication | ||
|
|
||
| PR descriptions, issue comments, and review responses must be your own words. The | ||
| substance and reasoning must come from you. Do not paste AI-generated text as | ||
| comments or review responses. Please attempt to be concise. | ||
|
|
||
| Using AI to improve the language of your writing (grammar, phrasing, spelling, etc.) is | ||
| acceptable. Be careful that it does not introduce inaccurate details in the process. | ||
|
|
||
| Maintainers reserve the right to delete or hide comments that violate our AI policy or code of conduct. | ||
|
|
||
| ## Code and Tests | ||
|
|
||
| ### Review Every Line | ||
|
|
||
| You must have personally reviewed and understood all changes before submitting. | ||
|
|
||
| If you used AI to generate code, you are expected to have read it critically and | ||
| tested it. As with a hand-written PR, the description should explain the approach | ||
| and reasoning behind the changes. Do not leave it to reviewers to figure out what | ||
| the code does and why. | ||
|
|
||
| #### Not Acceptable | ||
|
|
||
| > I pointed an agent at the issue and here are the changes | ||
|
|
||
| > This is what Claude came up with. 🤷 | ||
|
|
||
| #### Acceptable | ||
|
|
||
| > I iterated multiple times with an agent to produce this. The agent wrote the code at my direction, | ||
| > and I have fully read and validated the changes. | ||
|
|
||
| > I pointed an agent at the issue and it generated a first draft. I reviewed the changes thoroughly and understand the implementation well. | ||
|
|
||
| ### Large AI-Assisted Contributions | ||
|
|
||
| Generating code with agents is fast and easy. Reviewing it is not. Making a PR with a large diff | ||
| shifts the burden from the contributor to the reviewer. To guard against this asymmetry: | ||
|
|
||
| If you are planning a large AI-assisted contribution (e.g., a significant refactor, a | ||
| framework migration, or a new subsystem), **open an issue first** to discuss the scope | ||
| and approach with maintainers. This helps us decide if the change is worthwhile, how | ||
| it should be structured, and any other important decisions. | ||
|
|
||
| Maintainers reserve the right to close PRs where the scope makes meaningful review | ||
| impractical, or when they suspect this policy has been violated. Similarly they may request | ||
| that large changes be broken into smaller, reviewable pieces. | ||
|
|
||
| ## Documentation | ||
|
|
||
| The same core principles apply to both code and documentation You must review the result | ||
| for accuracy and are ultimately responsible for all changes made. Xarray has domain-specific | ||
| semantics that AI tools frequently get wrong. Do not submit documentation that you | ||
| haven't carefully read and verified. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Perhaps we can make this more succinct? I liked the succinctness of https://github.com/pola-rs/polars/blob/main/AI_POLICY.md