Skip to content

Commit ae35f62

Browse files
Jibolatimgraham
authored andcommitted
PYTHON-5579 Add AI-Generated Contributions Policy
Policy mirrors the language adopted in the mongo-python-driver project.
1 parent 7947be5 commit ae35f62

4 files changed

Lines changed: 100 additions & 0 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<!-- Thanks for contributing! -->
2+
<!-- Please ensure that the title of the PR is in the following form:
3+
[JIRA TICKET] Issue Title
4+
5+
If you are an external contributor and there is no JIRA ticket associated with your change, then use your best judgement
6+
for the PR title. A MongoDB employee will create a JIRA ticket and edit the name and links as appropriate.
7+
8+
Note on AI Contributions:
9+
We only accept pull requests that are authored and submitted by human contributors who fully understand the changes they are proposing.
10+
All contributions must be written and understood by human contributors. Please read about our policy in our contributing guide.
11+
-->
112
JIRA TICKET
213

314
## Changes in this PR

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Contributing to Django MongoDB Backend
2+
3+
Django MongoDB Backend welcomes contributions from any developer. Contributions
4+
can take the form of bug fixes, feature requests, or issue tickets.
5+
6+
- **Issue tickets** can be submitted via
7+
[GitHub issues](https://github.com/django-mongodb/django-mongodb-backend/issues).
8+
- **Bug fixes** can be submitted directly as pull requests.
9+
- **Large code changes** should be preceded by an issue ticket filed with the
10+
team to align on approach before implementation begins.
11+
12+
For full contributing guidelines — including coding style, testing
13+
requirements, documentation standards, and our AI-generated contributions
14+
policy, see the [contributing documentation](https://django-mongodb-backend.readthedocs.io/en/latest/internals/contributing/).
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
================================
2+
AI-Generated Contribution Policy
3+
================================
4+
5+
Our Stance
6+
----------
7+
8+
We only accept pull requests that are authored and submitted by human
9+
contributors who fully understand the changes they are proposing. Pull requests
10+
that are not clearly owned and understood by a human contributor may be closed.
11+
**All contributions must be submitted, reviewed, and understood by human
12+
contributors.**
13+
14+
Why This Policy Exists
15+
----------------------
16+
17+
At MongoDB, we understand the power and prevalence of AI tools in software
18+
development. With that being said, many MongoDB libraries are foundational
19+
tools used in production systems worldwide. The nature of these libraries
20+
requires:
21+
22+
- **Deep domain expertise**: Django MongoDB Backend bridges Django's ORM and
23+
MongoDB. The aggregation pipeline compilation, query generation, migration
24+
system, and connection management require an understanding that AI alone
25+
cannot substantiate.
26+
27+
- **Long-term maintainability**: Contributors need to be able to explain *why*
28+
code is written a certain way, explain design decisions, and be available to
29+
iterate on their contributions.
30+
31+
- **Security responsibility**: Query generation, authentication handling, and
32+
data serialization cannot be left to probabilistic code generation.
33+
34+
What This Means for Contributors
35+
---------------------------------
36+
37+
**Required:**
38+
39+
- A full understanding of every line of code you submit.
40+
- The ability to explain and defend your implementation choices.
41+
- A willingness to iterate and maintain your contributions.
42+
43+
**Encouraged:**
44+
45+
- Using AI assistants as learning tools to understand concepts.
46+
- IDE autocomplete features that suggest standard patterns.
47+
- AI help for brainstorming approaches (but write the code yourself).
48+
- Writing code using AI tools, reviewing each line and revising code as
49+
necessary.
50+
51+
**Not allowed:**
52+
53+
- Submitting PRs generated solely by AI tools.
54+
- Copy-pasting AI-generated code without full understanding.
55+
56+
Disclosure
57+
----------
58+
59+
If you used AI assistance in any way during your contribution, please disclose
60+
what the AI assistant was used for in your PR description. We would love to
61+
know what tools developers have found useful in their development process.
62+
63+
Questions?
64+
----------
65+
66+
If you're unsure whether your contribution complies with this policy, please
67+
ask for guidance within the PR and clarify any uncertainty. We're happy to
68+
guide contributors toward successful contributions.
69+
70+
.. note::
71+
72+
This policy helps us maintain the reliability, security, and trustworthiness
73+
that production applications depend on. Thank you for understanding and for
74+
contributing thoughtfully to Django MongoDB Backend.

docs/internals/contributing/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Backend? Here are some resources:
77

88
.. toctree::
99

10+
ai-policy
1011
coding-style
1112
unit-tests
1213
performance-tests

0 commit comments

Comments
 (0)