-
Notifications
You must be signed in to change notification settings - Fork 673
docs(ai_policy): add an AI attribution policy to CONTRIBUTING.rst #3406
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| ############ | ||
| Contributing | ||
| ============ | ||
| ############ | ||
|
|
||
| You can contribute to the project in multiple ways: | ||
|
|
||
|
|
@@ -75,6 +76,9 @@ This creates a clearer project history, and automates our `Releases`_ and change | |
| * Bad: ``Update documentation for projects`` | ||
| * Good: ``docs(projects): update example for saving project attributes`` | ||
|
|
||
| Also see the `AI attribution section <ai_attribution_section_>`_ for | ||
| information on attributing contributions from AI. | ||
|
|
||
| Coding Style | ||
| ------------ | ||
|
|
||
|
|
@@ -90,6 +94,30 @@ To format your code according to our guidelines before committing, run: | |
| cd python-gitlab/ | ||
| tox -e black,isort | ||
|
|
||
| .. _ai_attribution_section: | ||
|
|
||
| AI Attribution | ||
| -------------- | ||
|
|
||
| When an AI coding assistant contributed meaningfully to a commit (writing or | ||
| significantly modifying code, suggesting the fix, generating tests, etc.), | ||
| add an ``Assisted-by`` trailer to the commit footer:: | ||
|
Comment on lines
+102
to
+104
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this will pretty quickly get outdated, as agents are now autonomous enough that they're essentially doing the whole implementation. Likewise with models and harnesses, they change every month now and can be extended with MCPs, skills, plugins and other tools that I think muddy the water further. WDYT about asking for the initial prompt that created the contribution, instead? As discussed offline as well, I think what's becoming more important now is the author's initial intent for a change, as that way we can better reason about whether something is well-intentioned or just slop to fill a GitHub punch card. Though in that case, it might make more sense to include it in the original PR description as it could pollute the commit log much more than a simple trailer. We could even include it in the PR template, and have agents pick it up automatically. |
||
|
|
||
| Assisted-by: <AgentName>:<ModelVersion> | ||
|
|
||
| Place it alongside any ``Closes:`` or ``BREAKING CHANGE:`` lines. Omit it when | ||
| the AI contribution was trivial (e.g. a one-word suggestion or only | ||
| autocomplete) or purely mechanical (running linters, reformatting). | ||
|
|
||
| Example:: | ||
|
|
||
| fix(cli): correct the --spam flag | ||
|
|
||
| The --spam flag now says spam three times. | ||
|
|
||
| Closes: #1234 | ||
| Assisted-by: Claude:claude-sonnet-4-6 | ||
|
|
||
| Running unit tests | ||
| ------------------ | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .. include:: ../CONTRIBUTING.rst |
Uh oh!
There was an error while loading. Please reload this page.