-
Notifications
You must be signed in to change notification settings - Fork 89
docs: update with AI Contribution Policy #621
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
sdiazlor
wants to merge
2
commits into
main
Choose a base branch
from
ai-contribution-policy
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.
+57
−6
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # AI contribution policy | ||
|
|
||
| At Pruna, we very much welcome any contributions from the community. However, we want to ensure they are high quality and aligned with our guidelines. To ensure AI-assisted contributions remain high quality, reviewable, and aligned with project standards,, we have created this AI contribution policy. Please read it carefully before contributing. | ||
|
|
||
| > Greatly inspired by [CodeCarbon's AI policy](https://docs.codecarbon.io/latest/contributing/AI_POLICY/). | ||
|
|
||
| ## 1. Core Philosophy | ||
|
|
||
| Pruna accepts AI-assisted code (e.g., using Copilot, Cursor, etc.), but strictly rejects AI-generated contributions where the submitter acts merely as a proxy. The human contributor remains fully responsible for every submitted change.. | ||
|
|
||
| > **Accountability lies with the human contributor, not the AI agent** | ||
|
|
||
| Coding agents (e.g., Copilot, Claude Code) are not conscious entities and cannot be held accountable for their outputs. They can produce code that looks correct and plausible but contains subtle bugs, security vulnerabilities, or design flaws. So, contributors are responsible for catching these issues. The following rules ensure that all contributions are carefully vetted and that there is a human submitter behind the agent, taking full responsibility for the submitted code. | ||
|
|
||
| ## 2. The Laws of Contribution | ||
|
|
||
| ### Law 1: Proof of Verification | ||
|
|
||
| AI tools frequently write code that looks correct but fails execution. Therefore, "vibe checks" are insufficient. | ||
|
|
||
| **Requirement:** Every PR introducing functional changes must be carefully tested locally by the human contributor before submission , and all CI checks must pass. | ||
|
|
||
| ### Law 2: The Hallucination & Redundancy Ban | ||
|
|
||
| AI models often hallucinate comments or reinvent existing utilities. | ||
|
|
||
| **Requirement:** You must use existing project utilities and avoid introducing redundant helpers when an appropriate implementation already exists. | ||
|
|
||
| **Failure Conditions:** | ||
|
|
||
| - Creating new helper functions when a Pruna equivalent exists is grounds for immediate rejection. | ||
| - "Ghost Comments" (comments explaining logic that was deleted or doesn't exist) may be asked to revise or justify. Unnecessary comments are not allowed. Example: "This function returns the input". | ||
|
|
||
| ### Law 3: The "Explain It" Standard | ||
|
|
||
| **Requirement:** If a maintainer or reviewer asks during code review, you need to be able to explain the logic of any submitted change. | ||
|
|
||
| **Failure Condition:** | ||
|
|
||
| - Answering a review question with "That's what the AI outputted" or "I don't know, it works" may lead to the PR being closed. | ||
|
|
||
| ### Law 4: Transparency in AI Usage Disclosure | ||
|
|
||
| **Requirement:** If a non-trivial portion of this PR was generated or substantially shaped by AI tools, the PR must be marked as "AI-assisted". Trivial autocomplete, formatting, or minor line completions do not require disclosure. | ||
|
|
||
| **Failure Condition:** | ||
|
|
||
| - Lack of transparency about AI tool usage may result in PR closure, especially if the code contains fabricated or inaccurate code/comments or cannot be explained during review. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| For comprehensive guidance on contributing to Pruna, including development workflows, code quality standards, testing practices, and AI-assisted development best practices, see the [CONTRIBUTING.md](CONTRIBUTING.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
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.