Skip to content

Commit 037bb09

Browse files
committed
PYTHON-5401: Add AI contributions policy
1 parent 182d8e2 commit 037bb09

2 files changed

Lines changed: 35 additions & 30 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ for the PR title. A MongoDB employee will create a JIRA ticket and edit the name
77
88
Note on AI Contributions:
99
We do not accept pull requests that are primarily or substantially generated by AI tools (ChatGPT, Copilot, etc.).
10-
All contributions must be written and understood by human contributors.
10+
All contributions must be written and understood by human contributors. Please read about our policy in our contributing guide.
1111
-->
1212
[JIRA TICKET]
1313

CONTRIBUTING.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,49 +85,54 @@ likelihood for getting review sooner shoots up.
8585
- `versionadded:: 3.11`
8686
- `versionchanged:: 3.5`
8787

88-
**Pull Request Template Breakdown**
88+
### AI-Generated Contributions Policy
8989

90-
- **Github PR Title**
90+
#### Our Stance
9191

92-
- The PR Title format should always be
93-
`[JIRA-ID] : Jira Title or Blurb Summary`.
92+
**We do not accept pull requests that are primarily or substantially generated by AI tools** (ChatGPT, Copilot, etc.). All contributions must be written and understood by human contributors.
9493

95-
- **JIRA LINK**
94+
##### Why This Policy Exists
9695

97-
- Convenient link to the associated JIRA ticket.
96+
Many MongoDB libraries are foundational tools used in production systems worldwide. The nature of these libraries requires:
9897

99-
- **Summary**
98+
- **Absolute correctness**: We have no margin for "generally right" code. Subtle bugs can cause data corruption, security vulnerabilities, or silent failures that only appear under specific conditions.
10099

101-
- Small blurb on why this is needed. The JIRA task should have
102-
the more in-depth description, but this should still, at a
103-
high level, give anyone looking an understanding of why the
104-
PR has been checked in.
100+
- **Deep domain expertise**: MongoDB's wire protocol, BSON specification, connection pooling, authentication mechanisms, and concurrency patterns require an understanding that AI cannot reliably provide.
105101

106-
- **Changes in this PR**
102+
- **Long-term maintainability**: Contributors need to be able to explain *why* code is written a certain way, explain design decisions, and be available to iterate on their contributions.
107103

108-
- The explicit code changes that this PR is introducing. This
109-
should be more specific than just the task name. (Unless the
110-
task name is very clear).
104+
- **Security responsibility**: Authentication, credential handling, and TLS implementation cannot be left to probabilistic code generation.
111105

112-
- **Test Plan**
106+
##### What This Means for Contributors
113107

114-
- Everything needs a test description. Describe what you did
115-
to validate your changes actually worked; if you did
116-
nothing, then document you did not test it. Aim to make
117-
these steps reproducible by other engineers, specifically
118-
with your primary reviewer in mind.
108+
**Required:**
119109

120-
- **Screenshots**
110+
- Full understanding of every line of code you submit
111+
- Ability to explain and defend your implementation choices
112+
- Willingness to iterate and maintain your contributions
121113

122-
- Any images that provide more context to the PR. Usually,
123-
these just coincide with the test plan.
114+
**Encouraged:**
124115

125-
- **Callouts or follow-up items**
116+
- Using AI assistants as learning tools to understand concepts
117+
- IDE autocomplete features that suggest standard patterns
118+
- AI help for brainstorming approaches (but write the code yourself)
126119

127-
- This is a good place for identifying "to-dos" that you've
128-
placed in the code (Must have an accompanying JIRA Ticket).
129-
- Potential bugs that you are unsure how to test in the code.
130-
- Opinions you want to receive about your code.
120+
**Not allowed:**
121+
122+
- Submitting PRs generated solely by AI tools
123+
- Copy-pasting AI-generated code without full understanding
124+
125+
##### Disclosure
126+
127+
If you used AI assistance in any way during your contribution, please disclose what the AI assistant was used for in your PR description. When in doubt, mention it.
128+
129+
##### Questions?
130+
131+
If you're unsure whether your contribution complies with this policy, please ask in an issue before submitting a PR. We're happy to guide contributors toward successful contributions.
132+
133+
---
134+
135+
*This policy helps us maintain the reliability, security, and trustworthiness that production applications depend on. Thank you for understanding and for contributing thoughtfully to PyMongo.*
131136

132137
## Running Linters
133138

0 commit comments

Comments
 (0)