Skip to content

Commit a875c10

Browse files
docs(ai_policy): add an AI attribution policy to CONTRIBUTING.rst
Require AI generated contributions to indicate so in commit messages.
1 parent a4cbecb commit a875c10

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

CONTRIBUTING.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,31 @@ To format your code according to our guidelines before committing, run:
9090
cd python-gitlab/
9191
tox -e black,isort
9292
93+
AI Attribution
94+
--------------
95+
96+
When an AI coding assistant contributed meaningfully to a commit (writing or
97+
significantly modifying code, suggesting the fix, generating tests, etc.),
98+
add an ``Assisted-by`` trailer to the commit footer:
99+
100+
.. code-block:: text
101+
Assisted-by: <AgentName>:<ModelVersion>
102+
103+
Place it alongside any ``Closes:`` or ``BREAKING CHANGE:`` lines. Omit it when
104+
the AI contribution was trivial (e.g. a one-word suggestion or only
105+
autocomplete) or purely mechanical (running linters, reformatting).
106+
107+
Example:
108+
109+
.. code-block:: text
110+
fix(reservations): correct overlap check for multi-day bookings
111+
112+
The start-of-day boundary was calculated in UTC rather than the
113+
schedule's local timezone, causing false conflicts.
114+
115+
Closes: #1234
116+
Assisted-by: Claude:claude-sonnet-4-6
117+
93118
Running unit tests
94119
------------------
95120

0 commit comments

Comments
 (0)