Skip to content

doc: create ai-guidelines and include to CONTRIBUTING#62105

Open
RafaelGSS wants to merge 2 commits intonodejs:mainfrom
RafaelGSS:add-ai-guidelines
Open

doc: create ai-guidelines and include to CONTRIBUTING#62105
RafaelGSS wants to merge 2 commits intonodejs:mainfrom
RafaelGSS:add-ai-guidelines

Conversation

@RafaelGSS
Copy link
Member

As discussed in today's TSC meeting.

cc: @nodejs/tsc @BridgeAR

Co-Authored-By: Beth Griggs <bethanyngriggs@gmail.com>
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 4, 2026
@joyeecheung
Copy link
Member

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>
@RafaelGSS
Copy link
Member Author

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.

I took inspiration from https://github.com/zulip/zulip/blob/main/CONTRIBUTING.md#ai-use-policy-and-guidelines

Comment on lines +46 to +47
* **Do not post AI-generated messages** in pull requests, issues, or the
project's communication channels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

@RafaelGSS RafaelGSS Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that recurring, we should ping the author to stop that, if that doesn't work, we escalate it to TSC/Moderation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally disagree with pull requests descriptions. I find them too verbose and stating the obvious.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Contributor

@aduh95 aduh95 Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
* **Do not post AI-generated messages** in pull requests, issues, or the
project's communication channels.
* **Do not post AI-generated messages** in pull requests, issues, or the
project's communication channels. Including a quote from a chat-bot, or using
such tool to rephrase (or translate) your message does not count as an
"AI-generated message".

EDIT: hum I guess that's already covered by the last item. What I find weird is that we start by saying "Don't send AI-generated messages", while we're still accepting AI-generated content 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something like:

Suggested change
* **Do not post AI-generated messages** in pull requests, issues, or the
project's communication channels.
* **Do not post messages generated entirely by AI** in pull requests, issues, or the
project's communication channels.

So it emphasizes it is fully AI generated, extremely verbose descriptions that suck.


* **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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +46 to +47
* **Do not post AI-generated messages** in pull requests, issues, or the
project's communication channels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a template? I thought those are for issues, not PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[commit message guidelines][].

* **Test thoroughly.** AI-generated code must pass the full test suite and
any manually written tests relevant to the change. Existing Tests should not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
any manually written tests relevant to the change. Existing Tests should not
any manually written tests relevant to the change. Existing tests should not


Node.js expects contributors to understand and take full responsibility for
every change they propose. Pull requests consisting of AI-generated code the
contributor has not personally understood, tested, and verified will be closed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
contributor has not personally understood, tested, and verified will be closed
contributor has not personally understood, tested, and verified shall be closed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing it from "will" to "shall" makes it mandatory.
"will" is however fine in everyday language as a statement of intention.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm trying to convey is that we cannot guarantee that such PR will definitely be closed, but it's the intention. I guess we could use might instead:

Suggested change
contributor has not personally understood, tested, and verified will be closed
contributor has not personally understood, tested, and verified might be closed

Copy link
Contributor

@MikeMcC399 MikeMcC399 Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your intentions and I've made an alternative suggestion in #62105 (comment) which should indicate that the likely outcome is for the PR to be closed, without actually guaranteeing this action.


Pull requests that consist of AI-generated code the contributor has not
personally understood, tested, and verified waste collaborator time and
will be closed without review.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
will be closed without review.
will be subject to closure without additional review.

Comment on lines +55 to +56
contributor has not personally understood, tested, and verified will be closed
without review.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
contributor has not personally understood, tested, and verified will be closed
without review.
contributor has not personally understood, tested, and verified will be subject to closure
without additional review.

Copy link
Contributor

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some minor text suggestions about PR closure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.