This policy is adapted from matplotlib’s contributing guide and the Linux Kernel policy guide.
Core Principles
We value authentic human engagement over AI-generated content. When using AI tools:- Understand what you submit - Fully comprehend all AI-generated code or documentation
- Add personal value - Ensure you contribute based on your own competency
- Take responsibility - You are accountable for everything you submit, including AI-generated parts
Restrictions
Do NOT Post AI Output Directly
AI-generated comments tend to be:- Formulaic and generic
- Low-quality
- Lacking genuine insight
- Potentially incorrect or misleading
- GitHub issue comments
- Pull request discussions
- Code review comments
- Discord messages
- Matrix chats
- Reddit posts
Understand Before Submitting
If you use generative AI tools to develop code or documentation:Just taking input, feeding it to an AI, and posting the result is not valuable to the project.
Developer Certificate of Origin
AI Agents MUST NOT Sign Off
The human submitter is responsible for:- Reviewing all AI-generated code thoroughly
- Ensuring compliance with licensing requirements
- Adding their own Signed-off-by tag to certify the DCO
- Taking full responsibility for the contribution
Signing Your Work
All contributions must be signed off:Attribution Requirements
When AI tools contribute to development, proper attribution helps track the evolving role of AI in the development process.Assisted-by Tag Format
Contributions should include anAssisted-by tag in the commit message:
AGENT_NAME- Name of the AI tool or framework (e.g., Claude, ChatGPT, GitHub Copilot)MODEL_VERSION- Specific model version used (e.g., claude-3-opus, gpt-4-turbo)[TOOL1] [TOOL2]- Optional specialized analysis tools (e.g., coccinelle, sparse, smatch, clang-tidy)
Basic development tools (git, gcc, make, editors) should not be listed.
Example Commit Messages
- With AI Assistance
- Without AI
- Multiple Tools
What AI Can Help With
AI tools can be valuable assistants for:Code Development
- Boilerplate generation - Repetitive code patterns
- API exploration - Understanding unfamiliar libraries
- Bug investigation - Analyzing error messages and stack traces
- Code review - Suggesting improvements (but humans must verify)
- Refactoring ideas - Proposing code restructuring approaches
Documentation
- Initial drafts - Creating documentation structure
- Grammar and clarity - Improving existing text
- Code examples - Generating example usage (must be tested)
- Translation assistance - Helping with non-native language contributions
Testing
- Test case generation - Suggesting test scenarios
- Edge cases - Identifying potential issues
- Test data - Creating sample data for tests
What AI Should NOT Do
Unacceptable Uses
❌ Posting comments/discussions - No AI-generated GitHub/Discord/Matrix messages ❌ Signing commits - AI cannot add Signed-off-by tags ❌ Making final decisions - Humans must make architectural and design choices ❌ Copy-pasting without understanding - Must comprehend all submitted code ❌ Bulk code generation - Large AI-generated changes without thorough reviewEnforcement
Review Process
Maintainers reserve the right to:- Request clarification on contributions that appear AI-generated
- Reject low-value contributions that seem to be unmodified AI output
- Ask for rewrites of overly formulaic or generic code
- Close pull requests that violate this policy
Red Flags
Contributions may be flagged for AI policy violations if they:- Contain generic, formulaic comments
- Show patterns typical of LLM output
- Include unexplained complex changes
- Have commit messages that don’t match the actual changes
- Lack proper Assisted-by attribution when AI use is evident
These reviews are to preserve precious core developer capacity. We need maintainers to focus on valuable contributions, not reviewing machine-generated content.
Best Practices
Using AI Effectively
Questions to Ask Yourself
Before submitting AI-assisted code:- Can I explain this code? - If not, study it until you can
- Is this the right approach? - Or just an approach that compiles?
- Have I tested edge cases? - AI might miss important scenarios
- Does this fit the codebase style? - AI might not know project conventions
- Am I adding value? - Or just submitting raw AI output?
Examples
Good AI Use
Bad AI Use
Additional Resources
- Developer Certificate of Origin
- Linux Kernel Coding Assistants Policy
- Matplotlib AI Policy
- GitHub Commit Signing
Summary
TL;DR: AI can assist your development, but you must understand, verify, and take responsibility for everything you submit. Add proper attribution with Assisted-by tags, and always sign off yourself.
