doc: create ai-guidelines and include to CONTRIBUTING#62105
doc: create ai-guidelines and include to CONTRIBUTING#62105RafaelGSS wants to merge 2 commits intonodejs:mainfrom
Conversation
Co-Authored-By: Beth Griggs <bethanyngriggs@gmail.com>
|
Review requested:
|
|
There may be some ideas we can borrow from https://llvm.org/docs/AIToolPolicy.html - for example "good first issue" should not be picked up by AI is a good one. |
Co-authored-by: Aditi <62544124+Aditi-1400@users.noreply.github.com> Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
I took inspiration from https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines |
| * **Do not post AI-generated messages** in pull requests, issues, or the | ||
| project's communication channels. |
There was a problem hiding this comment.
What is the intended action to take when this occurs? This currently comprises a significant proportion of GH traffic on the core repo; if we are making this a guideline, I would anticipate it applying to a lot of issues/PRs.
There was a problem hiding this comment.
If that recurring, we should ping the author to stop that, if that doesn't work, we escalate it to TSC/Moderation.
There was a problem hiding this comment.
I would recommend allowing pull requests descriptions and commit messages. It's quite useful for those. I would limit this to "when responding to humans".
There was a problem hiding this comment.
I generally disagree with pull requests descriptions. I find them too verbose and stating the obvious.
|
|
||
| * **Keep logical commits.** Structure commits coherently even when an LLM | ||
| generates multiple changes at once. Follow the existing | ||
| [commit message guidelines][]. |
There was a problem hiding this comment.
I would recommend removing this. I prefer to keep a long commit history and then squash when the work is done (even without AI). So I can keep a history of the changes/review done.
There was a problem hiding this comment.
Maybe the wording is not ideal but what I read corresponds to what you say.
|
|
||
| * **Edit generated comments critically.** LLM-produced comments are often | ||
| verbose or inaccurate. Remove comments that simply restate what the code | ||
| does; add comments only where the logic is non-obvious. |
There was a problem hiding this comment.
I would add a "do not disappear" section. Fly-by PRs are problematic. It's ok to close PRs if one cannot pursue them further, while stalling block progress.
| * **Do not post AI-generated messages** in pull requests, issues, or the | ||
| project's communication channels. |
There was a problem hiding this comment.
I would recommend allowing pull requests descriptions and commit messages. It's quite useful for those. I would limit this to "when responding to humans".
| * **Verify accuracy** of any LLM-generated content before including it in a | ||
| PR description or comment. | ||
| * **Complete pull request templates fully** rather than replacing them with | ||
| LLM-generated summaries. |
There was a problem hiding this comment.
Do we have a template? I thought those are for issues, not PRs.
There was a problem hiding this comment.
Not strictly a template: https://github.com/nodejs/node/blob/main/.github/PULL_REQUEST_TEMPLATE.md?plain=1
As discussed in today's TSC meeting.
cc: @nodejs/tsc @BridgeAR