Skip to content

[META] AI policy - #7914

Merged
youknowone merged 6 commits into
RustPython:mainfrom
ShaharNaveh:ai-policy
May 28, 2026
Merged

[META] AI policy#7914
youknowone merged 6 commits into
RustPython:mainfrom
ShaharNaveh:ai-policy

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Updated contribution guidelines with new sections on ways to contribute and AI usage policy.
    • Added pull request template for standardized submissions.
    • Streamlined README contributing section with direct reference to contribution guidelines and community Discord channel.

Review Change Stack

@ShaharNaveh ShaharNaveh added the skip:ci Skip running the ci label May 18, 2026
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR establishes contribution governance by introducing an AI policy framework across three documentation surfaces: CONTRIBUTING.md is restructured to front-load the policy and set expectations; a new PR template enforces acknowledgment at submission time; and README is simplified to direct contributors to the full guidelines.

Changes

Contribution Framework Setup

Layer / File(s) Summary
AI policy and contribution guidelines
CONTRIBUTING.md
CONTRIBUTING.md is reorganized with "Contributing to RustPython" as the opening section, adds "Finding ways to help" to guide contributors to issue tracker and good first issues, and introduces "Use of AI" section requiring all contributions to comply with the project's AI Policy, with non-compliant contributions to be closed.
PR template and README updates
.github/PULL_REQUEST_TEMPLATE.md, README.md
New PR template includes checklist items for closing an issue and acknowledging AI policy compliance. README "Contributing" section is condensed to redirect to CONTRIBUTING.md and invite participation on Discord.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A framework now stands, with policies clear,
Templates and guidelines for all who draw near,
AI compliance checked at the door,
Discord awaits those who seek more!
Governance gently, with governance grace.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title '[META] AI policy' is vague and generic, using non-descriptive terms that don't clearly convey what the PR does without additional context. Consider a more descriptive title like 'Add AI policy and contribution guidelines' or 'Document AI usage policy in CONTRIBUTING.md and PR template' to better summarize the actual changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
<!--
Thanks for your contribution!

TBD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure what to write here, any suggestions? @fanninpm @youknowone

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could start with these sections:

  • What changed: Requesting a description of what the pull request changes in the human's own words. Here the contributor can disclose the use of AI assistance, if applicable. (Coderabbit will make its own summary)
  • Motivation: Requesting an explanation of why the pull request was made in the human's own words. (Language such as Closes #WXYZ should suffice, given some criteria [TODO: should be defined] that the linked issue has to meet.)
  • Verification: Requesting a summary of what steps were taken to verify the effectiveness of the PR's changes.
  • Checklist: Something like (with language to be refined):
    • If I changed something that impacts Rust code, I can confirm that I ran cargo whatever with no errors. (If not, please explain why.)
    • I can confirm that I ran (whatever other tool or tools (for the next few bullet points)) (If not, please explain why.)
    • If I have used AI assistance, I have disclosed it as such.
    • I understand that others, including the RustPython maintainers, will ask me questions about this pull request
    • I will respond to these questions in my own words to the best of my ability.
    • I understand that the RustPython maintainers will close my pull request if I do not check any of these boxes.

If you have anything to add to the checklist, it is a good idea to use the active voice in a manner similar to how I wrote the previous bullet points.


Separately from this PR, I think it would be a good idea to convert our Issue templates from Markdown into YAML format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked that idea a lot. I've looked around in couple of FOSS projects and took what I liked. If you have a checkbox you would like to add/remove, please feel free to say (or even push it straight to my branch)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately from this PR, I think it would be a good idea to convert our Issue templates from Markdown into YAML format

I'll look into that:)

Comment thread CONTRIBUTING.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added CONTRIBUTING.md as it's standardized https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors#adding-a-contributingmd-file

Should we merge DEVELOPMENT. md into it?

feels redundant two have two separate files for the same thing, no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having both CONTRIBUTING and DEVELOPMENT doesn't make sense. yeah, mv DEVELOPMENT and patch it please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DEVELOPMENT. md is pretty outdated, I'll refresh it in a follow PR. I'd rather keep this PR small

@ShaharNaveh
ShaharNaveh marked this pull request as ready for review May 19, 2026 10:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.md`:
- Around line 20-21: CONTRIBUTING.md references a non-existent AI policy at
https://github.com/RustPython/.github/blob/main/AI_POLICY.md; add the missing
AI_POLICY.md to the RustPython/.github repository (or update the link in
CONTRIBUTING.md) so the referenced policy exists. Create a clear AI_POLICY.md
file containing the project's AI usage rules and place it in the .github
repository root, then verify CONTRIBUTING.md's link points to that new file (or
change the link to an existing policy file) to ensure the guideline resolves
correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: f1fa9bc3-418a-4cd4-b7f3-45c8916a108f

📥 Commits

Reviewing files that changed from the base of the PR and between 5394129 and df31b9d.

📒 Files selected for processing (3)
  • .github/PULL_REQUEST_TEMPLATE.md
  • CONTRIBUTING.md
  • README.md

Comment thread CONTRIBUTING.md
Comment on lines +20 to +21
We **require all use of AI in contributions to follow our
[AI Policy](https://github.com/RustPython/.github/blob/main/AI_POLICY.md)**.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the AI policy document exists and is accessible

# Check if the AI policy file exists in the .github repository
gh api repos/RustPython/.github/contents/AI_POLICY.md --jq '.name' 2>/dev/null || echo "AI_POLICY.md not found in RustPython/.github repository"

# Also check the raw content availability
curl -s -o /dev/null -w "%{http_code}" https://raw.githubusercontent.com/RustPython/.github/main/AI_POLICY.md

Repository: RustPython/RustPython

Length of output: 251


The referenced AI policy document does not exist and must be created before merging.

The contribution guidelines require contributors to follow an AI policy at https://github.com/RustPython/.github/blob/main/AI_POLICY.md, but this document is not currently available in the RustPython/.github repository. The policy cannot be enforced or followed by contributors without this document. Either create the AI_POLICY.md file in the RustPython/.github repository or update the reference to point to an existing document.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 20 - 21, CONTRIBUTING.md references a
non-existent AI policy at
https://github.com/RustPython/.github/blob/main/AI_POLICY.md; add the missing
AI_POLICY.md to the RustPython/.github repository (or update the link in
CONTRIBUTING.md) so the referenced policy exists. Create a clear AI_POLICY.md
file containing the project's AI usage rules and place it in the .github
repository root, then verify CONTRIBUTING.md's link points to that new file (or
change the link to an existing policy file) to ensure the guideline resolves
correctly.

Comment thread .github/PULL_REQUEST_TEMPLATE.md
@ShaharNaveh
ShaharNaveh requested a review from fanninpm May 20, 2026 05:49
@ShaharNaveh

Copy link
Copy Markdown
Contributor Author

@fanninpm can you please review?

-->

- [ ] Closes #xxxx <!-- Replace xxxx with the GitHub issue number -->
- [ ] This PR follows our [AI policy](https://github.com/RustPython/.github/blob/main/AI_POLICY.md)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would encourage rewording the rules in the AI policy to use the active voice. For example, instead of "All AI usage in any form must be disclosed", write "You must disclose all AI usage in any form" (or even "You must disclose any AI you used in this PR".

@ShaharNaveh ShaharNaveh May 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is a checkbook for something that needs to be done in the past, it looks off to me (but I'm not a native speaker, maybe that's why).

Are you suggesting having something like:

  • You must disclosure any use of AI as our AI Policy states

?


If it's about the AI policy itself we should fix it as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion does not apply to the checklist, but to the AI Policy itself. As you can see, the "This PR follows our AI Policy" line is already in the active voice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion does not apply to the checklist, but to the AI Policy itself. As you can see, the "This PR follows our AI Policy" line is already in the active voice.

I'll open a PR there and ping you when I'll find the time 😅

@youknowone
youknowone merged commit fc637a1 into RustPython:main May 28, 2026
13 checks passed
@youknowone

Copy link
Copy Markdown
Member

let's start by this. we can revise it when it doesn't work well

@youknowone

Copy link
Copy Markdown
Member

@ShaharNaveh please make sure .github to be public. currently it is 404 out of org

youknowone pushed a commit that referenced this pull request Aug 1, 2026
DEVELOPMENT.md was renamed to CONTRIBUTING.md in #7914, but AGENTS.md
wasn't updated. Repoint the two links with a clear target (Linux/macOS
testing section, development guide). Drop the "CPython Version Upgrade
Checklist" reference under venvlauncher, which never pointed to real
content in any revision of DEVELOPMENT.md.

Related to #8356.

Assisted-by: Claude Code:claude-sonnet-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip:ci Skip running the ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants